/* ============================================================
   AnimaChart marketing site
   Design tokens mirror the app (tailwind.config.ts):
   "Cool Clinical" — cool grey-blue paper/ink at hue 240.
   The brand + primary-action colour is INKSTONE (a near-neutral
   hue-240; its 600 is the logo-mark tile). Cinnabar is now
   reserved for DANGER only (jade = positive, ochre = mild).
   ============================================================ */

:root {
  /* Ink (cool grey-blue text) */
  --ink: oklch(0.20 0.018 240);
  --ink-soft: oklch(0.38 0.015 240);
  --ink-muted: oklch(0.48 0.013 240);

  /* Paper (clinical, not cream) */
  --paper: oklch(0.985 0.005 240);
  --paper-warm: oklch(0.97 0.007 240);
  --paper-deep: oklch(0.93 0.009 240);

  /* Inkstone — brand + primary action + selected. 600 is the logo tile
     (oklch 0.22 0.02 240 ≈ #121c23). 500 is the hover lift (lighter, since
     below L0.22 a darker step reads as nothing). 400 = accent + focus ring. */
  --inkstone-50: oklch(0.965 0.018 240);
  --inkstone-100: oklch(0.915 0.040 240);
  --inkstone-300: oklch(0.74 0.080 240);
  --inkstone-400: oklch(0.48 0.095 240);
  --inkstone-500: oklch(0.32 0.030 240);
  --inkstone-600: oklch(0.22 0.020 240);
  --inkstone-700: oklch(0.16 0.018 240);

  /* Cinnabar — DANGER only now (kept for the legal-page placeholder marker). */
  --cinnabar-50: oklch(0.97 0.020 30);
  --cinnabar-100: oklch(0.92 0.045 30);
  --cinnabar-300: oklch(0.76 0.13 30);
  --cinnabar-500: oklch(0.58 0.19 30);
  --cinnabar-600: oklch(0.50 0.20 30);
  --cinnabar-700: oklch(0.42 0.18 30);

  /* Jade (positive / done / "new") */
  --jade-100: oklch(0.92 0.045 165);
  --jade-500: oklch(0.55 0.13 165);
  --jade-700: oklch(0.40 0.11 165);

  /* Ochre (mild / in-progress) */
  --ochre-100: oklch(0.94 0.04 80);
  --ochre-500: oklch(0.66 0.14 80);
  --ochre-700: oklch(0.48 0.12 80);

  --border: oklch(0.88 0.008 240);
  --border-soft: oklch(0.91 0.007 240);

  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1200px;

  --shadow-soft: 0 1px 2px oklch(0.2 0.02 240 / 0.04), 0 8px 24px oklch(0.2 0.02 240 / 0.06);

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
}

/* ───────────────────────── Reset / base ───────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; color: var(--ink); }
h2 { font-size: clamp(1.7rem, 1rem + 2.6vw, 2.6rem); margin: 0 0 0.6rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.35rem; letter-spacing: 0; }
p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: clamp(1rem, 0.5rem + 2vw, 2rem);
}

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--inkstone-400);
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ───────────────────────── Buttons ───────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn svg { transition: transform 0.2s ease; }
.btn:hover svg { transform: translateX(2px); }

.btn--primary {
  background: var(--inkstone-600);
  color: var(--paper);
  box-shadow: 0 1px 2px oklch(0.22 0.02 240 / 0.28);
}
.btn--primary:hover { background: var(--inkstone-500); transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--paper-warm); border-color: var(--ink-muted); }

.btn--sm { padding: 0.5rem 0.9rem; font-size: 0.88rem; }
.btn--lg { padding: 0.85rem 1.5rem; font-size: 1.02rem; }

/* ───────────────────────── Header ───────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: oklch(0.985 0.005 240 / 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-stuck {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 oklch(0.2 0.02 240 / 0.03);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.brand { display: inline-flex; align-items: center; gap: 0.55rem; }
.brand__mark { flex: none; }
.brand__word {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.site-nav { display: none; gap: 0.35rem; }
.site-nav a {
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  font-size: 0.93rem;
  color: var(--ink-soft);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { background: var(--paper-warm); color: var(--ink); }

.site-header__actions { display: flex; align-items: center; gap: 0.5rem; }
/* The header "Open app" button is hidden on mobile to make room for the
   language switcher (the drawer / hero / footer still carry the CTA); it
   returns at the desktop breakpoint below. */
