/* Teeth Care — site styles
   Tokens follow brand/brand-spec.md. Components only use the semantic tokens. */

/* Schibsted Grotesk, SIL Open Font License 1.1 — self-hosted */
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Primitives */
  --porcelain-50: oklch(0.985 0.004 250);
  --porcelain-100: oklch(0.962 0.007 250);
  --porcelain-200: oklch(0.935 0.01 252);
  --porcelain-300: oklch(0.88 0.012 255);
  --porcelain-400: oklch(0.78 0.02 258);
  --slate-500: oklch(0.53 0.022 260);
  --slate-700: oklch(0.42 0.03 262);
  --slate-900: oklch(0.23 0.035 264);
  --slate-950: oklch(0.21 0.035 264);
  --cobalt-100: oklch(0.95 0.03 265);
  --cobalt-300: oklch(0.87 0.075 265);
  --cobalt-600: oklch(0.47 0.2 265);
  --cobalt-700: oklch(0.39 0.18 265);
  --flare-500: oklch(0.6 0.19 35);
  --flare-600: oklch(0.52 0.18 35);
  --flare-300: oklch(0.74 0.15 45);
  --flare-50: oklch(0.95 0.035 40);

  /* Semantic */
  --bg: var(--porcelain-50);
  --bg-raised: var(--porcelain-100);
  --bg-sunken: var(--porcelain-200);
  --line: var(--porcelain-300);
  --line-strong: var(--porcelain-400);
  --text: var(--slate-900);
  --text-2: var(--slate-700);
  --text-3: var(--slate-500);
  --accent: var(--cobalt-600);
  --accent-strong: var(--cobalt-700);
  --accent-wash: var(--cobalt-100);
  --accent-tint: var(--cobalt-300);
  --on-accent: var(--porcelain-50);
  --urgent: var(--flare-500);
  --urgent-text: var(--flare-600);
  --urgent-wash: var(--flare-50);
  --urgent-on-dark: var(--flare-300);
  --inverse-bg: var(--slate-950);
  --inverse-text: var(--porcelain-50);
  --inverse-text-2: oklch(0.78 0.02 260);
  --inverse-line: oklch(0.34 0.03 264);

  /* Type */
  --font: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-display: clamp(2.6rem, 1.5rem + 4.4vw, 5.4rem);
  --fs-h2: clamp(2rem, 1.45rem + 2.3vw, 3.4rem);
  --fs-h3: 1.375rem;
  --fs-lead: 1.1875rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.8125rem;

  /* Space & shape */
  --gutter: 1.25rem;
  --section-y: clamp(4.5rem, 3rem + 7vw, 9rem);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --header-h: 64px;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-swap: cubic-bezier(0.2, 0, 0, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: from-font; text-underline-offset: 0.18em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent-tint); color: var(--text); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 0.75rem 1rem; border-radius: var(--r-md);
}
.skip:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
@media (min-width: 768px) { :root { --gutter: 2rem; } }
@media (min-width: 1200px) { :root { --gutter: 2.5rem; } }

/* ---------- Type ---------- */
.display {
  font-size: var(--fs-display);
  line-height: 0.98;
  font-weight: 600;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.h2 {
  font-size: var(--fs-h2);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.h3 {
  font-size: var(--fs-h3);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.012em;
}
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--text-2); max-width: 34em; text-wrap: pretty; }
.small { font-size: var(--fs-small); line-height: 1.5; }
.muted { color: var(--text-3); }
.label { font-size: var(--fs-label); line-height: 1.3; font-weight: 600; letter-spacing: 0.01em; color: var(--text-3); }
p { text-wrap: pretty; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0 1.25rem;
  border-radius: var(--r-md);
  font-weight: 600; font-size: 1rem; line-height: 1; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, scale 150ms var(--ease-out);
}
.btn:not(:disabled):active { scale: 0.96; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.btn-sm { min-height: 40px; padding: 0 1rem; font-size: 0.9375rem; }
.btn-lg { min-height: 54px; padding: 0 1.5rem; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-quiet { background: var(--bg); color: var(--text); border-color: var(--line-strong); }
.btn-alert { background: var(--urgent-text); color: var(--inverse-text); }
.btn:disabled { opacity: 0.6; cursor: progress; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--accent-strong); }
  .btn-quiet:hover { border-color: var(--text-3); background: var(--bg-raised); }
  .btn-alert:hover { background: var(--urgent); }
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.35em; font-weight: 600; color: var(--accent);
  text-decoration: none; min-height: 44px;
}
.link-arrow::after { content: "→"; transition: translate 150ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .link-arrow:hover { text-decoration: underline; }
  .link-arrow:hover::after { translate: 3px 0; }
}

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md);
  transition: background-color 150ms ease;
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--bg-sunken); } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  padding-top: env(safe-area-inset-top);
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-header[data-scrolled] { border-bottom-color: var(--line); }
.header-row { height: var(--header-h); display: flex; align-items: center; gap: 2rem; }

.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--text); min-height: 44px; }
.brand-mark { width: 30px; height: 30px; color: var(--accent); flex: none; }
.brand-word { font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.02em; white-space: nowrap; }

.nav { display: none; gap: 0.25rem; margin-inline-start: auto; }
.nav a {
  padding: 0.5rem 0.75rem; border-radius: var(--r-sm); text-decoration: none; color: var(--text-2);
  font-size: 0.9375rem; font-weight: 500; transition: color 150ms ease, background-color 150ms ease;
}
.nav a[aria-current="true"] { color: var(--text); }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--text); background: var(--bg-raised); } }

