:root {
  color-scheme: light;
  font: 16px/1.55 "Segoe UI", system-ui, sans-serif;
  --paper: #f8f8f4;
  --white: #fff;
  --ink: #191d2b;
  --muted: #51596b;
  --line: #d8dbe3;
  --blue: #243fcb;
  --blue-soft: #eef1ff;
  --navy: #1e2850;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, fieldset, dl, dd { margin: 0; }
fieldset { padding: 0; border: 0; min-inline-size: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
[hidden] { display: none !important; }
.container { width: min(1120px, calc(100% - 56px)); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 5; top: 10px; left: 10px; padding: 10px 16px; background: var(--white); }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; justify-self: start; gap: 10px; font-weight: 700; white-space: nowrap; }
.brand img { display: block; }
nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 34px); }
nav a, .api-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--muted); }
nav a:hover, .api-link:hover, .site-footer a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.api-link { justify-self: end; gap: 6px; }
.intro { display: grid; grid-template-columns: minmax(0, 2fr) minmax(190px, .78fr); align-items: end; gap: 40px; padding: clamp(38px, 7vw, 86px) 0 clamp(32px, 5vw, 62px); border-bottom: 1px solid var(--line); }
.section-label { color: var(--blue); font-size: .92rem; font-weight: 650; }
h1 { margin-block: 12px 18px; font: 500 clamp(2.55rem, 6.2vw, 5.25rem)/1.02 Georgia, serif; letter-spacing: -.052em; }
.intro-copy { max-width: 59ch; color: var(--muted); font-size: 1.075rem; line-height: 1.65; }
.study-info { display: grid; gap: 0; }
.study-info div { padding-block: 12px; border-bottom: 1px solid var(--line); }
.study-info div:last-child { border-bottom: 0; }
.study-info dt, .source-note { color: var(--muted); font-size: .875rem; }
.study-info dd { font-size: 1rem; font-weight: 650; }
.analysis, .report, .method { padding-block: clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.section-heading { margin-bottom: 20px; }
h2 { font-size: clamp(1.65rem, 3vw, 2.25rem); font-weight: 650; line-height: 1.16; letter-spacing: -.035em; }
.section-heading p { margin-top: 7px; color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; }
.samples { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.sample-head, .sample { display: grid; grid-template-columns: minmax(0, 1fr) 5.4em; align-items: center; gap: 10px; padding: 12px clamp(12px, 2.25vw, 24px); }
.sample-head { color: var(--muted); font-size: .875rem; font-weight: 600; }
.sample-head span:last-child, .sample small { text-align: right; }
.sample { position: relative; min-height: 57px; border-top: 1px solid var(--line); cursor: pointer; transition: background-color .18s, color .18s; }
.sample:hover { background: #f4f6fc; }
.sample:has(:checked) { color: var(--blue); background: var(--blue-soft); box-shadow: inset 3px 0 var(--blue); }
.sample:has(:focus-visible) { outline: 2px solid var(--blue); outline-offset: -3px; }
.sample span { display: flex; align-items: center; gap: 9px; }
.sample input { margin: 0; width: 17px; height: 17px; flex: 0 0 17px; accent-color: var(--blue); }
.sample input:focus-visible { outline: none; }
.sample strong { font-weight: 650; }
.sample small { color: var(--muted); font-size: .82rem; }
.samples > p { border-top: 1px solid var(--line); padding: 11px clamp(12px, 2.25vw, 24px); }
.result { background: var(--navy); border-radius: var(--radius); color: var(--white); padding: clamp(18px, 3vw, 30px); min-width: 0; }
.result-top { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.result-label, #explanation { color: #e2e7fc; }
#risk { display: block; margin-top: 2px; font-size: clamp(2.35rem, 4vw, 3.75rem); line-height: 1.08; font-weight: 600; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.decision { color: var(--decision); border: 1px solid currentColor; border-radius: 6px; padding: 5px 9px; font-size: .875rem; font-weight: 650; text-transform: capitalize; }
.result[data-decision="allow"] { --decision: #b1efdb; }
.result[data-decision="limit"] { --decision: #ffe1a4; }
.result[data-decision="block"] { --decision: #ffc3cb; }
.result[data-decision="unknown"] { --decision: #e2e7fc; }
.gauge { position: relative; margin: 24px 4px 13px; }
.gauge-track { height: 7px; border-radius: 8px; background: linear-gradient(to right, #82ceb7 var(--limit, 73%), #e7bf73 var(--limit, 73%) var(--block, 93%), #e89ca7 var(--block, 93%)); }
.gauge-marker { position: absolute; top: -5px; left: var(--risk, 0%); width: 4px; height: 17px; border-radius: 3px; background: white; box-shadow: 0 0 0 2px var(--navy); transform: translateX(-50%); transition: left .36s cubic-bezier(.2,.7,.25,1); }
.result[data-decision="unknown"] .gauge-marker { visibility: hidden; }
.gauge-labels { position: relative; height: 18px; margin-top: 8px; font-size: .75rem; line-height: 1.3; color: #e2e7fc; font-variant-numeric: tabular-nums; }
.gauge-labels span { position: absolute; transform: translateX(-50%); }
.gauge-labels span:nth-child(1) { left: 0; }
.gauge-labels span:nth-child(2) { left: var(--limit, 73%); }
.gauge-labels span:nth-child(3) { left: var(--block, 93%); }
.gauge-labels span:nth-child(4) { left: 100%; }
#explanation { font-size: .93rem; }
.report-grid { display: grid; grid-template-columns: minmax(205px, .7fr) minmax(0, 1.65fr); gap: clamp(20px, 5vw, 62px); align-items: start; }
.metrics div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.metrics dt { color: var(--muted); }
.metrics dd { font-size: 1.2rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.comparison { padding: clamp(14px, 3vw, 24px); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
legend { padding: 0; margin-bottom: 9px; font-weight: 650; }
.scenarios { display: flex; flex-wrap: wrap; gap: 7px; }
.scenarios button { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); color: var(--ink); padding: 4px 12px; font-weight: 650; transition: color .18s, background-color .18s, border-color .18s; }
.scenarios button:hover { border-color: var(--blue); color: var(--blue); }
.scenarios button[aria-pressed="true"] { border-color: var(--blue); color: white; background: var(--blue); }
.chart { display: grid; gap: 11px; margin-top: 19px; }
.chart-row { display: grid; grid-template-columns: 9em minmax(0, 1fr) 4em; align-items: center; gap: 10px; font-size: .9rem; }
.chart-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.bar { background: #edf0f7; height: 9px; border-radius: 8px; overflow: hidden; }
.bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: #7b86a5; transition: width .36s cubic-bezier(.2,.7,.25,1); }
.bar.adaptive i { background: var(--blue); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 0; margin: 0 0 20px; list-style: none; counter-reset: method; }
.steps li { counter-increment: method; padding-top: 11px; border-top: 1px solid var(--line); }
.steps h3 { margin-bottom: 4px; font-size: 1.02rem; font-weight: 650; }
.steps h3::before { content: counter(method, decimal-leading-zero); color: var(--blue); font-size: .875rem; margin-right: 8px; }
.steps p, details p { color: var(--muted); }
summary { width: fit-content; cursor: pointer; font-weight: 600; }
details p { max-width: 70ch; margin-top: 8px; }
.error { color: #8f1c38; margin-bottom: 14px; }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding-block: 20px; color: var(--muted); font-size: .9rem; }
@media (max-width: 740px) {
  .container { width: calc(100% - 36px); }
  .intro, .workspace, .report-grid { grid-template-columns: 1fr; }
  .intro { gap: 22px; }
  .desktop-break { display: none; }
  .study-info { display: flex; flex-wrap: wrap; gap: 9px 22px; }
  .study-info div { border: 0; padding: 0; }
  .report-grid { gap: 20px; }
}
@media (max-width: 480px) {
  .header-inner { grid-template-columns: 1fr auto; gap: 0 12px; padding-top: 8px; }
  .brand { min-height: 44px; }
  nav { grid-area: 2 / 1 / 3 / -1; justify-content: space-between; gap: 8px; }
  nav a { font-size: .94rem; }
  .study-info dd { font-size: .94rem; }
  .steps { grid-template-columns: 1fr; gap: 13px; }
  .chart-row { grid-template-columns: 7em minmax(0, 1fr) 3.5em; gap: 6px; }
  .gauge-labels span:nth-child(3) { transform: translateX(-77%); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