.site-header__cta { display: none; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  padding: 0 9px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem clamp(1rem, 0.5rem + 2vw, 2rem) 1.1rem;
  border-top: 1px solid var(--border-soft);
  background: var(--paper);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a {
  padding: 0.75rem 0.5rem;
  font-size: 1rem;
  color: var(--ink-soft);
  border-radius: 8px;
}
.mobile-nav a:hover { background: var(--paper-warm); color: var(--ink); }
.mobile-nav .btn { margin-top: 0.5rem; justify-content: center; }

/* ───────────────────────── Eyebrow / shared ───────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--inkstone-600);
  margin: 0 0 0.9rem;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--inkstone-600);
  box-shadow: 0 0 0 3px var(--inkstone-100);
}

.lead {
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 56ch;
}

/* ───────────────────────── Hero ───────────────────────── */
.hero {
  position: relative;
  padding: clamp(2.5rem, 1rem + 6vw, 5.5rem) 0 clamp(2rem, 1rem + 4vw, 4rem);
  background:
    radial-gradient(120% 80% at 85% -10%, var(--inkstone-50) 0%, transparent 55%),
    radial-gradient(90% 70% at 0% 0%, oklch(0.96 0.02 165) 0%, transparent 45%);
}
.hero__grid {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
}
/* Grid/flex children default to min-width:auto, which lets wide content
   (the phone frame, long monospace strings) force the shared column past
   the viewport. Reset so they shrink to the available track. */
.hero__copy,
.hero__visual,
.spotlight__copy,
.spotlight__visual { min-width: 0; }
.hero__title {
  font-size: clamp(2.2rem, 1.2rem + 4.4vw, 3.7rem);
  margin: 0 0 1.1rem;
}
.hero__title em { font-style: italic; color: var(--inkstone-400); }

.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.6rem 0 1.4rem; }

.hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--border-soft);
  color: var(--ink-muted);
  font-size: 0.92rem;
}
.hero__proof strong { color: var(--ink); font-weight: 600; }

/* Hero visual (phone screenshot) */
.hero__visual { position: relative; }
.hero__glow {
  position: absolute;
  /* Right/bottom insets stay non-negative so the blurred glow never bleeds
     past the viewport edge (it's clipped by body{overflow-x:hidden} anyway,
     but this keeps the page genuinely overflow-clean). */
  inset: 8% 4% -4% 6%;
  z-index: -1;
  background: radial-gradient(60% 60% at 50% 40%, var(--inkstone-100), transparent 70%);
  filter: blur(8px);
  opacity: 0.7;
}

/* ───────────────────────── Strip ───────────────────────── */
.strip {
  border-block: 1px solid var(--border-soft);
  background: var(--paper-warm);
}
.strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.1rem;
  padding: 1rem 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
  text-align: center;
}
.strip__inner strong { color: var(--ink-soft); }
.strip__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-muted); opacity: 0.5; }

/* ───────────────────────── Sections ───────────────────────── */
.section { padding: clamp(3rem, 1.5rem + 6vw, 6rem) 0; }
.section--tinted { background: var(--paper-warm); border-block: 1px solid var(--border-soft); }
.section__head { max-width: 62ch; margin: 0 auto clamp(2rem, 1rem + 3vw, 3.2rem); text-align: center; }
.section__head .eyebrow { justify-content: center; }
.section__lead { color: var(--ink-soft); font-size: 1.08rem; margin: 0; }

/* Stepper */
.stepper {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.stepper__item {
  display: flex;
  gap: 1rem;
  padding: 1.3rem 1.4rem;
  background: var(--paper);
  align-items: flex-start;
}
.stepper__num {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--inkstone-50);
  color: var(--inkstone-600);
  border: 1px solid var(--inkstone-100);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}
.stepper__item p { margin: 0; color: var(--ink-muted); font-size: 0.95rem; }

