/* Theia website — v2 (2026-10-07), in the THEIA brand (theia-brand-guidelines.html v1.1).
   Layout: an engineering document on a 12-column, 1200-px measure. Dark cover bands (hero, page heads, the call to
   action, footer) carry registration marks like the company-profile cover; paper and mist sections sit between them.
   Section labels are tracked capitals over a hairline with a red index. Type is Inter at 400 / 500 / 600 only.
   Red is the measured point and nothing else: the crosshair, an index, a marked tooth, a full stop. */

:root {
  --paper: #ffffff;
  --mist: #f6f6f4;
  --ink: #1a1d21;
  --ink-2: #4a4e54;
  --ink-3: #62666c;
  --line: #e7e7e4;
  --line-strong: #d3d3cf;
  --night: #0e1114;
  --night-2: #15181c;
  --night-line: #262a30;
  --on-night: #ffffff;
  --on-night-2: #a9adb2;
  --on-night-3: #8a8d91;
  --red: #da291c;
  --red-text: #c4231a;
  --red-night: #ff6a5a;
  --btn-bg: #1a1d21;
  --btn-fg: #ffffff;
  --btn-hover: #2e333a;
  --shot-filter: none;
  --ghost: #181b1e;                                              /* the cover's ghost mark on the night ground */
  /* the chart's four states (odontogram.html STATES) */
  --chart-planned: #d64545;
  --chart-inprogress: #e08a00;
  --chart-completed: #2f9e44;
  --chart-existing: #2e6cb5;
  /* the appointment statuses (web/src/lib/apptStatus.ts, light) — tint · line · ink · bar */
  --st-open-t: #f0f9ff; --st-open-l: #7dd3fc; --st-open-i: #075985; --st-open-c: #38bdf8;
  --st-conf-t: #dbeafe; --st-conf-l: #1d4ed8; --st-conf-i: #1e3a8a; --st-conf-c: #1e40af;
  --st-in-t: #f0fdf4; --st-in-l: #86efac; --st-in-i: #166534; --st-in-c: #22c55e;
  --st-prog-t: #faf5ff; --st-prog-l: #d8b4fe; --st-prog-i: #6b21a8; --st-prog-c: #9333ea;
  --st-done-t: #dcfce7; --st-done-l: #15803d; --st-done-i: #14532d; --st-done-c: #166534;
  --st-late-t: #fff7ed; --st-late-l: #fdba74; --st-late-i: #9a3412; --st-late-c: #f97316;
  --st-canc-t: #fef2f2; --st-canc-l: #fca5a5; --st-canc-i: #991b1b; --st-canc-c: #dc2626;
  --st-noshow-t: #fdf2f8; --st-noshow-l: #f9a8d4; --st-noshow-i: #9d174d; --st-noshow-c: #ec4899;
  --st-wait-t: #fefce8; --st-wait-l: #fde047; --st-wait-i: #854d0e; --st-wait-c: #facc15;

  --font: "Inter", -apple-system, "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --fs-display: clamp(2.5rem, 1.5rem + 4.1vw, 4.875rem);
  --fs-h1: clamp(2.25rem, 1.55rem + 2.8vw, 3.75rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.6vw, 2.625rem);
  --fs-h3: 1.1875rem;
  --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.8125rem;
  --fs-meta: 0.75rem;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --gutter: clamp(16px, 4vw, 40px);
  --measure: 1200px;
  --radius: 6px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1114; --mist: #15181c; --ink: #edede9; --ink-2: #b6b9bd; --ink-3: #9a9da1;
    --line: #23272d; --line-strong: #2e333a; --night: #08090b; --night-2: #111316; --night-line: #23272d;
    --red-text: #ff6a5a; --btn-bg: #edede9; --btn-fg: #0e1114; --btn-hover: #ffffff; --shot-filter: brightness(.9); --ghost: #121417;
    --chart-planned: #e06666; --chart-inprogress: #f0a020; --chart-completed: #43b85a; --chart-existing: #5b8fd6;
    --st-open-t: #1b384d; --st-open-l: #28769c; --st-open-i: #bae6fd; --st-open-c: #38bdf8;
    --st-conf-t: #1a366d; --st-conf-l: #336ece; --st-conf-i: #dbeafe; --st-conf-c: #3b82f6;
    --st-in-t: #173834; --st-in-l: #307e56; --st-in-i: #bbf7d0; --st-in-c: #4ade80;
    --st-prog-t: #312356; --st-prog-l: #73579e; --st-prog-i: #e9d5ff; --st-prog-c: #c084fc;
    --st-done-t: #154c36; --st-done-l: #1f9c52; --st-done-i: #dcfce7; --st-done-c: #16a34a;
    --st-late-t: #3e2e28; --st-late-l: #945e35; --st-late-i: #fed7aa; --st-late-c: #fb923c;
    --st-canc-t: #3d202b; --st-canc-l: #924c52; --st-canc-i: #fecaca; --st-canc-c: #f87171;
    --st-noshow-t: #402742; --st-noshow-l: #904d78; --st-noshow-i: #fbcfe8; --st-noshow-c: #f472b6;
    --st-wait-t: #353729; --st-wait-l: #937e1f; --st-wait-i: #fef08a; --st-wait-c: #facc15;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1114; --mist: #15181c; --ink: #edede9; --ink-2: #b6b9bd; --ink-3: #9a9da1;
  --line: #23272d; --line-strong: #2e333a; --night: #08090b; --night-2: #111316; --night-line: #23272d;
  --red-text: #ff6a5a; --btn-bg: #edede9; --btn-fg: #0e1114; --btn-hover: #ffffff; --shot-filter: brightness(.9); --ghost: #121417;
  --chart-planned: #e06666; --chart-inprogress: #f0a020; --chart-completed: #43b85a; --chart-existing: #5b8fd6;
  --st-open-t: #1b384d; --st-open-l: #28769c; --st-open-i: #bae6fd; --st-open-c: #38bdf8;
  --st-conf-t: #1a366d; --st-conf-l: #336ece; --st-conf-i: #dbeafe; --st-conf-c: #3b82f6;
  --st-in-t: #173834; --st-in-l: #307e56; --st-in-i: #bbf7d0; --st-in-c: #4ade80;
  --st-prog-t: #312356; --st-prog-l: #73579e; --st-prog-i: #e9d5ff; --st-prog-c: #c084fc;
  --st-done-t: #154c36; --st-done-l: #1f9c52; --st-done-i: #dcfce7; --st-done-c: #16a34a;
  --st-late-t: #3e2e28; --st-late-l: #945e35; --st-late-i: #fed7aa; --st-late-c: #fb923c;
  --st-canc-t: #3d202b; --st-canc-l: #924c52; --st-canc-i: #fecaca; --st-canc-c: #f87171;
  --st-noshow-t: #402742; --st-noshow-l: #904d78; --st-noshow-i: #fbcfe8; --st-noshow-c: #f472b6;
  --st-wait-t: #353729; --st-wait-l: #937e1f; --st-wait-i: #fef08a; --st-wait-c: #facc15;
  color-scheme: dark;
}

