/* ==========================================================
   Physiotherapie Kerber – shared stylesheet
   NEW IDEA: one CSS file for all pages. Every page (German and
   English, 28 in total) links this same file, so change a colour
   here and every page updates.

   Layout pattern: "side navigation / dashboard"
   - phones: top bar + slide-out drawer + sticky bottom action bar
   - desktop (1024 px+): fixed left sidebar, content in the middle
   - wide desktop (1200 px+): sticky "On this page" box on the right
   ========================================================== */

:root {
  --ink: #122b33;        /* main text: very dark blue-teal */
  --ink-2: #44606a;      /* secondary text (still good contrast) */
  --teal: #0c6e7f;       /* brand teal-blue: buttons, links */
  --teal-dk: #08525f;    /* hover / pressed */
  --teal-50: #f2f8f9;    /* sidebar + soft panels */
  --teal-100: #dcecef;   /* hover backgrounds, chips */
  --teal-200: #b9d9df;
  --coral: #f08a6c;      /* soft coral: decoration only */
  --coral-50: #fdf1ec;   /* coral tint panels */
  --coral-dk: #b4492f;   /* coral dark enough for text */
  --line: #dbe7ea;       /* hairlines */
  --white: #fff;
  --focus: #e0613f;      /* focus ring: coral, visible on white and teal */

  /* System fonts only. Monospace is used for "prescription codes" (KG, MT ...)
     which gives the site a calm, documentation-like feel. */
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Arial, sans-serif;
  --f-head: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", Roboto, "Noto Sans", system-ui, sans-serif;
  --f-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;

  --r: 14px;
  --r-sm: 10px;
  --side-w: 288px;
  --topbar-h: 60px;
  --shadow: 0 1px 2px rgba(18, 43, 51, .06), 0 6px 20px rgba(18, 43, 51, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 1rem/1.6 var(--f-body);
  color: var(--ink);
  background: var(--white);
  overflow-x: clip;
  padding-bottom: 76px; /* room for the phone action bar */
}
body.no-scroll { overflow: hidden; }
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
a { color: var(--teal); text-underline-offset: .18em; }
a:hover { color: var(--teal-dk); }
h1, h2, h3 { font-family: var(--f-head); line-height: 1.2; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
code { font-family: var(--f-mono); font-size: .88em; background: var(--teal-100); color: var(--teal-dk); padding: .08em .4em; border-radius: 6px; white-space: nowrap; }
abbr { text-decoration: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i {
  width: 1.2em; height: 1.2em; flex: none; vertical-align: -.22em;
  /* icons are drawn with lines, so: no fill, stroke in the current text colour */
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.small { font-size: .875rem; }
.muted { color: var(--ink-2); }

.skip { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 8px; }
.skip:focus { top: 1rem; }

/* ---------- Demo banner ---------- */
.demo-banner {
  background: var(--ink); color: #e6f1f3;
  font-size: .8rem; line-height: 1.35; text-align: center;
  padding: .45rem 1rem;
}

/* ---------- Buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .65em 1.2em;
  border: 1.5px solid transparent; border-radius: 12px;
  font: 600 1rem/1.15 var(--f-body); text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dk); color: #fff; }
.btn-ghost { background: var(--white); color: var(--teal-dk); border-color: var(--teal-200); }
.btn-ghost:hover { background: var(--teal-50); border-color: var(--teal); color: var(--teal-dk); }
.btn-sm { min-height: 44px; padding: .5em .95em; font-size: .92rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.2rem 0 0; }
.more { display: inline-flex; align-items: center; gap: .3em; font-weight: 600; min-height: 44px; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.chip { display: inline-block; padding: .2em .65em; border-radius: 999px; background: var(--teal-100); color: var(--teal-dk); font-size: .85rem; font-weight: 600; }
.chip-accent { background: var(--coral-50); color: var(--coral-dk); box-shadow: inset 0 0 0 1px #f6c4b3; }

/* ---------- Language pill ---------- */
.langs { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--white); flex: none; }
.langs a {
  display: grid; place-items: center; min-width: 44px; min-height: 38px; padding: 0 .55rem;
  border-radius: 999px; font: 700 .82rem/1 var(--f-body); letter-spacing: .04em;
  color: var(--ink-2); text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.langs a[aria-current] { background: var(--teal); color: #fff; }
.langs a:not([aria-current]):hover { background: var(--teal-100); color: var(--ink); }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); min-width: 0; }
.logo-mark { width: 38px; height: 38px; flex: none; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-txt strong { font: 700 1.02rem/1.15 var(--f-head); }
.brand-txt small { font-size: .78rem; color: var(--ink-2); }

/* ---------- Phone top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: .6rem;
  padding: 0 .75rem;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.topbar .brand { margin-right: auto; }
.menu-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 44px; padding: 0 .8rem 0 .65rem;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--teal-50); color: var(--ink);
  font-weight: 600; font-size: .92rem; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.menu-btn .i { width: 1.35em; height: 1.35em; }
@media (max-width: 380px) { .menu-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* ---------- Sidebar (drawer on phones) ---------- */
.sidebar {
  position: fixed; z-index: 60; top: 0; bottom: 0; left: 0;
  width: min(88vw, 330px);
  display: flex; flex-direction: column; gap: 1rem;
  padding: 1rem .9rem 1.2rem;
  background: var(--teal-50);
  border-right: 1px solid var(--line);
  overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(-105%); visibility: hidden;
  transition: transform .28s ease, visibility 0s linear .28s;
}
.sidebar.open, .sidebar:target { transform: none; visibility: visible; transition: transform .28s ease; box-shadow: 0 0 40px rgba(18, 43, 51, .25); }
.backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(18, 43, 51, .45); }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .2rem .2rem 0; }
.drawer-close {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 12px; color: var(--ink); background: var(--white); border: 1px solid var(--line);
  -webkit-tap-highlight-color: transparent;
}
.drawer-close .i { width: 1.4em; height: 1.4em; }
.side-tools { display: flex; flex-direction: column; gap: .6rem; }
.side-tools .langs { align-self: flex-start; }

.nav-filter { position: relative; display: block; }
.nav-filter .i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.nav-filter input {
  width: 100%; min-height: 44px; padding: .55rem .8rem .55rem 2.4rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--white);
  font: inherit; font-size: .95rem; color: var(--ink);
}
.nav-filter input::placeholder { color: #6c848c; }
.nav-filter.big input { min-height: 50px; font-size: 1rem; }

.side-nav ul { list-style: none; margin: 0; padding: 0; }
.nav-group + .nav-group { margin-top: .9rem; }
.nav-label { margin: 0 0 .3rem; padding: 0 .75rem; font: 700 .72rem/1.4 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.side-nav a {
  position: relative;
  display: flex; align-items: center; gap: .6rem;
  min-height: 44px; padding: .5rem .75rem;
  border-radius: var(--r-sm);
  color: var(--ink); text-decoration: none; font-size: .95rem; line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
}
.side-nav a .i { color: var(--teal); }
.side-nav a:hover { background: var(--teal-100); color: var(--ink); }
.side-nav a[aria-current="page"] { background: var(--white); color: var(--teal-dk); font-weight: 700; box-shadow: var(--shadow); }
.side-nav a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--coral); }
.nav-sub { margin: .15rem 0 .2rem 1.45rem !important; padding-left: .55rem !important; border-left: 1.5px solid var(--teal-200); }
.nav-sub a { min-height: 40px; padding: .4rem .7rem; font-size: .9rem; color: var(--ink-2); }
.nav-empty { padding: .5rem .75rem; font-size: .9rem; color: var(--ink-2); }

.side-card { margin-top: auto; display: grid; gap: .55rem; padding: .9rem; border-radius: var(--r); background: var(--white); border: 1px solid var(--line); }
.side-card .status { margin: 0 0 .15rem; font-size: .9rem; }

/* open/closed status line, filled in by app.js */
.status { display: flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--ink-2); }
.status::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: #a9babf; flex: none; }
.status .i { display: none; }
.status.is-open { color: #0b6b4f; }
.status.is-open::before { background: #18a07a; box-shadow: 0 0 0 4px rgba(24, 160, 122, .18); }
.status.is-closed { color: var(--coral-dk); }
.status.is-closed::before { background: var(--coral); }

/* ---------- Content column ---------- */
.content { min-width: 0; }
.page { padding: 1.25rem 1.1rem 2rem; outline: none; }
.page-head, .doc { max-width: 800px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .2rem .4rem; margin: 0 0 1rem; padding: 0; font-size: .85rem; color: var(--ink-2); }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--teal-200); }
.crumbs a { color: var(--ink-2); display: inline-block; padding: .35rem 0; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; padding: .35rem 0; display: inline-block; }
.eyebrow { margin: 0 0 .5rem; font: 700 .78rem/1.4 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--coral-dk); }
.eyebrow code { text-transform: none; letter-spacing: 0; font-size: .9em; }
h1 { font-size: clamp(1.85rem, 1.2rem + 2.6vw, 2.75rem); font-weight: 750; margin-bottom: .6rem; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 62ch; }

