/* The /stats page (src/web/views/stats.eta). Site colours and fonts; bars in the Pep colours. */
.stats-hero{padding-top:calc(var(--section-gap)/2)}
.stats-hero h1{margin:.1em 0 .3em}
.stats-live{font-size:20px;margin:0 0 24px}
.stats-live strong{display:block;font-family:var(--display-font,inherit);font-size:clamp(64px,14vw,120px);line-height:1;color:var(--pep-red)}
.stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0}
.stats-grid div{background:var(--surface);border-radius:16px;padding:14px 16px}
.stats-grid dt{color:var(--muted);font-size:14px}
.stats-grid .stats-plays-sub{margin:4px 0 0;font:400 13px/1.4 Inter,system-ui,sans-serif;color:var(--muted)}
.stats-grid dd{margin:4px 0 0;font-size:28px;font-weight:700}
.stats-section{padding:calc(var(--section-gap)/2) 0;border-top:1px solid var(--border)}
.stats-section h2{margin:0 0 12px}
.stats-note,.stats-empty{color:var(--muted)}
.stats-pages{list-style:none;margin:0;padding:0}
.stats-pages li{display:flex;justify-content:space-between;align-items:baseline;gap:12px;max-width:640px;padding:4px 0}
.stats-pages a{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.stats-pages .num{font-weight:700;min-width:3ch;text-align:right}
.stats-how ul{margin:0;padding-left:1.2em;color:var(--muted)}
.stats-how li+li{margin-top:6px}
/* The Pep colours, in the globe's LED order (pep-globe-engine.js PEP_COLOURS). */
/* Day bar heights in 5 % steps: inline styles are not allowed by the page's CSP. */
@media (max-width:640px){.stats-grid{grid-template-columns:1fr 1fr}.stats-grid div:last-child{grid-column:1/-1}}
/* On /stats the tiles above carry the counts: the globe card keeps its globe, last visitor and "Visited from", not a second copy of the numbers. */
.stats-page .pg-counts{display:none}
/* Operator 20 Nov (layout rules): the globe block is its own .content inside main.content here, so its 24 px gutter
   counted twice and "Visitors around the world" started 24 px off the page column. One gutter, as on the home page. */
.stats-page>.pep-globe{padding-left:0;padding-right:0}

/* "See more numbers": collapsed at first view (operator 17 Nov: "hidden behind a pull down symbol"). */
.stats-more{border-top:1px solid var(--border)}
.stats-more>summary{list-style:none;display:flex;align-items:center;gap:8px;min-height:56px;cursor:pointer;font-weight:600}
.stats-more>summary::-webkit-details-marker{display:none}
.stats-chevron{width:18px;height:18px;flex:none}
.stats-more[open] .stats-chevron{transform:rotate(180deg)}
.stats-more .stats-section:first-of-type{border-top:0;padding-top:4px}
/* Visits per day like the app's Tide: one 2 pt line in waterLine over a soft water fill (tokens chart.fillOpacity). */
.stats-wave{position:relative;height:120px;max-width:640px;padding:0 22px;--wave-line:#2A6E72;--wave-fill:#6EB8B4;--wave-fill-o:.28}
.stats-wave svg{display:block;width:100%;height:100%;overflow:visible}
.stats-wave-line{fill:none;stroke:var(--wave-line);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.stats-wave-fill{fill:var(--wave-fill);opacity:var(--wave-fill-o)}
.stats-pep{position:absolute;left:0;top:0;width:44px;height:44px;pointer-events:none;visibility:hidden;will-change:transform}
.stats-wave[data-ready] .stats-pep{visibility:visible}
.stats-pep img,.stats-pep video{position:absolute;inset:0;width:100%;height:100%}
.stats-pep video{opacity:0}.stats-pep[data-clip="on"] video{opacity:1}.stats-pep[data-clip="on"] img{opacity:0}
.stats-wave-days{display:flex;justify-content:space-between;max-width:640px;margin:6px 0 0;padding:0 4px;font-size:13px;color:var(--muted)}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) .stats-wave{--wave-line:#7DC8C3;--wave-fill-o:.2}}
html[data-theme="dark"] .stats-wave{--wave-line:#7DC8C3;--wave-fill-o:.2}
@media(prefers-reduced-motion:reduce){.stats-pep video{display:none}}
