/* SPDX-License-Identifier: Apache-2.0 — SovSpace on proofof.ai. Own palette: warm paper, deep plum ink, violet accent. */
:root {
  --bg: #f6f3ec;
  --surface: #fffdf8;
  --ink: #1f1a2b;
  --muted: #564f66;
  --line: #d9d2c3;
  --accent: #5b34b8;
  --accent-ink: #ffffff;
  --accent-soft: #ece6fb;
  --banner-bg: #fbe7b0;
  --banner-ink: #4a3000;
  --banner-line: #e2c26a;
  --pred-bg: #e3edf8;
  --pred-ink: #173e66;
  --scored-bg: #e2f1e3;
  --scored-ink: #1d4d21;
  --warn-bg: #f8e4e1;
  --warn-ink: #6b2319;
  --focus: #c2410c;
  --radius: 10px;
  --maxw: 72rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15131d;
    --surface: #1e1b29;
    --ink: #ede9f7;
    --muted: #b6afca;
    --line: #3a3550;
    --accent: #b9a3ff;
    --accent-ink: #15131d;
    --accent-soft: #2c2645;
    --banner-bg: #3b2d06;
    --banner-ink: #ffe3a1;
    --banner-line: #6e5413;
    --pred-bg: #16304a;
    --pred-ink: #c4dcf5;
    --scored-bg: #183a1d;
    --scored-ink: #c6ecc9;
    --warn-bg: #45201b;
    --warn-ink: #f7cdc6;
    --focus: #fdba74;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15131d; --surface: #1e1b29; --ink: #ede9f7; --muted: #b6afca; --line: #3a3550;
  --accent: #b9a3ff; --accent-ink: #15131d; --accent-soft: #2c2645;
  --banner-bg: #3b2d06; --banner-ink: #ffe3a1; --banner-line: #6e5413;
  --pred-bg: #16304a; --pred-ink: #c4dcf5; --scored-bg: #183a1d; --scored-ink: #c6ecc9;
  --warn-bg: #45201b; --warn-ink: #f7cdc6; --focus: #fdba74; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 48rem) { .wrap { padding: 0 32px; } }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.9em; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem); margin: 1.5rem 0 0.75rem; }
h2 { font-size: 1.4rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
p, ul, ol, dl { margin: 0 0 1rem; }
.lede { font-size: 1.125rem; max-width: 44rem; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip { position: absolute; left: 8px; top: -60px; background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { top: 8px; }

.site-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.brand .mark { width: 28px; height: 28px; color: var(--accent); }
.brand-domain { font-weight: 500; font-size: 0.85rem; color: var(--muted); }
.nav { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.nav a { display: inline-block; padding: 8px 10px; min-height: 44px; line-height: 28px; color: var(--ink); text-decoration: none; border-radius: 6px; }
.nav a:hover { background: var(--accent-soft); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 700; box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }

.banner { background: var(--banner-bg); color: var(--banner-ink); border-bottom: 1px solid var(--banner-line); }
.banner p { margin: 0; padding: 10px 0; }
.banner a { color: var(--banner-ink); font-weight: 600; }

main { padding-bottom: 3rem; }
.hero { padding-top: 0.5rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 12px; margin: 1rem 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat-label { margin: 0 0 4px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.stat-value { margin: 0; font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-none { font-size: 1.5rem; }
.stat-note { margin: 6px 0 0; color: var(--muted); font-size: 0.92rem; }
.legend { font-size: 0.92rem; color: var(--muted); }

.tag { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; padding: 1px 7px; border-radius: 999px; line-height: 1.6; }
.tag-predicted { background: var(--pred-bg); color: var(--pred-ink); }
.tag-scored { background: var(--scored-bg); color: var(--scored-ink); }
.tag-open { background: var(--pred-bg); color: var(--pred-ink); }
.tag-resolved { background: var(--scored-bg); color: var(--scored-ink); }
.tag-past { background: var(--warn-bg); color: var(--warn-ink); }

.table-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
caption { text-align: left; padding: 10px 12px 0; font-weight: 600; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 0.85rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
.n { text-align: right; }
.summary tbody th { font-weight: 600; }

.steps { padding-left: 1.25rem; max-width: 46rem; }
.steps li { margin-bottom: 0.6rem; }
.button { display: inline-block; min-height: 44px; padding: 10px 16px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; border: 2px solid var(--accent); cursor: pointer; font: inherit; font-weight: 700; margin: 0 8px 8px 0; }
.button:hover { filter: brightness(1.08); }
.button-quiet { background: transparent; color: var(--accent); }
.button[disabled] { opacity: 0.45; cursor: not-allowed; }

.toc ol { padding-left: 1.25rem; }
.defs dt { font-weight: 700; margin-top: 0.6rem; }
.defs dd { margin: 0 0 0.4rem; }
section { max-width: 100%; }
section > p, section > ul, .defs { max-width: 46rem; }

/* predictions */
.filters { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 1.5rem 0 0.5rem; }
@media (min-width: 40rem) { .filters { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .filters { grid-template-columns: repeat(3, 1fr) 2fr; } }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-weight: 600; font-size: 0.92rem; }
select, input[type="search"] { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--muted); border-radius: 8px; padding: 9px 10px; min-height: 44px; width: 100%; }
.count { font-weight: 600; margin: 1rem 0 0.5rem; }
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.preds td { font-size: 0.95rem; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.85rem; }
.subject { overflow-wrap: anywhere; }
.withheld { color: var(--muted); font-style: italic; }
.cell-body { min-width: 0; }
.cell-sub { display: block; color: var(--muted); font-size: 0.82rem; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 0; }
.pager .button { margin: 0; }

@media (max-width: 47.99rem) {
  .preds, .preds thead, .preds tbody, .preds tr, .preds th, .preds td { display: block; }
  .preds thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .preds tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .preds td { border: 0; padding: 4px 12px; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 8px; }
  .preds td.n { text-align: left; }
  .preds td::before { content: attr(data-label); font-weight: 700; color: var(--muted); font-size: 0.85rem; }
  .table-scroll:has(.preds) { overflow-x: visible; }
}

.site-foot { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 0.92rem; }
.site-foot .wrap { padding-top: 20px; padding-bottom: 28px; }
.site-foot p { max-width: 46rem; }
.site-foot a { color: var(--accent); }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