.header-actions { display: flex; align-items: center; gap: 0.75rem; margin-inline-start: auto; }
.header-phone { display: none; font-weight: 600; font-size: 0.9375rem; text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.header-actions .btn { display: none; }

.menu-btn { width: 44px; height: 44px; display: grid; place-items: center; margin-inline-end: -10px; border-radius: var(--r-md); }
.menu-btn-lines, .menu-btn-lines::before {
  display: block; width: 20px; height: 1.75px; background: currentColor; border-radius: 2px; position: relative;
}
.menu-btn-lines { box-shadow: none; translate: 0 -3.5px; }
.menu-btn-lines::before { content: ""; position: absolute; top: 7px; left: 0; }

@media (min-width: 640px) { .header-actions .btn { display: inline-flex; } }
@media (min-width: 1000px) {
  .nav { display: flex; }
  .header-actions { margin-inline-start: 0; }
  .menu-btn { display: none; }
}
@media (min-width: 1180px) { .header-phone { display: inline; } }

/* ---------- Mobile menu ---------- */
.menu { position: fixed; inset: 0; z-index: 60; }
.menu[hidden] { display: none; }
.menu-scrim {
  position: absolute; inset: 0; background: oklch(0.23 0.035 264 / 0.36);
  opacity: 0; transition: opacity 240ms ease;
}
.menu-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  padding: 0.75rem max(var(--gutter), env(safe-area-inset-left)) calc(1.25rem + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-right));
  box-shadow: 0 -1px 0 var(--line), 0 -16px 48px oklch(0.23 0.035 264 / 0.14);
  translate: 0 100%;
  transition: translate 420ms var(--ease-drawer, cubic-bezier(0.32, 0.72, 0, 1));
}
.menu[data-open] .menu-scrim { opacity: 1; }
.menu[data-open] .menu-sheet { translate: 0 0; }
.menu-head { display: flex; align-items: center; justify-content: space-between; padding-block: 0.25rem 0.5rem; }
.menu-title { font-weight: 600; color: var(--text-3); font-size: var(--fs-small); }
.menu-nav { display: grid; }
.menu-nav a {
  font-size: 1.625rem; font-weight: 600; letter-spacing: -0.02em; text-decoration: none;
  padding: 0.7rem 0; border-bottom: 1px solid var(--line);
}
.menu-foot { display: grid; gap: 0.625rem; margin-top: 1.25rem; }
@media (prefers-reduced-motion: reduce) {
  .menu-sheet { transition: opacity 200ms ease; translate: 0 0; opacity: 0; }
  .menu[data-open] .menu-sheet { opacity: 1; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(1.5rem, 1rem + 3vw, 3.5rem) clamp(2.5rem, 2rem + 2vw, 4rem); }
.hero-grid {
  display: grid; gap: 1.75rem;
  grid-template-areas: "copy" "chips" "chart" "panel";
}
.hero-copy { grid-area: copy; display: grid; gap: 1.25rem; align-content: start; }
.chart { grid-area: chart; }
.finder { display: contents; }
.finder-top { grid-area: chips; display: grid; gap: 0.875rem; align-content: start; }
.finder-bottom { grid-area: panel; display: grid; gap: 0.75rem; align-content: start; }

.status-line {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: var(--fs-small); color: var(--text-2); font-variant-numeric: tabular-nums;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.status-line[data-state="open"] .status-dot { background: oklch(0.62 0.15 150); box-shadow: 0 0 0 4px oklch(0.62 0.15 150 / 0.16); }

@media (min-width: 1000px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    grid-template-areas: "copy chart" "finder chart";
    grid-template-rows: auto 1fr;
    column-gap: clamp(2.5rem, 5vw, 5rem);
    row-gap: 2.5rem;
  }
  .hero-copy { padding-top: 2rem; }
  .finder { display: grid; gap: 1.25rem; grid-area: finder; align-content: start; }
  .finder-top, .finder-bottom { grid-area: auto; }
}

/* ---------- Tooth chart ---------- */
.chart { display: grid; gap: 0.75rem; justify-items: center; align-content: start; min-width: 0; }
.chart-stage {
  position: relative; width: 100%; max-width: 540px; align-self: start;
  aspect-ratio: 88 / 114;
}
.chart-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; touch-action: manipulation; }
.chart-caption { max-width: 30rem; text-align: center; font-size: var(--fs-label); line-height: 1.45; color: var(--text-3); text-wrap: balance; }

.tooth { cursor: pointer; outline: none; }
.tooth .t-body {
  fill: var(--bg);
  stroke: var(--text);
  stroke-width: 1.15;
  vector-effect: non-scaling-stroke;
  transition: fill 150ms ease, stroke 150ms ease;
}
.tooth .t-detail {
  fill: none; stroke: var(--text-3); stroke-width: 0.9; vector-effect: non-scaling-stroke;
  stroke-linecap: round; stroke-linejoin: round;
  transition: stroke 150ms ease;
}
.tooth .t-num {
  font-size: 2.5px; font-weight: 600; fill: var(--text-3); text-anchor: middle; dominant-baseline: central;
  font-variant-numeric: tabular-nums; transition: fill 150ms ease; pointer-events: none;
}
.tooth:focus-visible .t-body { stroke: var(--accent); stroke-width: 2.75; }

@media (hover: hover) and (pointer: fine) {
  .tooth:hover .t-body { fill: var(--accent-wash); stroke: var(--accent-strong); }
  .tooth:hover .t-num { fill: var(--text); }
}
.chart-svg[data-mode="concern"] .tooth:not(.is-hl) .t-body { fill: var(--bg); stroke: var(--line-strong); }
.chart-svg[data-mode="concern"] .tooth:not(.is-hl) .t-detail { stroke: var(--line); }
.tooth.is-hl .t-body { fill: var(--accent-tint); stroke: var(--accent-strong); }
.tooth.is-hl .t-num { fill: var(--accent-strong); }
.tooth.is-sel .t-body { fill: var(--accent); stroke: var(--accent-strong); }
.tooth.is-sel .t-detail { stroke: oklch(0.985 0.004 250 / 0.75); }
.tooth.is-sel .t-num { fill: var(--accent-strong); font-weight: 700; }

.arch-label { font-size: 2.4px; font-weight: 600; fill: var(--text-3); text-anchor: middle; dominant-baseline: central; letter-spacing: 0.02em; }
.side-label { font-size: 2.8px; font-weight: 700; fill: var(--text-2); }

