/* Public statistics site (Addition 7). Its own small stylesheet: the panel's CSS is not used here.
   Dark by default, light through the visitor's own setting; the accent is the panel's global one. */
:root {
  color-scheme: dark light;
  --bg: #0B0E13; --surface: #12161D; --surface-2: #181D26;
  --line: #252C38; --line-soft: #1B212B; --line-strong: #323B4A;
  --text: #E7EBF0; --text-muted: #A3ADBB; --text-dim: #8791A0;
  --accent: #4D86FF; --on-accent: #14100A; --chart-2: #C3CEDD;
  --ok: #3FB97F; --warn: #F2A93B; --bad: #F28B8B;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #F3F5F8; --surface: #FFFFFF; --surface-2: #EEF1F5;
    --line: #D8DEE6; --line-soft: #E8ECF1; --line-strong: #B4BDC9;
    --text: #161B22; --text-muted: #444E5C; --text-dim: #5A6574;
    --accent: #1D4ED8; --on-accent: #FFFFFF; --chart-2: #6B7686;
    --ok: #137A3A; --warn: #9A4706; --bad: #B42318;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
h1 { font-size: 20px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
h2 { font-size: 14px; font-weight: 600; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.mono, time { font-family: var(--mono); font-size: 13px; }
.note { font-size: 12.5px; color: var(--text-dim); }
.top { background: var(--surface); border-bottom: 1px solid var(--line); padding: 16px 0; margin-bottom: 16px; }
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.status { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); }
.status.online .dot { background: var(--ok); }
.status.restarting .dot { background: var(--warn); }
.status.offline .dot { background: var(--bad); }
.status.stale { color: var(--text-muted); }
.status.stale .dot { background: var(--text-dim); }
.links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 16px; min-width: 0; }
.panel-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-b { padding: 16px; }
.panel-b > * + * { margin-top: 12px; }
.grid { display: flex; flex-wrap: wrap; gap: 0 16px; }
.grid > .panel { flex: 1 1 300px; }
.grid > .panel.wide { flex: 2 1 460px; }
.stats { display: flex; flex-wrap: wrap; gap: 16px 32px; }
.stat { min-width: 0; }
.label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.value { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.value.small { font-size: 18px; overflow-wrap: anywhere; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
tbody tr:last-child td { border-bottom: 0; }
td time, .who { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.panel-b .scroll { margin-left: -16px; margin-right: -16px; }
.flag { display: inline-block; width: 20px; height: 15px; margin-right: 7px; vertical-align: -2px; border-radius: 2px; outline: 1px solid var(--line); }
span.flag { outline: 0; }
.flag-code { font: 600 9px/15px var(--mono); text-align: center; text-decoration: none; color: var(--text-muted); outline-color: var(--line-strong); }
.join { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.btn { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; }
.chart { display: block; width: 100%; height: auto; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--text-dim); font-size: 11px; font-family: system-ui, "Segoe UI", Roboto, sans-serif; }
.chart .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .s1 { stroke: var(--accent); }
.chart .s2 { stroke: var(--chart-2); }
.heat { min-width: 560px; max-width: 820px; }
.heat .cell { fill: var(--accent); }
.heat .cell-none { fill: var(--surface-2); }
footer { padding-top: 8px; padding-bottom: 32px; }
.preview-note { padding: 8px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--text); text-align: center; }
[hidden] { display: none !important; }
@media (max-width: 600px) {
  th, td { padding: 8px 10px; }
  .panel-b .scroll { margin-left: -16px; margin-right: -16px; }
  .value { font-size: 22px; }
}
@media (forced-colors: active) {
  .dot, .heat .cell { forced-color-adjust: none; }
}