/* ---- base ------------------------------------------------------------------------------------ */
:root { padding-block: env(safe-area-inset-top, 0px) env(safe-area-inset-bottom, 0px); }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: var(--fs-body); line-height: 1.65; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: 600; }
p, li, dd { text-wrap: pretty; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink-2); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.night :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--on-night); }
::selection { background: color-mix(in srgb, var(--red) 20%, transparent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

.skip { position: absolute; left: var(--gutter); top: -100px; z-index: 50; background: var(--on-night); color: var(--night); padding: 10px 16px; border-radius: var(--radius); font-weight: 600; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 8px); color: var(--night); }

.wrap { width: 100%; max-width: calc(var(--measure) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* type roles */
.display { font-size: var(--fs-display); line-height: 1.02; font-weight: 600; letter-spacing: -0.028em; }
.h1 { font-size: var(--fs-h1); line-height: 1.05; font-weight: 600; letter-spacing: -0.024em; }
.h2 { font-size: var(--fs-h2); line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; }
h3, .h3 { font-size: var(--fs-h3); line-height: 1.3; font-weight: 600; letter-spacing: -0.006em; }
.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--ink-2); max-width: 60ch; }
.small { font-size: var(--fs-small); color: var(--ink-2); }
.pt { color: var(--red); }                                       /* the measured point: a red full stop */
.night .pt { color: var(--red); }
.sq { display: inline-block; width: 10px; height: 10px; background: var(--red); flex: none; }

/* the brand's section label: tracked capitals over a hairline, the index in red */
.label {
  display: flex; align-items: baseline; gap: 14px; padding-top: 20px; border-top: 1px solid var(--line-strong);
  font-size: var(--fs-label); line-height: 1.3; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink);
}
.label em { font-style: normal; color: var(--red-text); font-variant-numeric: tabular-nums; }
.tracked {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: var(--fs-meta); line-height: 1.3; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3);
}
.night .tracked { color: var(--on-night-2); }