/* draw-in, once */
.js .chart-svg[data-drawing] .t-body,
.js .chart-svg[data-drawing] .t-detail { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.js .chart-svg[data-drawing] .t-body { fill-opacity: 0; }
.chart-svg[data-drawn] .t-body,
.chart-svg[data-drawn] .t-detail {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 900ms var(--ease-out), fill-opacity 500ms ease, fill 150ms ease, stroke 150ms ease;
  transition-delay: var(--d, 0ms), calc(var(--d, 0ms) + 400ms), 0ms, 0ms;
  fill-opacity: 1;
}

.chart-readout {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 46%; display: grid; justify-items: center; text-align: center; gap: 0.25rem;
  pointer-events: none;
}
.readout-num {
  font-size: clamp(3rem, 1.6rem + 6vw, 6.5rem); font-weight: 600; line-height: 0.9; letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums; color: var(--text);
}
.readout-name { font-weight: 600; font-size: clamp(0.875rem, 0.8rem + 0.4vw, 1.0625rem); line-height: 1.25; text-wrap: balance; }
.readout-meta { font-size: var(--fs-label); color: var(--text-3); line-height: 1.35; text-wrap: balance; }
.chart-readout[data-swap] > * { animation: readout-in 260ms var(--ease-out) both; }
.chart-readout[data-swap] > :nth-child(2) { animation-delay: 30ms; }
.chart-readout[data-swap] > :nth-child(3) { animation-delay: 60ms; }
@keyframes readout-in { from { opacity: 0; translate: 0 6px; filter: blur(3px); } }


/* ---------- Concern finder + panel ---------- */
.finder-label { font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
@media (max-width: 999px) {
  .chips {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 2.5rem), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 2.5rem), transparent);
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
}
.chip {
  min-height: 40px; padding: 0 0.95rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--bg);
  font-size: 0.9375rem; font-weight: 500; color: var(--text);
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, scale 150ms var(--ease-out);
}
.chip:active { scale: 0.96; }
.chip[aria-pressed="true"] { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-strong); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .chip:hover { border-color: var(--text-3); } }
@media (pointer: coarse) { .chip { min-height: 44px; } }

.panel {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-raised);
  min-height: 9rem;
}
.panel-inner { padding: 1.25rem 1.25rem 1.375rem; display: grid; gap: 0.875rem; }
.panel-inner[data-swap] { animation: panel-in 260ms var(--ease-out) both; }
@keyframes panel-in { from { opacity: 0; filter: blur(4px); translate: 0 8px; } }
.panel-empty { color: var(--text-2); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.panel-kicker { font-size: var(--fs-label); font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.panel-title { font-size: 1.375rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; }
.panel p { color: var(--text-2); }
.panel-facts { display: flex; flex-wrap: wrap; gap: 0.375rem 1.25rem; font-size: var(--fs-small); color: var(--text-2); }
.panel-facts b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.panel-sub { font-size: var(--fs-label); font-weight: 600; color: var(--text-3); margin-bottom: 0.375rem; }
.tx-links { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.tx-links a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 0.75rem; border-radius: var(--r-sm);
  background: var(--bg); border: 1px solid var(--line); text-decoration: none; font-size: var(--fs-small); font-weight: 500;
  transition: border-color 150ms ease, color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .tx-links a:hover { border-color: var(--accent); color: var(--accent-strong); } }
@media (pointer: coarse) { .tx-links a { min-height: 44px; } }
.soon { display: flex; gap: 0.625rem; align-items: baseline; font-size: var(--fs-small); color: var(--text); }
.soon::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; translate: 0 -1px; }
.soon[data-urgent]::before { background: var(--urgent); }
.panel-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.stepper { display: inline-flex; gap: 0.25rem; }
.stepper button {
  min-height: 40px; min-width: 44px; padding: 0 0.625rem; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--bg); font-size: var(--fs-small); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-2);
}
.stepper button:active { scale: 0.96; }
@media (hover: hover) and (pointer: fine) { .stepper button:hover { border-color: var(--text-3); color: var(--text); } }
.disclaimer { font-size: var(--fs-label); color: var(--text-3); }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section-head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 1.5rem + 2.5vw, 3.5rem); max-width: 46rem; }
.section-intro { color: var(--text-2); font-size: var(--fs-lead); line-height: 1.55; }

/* ---------- Treatments ---------- */
.treatments { border-top: 1px solid var(--line); }
.tx-layout { display: grid; gap: 1.5rem; }
.tx-nav {
  display: flex; gap: 0.375rem; overflow-x: auto; scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 2.5rem), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 2.5rem), transparent);
}
.tx-nav::-webkit-scrollbar { display: none; }
.tx-nav a {
  flex: none; min-height: 40px; display: inline-flex; align-items: center; padding: 0 0.875rem;
  border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: var(--fs-small); font-weight: 500; color: var(--text-2);
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}
.tx-nav a[aria-current="true"] { color: var(--text); border-color: var(--text); }

