/* SPDX-License-Identifier: Apache-2.0 */
:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #1c2128;
  --muted: #5d6673;
  --line: #dde1e6;
  --delivered: #2f8f5b;
  --deferred: #c98a12;
  --failed: #c7372f;
  --refused: #7a8494;
  --pending: #3d6fb6;
  --focus: #3d6fb6;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #14171c;
    --panel: #1c2027;
    --text: #e6e9ee;
    --muted: #9aa3b0;
    --line: #2e343d;
    --delivered: #4cb37b;
    --deferred: #e0a83a;
    --failed: #e8655d;
    --refused: #8d97a6;
    --pending: #6f9ee0;
    --focus: #6f9ee0;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 0 16px 32px;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
header, main, footer { max-width: 1200px; margin: 0 auto; }
header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; padding: 20px 0 8px; }
h1 { font-size: 20px; margin: 0; }
h2 { font-size: 15px; margin: 0 0 10px; }
h2 small, .state, footer { color: var(--muted); font-weight: normal; }
.state { margin: 0; }
button, input, select {
  font: inherit; color: inherit; background: var(--panel);
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px;
}
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
section { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin: 12px 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.error { background: var(--panel); border: 1px solid var(--failed); color: var(--failed); border-radius: 8px; padding: 10px 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; }
.tile b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 12px; }
.tile.alert b { color: var(--failed); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: -4px 0 8px; color: var(--muted); font-size: 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart text { fill: var(--muted); font-size: 11px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.s-delivered { fill: var(--delivered); background: var(--delivered); }
.s-deferred { fill: var(--deferred); background: var(--deferred); }
.s-failed { fill: var(--failed); background: var(--failed); }
.s-refused { fill: var(--refused); background: var(--refused); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.filters input { flex: 1 1 240px; }
.table { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
td { overflow-wrap: anywhere; }
td.nowrap { white-space: nowrap; }
td.empty { color: var(--muted); text-align: center; padding: 14px; }
.pill { display: inline-block; padding: 0 8px; border-radius: 10px; font-size: 12px; color: #fff; white-space: nowrap; }
.pill.delivered { background: var(--delivered); }
.pill.deferred { background: var(--deferred); }
.pill.failed { background: var(--failed); }
.pill.refused { background: var(--refused); }
.pill.pending { background: var(--pending); }
footer { font-size: 12px; }
footer a { color: var(--focus); }
