/* status.html: the owner's status page. Dark like the rest of the site; light when the system asks for it. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff; --raised: #f5f5f7; --fill: #ededf0; --fill-strong: #e2e2e6; --hairline: rgba(0, 0, 0, .08);
    --text: #1d1d1f; --text-2: #5f5f66; --text-3: #6c6c74; --on-light: #ffffff;
    --accent: #5b4ce0; --good: #177a49; --warn: #96590b; --bad: #c42f2f;
    color-scheme: light;
  }
}

.status-page { display: grid; gap: 16px; }
#board { display: grid; gap: 16px; }
#fresh { font-variant-numeric: tabular-nums; }
#fresh.stale { color: var(--bad); font-weight: 600; }

/* the verdict */
.verdict { border-radius: 12px; padding: 18px 20px; border: 1px solid var(--line); background: var(--panel); border-left-width: 8px; }
.verdict .big { font-size: 30px; font-weight: 700; line-height: 1.15; }
.verdict p { margin: 6px 0 0; color: var(--muted); }
.verdict ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; }
.verdict li.bad::marker { color: var(--bad); }
.verdict li.warn::marker { color: var(--warn); }
.verdict.ok { border-left-color: var(--good); } .verdict.ok .big { color: var(--good); }
.verdict.warn { border-left-color: var(--warn); } .verdict.warn .big { color: var(--warn); }
.verdict.bad { border-left-color: var(--bad); } .verdict.bad .big { color: var(--bad); }
.stale-note { border: 1px solid var(--bad); color: var(--bad); border-radius: 10px; padding: 10px 14px; font-weight: 600; }
body.stale .verdict, body.stale .groups, body.stale .chart-panel { opacity: .45; }

/* grouped tiles */
.groups { display: grid; gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.tile { background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; min-width: 0; }
.tile .lbl { color: var(--muted); font-size: 12px; }
.tile .val { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile .sub { color: var(--muted); font-size: 12px; margin-top: 2px; overflow-wrap: anywhere; }
.tile.warn { border-color: var(--warn); } .tile.warn .val { color: var(--warn); }
.tile.bad { border-color: var(--bad); } .tile.bad .val { color: var(--bad); }

.meter { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; width: 0; background: var(--accent); }
.meter.warn i { background: var(--warn); } .meter.bad i { background: var(--bad); }
.meter .w5 { width: 5%; } .meter .w10 { width: 10%; } .meter .w15 { width: 15%; } .meter .w20 { width: 20%; }
.meter .w25 { width: 25%; } .meter .w30 { width: 30%; } .meter .w35 { width: 35%; } .meter .w40 { width: 40%; }
.meter .w45 { width: 45%; } .meter .w50 { width: 50%; } .meter .w55 { width: 55%; } .meter .w60 { width: 60%; }
.meter .w65 { width: 65%; } .meter .w70 { width: 70%; } .meter .w75 { width: 75%; } .meter .w80 { width: 80%; }
.meter .w85 { width: 85%; } .meter .w90 { width: 90%; } .meter .w95 { width: 95%; } .meter .w100 { width: 100%; }

/* the per-minute chart */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .done { fill: var(--good); }
.chart .failed { fill: var(--bad); }
.chart .up { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.chart .hit { fill: transparent; }
.chart .hit:hover { fill: var(--line); fill-opacity: .35; }
.legend { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend .k { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 8px; }
.legend .k.done { background: var(--good); } .legend .k.failed { background: var(--bad); }
.legend .k.up { background: var(--accent); height: 3px; }
.foot { margin: 0; }

@media (max-width: 520px) {
  .verdict .big { font-size: 24px; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