@media (min-width: 900px) {
  .tx-layout { grid-template-columns: 220px minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
  .tx-nav {
    position: sticky; top: calc(var(--header-h) + 2rem);
    flex-direction: column; overflow: visible; margin: 0; padding: 0; gap: 0; mask-image: none; -webkit-mask-image: none;
    border-inline-start: 1px solid var(--line);
  }
  .tx-nav a {
    border: 0; border-radius: 0; padding: 0.5rem 0 0.5rem 1rem; min-height: 0; margin-inline-start: -1px;
    border-inline-start: 2px solid transparent;
  }
  .tx-nav a[aria-current="true"] { border-inline-start-color: var(--accent); color: var(--text); }
  @media (hover: hover) and (pointer: fine) { .tx-nav a:hover { color: var(--text); } }
}

.tx-group + .tx-group { margin-top: clamp(2.5rem, 2rem + 2vw, 4rem); }
.tx-group { scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.tx-group-title { font-size: var(--fs-label); font-weight: 600; color: var(--text-3); letter-spacing: 0.01em; margin-bottom: 0.75rem; }
.tx-rows { border-top: 1px solid var(--line); }
.tx { border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.tx-head {
  width: 100%; text-align: start; display: grid; gap: 0.25rem 1.5rem;
  grid-template-columns: minmax(0, 1fr) 24px;
  grid-template-areas: "name icon" "sum icon";
  align-items: center; padding: 1.125rem 0;
}
.tx-name { grid-area: name; font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.tx-sum { grid-area: sum; color: var(--text-2); font-size: var(--fs-small); line-height: 1.5; }
.tx-icon { grid-area: icon; position: relative; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); transition: background-color 150ms ease, border-color 150ms ease; }
.tx-icon::before, .tx-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; background: currentColor;
  translate: -50% -50%; border-radius: 1px; transition: rotate 250ms var(--ease-out), opacity 200ms ease;
}
.tx-icon::after { rotate: 90deg; }
.tx[data-open] .tx-icon { background: var(--text); border-color: var(--text); color: var(--bg); }
.tx[data-open] .tx-icon::after { rotate: 0deg; opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .tx-head:hover .tx-name { color: var(--accent-strong); }
  .tx-head:hover .tx-icon { border-color: var(--text-3); }
}
@media (min-width: 700px) {
  .tx-head { grid-template-columns: minmax(12rem, 0.8fr) minmax(0, 1.5fr) 24px; grid-template-areas: "name sum icon"; }
}

.tx-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 320ms var(--ease-out); }
.tx-body-inner { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s linear 320ms; }
.tx[data-open] .tx-body { grid-template-rows: 1fr; }
.tx[data-open] .tx-body-inner { visibility: visible; transition: visibility 0s; }
.tx-body-inner > * { max-width: 40rem; }
.tx-body-inner > p { color: var(--text-2); padding-bottom: 1rem; }
@media (min-width: 700px) {
  .tx-body-inner { display: grid; grid-template-columns: minmax(12rem, 0.8fr) minmax(0, 1.5fr) 24px; column-gap: 1.5rem; }
  .tx-body-inner > * { grid-column: 2; }
}
.tx-facts { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; padding-bottom: 1.5rem; }
.tx-facts dt { font-size: var(--fs-label); color: var(--text-3); font-weight: 500; }
.tx-facts dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.tx[data-flash] { animation: flash 1400ms ease-out; }
@keyframes flash { 0%, 30% { background: var(--accent-wash); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) {
  .tx-body, .tx-body-inner { transition: none; }
}

/* ---------- First visit ---------- */
.first-visit { background: var(--bg-raised); border-block: 1px solid var(--line); }
.fv { display: grid; gap: 2rem; align-items: center; }
.fv-clock { position: relative; width: min(280px, 72vw); aspect-ratio: 1; margin-inline: auto; }
.fv-dial { width: 100%; height: 100%; rotate: -90deg; overflow: visible; }
.fv-track { fill: none; stroke: var(--line); stroke-width: 10; }
.fv-progress {
  fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 60 60; stroke-dashoffset: 60;
  transition: stroke-dashoffset 420ms var(--ease-out);
}
.fv-tick { stroke: var(--line-strong); stroke-width: 1.5; stroke-linecap: round; transition: stroke 200ms ease; }
.fv-tick.is-step { stroke: var(--text-3); stroke-width: 2.5; }
.fv-tick.is-past { stroke: var(--accent-strong); }
.fv-clock-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.fv-min { font-size: clamp(3.5rem, 2.5rem + 3vw, 4.75rem); font-weight: 600; line-height: 0.9; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.fv-min-unit { color: var(--text-3); font-weight: 600; font-size: var(--fs-small); }

.fv-detail { display: grid; gap: 1.5rem; min-width: 0; }
.fv-steps {
  display: flex; gap: 0.375rem; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
  margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
}
.fv-steps::-webkit-scrollbar { display: none; }
.fv-steps li { flex: none; scroll-snap-align: start; }
.fv-steps button {
  display: grid; gap: 0.125rem; text-align: start; min-height: 56px; padding: 0.5rem 0.875rem;
  border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg);
  font-weight: 600; font-size: var(--fs-small); line-height: 1.25;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, scale 150ms var(--ease-out);
}
.fv-steps button:active { scale: 0.96; }
.fv-at { font-size: var(--fs-label); color: var(--text-3); font-variant-numeric: tabular-nums; font-weight: 500; }
.fv-steps button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-wash); color: var(--accent-strong); }
.fv-steps button[aria-pressed="true"] .fv-at { color: var(--accent-strong); }
@media (hover: hover) and (pointer: fine) { .fv-steps button:hover { border-color: var(--text-3); } }

.fv-text { display: grid; gap: 0.5rem; min-height: 8.5rem; align-content: start; }
.fv-text p { color: var(--text-2); max-width: 36rem; }
.fv-text[data-swap] > * { animation: panel-in 240ms var(--ease-out) both; }

.fv-range-label { font-size: var(--fs-label); color: var(--text-3); font-weight: 600; margin-bottom: -1rem; }
.fv-range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer; margin: 0; touch-action: pan-y; }
.fv-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--accent) var(--p, 0%), var(--line-strong) var(--p, 0%)); }
.fv-range::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line-strong); }
.fv-range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
.fv-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; margin-top: -11px;
  background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 1px 3px oklch(0.23 0.035 264 / 0.2);
  transition: scale 150ms var(--ease-out);
}
.fv-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.fv-range:active::-webkit-slider-thumb { scale: 1.12; }
.fv-range:focus-visible { outline: none; }
.fv-range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 3px; }
.fv-range:focus-visible::-moz-range-thumb { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (min-width: 900px) {
  .fv { grid-template-columns: 300px minmax(0, 1fr); gap: clamp(3rem, 6vw, 6rem); }
  .fv-clock { width: 300px; }
  .fv-steps { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
}

.promises { margin-top: clamp(3.5rem, 3rem + 3vw, 6rem); border-top: 1px solid var(--line-strong); }
.promises li { display: grid; gap: 0.5rem; padding-block: 1.5rem; border-bottom: 1px solid var(--line); }
.promises p { color: var(--text-2); max-width: 36rem; }
@media (min-width: 800px) {
  .promises li { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2rem; align-items: baseline; }
}

/* ---------- Emergency (inverse band) ---------- */
.emergency { background: var(--inverse-bg); color: var(--inverse-text); }
.emergency :focus-visible { outline-color: var(--urgent-on-dark); }
.em-grid { display: grid; gap: 3rem; }
.em-intro { display: grid; gap: 1.25rem; align-content: start; }
.em-intro > p { color: var(--inverse-text-2); max-width: 32rem; }
.em-kicker { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: var(--fs-small); color: var(--urgent-on-dark) !important; }
.em-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--urgent-on-dark); box-shadow: 0 0 0 4px oklch(0.74 0.15 45 / 0.2); }
.em-intro .btn { justify-self: start; }
.em-911 { font-size: var(--fs-small); padding-top: 1rem; border-top: 1px solid var(--inverse-line); }