.head-row { display: flex; gap: 1rem; align-items: flex-start; }
.head-row > div { min-width: 0; }
@media (max-width: 559px) { .head-row { display: block; } .head-row .illo { width: 52px; height: 52px; margin: 0 0 .3rem; } }
.head-row .illo { width: 64px; height: 64px; flex: none; margin-top: .2rem; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 1.2rem 0 0; }
.facts div { min-width: 0; background: var(--teal-50); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .65rem .8rem; }
.facts dt { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; }
.facts dd { margin: .15rem 0 0; font-weight: 650; font-size: .95rem; }
.facts code { white-space: normal; -webkit-box-decoration-break: clone; box-decoration-break: clone; line-height: 1.75; }

/* "On this page" box – a <details> on phones, a sticky column on wide screens */
.toc { margin: 1.4rem 0 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--teal-50); max-width: 800px; }
.toc summary {
  display: flex; align-items: center; gap: .55rem; min-height: 48px; padding: .4rem 1rem;
  cursor: pointer; list-style: none; font-weight: 700; font-size: .92rem;
  -webkit-tap-highlight-color: transparent;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary .i { color: var(--teal); }
.toc .chev { margin-left: auto; transition: transform .2s; }
.toc[open] .chev { transform: rotate(180deg); }
.toc ol { list-style: none; margin: 0; padding: 0 .6rem .7rem; counter-reset: toc; }
.toc li a {
  display: flex; align-items: center; min-height: 40px; padding: .3rem .6rem .3rem .9rem;
  border-left: 2px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: .92rem;
}
.toc li a:hover { color: var(--teal-dk); border-left-color: var(--teal-200); }
.toc li a[aria-current="true"] { color: var(--teal-dk); font-weight: 700; border-left-color: var(--coral); }

/* ---------- Sections ---------- */
.sec { margin-top: 2.6rem; scroll-margin-top: calc(var(--topbar-h) + 16px); }
.sec > h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.65rem); font-weight: 720; padding-top: 1.4rem; border-top: 1px solid var(--line); margin-bottom: 1rem; }
.tabpanel, [id^="q-"], .person, .course { scroll-margin-top: calc(var(--topbar-h) + 16px); }
h3 { font-size: 1.08rem; font-weight: 700; }
.h3 { margin: 1.6rem 0 .7rem; }

