/* Statuva brand: Nachtblau, Gold, Papier, Schiefer. Gold never as text on light backgrounds. */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 600; font-display: swap; src: url("../fonts/sora-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 700; font-display: swap; src: url("../fonts/sora-latin-700-normal.woff2") format("woff2"); }

:root {
  --night: #0B1F3A;
  --gold: #D4A63A;
  --gold-deep: #A27A12;
  --paper: #F5F3EE;
  --slate: #475467;
  --bg: var(--paper);
  --surface: #FFFFFF;
  --text: var(--night);
  --muted: var(--slate);
  --border: #E3DFD5;
  --accent: var(--night);
  --accent-text: #FFFFFF;
  --danger: #B42318;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07152A;
    --surface: #0B1F3A;
    --text: #F5F3EE;
    --muted: #B4BCC8;
    --border: #1D3355;
    --accent: var(--gold);
    --accent-text: var(--night);
    --danger: #F97066;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.55 "Inter", system-ui, sans-serif; font-variant-numeric: tabular-nums;
}
h1, h2 { font-family: "Sora", "Inter", sans-serif; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 .5em; }
h2 { font-weight: 600; font-size: 1.15rem; margin: 0 0 .5em; }
a { color: inherit; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-row, .footer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { .logo-light { display: none; } .logo-dark { display: inline; } }
.main-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.main-nav a { text-decoration: none; font-weight: 600; }
.main-nav a:hover { text-decoration: underline; }

main { padding: 32px 16px 48px; }
.hero { padding: 24px 0; max-width: 680px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 0 0 16px; }
.card.danger { border-color: var(--danger); }
.profile { display: flex; gap: 16px; align-items: center; }
.avatar { border-radius: 50%; }
.alert { border-left: 4px solid var(--danger); padding: 8px 12px; background: var(--surface); }

.button {
  display: inline-block; border: 0; border-radius: 8px; padding: 10px 16px; cursor: pointer;
  background: var(--accent); color: var(--accent-text); font: 600 15px/1 "Inter", sans-serif; text-decoration: none;
}
.button.small { padding: 8px 12px; }
.button.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.button.danger { background: var(--danger); color: #FFFFFF; }
button.link { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
button.link:hover { text-decoration: underline; }
button.link.active { text-decoration: underline; text-decoration-color: var(--gold-deep); text-underline-offset: 4px; }
form.inline { display: inline; }
.lang button { margin-left: 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.stack { display: grid; gap: 8px; max-width: 360px; }
input, select { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }

.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }

h3 { font: 600 1rem/1.3 "Sora", "Inter", sans-serif; margin: 16px 0 4px; }
.small { font-size: 14px; }
.good { color: inherit; border-left: 4px solid var(--gold-deep); padding-left: 10px; }
.notice { border-left: 4px solid var(--gold-deep); padding: 8px 12px; background: var(--surface); }
.notice-card { border-color: var(--gold-deep); }
.danger-text { color: var(--danger); }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 8px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
label.check { display: flex; align-items: center; gap: 8px; }
input, select { min-width: 0; width: 100%; }
input[type="checkbox"] { width: auto; }
input.copy { font-family: ui-monospace, monospace; font-size: 13px; }

.meter-row { display: grid; grid-template-columns: 3.5em 1fr auto; gap: 12px; align-items: center; margin: 8px 0; }
progress { width: 100%; height: 12px; appearance: none; border: 0; border-radius: 6px; background: var(--border); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--border); border-radius: 6px; }
progress::-webkit-progress-value { background: var(--gold); border-radius: 6px; }
progress::-moz-progress-bar { background: var(--gold); border-radius: 6px; }

.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-weight: 600; color: var(--muted); font-size: 13px; }
.table .num { text-align: right; white-space: nowrap; }
.table tr.best td { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.num { font-variant-numeric: tabular-nums; }

.options { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-bottom: 16px; }
fieldset.option { margin: 0; display: grid; gap: 10px; }
fieldset.option legend { font: 600 1rem "Sora", sans-serif; padding: 0 4px; display: flex; gap: 6px; align-items: center; }
.label-input { width: 6em; padding: 4px 6px; }
details summary { cursor: pointer; font-weight: 600; font-size: 14px; margin: 4px 0 8px; }

.tabs { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 16px; padding-bottom: 8px; }
.tabs a { text-decoration: none; font-weight: 600; color: var(--muted); }
.tabs a[aria-current="page"] { color: var(--text); text-decoration: underline; text-decoration-color: var(--gold-deep); text-underline-offset: 6px; }
.tabs .years { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.row.spread { justify-content: space-between; align-items: baseline; }
tr.cancelled td { text-decoration: line-through; color: var(--muted); }
label.end { align-self: end; }

.late-row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin: 4px 0; }

.spark { width: 100%; max-width: 480px; height: 60px; }
.spark polyline { fill: none; stroke: var(--gold-deep); stroke-width: 2; vector-effect: non-scaling-stroke; }
@media (prefers-color-scheme: dark) { .spark polyline { stroke: var(--gold); } }
.button.small.danger-text { color: var(--danger); }
label .row { flex-wrap: nowrap; }
label .row input { width: 50%; }
.row + .card, .row + section { margin-top: 16px; }
.card.login { max-width: 420px; margin: 32px auto; }