.em-guide { min-width: 0; }
.em-tabs {
  display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
  border-bottom: 1px solid var(--inverse-line);
}
.em-tabs::-webkit-scrollbar { display: none; }
.em-tabs [role="tab"] {
  flex: none; min-height: 48px; padding: 0 0.875rem; font-weight: 600; font-size: var(--fs-small);
  color: var(--inverse-text-2); border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 150ms ease, border-color 150ms ease;
}
.em-tabs [role="tab"][aria-selected="true"] { color: var(--inverse-text); border-bottom-color: var(--urgent-on-dark); }
@media (hover: hover) and (pointer: fine) { .em-tabs [role="tab"]:hover { color: var(--inverse-text); } }
.em-panel { padding-top: 1.75rem; display: grid; gap: 1.25rem; }
.em-panel:focus-visible { outline-offset: 6px; }
.em-window { color: var(--inverse-text-2); }
.em-window strong { color: var(--urgent-on-dark); font-weight: 600; }
.em-steps { counter-reset: step; display: grid; }
.em-steps li {
  counter-increment: step; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.75rem;
  padding-block: 0.875rem; border-bottom: 1px solid var(--inverse-line); font-size: 1.0625rem;
}
.em-steps li::before {
  content: counter(step); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--inverse-line); font-size: var(--fs-label); font-weight: 600; color: var(--inverse-text-2);
  font-variant-numeric: tabular-nums;
}
.em-note { font-size: var(--fs-small); color: var(--inverse-text-2); }
@media (min-width: 1000px) {
  .em-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(3rem, 7vw, 7rem); }
  .em-tabs { margin: 0; padding: 0; }
}

/* ---------- Visit ---------- */
.visit-grid { display: grid; gap: 2.5rem; }
.visit-block { display: grid; gap: 0.875rem; align-content: start; }
.visit-block > p:not(.small) { color: var(--text-2); }
.hours { border-collapse: collapse; width: 100%; max-width: 22rem; }
.hours th, .hours td { padding: 0.5rem 0; border-bottom: 1px solid var(--line); text-align: start; font-weight: 400; font-size: 1rem; }
.hours td { text-align: end; color: var(--text-2); }
.hours tr[data-today] th, .hours tr[data-today] td { font-weight: 600; color: var(--text); }
.hours tr[data-today] th::after { content: "Today"; margin-inline-start: 0.5rem; font-size: 0.6875rem; font-weight: 600; color: var(--accent-strong); background: var(--accent-wash); padding: 0.15rem 0.45rem; border-radius: 999px; vertical-align: 2px; }
.address { font-style: normal; font-size: 1.25rem; line-height: 1.4; font-weight: 500; letter-spacing: -0.01em; }
@media (min-width: 900px) { .visit-grid { grid-template-columns: 1fr 1fr 1fr; gap: clamp(2rem, 4vw, 4rem); } }

/* ---------- Booking ---------- */
.book { background: var(--bg-raised); border-top: 1px solid var(--line); }
.book-grid { display: grid; gap: 2.5rem; }
.book-intro { display: grid; gap: 1rem; align-content: start; }
.book-intro > p:first-of-type { color: var(--text-2); font-size: var(--fs-lead); }
@media (min-width: 1000px) {
  .book-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(3rem, 7vw, 7rem); }
  .book-intro { position: sticky; top: calc(var(--header-h) + 2rem); }
}

.form { display: grid; gap: 1.375rem; }
.field { display: grid; gap: 0.5rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 600; font-size: var(--fs-small); padding: 0; }
.optional { font-weight: 400; color: var(--text-3); }
.field-row { display: grid; gap: 1.375rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%; min-height: 50px; padding: 0.75rem 0.875rem;
  font-size: 1rem; /* 16px stops iOS zoom */
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  transition: border-color 150ms ease, box-shadow 150ms ease;
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
::placeholder { color: var(--text-3); opacity: 1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px oklch(0.47 0.2 265 / 0.2); }
.field[data-invalid] input { border-color: var(--urgent-text); }
.field[data-invalid] input:focus { box-shadow: 0 0 0 3px oklch(0.52 0.18 35 / 0.2); }
.field-error { font-size: var(--fs-small); color: var(--urgent-text); font-weight: 500; }
.field-hint { font-size: var(--fs-label); color: var(--text-3); }
.select { position: relative; }
.select::after {
  content: ""; position: absolute; right: 1rem; top: 50%; width: 8px; height: 8px; pointer-events: none;
  border-right: 1.75px solid var(--text-2); border-bottom: 1.75px solid var(--text-2); translate: 0 -70%; rotate: 45deg;
}
.select select { padding-right: 2.5rem; }

.seg, .days { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.seg label, .days label { position: relative; }
.seg input, .days input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span, .days span {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1rem; min-width: 3.5rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--bg); font-size: var(--fs-small); font-weight: 500;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.seg input:checked + span, .days input:checked + span { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-strong); font-weight: 600; }
.seg input:focus-visible + span, .days input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .seg label:hover span, .days label:hover span { border-color: var(--text-3); } }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding-top: 0.5rem; }
.form-status { font-size: var(--fs-small); color: var(--text-2); }
.form-status[data-tone="error"] { color: var(--urgent-text); font-weight: 500; }
[data-submit][data-loading] .btn-label::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-inline-end: 0.5rem; vertical-align: -2px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 600ms linear infinite;
}
@keyframes spin { to { rotate: 360deg; } }

