:root {
  --bg: #f4f5f7;
  --card: #fff;
  --text: #1d2330;
  --muted: #6b7280;
  --accent: #fc5200;
  --ok: #15803d;
  --bad: #b91c1c;
  --warn: #b45309;
  --line: #e5e7eb;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111318; --card: #1b1e25; --text: #e8eaef; --muted: #9aa1ad; --line: #2c313b; --ok: #4ade80; --bad: #f87171; --warn: #fbbf24; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); }
main { max-width: 760px; margin: 0 auto; padding: 12px; }
.top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; text-decoration: none; color: var(--text); font-size: 1.15rem; }
.top nav a { margin-left: 14px; text-decoration: none; color: var(--text); }
footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 24px 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
h1, h2, h3 { margin: 0 0 8px; }
h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
.muted { color: var(--muted); font-weight: normal; }
.small { font-size: .85rem; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.inline { display: inline; }
.big { font-size: 2.2rem; font-weight: 800; }
.big .muted { font-size: 1.1rem; }
.bar { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; margin: 6px 0 10px; }
.bar div { height: 100%; background: var(--accent); }
.ok { color: var(--ok); font-weight: 700; }
.warn-text { color: var(--warn); }
.flash { background: #fff4ec; border: 1px solid #ffd0b5; color: #7a2e00; padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; }
.flash.warn { background: #fef3c7; border-color: #fcd34d; color: #78350f; }
.btn, .btn-strava { display: inline-block; border: 0; border-radius: 8px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--line); color: var(--text); }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.btn.danger { background: var(--bad); color: #fff; }
.btn-strava { background: #fc5200; color: #fff; padding: 14px 22px; font-size: 1.05rem; margin: 10px 0; }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.hero { text-align: center; padding: 40px 12px; }
.hero h1 { font-size: 1.8rem; line-height: 1.2; margin-bottom: 14px; }
table.team { width: 100%; border-collapse: collapse; }
table.team th, table.team td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.team th { font-size: .8rem; color: var(--muted); font-weight: 600; }
table.team td:nth-child(n+3), table.team th:nth-child(n+3) { text-align: right; }
.avatar { width: 56px; height: 56px; border-radius: 50%; }
.pill { font-size: .8rem; padding: 3px 10px; border-radius: 99px; background: var(--line); white-space: nowrap; }
.week { border-left: 5px solid var(--line); }
.status-ok, .status-paid { border-left-color: var(--ok); }
.status-missed { border-left-color: var(--warn); }
.status-penalty { border-left-color: var(--bad); }
.status-running { border-left-color: var(--accent); }
.status-ok .pill, .status-paid .pill { background: var(--ok); color: #fff; }
.status-missed .pill { background: var(--warn); color: #fff; }
.status-penalty .pill { background: var(--bad); color: #fff; }
.status-running .pill { background: var(--accent); color: #fff; }
ul.acts { list-style: none; margin: 8px 0 0; padding: 0; }
ul.acts li { padding: 8px 0; border-top: 1px solid var(--line); }
ul.acts li.invalid { opacity: .65; }
.strava-link { color: #fc5200; font-weight: 600; font-size: .85rem; white-space: nowrap; }
.flag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: #fde68a; color: #78350f; font-size: .75rem; }
details.admin { margin-top: 8px; font-size: .9rem; }
details.admin form, form.stack { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; align-items: flex-start; }
form.admin { margin-top: 4px; font-size: .85rem; }
input.num { width: 80px; }
input, select { font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--text); }
.prose li { margin-bottom: 8px; }