/* ---- header ---------------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--night); border-bottom: 1px solid var(--night-line); color: var(--on-night);
}
.header-row { display: flex; align-items: center; gap: var(--s5); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; min-height: 44px; flex: none; }
.lockup { display: block; height: 26px; width: auto; }
.site-nav { margin-left: var(--s5); }
.site-nav ul { display: flex; gap: var(--s1); list-style: none; padding: 0; margin: 0; }
.site-nav a {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  color: var(--on-night-2); text-decoration: none; font-weight: 500; font-size: .9375rem; letter-spacing: .01em;
}
.site-nav a:hover { color: var(--on-night); }
.site-nav a[aria-current="page"] { color: var(--on-night); }
.site-nav a[aria-current="page"]::before { content: ""; width: 6px; height: 6px; background: var(--red); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s3); }
.signin { color: var(--on-night-2); text-decoration: none; font-weight: 500; font-size: .9375rem; padding: 0 8px; min-height: 44px; display: inline-flex; align-items: center; }
.signin:hover { color: var(--on-night); }
.menu-btn {
  display: none; min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: var(--radius);
  border: 1px solid #3a3f46; background: transparent; color: var(--on-night); font: 500 .9375rem/1 var(--font); cursor: pointer;
}
.mobile-menu { padding-block: var(--s2) var(--s5); border-top: 1px solid var(--night-line); }
.mobile-menu ul { list-style: none; padding: 0; margin: 0; display: grid; }
.mobile-menu a {
  display: flex; align-items: center; gap: 10px; min-height: 52px; color: var(--on-night); text-decoration: none;
  font-weight: 500; font-size: 1.125rem; border-bottom: 1px solid var(--night-line);
}
.mobile-menu a[aria-current="page"]::before { content: ""; width: 7px; height: 7px; background: var(--red); }
@media (max-width: 920px) { .site-nav, .signin { display: none; } .menu-btn { display: inline-flex; align-items: center; } }
@media (min-width: 921px) { .mobile-menu { display: none !important; } }
@media (max-width: 400px) { .header-actions .btn-sm { display: none; } .lockup { height: 22px; } }

/* ---- buttons and links ----------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border-radius: var(--radius); border: 1px solid transparent; font: 600 .9375rem/1.2 var(--font); letter-spacing: .01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.btn-sm { min-height: 44px; padding: 0 16px; font-size: .875rem; }
.btn-ink { background: var(--btn-bg); color: var(--btn-fg); }
.btn-ink:hover { background: var(--btn-hover); color: var(--btn-fg); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-light { background: #ffffff; color: #0e1114; }
.btn-light:hover { background: #e7e7e4; color: #0e1114; }
.btn-line { background: transparent; color: var(--on-night); border-color: #4a4e54; }
.btn-line:hover { border-color: var(--on-night); color: var(--on-night); }
.arrow-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; font-size: .9375rem; text-decoration: none; color: var(--ink); }
.arrow-link::after {
  content: ""; width: 16px; height: 10px; background: currentColor; flex: none; transition: transform .15s var(--ease);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M0 5h14M10 1l4 4-4 4' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M0 5h14M10 1l4 4-4 4' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.arrow-link:hover::after { transform: translateX(3px); }
.night .arrow-link { color: var(--on-night); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); }

/* ---- dark cover bands ------------------------------------------------------------------------ */
.night { position: relative; background: var(--night); color: var(--on-night); overflow: hidden; isolation: isolate; }
.night .lead { color: var(--on-night-2); }
.reg { position: absolute; width: 22px; height: 22px; z-index: -1; pointer-events: none; }
.reg::before, .reg::after { content: ""; position: absolute; background: #35383a; }
.reg::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.reg::after { top: 50%; left: 0; right: 0; height: 1px; }
.reg-tl { left: 18px; top: 18px; } .reg-tr { right: 18px; top: 18px; } .reg-bl { left: 18px; bottom: 18px; } .reg-br { right: 18px; bottom: 18px; }
@media (max-width: 600px) { .reg { width: 16px; height: 16px; } .reg-tl, .reg-bl { left: 8px; } .reg-tr, .reg-br { right: 8px; } .reg-tl, .reg-tr { top: 8px; } .reg-bl, .reg-br { bottom: 8px; } }

/* ---- home hero ------------------------------------------------------------------------------- */
.hero { padding-block: clamp(36px, 5vw, 64px) clamp(48px, 6vw, 88px); }
.ring-motif { position: absolute; right: -200px; bottom: -250px; width: 560px; height: 560px; z-index: -1; pointer-events: none; color: var(--ghost); }
@media (min-width: 901px) { .hero { background-image: radial-gradient(42% 62% at 80% 46%, rgba(218, 41, 28, .07), transparent 72%); } }
.motto { font-weight: 500; font-size: var(--fs-small); color: var(--on-night); letter-spacing: .01em; }
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s5); row-gap: var(--s6); align-items: center; }
.hero-top { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.hero-text { grid-column: 1 / span 7; display: grid; gap: var(--s5); align-content: start; }
.hero-mark { grid-column: 9 / -1; width: 100%; max-width: 380px; justify-self: center; height: auto; }
.hero-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: var(--s3) var(--s5); flex-wrap: wrap; padding-top: var(--s5); border-top: 1px solid var(--night-line); }
@media (max-width: 900px) {
  .hero-text { grid-column: 1 / -1; }
  .hero-mark { grid-column: 1 / -1; grid-row: 2; max-width: 168px; justify-self: start; margin-top: -8px; }
  .ring-motif { width: 380px; height: 380px; right: -150px; bottom: -170px; }
}

