/* Maribel Brand DDS Inc. - Porcelain & Archwire Design System
   Warm porcelain grounds, hairline ceramic surfaces, heritage practice teal,
   Fraunces display serif + Plus Jakarta Sans UI/body. Light and dark first-class. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/fraunces-500-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;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/fraunces-500-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: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-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;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-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;
}

:root {
  color-scheme: light dark;
  --bg: #FAF7F2;
  --bg-alt: #F1EBE1;
  --surface: #FFFFFF;
  --surface-2: #F6F2EA;
  --line: #E2D9CB;
  --line-strong: #C9BDAC;
  --ink: #13222B;
  --muted: #475A65;
  --accent: #0B6884;
  --accent-2: #074E64;
  --on-accent: #FFFFFF;
  --clay: #A84E30;
  --night: #10212B;
  --night-2: #182E3B;
  --on-night: #F4F0E8;
  --on-night-2: #C2D1DA;

  /* Compatibility aliases for structural/tool tokens */
  --sky: var(--bg);
  --sky-2: var(--bg-alt);
  --paper: var(--surface);
  --sand: var(--bg-alt);
  --now: var(--accent);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --t-small: clamp(0.875rem, 0.84rem + 0.12vw, 0.9375rem);
  --t-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --t-lead: clamp(1.1875rem, 1.06rem + 0.45vw, 1.375rem);
  --t-head: clamp(1.875rem, 1.3rem + 2.2vw, 3.125rem);
  --t-display: clamp(2.25rem, 1.15rem + 3vw, 3.625rem);

  --r-row: 14px;
  --r: 18px;
  --gutter: clamp(16px, 2.5vw, 36px);
  --gap: 14px;
  --space: clamp(64px, 8vw, 128px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 76px;
  --jump-offset: 136px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D1920;
    --bg-alt: #13232C;
    --surface: #172934;
    --surface-2: #1E3442;
    --line: #2A4454;
    --line-strong: #3A5C70;
    --ink: #F3EFE8;
    --muted: #B7C8D2;
    --accent: #7CC8E2;
    --accent-2: #9ED8EC;
    --on-accent: #07212C;
    --clay: #E8997D;
    --night: #081116;
    --night-2: #11222C;
    --on-night: #F3EFE8;
    --on-night-2: #B7C8D2;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D1920;
  --bg-alt: #13232C;
  --surface: #172934;
  --surface-2: #1E3442;
  --line: #2A4454;
  --line-strong: #3A5C70;
  --ink: #F3EFE8;
  --muted: #B7C8D2;
  --accent: #7CC8E2;
  --accent-2: #9ED8EC;
  --on-accent: #07212C;
  --clay: #E8997D;
  --night: #081116;
  --night-2: #11222C;
  --on-night: #F3EFE8;
  --on-night-2: #B7C8D2;
}

:root[data-theme="light"] {
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  accent-color: var(--accent);
  scroll-behavior: smooth;
  scrollbar-color: var(--line-strong) var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--t-body)/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 0.08em; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  letter-spacing: -0.025em;
  line-height: 1.07;
  text-wrap: balance;
}
h3 {
  font-family: var(--font);
  font-weight: 600;
  font-size: var(--t-lead);
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-wrap: balance;
}
p, li, dd { text-wrap: pretty; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.on-night :focus-visible { outline-color: var(--on-night); }
[hidden] { display: none !important; }
[id] { scroll-margin-top: var(--jump-offset); }

.skip {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 120;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 16px; }
.wrap { width: min(1280px, 100% - var(--gutter) * 2); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 24px);
  min-height: 76px;
  padding-block: 8px;
}
.brand-logo {
  flex: 0 0 auto;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #084c6b;
  transition: transform 0.2s var(--ease);
}
.brand-logo:hover { transform: translateY(-1px); }
.brand-logo img { display: block; height: 54px; width: auto; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo { border-color: rgba(255, 255, 255, 0.22); }
}
:root[data-theme="dark"] .brand-logo { border-color: rgba(255, 255, 255, 0.22); }

.navlinks {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 20px);
  margin-left: auto;
}
.navlinks > a:not(.button) {
  font-size: var(--t-small);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 4px;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.navlinks > a:not(.button):hover,
.navlinks > a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
}
.navlinks > a[aria-current="page"] { font-weight: 600; }

.lang-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--ink);
  font: 600 var(--t-small)/1 var(--font);
  cursor: pointer;
}
.lang-toggle span {
  min-width: 38px;
  padding: 9px 10px;
  border-radius: 999px;
  text-align: center;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.lang-toggle span.active {
  background: var(--ink);
  color: var(--bg);
}

.nav-menu { display: none; position: relative; }
.nav-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--t-small);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu[open] > summary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.nav-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 70;
  display: grid;
  gap: 2px;
  width: min(320px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(19, 34, 43, 0.12);
}
.nav-menu-panel a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}
.nav-menu-panel a:hover,
.nav-menu-panel a:focus-visible { background: var(--bg-alt); }
.nav-menu-panel a[aria-current="page"] { font-weight: 700; color: var(--accent); }

@media (max-width: 1260px) {
  .navlinks > a:not(.button) { display: none; }
  .nav-menu { display: block; }
}
html[lang="es"] .navlinks > a:not(.button) { display: none; }
html[lang="es"] .nav-menu { display: block; }
@media (max-width: 760px) {
  .navlinks .header-call { display: none; }
  .header-inner { min-height: 66px; }
  .brand-logo img { height: 46px; }
  .nav-menu { position: static; }
  .nav-menu-panel { left: var(--gutter); right: var(--gutter); width: auto; }
}

/* Archwire reading progress line */
.floss {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  pointer-events: none;
  overflow-x: clip;
}
.floss span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--read, 0));
}
.floss i {
  position: absolute;
  top: 50%;
  left: clamp(7px, calc(var(--read, 0) * 100%), calc(100% - 7px));
  width: 8px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.22s var(--ease), opacity 0.18s var(--ease), background 0.2s var(--ease);
}
.floss.is-reading i {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.floss.is-done i {
  background: var(--ink);
  transform: translate(-50%, -50%) rotate(45deg) scale(1.08);
}
@keyframes floss-glint {
  0%, 100% { filter: brightness(1); }
  45% { filter: brightness(1.4); }
}
.floss.is-flossing span,
.floss.is-flossing i {
  animation: floss-glint 0.8s var(--ease);
}

/* ---------- Buttons & Links ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 600 var(--t-small)/1.2 var(--font);
  font-variant-numeric: tabular-nums;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}
.button:hover { transform: translateY(-2px); border-color: var(--ink); }
.button.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.button:active { transform: scale(0.985); background: var(--ink); border-color: var(--ink); color: var(--bg); }
.button .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.text-link { font-weight: 600; color: var(--accent); text-decoration: underline; }
.text-link:hover { color: var(--accent-2); }
.actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }

/* ---------- Signature Motif: Sculpture Band & Bracket Bullets ---------- */
.wire-band {
  display: block;
  width: 100%;
  aspect-ratio: 1641 / 481;
  background: var(--ink);
  -webkit-mask: url("sculpture.svg") center/contain no-repeat;
  mask: url("sculpture.svg") center/contain no-repeat;
}
.brackets { list-style: none; padding: 0; display: grid; gap: 10px; }
.brackets > li { position: relative; padding-left: 28px; }
.brackets > li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.48em;
  width: 12px;
  height: 11px;
  border-radius: 3px;
  background: var(--accent);
}
.on-night .brackets > li::before { background: var(--on-night); }

/* ---------- Fields & Sections ---------- */
.band, .svc { padding-block: var(--space); }
.band.tight { padding-block: clamp(48px, 6vw, 88px); }
.field-paper { background: var(--surface); border-block: 1px solid var(--line); }
.field-sand { background: var(--bg-alt); border-block: 1px solid var(--line); }
.on-night { background: var(--night); color: var(--on-night); }
.on-night .muted, .on-night p.lede { color: var(--on-night-2); }
.on-night a { color: var(--on-night); }
.on-night .button {
  background: var(--night-2);
  border-color: var(--line-strong);
  color: var(--on-night);
}
.on-night .button.primary {
  background: var(--on-night);
  border-color: var(--on-night);
  color: var(--night);
}
.on-night .button.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .on-night .button.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
  }
}
:root[data-theme="dark"] .on-night .button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.muted { color: var(--muted); }
.lede { font-size: var(--t-lead); line-height: 1.45; max-width: 38ch; color: var(--muted); }
.head { display: grid; gap: 16px; max-width: 720px; margin-bottom: clamp(32px, 4.5vw, 52px); }
.head h2 { font-size: var(--t-head); }
.head p { max-width: 60ch; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.split.even { grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .split, .split.even { grid-template-columns: 1fr; } }
.small { font-size: var(--t-small); }
.after { margin-top: clamp(24px, 3vw, 40px); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(16px, 2vw, 24px);
  width: min(1280px, 100% - var(--gutter) * 2);
  margin-inline: auto;
  padding-block: clamp(20px, 3vw, 36px) clamp(32px, 4vw, 56px);
  align-items: stretch;
}
.hero-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(18px, 2vw, 26px);
  padding: clamp(24px, 3.2vw, 44px);
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  min-width: 0;
}
.hero-card .wire-band { max-width: 360px; }
@media (max-width: 720px) {
  .hero-card > .wire-band, .hero-card > [data-braces-swatches] { order: 2; }
  .hero-card > .wire-band { margin-top: 6px; }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--ink);
  font-size: var(--t-small);
  font-weight: 600;
  line-height: 1.25;
}
.eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 9px;
  border-radius: 2.5px;
  background: var(--accent);
}
.hero h1 { font-size: var(--t-display); line-height: 1.04; max-width: 18ch; }
html[lang="es"] .hero h1 { font-size: clamp(1.95rem, 1.05rem + 2.5vw, 3.15rem); }
.page-hero .hero-card h1 { max-width: 16ch; }

.hero-photo {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 360px;
  background: var(--bg-alt);
  min-width: 0;
}
.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
}
.hero-photo img[src*="treatment-room"] { object-position: 40% 50%; }
.hero-photo figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: var(--t-small);
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 14px; padding-bottom: 28px; }
  .hero-photo { min-height: 0; aspect-ratio: 16 / 10; }
}
@media (max-width: 520px) {
  .hero-card { gap: 14px; padding: 18px 16px; }
  .hero h1 { font-size: 1.875rem; }
  html[lang="es"] .hero h1 { font-size: 1.6875rem; }
  .hero-card .lede { font-size: 1.03125rem; line-height: 1.42; }
  .hero-card .actions { gap: 8px; }
  .hero-card .actions .button { flex: 1 1 auto; padding: 0 15px; min-height: 48px; }
}

/* ---------- Office Days (assets/ortho-days.js) ---------- */
.days { display: grid; gap: 8px; min-width: 0; }
.days-title { font-size: var(--t-small); font-weight: 700; color: var(--ink); }
.days ul { list-style: none; padding: 0; display: grid; gap: 8px; min-width: 0; }
.days li { min-width: 0; }
.day {
  display: grid;
  grid-template-columns: minmax(9em, auto) 1fr auto;
  align-items: center;
  gap: 4px 14px;
  min-height: 58px;
  padding: 10px 12px 10px 16px;
  border-radius: var(--r-row);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
  min-width: 0;
}
.day strong { font-weight: 600; }
.day span { color: var(--muted); white-space: nowrap; }
.day em {
  font-style: normal;
  white-space: nowrap;
  font-weight: 600;
  font-size: var(--t-small);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}