.form-done { display: grid; gap: 0.75rem; padding: 1.75rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); align-content: start; }
.form-done .check { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.form-done .check svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.form-done p { color: var(--text-2); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq-grid { display: grid; gap: 2rem; }
@media (min-width: 1000px) { .faq-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(3rem, 7vw, 7rem); } }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1.5rem; align-items: center;
  padding: 1.125rem 0; font-weight: 600; font-size: 1.125rem; line-height: 1.35; letter-spacing: -0.01em;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 9px; height: 9px; border-right: 1.75px solid var(--text-2); border-bottom: 1.75px solid var(--text-2);
  rotate: 45deg; translate: 0 -3px; transition: rotate 200ms var(--ease-out), translate 200ms var(--ease-out);
}
.faq-list details[open] summary::after { rotate: 225deg; translate: 0 2px; }
.faq-list details p { color: var(--text-2); padding-bottom: 1.25rem; max-width: 38rem; }
@media (hover: hover) and (pointer: fine) { .faq-list summary:hover { color: var(--accent-strong); } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 3rem calc(2.5rem + env(safe-area-inset-bottom)); }
.footer-grid { display: grid; gap: 1.75rem; }
.footer-brand { display: grid; gap: 0.5rem; }
.footer-col { display: grid; gap: 0.375rem; align-content: start; }
.footer-col a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .footer-col a:hover { text-decoration: underline; } }
.footer-legal { padding-top: 1.5rem; border-top: 1px solid var(--line); }
@media (min-width: 800px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-legal { grid-column: 1 / -1; }
}

/* ---------- Mobile action bar ---------- */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 0.5rem;
  padding: 0.625rem max(var(--gutter), env(safe-area-inset-left)) calc(0.625rem + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-right));
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line);
  transition: translate 300ms var(--ease-out);
}
.action-bar[data-hidden] { translate: 0 110%; }
@media (max-width: 767px) { body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); } }
@media (min-width: 768px) { .action-bar { display: none; } }

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] { opacity: 0; translate: 0 12px; transition: opacity 600ms var(--ease-out), translate 600ms var(--ease-out); transition-delay: var(--rd, 0ms); }
.js [data-reveal][data-in] { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { translate: 0 0; transition: opacity 300ms ease; }
  .js .chart-svg[data-drawing] .t-body, .js .chart-svg[data-drawing] .t-detail { stroke-dashoffset: 0; }
  .js .chart-svg[data-drawing] .t-body { fill-opacity: 1; }
  .chart-readout[data-swap] > *, .panel-inner[data-swap], .fv-text[data-swap] > * { animation: fade 200ms ease both; }
  .fv-progress, .action-bar { transition: none; }
  .tx[data-flash] { animation: none; background: var(--accent-wash); }
}
@keyframes fade { from { opacity: 0; } }

/* ---------- Simple pages ---------- */
.page { padding-block: clamp(3rem, 2rem + 5vw, 6rem); }
.page .prose { max-width: 40rem; display: grid; gap: 1rem; }
.page .prose h2 { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.012em; margin-top: 1.5rem; }
.page .prose p, .page .prose li { color: var(--text-2); }
.page .prose ul { list-style: disc; padding-inline-start: 1.25rem; display: grid; gap: 0.375rem; }

@media print {
  .site-header, .action-bar, .menu, .finder, .chart { display: none !important; }
  .emergency { background: none; color: #000; }
}

/* ======================================================================
   Booking section additions
   ====================================================================== */
.book-start { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 0.5rem; }
.book-points { display: grid; gap: 0.5rem; margin-top: 0.75rem; }
.book-points li { display: flex; gap: 0.625rem; align-items: baseline; color: var(--text-2); font-size: var(--fs-small); }
.book-points li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; translate: 0 -2px; }
.form-intro { display: grid; gap: 0.25rem; padding-bottom: 0.25rem; }

/* ======================================================================
   Booking assistant
   ====================================================================== */
.bk-lock, .bk-lock body { overflow: hidden; }
.bk { position: fixed; inset: 0; z-index: 70; }
.bk-scrim { position: absolute; inset: 0; background: oklch(0.23 0.035 264 / 0.32); opacity: 0; transition: opacity 240ms ease; }
.bk[data-open] .bk-scrim { opacity: 1; }