/* ---- light sections -------------------------------------------------------------------------- */
.band { padding-block: clamp(56px, 7vw, 104px); }
.band--mist { background: var(--mist); }
.section-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s5); margin-bottom: clamp(32px, 4vw, 56px); }
.section-head .label { grid-column: 1 / -1; }
.section-head .h2 { grid-column: 1 / span 7; }
.section-head .lead { grid-column: 9 / -1; font-size: var(--fs-body); align-self: end; }
@media (max-width: 900px) { .section-head .h2, .section-head .lead { grid-column: 1 / -1; } }

/* ---- screenshots and the measured point ------------------------------------------------------ */
.shot { display: grid; gap: var(--s3); min-width: 0; }
.shot-frame { position: relative; min-width: 0; }
.shot picture { display: block; min-width: 0; }
.shot img { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #f0f4f9; filter: var(--shot-filter); }
.night .shot img { border-color: var(--night-line); }
.shot figcaption { font-size: var(--fs-small); color: var(--ink-2); max-width: 78ch; }
.shot--phone { justify-self: center; max-width: 300px; }
.shot--phone img { border-radius: 30px; border: 7px solid #1a1d21; }

.mp { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; z-index: 2; }
.mp-mark { position: absolute; left: -32px; top: -32px; width: 64px; height: 64px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-32 -32 64 64'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.92' stroke-width='5.5'%3E%3Ccircle r='15'/%3E%3Cpath d='M0-30v9M0 21v9M-30 0h9M21 0h9'/%3E%3C/g%3E%3Cg fill='none' stroke='%23DA291C' stroke-width='2.4'%3E%3Ccircle r='15'/%3E%3Cpath d='M0-30v9M0 21v9M-30 0h9M21 0h9'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.mp-label {
  position: absolute; top: -17px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: #1a1d21; color: #ffffff; font: 500 .8125rem/1 var(--font); letter-spacing: .01em; padding: 10px 12px; border-radius: 4px;
}
.mp-label b { color: var(--red-night); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.mp[data-side="left"] .mp-label { right: 40px; }
.mp[data-side="right"] .mp-label { left: 40px; }
@media (max-width: 640px) { .mp { left: var(--xs, var(--x)); top: var(--ys, var(--y)); } .mp-label { display: none; } .mp-mark { transform: scale(.72); } }

.caption-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s3) var(--s5); align-items: start; padding-top: var(--s4); }
.caption-grid .legend { grid-column: 1 / span 5; }
.caption-grid p { grid-column: 7 / -1; }
@media (max-width: 900px) { .caption-grid .legend, .caption-grid p { grid-column: 1 / -1; } }
.legend { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); color: var(--ink); font-weight: 500; font-size: var(--fs-small); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend .swatch { width: 12px; height: 12px; border-radius: 2px; background: var(--c); flex: none; }
.tooth { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--red-text); letter-spacing: .02em; }

/* ---- split ----------------------------------------------------------------------------------- */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px); }
.split-col { display: grid; gap: var(--s4); align-content: start; min-width: 0; padding-top: var(--s5); border-top: 2px solid var(--ink); }
.split-col .shot { margin-top: var(--s2); }
@media (max-width: 820px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* ---- steps (a real sequence) ----------------------------------------------------------------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.steps li { display: grid; gap: var(--s2); align-content: start; padding: var(--s5) var(--s4) var(--s5) 0; min-width: 0; }
.steps li + li { padding-left: var(--s4); border-left: 1px solid var(--line-strong); }
.steps .n { font-size: var(--fs-label); font-weight: 600; letter-spacing: .14em; color: var(--red-text); font-variant-numeric: tabular-nums; }
.steps h3 { font-size: 1.0625rem; }
.steps p { font-size: var(--fs-small); color: var(--ink-2); }
@media (max-width: 1100px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } .steps li:nth-child(3n + 1) { padding-left: 0; border-left: 0; } .steps li:nth-child(n + 4) { border-top: 1px solid var(--line-strong); } }
@media (max-width: 640px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li, .steps li + li { padding: var(--s4) 0; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--line-strong); }
}

