/* ---------- tokens ---------- */
:root {
  --porcelain: #F5F7F4;
  --paper: #FFFFFF;
  --ink: #0F2A1D;
  --muted: #4E6157;
  --line: #DCE4DE;
  --green: #2E9E4A;
  --green-deep: #1D7A36;
  --mint: #E2F3E6;

  --film: #071420;
  --film-2: #0C1E2E;
  --film-ink: #E3EEF6;
  --film-muted: #8EA5B8;
  --film-line: #1D3346;

  --enamel: #3BB8E0;
  --dentin: #F2B544;
  --pulp: #F2545B;
  --cementum: #9B8CF0;
  --caries: #FFB547;
  --periapical: #FF5D6C;
  --bone: #9B8CF0;

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--porcelain);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; font-weight: 700; }
p { margin: 0; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-sm);
  text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 22px;
  border-radius: 12px; border: 1px solid transparent;
  font: 600 16px/1 var(--body); letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-quiet { background: var(--porcelain); color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--muted); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  --nav-fg: var(--ink);
  --nav-muted: var(--muted);
  color: var(--nav-fg);
  transition: background-color .5s var(--ease), color .5s var(--ease), box-shadow .3s var(--ease);
}
.nav-inner {
  max-width: 1320px; margin: 0 auto; height: 68px;
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 28px;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--porcelain) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav.is-dark { --nav-fg: var(--film-ink); --nav-muted: var(--film-muted); }
.nav.is-dark .btn-primary { background: #fff; color: var(--film); }
.nav.is-dark .btn-primary:hover { background: var(--mint); }
.nav.is-dark.is-scrolled {
  background: color-mix(in srgb, var(--film) 78%, transparent);
  box-shadow: 0 1px 0 var(--film-line);
}

.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--nav-fg, var(--ink)); }
.logo { display: block; height: 60px; width: auto; margin: -8px 0 -8px -8px; overflow: visible; }
.logo .l-ink { fill: currentColor; transition: fill .5s var(--ease); }
.logo .l-accent { fill: #81BE77; }

.nav-links { display: flex; gap: 26px; margin-left: 18px; }
.nav-links a, .nav-signin {
  font-size: 15px; font-weight: 500; text-decoration: none; color: var(--nav-muted);
  transition: color .2s var(--ease);
}
.nav-links a:hover, .nav-signin:hover { color: var(--nav-fg); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }

@media (max-width: 900px) {
  .nav-links { display: none; }
}
@media (max-width: 420px) {
  .nav-signin { display: none; }
}

/* ---------- hero ---------- */
.hero {
  --hero-bg: var(--porcelain);
  --hero-fg: var(--ink);
  --hero-muted: var(--muted);
  position: relative;
  min-height: max(720px, 100svh);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 0;
  max-width: 1320px;
  margin: 0 auto;
  padding: 96px var(--gutter) 40px;
  color: var(--hero-fg);
  isolation: isolate;
}
/* full-bleed background that can switch to radiograph film */
.hero::before {
  content: ""; position: absolute; z-index: -1;
  inset: 0 calc(50% - 50vw);
  background:
    radial-gradient(60% 55% at 72% 46%, color-mix(in srgb, var(--mint) 70%, transparent), transparent 70%),
    var(--porcelain);
  transition: opacity .8s var(--ease);
}
.hero::after {
  content: ""; position: absolute; z-index: -1;
  inset: 0 calc(50% - 50vw);
  background:
    radial-gradient(55% 55% at 72% 46%, #12304A 0%, transparent 70%),
    var(--film);
  opacity: 0;
  transition: opacity .8s var(--ease);
}
.hero.is-film::after { opacity: 1; }
.hero.is-film {
  --hero-fg: var(--film-ink);
  --hero-muted: var(--film-muted);
}
.hero, .hero .lede, .hero .fine, .hero .btn-ghost {
  transition: color .6s var(--ease), border-color .6s var(--ease), background-color .6s var(--ease);
}

.hero-copy { position: relative; z-index: 2; max-width: 680px; }
.nowrap { white-space: nowrap; }
.hero h1 {
  font-size: clamp(42px, 5.3vw, 80px);
  line-height: 0.97;
  letter-spacing: -0.034em;
  font-weight: 700;
  font-variation-settings: "opsz" 96;
  text-wrap: balance;
}
.lede {
  margin-top: 26px; max-width: 34em;
  font-size: clamp(17px, 1.35vw, 19px);
  line-height: 1.55;
  color: var(--hero-muted);
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.fine { margin-top: 16px; font-size: 14px; color: var(--hero-muted); }
.hero .btn-ghost { color: var(--hero-fg); border-color: color-mix(in srgb, var(--hero-fg) 24%, transparent); }
.hero .btn-ghost:hover { border-color: var(--hero-fg); }
.hero.is-film .btn-primary { background: #fff; color: var(--film); }
.hero.is-film .btn-primary:hover { background: var(--mint); }

/* stage */
.stage {
  position: relative;
  align-self: stretch;
  min-height: 600px;
  margin-right: calc(-1 * var(--gutter));
}
#tooth {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  cursor: grab;
  touch-action: pan-y;
  opacity: 0;
  transition: opacity .6s var(--ease);
}
#tooth.is-ready { opacity: 1; }
#tooth.is-dragging { cursor: grabbing; }
#tooth:focus-visible { outline-offset: -8px; border-radius: var(--r-lg); }

.stage-shadow {
  position: absolute; left: 50%; top: 77%;
  width: 46%; height: 34px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(15, 42, 29, .18), transparent);
  filter: blur(4px);
  transition: opacity .6s var(--ease);
  pointer-events: none;
}
.hero.is-film .stage-shadow { opacity: 0; }

.stage-poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  pointer-events: none; user-select: none;
  transition: opacity .7s var(--ease);
  animation: float 6s ease-in-out infinite;
}
.stage-poster.is-hidden { opacity: 0; animation: none; }
@keyframes float { 50% { transform: translateY(-10px); } }
.stage.is-static .stage-shadow { opacity: 1; }

.drag-hint {
  position: absolute; right: max(var(--gutter), 24px); top: 22%;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--hero-muted);
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity .5s var(--ease), color .6s var(--ease), background-color .6s var(--ease), border-color .6s var(--ease);
}
.stage.is-live .drag-hint { opacity: 1; transition-delay: 2.2s; }
.stage.is-live .drag-hint.is-hidden { opacity: 0; transition-delay: 0s; }
.hero.is-film .drag-hint { background: color-mix(in srgb, var(--film-2) 70%, transparent); border-color: var(--film-line); }
.drag-hint svg { animation: spin-hint 2.4s var(--ease) infinite; }
@keyframes spin-hint { 0%, 40% { transform: rotate(0); } 80%, 100% { transform: rotate(360deg); } }

