/* Dental Cliff 2027 — stylesheet
   One family (Archivo, variable width) does everything; width is the expressive axis.
   Color: amber = adults, blue = children, light ink = "leaves", gray = "stays". No alarm colors. */

:root {
  --night: #0e0f11;
  --night-2: #15171a;
  --night-3: #1c1f23;
  --line: #25282d;
  --line-2: #363a40;
  --ink: #f3eee4;
  --ink-2: #bdb7ab;
  --ink-3: #8f8a80;
  --adult: #c4861a;
  --child: #3a9fd0;
  --leave: #ece6da;
  --stay: #4a4d53;
  --paper: #f1ece2;
  --paper-2: #e7e1d4;
  --paper-ink: #15161a;
  --paper-ink-2: #55514a;
  --paper-line: #d3cbbb;
  --paper-accent: #8a5d12;
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1240px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--adult); color: #140c02; }
:focus-visible { outline: 2px solid var(--adult); outline-offset: 3px; border-radius: 2px; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .88em; }

.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--night); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- type ---------- */
.display {
  font-weight: 720;
  font-variation-settings: "wdth" 78;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
.kicker {
  font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600;
  color: var(--ink-3); font-variation-settings: "wdth" 108;
}
.kicker b { color: var(--ink-2); font-weight: 600; }
.nw { white-space: nowrap; }
.lede { font-size: clamp(17px, 1.45vw, 19.5px); color: var(--ink-2); max-width: 62ch; }
.lede b, .lede strong { color: var(--ink); font-weight: 600; }
.small { font-size: 14px; color: var(--ink-3); }
.fine { font-size: 14px; color: var(--ink-3); max-width: 90ch; margin: 14px 0 0; }
.h3 { font-size: 22px; line-height: 1.2; margin: 0 0 10px; font-weight: 700; font-variation-settings: "wdth" 85; letter-spacing: -.005em; }
.k-a { color: var(--ink); border-bottom: 2px solid var(--adult); }
.k-c { color: var(--ink); border-bottom: 2px solid var(--child); }
.key { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }
.key.sq { width: 10px; height: 10px; border-radius: 2px; }
.key.dotk { width: 9px; height: 9px; border-radius: 50%; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 15, 17, 0.88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar-in { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand svg { width: 26px; height: 19px; }
.brand-name { font-weight: 760; font-variation-settings: "wdth" 80; font-size: 18px; letter-spacing: -.005em; line-height: 1; }
.brand-tag { font-size: 11px; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line-2); padding: 2px 6px; border-radius: 3px; white-space: nowrap; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 14px; color: var(--ink-2); padding: 8px 9px; border-radius: 4px; position: relative; transition: color .2s; }
.nav a::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 4px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:hover, .nav a.on { color: var(--ink); }
.nav a:hover::after, .nav a.on::after { transform: scaleX(1); }
.bar-cta { flex: none; font-size: 13.5px; text-decoration: none; border: 1px solid var(--line-2); padding: 6px 12px; border-radius: 999px; color: var(--ink); transition: border-color .2s, background .2s; }
.bar-cta:hover { border-color: var(--ink-2); background: var(--night-3); }
.menu-btn { display: none; background: none; border: 1px solid var(--line-2); border-radius: 4px; padding: 7px 10px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.menu-sheet { display: none; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(28px, 4vw, 56px); position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: end; }
.hero h1 { font-size: clamp(40px, 5.2vw, 76px); max-width: 15em; }
.hero h1 .big { color: var(--adult); }
.hero .kicker { margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px 0; }
.hero .kicker > span:not(:last-child)::after { content: "/"; margin: 0 14px; color: var(--line-2); }
.hero .lede { margin: 22px 0 0; }

.glance { border-left: 1px solid var(--line-2); padding-left: 22px; padding-bottom: 4px; }
.glance .kicker { margin: 0 0 6px; }
.glance dl { margin: 0; }
.glance dl > div { border-top: 1px solid var(--line); padding: 12px 0 13px; }
.glance dl > div:first-child { border-top: 0; padding-top: 4px; }
.glance dt { font-size: 12.5px; color: var(--ink-3); margin-bottom: 3px; }
.glance dd { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.4; }
.glance .gv { color: var(--ink); font-size: 21px; font-weight: 700; font-variation-settings: "wdth" 80; letter-spacing: -.01em; }
.glance .gv b { font-weight: 700; }
.glance small { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.glance a { color: var(--ink-2); text-underline-offset: 3px; }

.sky { margin-top: clamp(28px, 3.4vw, 44px); position: relative; }
.sky-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.sky-head .small { max-width: 62ch; margin: 0; }
.sky-stage { position: relative; touch-action: pan-y; cursor: ew-resize; outline: none; }
.sky-stage:focus-visible { outline: 2px solid var(--adult); outline-offset: 6px; }
.sky-stage canvas { width: 100%; height: 260px; }
.sky-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; padding: 8px 0 0; border-top: 1px solid var(--line-2); margin-right: 56px; }
.sky-tag {
  position: absolute; top: 0; pointer-events: none;
  background: var(--ink); color: var(--night); padding: 6px 10px 7px; border-radius: 3px;
  font-size: 13px; line-height: 1.25; white-space: nowrap;
  transform: translateX(10px); box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.sky-tag.flip { transform: translateX(calc(-100% - 10px)); }
.sky-tag b { font-size: 19px; font-weight: 750; font-variation-settings: "wdth" 80; display: block; }
.sky-foot { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.sky-read { margin: 18px 0 0; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.35; max-width: 56ch; min-height: 2.7em; }
.sky-read b { font-weight: 700; }
.sky-read .dim { color: var(--ink-3); font-size: .72em; display: block; margin-top: 4px; line-height: 1.45; }
.hint { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: 22px; }
.hint svg { width: 30px; height: 10px; }
.hint .arr { animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(4px); } }
.define { margin: 26px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 14px; max-width: 880px; }
.define dt { color: var(--ink); font-weight: 600; }
.define dd { margin: 0; }

/* ---------- segmented / buttons ---------- */
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; gap: 2px; background: var(--night-2); }
.seg button {
  border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-size: 13.5px; cursor: pointer; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 7px; transition: background .2s, color .2s; min-height: 34px;
}
.seg button:hover { color: var(--ink); background: var(--night-3); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--night); font-weight: 600; }
.seg .dot { width: 8px; height: 8px; border-radius: 50%; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink);
  padding: 9px 14px; border-radius: 4px; font-size: 14px; text-decoration: none;
  transition: border-color .2s, background .2s;
}
.btn:hover { border-color: var(--ink-2); background: var(--night-3); }
.btn svg { width: 14px; height: 14px; }
.btn.ghost { border-color: transparent; padding-left: 0; padding-right: 0; color: var(--ink-2); }
.btn.ghost:hover { background: none; color: var(--ink); }
.toast { font-size: 13px; color: var(--adult); margin-left: 10px; opacity: 0; transition: opacity .3s; }
.toast.show { opacity: 1; }
.filters { display: flex; gap: 10px 14px; flex-wrap: wrap; margin: 6px 0 10px; }

/* ---------- sections ---------- */
.sec { padding: clamp(80px, 9vw, 128px) 0 0; }
.sec-head { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; margin-bottom: clamp(28px, 4vw, 44px); }
.sec-no { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding-top: 10px; border-top: 1px solid var(--ink); align-self: start; }
.sec-no b { color: var(--ink); font-weight: 700; margin-right: 10px; font-variant-numeric: tabular-nums; }
.sec-head h2 { font-size: clamp(34px, 4.3vw, 60px); max-width: 19ch; }
.sec-head .lede { margin: 18px 0 0; }
/* hidden only once JS has run (html.js is set by an inline script), so the page reads without JS */
html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
.noscript { margin: 0; padding: 12px var(--gutter); background: var(--night-2); border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }

/* ---------- panels & charts ---------- */
.panel { background: var(--night-2); border: 1px solid var(--line); border-radius: 6px; padding: 20px 22px 18px; }
.panel-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 8px; }
.panel-title { font-size: 15.5px; font-weight: 650; margin: 0; line-height: 1.35; }
.panel-sub { font-size: 13px; color: var(--ink-3); margin: 3px 0 0; }
.legend { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); padding-top: 2px; }
.legend span { display: inline-flex; align-items: center; }
.chart { position: relative; }
.chart svg { width: 100%; overflow: visible; }
.chart svg text { font-family: var(--font); }
.chart .tick { font-size: 11.5px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis { stroke: var(--line-2); stroke-width: 1; shape-rendering: crispEdges; }
.chart .lab { font-size: 12.5px; fill: var(--ink-2); }
.chart .lab-strong { font-size: 13px; fill: var(--ink); font-weight: 700; }
.chart .row-lab { font-size: 13.5px; fill: var(--ink); }
.chart .row-sub { font-size: 12px; fill: var(--ink-3); }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .rowhit { fill: transparent; cursor: default; }
.chart .rowhit:hover, .chart .rowhit.on { fill: rgba(243, 238, 228, .035); }
.chart .lab, .chart .lab-strong, .chart .tick, .chart .row-lab, .chart .row-sub { paint-order: stroke; stroke: var(--night-2); stroke-width: 4px; stroke-linejoin: round; }
.chart:focus-visible { outline: 2px solid var(--adult); outline-offset: 4px; }
.tip {
  position: absolute; pointer-events: none; z-index: 5;
  background: #f3eee4; color: #121316; border-radius: 4px; padding: 9px 12px 10px;
  font-size: 13px; line-height: 1.35; min-width: 170px; max-width: 280px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  opacity: 0; transition: opacity .12s;
}
.tip.show { opacity: 1; }
.tip .t-h { font-size: 12px; color: #55514a; margin-bottom: 6px; }
.tip .t-r { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.tip .t-r + .t-r { margin-top: 3px; }
.tip .t-r b { font-size: 16px; font-weight: 800; min-width: 52px; }
.tip .t-r .k { width: 14px; height: 2px; border-radius: 2px; flex: none; }
.tip .t-r span:last-child { color: #55514a; }
.tip .t-n { font-size: 12px; color: #55514a; margin-top: 6px; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.data caption { text-align: left; font-size: 13px; color: var(--ink-3); padding-bottom: 8px; }
table.data th, table.data td { text-align: right; padding: 7px 10px; border-bottom: 1px solid var(--line); }
table.data th:first-child, table.data td:first-child { text-align: left; padding-left: 0; }
table.data thead th { font-weight: 600; color: var(--ink-2); font-size: 12.5px; letter-spacing: .03em; vertical-align: bottom; }
.panel-foot { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.panel-foot .small { flex: 1 1 280px; }

/* ---------- concentration ---------- */
.conc { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; align-items: start; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { border-top: 1px solid var(--line); padding: 16px 0 18px; }
.facts .v { font-size: 42px; font-weight: 720; font-variation-settings: "wdth" 76; line-height: 1; letter-spacing: -.015em; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.facts .v .sep { color: var(--line-2); font-weight: 300; }
.facts .v .u { font-size: 15px; color: var(--ink-3); font-weight: 500; font-variation-settings: "wdth" 100; letter-spacing: 0; }
.facts p { margin: 8px 0 0; font-size: 15px; color: var(--ink-2); }
.facts .not .tag { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; display: block; margin-bottom: 8px; }
.context { margin-top: 40px; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; border-top: 1px solid var(--line); padding-top: 22px; }
.context-k { margin: 0; font-size: 20px; font-weight: 700; font-variation-settings: "wdth" 85; line-height: 1.25; }
.context p:last-child { margin: 0; color: var(--ink-2); font-size: 16px; max-width: 72ch; }
.context a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--ink-3); }

/* ---------- which 49% ---------- */
.est { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; align-items: start; }
.est-num { margin: 0; font-size: clamp(76px, 8.6vw, 124px); font-weight: 720; font-variation-settings: "wdth" 72; line-height: .85; letter-spacing: -.03em; color: var(--ink); }
.est-cap { font-size: 18.5px; line-height: 1.4; margin: 16px 0 0; }
.est-dim { font-size: 14px; color: var(--ink-3); margin: 10px 0 0; line-height: 1.5; }
.chip, .scenario-chip { display: inline-block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ink-2); border: 1px solid var(--line-2); padding: 3px 7px; border-radius: 3px; margin: 16px 0 0; }
.scenario-chip { margin: 0 0 12px; }
.how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; margin-top: 48px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: st; }
.steps li { counter-increment: st; position: relative; padding: 12px 0 13px 40px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 15.5px; }
.steps li::before { content: counter(st); position: absolute; left: 0; top: 11px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.steps b { color: var(--ink); font-weight: 650; }
.steps a { color: var(--ink-2); text-underline-offset: 3px; }
.more { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.more summary { cursor: pointer; font-size: 14.5px; color: var(--ink); list-style: none; display: inline-flex; align-items: center; gap: 8px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line-2); border-radius: 50%; font-size: 14px; color: var(--ink-2); }
.more[open] summary::before { content: "\2013"; }
.grid-more { margin-top: 12px; }
.grid-more > p { margin: 10px 0 8px; max-width: 80ch; }
table.grid12 td.main { color: var(--ink); font-weight: 700; }
table.grid12 td.main::after { content: " main"; font-size: 11px; font-weight: 500; color: var(--adult); letter-spacing: .04em; }
.assump { margin: 12px 0 0; padding-left: 20px; color: var(--ink-2); font-size: 14.5px; }
.assump li { margin-bottom: 8px; padding-left: 4px; }
.who .panel-sub { margin-bottom: 10px; }
.who > .small { margin: 12px 0 0; }
table.wl td, table.wl th { padding: 6px 8px; }
table.wl td.wl-bar { width: 42%; padding-right: 0; }
.wlbar { display: flex; align-items: center; gap: 8px; }
.wlbar i { display: block; height: 10px; background: var(--leave); border-radius: 0 3px 3px 0; min-width: 2px; }
.wlbar span { font-size: 13px; color: var(--ink); min-width: 42px; }
table.wl td.sh { color: var(--ink-2); }
.checks { margin-top: 36px; }
.explore-head { margin-top: 64px; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; border-top: 1px solid var(--line); padding-top: 22px; margin-bottom: 22px; }
.explore-head .h3 { margin: 0; }
.explore-head p { margin: 0; color: var(--ink-2); font-size: 15.5px; max-width: 70ch; }
.explore-head b { color: var(--ink); }

/* ---------- simulator ---------- */
.sim { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; align-items: start; }
.controls { position: sticky; top: 84px; }
.ctl { border-top: 1px solid var(--line); padding: 16px 0 18px; }
.ctl:first-child { border-top: 0; padding-top: 0; }
.ctl-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.ctl-label output { font-size: 28px; letter-spacing: -.01em; text-transform: none; color: var(--ink); font-weight: 720; font-variation-settings: "wdth" 76; font-variant-numeric: tabular-nums; }
.ctl .sub { font-size: 13.5px; color: var(--ink-2); margin: 10px 0 0; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
.presets button {
  border: 1px solid var(--line-2); background: var(--night-2); padding: 9px 6px; border-radius: 4px; cursor: pointer; font-size: 13px; line-height: 1.2; color: var(--ink-2);
  transition: border-color .2s, color .2s, background .2s;
}
.presets button:hover { color: var(--ink); border-color: var(--ink-3); }
.presets button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); background: var(--night-3); }
.range-wrap { position: relative; padding-top: 4px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--ink-2) 0 var(--p, 50%), var(--line-2) var(--p, 50%) 100%); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line-2); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--ink-2); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); border: 4px solid var(--night); margin-top: -9px; box-shadow: 0 0 0 1px var(--ink-3); transition: transform .15s; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 4px solid var(--night); box-shadow: 0 0 0 1px var(--ink-3); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type=range].tilt::-webkit-slider-runnable-track { background: var(--line-2); }
.range-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.out { display: grid; gap: 14px; }
.big-out { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 22px; align-items: end; padding: 4px 0 18px; border-bottom: 1px solid var(--line); }
.big-num { font-size: clamp(64px, 7.4vw, 104px); font-weight: 720; font-variation-settings: "wdth" 72; line-height: .82; letter-spacing: -.03em; color: var(--ink); }
.big-num small { font-size: .45em; letter-spacing: 0; }
.big-cap { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.3; padding-bottom: 4px; }
.big-cap .dim { display: block; font-size: 13.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.45; }
.duo { display: grid; gap: 10px; }
.duo-row { display: grid; grid-template-columns: 210px minmax(0, 1fr) 64px; gap: 14px; align-items: center; font-size: 14px; }
.duo-row .lbl { color: var(--ink-2); }
.duo-row .val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.track { height: 14px; background: var(--night-3); border-radius: 3px; position: relative; overflow: hidden; }
.fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--leave); border-radius: 0 3px 3px 0; transition: width .45s var(--ease); }
.fill.muted { background: var(--stay); }
.sim-key { margin: 6px 0 8px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin: 0 5px 0 8px; }
.sw-leave { background: var(--leave); }
.sw-stay { background: var(--stay); }
.sim-sky canvas { width: 100%; height: 190px; }
.sim-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; border-top: 1px solid var(--line-2); padding-top: 6px; margin-right: 46px; }
.range-line { font-size: clamp(18px, 1.8vw, 24px); line-height: 1.3; font-weight: 650; font-variation-settings: "wdth" 85; margin: 0; }
.range-line .dim { font-weight: 400; color: var(--ink-3); font-variation-settings: "wdth" 100; font-size: 14.5px; display: block; margin-top: 8px; line-height: 1.5; }
.status { font-size: 12.5px; color: var(--ink-3); min-height: 1.4em; }

