/* StatementBench / shared sitegen stylesheet. No external fonts, no framework. */
:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --surface-2: #f2f3f0;
  --text: #1c1f23;
  --muted: #5a6068;
  --border: #d9dcd6;
  --accent: #0b5cad;
  --accent-text: #ffffff;
  --link: #0b5cad;
  --ok-bg: #e6f4ea;
  --ok-fg: #13612e;
  --review-bg: #fff4d6;
  --review-fg: #7a4b00;
  --review-row: #fff8e5;
  --info-bg: #e9eff7;
  --info-fg: #23476b;
  --error-fg: #a1200f;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --radius: 8px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --surface: #1b1e23;
    --surface-2: #23272d;
    --text: #e7e9ec;
    --muted: #a3a9b1;
    --border: #353a42;
    --accent: #5aa4f0;
    --accent-text: #0b1520;
    --link: #7db7f5;
    --ok-bg: #173323;
    --ok-fg: #8fdcaa;
    --review-bg: #3a2c0c;
    --review-fg: #ffd27a;
    --review-row: #2e2410;
    --info-bg: #1d2a3a;
    --info-fg: #a9c8ec;
    --error-fg: #ff9a8a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
}
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
img, svg { max-width: 100%; height: auto; }
code, pre, .mono { font-family: var(--mono); font-size: 0.9em; }
pre { background: var(--surface-2); padding: 0.75rem 1rem; border-radius: var(--radius); overflow-x: auto; }
code { background: var(--surface-2); padding: 0.1em 0.3em; border-radius: 4px; }
pre code { background: none; padding: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-text); padding: 0.5rem 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; }
.brand-mark { width: 1rem; height: 1rem; border-radius: 3px; background: linear-gradient(135deg, var(--accent) 50%, var(--ok-fg) 50%); }
.nav-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0; padding: 0; font-size: 0.95rem; }
.nav-list a { color: var(--text); text-decoration: none; padding: 0.25rem 0; }
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--link); text-decoration: underline; }

