:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1c1f23;
  --muted: #5d6670;
  --line: #e3e0d8;
  --accent: #0f5c4d;
  --accent-soft: #e3f0ec;
  --over: #a1430b;
  --over-soft: #fbeadf;
  --under: #33506e;
  --caveat: #fff6dc;
  --caveat-line: #e8c95c;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --surface: #1c2024;
    --text: #e8e6e1;
    --muted: #9aa3ab;
    --line: #2f353b;
    --accent: #6fc7b0;
    --accent-soft: #1d3a33;
    --over: #f0a070;
    --over-soft: #3d2618;
    --under: #9db8d6;
    --caveat: #2f2a17;
    --caveat-line: #8a7426;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 .4rem; }
h2 { font-size: 1.35rem; margin: 2.2rem 0 .6rem; }
h3 { font-size: 1.1rem; margin: 1.6rem 0 .4rem; }

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

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; }
.mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--surface); font-size: .8rem; font-weight: 800; }
.site-header nav { display: flex; gap: 1.2rem; }
.site-header nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-header nav a[aria-current="page"], .site-header nav a:hover { color: var(--text); }

main { padding-bottom: 3rem; }
.hero { padding: 2rem 0 1rem; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 46rem; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.crumbs { margin: 1.4rem 0 0; font-size: .9rem; }
.crumbs a::before { content: "← "; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; margin: 1rem 0 1.4rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat-value { font-size: clamp(1.25rem, 4vw, 1.6rem); font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: .9rem; }

.caveat { background: var(--caveat); border-left: 4px solid var(--caveat-line); border-radius: 6px; padding: 12px 16px; margin: 0 0 1.6rem; max-width: 60rem; }

.table-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.table-tools label { font-weight: 600; }
.table-tools input { flex: 1 1 220px; max-width: 340px; padding: 8px 10px; font: inherit; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
.download { margin-left: auto; font-size: .9rem; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--accent-soft); }
th { position: sticky; top: 0; background: var(--surface); font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); white-space: nowrap; }
th button { all: unset; cursor: pointer; }
th button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
th[aria-sort="ascending"] button::after { content: " ▲"; }
th[aria-sort="descending"] button::after { content: " ▼"; }
th[data-type="num"] { text-align: right; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dev-over { color: var(--over); font-weight: 600; }
.dev-under { color: var(--under); }

.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; margin: 1px 0; }
.badge-strong { background: var(--over-soft); color: var(--over); }
.badge-soft { background: var(--accent-soft); color: var(--accent); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-block; margin-left: 6px; font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; white-space: nowrap; }

.two-col { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.facts { display: grid; grid-template-columns: auto auto; gap: 6px 16px; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } .facts dd { text-align: left; margin-bottom: 6px; } }
.notes { margin: 0 0 1rem; padding-left: 1.1rem; }
.notes li { margin-bottom: .6rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.button { display: inline-block; background: var(--accent); color: var(--surface); text-decoration: none; padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.button:hover { opacity: .9; }

.prose { max-width: 46rem; }
.sources dt { font-weight: 700; margin-top: .8rem; }
.sources dd { margin: .2rem 0 0; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; padding: 1.2rem 0 2rem; }
.site-footer p { margin: .3rem 0; }
td.suppliers { font-size: .88rem; min-width: 10rem; }
.orgnr { font-size: .8rem; color: var(--muted); margin-left: 4px; }
.table-tools select { padding: 8px 10px; font: inherit; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.years { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.years a { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; background: var(--surface); }
.years a[aria-current="page"] { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.history td.num, .history th { white-space: nowrap; }
.parts { margin-top: 10px; }
.parts summary { cursor: pointer; color: var(--accent); }
.parts .facts { margin-top: 8px; }
tr[aria-current="true"] td { font-weight: 600; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 10; background: var(--accent); color: var(--surface); padding: 8px 14px; border-radius: 0 0 8px 8px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 0; }
main:focus { outline: none; }
a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.badge-note { background: transparent; color: var(--muted); border: 1px solid var(--line); }