/* labels projected from 3D */
.findings { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.finding {
  position: absolute; left: 0; top: 0;
  display: flex; align-items: center;
  opacity: 0; visibility: hidden;
  will-change: transform;
  white-space: nowrap;
}
.finding-dot {
  width: 10px; height: 10px; margin: -5px 0 0 -5px; align-self: flex-start;
  border-radius: 50%; background: var(--c);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent);
}
.finding-line { width: 34px; height: 1px; background: var(--c); margin-top: 0; align-self: flex-start; }
.finding-text {
  margin-top: -14px; align-self: flex-start;
  padding: 6px 10px; border-radius: 8px;
  font: 600 13px/1.2 var(--body);
  color: var(--film-ink);
  background: color-mix(in srgb, var(--film) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
  backdrop-filter: blur(6px);
}
.finding.is-left { flex-direction: row-reverse; transform-origin: right; }
.finding.is-left .finding-dot { margin: -5px -5px 0 0; }
.finding.is-left { translate: -100% 0; }

/* mode controls */
.stage-ui {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  width: min(560px, 100%);
  display: grid; justify-items: center; gap: 12px;
  z-index: 3;
}


.mode-steps {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: center; gap: 6px 22px; flex-wrap: wrap;
}
.mode-steps li {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--hero-muted);
  transition: color .4s var(--ease);
}
.mode-steps li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: .45; transition: background-color .4s var(--ease), opacity .4s var(--ease), box-shadow .4s var(--ease);
}
.mode-steps li.is-active { color: var(--hero-fg); }
.mode-steps li.is-active::before { background: #7EE2A0; opacity: 1; box-shadow: 0 0 0 4px rgba(126, 226, 160, .18); }
.legend {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px;
  min-height: 20px;
  font-size: 13px; font-weight: 500; color: var(--hero-fg);
}
.legend li { display: inline-flex; align-items: center; gap: 7px; animation: fade .4s var(--ease) both; }
.legend li::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
@keyframes fade { from { opacity: 0; } }

@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 112px;
  }
  .hero-copy { max-width: 640px; }
  .stage { min-height: 560px; margin: 8px calc(-1 * var(--gutter)) 0; }
}
@media (max-width: 560px) {
  .stage { min-height: 520px; }
  .drag-hint { top: 8px; right: var(--gutter); }
    .cta-row .btn { flex: 1 1 auto; }
  .finding-text { font-size: 12px; padding: 5px 8px; }
  .finding-line { width: 18px; }
}