li:first-child > .day {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
li:first-child > .day span { color: inherit; opacity: 0.92; }
li:first-child > .day em {
  background: var(--on-accent);
  border-color: var(--on-accent);
  color: var(--accent);
}
.day:hover { transform: translateX(4px); border-color: var(--ink); }
.day em { transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease); }
.day:hover em { transform: translateX(2px); }
.day:active { transform: scale(0.99); background: var(--ink); border-color: var(--ink); color: var(--bg); }
.days-note { font-size: var(--t-small); color: var(--muted); }
.days-none { font-weight: 600; }
.on-night .day { background: var(--night-2); border-color: var(--line); color: var(--on-night); }
.on-night .day span { color: var(--on-night-2); }
.on-night .day em { background: var(--night); border-color: var(--line); color: var(--on-night); }
.on-night li:first-child > .day { background: var(--on-night); border-color: var(--on-night); color: var(--night); }
.on-night li:first-child > .day span { color: var(--night); }
.on-night li:first-child > .day em { background: var(--night); color: var(--on-night); }
.on-night .days-note { color: var(--on-night-2); }
@media (max-width: 640px) {
  .day {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    padding: 12px 14px;
  }
  .day strong { flex: 1 0 100%; }
  .day span { white-space: normal; font-size: var(--t-small); }
  .day em { margin-left: auto; padding: 7px 13px; white-space: normal; text-align: center; }
}

/* ---------- Treatment Index ---------- */
.index { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.index-group + .index-group { margin-top: 36px; }
.index-group h3 { margin-bottom: 8px; color: var(--clay); font-size: var(--t-small); text-transform: uppercase; letter-spacing: 0.05em; }
.index-list { list-style: none; padding: 0; }
.index-list li { border-bottom: 1px solid var(--line); }
.index-list a {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 14px 4px 14px 28px;
  font-size: var(--t-lead);
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}
.index-list a::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 22px;
  width: 12px;
  height: 11px;
  border-radius: 3px;
  background: var(--accent);
}
.index-list a span { font-size: var(--t-small); font-weight: 400; color: var(--muted); }
.index-list a:hover, .index-list a:focus-visible, .index-list a.is-on { transform: translateX(6px); color: var(--accent); }
.index.has-hover .index-list a:not(.is-on) { color: var(--muted); }
.index-frame { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 12px; }
.index-pics { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; background: var(--night); border: 1px solid var(--line); }
.index-pics > .wire-band { position: absolute; left: 12%; right: 12%; top: 50%; width: 76%; transform: translateY(-50%); background: var(--on-night); opacity: 0.2; }
.index-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; z-index: 1; transition: opacity 0.24s var(--ease); }
.index-frame img.is-on { opacity: 1; }
.index-frame img[data-fit="contain"] { object-fit: contain; }
.index-frame figcaption { font-size: var(--t-small); color: var(--muted); text-align: center; }
@media (max-width: 860px) { .index { grid-template-columns: 1fr; } .index-frame { display: none; } .index-list a { font-size: 1.125rem; } }

/* ---------- Quick Strip & Patient Tools ---------- */
.quick-strip {
  padding-block: clamp(22px, 3vw, 34px);
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}
.quick-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 14px;
}
.quick-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-size: var(--t-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--clay);
}
.quick-head h2::before {
  content: "";
  width: 10px;
  height: 9px;
  border-radius: 2.5px;
  background: var(--clay);
}
.quick-head p { font-size: var(--t-small); color: var(--muted); }
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.quick-card {
  position: relative;
  display: grid;
  gap: 3px;
  align-content: center;
  min-height: 68px;
  padding: 13px 34px 13px 16px;
  border-radius: var(--r-row);
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.quick-card strong { font-weight: 600; font-size: 1rem; line-height: 1.25; color: var(--ink); }
.quick-card span { font-size: var(--t-small); color: var(--muted); line-height: 1.3; }
.quick-card::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  transform: translateY(-50%) rotate(45deg);
  transition: transform 0.2s var(--ease);
}
.quick-card:hover, .quick-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.quick-card:hover::after, .quick-card:focus-visible::after {
  transform: translate(3px, -50%) rotate(45deg);
}
.quick-card:active {
  transform: scale(0.99);
  background: var(--ink);
  border-color: var(--ink);
}
.quick-card:active strong, .quick-card:active span { color: var(--bg); }
.quick-card:active::after { border-color: var(--bg); }
.review-ask { margin-top: 1rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem; font-size: var(--t-small); color: var(--muted); }
.review-ask a { font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.review-ask a:hover, .review-ask a:focus-visible { color: var(--accent); }
@media (max-width: 980px) { .quick-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .quick-grid { grid-template-columns: 1fr; } .quick-card { min-height: 58px; } }

.care-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-top: clamp(28px, 4vw, 44px);
}
.care-note {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 18px 20px;
  border-radius: var(--r-row);
  border: 1px solid var(--line);
  background: var(--bg);
}
.care-note strong {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: var(--ink);
}
.care-note strong::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 9px;
  border-radius: 2.5px;
  background: var(--accent);
}
.care-note p { font-size: var(--t-small); color: var(--muted); }
.care-note a { font-weight: 600; color: var(--accent); }
.care-lines { list-style: none; padding: 0; margin: 2px 0 0; display: grid; gap: 5px; font-size: var(--t-small); color: var(--muted); }
@media (max-width: 820px) { .care-notes { grid-template-columns: 1fr; } }

.tools-layout {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: stretch;
}
.braces-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
}
.braces-card-head { display: grid; gap: 6px; }
.braces-card-head h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.375rem, 1.15rem + 0.8vw, 1.75rem); }
.braces-card-head p { color: var(--muted); font-size: var(--t-small); }
.tool-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.tool-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.tool-card-top { display: grid; gap: 6px; }
.tool-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}
.tool-card-tag::before {
  content: "";
  width: 9px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}