.bk-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--vvh, 100dvh); max-height: var(--vvh, 100dvh);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto;
  background: var(--bg);
  translate: 0 100%;
  transition: translate 420ms cubic-bezier(0.32, 0.72, 0, 1);
}
.bk[data-open] .bk-panel { translate: 0 0; }
@media (min-width: 640px) {
  .bk-panel {
    left: auto; right: 24px; bottom: 24px; top: auto;
    width: 420px; height: min(720px, calc(var(--vvh, 100dvh) - 48px));
    border-radius: 20px; overflow: hidden;
    box-shadow: 0 0 0 1px var(--line), 0 24px 64px oklch(0.23 0.035 264 / 0.22);
    translate: 0 0; scale: 0.96; opacity: 0; transform-origin: bottom right;
    transition: scale 260ms var(--ease-out), opacity 200ms ease;
  }
  .bk[data-open] .bk-panel { scale: 1; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .bk-panel { translate: 0 0; scale: 1; opacity: 0; transition: opacity 200ms ease; }
  .bk[data-open] .bk-panel { opacity: 1; }
}

.bk-head {
  display: flex; align-items: center; gap: 0.75rem;
  padding: calc(0.75rem + env(safe-area-inset-top)) 0.75rem 0.75rem 1rem;
  border-bottom: 1px solid var(--line); background: var(--bg);
}
@media (min-width: 640px) { .bk-head { padding-top: 0.75rem; } }
.bk-avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; flex: none; }
.bk-avatar svg { width: 26px; height: 26px; }
.bk-head-text { flex: 1; min-width: 0; }
.bk-title { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.bk-sub { font-size: var(--fs-label); color: var(--text-3); display: flex; align-items: center; gap: 0.4rem; line-height: 1.3; }
.bk-dot { width: 7px; height: 7px; border-radius: 50%; background: oklch(0.62 0.15 150); flex: none; }

.bk-log {
  overflow-y: auto; overscroll-behavior: contain;
  padding: 1.25rem 1rem 0.75rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  scroll-behavior: smooth;
}
.bk-log:focus { outline: none; }
.bk-msg {
  flex-shrink: 0; max-width: 86%; padding: 0.625rem 0.875rem; border-radius: 18px;
  font-size: 1rem; line-height: 1.45; overflow-wrap: break-word;
  animation: bk-in 260ms var(--ease-out) both;
}
.bk-msg a { color: inherit; font-weight: 600; }
.bk-bot { align-self: flex-start; background: var(--bg-raised); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bk-bot + .bk-bot { margin-top: -0.25rem; }
.bk-user { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; margin-block: 0.25rem; }
.bk-alert { background: var(--urgent-wash); border-color: oklch(0.85 0.07 40); color: var(--text); }
.bk-alert b, .bk-alert a { color: var(--urgent-text); }
@keyframes bk-in { from { opacity: 0; translate: 0 6px; } }
@media (prefers-reduced-motion: reduce) { .bk-msg { animation: fade 150ms ease both; } .bk-log { scroll-behavior: auto; } }

.bk-typing { display: inline-flex; gap: 4px; align-items: center; padding: 0.8rem 0.95rem; }
.bk-typing span:not(.sr-only) { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: bk-dot 1.1s ease-in-out infinite; }
.bk-typing span:nth-child(2) { animation-delay: 0.15s; }
.bk-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bk-dot { 0%, 60%, 100% { opacity: 0.3; translate: 0 0; } 30% { opacity: 1; translate: 0 -3px; } }
@media (prefers-reduced-motion: reduce) { .bk-typing span:not(.sr-only) { animation: none; opacity: 0.6; } }

.bk-card-msg { padding: 0; background: var(--bg); width: 86%; overflow: hidden; }
.bk-card { display: grid; }
.bk-card div { display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); gap: 0.75rem; padding: 0.625rem 0.875rem; border-bottom: 1px solid var(--line); }
.bk-card div:last-child { border-bottom: 0; }
.bk-card dt { font-size: var(--fs-label); color: var(--text-3); font-weight: 600; padding-top: 0.15rem; }
.bk-card dd { font-size: 0.9375rem; font-weight: 500; }
.bk-done { padding: 1rem 1rem 0.875rem; display: grid; gap: 0.375rem; border-top: 4px solid var(--accent); }
.bk-done-when { font-size: 1.0625rem; line-height: 1.3; }
.bk-done-when b { font-size: 1.75rem; letter-spacing: -0.02em; font-weight: 600; }
.bk-done-meta { font-size: var(--fs-small); color: var(--text-2); }
.bk-ref { margin-top: 0.375rem; font-size: var(--fs-small); color: var(--text-2); }
.bk-ref b { font-variant-numeric: tabular-nums; color: var(--text); letter-spacing: 0.02em; }

.bk-quick {
  display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-end;
  padding: 0.5rem 1rem 0.75rem; max-height: 40vh; overflow-y: auto;
}
.bk-chip {
  min-height: 40px; padding: 0 0.95rem; display: inline-flex; align-items: center;
  border-radius: 999px; border: 1px solid var(--accent); background: var(--bg); color: var(--accent-strong);
  font-size: 0.9375rem; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease, scale 150ms var(--ease-out);
  animation: bk-in 220ms var(--ease-out) both;
}
.bk-chip:active { scale: 0.96; }
.bk-chip.is-primary { background: var(--accent); color: var(--on-accent); }
@media (hover: hover) and (pointer: fine) {
  .bk-chip:hover { background: var(--accent-wash); }
  .bk-chip.is-primary:hover { background: var(--accent-strong); }
}
@media (pointer: coarse) { .bk-chip { min-height: 44px; } }

.bk-input {
  display: flex; gap: 0.5rem; align-items: center;
  padding: 0.625rem 0.75rem calc(0.625rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--bg);
}
@media (min-width: 640px) { .bk-input { padding-bottom: 0.625rem; } }
.bk-input input { flex: 1; min-height: 46px; border-radius: 999px; padding: 0 1rem; background: var(--bg-raised); }
.bk-input.is-off input { background: var(--bg-sunken); }
.bk-send {
  width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; flex: none; transition: opacity 150ms ease, scale 150ms var(--ease-out);
}
.bk-send:not(:disabled):active { scale: 0.94; }
.bk-send:disabled { opacity: 0.35; cursor: default; }
.bk-send svg, .bk-head .icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ======================================================================
   Dentist
   ====================================================================== */
.dentist { border-top: 1px solid var(--line); }
.dentist-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .dentist-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(3rem, 7vw, 7rem); } }