/* ---------- sections ---------- */
section { position: relative; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2, .film h2 {
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.section-head p { margin-top: 18px; font-size: 18px; color: var(--muted); max-width: 40em; }

/* ---------- split content sections (hands-free, templates) ---------- */
.voice { padding: clamp(96px, 13vw, 168px) 0 clamp(48px, 6vw, 80px); }
.templates {
  padding: clamp(48px, 6vw, 80px) 0 clamp(96px, 13vw, 168px);
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
}
.split-head { position: sticky; top: 112px; }
.split-head h2 {
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.038em;
  text-wrap: balance;
}
.split-head p { margin-top: 20px; font-size: 18px; color: var(--muted); max-width: 32em; }

.points {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 36px;
}
.points li { padding-top: 18px; border-top: 2px solid var(--ink); }
.points h3 { font-size: 21px; letter-spacing: -0.022em; line-height: 1.2; }
.points p { margin-top: 8px; color: var(--muted); font-size: 16px; }

.template-names { margin-top: 64px; }
.tn-label { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.template-names ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 4px 22px;
  font: 600 clamp(20px, 2vw, 26px)/1.35 var(--display);
  letter-spacing: -0.025em;
}
.template-names li:nth-child(odd) { color: var(--ink); }
.template-names li:nth-child(even) { color: color-mix(in srgb, var(--ink) 38%, var(--porcelain)); }

@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .split-head { position: static; }
}
@media (max-width: 600px) {
  .points { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- tooth notation ---------- */
.notation { padding: 0 0 clamp(96px, 13vw, 160px); }
.notation-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line);
}
.nt { padding: 22px 22px 26px; display: grid; align-content: start; gap: 6px; }
.nt + .nt { border-left: 1px solid var(--line); }
.nt dt { font-size: 15px; font-weight: 600; }
.nt dt span { font-weight: 500; color: var(--muted); margin-left: 4px; }
.nt dd { margin: 0; }
.nt-code {
  display: flex; align-items: baseline; gap: 14px; min-height: 1.15em;
  font: 700 clamp(48px, 5.4vw, 76px)/1.05 var(--display); letter-spacing: -0.03em;
  color: var(--green-deep); font-variant-numeric: tabular-nums;
  margin: 10px 0 8px !important;
}
.nt-code.is-swap { animation: nt-in .35s var(--ease); }
@keyframes nt-in { from { opacity: 0; transform: translateY(6px); } }
.nt-alt { font: 600 16px/1 var(--body); letter-spacing: 0; color: var(--muted); }
.nt-where { font-size: 14px; color: var(--muted); max-width: 26ch; }
/* Palmer quadrant grid: lines sit between the tooth number and the midline */
.palmer { display: inline-block; padding: 0 .12em; line-height: 1; border: 0 solid currentColor; }
.palmer.q-ur { border-right-width: 4px; border-bottom-width: 4px; }
.palmer.q-ul { border-left-width: 4px; border-bottom-width: 4px; }
.palmer.q-lr { border-right-width: 4px; border-top-width: 4px; }
.palmer.q-ll { border-left-width: 4px; border-top-width: 4px; }
.notation-points { margin-top: 48px; }

@media (max-width: 860px) {
  .notation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nt:nth-child(3) { border-left: 0; }
  .nt:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 420px) {
  .nt { padding: 18px 12px 20px; }
  .nt-alt { display: none; }
}

/* ---------- app replicas (live auto-fill, tooth picker, Buddy) ----------
   Colours, radii and type mirror the Leveret app. */
.app {
  --a-green: #2f9f4d; --a-green-600: #23873e; --a-green-50: #f0fdf4; --a-green-100: #dcfce7; --a-green-400: #4ade80;
  --a-ink: #0f172a; --a-muted: #64748b; --a-soft: #94a3b8; --a-line: #e2e8f0; --a-sm: #f1f5f9; --a-bg: #f8fafc;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif; color: var(--a-ink); text-align: left;
}
.app p { margin: 0; }
.app-card { background: #fff; border: 1px solid var(--a-line); border-radius: 16px; }
.app-card-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--a-line); }
.app-card-head h4 { margin: 0; font: 700 16px/1.2 "Inter", sans-serif; letter-spacing: -0.01em; }
.grip { width: 9px; height: 15px; background: radial-gradient(circle, #cbd5e1 1.3px, transparent 1.6px) 0 0 / 4.5px 5px; }
.app-fields { padding: 14px 20px 18px; display: grid; gap: 12px; }
.f { display: grid; grid-template-columns: 134px minmax(0, 1fr); gap: 12px; align-items: start; }
.fl { font-size: 14px; font-weight: 700; color: var(--a-muted); padding-top: 7px; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.o {
  display: inline-flex; align-items: center; gap: 8px; height: 33px; padding: 0 12px;
  border: 1px solid var(--a-soft); border-radius: 12px; background: #fff;
  font-size: 14px; white-space: nowrap; color: var(--a-ink);
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.o::before {
  content: ""; flex: none; width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid var(--a-soft); box-sizing: border-box; transition: border .3s var(--ease);
}
.o.is-on { border-color: var(--a-green); background: var(--a-green-50); }
.o.is-on::before { border: 4.5px solid var(--a-green); }
.ft { min-height: 33px; padding: 7px 12px; border-radius: 8px; background: var(--a-bg); font-size: 14px; line-height: 19px; }
.ft:empty::before { content: attr(data-ph); color: var(--a-soft); }
.is-flash { animation: a-flash .9s var(--ease); }
@keyframes a-flash { from { box-shadow: 0 0 0 0 rgba(47, 159, 77, .5); } to { box-shadow: 0 0 0 12px rgba(47, 159, 77, 0); } }

/* live auto-fill */
.af {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px;
  padding: 14px; border-radius: 24px; background: #eef2f6; border: 1px solid var(--line);
  margin-bottom: clamp(48px, 7vw, 80px);
}
.af-rec { display: flex; flex-direction: column; }
.rec-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--a-line); }
.rh-t { font-size: 15px; font-weight: 700; }
.rh-s { font-size: 12.5px; color: var(--a-muted); }
.rec-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 999px;
  background: #fef2f2; color: #b91c1c; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.rec-pill i { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; animation: rec 1.6s infinite; }
@keyframes rec { 70% { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); } 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .5); } }
.af-transcript {
  list-style: none; margin: 0; padding: 16px 18px; flex: 1; min-height: 250px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 56px); mask-image: linear-gradient(to bottom, transparent 0, #000 56px);
}
.af-transcript li { display: grid; gap: 2px; animation: fade .3s var(--ease) both; }
.af-transcript .who { font-size: 12px; font-weight: 600; color: var(--a-muted); }
.af-transcript .said { font-size: 14.5px; line-height: 1.45; }
.af-transcript mark { background: var(--a-green-100); color: var(--a-green-600); border-radius: 4px; padding: 0 3px; }
.rec-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--a-line); font-size: 13px; font-weight: 600; color: var(--a-muted); }
.toggle { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--a-green); }
.toggle::after { content: ""; position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.points-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .points-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .af { grid-template-columns: 1fr; }
  .af-rec { order: -1; }
  .af-transcript { min-height: 170px; }
}
@media (max-width: 560px) {
  .af { padding: 8px; border-radius: 18px; }
  .app-fields { padding: 12px 14px 16px; }
  .f { grid-template-columns: 1fr; gap: 6px; }
  .fl { padding-top: 0; }
  .o { height: 30px; padding: 0 10px; font-size: 13px; }
  .points-4 { grid-template-columns: 1fr; }
}