/* Spotlight (split copy + visual) */
.spotlight {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
}
.checklist { list-style: none; margin: 1.2rem 0 1.6rem; padding: 0; display: grid; gap: 0.7rem; }
.checklist li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--ink-soft);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--jade-100);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23166053' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* Key-value */
.kv { display: grid; gap: 0.6rem; margin-top: 1.2rem; }
.kv__item { display: flex; gap: 0.9rem; align-items: baseline; padding: 0.7rem 0.9rem; background: var(--paper); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); }
.kv__k { flex: none; min-width: 84px; padding-right: 0.4rem; font-weight: 600; color: var(--inkstone-600); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.kv__v { color: var(--ink-soft); font-size: 0.92rem; }

/* Who */
.who { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.who__item {
  padding: 1.5rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--paper);
}
.who__item p { margin: 0; color: var(--ink-muted); font-size: 0.96rem; }

/* CTA */
.cta {
  background:
    radial-gradient(80% 120% at 50% 0%, var(--inkstone-50), transparent 60%),
    var(--paper-warm);
  border-top: 1px solid var(--border-soft);
  padding: clamp(3rem, 1.5rem + 6vw, 6rem) 0;
}
.cta__inner { text-align: center; max-width: 56ch; margin: 0 auto; }
.cta__inner h2 { margin-bottom: 0.6rem; }
.cta__inner > p { color: var(--ink-soft); margin-bottom: 1.6rem; }
.cta__sub { margin: 1rem 0 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85rem; color: var(--ink-muted); letter-spacing: 0.02em; }
/* Large brand mark signing off the page, under the CTA + URL. */
.cta__mark { display: block; width: clamp(84px, 9vw, 108px); height: auto; margin: 2.4rem auto 0; }

/* ───────────────────────── Footer ───────────────────────── */
.site-footer { border-top: 1px solid var(--border); background: var(--paper); }
.site-footer__inner {
  display: grid;
  gap: 1rem;
  padding: 2.2rem 0;
  align-items: center;
}
.brand--footer .brand__word { font-size: 1.15rem; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.site-footer__nav a { color: var(--ink-soft); font-size: 0.92rem; }
.site-footer__nav a:hover { color: var(--inkstone-600); }
.site-footer__fine { margin: 0; color: var(--ink-muted); font-size: 0.84rem; }

/* ───────────────────────── Reveal animation ───────────────────────── */
/* Only hide when JS is present (html.js, set inline before paint). Without
   JS the IntersectionObserver never runs, so content must stay visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ───────────────────────── Phone frames ─────────────────────────
   AnimaChart is mobile-first; every feature shot is a full-screen
   1290×2796 capture presented in a dark device bezel. The screen keeps
   the exact 1290/2796 ratio so the whole screenshot shows uncropped.
   Screenshots live in /screenshots — see screenshots/README.md. */
.phone {
  margin: 0;
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
}
.phone__frame {
  padding: 9px;
  border-radius: 42px;
  background: var(--ink);
  box-shadow:
    0 2px 6px oklch(0.2 0.02 240 / 0.12),
    0 22px 48px oklch(0.2 0.02 240 / 0.18);
}
.phone__screen {
  position: relative;
  aspect-ratio: 1290 / 2796;
  border-radius: 32px;
  overflow: hidden;
  background: var(--paper-warm);
}
.phone__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.phone__cap {
  margin: 0.85rem 0 0;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--ink-muted);
  text-align: center;
}
.phone__cap strong { color: var(--ink-soft); font-weight: 600; }

/* AI section: diagnosis + treatment phones side by side */
.phone-duo {
  display: flex;
  gap: clamp(0.6rem, 2vw, 1.25rem);
  justify-content: center;
  align-items: flex-start;
}
.phone-duo .phone { flex: 1 1 0; min-width: 0; max-width: 220px; }

/* Capture gallery: a row of phones. 2-up on phones, 4-up on desktop.
   The responsive rules live right here (after the base) so source order
   doesn't let the shared @media (min-width:720px) block override them. */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
.gallery .phone { max-width: 240px; }
@media (min-width: 900px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
}

/* "New" chip inside an eyebrow, for the AI / Voice / Offline sections */
.eyebrow__new {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: var(--jade-100);
  color: var(--jade-700);
  text-transform: uppercase;
}

/* Reassurance / fine microcopy under a spotlight's checklist */
.microcopy {
  font-size: 0.86rem;
  color: var(--ink-muted);
  max-width: 52ch;
  margin: 0 0 1.4rem;
}

/* ───────────────────────── Offline sync-status card ─────────────────────────
   The visual for the Offline section: the app's real sync-pill states,
   stacked. No screenshot needed — the pill IS the offline UX. */
.status-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  padding: 1.5rem;
  display: grid;
  gap: 0.85rem;
  justify-items: start;
  max-width: 420px;
  margin-inline: auto;
}
.status-card__title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); font-weight: 700; margin: 0 0 0.2rem; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 100%;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--paper-warm);
  color: var(--ink-soft);
}
.status-pill__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-muted); flex: none; }
.status-pill--offline .status-pill__dot { background: var(--inkstone-400); }
.status-pill--sync .status-pill__dot { background: var(--ochre-500); animation: pulseDot 1.4s ease-in-out infinite; }
.status-pill--done { background: var(--jade-100); border-color: var(--jade-100); color: var(--jade-700); }
.status-pill--done .status-pill__dot { background: var(--jade-500); }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ───────────────────────── Responsive ───────────────────────── */
@media (min-width: 720px) {
  .who { grid-template-columns: repeat(3, 1fr); }
  .site-footer__inner {
    grid-template-columns: auto 1fr;
    column-gap: 1.5rem;
    row-gap: 1rem;
  }
  .brand--footer { grid-column: 1; grid-row: 1; }
  .site-footer__nav { justify-self: end; grid-column: 2; grid-row: 1; }
  .site-footer__langs { justify-self: end; grid-column: 2; grid-row: 2; }
  .site-footer__fine { grid-column: 1 / -1; grid-row: 3; text-align: left; }
}

