/* FDD WEB-1 design system R1. Tokens are documented in DESIGN_SYSTEM.md; contrast is checked by check.py. */
:root {
  --ink: #0f172a; --ink-2: #334155; --muted: #4b5563; --line: #dde3ec; --bg: #f6f7f9; --surface: #ffffff;
  --navy: #0b2545; --navy-2: #13315c; --blue: #1d5fa8; --gold: #8a6100; --gold-bg: #fff6e0;
  --pos: #0b6b50; --neg: #a3301f; --focus: #f5b700;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 10px; --sh: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--sans); color: var(--ink); background: var(--bg); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); margin: .2em 0 .3em; letter-spacing: -.01em; }
h2 { font-size: 1.45rem; } h3 { font-size: 1.12rem; }
code { font: .85em/1.4 Consolas, "SFMono-Regular", Menlo, monospace; word-break: break-all; }
code.h { color: var(--muted); }

/* masthead */
.masthead { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.mh { display: flex; align-items: center; gap: 24px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; flex: 0 0 auto; white-space: nowrap; }
.brand:hover { color: #fff; }
.mark { font: 700 .95rem/1 var(--serif); letter-spacing: .08em; border: 1.5px solid #c9a227; color: #f3d98b; padding: 7px 8px; border-radius: 4px; }
.bt { font: 600 1.02rem/1.15 var(--serif); }
.bt small { display: block; font: 500 .7rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #b9c6da; }
.sitenav { display: flex; flex-wrap: wrap; gap: 2px; margin-left: auto; }
.sitenav a { color: #dbe4f1; text-decoration: none; font-size: .86rem; padding: 8px 9px; border-radius: 6px; white-space: nowrap; }
.sitenav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sitenav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 #c9a227; border-radius: 0; }
.nav-toggle { display: none; margin-left: auto; background: transparent; color: #fff; border: 1px solid #5d7397; border-radius: 6px; padding: 7px 12px; font: inherit; }
.public-bar { background: #13315c; color: #dbe4f1; text-align: center; font-size: .74rem; letter-spacing: .08em; padding: 4px 8px; }
.private-bar { background: #2b2210; color: #f3d98b; text-align: center; font-size: .74rem; letter-spacing: .12em; padding: 4px 8px; }

/* page */
main { padding-bottom: 56px; }
.hero { padding: 56px 0 24px; max-width: 900px; }
.founder-name { font-family: var(--serif); font-size: 1.9rem; line-height: 1.15; font-weight: 600; color: var(--navy); margin: 6px 0 4px; }
.founder-headline { font-weight: 600; color: var(--ink-2); margin: 0 0 6px; }
.founder-specialties { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin: 0 0 16px; }
.founder-note { font-size: .88rem; border-top: 1px solid var(--line); padding-top: 10px; }
.eyebrow { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin: 0; }
.lede { font-size: 1.16rem; color: var(--ink-2); max-width: 820px; }
.page-head { padding: 40px 0 8px; }
.section-title { margin: 44px 0 14px; padding-top: 4px; border-top: 1px solid var(--line); padding-top: 22px; }
.muted { color: var(--muted); font-size: .92rem; }
section > p { max-width: 880px; }

/* badges */
.badge { display: inline-block; font: 700 .66rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; vertical-align: middle; margin: 2px 4px 2px 0; white-space: nowrap; border: 1px solid transparent; }
.b-preregistered_primary { background: var(--navy); color: #fff; }
.b-exploratory_reviewed { background: #e3f1ec; color: #0b5340; border-color: #b8dccf; }
.b-author_verified { background: var(--gold-bg); color: #6b4a00; border-color: #ecd196; }
.b-prediction_not_outcome { background: #efe9fb; color: #46287f; border-color: #d4c5f2; }
.b-hypothesis { background: #f1f3f5; color: #374151; border: 1px dashed #8a94a3; }
.hero-meta .badge { margin-right: 6px; }

/* claims */
a.claim { color: inherit; text-decoration: underline dotted #8a94a3; text-underline-offset: 3px; font-weight: 600; }
a.claim:hover { color: var(--blue); text-decoration-style: solid; }

/* KPI cards */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 22px 16px; box-shadow: var(--sh); border-top: 3px solid var(--navy); }
.kpi-neg { border-top-color: var(--neg); }
.kpi-v { font: 600 2.4rem/1.05 var(--sans); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.02em; color: var(--navy); margin: 0 0 8px; }
.kpi-v a.claim { text-decoration-thickness: 1px; }
.kpi-k { font-weight: 600; margin: 0 0 6px; }
.kpi-n { color: var(--muted); font-size: .9rem; margin: 0 0 10px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.ticks, .crosses { list-style: none; padding: 0; }
.ticks li, .crosses li { position: relative; padding-left: 28px; margin: 10px 0; }
.ticks li::before { content: "\2713"; position: absolute; left: 4px; color: var(--pos); font-weight: 700; }
.crosses li::before { content: "\2715"; position: absolute; left: 4px; color: var(--neg); font-weight: 700; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 8px 0 14px 26px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 15px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--navy); }
.tl-k { font: 700 .82rem/1.4 var(--sans); color: var(--gold); min-width: 104px; letter-spacing: .04em; }
.tl-v { flex: 1 1 420px; }
.cta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.cta { display: block; background: var(--navy); color: #fff; text-decoration: none; border-radius: var(--r); padding: 22px; box-shadow: var(--sh); }
.cta:hover { background: var(--navy-2); color: #fff; }
.cta span { font: 600 1.12rem/1.3 var(--serif); display: block; }
.cta small { display: block; color: #c4d0e3; margin-top: 6px; }

/* cards, notes, callouts, steps */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 18px 0; }
.card, .note-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--sh); }
.card h2, .note-card h2 { font-size: 1.15rem; margin-top: 0; }
.callout { border-left: 4px solid var(--navy); background: var(--surface); padding: 14px 18px; border-radius: 0 var(--r) var(--r) 0; box-shadow: var(--sh); max-width: 900px; }
.callout.neg { border-left-color: var(--neg); }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px 8px 64px; position: relative; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 18px; top: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; font: 700 .95rem/32px var(--serif); text-align: center; }
.steps h3, h2.item { margin: 0 0 4px; font-size: 1.12rem; }
.label-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.label-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.label-item p { margin: 8px 0 0; font-size: .9rem; color: var(--ink-2); }
.limits { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.limits li { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--neg); border-radius: var(--r); padding: 16px 18px; }
.limits h3 { margin: 0 0 4px; }
.owner-input { display: inline-block; background: #fff0f0; color: #8a1c1c; border: 1px dashed #c76b6b; padding: 2px 8px; border-radius: 6px; font-size: .9rem; }
.owner-provided { font-weight: 600; }
p.owner-provided { font-weight: 400; color: var(--ink-2); }  /* WEB-3: biography paragraphs in body weight */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.subnav a { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .88rem; text-decoration: none; color: var(--navy); }
.subnav a:hover { border-color: var(--navy); }

/* tables */
.table-wrap { overflow: auto; max-height: 420px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .86rem; }
th, td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { position: sticky; top: 0; background: #eef2f7; color: var(--navy); font-weight: 700; z-index: 1; }
tbody tr:nth-child(even) { background: #fafbfc; }
table.ev td, table.ev th { font-size: .82rem; }
.chain { margin: 0; padding-left: 18px; }
.matrix-wrap { max-height: none; margin: 18px 0; }
.matrix-wrap .matrix { min-width: 690px; margin: 0; border: 0; }
.scroll-hint { display: none; font-size: .84rem; color: var(--muted); margin: 12px 0 -8px; }
@media (max-width: 760px) { .scroll-hint { display: block; } }
.b-owner_statement { background: #eef2f7; color: #0b2545; border-color: #c9d3e1; }
.matrix { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 18px 0; }
.matrix caption { text-align: left; padding: 12px 14px; font-weight: 600; color: var(--navy); }
.matrix td { font-weight: 600; }
.s-yes { color: var(--pos); } .s-no { color: var(--neg); } .s-mid { color: #6b4a00; } .s-val { color: #46287f; }
.sortable th button { all: unset; cursor: pointer; }
.sortable th button:focus-visible { outline: 3px solid var(--focus); }

/* charts */
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px 12px; margin: 0 0 20px; box-shadow: var(--sh); min-width: 0; }
.chart figcaption h3 { margin: 0; font-size: 1.08rem; }
.chart figcaption p { margin: 4px 0 8px; color: var(--muted); font-size: .88rem; }
.fc-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.chart-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 4px; }
.chart-controls select, .chart-controls input { font: inherit; font-size: .86rem; }
.chart-controls select { border: 1px solid #b8c2d1; border-radius: 6px; padding: 5px 8px; background: #fff; color: var(--ink); }
.seg { display: inline-flex; border: 1px solid #b8c2d1; border-radius: 6px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 5px 10px; font: inherit; font-size: .84rem; color: var(--ink); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 2px; }
.legend button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; font: inherit; font-size: .84rem; cursor: pointer; padding: 2px 0; color: var(--ink); }
.legend button[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.legend i { width: 18px; height: 4px; border-radius: 2px; display: inline-block; }
.chart-canvas { position: relative; width: 100%; }
.chart-canvas svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-canvas text { font-family: var(--sans); fill: #475569; }
.tip { position: absolute; pointer-events: none; background: var(--navy); color: #fff; font-size: .8rem; padding: 6px 9px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -115%); box-shadow: var(--sh); z-index: 5; }
.readout-slot:empty { display: none; }
.readout { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 8px 0; }
.readout div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.readout b { display: block; font: 600 1.25rem/1.2 var(--sans); color: var(--navy); }
.readout span { font-size: .8rem; color: var(--muted); }
.chart-data summary { cursor: pointer; color: var(--blue); font-size: .86rem; margin: 6px 0; }
.chart-src { font-size: .8rem; color: var(--muted); margin: 6px 0 0; }

/* footer */
.footer { background: #0a1c34; color: #b9c6da; padding: 28px 0; font-size: .86rem; }
.footer a { color: #e3ebf7; }
.footer strong { color: #fff; }

@media (max-width: 1180px) {
  .nav-toggle { display: inline-block; }
  .sitenav { display: none; position: absolute; left: 0; right: 0; top: 66px; background: var(--navy); flex-direction: column; padding: 8px 16px 16px; }
  .sitenav.open { display: flex; }
}
@media (max-width: 980px) {
  .kpis, .cta-grid { grid-template-columns: 1fr 1fr; }
  .grid2, .split, .cards, .steps, .limits { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-block; }
  .sitenav { display: none; position: absolute; left: 0; right: 0; top: 66px; background: var(--navy); flex-direction: column; padding: 8px 16px 16px; }
  .sitenav.open { display: flex; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .kpis, .cta-grid { grid-template-columns: 1fr; }
  .bt small { display: none; }
  .bt { font-size: .9rem; }
  .mh { gap: 10px; }
  .mark { padding: 5px 6px; font-size: .8rem; }
  .fc-top { flex-wrap: wrap; }
  .nav-toggle { padding: 6px 10px; }
  .kpi-v { font-size: 2.1rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print {
  .masthead, .chart-controls, .nav-toggle, .subnav, .footer { display: none; }
  .chart-data { display: block; } .chart-data[open] summary, .chart-data summary { display: none; }
  body { background: #fff; } .kpi, .card, .chart { box-shadow: none; }
}