/* Content */
main { padding-top: 2rem; padding-bottom: 3rem; }
.prose > :where(p, ul, ol, dl, h2, h3, h4, blockquote, details, .md-twin, .footnote) { max-width: 44rem; }
.page-header { max-width: 46rem; margin-bottom: 1.5rem; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.2; margin: 0.25rem 0 0.75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.45rem; line-height: 1.3; margin: 2.25rem 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 1.75rem 0 0.5rem; }
.kicker { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; color: var(--muted); margin: 0; }
.lede { font-size: 1.15rem; color: var(--muted); margin: 0 0 0.75rem; }
.byline { font-size: 0.9rem; color: var(--muted); margin: 0.5rem 0; }
.disclosure { font-size: 0.9rem; background: var(--surface-2); border-left: 4px solid var(--border); padding: 0.6rem 0.9rem; border-radius: 0 var(--radius) var(--radius) 0; }
.disclosure[data-disclosure="paid"] { border-left-color: var(--review-fg); }
.paid-label { font-size: 0.85em; color: var(--muted); white-space: nowrap; }
.md-twin { font-size: 0.85rem; color: var(--muted); margin-top: 3rem; }
blockquote { margin: 1rem 0; padding: 0.25rem 1rem; border-left: 4px solid var(--border); color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.callout { background: var(--info-bg); color: var(--info-fg); padding: 0.75rem 1rem; border-radius: var(--radius); }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.prose > table { display: block; overflow-x: auto; max-width: 100%; }
caption { text-align: left; padding: 0.6rem 0.75rem; color: var(--muted); font-size: 0.85rem; }
th, td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
thead th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table.compact th, .data-table.compact td { padding: 0.35rem 0.6rem; }
td.mono { font-family: var(--mono); font-size: 0.8rem; }
.muted { color: var(--muted); }
tr[data-status="review"] > * { background: var(--review-row); }
tr[data-status="review"] > td:last-child { color: var(--review-fg); font-weight: 600; }
tr[data-status="no_fit"] > * { color: var(--muted); }

/* Tools */
.tool { border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5); background: var(--surface); padding: 1rem 1rem 1.25rem; margin: 1.5rem 0 2rem; }
@media (min-width: 40rem) { .tool { padding: 1.25rem 1.5rem 1.5rem; } }
.tool-title { margin-top: 0; }
.tool-privacy { font-size: 0.9rem; color: var(--ok-fg); background: var(--ok-bg); display: inline-block; padding: 0.3rem 0.7rem; border-radius: 6px; margin: 0 0 0.75rem; }
.tool .notice, .notice { font-size: 0.92rem; background: var(--info-bg); color: var(--info-fg); padding: 0.6rem 0.9rem; border-radius: var(--radius); }
.step-title { font-size: 1.05rem; margin: 1.25rem 0 0.5rem; }
.tool-step[hidden] { display: none; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem; border: 2px dashed var(--border); border-radius: var(--radius); padding: 1.5rem 1rem; text-align: center; cursor: pointer; background: var(--surface-2); }
.drop:hover, .drop.dragging, .drop:focus-within { border-color: var(--accent); }
.drop-main { font-weight: 600; color: var(--link); }
.drop-sub { font-size: 0.9rem; color: var(--muted); }
.drop input[type="file"] { margin-top: 0.5rem; max-width: 100%; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.75rem 1rem; margin: 0.75rem 0; align-items: end; }
.field-grid label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; font-weight: 500; }
.field-grid label.check { flex-direction: row; align-items: center; gap: 0.5rem; font-weight: 400; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.5rem 1rem 0.75rem; margin: 0.75rem 0; }
fieldset.inline label { display: block; margin: 0.25rem 0; }
legend { font-weight: 600; padding: 0 0.25rem; }
input, select, textarea, button { font: inherit; color: inherit; }
input[type="number"], input:not([type]), input[type="text"], input[type="password"], select, textarea {
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 0.45rem 0.55rem; min-height: 2.5rem; width: 100%;
}
input:disabled, select:disabled { opacity: 0.55; cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
textarea { font-family: var(--mono); font-size: 0.85rem; }
button, .button-link {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.5rem; padding: 0.45rem 1rem; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; text-decoration: none; color: var(--text); font-weight: 500;
}
button:hover, .button-link:hover { border-color: var(--accent); }
button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
button.link-button { background: none; border: 0; padding: 0; min-height: 0; color: var(--link); text-decoration: underline; font-weight: 400; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.note { font-size: 0.9rem; color: var(--muted); }
.note.warn { color: var(--review-fg); background: var(--review-bg); padding: 0.5rem 0.75rem; border-radius: var(--radius); }
.error { color: var(--error-fg); font-weight: 600; }
.status { font-weight: 600; padding: 0.7rem 1rem; border-radius: var(--radius); margin: 0.75rem 0; }
.status-ok { background: var(--ok-bg); color: var(--ok-fg); }
.status-review { background: var(--review-bg); color: var(--review-fg); }
.status-unverified { background: var(--info-bg); color: var(--info-fg); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.5rem 1rem; margin: 0.75rem 0; }
.stats div { background: var(--surface-2); padding: 0.5rem 0.75rem; border-radius: var(--radius); }
.stats dt { font-size: 0.8rem; color: var(--muted); }
.stats dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.warnings { font-size: 0.9rem; color: var(--review-fg); }
.warnings:empty { display: none; }
.breakdown, .caveats { margin: 0.25rem 0; padding-left: 1.1rem; font-size: 0.85rem; }
.caveats { color: var(--muted); }
.source { font-size: 0.8rem; }
.pricing-data { margin: 2rem 0; }
.research-notes dt { font-weight: 600; margin-top: 0.75rem; }
.research-notes dd { margin: 0.1rem 0 0; font-size: 0.88rem; color: var(--muted); }
details > summary { cursor: pointer; }
details.paste, details.options { margin: 0.75rem 0; }

/* Home */
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; max-width: none !important; }
.card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 1rem 1.1rem; }
.card h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 2rem 0 1rem; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 2fr 1fr; } }
.site-footer h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.site-footer ul { padding-left: 1.1rem; margin: 0.25rem 0; }
.footer-nav ul { list-style: none; padding: 0; }
.footer-nav li { margin: 0.2rem 0; }
.fineprint { color: var(--muted); font-size: 0.82rem; margin-top: 1.5rem; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .site-header nav, .tool, .site-footer nav { display: none; } }