/* fixed-size replicas that scale like a video */
.scaled { position: relative; overflow: hidden; aspect-ratio: calc(var(--w) / var(--h)); aspect-ratio: 1000 / 540; }
#buddy-demo.scaled { aspect-ratio: 960 / 600; }
.scaled[hidden] { display: none; }
.scaled > .sc { position: absolute; left: 0; top: 0; width: var(--w); height: var(--h); transform: scale(var(--s, 1)); transform-origin: 0 0; }

/* tooth picker */
.tp { border-radius: 24px; background: #eef2f6; border: 1px solid var(--line); }
.tp .cam { position: absolute; inset: 0; transform-origin: 0 0; transition: transform .9s cubic-bezier(.65, 0, .35, 1); will-change: transform; }
.tp-page { position: absolute; left: 40px; top: 36px; width: 920px; }
.tp-field {
  display: inline-flex; align-items: center; gap: 8px; height: 33px; padding: 0 12px;
  border: 1px solid var(--a-soft); border-radius: 12px; font-size: 14px; color: var(--a-muted); background: #fff;
}
.tp-field::before { content: ""; width: 13px; height: 11px; border-radius: 3px 3px 5px 5px; background: var(--a-muted); }
.tp-field .tp-val { display: none; }
.tp-field.has-val { color: var(--a-ink); font-weight: 600; border-color: var(--a-green); background: var(--a-green-50); }
.tp-field.has-val::before { background: var(--a-green); }
.tp-field.has-val .tp-ph { display: none; }
.tp-field.has-val .tp-val { display: inline; }
.tp-field.is-pressed, .tt.is-pressed, .tpm-btn.is-pressed, .tpm-done.is-pressed, .w.is-pressed { transform: scale(.94); }
.tp-dim { position: absolute; inset: 0; background: rgba(15, 23, 42, .42); opacity: 0; transition: opacity .3s var(--ease); }
.tp-modal {
  position: absolute; left: 70px; top: 52px; width: 860px; overflow: visible;
  background: #fff; border-radius: 14px; box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .45);
  opacity: 0; transform: scale(.96); transition: opacity .25s var(--ease), transform .3s var(--ease); pointer-events: none;
}
.tp.is-open .tp-dim { opacity: 1; }
.tp.is-open .tp-modal { opacity: 1; transform: none; }
.tpm-band { padding: 7px 0; text-align: center; background: var(--a-sm); border-block: 1px solid var(--a-line); font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--a-muted); }
.tpm-band:first-child { border-radius: 14px 14px 0 0; border-top: 0; }
.tpm-x { position: absolute; right: 14px; top: 7px; width: 12px; height: 12px; background: linear-gradient(45deg, transparent 45%, var(--a-soft) 45% 55%, transparent 55%), linear-gradient(-45deg, transparent 45%, var(--a-soft) 45% 55%, transparent 55%); }
.tpm-body { display: grid; grid-template-columns: 34px 1fr 1fr 34px; }
.tpm-side { display: grid; place-items: center; font-size: 10px; font-weight: 600; line-height: 1.5; color: var(--a-muted); border-inline: 1px solid var(--a-line); }
.tph { display: flex; flex-direction: column; gap: 4px; padding: 10px 10px; }
.tph-r { align-items: flex-end; border-right: 1px solid var(--a-line); }
.tph-l { align-items: flex-start; }
.tpq { font-size: 11px; font-weight: 700; color: #334155; align-self: flex-start; }
.tpdiv { display: block; align-self: stretch; height: 1px; background: var(--a-line); margin: 4px -10px; }
.tr { display: flex; gap: 4px; }
.tt {
  display: grid; place-items: center; border: 1px solid var(--a-soft); border-radius: 6px; background: #fff;
  color: #475569; font-variant-numeric: tabular-nums; transition: background-color .2s, border-color .2s, transform .12s;
}
.tr.perm .tt { width: 44px; height: 42px; font-size: 16px; }
.tr.prim .tt { width: 36px; height: 32px; font-size: 13px; }
.tt.is-on { background: var(--a-green-100); border-color: var(--a-green); color: #14532d; font-weight: 600; }
.tpm-sel { height: 0; overflow: hidden; padding: 0 16px; background: var(--a-green-50); color: #15803d; font-size: 12.5px; font-weight: 600; line-height: 28px; transition: height .25s var(--ease); }
.tp-modal.has-sel .tpm-sel { height: 28px; }
.tpm-foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--a-line); }
.tpm-hint { margin-right: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--a-muted); }
.tpm-hint::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--a-soft); }
.tpm-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 600; transition: opacity .2s, transform .12s; }
.tpm-btn::before { content: ""; width: 13px; height: 13px; border-radius: 50%; }
.tpm-surf { color: var(--a-green); border: 1px solid var(--a-green-400); }
.tpm-surf::before { border: 1.5px solid currentColor; box-sizing: border-box; }
.tpm-add { color: #fff; background: var(--a-green); }
.tpm-add::before { background: #fff; }
.tp-modal:not(.has-sel) .tpm-btn { opacity: .45; }
.tpm-wheel {
  position: absolute; left: 50%; top: 58px; width: 170px; margin-left: -85px; padding: 14px 14px 16px;
  display: grid; justify-items: center; gap: 8px; background: #fff; border: 1px solid var(--a-line); border-radius: 16px;
  box-shadow: 0 24px 50px -16px rgba(15, 23, 42, .4);
  opacity: 0; transform: scale(.9); transition: opacity .2s var(--ease), transform .25s var(--ease);
}
.tpm-wheel.is-open { opacity: 1; transform: none; }
.tpm-wheel > p { font-size: 15px; font-weight: 700; }
.tpw-svg { width: 124px; height: 124px; overflow: visible; }
.w { transform-box: fill-box; transform-origin: center; transition: transform .12s; }
.w path, .w circle { fill: var(--a-sm); stroke: #fff; stroke-width: 2; transition: fill .2s; }
.w text { font: 600 8.5px "Inter", sans-serif; fill: #475569; text-anchor: middle; }
.w.is-on path, .w.is-on circle { fill: var(--a-green-400); }
.w.is-on text { fill: #14532d; }
.tpm-done { display: inline-flex; align-items: center; height: 36px; padding: 0 22px; border-radius: 10px; background: var(--a-green); color: #fff; font-size: 14px; font-weight: 600; transition: transform .12s; }
.tp-badge {
  position: absolute; right: 20px; bottom: 18px; display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px; background: var(--a-ink); color: #fff; font-size: 14px;
}
.tp-badge span { color: #94a3b8; }
.cursor {
  position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: -2px 0 0 -3px; z-index: 5; pointer-events: none;
  transition: transform .65s cubic-bezier(.45, 0, .2, 1);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 9-7 1.6L8.6 20z' fill='%230f172a' stroke='%23fff' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.cursor::after {
  content: ""; position: absolute; left: -9px; top: -9px; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--a-green); opacity: 0;
}
.cursor.is-click::after { animation: click .45s var(--ease); }
@keyframes click { from { opacity: 1; transform: scale(.3); } to { opacity: 0; transform: scale(1.3); } }
.nt-caption { margin: 28px 0 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.nt { transition: background-color .4s var(--ease); }
.nt.is-active { background: color-mix(in srgb, var(--mint) 70%, transparent); }

/* Leveret Buddy */
.bd { border-radius: 0; background: var(--a-bg); }
.bd-note { position: absolute; left: 24px; top: 24px; width: 556px; height: 552px; }
.bd-note .f { grid-template-columns: 124px minmax(0, 1fr); }
.bd [data-word] { border-radius: 4px; transition: background-color .4s; }
.bd [data-word].is-new { background: var(--a-green-100); color: var(--a-green-600); padding: 0 2px; }
.bd-panel { position: absolute; left: 600px; top: 24px; width: 336px; height: 552px; display: flex; flex-direction: column; overflow: hidden; }
.bd-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--a-line); }
.bd-title { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; }
.bd-bot { width: 18px; height: 15px; border: 2px solid var(--a-ink); border-radius: 5px; position: relative; }
.bd-bot::after { content: ""; position: absolute; left: 3px; right: 3px; top: 4px; height: 3px; background: radial-gradient(circle, var(--a-ink) 1.4px, transparent 1.6px) 0 0 / 6px 3px; }
.bd-pill { padding: 5px 11px; border: 1px solid var(--a-line); border-radius: 999px; font-size: 12.5px; color: #475569; transition: all .2s; }
.bd.is-perio .bd-pill { border-color: var(--a-green); color: var(--a-green-600); background: var(--a-green-50); }
.bd-pill.is-pressed, .bd-send.is-pressed, .pc-calc.is-pressed { transform: scale(.94); }
.bd-body { position: relative; flex: 1; min-height: 0; }
.bd-chat { list-style: none; margin: 0; padding: 14px 14px 10px; position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; overflow: hidden; transition: opacity .3s; }
.bd-chat li { max-width: 88%; padding: 10px 13px; font-size: 15px; line-height: 1.4; border-radius: 14px; animation: fade .3s var(--ease) both; }
.bd-chat .me { align-self: flex-end; background: var(--a-green); color: #fff; border-bottom-right-radius: 4px; }
.bd-chat .bot { align-self: flex-start; background: var(--a-sm); border-bottom-left-radius: 4px; }
.bd-chat .typing { display: flex; gap: 4px; padding: 12px; }
.bd-chat .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--a-soft); animation: dot 1s infinite; }
.bd-chat .typing i:nth-child(2) { animation-delay: .15s; }
.bd-chat .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-3px); opacity: .5; } }
.bd-perio { position: absolute; inset: 0; padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; background: #fff; opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s; pointer-events: none; }
.bd.is-perio .bd-perio { opacity: 1; transform: none; }
.bd.is-perio .bd-chat { opacity: 0; }
.pc-title { display: flex; align-items: center; justify-content: space-between; font-size: 14.5px; font-weight: 700; padding-bottom: 6px; border-bottom: 1px solid var(--a-line); }
.pc-title span { font-size: 10.5px; font-weight: 700; color: var(--a-green-600); background: var(--a-green-50); padding: 2px 7px; border-radius: 6px; }
.pc-l { font-size: 13px; font-weight: 600; color: #334155; margin-top: 2px !important; }
.pc-row { display: flex; justify-content: space-between; }
.pc-row b { color: var(--a-green); }
.pc-input { height: 30px; padding: 0 10px; border: 1px solid var(--a-line); border-radius: 8px; font-size: 13.5px; line-height: 28px; }
.pc-slider { position: relative; height: 14px; }
.pc-slider i { position: absolute; left: 0; right: 0; top: 5px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--a-green) calc(var(--bl, 0) * 100%), #334155 0); }
.pc-slider b { position: absolute; top: 0; left: calc(var(--bl, 0) * (100% - 14px)); width: 14px; height: 14px; border-radius: 50%; background: var(--a-green); }
.pc-seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--a-line); border-radius: 8px; overflow: hidden; font-size: 13px; color: #475569; text-align: center; }
.pc-seg span { padding: 7px 4px; transition: all .25s; }
.pc-seg span.is-on { background: var(--a-green); color: #fff; font-weight: 600; }
.pc-tog { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border: 1px solid var(--a-line); border-radius: 8px; font-size: 13px; color: #475569; }
.pc-tog b { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 5px; border: 1px solid var(--a-line); color: var(--a-muted); }
.pc-tog.is-on { border-color: var(--a-green-400); background: var(--a-green-50); }
.pc-tog.is-on b { border-color: var(--a-green); background: var(--a-green); color: #fff; }
.pc-calc { margin-top: 4px !important; height: 34px; border-radius: 10px; background: var(--a-green); color: #fff; font-size: 13.5px; font-weight: 600; text-align: center; line-height: 34px; transition: transform .12s; }
.pc-result {
  position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 14px 16px; border-radius: 12px;
  background: var(--a-ink); color: #fff; display: grid; gap: 2px;
  opacity: 0; transform: translateY(12px); transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.bd.has-result .pc-result { opacity: 1; transform: none; }
.pc-result p { font-size: 12px; color: #94a3b8; }
.pc-result b { font-size: 18px; font-weight: 700; }
.pc-result span { font-size: 13px; color: #fca5a5; }
.bd-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--a-line); }
.bd-field { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid var(--a-line); border-radius: 10px; background: var(--a-bg); font-size: 14px; line-height: 36px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-field.is-typing { border-color: var(--a-green-400); background: #fff; }
.bd-field.is-typing span::after { content: ""; display: inline-block; width: 1.5px; height: 14px; margin-left: 1px; vertical-align: -2px; background: var(--a-green); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.bd-ph { color: var(--a-soft); }
.bd-send { flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--a-green-400); transition: transform .12s; position: relative; }
.bd-send::after { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-left: 11px solid #fff; border-block: 7px solid transparent; transform: translateX(2px); }
#buddy-demo { border-top: 0; }
#tour-img[hidden] { display: none; }

/* ---------- dental ai (film) ---------- */
.film {
  background: var(--film);
  color: var(--film-ink);
  padding: clamp(88px, 12vw, 150px) 0;
  overflow: hidden;
}
.film::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(50% 60% at 80% 40%, #12304A, transparent 70%);
}
.film > .wrap { position: relative; }
.film-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(24px, 5vw, 80px); align-items: end;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.film-head > p { color: var(--film-muted); font-size: 18px; max-width: 32em; }
.beta { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; margin-bottom: 18px; color: var(--film-muted); }
.beta span { font-size: 11px; font-weight: 700; color: var(--film); background: #7EE2A0; padding: 3px 7px; border-radius: 6px; letter-spacing: .02em; }

.viewer {
  border: 1px solid var(--film-line);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--film-2) 60%, transparent);
  padding: 10px;
}
.viewer-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 4px 4px 12px;
}
.viewer-model { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-right: auto; }
.vm-name { font: 700 17px/1.2 var(--display); letter-spacing: -0.02em; color: var(--film-ink); }
.vm-alt { font-size: 13px; color: var(--film-muted); }
.vm-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.vm-steps li { width: 34px; }
.vm-steps li { height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.vm-steps i { display: block; height: 100%; background: #7EE2A0; transform: scaleX(0); transform-origin: left; }
.viewer-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--film-muted); font-variant-numeric: tabular-nums; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #7EE2A0; box-shadow: 0 0 0 4px rgba(126, 226, 160, .15); }

.viewer-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 10px; }
.film-frame { position: relative; border-radius: 14px; overflow: hidden; background: #081119; }
#opg { display: block; width: 100%; aspect-ratio: 2.1 / 1; }
.scan-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .06); }
.scan-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #3BB8E0); transform: scaleX(0); transform-origin: left; }

.findings-panel {
  /* height follows the film, not the number of findings, so the loop never jumps */
  height: 0; min-height: 100%; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 18px; border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--film-line);
}
.fp-title { font-size: 13px; font-weight: 600; color: var(--film-muted); margin-bottom: 12px; }
.fp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: f; }
.fp-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid transparent;
  opacity: .32;
  transition: opacity .4s var(--ease), border-color .4s var(--ease), background-color .4s var(--ease);
}
.fp-list li.is-found { opacity: 1; border-color: color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 9%, transparent); }
.fl-swatch { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 3px; background: var(--c); }
.fl-text { display: grid; gap: 1px; }
.fl-text strong { font-size: 14.5px; font-weight: 600; color: var(--film-ink); }
.fl-text span { font-size: 13px; color: var(--film-muted); }
.fp-note { margin-top: auto; padding-top: 16px; font-size: 13px; color: var(--film-muted); }

.film-note { margin-top: 20px; font-size: 14px; color: var(--film-muted); }
@media (max-width: 1360px) { .fp-note { display: none; } }

@media (max-width: 960px) {
  .film-head { grid-template-columns: 1fr; align-items: start; }
  .viewer-body { grid-template-columns: 1fr; }
  .findings-panel { height: auto; min-height: 0; }
  .fp-list { min-height: calc(2 * 58px + 8px); align-content: start; }
  .fp-list { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .fp-note { display: none; }
}
@media (max-width: 560px) {
  #opg { aspect-ratio: 1.6 / 1; }
  .viewer { padding: 6px; border-radius: 16px; }
  .findings-panel { padding: 12px; }
  .fp-list { grid-template-columns: 1fr 1fr; gap: 6px; }
  .fp-list li { padding: 8px 9px; gap: 8px; }
  .fl-swatch { width: 8px; height: 8px; margin-top: 5px; }
  .fl-text strong { font-size: 13px; }
  .fl-text span { font-size: 12px; }
  .logo { height: 50px; margin: -6px 0 -6px -6px; }
}

/* screenshots */
.shot {
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgba(15, 42, 29, .28), 0 12px 24px -16px rgba(15, 42, 29, .18);
}
.shot-bar {
  height: 36px; display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--line); background: #FBFCFB;
  font-size: 12px; color: var(--muted);
}
.shot-bar span { padding: 3px 12px; border-radius: 6px; background: var(--porcelain); }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }

/* ---------- tour ---------- */
.tour { padding: clamp(88px, 12vw, 150px) 0 clamp(60px, 8vw, 100px); }
.tour-grid { display: grid; grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.tour-tabs { display: grid; gap: 4px; }
.tour-tabs button {
  display: grid; gap: 6px; text-align: left;
  padding: 18px 18px 18px 20px; border: 0; border-radius: 14px;
  background: transparent; color: var(--ink); cursor: pointer;
  font: inherit;
  position: relative;
  transition: background-color .25s var(--ease);
}
.tour-tabs button::before {
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px;
  background: var(--line); transition: background-color .25s var(--ease);
}
.tour-tabs button strong { font: 700 19px/1.2 var(--display); letter-spacing: -0.02em; }
.tour-tabs button span { font-size: 15px; color: var(--muted); line-height: 1.5; }
.tour-tabs button:hover { background: color-mix(in srgb, var(--paper) 70%, transparent); }
.tour-tabs button[aria-selected="true"] { background: var(--paper); }
.tour-tabs button[aria-selected="true"]::before { background: var(--green); }
.tour-grid .shot img { transition: opacity .25s var(--ease); }
.tour-grid .shot img.is-swapping { opacity: 0; }

@media (max-width: 900px) {
  .tour-grid { grid-template-columns: 1fr; }
  .tour-tabs { grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); }
  .tour-tabs button { scroll-snap-align: start; }
}

/* ---------- how ---------- */
.how { padding: clamp(60px, 8vw, 100px) 0 clamp(88px, 12vw, 150px); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); counter-reset: s; }
.steps li { padding-top: 22px; border-top: 2px solid var(--ink); }
.step-n { display: block; font: 800 15px/1 var(--display); color: var(--green-deep); margin-bottom: 18px; }
.steps h3 { font-size: 24px; letter-spacing: -0.025em; line-height: 1.15; }
.steps p { margin-top: 10px; color: var(--muted); max-width: 32ch; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* ---------- faq ---------- */
.faq { padding: 0 0 clamp(96px, 13vw, 160px); }
.faq .split-head a { color: var(--green-deep); }
.faq-list { border-top: 2px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 0; cursor: pointer; list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary h3 { font-size: clamp(18px, 1.6vw, 21px); letter-spacing: -0.02em; line-height: 1.3; }
.faq-list summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat;
  color: var(--green-deep);
  transition: transform .25s var(--ease);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover h3 { color: var(--green-deep); }
.faq-list details p { padding: 0 40px 24px 0; color: var(--muted); max-width: 62ch; }

/* ---------- final ---------- */
.final { padding: 0 0 clamp(88px, 12vw, 140px); }
.final-inner {
  display: grid; justify-items: center; text-align: center;
}
.final-mark { width: 64px; height: 64px; margin-bottom: 26px; }
.final h2 { font-size: clamp(38px, 5.4vw, 72px); letter-spacing: -0.045em; line-height: 1; text-wrap: balance; }
.final p { margin-top: 18px; color: var(--muted); font-size: 18px; max-width: 36em; }
.final .cta-row { justify-content: center; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 28px; font-size: 14px; color: var(--muted); }
.footer-grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.footer .brand { color: var(--ink); }
.footer .logo { height: 56px; }
.footer-brand p { margin-top: 10px; max-width: 24ch; }
.footer-col { display: grid; gap: 10px; align-content: start; }
.footer-col p { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.footer-col a { text-decoration: none; width: fit-content; }
.footer-col a:hover { color: var(--ink); }
.footer-base {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  position: relative;
  margin-top: 48px; padding-top: 20px;
  font-size: 13px;
}
.footer-base::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- subpages ---------- */
.subpage .nav { background: color-mix(in srgb, var(--porcelain) 82%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); }
.page { padding: 132px 0 clamp(72px, 10vw, 120px); }
.page-head { margin-bottom: clamp(40px, 6vw, 72px); }
.crumb { display: flex; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 20px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.page h1 {
  font-size: clamp(40px, 5.6vw, 72px); line-height: 1; letter-spacing: -0.04em;
  text-wrap: balance; max-width: 16ch;
}
.page-meta { margin-top: 18px; color: var(--muted); font-size: 15px; }
.page-lede { margin-top: 20px; color: var(--muted); font-size: 19px; max-width: 36em; }

.legal-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.toc { position: sticky; top: 100px; font-size: 14px; }
.toc p { font-weight: 600; margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); border-left-color: var(--green); }

.prose { max-width: 68ch; font-size: 17px; line-height: 1.7; }
.prose > p:first-child { font-size: 19px; line-height: 1.6; color: var(--ink); }
.prose h2 { font-size: 26px; letter-spacing: -0.025em; line-height: 1.2; margin: 56px 0 14px; scroll-margin-top: 96px; }
.prose h3 { font: 600 18px/1.3 var(--body); margin: 28px 0 8px; scroll-margin-top: 96px; }
.prose p { margin: 0 0 14px; color: #33463B; }
.prose ul { margin: 0 0 16px; padding-left: 20px; color: #33463B; }
.prose li { margin: 6px 0; padding-left: 4px; }
.prose li::marker { color: var(--green); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--green-deep); text-underline-offset: 3px; }
.legal-more { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 15px; }
.legal-more p { width: 100%; font-weight: 600; margin: 0; color: var(--ink); }
.legal-more a { color: var(--green-deep); }

@media (max-width: 860px) {
  .legal-grid { grid-template-columns: 1fr; }
  .toc { position: static; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); }
  .toc ol { border-left: 0; }
  .toc a { padding-left: 0; border-left: 0; }
}

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-card {
  padding: clamp(24px, 4vw, 40px); border-radius: var(--r-lg);
  background: var(--paper); border: 1px solid var(--line);
}
.contact-label { font-size: 14px; font-weight: 600; color: var(--muted); }
.contact-email {
  display: inline-block; margin-top: 10px;
  font: 700 clamp(28px, 3.6vw, 44px)/1.1 var(--display); letter-spacing: -0.03em;
  color: var(--ink); text-decoration: none; word-break: break-word;
}
.contact-email:hover { color: var(--green-deep); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.contact-copied { margin-top: 12px; min-height: 1.5em; font-size: 14px; color: var(--green-deep); }
.contact-topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.contact-topics li { padding-top: 16px; border-top: 2px solid var(--ink); }
.contact-topics h2 { font-size: 20px; letter-spacing: -0.02em; }
.contact-topics p { margin-top: 6px; color: var(--muted); }
.contact-topics a { color: var(--green-deep); }
.contact-demo { margin-top: clamp(72px, 10vw, 120px); display: grid; justify-items: start; gap: 12px; }
.contact-demo h2 { font-size: clamp(28px, 3vw, 36px); letter-spacing: -0.03em; }
.contact-demo p { color: var(--muted); margin-bottom: 8px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.page-404 { min-height: 70vh; display: grid; align-items: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