/* ---- where it runs (a table that stacks) ----------------------------------------------------- */
.runs { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.runs th, .runs td { text-align: left; vertical-align: top; padding: var(--s4) var(--s4) var(--s4) 0; border-bottom: 1px solid var(--line-strong); }
.runs thead th { font-size: var(--fs-meta); text-transform: uppercase; letter-spacing: .18em; color: var(--ink-3); font-weight: 500; padding-top: 0; border-bottom: 2px solid var(--ink); }
.runs tbody th { font-size: 1.0625rem; font-weight: 600; width: 19%; padding-right: var(--s5); }
.runs tbody th small { display: block; font-size: var(--fs-small); font-weight: 400; color: var(--ink-2); margin-top: 2px; }
.runs td { color: var(--ink-2); }
.runs td:last-child { white-space: nowrap; padding-right: 0; }
@media (max-width: 820px) {
  .runs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .runs, .runs tbody, .runs tr, .runs th, .runs td { display: block; width: auto; }
  .runs tr { padding-block: var(--s4); border-bottom: 1px solid var(--line-strong); }
  .runs tbody tr:first-child { border-top: 2px solid var(--ink); }
  .runs th, .runs td { border: 0; padding: 4px 0; }
  .runs tbody th { width: auto; padding-bottom: var(--s2); }
  .runs td[data-label]::before { content: attr(data-label); display: block; font-size: var(--fs-meta); text-transform: uppercase; letter-spacing: .18em; font-weight: 500; color: var(--ink-3); margin-top: var(--s2); }
}

/* ---- facts (typographic grid) ---------------------------------------------------------------- */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s7) var(--s6); }
.facts article { display: grid; gap: var(--s2); align-content: start; padding-top: var(--s4); border-top: 1px solid var(--line-strong); min-width: 0; }
.facts h3 { font-size: 1.125rem; }
.facts p:not(.tracked) { color: var(--ink-2); font-size: var(--fs-small); }
@media (max-width: 960px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .facts { grid-template-columns: minmax(0, 1fr); gap: var(--s5); } }

/* ---- call to action -------------------------------------------------------------------------- */
.cta { padding-block: clamp(56px, 7vw, 96px); }
.cta-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s5); align-items: center; }
.cta-text { grid-column: 1 / span 8; display: grid; gap: var(--s5); }
.cta-mark { grid-column: 10 / -1; width: 100%; max-width: 220px; height: auto; justify-self: end; }
@media (max-width: 760px) { .cta-text { grid-column: 1 / -1; } .cta-mark { display: none; } }

/* ---- inner page head ------------------------------------------------------------------------- */
.page-head { padding-block: clamp(40px, 6vw, 80px) clamp(36px, 5vw, 60px); }
.page-head .wrap { display: grid; gap: var(--s5); }
.page-head .h1 { max-width: 16ch; }
.toc { margin-top: var(--s2); }
.toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.toc a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid #343940; border-radius: var(--radius);
  text-decoration: none; color: var(--on-night); font-weight: 500; font-size: .875rem;
}
.toc a:hover { border-color: var(--on-night); color: var(--on-night); }