.portrait { display: grid; gap: 0.75rem; max-width: min(420px, 72vw); width: 100%; justify-self: center; }
.portrait-frame {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden;
  background:
    radial-gradient(120% 80% at 30% 15%, var(--accent-wash), transparent 60%),
    repeating-linear-gradient(135deg, transparent 0 11px, oklch(0.88 0.012 255 / 0.55) 11px 12px),
    var(--bg-raised);
  border: 1px solid var(--line);
  display: grid; place-items: center;
}
.portrait-initials { font-size: clamp(5rem, 3rem + 8vw, 8.5rem); font-weight: 600; letter-spacing: -0.06em; color: var(--accent); line-height: 1; }
.portrait-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; outline: 1px solid oklch(0 0 0 / 0.1); outline-offset: -1px; }
.crop { position: absolute; width: 18px; height: 18px; border-color: var(--text-3); border-style: solid; border-width: 0; z-index: 1; }
.crop-tl { top: 12px; left: 12px; border-top-width: 1.5px; border-left-width: 1.5px; }
.crop-tr { top: 12px; right: 12px; border-top-width: 1.5px; border-right-width: 1.5px; }
.crop-bl { bottom: 12px; left: 12px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.crop-br { bottom: 12px; right: 12px; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.portrait-cap { font-size: var(--fs-label); color: var(--text-3); text-align: center; }

.dentist-copy { display: grid; gap: 1.125rem; align-content: start; }
.dentist-copy > p:not(.label):not(.lead) { color: var(--text-2); max-width: 36rem; }
.dentist-facts { display: flex; flex-wrap: wrap; gap: 0; border-block: 1px solid var(--line); margin-top: 0.5rem; }
.dentist-facts div { flex: 1 1 9rem; padding: 0.875rem 1rem 0.875rem 0; }
.dentist-facts div + div { padding-inline-start: 1rem; border-inline-start: 1px solid var(--line); }
.dentist-facts dt { font-size: var(--fs-label); color: var(--text-3); font-weight: 600; }
.dentist-facts dd { font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; }
@media (max-width: 520px) {
  .dentist-facts div { flex-basis: 100%; padding-inline-start: 0 !important; border-inline-start: 0 !important; }
  .dentist-facts div + div { border-top: 1px solid var(--line); }
}
.dentist-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-top: 0.5rem; }

.scope { margin-top: clamp(3.5rem, 3rem + 3vw, 6rem); }
.scope-title { margin-bottom: 1.25rem; }
.scope-list { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line-strong); }
@media (min-width: 600px) { .scope-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .scope-list { grid-template-columns: repeat(3, 1fr); } }
.scope-list li { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem 1rem 1.25rem 0; border-bottom: 1px solid var(--line); }
.scope-list svg { width: 40px; height: 40px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.scope-list span { display: grid; gap: 0.125rem; font-size: var(--fs-small); color: var(--text-2); line-height: 1.45; }
.scope-list b { color: var(--text); font-weight: 600; font-size: 1.0625rem; }

/* ======================================================================
   Tooth cross-section
   ====================================================================== */
.xsec { display: grid; gap: 2rem; align-items: center; margin-bottom: clamp(3rem, 2.5rem + 3vw, 5rem); padding: clamp(1.25rem, 1rem + 2vw, 2.5rem); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-raised); }
@media (min-width: 900px) { .xsec { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); } }
.xsec-figure { max-width: 440px; width: 100%; justify-self: center; }
.xsec-svg { width: 100%; height: auto; overflow: visible; }
.xl .xl-fill { stroke: var(--text); stroke-width: 1.4; vector-effect: non-scaling-stroke; transition: fill 220ms ease, stroke 220ms ease; }
.xl-bone .xl-fill { fill: var(--bg-raised); stroke: var(--line-strong); }
.hatch-line { stroke: var(--line-strong); stroke-width: 1; }
.xl-gum .xl-fill { fill: var(--bg-sunken); stroke: var(--text-3); }
.stipple-dot { fill: var(--text-3); opacity: 0.45; }
.xl-dentin .xl-fill { fill: var(--porcelain-200); }
.xl-enamel .xl-fill { fill: #fff; }
.xl-pulp .xl-fill { fill: var(--porcelain-400); stroke: var(--text-2); }
.xl.is-on .xl-fill { fill: var(--accent-tint); stroke: var(--accent-strong); }
.xl-pulp.is-on .xl-fill { fill: var(--accent); }
.xl-bone.is-on .xl-fill, .xl-gum.is-on .xl-fill { fill: var(--accent-wash); stroke: var(--accent); }

.xo { opacity: 0; transition: opacity 220ms ease; pointer-events: none; }
.xo.is-on { opacity: 1; }
.xo-sealant path { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; }
.xo-filling path { fill: var(--accent); stroke: var(--accent-strong); stroke-width: 1.5; }
.xo-crown path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 7 5; stroke-linecap: round; }
.xo-tartar circle { fill: var(--text-2); }

.xsec-leaders path { fill: none; stroke: var(--text-3); stroke-width: 1; vector-effect: non-scaling-stroke; }
.xsec-leaders text { font-size: 13px; font-weight: 600; fill: var(--text-2); }

.xsec-copy { display: grid; gap: 1rem; align-content: start; }
.xsec-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.xsec-text { display: grid; gap: 0.5rem; min-height: 9rem; align-content: start; }
.xsec-text p { color: var(--text-2); }
.xsec-reach { font-weight: 600; color: var(--accent-strong) !important; }
.xsec-text[data-swap] > * { animation: panel-in 240ms var(--ease-out) both; }

/* ======================================================================
   Map + mountains
   ====================================================================== */
.map { display: grid; gap: 0.625rem; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
.map-frame { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--bg); }
.map-svg { display: block; width: 100%; height: auto; max-height: 560px; }
.map-minor path { fill: none; stroke: var(--line); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.map-water path { fill: none; stroke: var(--accent-tint); stroke-width: 2.5; stroke-dasharray: 6 4; stroke-linecap: round; }
.map-major path { fill: none; stroke: var(--text); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.map-fifth path, .map-coffeen path { stroke: var(--text-2); }
.map-area ellipse { fill: oklch(0.47 0.2 265 / 0.12); stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 4; }
.map-labels text { paint-order: stroke; stroke: var(--bg); stroke-width: 5px; stroke-linejoin: round; text-anchor: middle; }
.map-l-major { font-size: 14px; font-weight: 700; fill: var(--text); }
.map-l-water { font-size: 11px; font-style: italic; fill: var(--accent-strong); }
.map-l-area { font-size: 16px; font-weight: 700; fill: var(--accent-strong); }
.map-l-sub { font-size: 11px; font-weight: 600; fill: var(--accent-strong); }
.map-furniture path { fill: var(--text); stroke: var(--text); stroke-width: 1.5; }
.map-furniture g:last-child path { fill: none; }
.map-furniture text { font-size: 11px; font-weight: 700; fill: var(--text-2); text-anchor: middle; }
.map-cap { font-size: var(--fs-label); color: var(--text-3); }

.mtn { position: relative; margin-top: -1px; }
.visit { padding-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.mtn-svg { display: block; width: 100%; height: clamp(120px, 14vw, 200px); }
.mtn-3 { fill: var(--bg-sunken); }
.mtn-2 { fill: var(--porcelain-300); }
.mtn-1 { fill: var(--bg-raised); }
.mtn-svg path { stroke: var(--text-3); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.mtn-cap { display: block; padding-bottom: 0.75rem; font-size: var(--fs-label); font-weight: 600; color: var(--text-3); }
@media (max-width: 699px) {
  .map-frame { margin-inline: calc(var(--gutter) * -1); border-radius: 0; border-inline: 0; }
  .map-l-major { font-size: 24px; }
  .map-l-area { font-size: 26px; }
  .map-l-sub { font-size: 18px; }
  .map-l-water { font-size: 18px; }
  .map-furniture text { font-size: 18px; }
  .map-labels text { stroke-width: 8px; }
}
.portrait-frame:has(img) .crop { border-color: oklch(1 0 0 / 0.85); }
.portrait-frame:has(img) .portrait-initials { visibility: hidden; }