.ticks, .plain { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .55rem; }
.ticks li { display: flex; gap: .6rem; align-items: flex-start; }
.ticks .i { color: var(--teal); margin-top: .2rem; }
.plain li { padding-left: 1.1rem; position: relative; }
.plain li::before { content: ""; position: absolute; left: 0; top: .62em; width: .42rem; height: .42rem; border-radius: 2px; background: var(--coral); }

/* Numbered steps drawn as a vertical timeline (CSS counters) */
.steps { list-style: none; margin: 0 0 1rem; padding: 0; counter-reset: st; }
.steps > li { position: relative; padding: 0 0 1.2rem 3.1rem; counter-increment: st; }
.steps > li::before {
  content: counter(st); position: absolute; left: 0; top: -.1rem;
  width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--teal); color: #fff;
  font: 700 .95rem/1 var(--f-mono);
}
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 1.02rem; top: 2.2rem; bottom: .2rem; width: 2px; background: var(--teal-200); }
.steps h3 { margin-bottom: .2rem; }
.steps p { margin: 0; color: var(--ink-2); }

.callout { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: var(--r); background: var(--teal-50); border: 1px solid var(--line); border-left: 4px solid var(--teal); margin: 0 0 1rem; }
.callout > .i { color: var(--teal); width: 1.4em; height: 1.4em; margin-top: .05rem; }
.callout p:last-child { margin-bottom: 0; }
.callout.warn { background: var(--coral-50); border-color: #f6d3c7; border-left-color: var(--coral-dk); }
.callout.warn > .i { color: var(--coral-dk); }
.callout.info-strong { background: #fff; border-color: var(--teal-200); border-left-color: var(--coral); }

/* ---------- Tables ---------- */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); margin: 0 0 .7rem; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: .75rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tbody tr:last-child > * { border-bottom: 0; }
thead th { background: var(--teal-50); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
tbody th { font-weight: 500; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.c { text-align: center; }
.prices tbody tr:nth-child(even) { background: #fbfdfd; }
.compare { min-width: 640px; }
.compare tbody th a { font-weight: 650; }

.cta-box {
  display: grid; gap: 1rem; margin-top: 1.6rem; padding: 1.3rem;
  border-radius: var(--r); color: #fff;
  background: radial-gradient(circle at 100% 0, rgba(240, 138, 108, .55), transparent 45%), linear-gradient(135deg, var(--teal), var(--teal-dk));
}
.cta-box p { margin: 0; color: #e3f1f3; }
.cta-box .cta-title { font: 700 1.2rem/1.3 var(--f-head); color: #fff; margin-bottom: .3rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.cta-box .btn-primary { background: #fff; color: var(--teal-dk); }
.cta-box .btn-primary:hover { background: var(--coral-50); }
.cta-box .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.cta-box :focus-visible { outline-color: #fff; }

.related { margin-top: 2.4rem; }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.related a { display: flex; align-items: center; gap: .75rem; padding: .5rem .8rem; border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-weight: 600; min-height: 56px; }
.related a:hover { border-color: var(--teal-200); background: var(--teal-50); }
.related .illo { width: 40px; height: 40px; flex: none; }

.updated { margin: 3rem 0 .8rem; font-size: .82rem; color: var(--ink-2); }
.pager { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .6rem; }
.pg { display: flex; flex-direction: column; gap: .15rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); min-height: 64px; }
.pg:hover { border-color: var(--teal); background: var(--teal-50); color: var(--ink); }
.pg small { display: inline-flex; align-items: center; gap: .25rem; color: var(--ink-2); font-size: .8rem; }
.pg span { overflow-wrap: break-word; hyphens: auto; font-weight: 700; color: var(--teal-dk); line-height: 1.3; }
.pg.next { text-align: right; align-items: flex-end; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--teal-50); padding: 2rem 1.1rem 1.4rem; font-size: .92rem; }
.foot-grid { display: grid; gap: 1.4rem; max-width: 1100px; }
.foot-brand { display: flex; align-items: center; gap: .6rem; font: 700 1.05rem var(--f-head); }
.foot-brand .logo-mark { width: 32px; height: 32px; }
.foot-links { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 1rem; }
.foot-links a { display: inline-block; padding: .35rem 0; color: var(--ink-2); }
.foot-legal { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; align-items: center; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--ink-2); max-width: 1100px; }
.foot-legal p { margin: 0; }
.foot-legal nav { display: flex; gap: 1rem; }
.foot-legal nav a { display: inline-block; padding: .5rem 0; color: var(--ink-2); }
.credit { font-size: .82rem; }

/* ---------- Phone action bar ---------- */
.actionbar {
  position: fixed; z-index: 45; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: 1fr 1.5fr; gap: .5rem;
  padding: .55rem .7rem calc(.55rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(18, 43, 51, .08);
}
.actionbar a {
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 50px; border-radius: 12px; font-weight: 700; text-decoration: none;
  border: 1.5px solid var(--teal-200); color: var(--teal-dk); background: #fff;
  -webkit-tap-highlight-color: transparent;
}
.actionbar a.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.actionbar a:active { transform: translateY(1px); }

/* ---------- Home: hero + dashboard tiles ---------- */
.hero { display: grid; gap: 1.4rem; }
.en-hint { margin: 1rem 0 0; }
.en-hint a { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; font-weight: 600; color: var(--coral-dk); }
.dash { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; align-content: start; }
.tile { padding: .85rem .9rem; border-radius: var(--r); background: var(--teal-50); border: 1px solid var(--line); min-width: 0; }
.tile-status { grid-column: 1 / -1; background: linear-gradient(135deg, #fff, var(--teal-50)); box-shadow: var(--shadow); }
.tile-label { margin: 0 0 .35rem; font: 700 .7rem/1.3 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.tile-big { margin: 0; font-weight: 700; line-height: 1.3; font-size: .95rem; }
.tile-sub { margin: .35rem 0 0; font-size: .8rem; color: var(--ink-2); line-height: 1.35; }
.status.big { font-size: 1.1rem; color: var(--ink); margin: 0; }

.quick { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.quick a {
  display: flex; align-items: center; gap: .85rem; height: 100%;
  padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--r);
  text-decoration: none; color: var(--ink); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.quick a:hover { border-color: var(--teal-200); box-shadow: var(--shadow); color: var(--ink); }
.quick a > .i:first-child { width: 2.4rem; height: 2.4rem; padding: .5rem; border-radius: 12px; background: var(--coral-50); color: var(--coral-dk); }
.quick span { display: flex; flex-direction: column; gap: .1rem; flex: 1; min-width: 0; }
.quick small { color: var(--ink-2); font-size: .87rem; line-height: 1.4; }
.quick .go { color: var(--teal); }

.tcards { list-style: none; margin: 0 0 .5rem; padding: 0; display: grid; gap: .6rem; }
.tcard a { display: flex; gap: .9rem; height: 100%; padding: 1rem; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.tcard a:hover { border-color: var(--teal-200); box-shadow: var(--shadow); color: var(--ink); }
.tcard .illo { width: 56px; height: 56px; flex: none; }
.tcard-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.tcard strong { font: 700 1.05rem/1.25 var(--f-head); color: var(--teal-dk); }
.tcard-meta { color: var(--ink-2); font-size: .82rem; }
.tcard-txt { font-size: .92rem; color: var(--ink-2); line-height: 1.45; }

.feature { position: relative; overflow: hidden; padding: 1.3rem; border-radius: var(--r); background: var(--coral-50); border: 1px solid #f6d3c7; }
.feature::after { content: ""; position: absolute; right: -50px; top: -50px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(240, 138, 108, .35), transparent 70%); pointer-events: none; }
.feature-kicker { font: 700 .78rem/1.3 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--coral-dk); margin-bottom: .5rem; }
.feature .btn-row { margin-top: .6rem; }

.mini-list { list-style: none; margin: 0 0 .5rem; padding: 0; border: 1px solid var(--line); border-radius: var(--r); }
.mini-list li { display: flex; flex-direction: column; padding: .75rem 1rem; }
.mini-list li + li { border-top: 1px solid var(--line); }
.mini-list span { font-size: .88rem; color: var(--ink-2); font-family: var(--f-mono); }

.two-col { display: grid; gap: 1rem; }
.hours th, .hours td { padding: .55rem .8rem; }
.hours tr.today { background: var(--teal-100); }
.hours tr.today th { font-weight: 700; }
.hours { border: 1px solid var(--line); border-radius: var(--r); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.addr-card { padding: 1.1rem; border-radius: var(--r); background: var(--teal-50); border: 1px solid var(--line); }
.addr-card p .i { color: var(--teal); }
.addr-card p:last-child { margin-bottom: 0; }

/* ---------- Team ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .4rem; }
.chip-btn {
  min-height: 44px; padding: .4rem .95rem; border-radius: 999px;
  border: 1.5px solid var(--teal-200); background: #fff; color: var(--teal-dk);
  font: 600 .92rem/1 var(--f-body); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.chip-btn[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.people { list-style: none; margin: .6rem 0 .8rem; padding: 0; display: grid; gap: .8rem; }
.person { display: grid; grid-template-columns: 84px 1fr; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.avatar { width: 84px; height: 84px; border-radius: 50%; display: block; }
.person h3 { font-size: 1.15rem; }
.role { margin: .1rem 0 .7rem; color: var(--coral-dk); font-weight: 600; font-size: .92rem; }
.person-label { margin: .6rem 0 .25rem; font: 700 .7rem/1.3 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.spec { margin: 0; padding-left: 1.1rem; font-size: .93rem; }
.langs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.langs-list li { font-size: .82rem; padding: .2rem .55rem; border-radius: 8px; background: var(--teal-50); border: 1px solid var(--line); }
.langs-list abbr { font: 700 .78rem var(--f-mono); color: var(--teal-dk); }
.langs-list small { color: var(--ink-2); }
.langs-list .lv3 { background: var(--teal-100); }
.about { margin: .8rem 0 0; font-size: .9rem; color: var(--ink-2); }
.matrix th, .matrix td { white-space: nowrap; }
.lvl { font-size: .88rem; }
.lvl3 { background: #d5ebef; font-weight: 700; }
.lvl2 { background: #ecf6f7; }
.lvl1 { background: #fbf3ef; }
.lvl0 { color: #9fb2b8; }
.qual { display: grid; gap: .5rem; margin: 0 0 .8rem; }
.qual div { display: flex; flex-direction: column; padding: .7rem .9rem; border-radius: var(--r-sm); background: var(--teal-50); border: 1px solid var(--line); }
.qual dt { font-weight: 650; }
.qual dd { margin: 0; color: var(--ink-2); font-size: .9rem; font-family: var(--f-mono); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 1rem; }
.contact-list { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .5rem; }
.map { margin: 0 0 1rem; }
.map svg { display: block; width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); }
.map figcaption { font-size: .82rem; color: var(--ink-2); margin-top: .4rem; }
.m-water { font: italic 600 15px var(--f-body); fill: #4d8fa1; }
.m-road { font: 700 11px var(--f-body); fill: #3e2a00; text-anchor: middle; }
.m-street { font: 600 12px var(--f-body); fill: #6c848c; }
.m-p { font: 800 18px var(--f-body); fill: var(--teal); text-anchor: middle; }
.m-h { font: 800 13px var(--f-body); fill: #fff; text-anchor: middle; }
.m-lbl { font: 500 13px var(--f-body); fill: var(--ink-2); }
.m-name { font: 800 15px var(--f-head); fill: var(--ink); }
.m-dir { font: 700 13px var(--f-body); fill: var(--teal-dk); }
.m-n { font: 800 11px var(--f-body); fill: var(--ink); text-anchor: middle; }
.travel { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .6rem; }
.travel li { display: flex; gap: .8rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--r); }
.travel li > .i { width: 2.2rem; height: 2.2rem; padding: .45rem; border-radius: 10px; background: var(--teal-100); color: var(--teal-dk); }
.travel h3 { margin-bottom: .2rem; font-size: 1rem; }
.travel p { margin: 0; color: var(--ink-2); font-size: .94rem; }
.acc-grid { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.acc-grid li { display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; border-radius: var(--r-sm); background: var(--teal-50); border: 1px solid var(--line); font-size: .95rem; }
.acc-grid .i { color: var(--teal); width: 1.5em; height: 1.5em; }

/* ---------- New patients ---------- */
.checklist ul { list-style: none; margin: 0 0 .5rem; padding: 0; border: 1px solid var(--line); border-radius: var(--r); }
.checklist li + li { border-top: 1px solid var(--line); }
.checklist label { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 1rem; cursor: pointer; min-height: 52px; -webkit-tap-highlight-color: transparent; }
.checklist input { width: 1.35rem; height: 1.35rem; margin: .1rem 0 0; accent-color: var(--teal); flex: none; }
.checklist input:checked + span { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--coral); }
html:not(.js) [data-print], html:not(.js) [data-check-reset] { display: none; }

.calc { margin-top: 1.2rem; padding: 1.1rem; border-radius: var(--r); border: 1px dashed var(--teal-200); background: #fbfeff; }
.calc-title { font-weight: 700; margin-bottom: .7rem; }
.calc-grid { display: grid; gap: .7rem; margin-bottom: .6rem; }
.calc label:not(.check) { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; font-weight: 600; }
.calc-out { display: block; margin: .8rem 0 .5rem; padding: .8rem 1rem; border-radius: var(--r-sm); background: var(--teal); color: #fff; font: 700 1.05rem/1.35 var(--f-mono); }

/* Tabs (only switched on when app.js runs – otherwise all panels show) */
.tablist { display: flex; gap: .3rem; padding: .3rem; margin-bottom: 1rem; border-radius: 14px; background: var(--teal-50); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tablist::-webkit-scrollbar { display: none; }
.tablist [role="tab"] {
  flex: 1 0 auto; min-height: 44px; padding: .5rem .9rem; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink-2); font: 600 .93rem/1.2 var(--f-body); cursor: pointer; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.tablist [role="tab"][aria-selected="true"] { background: #fff; color: var(--teal-dk); box-shadow: var(--shadow); }
.tablist [role="tab"] .today-dot { display: inline-block; width: .4rem; height: .4rem; border-radius: 50%; background: var(--coral); margin-left: .35rem; vertical-align: .15em; }
.tabpanel { outline: none; }
.tabpanel + .tabpanel { margin-top: 1.4rem; }
.tabs-on .tabpanel + .tabpanel { margin-top: 0; }
.tabs-on .tabpanel:not(.active) { display: none; }
.tabs-on .panel-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.panel-h { margin-bottom: .6rem; }

.rx-wrap { display: grid; gap: 1rem; margin-bottom: 1.2rem; }
.rx { margin: 0; }
.rx svg { display: block; width: 100%; height: auto; }
.rx figcaption { font-size: .82rem; color: var(--ink-2); margin-top: .4rem; }
.rx-l { font: 500 10.5px var(--f-body); fill: #8a6d62; }
.rx-title { font: 800 17px var(--f-head); fill: var(--ink); }
.rx-v { font: 700 15px var(--f-mono); fill: var(--ink); }
.rx-soft { fill: #8a9ca2; }
.rx-box rect { fill: #fff; stroke: #c9a99c; }
.rx-m circle { fill: var(--coral-dk); }
.rx-m text { font: 800 13px var(--f-body); fill: #fff; text-anchor: middle; }
.rx-legend { list-style: none; margin: 0; padding: 0; counter-reset: rx; display: grid; gap: .5rem; }
.rx-legend li { counter-increment: rx; position: relative; padding: .2rem 0 .2rem 2.4rem; display: flex; flex-direction: column; }
.rx-legend li::before { content: counter(rx); position: absolute; left: 0; top: .15rem; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--coral-dk); color: #fff; display: grid; place-items: center; font: 800 .85rem var(--f-body); }
.rx-legend span { color: var(--ink-2); font-size: .93rem; }

.us-grid { display: grid; gap: .6rem; margin-bottom: 1rem; }
.us-card { padding: 1rem; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.us-card > .i { width: 2.4rem; height: 2.4rem; padding: .4rem; border-radius: 10px; background: var(--coral-50); color: var(--coral-dk); margin-bottom: .5rem; }
.us-card h3 { margin-bottom: .3rem; }
.us-card p { margin: 0; font-size: .94rem; color: var(--ink-2); }
.gloss { display: grid; gap: .4rem; margin: 0 0 1rem; }
.gloss div { display: flex; flex-wrap: wrap; gap: .2rem .8rem; padding: .55rem .8rem; border-radius: var(--r-sm); background: var(--teal-50); }
.gloss dt { font-weight: 700; font-family: var(--f-mono); font-size: .92rem; color: var(--teal-dk); }
.gloss dd { margin: 0; color: var(--ink-2); }

/* ---------- FAQ accordion (native <details>) ---------- */
.faq-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 1.4rem 0 .3rem; }
.faq-tools .nav-filter { flex: 1 1 240px; }
.faq-list { display: grid; gap: .5rem; }
.faq-item { border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.faq-item[open] { border-color: var(--teal-200); box-shadow: var(--shadow); }
.faq-item summary {
  display: flex; align-items: center; gap: .8rem; min-height: 54px; padding: .7rem 1rem;
  cursor: pointer; list-style: none; font-weight: 650; -webkit-tap-highlight-color: transparent;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary span { flex: 1; }
.faq-item .chev { color: var(--teal); transition: transform .2s; }
.faq-item[open] .chev { transform: rotate(180deg); }
.faq-a { padding: 0 1rem .9rem; color: var(--ink-2); }
.faq-a p { margin: 0; }
.faq-empty { padding: 1rem; border-radius: var(--r); background: var(--coral-50); }

/* ---------- Classes ---------- */
.switch { display: inline-flex; align-items: center; gap: .7rem; min-height: 44px; margin-bottom: .8rem; cursor: pointer; font-weight: 600; -webkit-tap-highlight-color: transparent; }
.switch input { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 999px; background: #c5d3d7; position: relative; cursor: pointer; flex: none; margin: 0; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked { background: var(--teal); }
.switch input:checked::after { transform: translateX(18px); }
.courses { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.course { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.course:target { border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-50); }
.course h3 { margin-bottom: .4rem; }
.course > p:not(.badges) { font-size: .94rem; color: var(--ink-2); }
.badges { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 .6rem; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px; background: var(--teal-50); border: 1px solid var(--line); font-size: .78rem; font-weight: 650; color: var(--ink-2); }
.badge .i { width: 1em; height: 1em; }
.badge-accent { background: var(--coral-50); color: var(--coral-dk); border-color: #f6d3c7; }
.badge-ok { color: #0b6b4f; background: #eaf7f2; border-color: #cbe9de; }
.mini-dl { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: 0; font-size: .88rem; }
.mini-dl dt { color: var(--ink-2); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.mini-dl dd { margin: 0; font-weight: 650; }
.slots { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); }
.slot { display: grid; grid-template-columns: 6.2rem 1fr; gap: .8rem; padding: .8rem 1rem; align-items: start; }
.slot + .slot { border-top: 1px solid var(--line); }
.slot-time { font: 700 .9rem/1.5 var(--f-mono); color: var(--teal-dk); }
.slot-main { display: flex; flex-direction: column; gap: .1rem; }
.slot-main a { font-weight: 700; }
.slot-main small { color: var(--ink-2); font-size: .85rem; }
.slot-empty { padding: 1rem; border-radius: var(--r); background: var(--teal-50); color: var(--ink-2); }
html[lang="en"] .slot { grid-template-columns: 7.6rem 1fr; }

/* ---------- Appointment wizard ---------- */
.stepper { scroll-margin-top: calc(var(--topbar-h) + 12px); list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; margin: 1.2rem 0 1rem; padding: 0; counter-reset: none; }
.stepper li { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; font-size: .75rem; color: var(--ink-2); position: relative; }
.stepper li:not(:last-child)::after { content: ""; position: absolute; top: 1rem; left: calc(50% + 1.2rem); right: calc(-50% + 1.2rem); height: 2px; background: var(--line); }
.stepper .num { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--teal-200); background: #fff; font: 700 .85rem var(--f-mono); color: var(--ink-2); position: relative; z-index: 1; }
.stepper li[aria-current="step"] { color: var(--ink); font-weight: 700; }
.stepper li[aria-current="step"] .num { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 0 0 4px var(--teal-100); }
.stepper li.is-done .num { background: var(--teal-100); border-color: var(--teal); color: var(--teal-dk); }
.stepper li.is-done::after { background: var(--teal); }
.wizard { padding: 1.1rem; border-radius: var(--r); border: 1px solid var(--line); background: #fbfdfd; }
.wstep { border: 0; margin: 0; padding: 0; min-width: 0; }
.wstep + .wstep { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px dashed var(--line); }
.wizard-on .wstep + .wstep { margin-top: 0; padding-top: 0; border-top: 0; }
.wizard-on .wstep:not(.active) { display: none; }
.wstep legend { font: 700 1.2rem/1.3 var(--f-head); padding: 0; margin-bottom: 1rem; outline: none; }
.wnum { font: 700 .8rem var(--f-mono); color: var(--coral-dk); background: var(--coral-50); padding: .15rem .45rem; border-radius: 6px; vertical-align: .15em; margin-right: .3rem; }
.field { margin-bottom: 1.2rem; }
.flabel { display: block; font-weight: 650; margin: 0 0 .45rem; }
.req { color: var(--coral-dk); }
.opts { display: grid; gap: .45rem; }
@media (min-width: 420px) { .opts-2, .opts-3 { grid-template-columns: 1fr 1fr; } .opts-5 { grid-template-columns: repeat(5, 1fr); } }
.opts-5 { grid-template-columns: repeat(3, 1fr); }
.opt { position: relative; display: flex; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span {
  flex: 1; display: flex; align-items: center; gap: .55rem; min-height: 48px; padding: .55rem .8rem;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer;
  font-size: .94rem; line-height: 1.3; -webkit-tap-highlight-color: transparent;
}
.opt span::before { content: ""; width: 1.05rem; height: 1.05rem; flex: none; border: 2px solid var(--teal-200); border-radius: 50%; background: #fff; }
.opt input[type="checkbox"] + span::before { border-radius: 5px; }
.opt input:checked + span { border-color: var(--teal); background: var(--teal-50); font-weight: 650; }
.opt input:checked + span::before { border-color: var(--teal); background: var(--teal); box-shadow: inset 0 0 0 3px #fff; }
.opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.opts-5 .opt span { justify-content: center; padding: .55rem .4rem; }
.opts-5 .opt span::before { display: none; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field input[type="date"], .field select, .field textarea, .calc input[type="number"] {
  width: 100%; min-height: 48px; padding: .6rem .8rem; border: 1.5px solid #c9d9dd; border-radius: 12px;
  background: #fff; font: inherit; color: var(--ink);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .calc input[type="number"]:focus { border-color: var(--teal); outline: 3px solid var(--teal-100); outline-offset: 0; }
[aria-invalid="true"] { border-color: var(--coral-dk) !important; }
.err { margin: .35rem 0 0; color: var(--coral-dk); font-weight: 600; font-size: .9rem; }
.hint { margin: .35rem 0 0; color: var(--ink-2); font-size: .88rem; }
.hint.warn { color: var(--coral-dk); font-weight: 600; }
.hint.ok { color: #0b6b4f; font-weight: 600; }
.check { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem 0; cursor: pointer; }
.check input { width: 1.3rem; height: 1.3rem; margin: .1rem 0 0; accent-color: var(--teal); flex: none; }
.summary { margin: 0 0 1rem; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.summary div { display: grid; grid-template-columns: 1fr; gap: .1rem; padding: .6rem .9rem; }
.summary div + div { border-top: 1px solid var(--line); }
.summary dt { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; }
.summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.wnav { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.wnav [data-next] { margin-left: auto; }
.done { margin-top: 1rem; padding: 1rem; border-radius: var(--r); background: #eaf7f2; border: 1px solid #cbe9de; outline: none; }
.done p { margin: 0; }

/* ======================================================
   Bigger screens
   ====================================================== */
@media (min-width: 560px) {
  .quick { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: repeat(4, 1fr); }
  .calc-grid { grid-template-columns: 1fr 1fr; }
  .us-grid { grid-template-columns: 1fr 1fr; }
  .acc-grid { grid-template-columns: 1fr 1fr; }
  .summary div { grid-template-columns: 11rem 1fr; gap: 1rem; }
  .related ul { grid-template-columns: repeat(3, 1fr); }
  .dash { grid-template-columns: 1fr 1fr; }
  .stepper li { font-size: .82rem; }
  .opts-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 720px) {
  .page { padding: 2rem 2rem 2.5rem; }
  .site-footer { padding: 2rem 2rem 1.4rem; }
  .tcards { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr 1fr; align-items: start; }
  .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .people { grid-template-columns: 1fr 1fr; }
  .person { grid-template-columns: 1fr; }
  .avatar { width: 96px; height: 96px; }
  .qual { grid-template-columns: 1fr 1fr; }
  .courses { grid-template-columns: 1fr 1fr; }
  .steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .steps-row > li { padding: 3rem 0 0; }
  .steps-row > li::after { display: none; }
  .foot-grid { grid-template-columns: 1fr 1.2fr; }
  .foot-links { columns: 3; }
  .wizard { padding: 1.6rem; }
}

/* Desktop: the sidebar stops being a drawer and becomes a fixed column */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .topbar, .actionbar, .drawer-close, .backdrop { display: none !important; }
  .shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .sidebar {
    position: sticky; top: 0; height: 100vh; width: auto;
    transform: none; visibility: visible; box-shadow: none !important; transition: none;
    padding: 1.3rem 1rem 1.2rem;
  }
  /* the left column keeps its tint all the way down, even below the sticky sidebar */
  .shell { background: linear-gradient(to right, var(--teal-50) calc(var(--side-w) - 1px), var(--line) 0, var(--line) var(--side-w), #fff 0); }
  .sidebar { gap: .8rem; }
  /* a mouse needs less room than a finger: slightly tighter nav on desktop */
  .side-nav a { min-height: 36px; padding: .35rem .75rem; }
  .nav-sub a { min-height: 32px; padding: .3rem .7rem; }
  .nav-group + .nav-group { margin-top: .7rem; }
  .side-card { padding: .75rem; gap: .45rem; }
  .side-card .btn { min-height: 42px; font-size: .92rem; }
  .sec, .tabpanel, [id^="q-"], .person, .course, .stepper { scroll-margin-top: 24px; }
  .page { padding: 2.4rem 2.6rem 3rem; }
  .site-footer { padding: 2.2rem 2.6rem 1.6rem; }
  .hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 2rem; }
  .is-home .page-head { max-width: 1060px; }
}

/* Wide desktop: "On this page" becomes a sticky right-hand column */
@media (min-width: 1200px) {
  .page {
    display: grid; column-gap: 3rem;
    grid-template-columns: minmax(0, 800px) 220px;
    grid-template-areas: "head toc" "doc toc";
    align-items: start;
  }
  .page-head { grid-area: head; }
  .doc { grid-area: doc; }
  .is-home .page { grid-template-areas: "head head" "doc toc"; grid-template-columns: minmax(0, 800px) 220px; }
  .toc {
    grid-area: toc; position: sticky; top: 1.5rem; margin: 0;
    background: transparent; border: 0; border-radius: 0;
  }
  .is-home .toc { margin-top: 2.6rem; }
  .toc summary { pointer-events: none; min-height: 0; padding: 0 0 .6rem; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
  .toc summary .chev { display: none; }
  .toc ol { padding: 0; }
  .toc li a { min-height: 34px; font-size: .88rem; }
}

/* ---------- Motion + print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  body { padding: 0; font-size: 11pt; }
  .demo-banner, .topbar, .sidebar, .backdrop, .actionbar, .toc, .pager, .site-footer .foot-grid nav, .btn, .btn-row, .cta-actions, .related, .filter-bar, .faq-tools, .tablist, .switch, .skip { display: none !important; }
  .shell { display: block; }
  .page { display: block; padding: 0; }
  .tabs-on .tabpanel:not(.active) { display: block; }
  .tabs-on .panel-h { position: static; width: auto; height: auto; clip: auto; margin-top: 1rem; }
  .cta-box { background: none; color: var(--ink); border: 1px solid #999; }
  .cta-box p, .cta-box .cta-title { color: var(--ink); }
  a { color: var(--ink); }
  .sec { break-inside: avoid-page; }
}