.tool-card strong { font-size: 1.125rem; font-weight: 600; line-height: 1.25; }
.tool-card p { font-size: var(--t-small); color: var(--muted); line-height: 1.45; }
.tool-card-go {
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  transition: transform 0.2s var(--ease);
}
.tool-card:hover, .tool-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.tool-card:hover .tool-card-go { transform: translateX(3px); }
.tool-card:active {
  transform: scale(0.99);
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.tool-card:active p, .tool-card:active .tool-card-tag, .tool-card:active .tool-card-go { color: var(--bg); }
.tool-card:active .tool-card-tag::before { background: var(--bg); }
@media (max-width: 980px) { .tools-layout { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .tool-cards { grid-template-columns: 1fr; } }

/* ---------- Meet Your Doctors ---------- */
.doctors { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.doctor {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: clamp(20px, 2.6vw, 32px);
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease);
}
.doctor:hover { border-color: var(--line-strong); }
.doctor-portrait {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  overflow: hidden;
}
.doctor-portrait::before {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 18%;
  height: 28%;
  border-top: 1.5px solid currentColor;
  border-radius: 50% 50% 0 0;
  opacity: 0.24;
  pointer-events: none;
}
.doctor-portrait::after {
  content: "";
  position: absolute;
  bottom: calc(18% + 5px);
  left: 50%;
  width: 9px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
  transform: translateX(-50%);
  opacity: 0.32;
  pointer-events: none;
}
.doctor-portrait span { position: relative; z-index: 1; padding-bottom: 10px; font-family: var(--font-display); font-size: 2.35rem; font-weight: 500; letter-spacing: 0.02em; }
.doctor-portrait img { width: 100%; height: 100%; object-fit: cover; }
.doctor-text { display: grid; gap: 10px; min-width: 0; }
.doctor-role {
  font-size: var(--t-small);
  font-weight: 700;
  color: var(--accent);
  margin-top: -4px;
}
.doctor-text p { color: var(--muted); }
.doctor-direct {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: var(--r-row);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
}
.doctor-direct strong {
  font-size: var(--t-small);
  font-weight: 700;
  color: var(--ink);
}
.doctor-direct-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: var(--t-small);
  font-variant-numeric: tabular-nums;
}
.doctor-direct-links a {
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
}
.doctor-direct-links a:hover { color: var(--accent-2); }
.direct-number {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}
.direct-number:hover { color: var(--accent); }
.tools-layout.solo { grid-template-columns: minmax(0, 1fr); }
.tools-layout.solo .tool-cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.doctor .jdrc-sign { color: var(--ink); margin-top: 4px; }
.doctor .jdrc-sign .jdrc-mark { width: 84px; }
.doctor .jdrc-sign .jdrc-letters { width: 68px; }
@media (max-width: 980px) { .doctors { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .doctor { grid-template-columns: 74px minmax(0, 1fr); gap: 14px; padding: 18px 16px; } .doctor-portrait span { font-size: 1.55rem; } }

/* JDRC mark & letters */
.jdrc-mark {
  display: inline-block;
  flex: 0 0 auto;
  width: var(--mark, 52px);
  aspect-ratio: 1272 / 1145;
  background: currentColor;
  -webkit-mask: url("jdrc-mark.svg") center/contain no-repeat;
  mask: url("jdrc-mark.svg") center/contain no-repeat;
}
.jdrc-letters {
  display: inline-block;
  flex: 0 0 auto;
  width: 64px;
  aspect-ratio: 912 / 334;
  background: currentColor;
  -webkit-mask: url("jdrc-letters.svg") center/contain no-repeat;
  mask: url("jdrc-letters.svg") center/contain no-repeat;
}
.jdrc-sign { display: flex; align-items: flex-end; gap: 14px; }
.signature { display: flex; align-items: center; gap: 12px; margin-top: 8px; color: var(--on-night); --mark: 72px; }
.signature span:last-child { color: var(--on-night-2); }

/* ---------- FAQs ---------- */
.qa { display: grid; gap: 8px; }
.qa details {
  border-radius: var(--r-row);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field-paper .qa details { background: var(--bg); }
.qa details:hover { border-color: var(--line-strong); }
.qa details[open] {
  border-color: var(--line-strong);
  box-shadow: inset 3px 0 0 var(--accent);
}
.qa summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  min-height: 60px;
  padding: 14px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "";
  flex: 0 0 auto;
  width: 12px;
  height: 11px;
  border-radius: 3px;
  background: var(--accent);
  transition: transform 0.28s var(--ease);
}
.qa details[open] summary::after { transform: rotate(45deg); }
.qa details > p, .qa details > div { padding: 0 20px 18px; max-width: 68ch; color: var(--muted); }
.qa details > p + p { padding-top: 0; }
.qa details a { color: var(--accent); font-weight: 600; }
.qa-group { margin: 24px 0 8px; font-size: var(--t-small); font-weight: 700; color: var(--clay); text-transform: uppercase; letter-spacing: 0.04em; }
.qa-group:first-child { margin-top: 0; }

/* ---------- Visit & Footer ---------- */
.visit-side { display: grid; gap: 20px; align-content: start; }
.phone {
  display: inline-block;
  font-size: var(--t-head);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-decoration: none;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.phone:hover { text-decoration: underline; }
.steps { display: grid; gap: 12px; padding-left: 1.4em; margin: 0; }
.steps li { color: var(--muted); padding-left: 4px; }
.steps li::marker { font-weight: 700; color: var(--accent); }
.direct-card {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--surface);
}
.direct-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.direct-head .jdrc-mark { --mark: 44px; color: var(--ink); }
.direct-head h3 { font-size: 1.0625rem; font-weight: 700; color: var(--ink); }
.direct-card p { font-size: var(--t-small); color: var(--muted); max-width: 58ch; }
.direct-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-size: var(--t-small);
  font-variant-numeric: tabular-nums;
}
.direct-actions a {
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
}
.direct-actions a:hover { color: var(--accent-2); }

.map-col { display: grid; gap: 16px; align-content: start; }
.map-card {
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.map-foot {
  display: grid;
  gap: 14px;
  padding: clamp(16px, 2.2vw, 22px);
}
.map-foot-info { display: grid; gap: 2px; }
.map-foot-info strong { font-size: 1rem; color: var(--ink); }
.map-foot-info span { font-size: var(--t-small); color: var(--muted); }
.map-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.map-actions .button { flex: 1 1 180px; min-height: 46px; padding: 0 16px; }
.map { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--bg-alt); }
.map-card .map { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.map iframe { display: block; width: 100%; height: clamp(300px, 38vw, 420px); border: 0; }

footer {
  background: var(--night);
  color: var(--on-night);
  padding: clamp(56px, 7vw, 104px) 0 calc(36px + env(safe-area-inset-bottom));
}
footer .wire-band { background: var(--on-night); max-width: 820px; margin: 0 auto clamp(40px, 5vw, 72px); opacity: 0.9; }
.footer-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid strong { display: block; margin-bottom: 12px; font-weight: 600; color: var(--on-night); }
.footer-grid p, .footer-links a, .footer-links span { color: var(--on-night-2); font-size: var(--t-small); }
.footer-links { display: grid; gap: 0; justify-items: start; }
.footer-links a { text-decoration: none; padding: 11px 0; }
.footer-links a:hover { color: var(--on-night); text-decoration: underline; }
.footer-bottom { display: grid; gap: 10px; margin-top: clamp(36px, 4.5vw, 56px); padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.14); color: var(--on-night-2); font-size: var(--t-small); }
.footer-bottom p { max-width: 92ch; }
.footer-bottom a { color: inherit; }
.brush-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: var(--night-2);
  color: var(--on-night);
  font: 600 var(--t-small)/1.2 var(--font);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.brush-link .brush-tooth {
  width: 14px;
  height: 14px;
  background: var(--accent);
  -webkit-mask: url("tooth.svg") center/contain no-repeat;
  mask: url("tooth.svg") center/contain no-repeat;
  transition: transform 0.22s var(--ease);
}
.brush-link:hover { border-color: var(--on-night); transform: translateY(-1px); }
.brush-link:hover .brush-tooth { transform: rotate(-14deg) scale(1.1); }
.brush-link:active { transform: scale(0.98); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Mobile Call/Text Dock ---------- */
.mobile-call { display: none; }
@media (max-width: 760px) {
  footer { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
  html { scroll-padding-bottom: 92px; }
  .mobile-call {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    position: fixed;
    z-index: 60;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 7px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: var(--night);
    box-shadow: 0 10px 28px rgba(8, 17, 22, 0.28);
    transition: transform 0.3s var(--ease), opacity 0.25s var(--ease);
  }
  .mobile-call.is-tucked,
  .mobile-call.is-typing {
    transform: translateY(calc(100% + 28px));
    opacity: 0;
    pointer-events: none;
  }
  .mobile-call a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 4px 10px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.15;
    font-size: 14px;
  }
  .mobile-call a .num { font-weight: 400; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .mobile-call .call { background: var(--on-night); color: var(--night); }
  .mobile-call .text { background: var(--accent); color: var(--on-accent); }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .mobile-call .call { background: var(--accent); color: var(--on-accent); }
    :root:not([data-theme="light"]) .mobile-call .text { background: var(--surface-2); color: var(--ink); }
  }
  :root[data-theme="dark"] .mobile-call .call { background: var(--accent); color: var(--on-accent); }
  :root[data-theme="dark"] .mobile-call .text { background: var(--surface-2); color: var(--ink); }
  .mobile-call a:active { filter: brightness(0.9); }
}

/* ---------- Service Pages & Care Guides ---------- */
.jump {
  position: sticky;
  top: var(--header-h, 76px);
  z-index: 40;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  border-bottom: 1px solid var(--line);
}
.jump-inner { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.jump-inner::-webkit-scrollbar { display: none; }
.jump a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--t-small);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.jump a:hover { border-color: var(--ink); }
.jump a.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }
@media (max-width: 900px) { .jump { position: static; } .jump-inner { flex-wrap: wrap; overflow: visible; } }

.svc-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.svc-grid.flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.svc-grid.flip > .svc-figure { order: -1; }
.svc-grid.solo { grid-template-columns: minmax(0, 1fr); }
.svc-main, .svc-detail { display: grid; gap: 24px; min-width: 0; }
.svc-main { container-type: inline-size; }
.svc-main > h2 { font-size: var(--t-head); }
.svc-main > .lede { max-width: 44ch; }
.svc-figure { position: sticky; top: calc(var(--jump-offset, 136px) + 12px); display: grid; gap: 12px; }
.svc-figure img, .intro-figure img { width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); object-fit: cover; }
.svc-figure.contain img { object-fit: contain; background: var(--night); border-color: transparent; }
.svc-figure figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--t-small);
}
@media (max-width: 860px) {
  .svc-grid, .svc-grid.flip { grid-template-columns: 1fr; }
  .svc-grid.flip > .svc-figure { order: 0; }
  .svc-figure { position: static; }
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  padding: 20px 24px;
  border-radius: var(--r-row);
  border: 1px solid var(--line);
  background: var(--surface);
}
@container (min-width: 600px) { .svc-main .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.field-paper .facts { background: var(--bg); }
.facts > div { display: grid; gap: 4px; align-content: start; }
.facts dt { font-size: var(--t-small); color: var(--muted); }
.facts dd { font-size: 1.0625rem; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; }
.on-night .facts { background: var(--night-2); border-color: rgba(255, 255, 255, 0.12); }
.on-night .facts dt { color: var(--on-night-2); }

.folds { display: grid; gap: 8px; }
.fold { border-radius: var(--r-row); border: 1px solid var(--line); background: var(--surface); transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.fold:hover { border-color: var(--line-strong); }
.fold[open] { border-color: var(--line-strong); box-shadow: inset 3px 0 0 var(--accent); }
.field-paper .fold { background: var(--bg); }
.on-night .fold { background: var(--night-2); border-color: rgba(255, 255, 255, 0.12); }
.fold > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  padding: 12px 20px;
  font-size: var(--t-lead);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after {
  content: "";
  flex: 0 0 auto;
  width: 12px;
  height: 11px;
  border-radius: 3px;
  background: var(--accent);
  transition: transform 0.28s var(--ease);
}
.on-night .fold > summary::after { background: var(--on-night); }
.fold[open] > summary::after { transform: rotate(45deg); }
.fold-body { display: grid; gap: 14px; padding: 0 20px 20px; max-width: 68ch; color: var(--muted); }
.fold-body h3 { font-size: var(--t-body); font-weight: 600; color: var(--ink); margin-top: 6px; }

.callout {
  padding: 18px 22px;
  border-radius: var(--r-row);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--surface-2);
  color: var(--ink);
}
.callout.after { max-width: 72ch; }
.callout a { font-weight: 600; color: var(--accent); }
.on-night .callout {
  background: var(--night-2);
  border-color: rgba(255, 255, 255, 0.14);
  border-left-color: var(--accent);
  color: var(--on-night);
}
.on-night .callout a { color: var(--on-night); }

.term { font-size: var(--t-small); color: var(--muted); max-width: 70ch; }
.term strong { color: var(--ink); }
.on-night .term { color: var(--on-night-2); }
.on-night .term strong { color: var(--on-night); }
.svc-qa h3 { margin-bottom: 12px; font-size: var(--t-body); font-weight: 600; }
.on-night .qa details { background: var(--night-2); border-color: rgba(255, 255, 255, 0.12); }
.on-night .qa details > p { color: var(--on-night-2); }
.on-night .qa summary::after { background: var(--on-night); }
.on-night .qa details a { color: var(--on-night); }
.disc { font-size: var(--t-small); color: var(--muted); max-width: 70ch; }

.know { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px) clamp(28px, 4.5vw, 64px); }
.know article { display: grid; gap: 8px; align-content: start; }
.know h3 { display: flex; gap: 12px; align-items: center; }
.know h3::before { content: ""; flex: 0 0 auto; width: 12px; height: 11px; border-radius: 3px; background: var(--accent); }
.know p { color: var(--muted); max-width: 52ch; }
.on-night .know p { color: var(--on-night-2); }
.on-night .know h3::before { background: var(--on-night); }
@media (max-width: 760px) { .know { grid-template-columns: 1fr; } }

