:root {
  --bg: #121316;
  --ink: #ECEAE4;
  --ink-2: #C4C2BC;
  --muted: #A3A29D;
  --rule: #2C2E33;
  --rule-strong: #3A3C42;
  --accent: #A9BEF5;
  --accent-hover: #D3DEFA;
  --flag: #F2A65A;
  --band: rgba(169, 190, 245, 0.10);
  --serif: Newsreader, Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration-color: var(--rule-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); text-decoration-color: var(--ink); }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 40px 24px 96px; display: flex; flex-direction: column; gap: 72px; }

/* nav */
.nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; font-size: 15px; }
.nav .brand { color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 22px; font-weight: 600; }
.nav .links { display: flex; flex-wrap: wrap; gap: 0 24px; }
.nav .links a { min-height: 44px; display: inline-flex; align-items: center; }

/* hero */
.hero { display: flex; flex-direction: column; gap: 24px; max-width: 820px; }
.hero h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(44px, 7vw, 76px); line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
.lede { margin: 0; font-size: 19px; line-height: 1.6; color: var(--ink-2); max-width: 640px; text-wrap: pretty; }
.meta { margin: 0; font-size: 14px; color: var(--muted); }

/* featured */
.featured { display: flex; flex-direction: column; gap: 24px; border-top: 1px solid var(--ink); padding-top: 24px; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.featured-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.featured-head h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 4.5vw, 44px); line-height: 1.1; letter-spacing: -0.01em; max-width: 640px; text-wrap: balance; }
.big-value { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.big-value .n { font-family: var(--serif); font-size: 72px; line-height: 1; }
.big-value .u { font-size: 14px; color: var(--muted); }

/* chart */
.chart { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { stroke: var(--rule-strong); }
.chart .band { fill: var(--band); }
.chart .limit { stroke: #7D7F86; stroke-dasharray: 4 4; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.chart .pt { fill: var(--bg); stroke: var(--accent); stroke-width: 2.5; }
.chart .pt.flag { stroke: var(--flag); fill: var(--flag); }
.chart text { font-family: var(--sans); font-size: 13px; fill: var(--muted); }
.chart text.v { font-family: var(--serif); font-size: 18px; fill: var(--ink); }
.chart figcaption { font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 640px; }

/* marker list */
.section-title { margin: 0 0 8px; font-family: var(--serif); font-weight: 500; font-size: 36px; }
.group { display: flex; flex-direction: column; gap: 0; margin-top: 32px; }
.group h3 { margin: 0 0 4px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); column-gap: 64px; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: baseline; padding: 20px 0; border-top: 1px solid var(--rule); color: var(--ink); text-decoration: none; min-height: 44px; }
.row:hover { color: var(--ink); background: rgba(255, 255, 255, 0.02); }
.row .name { font-family: var(--serif); font-size: 22px; }
.row .val, .flag-row .val { justify-self: end; font-variant-numeric: tabular-nums lining-nums; }
.row .val { font-family: var(--serif); font-size: 30px; white-space: nowrap; }
.row .val small, .unit { font-family: var(--sans); font-size: 13px; color: var(--muted); }
.row .sub { font-size: 14px; color: var(--muted); }
.row svg { width: 88px; height: 22px; justify-self: end; }
.row svg polyline { fill: none; stroke: var(--ink); stroke-width: 1.25; }
.flagged { color: var(--flag) !important; }

/* marker page */
.back { font-size: 15px; display: inline-flex; min-height: 44px; align-items: center; }
.marker-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; border-top: 1px solid var(--ink); padding-top: 24px; }
.marker-head h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 6vw, 64px); line-height: 1.05; letter-spacing: -0.015em; }
.table-box { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 12px 16px 12px 0; border-bottom: 1px solid var(--ink); }
td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
td.num { font-family: var(--serif); font-size: 22px; color: var(--ink); white-space: nowrap; }
.note { font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 640px; margin: 0; }

/* footer */
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; border-top: 1px solid var(--ink); padding-top: 20px; font-size: 14px; color: var(--muted); }
footer p { margin: 0; }
footer .links { display: flex; gap: 20px; }

/* homepage: mostly empty on purpose */
.home { max-width: 640px; min-height: 100vh; margin: 0 auto; padding: 18vh 24px 64px; display: flex; flex-direction: column; gap: 28px; }
.home h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 7vw, 56px); line-height: 1.05; letter-spacing: -0.02em; }
.home-links { display: flex; flex-direction: column; border-top: 1px solid var(--rule); margin-top: 16px; }
.home-links a { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; min-height: 56px; padding: 14px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 22px; }
.home-links a span { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.home-links a:hover { background: rgba(255, 255, 255, 0.02); }
.home-contact { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 15px; }
.home-contact a { min-height: 44px; display: inline-flex; align-items: center; }

/* biomarkers page header */
.bm-head { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.crumb { margin: 0; font-size: 14px; color: var(--muted); }
.bm-head h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(44px, 7vw, 64px); line-height: 1; letter-spacing: -0.02em; }
.facts { margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px 32px; border-top: 1px solid var(--rule); padding-top: 16px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-family: var(--serif); font-size: 22px; }
.facts dd a { font-family: var(--sans); font-size: 16px; }
.bm-block { display: flex; flex-direction: column; gap: 12px; margin-top: -32px; }
.flag-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); column-gap: 64px; }
.flag-row { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.flag-row:hover { color: var(--ink); background: rgba(255, 255, 255, 0.02); }
.flag-row .name { font-family: var(--serif); font-size: 22px; }
.flag-row .val { font-family: var(--serif); font-size: 26px; white-space: nowrap; }
.flag-row .val small { font-family: var(--sans); font-size: 13px; color: var(--muted); }
.flag-row .sub { grid-column: 1 / -1; font-size: 14px; color: var(--muted); }
.rbar { grid-column: 1 / -1; position: relative; height: 8px; background: var(--rule); border-radius: 4px; }
.rband { position: absolute; top: 0; bottom: 0; background: #3D4A66; border-radius: 4px; }
.rdot { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--flag); }
.sessions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sessions li { display: grid; grid-template-columns: minmax(120px, 160px) 1fr; gap: 4px 24px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.sessions .d { font-family: var(--serif); font-size: 19px; }
.sessions .p { color: var(--ink-2); }
.sessions .n { color: var(--muted); font-size: 14px; white-space: nowrap; }
@media (max-width: 600px) { .sessions li { grid-template-columns: 1fr; } }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -24px; }
.jump a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--rule-strong); border-radius: 22px; color: var(--ink); text-decoration: none; font-size: 14px; }
.jump a span { color: var(--muted); }
.jump a:hover { border-color: var(--ink); color: var(--ink); }
.group { scroll-margin-top: 24px; }
