/* Farben, Schrift, Reset */

:root {
  --bg: #f4f2ec;
  --surface: #ffffff;
  --surface-2: #ebe8df;
  --border: #d6d1c3;
  --text: #1f2119;
  --text-muted: #62655a;
  --accent: #8a6a12;
  --accent-strong: #6d5208;
  --gold: #b8861b;
  --up: #2f7d3b;
  --down: #b3392f;
  --link: #5b6b1f;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 2px 8px rgb(0 0 0 / 0.05);

  --tier-s: #c0392b;
  --tier-a: #d9822b;
  --tier-b: #c9a227;
  --tier-c: #6a9a3a;
  --tier-d: #4f7fa8;
  --tier-f: #7a7a7a;

  --radius: 8px;
  --gap: 16px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14160f;
    --surface: #1d2018;
    --surface-2: #262a1f;
    --border: #353a2c;
    --text: #e8e6dc;
    --text-muted: #a2a593;
    --accent: #d4a63a;
    --accent-strong: #e8bd55;
    --gold: #e0b143;
    --up: #6cc479;
    --down: #ef7a6e;
    --link: #b9cc6a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #14160f;
  --surface: #1d2018;
  --surface-2: #262a1f;
  --border: #353a2c;
  --text: #e8e6dc;
  --text-muted: #a2a593;
  --accent: #d4a63a;
  --accent-strong: #e8bd55;
  --gold: #e0b143;
  --up: #6cc479;
  --down: #ef7a6e;
  --link: #b9cc6a;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: 1.75rem; letter-spacing: 0.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }

a { color: var(--link); }
a:hover { color: var(--accent-strong); }

img { max-width: 100%; display: block; }

button, input, select { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.muted { color: var(--text-muted); }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.up { color: var(--up); }
.down { color: var(--down); }
.gold { color: var(--gold); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
