:root {
  color-scheme: light dark;
  --bg: #f4f6f1; --surface: #fff; --ink: #20352e; --muted: #53685e;
  --line: #d6dfd6; --accent: #22624f; --soft: #dceee4; --gold: #b67c27;
  font: 16px/1.5 system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15221d; --surface: #1d2e27; --ink: #eff6ed; --muted: #b6c8bd;
    --line: #3d5147; --accent: #98dcba; --soft: #304e40; --gold: #e4af62;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
header, main { max-width: 1120px; margin: auto; padding: 20px clamp(16px, 4vw, 48px); }
header, .toolbar, nav, .axis, .legend, .brand { display: flex; align-items: center; gap: 12px; }
header, .toolbar, .axis { justify-content: space-between; }
header { border-bottom: 1px solid var(--line); }
.brand { font-size: 1.15rem; font-weight: 750; }
.brand b { background: var(--accent); color: var(--surface); border-radius: 8px; padding: 0 7px; font-size: 1.45rem; }
main { padding-bottom: 64px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.1; letter-spacing: -.04em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1rem; font-weight: 600; }
p, small, header > span, .axis, .legend { color: var(--muted); }
h1 + p, h2 + p, .card p { margin-top: 8px; }
.eyebrow { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; margin: 22px 0 6px; }
nav { gap: 4px; flex-wrap: wrap; }
a, button { font: inherit; font-weight: 650; border-radius: 8px; padding: 7px 12px; }
nav a, .quiet { background: transparent; color: var(--muted); text-decoration: none; }
nav a[aria-current], nav a:hover, .quiet:hover { background: var(--soft); color: var(--accent); }
.period, section, .legend { margin-top: 20px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cohorts { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); margin-top: 12px; }
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(14px, 2.5vw, 24px); }
.card strong { display: block; font-size: clamp(1.8rem, 4vw, 2.6rem); font-variant-numeric: tabular-nums; }
.legend { font-size: .9rem; flex-wrap: wrap; }
.legend span::before { content: ''; display: inline-block; width: .75em; height: .75em; background: var(--accent); border-radius: 2px; margin-right: 6px; }
.legend span + span::before { background: var(--gold); }
svg { display: block; width: 100%; height: 110px; border-bottom: 1px solid var(--line); margin-top: 14px; }
.visits { fill: var(--accent); } .accounts { fill: var(--gold); }
.axis { font-size: .8rem; }
.empty { padding: 24px 0 8px; }
.scroll { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: 8px; border-bottom: 1px solid var(--line); }
th { font-size: .88rem; } th:first-child { text-align: left; white-space: nowrap; }
.login { max-width: 420px; margin: 7vh auto; }
.login .eyebrow { margin-top: 0; } .login h1 { font-size: 2.1rem; }
.login form { display: grid; gap: 10px; margin-top: 24px; }
input { font: inherit; border-radius: 8px; border: 1px solid var(--muted); padding: 9px; background: var(--bg); color: var(--ink); }
button { cursor: pointer; border: 0; color: var(--surface); background: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 650px) {
  .cards:not(.cohorts) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  th, td { padding: 7px; }
}