/* ---------- exits / attrition ---------- */
.att-wrap { margin-top: 64px; }
.att-intro { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; border-top: 1px solid var(--line); padding-top: 22px; margin-bottom: 28px; }
.att-intro .h3 { margin: 0; }
.att-intro p { margin: 0; color: var(--ink-2); font-size: 15.5px; max-width: 64ch; }
.att { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
.waffle-card h4 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.waffle-card .small { margin: 0 0 16px; }
.waffle { position: relative; }
.wcell { position: absolute; border-radius: 2px; transition: transform .28s var(--ease), background .4s, opacity .2s; will-change: transform; }
.wcell.c1 { background: #8f8a80; }
.wcell.c2 { background: #5a5d63; }
.wcell.c3 { background: var(--leave); }
.wghost { position: absolute; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(236, 230, 218, .35); }
.ledge { position: absolute; left: 0; right: 0; height: 1px; background: var(--ink-3); }
.ledge span { position: absolute; top: 6px; font-size: 11.5px; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.wcell:hover, .wcell.hot { filter: brightness(1.2); }
.att-legend { list-style: none; margin: 0; padding: 0; }
.att-legend li { display: grid; grid-template-columns: 14px minmax(0, 1fr) 64px 78px; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums; cursor: default; }
.att-legend li.head { font-size: 12px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }
.att-legend li span:nth-child(3), .att-legend li span:nth-child(4) { text-align: right; }
.att-legend li.none { color: var(--ink); font-weight: 700; }
.att-legend li:not(.head):hover { background: var(--night-2); }
.att-hero { font-size: clamp(56px, 6vw, 88px); font-weight: 720; font-variation-settings: "wdth" 72; line-height: .85; color: var(--ink); margin: 0 0 12px; letter-spacing: -.02em; }
.att-cap { margin: 0 0 18px; color: var(--ink-2); }
.note-box { margin: 20px 0 14px; font-size: 14px; color: var(--ink-2); border-left: 2px solid var(--line-2); padding-left: 14px; }
.note-box p { margin: 0; }
.note-box b { color: var(--ink); }

/* ---------- timeline ---------- */
.tl { list-style: none; margin: 0; padding: 0 0 0 180px; position: relative; max-width: 1000px; }
.tl::before { content: ""; position: absolute; left: 204px; top: 10px; bottom: 10px; width: 1px; background: var(--line-2); }
.tl-y { position: relative; height: 0; }
.tl-y span { position: absolute; left: -180px; top: 14px; font-size: 13px; letter-spacing: .1em; color: var(--ink-3); font-variant-numeric: tabular-nums; border-top: 1px solid var(--ink-3); padding-top: 6px; width: 140px; }
.tl-e { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 0 24px; position: relative; padding: 8px 0 14px 56px; }
.tl-e::before { content: ""; position: absolute; left: 19px; top: 21px; width: 11px; height: 11px; border-radius: 50%; background: var(--night); box-shadow: 0 0 0 1px var(--ink-3); }
.tl-e.done::before { background: var(--ink-2); box-shadow: 0 0 0 1px var(--ink-2); }
.tl-e.project::before { border-radius: 2px; background: var(--adult); box-shadow: 0 0 0 1px var(--adult); }
.tl-e.tl-key::before { width: 13px; height: 13px; left: 18px; top: 20px; background: var(--ink); box-shadow: 0 0 0 1px var(--ink), 0 0 0 5px var(--night), 0 0 0 6px var(--line-2); }
.tl-e time { font-size: 15px; font-weight: 650; color: var(--ink); padding-top: 12px; line-height: 1.3; }
.tl-e > div { border-top: 1px solid var(--line); padding-top: 12px; }
.tl-e h3 { margin: 0 0 4px; font-size: 18px; line-height: 1.3; font-weight: 650; }
.tl-e p { margin: 0; color: var(--ink-2); font-size: 15px; max-width: 64ch; }
.tl-e .src { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.tl-e.tl-key h3 { font-size: 20px; }
.tl-e.now > div { border-top-color: var(--adult); }
.pill { display: inline-block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; padding: 2px 6px; border-radius: 3px; margin-bottom: 8px; border: 1px solid currentColor; }
.p-done { color: var(--ink-2); }
.p-proj { color: var(--adult); }
.p-est { color: var(--ink-3); }
.p-sched { color: var(--ink); }

/* ---------- methods (paper) ---------- */
.paper { background: var(--paper); color: var(--paper-ink); margin-top: clamp(80px, 10vw, 128px); padding-bottom: clamp(64px, 8vw, 104px); }
.paper .sec { padding-top: clamp(56px, 7vw, 92px); }
.paper .sec-no { color: var(--paper-ink-2); border-top-color: var(--paper-ink); }
.paper .sec-no b { color: var(--paper-ink); }
.paper .lede { color: var(--paper-ink-2); }
.paper :focus-visible { outline-color: var(--paper-accent); }
.pipe { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-bottom: 56px; border: 1px solid var(--paper-ink); }
.pipe > div { padding: 16px 16px 18px; border-right: 1px solid var(--paper-line); position: relative; font-size: 14px; color: var(--paper-ink-2); }
.pipe > div:last-child { border-right: 0; background: var(--paper-ink); color: #d9d3c7; }
.pipe > div:last-child .pn, .pipe > div:last-child h4 { color: var(--paper); }
.pipe .pn { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--paper-ink-2); font-weight: 600; }
.pipe h4 { margin: 6px 0 6px; font-size: 16px; line-height: 1.25; color: var(--paper-ink); }
.pipe > div:not(:last-child)::after { content: ""; position: absolute; right: -7px; top: 50%; width: 12px; height: 12px; background: var(--paper); border-top: 1px solid var(--paper-ink); border-right: 1px solid var(--paper-ink); transform: translateY(-50%) rotate(45deg); z-index: 1; }
.limits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; counter-reset: lim; }
.limit { border-top: 1px solid var(--paper-ink); padding: 16px 0 22px; display: grid; align-content: start; grid-template-columns: 36px minmax(0, 1fr); gap: 4px 10px; }
.limit::before { counter-increment: lim; content: counter(lim, decimal-leading-zero); font-weight: 700; font-variation-settings: "wdth" 80; font-size: 18px; line-height: 1.2; color: var(--paper-accent); grid-row: span 2; }
.limit h4 { margin: 0; font-size: 16.5px; line-height: 1.3; }
.limit p { margin: 4px 0 0; font-size: 14.5px; color: var(--paper-ink-2); }
.sens { margin-top: 52px; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; align-items: start; }
.sens h3, .rules h3 { margin: 0 0 8px; font-size: 21px; line-height: 1.2; }
.sens p, .rules p { margin: 0; color: var(--paper-ink-2); font-size: 15px; }
.sens.fix > p { max-width: 72ch; }
.sens code, .rules code { font-size: .92em; background: var(--paper-2); padding: 0 4px; border-radius: 3px; }
.paper table.data th, .paper table.data td { border-bottom-color: var(--paper-line); }
.paper table.data thead th { color: var(--paper-ink-2); }
.paper table.data td.base, .paper table.data th.base-h { font-weight: 700; background: var(--paper-2); color: var(--paper-ink); }
.paper table.data tbody th { text-align: left; font-weight: 500; font-size: 14px; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--paper-line); }
.paper table.data td { width: 15%; }
.paper table.data td.was { color: var(--paper-ink-2); text-decoration: line-through; text-decoration-color: rgba(85, 81, 74, .5); }
.rules { margin-top: 56px; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; }
.rules ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.rules li { border-top: 1px solid var(--paper-line); padding: 12px 0 14px 24px; font-size: 15px; position: relative; }
.rules li::before { content: ""; position: absolute; left: 0; top: 21px; width: 12px; height: 1.5px; background: var(--paper-accent); }

/* ---------- data / downloads ---------- */
.dl { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.dl-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left; text-decoration: none; cursor: pointer;
  background: var(--night-2); border: 1px solid var(--line); border-radius: 6px; padding: 18px 18px 20px; color: var(--ink-2); font-size: 14px; line-height: 1.45;
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.dl-card:hover { border-color: var(--ink-3); background: var(--night-3); transform: translateY(-2px); }
.dl-card b { color: var(--ink); font-size: 17px; font-weight: 650; }
.dl-k { font-size: 11px; letter-spacing: .12em; font-weight: 700; color: var(--adult); }
.dl-card.pending { cursor: default; }
.dl-card.pending:hover { transform: none; border-color: var(--line); background: var(--night-2); }
.repro { margin-top: 48px; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; align-items: start; }
.repro p { margin: 0; color: var(--ink-2); font-size: 15px; }
.code { background: #0a0b0c; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.code-top { display: flex; align-items: center; gap: 12px; padding: 6px 14px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.code-top .btn { margin-left: auto; font-size: 13px; letter-spacing: 0; text-transform: none; padding: 4px 0; }
.code-top .toast { margin-left: 0; text-transform: none; letter-spacing: 0; }
.code pre { margin: 0; padding: 16px 18px 18px; overflow-x: auto; font-size: 15px; line-height: 1.6; color: var(--ink); }
.code .c { color: var(--ink-3); }
.cite { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 48px; align-items: start; border-top: 1px solid var(--line); padding-top: 28px; }
.notice { margin: 0 0 16px; font-size: 14px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; }
.notice b { color: var(--ink); }
.sources { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 14px; }
.sources li { margin-bottom: 10px; padding-left: 4px; }
.sources a { color: var(--ink); text-decoration-color: var(--line-2); text-underline-offset: 3px; word-break: break-word; }
.sources a:hover { text-decoration-color: var(--ink); }
.ok, .unv { display: inline-block; font-size: 12px; padding: 0 6px; border-radius: 3px; border: 1px solid var(--line-2); margin-left: 2px; white-space: nowrap; }
.ok { color: var(--ink-2); }
.unv { color: var(--ink-3); border-style: dashed; }

/* ---------- footer ---------- */
.foot { padding: 40px 0 56px; border-top: 1px solid var(--line); margin-top: clamp(72px, 8vw, 112px); font-size: 14px; color: var(--ink-3); }
.foot-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; }
.foot p { margin: 0 0 6px; }
.foot-brand { color: var(--ink); font-weight: 720; font-variation-settings: "wdth" 80; font-size: 17px; margin-bottom: 0 !important; }
.foot-sub { color: var(--ink-2); margin-bottom: 10px !important; }
.foot-grid > div:first-child p:last-child { color: var(--ink-2); }
.foot-fine { max-width: 70ch; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .att { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .att .att-side { grid-column: 1 / -1; }
  .limits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1120px) {
  .nav { display: none; }
  .bar-cta { margin-left: auto; }
  .menu-btn { display: inline-block; }
  .menu-sheet.open { display: block; position: absolute; left: 0; right: 0; top: 60px; background: var(--night); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; }
  .menu-sheet a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 18px; }
  .menu-sheet a span { color: var(--ink-3); margin-right: 12px; font-size: 13px; font-variant-numeric: tabular-nums; }
}
@media (max-width: 1020px) {
  .conc, .sim, .sens, .rules, .foot-grid, .est, .how, .context, .explore-head, .att-intro, .repro, .cite { grid-template-columns: 1fr; gap: 24px; }
  .controls { position: static; }
  .pipe { grid-template-columns: 1fr; }
  .pipe > div { border-right: 0; border-bottom: 1px solid var(--paper-line); }
  .pipe > div:not(:last-child)::after { right: auto; left: 28px; top: auto; bottom: -7px; transform: rotate(135deg); }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .glance { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-2); padding-top: 14px; }
  .glance dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; }
  .glance dl > div, .glance dl > div:first-child { border-top: 0; padding-top: 4px; }
  .tl { padding-left: 0; }
  .tl::before { left: 24px; }
  .tl-y span { position: static; display: block; width: auto; margin: 26px 0 0 56px; }
  .tl-y { height: auto; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .brand-tag { display: none; }
  .bar-in { gap: 12px; }
  .hero .wrap { display: flex; flex-direction: column; }
  .hero-grid { display: contents; }
  .hero .sky { order: 2; }
  .hero .glance { order: 3; margin-top: 32px; }
  .glance dl { grid-template-columns: 1fr; }
  .glance dl > div { border-top: 1px solid var(--line) !important; padding-top: 12px !important; }
  .glance dl > div:first-child { border-top: 0 !important; padding-top: 4px !important; }
  .hero .kicker { font-size: 11px; letter-spacing: .1em; }
  .hero .kicker > span:not(:last-child)::after { margin: 0 8px; }
  .sec-head { grid-template-columns: 1fr; gap: 14px; }
  .sec-no { padding-top: 8px; }
  .sky-stage canvas { height: 210px; }
  .sky-axis { margin-right: 38px; }
  .hint { margin-top: 12px; }
  .att { grid-template-columns: 1fr; }
  .limits, .rules ul, .dl { grid-template-columns: 1fr; }
  .big-out { grid-template-columns: 1fr; }
  .duo-row { grid-template-columns: 1fr 58px; gap: 4px 10px; }
  .duo-row .lbl { grid-column: 1 / -1; }
  .duo-row .track { grid-column: 1; }
  .sim-axis { margin-right: 42px; }
  .panel { padding: 16px 14px 14px; }
  .facts .v { font-size: 36px; }
  .tl-e { grid-template-columns: 1fr; padding-left: 52px; }
  .tl-e time { padding-top: 0; margin-bottom: 4px; }
  .tl-e > div { border-top: 0; padding-top: 0; }
  .tl-e::before { top: 18px; }
  .tl-e.tl-key::before { top: 17px; }
  .code pre { font-size: 13.5px; }
  .seg button { padding: 7px 11px; font-size: 13px; }
  table.wl td.wl-bar { width: 36%; }
  .filters .seg { border-radius: 10px; }
  .filters .seg button { border-radius: 7px; }
}
@media (max-width: 480px) {
  .filters .seg { display: flex; flex-wrap: nowrap; width: 100%; border-radius: 8px; }
  .filters .seg button { flex: 1 1 auto; }
  #trend .filters .seg { flex-direction: column; }
  #trend .filters .seg button { width: 100%; text-align: left; }
  table.wl td, table.wl th { font-size: 13px; padding: 6px 5px; }
  table.grid12 th, table.grid12 td { font-size: 13px; padding: 7px 5px; }
  table.grid12 td.main::after { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .wcell { transition: none; }
  .hint .arr { animation: none; }
  .dl-card { transition: none; }
}

/* phone-only docked readout for the simulator */
.sim-dock { display: none; }
@media (max-width: 1020px) {
  .sim-dock {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 12px; align-items: center;
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40;
    background: var(--ink); color: var(--night); border-radius: 6px; padding: 10px 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
    transform: translateY(140%); transition: transform .35s var(--ease);
  }
  .sim-dock.show { transform: none; }
  .sim-dock b { grid-row: span 2; font-size: 32px; font-weight: 750; font-variation-settings: "wdth" 72; line-height: 1; color: var(--night); }
  .sim-dock span { font-size: 13.5px; line-height: 1.3; }
  .sim-dock .dock-meta { color: #55514a; font-size: 12.5px; }
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* only the transparent hit layers take the pointer inside charts */
.chart svg * { pointer-events: none; }
.chart svg .hit, .chart svg .rowhit { pointer-events: all; }