/* ---- feature sections ------------------------------------------------------------------------ */
.feature { padding-block: clamp(48px, 6vw, 88px); }
.feature:nth-of-type(odd) { background: var(--mist); }
.feature-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s6) var(--s5); align-items: start; }
.feature-grid > .label { grid-column: 1 / -1; }
.feature-text { grid-column: 1 / span 6; display: grid; gap: var(--s4); align-content: start; min-width: 0; }
.feature-text--wide { grid-column: 1 / span 8; }
.feature-aside { grid-column: 8 / -1; min-width: 0; }
.feature-shot { grid-column: 1 / -1; }
.feature p:not(.small):not(.label):not(.tracked) { color: var(--ink-2); max-width: 64ch; }
@media (max-width: 900px) { .feature-text, .feature-text--wide, .feature-aside { grid-column: 1 / -1; } }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 22px; color: var(--ink); font-size: var(--fs-small); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .66em; width: 10px; height: 1px; background: var(--ink); }
.cols-2 { display: block; columns: 2 280px; column-gap: var(--s6); }
.cols-2 li { break-inside: avoid; margin-bottom: 10px; }

/* the appointment statuses, as in the app */
.statuses { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.statuses li {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px 0 10px; background: var(--t); color: var(--i);
  border: 1px solid var(--l); border-left: 4px solid var(--c); border-radius: 4px; font-weight: 500; font-size: var(--fs-small);
}
.st-open { --t: var(--st-open-t); --l: var(--st-open-l); --i: var(--st-open-i); --c: var(--st-open-c); }
.st-conf { --t: var(--st-conf-t); --l: var(--st-conf-l); --i: var(--st-conf-i); --c: var(--st-conf-c); }
.st-in { --t: var(--st-in-t); --l: var(--st-in-l); --i: var(--st-in-i); --c: var(--st-in-c); }
.st-prog { --t: var(--st-prog-t); --l: var(--st-prog-l); --i: var(--st-prog-i); --c: var(--st-prog-c); }
.st-done { --t: var(--st-done-t); --l: var(--st-done-l); --i: var(--st-done-i); --c: var(--st-done-c); }
.st-late { --t: var(--st-late-t); --l: var(--st-late-l); --i: var(--st-late-i); --c: var(--st-late-c); }
.st-canc { --t: var(--st-canc-t); --l: var(--st-canc-l); --i: var(--st-canc-i); --c: var(--st-canc-c); }
.st-noshow { --t: var(--st-noshow-t); --l: var(--st-noshow-l); --i: var(--st-noshow-i); --c: var(--st-noshow-c); }
.st-wait { --t: var(--st-wait-t); --l: var(--st-wait-l); --i: var(--st-wait-i); --c: var(--st-wait-c); border-style: dashed; border-left-style: solid; }

.names { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); border-top: 2px solid var(--ink); }
.names li { padding: var(--s3) var(--s4) var(--s3) 0; border-bottom: 1px solid var(--line-strong); font-weight: 600; font-size: var(--fs-small); }
.names li small { display: block; font-weight: 400; color: var(--ink-2); font-size: var(--fs-small); }