.records { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.records figure { display: grid; gap: 10px; align-content: start; }
.records img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; background: var(--night); border-radius: var(--r-row); border: 1px solid rgba(255, 255, 255, 0.12); }
.records figcaption { display: grid; gap: 4px; }
.records figcaption strong { font-weight: 600; }
.records figcaption span { color: var(--on-night-2); font-size: var(--t-small); }
@media (max-width: 900px) { .records { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .records { grid-template-columns: 1fr; } }

/* ---------- Interactive Braces Sculpture ---------- */
.braces { position: relative; display: block; width: 100%; aspect-ratio: 1641 / 481; background: none; -webkit-mask: none; mask: none; }
.braces-ink { position: absolute; inset: 0; background: var(--ink); -webkit-mask: url("sculpture.svg") center/contain no-repeat; mask: url("sculpture.svg") center/contain no-repeat; }
.braces-overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bracket { cursor: pointer; }
.bracket .ligature { fill: none; stroke-width: 16; stroke: var(--band, #b8c2c9); transition: stroke 0.25s var(--ease); }
.bracket .pad { fill: #9aa6ae; }
.bracket .wings rect { fill: #dfe6ea; stroke: #7d8a93; stroke-width: 2; }
.bracket .slot { fill: #4a555d; }
.bracket .shine { fill: #ffffff; opacity: 0.8; }
.bracket:hover .wings rect { fill: #f2f6f8; }
.bracket:focus-visible { outline: none; }
.bracket:focus-visible .ligature { stroke-width: 18; }
.bracket.tapped .ligature { stroke-width: 24; }
.band-swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.band-swatches button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(19, 34, 43, 0.2);
  border-radius: 999px;
  background: var(--c);
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.band-swatches button:hover { transform: translateY(-2px) scale(1.07); }
.band-swatches button:active { transform: scale(0.93); }
.band-swatches button[aria-pressed="true"] {
  outline: none;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink);
  transform: scale(1.08);
}
.band-swatches.full button { width: 40px; height: 40px; }
.band-swatches .mix {
  width: auto !important;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font: 600 var(--t-small) var(--font);
}
.band-swatches .mix:hover { transform: translateY(-2px); background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.band-swatches .mix:active { transform: scale(0.97); }
.band-swatches[data-hint]::after { content: attr(data-hint); flex-basis: 100%; margin-top: 2px; font-size: var(--t-small); font-weight: 500; color: var(--muted); }
.band-sparks { pointer-events: none; }
.band-sparks circle { transform-box: fill-box; transform-origin: center; }
.band-swatches.cheer::after { color: var(--accent); font-weight: 600; }

/* ---------- Brushing Band & Dialog ---------- */
.brush-band { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr) auto; gap: clamp(20px, 3.5vw, 48px); align-items: center; }
.brush-copy { display: grid; gap: 8px; }
.brush-copy h2 { font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.375rem); }
@media (max-width: 900px) { .brush-band { grid-template-columns: 1fr; } .brush-band .wire-band { max-width: 200px; } }

.brush-timer { border: 1px solid var(--line); padding: 0; border-radius: 24px; background: var(--surface); color: var(--ink); width: min(400px, calc(100vw - 32px)); }
.brush-timer::backdrop { background: rgba(8, 17, 22, 0.65); }
.brush-timer-inner { display: grid; gap: 14px; justify-items: center; padding: 28px 24px 24px; text-align: center; }
.brush-timer h2 { font-size: var(--t-lead); }
.bt-sub { color: var(--muted); font-size: var(--t-small); }
.bt-mouth { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 240px; }
.bt-mouth span {
  display: grid;
  place-items: center;
  height: 62px;
  padding: 0 6px;
  background: var(--bg-alt);
  color: var(--ink);
  font-size: var(--t-small);
  font-weight: 600;
  line-height: 1.2;
  transition: background 0.25s, color 0.25s;
  -webkit-mask: url("tooth.svg") center/100% 100% no-repeat;
  mask: url("tooth.svg") center/100% 100% no-repeat;
}
.bt-mouth span:nth-child(n+3) { transform: scaleY(-1); }
.bt-mouth span:nth-child(n+3) > * { transform: scaleY(-1); }
.bt-mouth b { display: block; font-weight: inherit; }
.bt-mouth span.on { background: var(--accent); color: var(--on-accent); }
.bt-mouth span.done { background: var(--ink); color: var(--bg); }
.bt-clock { font: 700 3.25rem/1 var(--font); font-variant-numeric: tabular-nums; }
.bt-now { min-height: 24px; font-weight: 600; }
.bt-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.bt-actions button { min-height: 46px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg-alt); color: var(--ink); font: 600 var(--t-small) var(--font); cursor: pointer; }
.bt-actions button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- Quiz & Comparison ---------- */
.quiz { display: grid; gap: 18px; max-width: 760px; padding: clamp(22px, 3vw, 36px); border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.quiz-progress { font-size: var(--t-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.quiz-question { font-size: var(--t-lead); }
.quiz-options { display: grid; gap: 8px; }
.quiz-options button {
  min-height: 54px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-row);
  background: var(--bg);
  color: var(--ink);
  font: 500 var(--t-body)/1.35 var(--font);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.quiz-options button:hover { background: var(--bg-alt); border-color: var(--ink); transform: translateX(3px); }
.quiz-options button:active { background: var(--ink); color: var(--bg); }
.quiz-nav { display: flex; gap: 8px; }
.quiz-nav button { min-height: 44px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg); color: var(--ink); font: 600 var(--t-small) var(--font); cursor: pointer; }
.quiz-result { display: none; gap: 16px; }
.quiz-result-text { display: grid; gap: 12px; }

.compare-figure { margin: 0 0 24px; max-width: 820px; }
.compare-figure img { width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); }
.compare-toggle { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.compare-toggle button { min-height: 44px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 var(--t-small) var(--font); cursor: pointer; }
.compare-toggle button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.comparison { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.comparison th, .comparison td { padding: 16px 20px; text-align: left; vertical-align: top; background: var(--surface); border-block: 1px solid var(--line); }
.comparison thead th { background: transparent; border: 0; padding-block: 0 4px; font-size: var(--t-small); color: var(--muted); font-weight: 600; }
.comparison thead td.corner { background: transparent; border: 0; }
.comparison tbody th { width: 18%; font-weight: 600; border-left: 1px solid var(--line); border-radius: var(--r-row) 0 0 var(--r-row); }
.comparison tbody td:last-child { border-right: 1px solid var(--line); border-radius: 0 var(--r-row) var(--r-row) 0; }
.comparison td { color: var(--muted); }
.comparison.show-braces .aligner, .comparison.show-aligners .braces { display: none; }
.comparison.show-braces tbody td.braces, .comparison.show-aligners tbody td.aligner { border-right: 1px solid var(--line); border-radius: 0 var(--r-row) var(--r-row) 0; }
@media (max-width: 700px) {
  .comparison thead { display: none; }
  .comparison, .comparison tbody, .comparison tr, .comparison th, .comparison td { display: block; width: auto; }
  .comparison tr { margin-bottom: 10px; border-radius: var(--r-row); border: 1px solid var(--line); overflow: hidden; background: var(--surface); }
  .comparison tbody th, .comparison td { border: 0; border-radius: 0; }
  .comparison tbody th { padding-bottom: 4px; }
  .comparison td { padding-top: 6px; border-top: 1px solid var(--line); }
  .comparison td::before { content: attr(data-label); display: block; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
  .comparison tbody td:last-child { border-radius: 0; border-right: 0; }
}

/* ---------- Bite Section & Bite Slider ---------- */
.bites { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.bites.bite-classes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bites article { display: grid; gap: 10px; align-content: start; padding: clamp(18px, 2.2vw, 26px); border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.bites article:first-child { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bites article:first-child p { color: inherit; opacity: 0.94; }
.bites p { color: var(--muted); }
.bite-problems { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bite-problems article, .bite-problems article:first-child { background: var(--surface); border-color: var(--line); color: var(--ink); }
.bite-problems article:first-child p { color: var(--muted); }
.bite-terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin: 0; }
.bite-terms div { padding: clamp(16px, 2vw, 22px); border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.bite-terms dt { font-weight: 600; font-size: var(--t-lead); }
.bite-terms dd { margin: 6px 0 0; color: var(--muted); }
.bite-note { max-width: 68ch; margin: -4px 0 20px; }
.bite-groups { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(24px, 4vw, 56px); }
.bite-pair { grid-template-columns: 1fr 1fr; }
.bite-sub { margin: clamp(36px, 4.5vw, 56px) 0 14px; font-size: var(--t-lead); }
.bite-img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #fff; }
.expander { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.expander > div { display: grid; gap: 12px; align-content: start; }
.expander p { color: var(--muted); }
.bite-goal { margin-top: clamp(36px, 4.5vw, 56px); max-width: 68ch; }
.bite-goal h3 { margin-bottom: 10px; }
.bite-goal p { color: var(--muted); }
@media (max-width: 1100px) { .bites.bite-classes, .bite-problems { grid-template-columns: 1fr 1fr; } .bite-groups { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .bites, .expander, .bite-terms { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .bites.bite-classes, .bite-problems, .bite-pair { grid-template-columns: 1fr; } }

.bite-tool { display: grid; gap: 20px; margin-top: clamp(28px, 4vw, 44px); padding: clamp(20px, 3vw, 32px); border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.bite-tool-head { display: grid; gap: 6px; }
[data-bite-slider] { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 3vw, 40px); align-items: center; }
.bite-stage { position: relative; width: 100%; overflow: hidden; border-radius: calc(var(--r) - 6px); border: 1px solid var(--line); background: #fff; }
.bite-inner { position: absolute; }
.bite-up, .bite-lo { position: absolute; left: 0; width: 100%; }
.bite-up { top: 0; }
.bite-up img, .bite-lo img { display: block; width: 100%; height: auto; }
.bite-lo { transition: transform 0.2s ease-out; }
.bite-cusp, .bite-groove { position: absolute; transform: translate(-50%, -50%); background: var(--accent); box-shadow: 0 0 0 2px #fff; }
.bite-cusp { width: 12px; height: 12px; border-radius: 50%; }
.bite-groove { width: 4px; height: 9%; border-radius: 2px; transform: translate(-50%, 0); }
.bite-tool-ctl { display: grid; gap: 10px; }
.bite-tool-ctl label { display: grid; gap: 8px; font-weight: 600; }
.bite-tool-ends { display: flex; justify-content: space-between; gap: 12px; font-size: var(--t-small); color: var(--muted); }
.bite-tool-class { font-size: var(--t-lead); font-weight: 600; }
[data-class="c1"] .bite-tool-class { color: var(--accent); }
.bite-tool-oj { font-weight: 600; font-variant-numeric: tabular-nums; }
.bite-tool-desc, .bite-tool-note { color: var(--muted); }
.bite-tool-note { font-size: var(--t-small); }
@media (max-width: 900px) { [data-bite-slider] { grid-template-columns: 1fr; } }

/* ---------- Care Guides & Bone Remodeling ---------- */
.phases { list-style: none; padding: 0; display: grid; gap: 20px; }
.phases li { position: relative; display: grid; gap: 6px; padding-left: 30px; }
.phases li::before { content: ""; position: absolute; left: 2px; top: 0.48em; width: 14px; height: 13px; border-radius: 4px; background: var(--accent); }
.phases li p { color: var(--muted); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.pair > article { display: grid; gap: 14px; align-content: start; padding: clamp(20px, 2.8vw, 32px); border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.pair > article:not(.yes):not(.no) { background: transparent; border: 0; padding-inline: 0; }
.pair > article p, .pair > article li { color: var(--muted); }
.pair > article.no { background: var(--night); border-color: var(--night); color: var(--on-night); }
.pair > article.no li { color: var(--on-night-2); }
.pair > article.no .brackets > li::before { background: var(--on-night); }
@media (max-width: 760px) { .pair { grid-template-columns: 1fr; } }

.trouble { display: grid; gap: 8px; }
.trouble > div {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 8px 32px;
  padding: 20px 22px;
  border-radius: var(--r-row);
  border: 1px solid var(--line);
  background: var(--surface);
}
.field-paper .trouble > div { background: var(--bg); }
.trouble dt { font-weight: 600; }
.trouble dd { color: var(--muted); }
@media (max-width: 700px) { .trouble > div { grid-template-columns: 1fr; } }

.tracking { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.tracking figure { display: grid; gap: 12px; align-content: start; }
.tracking img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; border-radius: var(--r); border: 1px solid rgba(255, 255, 255, 0.12); }
.tracking figcaption { display: grid; gap: 6px; }
.tracking .status { font-weight: 600; color: var(--accent); }
.tracking .credit { font-size: var(--t-small); color: var(--on-night-2); }
@media (max-width: 900px) { .tracking { grid-template-columns: 1fr; } }

.emergency { font-weight: 600; color: var(--clay); }
.call-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 56px); }
.call-grid > article { display: grid; gap: 14px; align-content: start; padding: clamp(20px, 2.6vw, 28px); border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
@media (max-width: 760px) { .call-grid { grid-template-columns: 1fr; } }

.remodel { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.remodel figure { display: grid; gap: 12px; }
.remodel svg { display: block; width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.remodel figcaption { font-size: var(--t-small); color: var(--muted); }
.remodel .bone { fill: var(--bg-alt); }
.remodel .socket { fill: #D4E4EA; }
.remodel .tooth { fill: #FBF8F1; stroke: var(--ink); stroke-width: 2.5; }
.remodel .gum { fill: #E4A8A1; }
.remodel .clast { fill: var(--accent); }
.remodel .clast-dots { fill: var(--on-accent); }
.remodel .blast { fill: var(--ink); }
.remodel .cyte { fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.remodel .force path { stroke: var(--clay); stroke-width: 6; stroke-linecap: round; fill: none; }
.remodel .force .head { fill: var(--clay); stroke: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .remodel .gum { fill: #8E4F52; }
  :root:not([data-theme="light"]) .remodel .socket { fill: #274656; }
  :root:not([data-theme="light"]) .remodel .tooth { fill: #EDE8DE; }
}
:root[data-theme="dark"] .remodel .gum { fill: #8E4F52; }
:root[data-theme="dark"] .remodel .socket { fill: #274656; }
:root[data-theme="dark"] .remodel .tooth { fill: #EDE8DE; }

.cells { list-style: none; padding: 0; display: grid; gap: 22px; }
.cells li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 6px 14px; align-items: start; }
.cells li > *:not(.key) { grid-column: 2; }
.cells li p { color: var(--muted); }
.cells .key { grid-row: 1 / 3; width: 22px; height: 16px; margin-top: 0.35em; border-radius: 8px; }
.cells .key.clast { background: var(--accent); }
.cells .key.blast { width: 13px; height: 13px; margin-left: 4px; border-radius: 50%; background: var(--ink); }
.cells .key.cyte { width: 18px; height: 12px; border: 2px solid var(--muted); border-radius: 50%; }
@media (max-width: 860px) { .remodel { grid-template-columns: 1fr; } }

/* ---------- Page Tools (assets/tools.js) ---------- */
.tool {
  --al-card: var(--surface);
  --al-line: var(--line);
  --al-field: var(--bg);
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tool {
    --al-card: var(--surface-2);
    --al-line: var(--line);
    --al-field: var(--bg);
    background: var(--surface);
  }
}
:root[data-theme="dark"] .tool {
  --al-card: var(--surface-2);
  --al-line: var(--line);
  --al-field: var(--bg);
  background: var(--surface);
}
.tool input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 32px; }

.al-plan { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; padding: 16px 20px; border-radius: var(--r-row); border: 1px solid var(--al-line); background: var(--al-card); }
.al-plan > div:first-child { display: grid; gap: 2px; flex: 1 1 280px; }
.al-plan-b { display: flex; flex-wrap: wrap; gap: 10px; }
.al-plan-b .button { min-height: 44px; padding: 0 20px; }
.al-plan-b .button:not(.primary) { background: var(--al-field); }
.al-out { display: grid; gap: 14px; }
.al-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 280px); gap: 20px 32px; align-items: end; padding: clamp(22px, 3.5vw, 36px); border-radius: var(--r); background: var(--accent); color: var(--on-accent); }
.al-main { display: grid; gap: 4px; }
.al-eyebrow { font-weight: 600; }
.al-num { font-size: clamp(2.75rem, 8vw, 4.5rem); line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.al-num-text { font-size: clamp(1.75rem, 4.5vw, 2.5rem); line-height: 1.15; }
.al-day { display: grid; gap: 10px; }
.al-day strong { font-size: var(--t-lead); font-variant-numeric: tabular-nums; }
.al-bar { height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--on-accent) 24%, transparent); overflow: hidden; }
.al-bar span { display: block; height: 100%; border-radius: inherit; background: var(--on-accent); }
.al-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.al-strip li { display: flex; align-items: center; justify-content: center; min-height: 42px; border: 2px solid var(--al-line); border-radius: 10px; font-size: 0.9375rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.al-strip .is-past { border-color: var(--al-line); background: var(--al-field); color: var(--muted); }
.al-strip .is-now { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.al-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.al-card { display: grid; gap: 6px; align-content: start; padding: 20px; border-radius: var(--r-row); border: 1px solid var(--al-line); background: var(--al-card); }
.al-card strong { font-size: 1.375rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.al-k { font-size: 0.9375rem; color: var(--muted); }
.al-sub, .al-rule, .al-empty { margin: 0; font-size: 0.9375rem; color: var(--muted); }
.al-empty { padding: 20px; border-radius: var(--r-row); border: 1px solid var(--al-line); background: var(--al-card); font-size: 1rem; color: var(--ink); }
.al-visit { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 28px; margin-top: 14px; padding: 20px; border-radius: var(--r-row); border: 1px solid var(--al-line); background: var(--al-card); }
.al-visit.is-warn, .al-tools > .is-warn { border-color: var(--clay); box-shadow: inset 0 0 0 1px var(--clay); }
.al-visit strong { font-size: 1.125rem; }
.al-v-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.al-v-in input { width: auto; min-width: 190px; }
.al-link { min-height: 44px; padding: 0; border: 0; background: none; color: inherit; font: 600 0.9375rem var(--font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.al-change { margin-top: 10px; font-weight: 600; }
.al-change a { color: inherit; text-decoration: underline; }
.al-sample { display: grid; gap: 14px; opacity: 0.55; pointer-events: none; }
.al-sample-tag { font-size: 0.9375rem; font-weight: 600; }
.tool-top .head { margin-bottom: clamp(24px, 3vw, 36px); }
.tool-top h1 { font-size: var(--t-display); }
.al-office { margin-top: clamp(24px, 3.5vw, 40px); }
.al-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.al-tools > div { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 20px; border-radius: var(--r-row); border: 1px solid var(--al-line); background: var(--al-card); }
.al-tools strong { font-size: 1.125rem; }
.al-step { display: inline-flex; align-items: center; gap: 6px; }
.al-step button { width: 46px; height: 46px; border: 1px solid var(--al-line); border-radius: 12px; background: var(--al-field); color: var(--ink); font: 600 1.375rem/1 var(--font); cursor: pointer; }
.al-step button:disabled { opacity: 0.4; cursor: default; }
.al-tune-n { min-width: 92px; text-align: center; font-weight: 600; }
.al-send { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.al-send .button { padding: 0 14px; }
.al-send .button:not(.primary) { background: var(--al-card); }
.al-all { margin-top: 14px; border-radius: var(--r-row); border: 1px solid var(--al-line); background: var(--al-card); }
.al-all summary { padding: 16px 20px; font-weight: 600; cursor: pointer; }
.al-all-rows { display: grid; margin: 0; padding: 0 20px 14px; list-style: none; }
.al-all-rows li { display: grid; grid-template-columns: minmax(84px, auto) minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--al-line); }
.al-all-rows span { font-size: 0.9375rem; color: var(--muted); }
.al-all-rows .is-now strong { color: var(--accent); }
.al-setup { margin: 0 0 14px; border-radius: var(--r-row); border: 1px solid var(--al-line); background: var(--al-card); }
.al-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 20px; }
.al-form label { display: grid; gap: 6px; align-content: end; font-size: 1rem; font-weight: 600; }
.al-form .al-wide { grid-column: 1 / -1; }
.al-dc { display: none !important; }
.is-custom .al-dc { display: grid !important; }
.al-range { display: grid; gap: 6px; font-size: 1rem; font-weight: 600; }
.al-range > div { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; font-weight: 500; }
.al-sched { display: grid; gap: 4px; padding: 4px 20px 20px; }
.al-s-rows { display: grid; margin-top: 10px; }
.al-s-row { display: grid; grid-template-columns: minmax(84px, auto) minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--al-line); }
.al-s-row.is-now { border-radius: 10px; box-shadow: inset 0 0 0 2px var(--accent); }
.al-s-d { font-size: 0.9375rem; color: var(--muted); }
.al-s-row label { display: flex; align-items: center; gap: 8px; font-size: 0.9375rem; }
.al-s-row input { width: 72px; padding: 0 10px; }
.al-range input, .al-form input, .al-form select, .al-v-in input, .al-s-row input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--al-field);
  color: var(--ink);
  font: 500 1rem var(--font);
}
.al-rule { margin-top: 20px; max-width: 72ch; }
@media (max-width: 760px) { .al-cards, .al-hero { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .al-s-row { grid-template-columns: minmax(0, 1fr) auto; } .al-s-d { grid-column: 1; grid-row: 2; } .al-s-row label { grid-column: 2; grid-row: 1 / 3; } }
@media (max-width: 520px) { .al-send { grid-template-columns: 1fr; } }
@media (max-width: 380px) { .al-form { grid-template-columns: 1fr; } }

/* Food checker & Teeth by age */
.food-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.food-chip { min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 var(--t-small) var(--font); cursor: pointer; }
.food-chip:hover { border-color: var(--ink); }
.food-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.food-answer { display: grid; gap: 6px; align-content: start; min-height: 112px; margin-top: 18px; padding: 18px 20px; border-radius: var(--r-row); border: 1px solid var(--line); background: var(--surface); }
.food-answer strong { font-size: var(--t-lead); }
.food-answer p, .food-hint { color: var(--muted); }
.food-verdict { justify-self: start; padding: 4px 12px; border-radius: 999px; font-size: var(--t-small); font-weight: 600; color: #fff; }
.food-answer[data-verdict="yes"] .food-verdict { background: #1E6B47; }
.food-answer[data-verdict="cut"] .food-verdict { background: #0B6884; }
.food-answer[data-verdict="careful"] .food-verdict { background: #8D5008; }
.food-answer[data-verdict="skip"] .food-verdict { background: #9B2C2C; }

.ta-ctl { display: grid; gap: 8px; font-weight: 600; }
.ta-svg { display: block; width: 100%; max-width: 380px; height: auto; margin: 16px auto 0; }
.ta-svg .tooth rect { fill: #FBFAF6; stroke: #13222B; stroke-width: 1.5; transition: fill 0.25s; }
.ta-svg .g { fill: none; stroke: #8D9BA3; stroke-width: 1.1; stroke-linecap: round; }
.ta-svg circle.g { fill: #8D9BA3; stroke: none; }
.ta-svg [data-s="baby"] rect { fill: var(--bg-alt); stroke: var(--muted); }
.ta-svg [data-s="fresh"] rect { fill: var(--accent); stroke: var(--accent); }
.ta-svg [data-s="fresh"] .g { stroke: var(--on-accent); }
.ta-svg [data-s="fresh"] circle.g { fill: var(--on-accent); }
.ta-svg [data-s="none"] rect { fill: none; stroke: var(--muted); stroke-dasharray: 3 3; opacity: 0.6; }
.ta-svg [data-s="none"] .g { display: none; }
.ta-svg text { font: 600 13px var(--font); fill: var(--muted); text-anchor: middle; }
.ta-svg .ta-side { font-size: 11px; font-weight: 500; }
.ta-svg .ta-r { text-anchor: start; }
.ta-svg .ta-left { text-anchor: end; }
.ta-text { margin-top: 18px; }
.ta-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 0 0; padding: 0; list-style: none; font-size: var(--t-small); }
.ta-legend li::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 6px; border: 2px solid var(--ink); border-radius: 4px; background: #fff; vertical-align: -2px; }
.ta-legend li[data-s="baby"]::before { border-color: var(--muted); background: var(--bg-alt); }
.ta-legend li[data-s="fresh"]::before { border-color: var(--accent); background: var(--accent); }
.ta-legend li[data-s="none"]::before { border-style: dashed; border-color: var(--muted); background: transparent; }
.ta-note { margin-top: 8px; font-size: var(--t-small); color: var(--muted); }

/* ---------- Privacy & 404 ---------- */
.policy-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.policy-aside {
  position: sticky;
  top: calc(var(--header-h, 76px) + 24px);
  display: grid;
  gap: 14px;
  padding: clamp(20px, 2.6vw, 28px);
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
}
.policy-aside h2 { font-size: var(--t-lead); font-family: var(--font); font-weight: 600; }
.policy-aside p { font-size: var(--t-small); color: var(--muted); }
.policy { display: grid; gap: 14px; max-width: 68ch; }
.policy section {
  display: grid;
  gap: 8px;
  padding: clamp(18px, 2.4vw, 26px);
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
}
.policy h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-size: var(--t-lead);
  font-weight: 600;
}
.policy h2::before {
  content: "";
  flex: 0 0 auto;
  width: 11px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
}
.policy p { color: var(--muted); }
.policy a { color: var(--accent); font-weight: 600; }
@media (max-width: 900px) {
  .policy-grid { grid-template-columns: 1fr; }
  .policy-aside { position: static; }
}

.lost { display: grid; place-items: center; min-height: 74svh; text-align: center; padding: clamp(44px, 7vw, 96px) var(--gutter); }
.lost-card {
  display: grid;
  gap: 22px;
  justify-items: center;
  width: min(680px, 100%);
  min-width: 0;
  padding: clamp(24px, 4.5vw, 52px);
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
}
.lost .wire-band { width: min(460px, 100%); -webkit-mask-image: url("sculpture-missing.svg"); mask-image: url("sculpture-missing.svg"); }
@media (max-width: 760px) {
  .lost { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
}
.lost h1 { font-size: var(--t-display); }
.lost p { max-width: 46ch; color: var(--muted); }
.lost .actions { justify-content: center; }
.lost-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  width: 100%;
}
.lost-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: var(--t-small);
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.lost-links a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* ---------- pop.js Extras & Reduced Motion ---------- */
.pop-toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  width: max-content;
  max-width: min(420px, calc(100vw - 32px));
  padding: 13px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: var(--t-small);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.pop-toast.show { opacity: 1; transform: translate(-50%, 0); }
.tooth-rain { position: fixed; inset: 0; z-index: 110; pointer-events: none; overflow: hidden; }
.tooth-rain i {
  position: absolute;
  top: -40px;
  width: 28px;
  height: 28px;
  background: var(--ink);
  -webkit-mask: url("tooth.svg") center/contain no-repeat;
  mask: url("tooth.svg") center/contain no-repeat;
  animation: tooth-fall linear forwards;
}
.tooth-rain i:nth-child(3n) { background: var(--accent); }
@keyframes tooth-fall { to { transform: translateY(calc(100vh + 80px)) rotate(var(--spin, 240deg)); } }

.reveal [data-rise] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease);
  transition-delay: calc(min(var(--i, 0), 2) * 30ms);
}
.reveal .is-in [data-rise], .reveal [data-rise].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal [data-rise] { opacity: 1; transform: none; }
}

/* ===== Phase 5: Service Pillars (Orthodontics & General Dentistry) ===== */
.eyebrow { justify-self: start; }
.on-night .eyebrow {
  background: var(--night-2);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--on-night);
}
.on-night .eyebrow::before { background: var(--accent); }

.on-night .direct-card {
  background: var(--night-2);
  border-color: rgba(255, 255, 255, 0.16);
  border-left-color: var(--accent);
}
.on-night .direct-head .jdrc-mark,
.on-night .direct-head h3 { color: var(--on-night); }
.on-night .direct-card p { color: var(--on-night-2); }
.on-night .direct-actions a { color: var(--on-night); }
.on-night .direct-actions a:hover { color: #9ED8EC; }

/* Tactile jump pills & compare filter toggles */
.jump a {
  gap: 8px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.jump a:hover { transform: translateY(-1px); border-color: var(--accent); }
.jump a:active { transform: scale(0.98); }
.jump a.is-active { box-shadow: inset 0 0 0 1px var(--ink); }
@media (max-width: 600px) {
  .jump-inner { gap: 6px; padding: 8px 0; }
  .jump a { min-height: 44px; padding: 0 14px; font-size: 0.84375rem; }
}

.compare-toggle button {
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.compare-toggle button:hover { transform: translateY(-1px); border-color: var(--ink); }
.compare-toggle button:active { transform: scale(0.98); }

/* Responsive comparison mobile labels (translatable DOM nodes instead of data-label) */
.comparison .cmp-col { display: none; }
@media (max-width: 700px) {
  .comparison td::before { content: none; display: none; }
  .comparison .cmp-col {
    display: block;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 2px;
  }
}

/* Care-guide router cards inside Orthodontics sections */
.guide-callout {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: var(--r-row);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--surface-2);
}
.field-paper .guide-callout { background: var(--bg); }
.guide-callout > strong {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: var(--ink);
}
.guide-callout > strong::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 9px;
  border-radius: 2.5px;
  background: var(--accent);
}
.guide-callout > p {
  font-size: var(--t-small);
  color: var(--muted);
  max-width: 62ch;
}
.guide-callout-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}
.guide-callout-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}
.guide-callout-links a::after {
  content: "";
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}
.guide-callout-links a:hover { color: var(--accent-2); }
.guide-callout-links a:hover::after { transform: translateX(3px) rotate(45deg); }
.on-night .guide-callout {
  background: var(--night-2);
  border-color: rgba(255, 255, 255, 0.14);
  border-left-color: var(--accent);
}
.on-night .guide-callout > strong { color: var(--on-night); }
.on-night .guide-callout > p { color: var(--on-night-2); }
.on-night .guide-callout-links a { color: var(--on-night); }
.on-night .guide-callout-links a:hover { color: #9ED8EC; }

/* Interactive band-color mini card inside #braces */
.braces-mini {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--bg);
}
.braces-mini-head { display: grid; gap: 3px; }
.braces-mini-head strong { font-size: 1rem; font-weight: 600; color: var(--ink); }
.braces-mini-head span { font-size: var(--t-small); color: var(--muted); }

/* Bite Slider presets, alignment indicator & occlusion goal card */
.bite-lo { transition: transform 0.28s var(--ease); }
.bite-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.bite-preset {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font: 600 var(--t-small)/1 var(--font);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.18s var(--ease);
}
.bite-preset:hover { border-color: var(--accent); transform: translateY(-1px); }
.bite-preset:active { transform: scale(0.97); }
.bite-preset[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
[data-bite-slider][data-aligned="true"] .bite-cusp {
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px rgba(11, 104, 132, 0.34);
}
.bite-goal {
  padding: clamp(20px, 2.6vw, 28px);
  border-radius: var(--r);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--surface);
}

/* Digital planning lightbox polish */
.records figure {
  padding: 14px;
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--night-2);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease);
}
.records figure:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
}

/* Fit Quiz 5-bracket archwire stepper */
.quiz-head-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.quiz-steps {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 4px 2px;
}
.quiz-steps::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: 2px;
  background: var(--line-strong);
  transform: translateY(-50%);
}
.quiz-steps span {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 11px;
  border-radius: 3px;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  transition: transform 0.24s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.quiz-steps span.is-done {
  background: var(--accent);
  border-color: var(--accent);
}
.quiz-steps span.is-current {
  border-color: var(--accent);
  background: var(--bg);
  transform: scale(1.22);
}
.quiz.is-complete .quiz-steps::before { background: var(--accent); }
.quiz.is-complete .quiz-steps span {
  background: var(--accent);
  border-color: var(--accent);
}
.quiz.is-complete .quiz-steps span:last-child {
  transform: rotate(45deg) scale(1.12);
}

/* Teeth-by-Age quick-tap age strip */
.ta-steps {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.ta-step {
  min-height: 38px;
  padding: 0 4px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--al-card, var(--surface));
  color: var(--ink);
  font: 600 var(--t-small)/1 var(--font);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.ta-step:hover { border-color: var(--accent); transform: translateY(-1px); }
.ta-step:active { transform: scale(0.96); }
.ta-step[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
@media (max-width: 420px) {
  .ta-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Done here vs. Referred out Scope Matrix (General Dentistry) */
.scope-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 2.5vw, 28px);
  align-items: stretch;
}
.scope-card {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--bg);
}
.scope-card.scope-here { border-top: 4px solid var(--accent); }
.scope-card.scope-refer {
  background: var(--night);
  border-color: var(--line);
  border-top: 4px solid var(--clay);
  color: var(--on-night);
}
.scope-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}
.scope-tag::before {
  content: "";
  width: 9px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
}
.scope-refer .scope-tag { color: #F2B59F; }
.scope-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}
.scope-card .brackets > li { color: var(--muted); }
.scope-card .brackets > li strong { color: var(--ink); }
.scope-card .brackets > li a { font-weight: 600; color: var(--accent); }
.scope-refer .brackets > li { color: var(--on-night-2); }
.scope-refer .brackets > li::before { background: #F2B59F; }
.scope-refer .brackets > li strong { color: var(--on-night); }
.scope-foot {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: var(--t-small);
  color: var(--on-night-2);
}
@media (max-width: 860px) {
  .scope-matrix { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .jump a:hover,
  .jump a:active,
  .compare-toggle button:hover,
  .compare-toggle button:active,
  .guide-callout-links a:hover::after,
  .bite-preset:hover,
  .bite-preset:active,
  .records figure:hover,
  .ta-step:hover,
  .ta-step:active {
    transform: none;
  }
}

/* ===== Phase 6: Patient Care Guides & Aligner Day Tracker ===== */

/* Care-guide hero image framing */
.hero-photo img[src*="retainer-essix"] { object-position: 50% 50%; }
.hero-photo img[src*="tracking-seated"] { object-position: 50% 45%; }
.hero-photo img[src*="braces-crowded"] { object-position: 50% 48%; }

/* Braces care two-photo gallery (replaces 3-col .records-light after removing frontal ceph X-ray) */
.records-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.records-pair figure {
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}
.field-paper .records-pair figure { background: var(--bg); }
.records-pair img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}
.records-pair img[src*="braces-care"] { object-position: 50% 34%; }
.records-pair img[src*="braces-sculpture"] { object-position: 50% 50%; }
.records-pair figcaption {
  padding: 12px 16px;
  font-size: var(--t-small);
  color: var(--muted);
}
@media (max-width: 640px) { .records-pair { grid-template-columns: 1fr; } }

/* Boxed everyday-care cards & semantic Yes/No cues */
.pair.cards > article:not(.yes):not(.no) {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: clamp(20px, 2.8vw, 32px);
}
.field-paper .pair.cards > article:not(.yes):not(.no),
.field-paper .pair.cards > article.yes {
  background: var(--bg);
}
.pair.cards > article.yes {
  border-top: 4px solid #1E6B47;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pair.cards > article.yes { border-top-color: #48BB78; }
}
:root[data-theme="dark"] .pair.cards > article.yes { border-top-color: #48BB78; }
.pair.cards > article.no {
  border-top: 4px solid var(--clay);
}

/* Band-color note inside braces-card */

/* "Can I eat this?" tactile chips & semantic verdict reveal */
.food-chip {
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease);
}
.food-chip:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}
.food-chip:active {
  transform: scale(0.97);
}
.food-answer {
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease);
}
.food-answer[data-verdict="yes"] { border-left: 4px solid #1E6B47; }
.food-answer[data-verdict="cut"] { border-left: 4px solid var(--accent); }
.food-answer[data-verdict="careful"] { border-left: 4px solid #8D5008; }
.food-answer[data-verdict="skip"] { border-left: 4px solid #9B2C2C; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .food-answer[data-verdict="yes"] { border-left-color: #48BB78; }
  :root:not([data-theme="light"]) .food-answer[data-verdict="careful"] { border-left-color: #E3A048; }
  :root:not([data-theme="light"]) .food-answer[data-verdict="skip"] { border-left-color: #EB6B6B; }
}
:root[data-theme="dark"] .food-answer[data-verdict="yes"] { border-left-color: #48BB78; }
:root[data-theme="dark"] .food-answer[data-verdict="careful"] { border-left-color: #E3A048; }
:root[data-theme="dark"] .food-answer[data-verdict="skip"] { border-left-color: #EB6B6B; }
@keyframes food-pop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.food-answer.is-fresh > * {
  animation: food-pop 0.22s var(--ease) both;
}

/* Aligner care: prominent top Aligner Day Tracker spotlight card */
.tracker-band {
  padding-block: clamp(24px, 3.2vw, 40px);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.tracker-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(240px, 5fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--r);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--surface);
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease);
}
.tracker-spotlight:hover {
  border-color: var(--line-strong);
  border-left-color: var(--accent);
}
.tracker-spotlight-copy {
  display: grid;
  gap: 12px;
  justify-items: start;
}
.tracker-spotlight-copy h2 {
  font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.25rem);
}
.tracker-spotlight-copy p {
  color: var(--muted);
  max-width: 58ch;
}
.tracker-preview {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border-radius: var(--r-row);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.tracker-preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: var(--t-small);
  font-variant-numeric: tabular-nums;
}
.tracker-preview-head strong { color: var(--ink); font-weight: 700; }
.tracker-preview-head span { color: var(--muted); }
.tracker-preview-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.tracker-preview-strip span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 9px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: transform 0.22s var(--ease);
}
.tracker-preview-strip .is-past {
  background: var(--bg);
  color: var(--muted);
}
.tracker-preview-strip .is-now {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.tracker-spotlight:hover .tracker-preview-strip .is-now {
  transform: translateY(-2px) scale(1.04);
}
.tracker-preview-bar {
  height: 7px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.tracker-preview-bar i {
  display: block;
  width: 58%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
@media (max-width: 860px) {
  .tracker-spotlight { grid-template-columns: 1fr; }
}

/* 3-State Tracking cards & Chewies callout (fixes light-mode contrast on .on-night) */
.on-night .tracking figure {
  gap: 0;
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--night-2);
  overflow: hidden;
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease);
}
.on-night .tracking figure:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.28);
}
.on-night .tracking img {
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.on-night .tracking figcaption {
  padding: clamp(18px, 2.2vw, 24px);
  gap: 8px;
}
.on-night .tracking figcaption p:not(.credit) {
  color: var(--on-night-2);
}
.tracking .status {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #1E6B47;
  color: #FFFFFF;
}
.tracking figure[data-track="good"] .status { background: #1E6B47; color: #FFFFFF; }
.tracking figure[data-track="mild"] .status { background: #8D5008; color: #FFFFFF; }
.tracking figure[data-track="off"] .status { background: #9B2C2C; color: #FFFFFF; }

.chewie-card {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 12px 32px;
  align-items: start;
  margin-top: clamp(24px, 3vw, 36px);
  padding: clamp(20px, 2.8vw, 30px);
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 4px solid var(--accent);
  background: var(--night-2);
}
.chewie-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--on-night);
}
.chewie-card h3::before {
  content: "";
  flex: 0 0 auto;
  width: 11px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
}
.chewie-card p { color: var(--on-night-2); max-width: 66ch; }
@media (max-width: 820px) { .chewie-card { grid-template-columns: 1fr; } }

/* Troubleshooting & Call Now vs. Wait triage polish */
.trouble > div {
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.trouble > div:hover {
  border-color: var(--line-strong);
  transform: translateX(3px);
}
.trouble dt {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.trouble dt::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 9px;
  border-radius: 2.5px;
  background: var(--accent);
  transform: translateY(-1px);
}
.call-grid > article {
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.call-grid > article:hover {
  border-color: var(--line-strong);
}
.call-grid > article.call-now {
  border-top: 4px solid var(--clay);
}
.call-grid > article.call-now .brackets > li::before {
  background: var(--clay);
}
.call-grid > article.call-wait {
  border-top: 4px solid var(--accent);
}

/* Retainer care: Porcelain & Archwire bone-remodeling SVG & interactive cell spotlight */
.remodel svg {
  background: var(--surface);
}
.remodel .bone {
  fill: #EFE7DA;
  stroke: var(--line-strong);
  stroke-width: 1.5;
}
.remodel .trabeculae {
  fill: none;
  stroke: #DDD0BC;
  stroke-width: 1.4;
  stroke-linecap: round;
}
.remodel .socket {
  fill: #DCE9EE;
}
.remodel .pdl {
  fill: none;
  stroke: #7D9AA8;
  stroke-width: 1.4;
  stroke-linecap: round;
}
.remodel .osteoid {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4.5;
  stroke-linecap: round;
  opacity: 0.38;
}
.remodel .tooth {
  fill: #FCF9F2;
  stroke: var(--ink);
  stroke-width: 2.4;
}
.remodel .root-tone {
  fill: #F2E8D5;
}
.remodel .cej {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.4;
}
.remodel .gum {
  fill: #E2A298;
  stroke: #BD766B;
  stroke-width: 1.2;
}
.remodel .clast {
  fill: var(--clay);
}
.remodel .clast-dots {
  fill: #FFF8F4;
}
.remodel .blast {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 1.2;
}
.remodel .cyte ellipse {
  fill: var(--surface);
  stroke: var(--ink);
  stroke-width: 1.8;
}
.remodel .cyte path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linecap: round;
}
.remodel .svg-cell {
  transition: opacity 0.22s var(--ease), filter 0.22s var(--ease);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .remodel .bone { fill: #142530; stroke: #314E60; }
  :root:not([data-theme="light"]) .remodel .trabeculae { stroke: #1E3645; }
  :root:not([data-theme="light"]) .remodel .socket { fill: #1F3B4B; }
  :root:not([data-theme="light"]) .remodel .pdl { stroke: #6C91A4; }
  :root:not([data-theme="light"]) .remodel .tooth { fill: #F0EBE1; stroke: #0D1920; }
  :root:not([data-theme="light"]) .remodel .root-tone { fill: #E2D9C7; }
  :root:not([data-theme="light"]) .remodel .cej { stroke: #BFB4A0; }
  :root:not([data-theme="light"]) .remodel .gum { fill: #8D4F4C; stroke: #B26E6A; }
  :root:not([data-theme="light"]) .remodel .clast-dots { fill: #1C0F0B; }
  :root:not([data-theme="light"]) .remodel .cyte ellipse { fill: var(--surface-2); stroke: var(--ink); }
}
:root[data-theme="dark"] .remodel .bone { fill: #142530; stroke: #314E60; }
:root[data-theme="dark"] .remodel .trabeculae { stroke: #1E3645; }
:root[data-theme="dark"] .remodel .socket { fill: #1F3B4B; }
:root[data-theme="dark"] .remodel .pdl { stroke: #6C91A4; }
:root[data-theme="dark"] .remodel .tooth { fill: #F0EBE1; stroke: #0D1920; }
:root[data-theme="dark"] .remodel .root-tone { fill: #E2D9C7; }
:root[data-theme="dark"] .remodel .cej { stroke: #BFB4A0; }
:root[data-theme="dark"] .remodel .gum { fill: #8D4F4C; stroke: #B26E6A; }
:root[data-theme="dark"] .remodel .clast-dots { fill: #1C0F0B; }
:root[data-theme="dark"] .remodel .cyte ellipse { fill: var(--surface-2); stroke: var(--ink); }

.cells { gap: 12px; }
.cells li {
  padding: 16px 18px;
  border-radius: var(--r-row);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.cells li:hover {
  border-color: var(--line-strong);
  transform: translateX(3px);
}
.cells li[data-cell="clast"]:hover { box-shadow: inset 3px 0 0 var(--clay); }
.cells li[data-cell="blast"]:hover { box-shadow: inset 3px 0 0 var(--accent); }
.cells li[data-cell="cyte"]:hover { box-shadow: inset 3px 0 0 var(--ink); }
.cells .key.clast { background: var(--clay); }
.cells .key.blast { background: var(--accent); }
.cells .key.cyte { border-color: var(--ink); background: var(--surface-2); }

.remodel:has(.cells li[data-cell="clast"]:hover) .svg-cell:not(.svg-clast),
.remodel:has(.cells li[data-cell="blast"]:hover) .svg-cell:not(.svg-blast),
.remodel:has(.cells li[data-cell="cyte"]:hover) .svg-cell:not(.svg-cyte) {
  opacity: 0.24;
}

/* Retainer care: Essix & Hawley in/out structured cards */
.hawley-card {
  display: grid;
  gap: 16px;
  margin-top: var(--gap);
  padding: clamp(20px, 2.8vw, 30px);
  border-radius: var(--r);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--surface);
}
.hawley-head {
  display: grid;
  gap: 4px;
}
.hawley-head p {
  font-size: var(--t-small);
  color: var(--muted);
}
.hawley-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.hawley-grid > div {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 16px 18px;
  border-radius: var(--r-row);
  border: 1px solid var(--line);
  background: var(--bg);
}
.hawley-grid strong {
  font-size: 1rem;
  color: var(--ink);
}
.hawley-grid p {
  font-size: var(--t-small);
  color: var(--muted);
}
@media (max-width: 760px) { .hawley-grid { grid-template-columns: 1fr; } }

/* Aligner tracker: top back link, dark-mode contrast & mobile dock clearance */
.page-tracker .tool-top {
  padding-top: clamp(20px, 3vw, 44px);
}
.tracker-top-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--t-small);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.back-link::before {
  content: "";
  width: 8px;
  height: 8px;
  border-bottom: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}
.back-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.back-link:hover::before {
  transform: translateX(-3px) rotate(45deg);
}

.tool input,
.tool select {
  color-scheme: light dark;
}
:root[data-theme="dark"] .tool input,
:root[data-theme="dark"] .tool select {
  color-scheme: dark;
}
:root[data-theme="light"] .tool input,
:root[data-theme="light"] .tool select {
  color-scheme: light;
}
.tool input:hover,
.tool select:hover,
.al-step button:not(:disabled):hover {
  border-color: var(--ink);
}
.al-step button:not(:disabled) {
  transition: transform 0.16s var(--ease), border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.al-step button:not(:disabled):active {
  transform: scale(0.95);
}
.al-bar span {
  transition: width 0.32s var(--ease);
}
.al-strip li {
  border-color: var(--line-strong);
  background: var(--al-card);
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease);
}
.al-strip .is-past {
  border-color: var(--line-strong);
  background: var(--al-field);
  color: var(--muted);
}
.al-strip .is-now {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent);
}
.al-sample {
  opacity: 0.88;
  padding: 16px;
  border-radius: var(--r-row);
  border: 1px dashed var(--line-strong);
  background: var(--al-field);
}
.al-sample-tag {
  justify-self: start;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--al-card);
  color: var(--ink);
  font-size: 0.8125rem;
}

@media (max-width: 760px) {
  .mobile-call.is-avoiding-input,
  .page-tracker:has([data-aligner-tracker] :is(input, select, textarea):focus) .mobile-call {
    transform: translateY(calc(100% + 28px));
    opacity: 0;
    pointer-events: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .food-answer.is-fresh > * { animation: none !important; }
}

.intro-figure.small { max-width: 640px; margin-inline: auto; }

/* =====================================================================
   v18.26 refresh: guide tints, colored pills, sunflower accent,
   "parts" diagrams that light up, seasons, gentle motion
   ===================================================================== */
:root {
  --sun: #F4B73F;
  --on-sun: #2B1D00;
  --tooth: #FBF8F1;
  --gum: #E4A8A1;
  --pc1: #2B86B3; --pc2: #F4B73F; --pc3: #D2693A; --pc4: #14A3A0; --pc5: #7A5BC4; --pc6: #E85AA0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --tooth: #EDE8DE; --gum: #8E4F52; }
}
:root[data-theme="dark"] { --tooth: #EDE8DE; --gum: #8E4F52; }

/* One tint per guide, so every page has its own mood. */
body { --tint-strong: #2B86B3; }
body[data-tint="home"] { --tint-strong: #F4B73F; }
body[data-tint="ortho"] { --tint-strong: #D2693A; }
body[data-tint="general"] { --tint-strong: #1F9A9A; }
body[data-tint="braces"] { --tint-strong: #2B86B3; }
body[data-tint="aligners"] { --tint-strong: #2E9C6E; }
body[data-tint="retainers"] { --tint-strong: #B5832B; }
body[data-tint="tracker"] { --tint-strong: #7A5BC4; }
body[data-tint="privacy"] { --tint-strong: #5C7C8A; }
.hero-card {
  background: color-mix(in srgb, var(--tint-strong) 15%, var(--surface));
  border-color: color-mix(in srgb, var(--tint-strong) 38%, var(--line));
}
.eyebrow {
  background: color-mix(in srgb, var(--tint-strong) 20%, var(--surface));
  border-color: color-mix(in srgb, var(--tint-strong) 50%, var(--line));
}
.eyebrow::before { background: var(--tint-strong); border-radius: 50%; width: 9px; height: 9px; }

/* Colored jump pills: each one gets its own dot and color when active. */
.jump a { --dot: var(--pc1); gap: 8px; }
.jump a::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dot); flex: 0 0 auto; }
.jump a:nth-child(6n+2) { --dot: var(--pc2); }
.jump a:nth-child(6n+3) { --dot: var(--pc3); }
.jump a:nth-child(6n+4) { --dot: var(--pc4); }
.jump a:nth-child(6n+5) { --dot: var(--pc5); }
.jump a:nth-child(6n+6) { --dot: var(--pc6); }
.jump a:hover { border-color: var(--dot); }
.jump a.is-active {
  background: color-mix(in srgb, var(--dot) 26%, var(--surface));
  border-color: var(--dot);
  color: var(--ink);
  box-shadow: none;
}
.jump a[href="#book"] { background: var(--sun); border-color: var(--sun); color: var(--on-sun); font-weight: 600; }
.jump a[href="#book"]::before { background: var(--on-sun); }
.jump a[href="#book"].is-active { background: var(--sun); box-shadow: 0 0 0 2px color-mix(in srgb, var(--sun) 45%, transparent); }

/* Fact rows get small colored dots. */
.facts > div:nth-child(4n+1) { --fd: var(--pc1); }
.facts > div:nth-child(4n+2) { --fd: var(--pc2); }
.facts > div:nth-child(4n+3) { --fd: var(--pc4); }
.facts > div:nth-child(4n+4) { --fd: var(--pc3); }
.facts dt { display: inline-flex; align-items: center; gap: 7px; }
.facts dt::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fd, var(--pc1)); flex: 0 0 auto; }

/* Sunflower underline on text links. */
main a:not([class]):hover, .footer-links a:hover { text-decoration-line: underline; text-decoration-thickness: 2px; text-decoration-color: var(--sun); text-underline-offset: 3px; }

/* Numbers line up. */
.facts dd, .mobile-call, a[href^="tel:"], a[href^="sms:"], [data-aligner-tracker], [class*="timer"] { font-variant-numeric: tabular-nums; }

/* ---------- Parts diagrams: hover (or tap) a name to light it up ---------- */
.parts-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 56px); align-items: center; margin-top: clamp(20px, 3vw, 36px); }
@media (max-width: 860px) { .parts-grid { grid-template-columns: 1fr; } }
.parts-grid figure { margin: 0; }
.parts-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.parts-list li {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px 14px; align-items: start;
  padding: 16px 18px; border-radius: var(--r-row); border: 1px solid var(--line); background: var(--surface);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
  cursor: default; outline: none;
}
.parts-list li > *:not(.key) { grid-column: 2; }
.parts-list li p { color: var(--muted); margin: 0; }
.parts-list li h3 { margin: 0; }
.parts-list .key { grid-row: 1 / 3; width: 22px; height: 16px; margin-top: 0.35em; border-radius: 999px; background: var(--k, var(--accent)); }
.parts-list li[data-part="bracket"], .parts-list li[data-part="tray"] { --k: var(--pc1); }
.parts-list li[data-part="wire"], .parts-list li[data-part="attach"] { --k: var(--pc2); }
.parts-list li[data-part="tie"], .parts-list li[data-part="chewie"] { --k: var(--pc3); }
.parts-list li[data-part="tube"] { --k: var(--pc5); }
.parts-list li:is(:hover, :focus, :focus-visible) {
  transform: translateX(4px); border-color: var(--k);
  background: color-mix(in srgb, var(--k) 12%, var(--surface));
  box-shadow: inset 4px 0 0 var(--k);
}
/* Photo spotlight: the photo dims and the named part's rings light up. */
.spot-photo { position: relative; overflow: hidden; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.spot-photo img { display: block; width: 100%; height: auto; transition: filter 0.35s var(--ease); }
.spots { position: absolute; inset: 0; pointer-events: none; }
.spot {
  position: absolute; border-radius: 999px; opacity: 0;
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tint-strong) 85%, transparent), 0 0 18px 4px color-mix(in srgb, var(--tint-strong) 60%, transparent);
  -webkit-backdrop-filter: brightness(1.75) saturate(1.3); backdrop-filter: brightness(1.75) saturate(1.3);
  transform: scale(0.9); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.parts:has(li[data-part="bracket"]:is(:hover, :focus)) .spot-photo img,
.parts:has(li[data-part="wire"]:is(:hover, :focus)) .spot-photo img,
.parts:has(li[data-part="tie"]:is(:hover, :focus)) .spot-photo img,
.parts:has(li[data-part="tube"]:is(:hover, :focus)) .spot-photo img,
.parts:has(li[data-part="tray"]:is(:hover, :focus)) .spot-photo img,
.parts:has(li[data-part="attach"]:is(:hover, :focus)) .spot-photo img { filter: brightness(0.58) saturate(0.75); }
.parts:has(li[data-part="bracket"]:is(:hover, :focus)) .spot-bracket,
.parts:has(li[data-part="wire"]:is(:hover, :focus)) .spot-wire,
.parts:has(li[data-part="tie"]:is(:hover, :focus)) .spot-tie,
.parts:has(li[data-part="tube"]:is(:hover, :focus)) .spot-tube,
.parts:has(li[data-part="tray"]:is(:hover, :focus)) .spot-tray,
.parts:has(li[data-part="attach"]:is(:hover, :focus)) .spot-attach { opacity: 1; transform: scale(1); }
.parts-list li.no-spot { cursor: default; }
.parts-list li.no-spot:hover { transform: none; box-shadow: none; background: var(--surface); border-color: var(--line); }
.parts-list li .note { font-size: var(--t-small); font-style: italic; }

/* ---------- Seasons ---------- */
.season-bar { display: flex; justify-content: center; padding: 14px var(--gutter) 0; }
.season-pill {
  display: inline-flex; align-items: center; gap: 9px; margin: 0; max-width: 100%;
  padding: 7px 16px; border-radius: 999px; font-size: var(--t-small); font-weight: 600; line-height: 1.3;
  background: color-mix(in srgb, var(--season, var(--sun)) 16%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--season, var(--sun)) 55%, var(--line));
  color: var(--ink);
}
.season-pill .glyph { font-size: 1.1em; line-height: 1; }
html[data-season] .hero-card { box-shadow: inset 0 4px 0 var(--season); }
html[data-season="newyear"] { --season: #C99A1E; }
html[data-season="hearts"] { --season: #D6457A; }
html[data-season="spring"] { --season: #3E8E5A; }
html[data-season="summer"] { --season: #E08A00; }
html[data-season="school"] { --season: #2F6FB5; }
html[data-season="fall"] { --season: #B5651D; }
html[data-season="halloween"] { --season: #D96A00; }
html[data-season="thanksgiving"] { --season: #B8551B; }
html[data-season="christmas"] { --season: #B3261E; }
.season-fx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
.season-fx span { position: absolute; top: 0; opacity: 0; will-change: transform, opacity; user-select: none; }
.season-fx .fall { animation: season-fall var(--dur) linear var(--delay) infinite; }
.season-fx .rise { animation: season-rise var(--dur) ease-in var(--delay) infinite; }
.season-fx .twinkle { animation: season-twinkle var(--dur) ease-in-out var(--delay) infinite; }
@keyframes season-fall {
  0% { transform: translate3d(0, -8vh, 0) rotate(0deg); opacity: 0; }
  8% { opacity: 0.6; }
  92% { opacity: 0.55; }
  100% { transform: translate3d(var(--dx), 108vh, 0) rotate(var(--rot)); opacity: 0; }
}
@keyframes season-rise {
  0% { transform: translate3d(0, 108vh, 0) scale(0.8); opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.45; }
  100% { transform: translate3d(var(--dx), -10vh, 0) scale(1.1); opacity: 0; }
}
@keyframes season-twinkle {
  0%, 100% { transform: scale(0.4); opacity: 0; }
  50% { transform: scale(1); opacity: 0.7; }
}
@media (prefers-reduced-motion: reduce) { .season-fx { display: none; } }

/* ---------- Gentle motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-card .wire-band { animation: wire-drift 9s ease-in-out infinite alternate; }
  @keyframes wire-drift {
    from { transform: translateY(0) rotate(0deg); }
    to { transform: translateY(-5px) rotate(-0.35deg); }
  }
  .button:hover { transform: translateY(-2px); }
  .button:active { transform: scale(0.97); }
  .pair.cards > article { transition: transform 0.3s var(--ease); }
  .pair.cards > article:hover { transform: translateY(-3px); }
}

/* Tracker top band takes the lavender tint. */
body[data-tint] .tool-top { background: color-mix(in srgb, var(--tint-strong) 13%, var(--surface)); }

/* ---------- v18.27 (Nov 22): colored doctor contact pills ---------- */
.doctor-direct-links { gap: 10px; align-items: center; }
.doctor-direct-links a {
  --dot: var(--pc1);
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--ink);
  background: color-mix(in srgb, var(--dot) 20%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--dot) 60%, var(--line));
  overflow-wrap: anywhere;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.doctor-direct-links a::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dot); flex: 0 0 auto; }
.doctor-direct-links a[href^="sms:"] { --dot: var(--pc1); }
.doctor-direct-links a[href^="tel:"] { --dot: var(--pc2); }
.doctor-direct-links a[href^="mailto:"] { --dot: var(--pc5); }
.doctor-direct-links a:hover { color: var(--ink); border-color: var(--dot); background: color-mix(in srgb, var(--dot) 32%, var(--surface)); }
@media (prefers-reduced-motion: no-preference) { .doctor-direct-links a:hover { transform: translateY(-2px); } }
.doctor-direct-links a[href^="mailto:"] { flex: 1 1 100%; min-width: 0; font-size: 0.8125rem; padding: 0 14px; overflow-wrap: normal; }

/* ---------- v18.28 (Nov 22): friendlier phone first screen ---------- */
.hero-card .welcome { display: none; }
@media (max-width: 760px) {
  .hero-photo { order: -1; aspect-ratio: 16 / 9; }
  .hero-photo img { object-position: 50% 22%; }
  .hero-card .welcome {
    display: block; margin: 0; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.25;
    font-weight: 500; color: var(--ink);
  }
  .hero-card > [data-ortho-days] { order: 3; }
  .brand-logo img { height: 66px; }
  .header-inner { min-height: 84px; }
}
