/* WasteLedger design tokens: forest green, white, charcoal, with a little lime. */
:root {
  color-scheme: light;
  --forest-900: #0f2a1f;
  --forest-800: #143626;
  --forest-700: #1b4732;
  --forest-600: #235a40;
  --forest-500: #2e7a50;
  --forest-100: #e3eee7;
  --forest-50: #f2f7f3;
  --lime-400: #c6e86b;
  --lime-300: #d8f08f;
  --lime-600: #6f9a24;
  --charcoal-900: #1b1f1d;
  --charcoal-700: #343a37;
  --charcoal-500: #5c6460;
  --charcoal-300: #a7aeaa;
  --charcoal-200: #d3d8d5;
  --charcoal-100: #e9ecea;

  --bg: #ffffff;
  --bg-subtle: #f6f8f6;
  --surface: #ffffff;
  --surface-2: #f2f5f3;
  --border: #dfe4e1;
  --border-strong: #c3cbc6;
  --text: #1b1f1d;
  --text-2: #4a524e;
  --text-3: #6b736f;
  --accent: var(--forest-600);
  --accent-ink: #ffffff;
  --accent-soft: var(--forest-100);
  --highlight: var(--lime-400);

  /* Status colours: reserved. Always paired with an icon or a label. */
  --ok: #23774a;
  --ok-soft: #e1f1e7;
  --warn: #9a6400;
  --warn-soft: #fbf0d9;
  --bad: #b3261e;
  --bad-soft: #fbe5e3;
  --info: #2b5f8a;
  --info-soft: #e3eef7;

  /* Data basis (ordinal). Checked with the dataviz validator. */
  --basis-verified: #2e7a50;
  --basis-reported: #7fae3e;
  --basis-estimated: #8d958f;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 42, 31, 0.06);
  --shadow: 0 1px 2px rgba(15, 42, 31, 0.05), 0 8px 24px -8px rgba(15, 42, 31, 0.12);
  --shadow-lg: 0 24px 60px -20px rgba(15, 42, 31, 0.28);

  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Newsreader", ui-serif, Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1412;
    --bg-subtle: #121916;
    --surface: #161d1a;
    --surface-2: #1c2521;
    --border: #2a3530;
    --border-strong: #3a4842;
    --text: #eef2ef;
    --text-2: #bcc6c0;
    --text-3: #8f9a94;
    --accent: #4fae7a;
    --accent-ink: #0b1a12;
    --accent-soft: #1d3428;
    --ok: #5cc48a; --ok-soft: #173325;
    --warn: #e2a948; --warn-soft: #33270f;
    --bad: #f07a70; --bad-soft: #3a1b18;
    --info: #79b2e0; --info-soft: #172a3a;
    --basis-verified: #217a52;
    --basis-reported: #a0992f;
    --basis-estimated: #7b847f;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1412;
  --bg-subtle: #121916;
  --surface: #161d1a;
  --surface-2: #1c2521;
  --border: #2a3530;
  --border-strong: #3a4842;
  --text: #eef2ef;
  --text-2: #bcc6c0;
  --text-3: #8f9a94;
  --accent: #4fae7a;
  --accent-ink: #0b1a12;
  --accent-soft: #1d3428;
  --ok: #5cc48a; --ok-soft: #173325;
  --warn: #e2a948; --warn-soft: #33270f;
  --bad: #f07a70; --bad-soft: #3a1b18;
  --info: #79b2e0; --info-soft: #172a3a;
  --basis-verified: #217a52;
  --basis-reported: #a0992f;
  --basis-estimated: #7b847f;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--lime-600); outline-offset: 2px; border-radius: 4px; }
.mono { font-family: var(--font-mono); font-size: 0.86em; letter-spacing: -0.01em; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px;
  padding: 10px 18px; font-weight: 650; font-size: 14px; cursor: pointer;
  text-decoration: none; transition: background .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--forest-700); color: #fff; }
.btn-primary:hover { background: var(--forest-800); }
.btn-lime { background: var(--lime-400); color: var(--forest-900); }
.btn-lime:hover { background: var(--lime-300); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Basis tags: show where a number comes from */
.basis {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--text-2); background: var(--surface);
}
.basis::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: currentColor; }
.basis-verified::before { background: var(--basis-verified); }
.basis-reported::before { background: var(--basis-reported); }
.basis-estimated::before {
  background: repeating-linear-gradient(45deg, var(--basis-estimated) 0 2px, transparent 2px 4px);
  outline: 1px solid var(--basis-estimated); outline-offset: -1px;
}

/* Status chips: icon + label, never colour alone */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 650; padding: 2px 9px; border-radius: 999px;
  white-space: nowrap;
}
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-bad { background: var(--bad-soft); color: var(--bad); }
.chip-info { background: var(--info-soft); color: var(--info); }
.chip-muted { background: var(--surface-2); color: var(--text-2); }
.chip svg { width: 12px; height: 12px; }
