/* Who Funded Genocide — standalone stylesheet.
   Self-contained on purpose: this domain has no dependency on the archive's
   style.css / nav.css / nav.js, so the site stands up even if that host is
   unreachable. System font stack only — no external font hosts, which keeps
   the CSP to 'self' with no exceptions. */

:root {
  --bg:        #0f1113;
  --panel:     #15181b;
  --panel2:    #131619;
  --line:      #2a2f34;
  --line2:     #1f2429;
  --ink:       #e0e0e0;
  --ink-dim:   #9aa0a6;
  --ink-dimmer:#7d848b;
  --white:     #ffffff;
  --accent:    #b22222;
  --accent2:   #c0392b;
  --accent-ink:#e07a6f;
  --gold:      #e8b04b;
  --mono: ui-monospace, 'JetBrains Mono', Consolas, 'Courier New', monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--gold); }

/* ---------------------------------------------------------------- header */

.site-head {
  display: flex; align-items: center; gap: 28px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: #0c0e10;
  position: sticky; top: 0; z-index: 20;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--mono);
  font-size: 1.5rem; font-weight: 700; letter-spacing: .01em;
  color: var(--white); text-decoration: none; white-space: nowrap;
  line-height: 1.1;
}
/* Only "Genocide" carries the accent; "WhoFunded" stays white. */
.brand span { color: var(--accent2); }
.site-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink-dim); text-decoration: none; font-size: .88rem;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.active { color: var(--white); border-bottom-color: var(--accent); }

/* ------------------------------------------------------------------ main */

main { padding: 24px 28px 60px; max-width: 1400px; margin: 0 auto; }
h1 { font-size: 2rem; margin: 18px 0 6px; color: var(--white); }
.sub { color: var(--ink-dim); font-size: .95rem; margin: 0 0 22px; max-width: 78ch; line-height: 1.6; }

.notice {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--panel); border-radius: 6px;
  padding: 14px 18px; margin: 0 0 24px; max-width: 100ch;
}
.notice h2 {
  font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
  color: #e74c3c; margin: 0 0 8px; font-family: var(--mono);
}
.notice p { margin: 6px 0; font-size: .88rem; line-height: 1.65; color: #b9bfc5; }
.notice a { color: var(--ink); }

/* ------------------------------------------------------------------ stats */

.stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 24px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 14px 18px; min-width: 150px; flex: 1 1 150px;
}
.stat-v { font-size: 1.5rem; font-weight: 700; color: var(--white); font-family: var(--mono); }
.stat-l { font-size: .82rem; color: #c9ced3; margin-top: 4px; }
.stat-s { font-size: .74rem; color: var(--ink-dimmer); margin-top: 2px; }

/* ------------------------------------------------------------------- tabs */

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 0 0 18px; }
.tab {
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  color: var(--ink-dim); padding: 10px 16px; cursor: pointer;
  font-size: .9rem; font-family: inherit;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--white); border-bottom-color: var(--accent); }

/* --------------------------------------------------------------- controls */

.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 14px; }
.controls input, .controls select {
  background: #1a1e21; color: var(--ink); border: 1px solid #333a40;
  border-radius: 5px; padding: 8px 11px; font-size: .88rem; font-family: inherit;
}
.controls input { min-width: 280px; flex: 1 1 280px; }
.controls input:focus, .controls select:focus { outline: 1px solid var(--accent); border-color: var(--accent); }
#resultCount { color: var(--ink-dim); font-size: .84rem; font-family: var(--mono); }

/* ------------------------------------------------------------------ table */

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--panel2); }
table { border-collapse: collapse; width: 100%; font-size: .85rem; }
thead th {
  position: sticky; top: 0; background: #191d21; color: #c9ced3; text-align: left;
  padding: 10px 12px; font-weight: 600; white-space: nowrap;
  border-bottom: 1px solid var(--line);
  font-size: .78rem; letter-spacing: .04em; text-transform: uppercase;
}
tbody td { padding: 9px 12px; border-bottom: 1px solid var(--line2); vertical-align: top; }
tbody tr:hover { background: #181c20; }
td.name { color: var(--white); font-weight: 600; white-space: nowrap; }
td.num { text-align: right; font-family: var(--mono); white-space: nowrap; }
td.amt { color: var(--gold); }
td.dim { color: #868d94; }
td.empty { text-align: center; padding: 34px; color: #868d94; }
td.empty.err { color: #f66; }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: .7rem;
  white-space: nowrap; background: rgba(192,57,43,.14); color: var(--accent-ink);
  border: 1px solid rgba(192,57,43,.3);
}

/* ------------------------------------------------------------- pagination */

.pagination { text-align: center; margin: 18px 0 0; }
.pagination button {
  padding: 7px 13px; margin: 0 3px; background: #1a1e21; color: #ddd;
  border: 1px solid #333a40; border-radius: 4px; cursor: pointer;
  font-family: inherit; font-size: .84rem;
}
.pagination button:hover:not(:disabled) { border-color: var(--accent); }
.pagination button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination button:disabled { opacity: .35; cursor: default; }
.pagination .gap { color: #5c6369; padding: 0 4px; }

/* --------------------------------------------------------------- download */

.dl-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 0; }
.dl-btn {
  display: inline-flex; align-items: center; padding: 9px 18px;
  border: 1px solid var(--accent2); border-radius: 8px; color: #e8e8e8;
  text-decoration: none; font-family: var(--mono); font-size: .8rem;
  background: transparent; transition: background .15s, color .15s;
}
.dl-btn:hover { background: var(--accent2); color: #fff; }

/* ----------------------------------------------------------------- footer */

.site-foot {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 22px 28px 40px; color: var(--ink-dimmer); font-size: .84rem;
}
.site-foot p { margin: 6px 0; }
.site-foot a { color: var(--ink-dim); }
.site-foot .fine { font-size: .76rem; color: #5c6369; max-width: 90ch; }

/* ------------------------------------------------------- methodology page */

.doc { max-width: 860px; }
.doc h2 {
  font-size: 1.1rem; color: var(--white); margin: 34px 0 10px;
  padding-bottom: 7px; border-bottom: 1px solid var(--line);
}
.doc p, .doc li { color: #c2c8ce; line-height: 1.72; font-size: .94rem; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc code {
  background: #1a1e21; border: 1px solid var(--line); border-radius: 3px;
  padding: 1px 5px; font-family: var(--mono); font-size: .85em; color: #dcdfe2;
}
.doc .box {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--panel); border-radius: 6px; padding: 14px 18px; margin: 20px 0;
}
.doc .box p { margin: 6px 0; font-size: .9rem; }

@media (max-width: 700px) {
  .site-head { padding: 12px 14px; gap: 14px; }
  main { padding: 16px 12px 40px; }
  h1 { font-size: 1.5rem; }
  .controls input { min-width: 0; }
  .site-foot { padding: 18px 14px 32px; }
}
