/* Status Board. Change the colors here (light, then dark). */
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #16181d;
  --muted: #5c6370;
  --line: #e3e6eb;
  --brand: #4c5fd5;
  --ok: #1a7f4b;
  --warn: #a35d00;
  --maint: #2f5fd0;
  --ok-bg: #e7f6ee;
  --warn-bg: #fff4e0;
  --maint-bg: #e9efff;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "DejaVu Sans Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --card: #171a20;
    --text: #e8eaee;
    --muted: #9aa1ad;
    --line: #2a2e37;
    --brand: #8c9bff;
    --ok: #4ccf8a;
    --warn: #f0b052;
    --maint: #7ea2ff;
    --ok-bg: #12291d;
    --warn-bg: #2d2210;
    --maint-bg: #172240;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(780px, 100% - 32px); margin: 0 auto; padding: 22px 0; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.logo-mark { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--brand), var(--maint)); }
.logo-sub { color: var(--muted); font-weight: 400; }
.top-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; text-decoration: none; }
.top-link svg { width: 16px; height: 16px; }

.wrap { width: min(780px, 100% - 32px); margin: 0 auto; display: grid; gap: 16px; padding-bottom: 32px; }

.banner { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: 12px; border: 1px solid var(--line); background: var(--maint-bg); }
.banner[data-state="degraded"] { background: var(--warn-bg); }
.banner[data-state="operational"] { background: var(--ok-bg); }
.banner-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--maint); color: var(--card); }
.banner[data-state="degraded"] .banner-icon { background: var(--warn); }
.banner[data-state="operational"] .banner-icon { background: var(--ok); }
.banner-icon svg { width: 22px; height: 22px; }
.banner h1 { margin: 0; font-size: 1.35rem; letter-spacing: -0.01em; }
.banner p { margin: 2px 0 0; color: var(--muted); }

.card { padding: 20px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.card h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.card h2 svg { width: 16px; height: 16px; }

.window-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.window-head h2 { margin-bottom: 4px; }
.tz { margin: 0; color: var(--muted); font-size: 0.82rem; }
.times { margin: 4px 0 14px; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: repeating-linear-gradient(45deg, var(--maint) 0 10px, color-mix(in srgb, var(--maint) 75%, var(--card)) 10px 20px); background-size: 28px 28px; animation: stripes 1.2s linear infinite; transition: width 0.6s; }
.eta { margin: 10px 0 0; color: var(--muted); font-family: var(--mono); font-size: 0.82rem; }

.components { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 10px; }
.components li { display: grid; grid-template-columns: 140px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; }
.components li + li { border-top: 1px solid var(--line); }
.components .name { font-weight: 700; }
.components .note { color: var(--muted); font-size: 0.88rem; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; font-weight: 600; white-space: nowrap; }
.state.operational { color: var(--ok); }
.state.degraded { color: var(--warn); }
.state.maintenance { color: var(--maint); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot.operational { background: var(--ok); }
.dot.degraded { background: var(--warn); border-radius: 2px; transform: rotate(45deg); }   /* shape differs too, not just colour */
.dot.maintenance { background: var(--maint); border-radius: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.82rem; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }

.updates { margin: 0; padding: 0 0 0 16px; list-style: none; border-left: 2px solid var(--line); }
.updates li { position: relative; padding: 0 0 14px 14px; }
.updates li::before { content: ""; position: absolute; left: -24px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2px solid var(--maint); }
.updates time { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; }
.updates p { margin: 2px 0 0; }

.foot { padding: 8px 16px 32px; text-align: center; color: var(--muted); font-size: 0.85rem; }

@media (max-width: 600px) {
  .components li { grid-template-columns: 1fr auto; }
  .components .note { grid-column: 1 / -1; grid-row: 2; }
  .top-link span, .top-link { font-size: 0.82rem; }
}

@keyframes stripes { to { background-position: 28px 0; } }

@media (prefers-reduced-motion: reduce) {
  .bar span { animation: none; transition: none; }
}