@media (min-width: 900px) {
  .site-nav { display: flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
  .site-header__cta { display: inline-flex; }
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; }
  .spotlight { grid-template-columns: 1fr 1fr; }
  .section__head { text-align: center; }
}

@media (min-width: 1024px) {
  .stepper { grid-template-columns: repeat(2, 1fr); }
  .stepper__item--last { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ───────────────────────── Legal pages ───────────────────────── */
.legal { padding: clamp(2rem, 1rem + 4vw, 3.5rem) 0 clamp(3rem, 2rem + 4vw, 5rem); }
.legal__inner { max-width: 760px; margin: 0 auto; }
.legal__bc { font-size: 0.85rem; color: var(--ink-muted); margin-bottom: 1.4rem; }
.legal__bc a { color: var(--inkstone-600); }
.legal__bc a:hover { text-decoration: underline; }

.legal h1 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.5rem); margin: 0 0 0.4rem; }
.legal h2 { font-size: 1.25rem; margin: 2.1rem 0 0.6rem; }
.legal h3 { font-size: 1.02rem; margin: 1.3rem 0 0.3rem; }
.legal p, .legal li { color: var(--ink-soft); font-size: 1rem; }
.legal ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.legal li { margin-bottom: 0.35rem; }
.legal a { color: var(--inkstone-600); }
.legal a:hover { text-decoration: underline; }
.legal address { font-style: normal; line-height: 1.75; color: var(--ink-soft); }
.legal__intro { color: var(--ink-muted); font-size: 0.98rem; }
.legal__updated {
  margin-top: 2.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* Placeholder marker — makes [fields to fill in] obvious to the editor.
   Kept cinnabar on purpose: an unfilled legal field is a genuine "fix me". */
.ph {
  background: var(--cinnabar-50);
  color: var(--cinnabar-700);
  border: 1px dashed var(--cinnabar-300);
  border-radius: 5px;
  padding: 0 0.3em;
  font-style: normal;
  font-size: 0.95em;
  white-space: nowrap;
}

/* ───────────────────────── Language switcher ─────────────────────────
   A compact dropdown of links in every header — one URL per language
   (/, /de/, /fr/). JS-gated, since opening the menu needs JS; the always-
   visible footer language links (.site-footer__langs) cover the no-JS case
   and give crawlers clean internal links to each language. */
.lang-menu { position: relative; display: none; }
.js .lang-menu { display: inline-block; }
.lang-menu__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.lang-menu__btn:hover { background: var(--paper-warm); border-color: var(--ink-muted); color: var(--ink); }
.lang-menu__chev { transition: transform 0.18s ease; }
.lang-menu__btn[aria-expanded="true"] .lang-menu__chev { transform: rotate(180deg); }

.lang-menu__list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  min-width: 9.5rem;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}
.lang-menu__list[hidden] { display: none; }
.lang-menu__list li { margin: 0; }
.lang-menu__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  transition: background-color 0.12s ease, color 0.12s ease;
}
.lang-menu__list a:hover { background: var(--paper-warm); color: var(--ink); }
.lang-menu__list a.is-active { color: var(--inkstone-600); font-weight: 600; }
.lang-menu__list a.is-active::after { content: "✓"; color: var(--inkstone-600); font-weight: 700; }

/* Footer language links — always visible (works without JS) and a clean
   crawl signal pointing at each language's URL. */
.site-footer__langs { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; align-items: center; }
.site-footer__langs a { color: var(--ink-muted); font-size: 0.85rem; position: relative; }
.site-footer__langs a + a { padding-left: 0.9rem; }
.site-footer__langs a + a::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 1px; height: 0.8em; transform: translateY(-50%);
  background: var(--border);
}
.site-footer__langs a:hover { color: var(--inkstone-600); }
.site-footer__langs a[aria-current="true"] { color: var(--ink); font-weight: 600; }
