:root {
  color-scheme: light;
  --surface: #fff;
  --surface-soft: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --blue: #0066cc;
  --blue-hover: #0053a6;
  --line: #dedee3;
  --alert-surface: #f8f0e2;
  --alert-ink: #6d4818;
  --chart-unadjusted: #65656c;
  --chart-traditional: #285d86;
  --chart-garg: var(--blue);
  --chart-zero: #929298;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --chart-font: 13px var(--font);
  --text-sm: .875rem;
  --text-base: 1rem;
  --text-lead: 1.125rem;
  --text-title: clamp(1.85rem, 3.4vw, 2.85rem);
  --text-section: clamp(1.65rem, 3vw, 2.35rem);
  --text-card: 1.25rem;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --section-pad: clamp(var(--space-5), 3.5vw, var(--space-7));
  --hero-pad: clamp(var(--space-3), 1.8vw, var(--space-5));
  --chart-height: clamp(10.5rem, 15vw, 11.25rem);
  --gutter: clamp(var(--space-4), 4vw, var(--space-6));
  --page-width: 70rem;
  --reading-width: 74ch;
  --touch-size: 2.75rem;
  --radius: .85rem;
  --pill: 999px;
  font: var(--text-base)/1.6 var(--font);
  color: var(--ink);
  background: var(--surface);
}
* { box-sizing: border-box; }
body, figure, h1, h2, h3 { margin: 0; }
p { margin-block: var(--space-3); }
a { color: var(--blue); text-underline-offset: .2em; }
a:hover { color: var(--blue-hover); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { width: min(calc(100% - var(--gutter) - var(--gutter)), var(--page-width)); margin-inline: auto; }
.skip { position: absolute; z-index: 3; left: var(--space-4); top: var(--space-2); transform: translateY(-180%); background: var(--surface); padding: var(--space-2) var(--space-4); }
.skip:focus { transform: none; }
.header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { min-height: 3.4rem; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-1) var(--space-5); }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand strong { font-size: .99rem; font-weight: 720; letter-spacing: .14em; }
.brand > span:last-child { color: var(--muted); font-size: var(--text-sm); }
.mark { display: inline-flex; align-items: end; gap: .16em; color: var(--ink); }
.mark i { width: .15em; height: .42em; border-radius: .07em; background: currentColor; }
.mark i:nth-child(2) { height: .58em; }
.mark i:nth-child(3) { height: .75em; }
.header nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 var(--space-4); }
.header nav a, .parent-link { display: inline-flex; align-items: center; min-height: var(--touch-size); color: var(--muted); font-size: var(--text-sm); text-decoration: none; }
.header nav a:hover, .parent-link:hover { color: var(--blue-hover); text-decoration: underline; }
.header .parent-link { color: var(--blue); font-weight: 650; }
.hero { background: var(--surface); padding-block: var(--hero-pad); }
.hero-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: start; gap: clamp(var(--space-4), 3vw, var(--space-6)); }
h1 { font-size: var(--text-title); font-weight: 680; line-height: 1.1; letter-spacing: -.03em; }
.hero h1 { max-width: 21ch; text-wrap: balance; }
.hero-copy { color: var(--muted); max-width: 46ch; font-size: var(--text-lead); margin: var(--space-3) 0 var(--space-4); }
.eyebrow { color: var(--muted); margin: 0 0 var(--space-2); font-size: var(--text-sm); font-weight: 650; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: var(--touch-size); padding: var(--space-2) var(--space-4); border: 1px solid transparent; border-radius: var(--pill); font: inherit; font-size: var(--text-sm); font-weight: 620; text-decoration: none; }
.primary { color: var(--surface); background: var(--blue); }
.primary:hover { color: var(--surface); background: var(--blue-hover); }
.outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.outline:hover { color: var(--blue-hover); background: var(--surface-soft); }
.chart-card { min-width: 0; margin: 0; padding: clamp(var(--space-3), 1.5vw, var(--space-4)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--space-2); }
.chart-head h2 { font-size: var(--text-card); }
.chart-head label, .chart-unit, #chart-status, .legend, summary { color: var(--muted); font-size: var(--text-sm); }
.chart-head label { max-width: 100%; }
select { display: block; width: 100%; min-height: var(--touch-size); margin-top: var(--space-1); padding: var(--space-1) var(--space-2); border: 1px solid var(--line); border-radius: var(--space-2); color: var(--ink); background: var(--surface); font: inherit; }
.chart-unit { margin: var(--space-2) 0 0; }
#chart-status { margin: 0 0 var(--space-1); }
#chart { display: block; width: 100%; height: var(--chart-height); }
.legend { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin-block: var(--space-1); }
.legend span::before { content: ''; display: inline-block; width: 1rem; margin-right: var(--space-1); vertical-align: middle; border-top: 2px dashed var(--chart-unadjusted); }
.legend span:nth-child(2)::before { border-color: var(--chart-traditional); border-top-style: dotted; }
.legend span:nth-child(3)::before { border-color: var(--chart-garg); border-top-style: solid; }
summary { min-height: var(--touch-size); align-content: center; width: fit-content; color: var(--blue); cursor: pointer; text-decoration: underline; }
.summary-strip { background: var(--surface-soft); border-block: 1px solid var(--line); }
.summary-strip .shell { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-5); padding-block: var(--space-2); color: var(--muted); }
.summary-strip strong { color: var(--ink); font-size: var(--text-lead); padding-right: var(--space-1); }
.section { padding-block: var(--section-pad); }
h2 { font-size: var(--text-section); font-weight: 670; line-height: 1.2; letter-spacing: -.035em; }
h3 { font-size: var(--text-card); font-weight: 650; line-height: 1.35; letter-spacing: -.017em; }
.section p, .limits { color: var(--muted); }
.section .eyebrow { color: var(--muted); }
.intro { max-width: var(--reading-width); font-size: var(--text-lead); margin-bottom: var(--space-4); }
.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.card { min-width: 0; padding: clamp(var(--space-3), 2vw, var(--space-5)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card p:last-child { margin-bottom: 0; }
.formula { border-left: 2px solid var(--blue); padding-left: var(--space-3); font-weight: 600; }
.note { max-width: var(--reading-width); margin-bottom: 0; }
.tint, .feedback { background: var(--surface-soft); }
.scroll { max-width: 100%; overflow-x: auto; }
.scroll:focus-visible { outline-offset: -3px; }
.table-frame { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: var(--text-sm); }
caption { padding: var(--space-3) var(--space-4); text-align: left; color: var(--muted); }
th, td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
thead { background: var(--surface-soft); }
tbody tr:last-child > * { border-bottom: 0; }
.chart-table { background: var(--surface); }
.chart-table caption { padding: var(--space-2); }
.chart-table th, .chart-table td { padding: var(--space-2); }
.chart-table th { white-space: nowrap; }
.match, .diff { display: inline-block; white-space: nowrap; border-radius: var(--pill); background: var(--surface-soft); color: var(--ink); padding: var(--space-1) var(--space-2); }
.diff { background: var(--alert-surface); color: var(--alert-ink); }
.subhead { margin: var(--space-5) 0 var(--space-2); }
.limits { padding-left: var(--space-5); }
.limits li { margin-block: var(--space-2); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--space-4) clamp(var(--space-5), 4vw, var(--space-7)); align-items: start; }
.text-link { font-weight: 620; }
.identifier { overflow-wrap: anywhere; }
.roadmap { display: grid; gap: var(--space-4); }
.roadmap article { border-left: 1px solid var(--line); padding-left: var(--space-4); }
.roadmap p { margin: var(--space-2) 0 0; }
.feedback .section div > p:first-child { margin-top: 0; }
footer { border-top: 1px solid var(--line); padding-block: var(--space-4); }
footer .shell { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2) var(--space-5); font-size: var(--text-sm); }
footer p { color: var(--muted); margin: 0; }
@media (max-width: 62rem) {
  .header-inner { grid-template-columns: 1fr auto; padding-top: var(--space-1); }
  .header nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .header .parent-link { grid-column: 2; grid-row: 1; }
}
@media (max-width: 51rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
}
@media (max-width: 42rem) {
  .split, .method-grid { grid-template-columns: minmax(0, 1fr); }
  .header nav { column-gap: var(--space-3); }
  th, td { padding: var(--space-2) var(--space-3); }
}
@media (max-width: 26rem) {
  .chart-head label { width: 100%; }
}