/* the lab's stages, on the dark head */
.stages { list-style: none; padding: 0; margin: var(--s2) 0 0; display: flex; flex-wrap: wrap; counter-reset: stage; }
.stages li {
  counter-increment: stage; position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
  padding: 0 18px 0 0; margin: 0 14px 8px 0; font-weight: 500; font-size: var(--fs-small); color: var(--on-night);
}
.stages li::before { content: counter(stage, decimal-leading-zero); font-size: var(--fs-meta); font-weight: 600; letter-spacing: .12em; color: var(--red-night); }
.stages li:not(:last-child)::after { content: ""; position: absolute; right: -4px; top: 50%; width: 12px; height: 1px; background: #4a4e54; }
.stages li.is-out { color: var(--on-night-2); }
.stages li.is-out span { text-decoration: underline dashed #5a5f66; text-underline-offset: 6px; }
.case-no { font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .03em; }

/* ---- pricing --------------------------------------------------------------------------------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.plan { display: grid; grid-template-rows: auto auto auto auto 1fr; gap: var(--s4); padding: var(--s6) var(--s5) var(--s6) 0; min-width: 0; }
.plan + .plan { padding-left: var(--s5); border-left: 1px solid var(--line-strong); }
.plan h2 { font-size: var(--fs-h2); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.plan .for { color: var(--ink-2); font-size: var(--fs-small); min-height: 3.4em; }
.plan .price { font-weight: 600; font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.01em; }
.plan .price small { display: block; font-weight: 400; font-size: var(--fs-small); color: var(--ink-2); letter-spacing: 0; }
.plan--both { position: relative; background: var(--mist); padding-left: var(--s5); }
.plan-flag { position: absolute; top: 0; left: var(--s5); transform: translateY(-50%); gap: 10px; padding: 8px 12px; border-radius: 3px; background: var(--btn-bg); color: var(--btn-fg); }
.plan-flag .sq { width: 8px; height: 8px; }
.plan .ticks { align-content: start; }
@media (max-width: 960px) {
  .plans { grid-template-columns: minmax(0, 1fr); }
  .plan, .plan + .plan { padding: var(--s6) 0; border-left: 0; border-bottom: 1px solid var(--line-strong); }
  .plan.plan--both { padding-inline: var(--gutter); margin-inline: calc(-1 * var(--gutter)); }
  .plan-flag { left: var(--gutter); }
  .plan .for { min-height: 0; }
}
.note-line { margin-top: var(--s6); color: var(--ink-2); font-size: var(--fs-small); max-width: 75ch; }

.faq { border-top: 2px solid var(--ink); max-width: 880px; }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s4); min-height: 60px; padding-block: var(--s3); font-weight: 600; font-size: 1.0625rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.5rem; color: var(--ink-3); line-height: 1; flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding-bottom: var(--s5); color: var(--ink-2); max-width: 70ch; display: grid; gap: var(--s3); }

/* ---- download -------------------------------------------------------------------------------- */
.dl-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s7) var(--s5); align-items: start; }
.dl-box { grid-column: 1 / span 5; border: 1px solid var(--line-strong); border-top: 4px solid var(--ink); border-radius: var(--radius); padding: var(--s6) var(--s5); display: grid; gap: var(--s5); background: var(--paper); min-width: 0; }
.dl-box .file { font-weight: 600; font-size: 1rem; letter-spacing: .01em; word-break: break-all; }
.spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s5); }
.spec dt { font-size: var(--fs-meta); text-transform: uppercase; letter-spacing: .18em; font-weight: 500; color: var(--ink-3); }
.spec dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.dl-steps { grid-column: 7 / -1; list-style: none; padding: 0; margin: 0; counter-reset: dl; display: grid; border-top: 2px solid var(--ink); }
.dl-steps li { counter-increment: dl; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px var(--s3); padding: var(--s4) 0; border-bottom: 1px solid var(--line-strong); }
.dl-steps li::before { content: counter(dl, decimal-leading-zero); grid-row: 1 / span 2; font-size: var(--fs-label); font-weight: 600; letter-spacing: .12em; color: var(--red-text); padding-top: 4px; }
.dl-steps h3 { font-size: 1.0625rem; }
.dl-steps p { color: var(--ink-2); font-size: var(--fs-small); }
@media (max-width: 900px) { .dl-box, .dl-steps { grid-column: 1 / -1; } }
.code { font-size: .92em; font-weight: 500; background: var(--mist); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; white-space: nowrap; color: var(--ink); }
.versions { display: grid; border-top: 2px solid var(--ink); max-width: 880px; }
.versions article { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--s2) var(--s5); padding: var(--s5) 0; border-bottom: 1px solid var(--line-strong); }
.versions .v { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); padding-top: 2px; }
.versions .v small { display: block; color: var(--ink-3); font-size: var(--fs-meta); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.versions ul { margin: var(--s2) 0 0; padding-left: 18px; color: var(--ink-2); font-size: var(--fs-small); display: grid; gap: 6px; }
@media (max-width: 600px) { .versions article { grid-template-columns: minmax(0, 1fr); } }

/* ---- contact --------------------------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s7) var(--s5); align-items: start; }
.form { grid-column: 1 / span 7; display: grid; gap: var(--s5); min-width: 0; }
.form > .label:not(:first-child) { margin-top: var(--s4); }
.contact-side { grid-column: 9 / -1; display: grid; gap: var(--s5); min-width: 0; }
@media (max-width: 900px) { .form, .contact-side { grid-column: 1 / -1; } }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field label, .field legend { font-weight: 600; font-size: var(--fs-small); color: var(--ink); padding: 0; }
.field .hint { font-size: var(--fs-meta); color: var(--ink-3); font-weight: 400; letter-spacing: .02em; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); font: 400 1rem/1.4 var(--font);
}
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 14%, transparent); }
.field [aria-invalid="true"] { border-color: var(--red); }
.field .error { color: var(--red-text); font-size: var(--fs-small); font-weight: 600; }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
@media (max-width: 600px) { .row-2 { grid-template-columns: minmax(0, 1fr); } }
fieldset.field { border: 0; margin: 0; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: 4px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); font-weight: 500; font-size: var(--fs-small); color: var(--ink); background: var(--paper); }
.choice input:checked + span { border-color: var(--btn-bg); background: var(--btn-bg); color: var(--btn-fg); }
.choice input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.ready { border: 1px solid var(--line-strong); border-top: 4px solid var(--ink); border-radius: var(--radius); padding: var(--s5); display: grid; gap: var(--s4); background: var(--paper); }
.ready pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 400 var(--fs-small)/1.6 var(--font); background: var(--mist); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); color: var(--ink); }
.reach { display: grid; border-top: 2px solid var(--ink); }
.label + .reach { border-top: 0; }
.reach div { display: grid; gap: 4px; padding: var(--s4) 0; border-bottom: 1px solid var(--line-strong); }
.reach dt { font-size: var(--fs-meta); text-transform: uppercase; letter-spacing: .18em; font-weight: 500; color: var(--ink-3); }
.reach dd { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); font-weight: 600; font-size: 1.0625rem; }
.reach dd .value { user-select: all; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.copy-btn { min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); color: var(--ink); font: 600 .875rem/1 var(--font); cursor: pointer; }
.copy-btn:hover { border-color: var(--ink); }
.status-line { font-size: var(--fs-small); color: var(--ink-2); min-height: 1.4em; }

/* ---- privacy --------------------------------------------------------------------------------- */
.prose { max-width: 70ch; display: grid; gap: var(--s4); }
.prose h2 { display: flex; align-items: baseline; gap: 14px; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--line-strong); }
.prose h2 em, .toc-side em { font-style: normal; flex: none; font-size: var(--fs-label); font-weight: 600; letter-spacing: .14em; color: var(--red-text); font-variant-numeric: tabular-nums; }
.prose h2:first-child { margin-top: 0; border-top: 2px solid var(--ink); }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul { padding-left: 20px; display: grid; gap: 8px; }
.prose-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s6) var(--s5); align-items: start; }
.prose-grid .prose { grid-column: 1 / span 8; }
.prose-grid .toc-side { grid-column: 10 / -1; position: sticky; top: calc(var(--header-h) + 24px + env(safe-area-inset-top, 0px)); display: grid; gap: 0; font-size: var(--fs-small); border-top: 2px solid var(--ink); }
.toc-side a { display: flex; align-items: baseline; gap: 12px; color: var(--ink-2); text-decoration: none; padding: 10px 0; border-bottom: 1px solid var(--line); }
.toc-side a:hover { color: var(--ink); }
@media (max-width: 900px) { .prose-grid .prose { grid-column: 1 / -1; } .prose-grid .toc-side { display: none; } }

/* ---- footer ---------------------------------------------------------------------------------- */
.site-footer { background: var(--night); color: var(--on-night-2); padding-block: var(--s8) var(--s6); font-size: var(--fs-small); border-top: 1px solid var(--night-line); }
.site-footer a { color: var(--on-night); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--on-night); }
.footer-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s6) var(--s5); }
.footer-brand { grid-column: 1 / span 4; display: grid; gap: var(--s4); align-content: start; }
.footer-col { grid-column: span 2; display: grid; gap: var(--s2); align-content: start; }
.footer-col--wide { grid-column: span 4; }
.footer-col h2 { font-size: var(--fs-meta); text-transform: uppercase; letter-spacing: .18em; font-weight: 500; color: var(--on-night-3); margin-bottom: var(--s1); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; }
.footer-col li a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-base { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--night-line); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); justify-content: space-between; align-items: center; }
.footer-base .tracked { color: var(--on-night-3); }
@media (max-width: 900px) { .footer-brand, .footer-col--wide { grid-column: 1 / -1; } .footer-col { grid-column: span 6; } }

/* ---- motion ---------------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
