:root {
  --bg: #f6f3ec;
  --surface: #fffdf8;
  --ink: #1c2725;
  --muted: #56625f;
  --line: #d8d1c3;
  --accent: #1d5c57;
  --accent-ink: #ffffff;
  --accent-soft: #e2eeeb;
  --warn-bg: #fbefdc;
  --warn-line: #d9a25a;
  --warn-ink: #5b3a06;
  --done-bg: #ecf2e6;
  --done-line: #a9c08f;
  --focus: #c25e00;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121817;
    --surface: #1a2221;
    --ink: #e8eeec;
    --muted: #a2b0ac;
    --line: #2f3c3a;
    --accent: #7fc4bb;
    --accent-ink: #0d1514;
    --accent-soft: #203330;
    --warn-bg: #33270f;
    --warn-line: #8a6526;
    --warn-ink: #f3d39b;
    --done-bg: #1e2a1b;
    --done-line: #4d6640;
    --focus: #ffb35c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121817; --surface: #1a2221; --ink: #e8eeec; --muted: #a2b0ac; --line: #2f3c3a;
  --accent: #7fc4bb; --accent-ink: #0d1514; --accent-soft: #203330; --warn-bg: #33270f;
  --warn-line: #8a6526; --warn-ink: #f3d39b; --done-bg: #1e2a1b; --done-line: #4d6640; --focus: #ffb35c;
  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 1.1875rem/1.6 var(--sans);
}
.wrap { max-width: 60rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 40rem) { .wrap { padding: 0 24px; } }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -0.005em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.7rem); margin: 0.6em 0 0.3em; }
h2 { font-size: 1.55rem; margin: 1.8em 0 0.5em; }
h3 { font-size: 1.2rem; margin: 1.4em 0 0.4em; }
p, ul, ol { margin: 0 0 1em; }
small, .small { font-size: 0.9rem; color: var(--muted); }
.lede { font-size: 1.25rem; color: var(--muted); max-width: 42rem; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 9; }
.skip:focus { left: 8px; }

.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top-in { 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: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.brand .ni { color: var(--accent); }
.mark { width: 26px; height: 26px; border-radius: 6px; background: var(--accent); position: relative; flex: none; }
.mark::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 6px; height: 9px; border: 2px solid var(--accent-ink); border-top: 0; border-radius: 0 0 3px 3px; }
.mark::before { content: ""; position: absolute; left: 4px; right: 4px; top: 5px; height: 2px; background: var(--accent-ink); border-radius: 2px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 16px; }
.nav a { color: var(--ink); text-decoration: none; font-size: 1rem; padding: 6px 0; display: inline-block; }
.nav a:hover, .nav a[aria-current] { color: var(--accent); text-decoration: underline; }

.crumbs ol { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 0.95rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin: 0 6px 0 2px; color: var(--line); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin: 0 0 1.25em; }
.card > :last-child { margin-bottom: 0; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }

.facts { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.facts > div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.facts > div:first-child { border-top: 0; padding-top: 0; }
.facts dt { font-size: 0.95rem; color: var(--muted); }
.facts dd { margin: 0; }
@media (min-width: 40rem) { .facts > div { grid-template-columns: 13rem 1fr; gap: 16px; } }

.tag { display: inline-block; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); border: 1px solid var(--line); vertical-align: 0.1em; }
.cats { list-style: none; padding: 0; margin: 0; }
.cats li { padding: 3px 0; }
.cats code { font: 600 0.9rem var(--sans); background: var(--accent-soft); border-radius: 4px; padding: 1px 6px; margin-right: 6px; }

.notice { border-left: 5px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 0 0 1.25em; }
.notice.done { border-left-color: var(--done-line); background: var(--done-bg); color: var(--ink); }
.notice p:last-child { margin-bottom: 0; }
blockquote { margin: 0.4em 0 0.8em; padding: 0 0 0 14px; border-left: 3px solid var(--line); font-family: var(--serif); font-size: 1.1rem; }

.reports { list-style: none; padding: 0; margin: 0; }
.reports > li { border-top: 1px solid var(--line); padding: 14px 0; }
.reports > li:first-child { border-top: 0; padding-top: 0; }
.rep-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.rep-date { font-weight: 650; }
.rep-meta { color: var(--muted); font-size: 0.95rem; }
.afi { margin: 6px 0 4px; }
.afi .num { font-weight: 650; }
.rep-note { font-size: 0.95rem; color: var(--muted); margin: 0 0 4px; }

.list { list-style: none; padding: 0; margin: 0 0 1.5em; }
.list > li { border-top: 1px solid var(--line); padding: 12px 0; }
.list > li:last-child { border-bottom: 1px solid var(--line); }
.list a.name { font-weight: 600; font-size: 1.1rem; }
.list .sub { display: block; color: var(--muted); font-size: 0.95rem; }

.cols { columns: 1; column-gap: 32px; list-style: none; padding: 0; }
.cols li { break-inside: avoid; padding: 4px 0; }
@media (min-width: 34rem) { .cols { columns: 2; } }
@media (min-width: 52rem) { .cols { columns: 3; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 12px; margin: 1em 0 1.5em; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.stat b { display: block; font-family: var(--serif); font-size: 1.8rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.95rem; color: var(--muted); }

.table-wrap { overflow-x: auto; margin: 0 0 1.25em; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 1rem; }
caption { text-align: left; padding: 12px 14px 0; font-weight: 600; }
th, td { text-align: left; padding: 9px 14px; border-top: 1px solid var(--line); vertical-align: top; }
thead th { border-top: 0; font-size: 0.92rem; color: var(--muted); font-weight: 600; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.search { margin: 1em 0 1.5em; }
.search label { display: block; font-weight: 600; margin-bottom: 6px; }
.search input { width: 100%; font: inherit; padding: 12px 14px; border: 2px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.search input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
#results:empty { display: none; }

.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; padding: 10px 18px; border-radius: 8px; font-weight: 600; }
.btn:hover { filter: brightness(1.08); }
.sources { font-size: 0.95rem; }
.sources li { margin-bottom: 4px; }

.foot { margin-top: 4em; border-top: 1px solid var(--line); background: var(--surface); padding: 24px 0 32px; font-size: 1rem; }
.foot .indep { max-width: 46rem; }
.foot-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }

@media (prefers-reduced-motion: no-preference) { a { transition: text-decoration-thickness 0.1s; } }
@media print { .top, .foot, .search { display: none; } body { background: #fff; color: #000; } }
