/* The portal's colours (Assets/css/ui.css can't be used: this page must work when the platform is down) */
:root {
  color-scheme: light;
  --bg: #f9f9fb; --panel: #fff; --text: #1a212d; --muted: #5c636a; --line: #dee2e6;
  --ok: #1a7f37; --warn: #8a5c00; --bad: #b42318; --ok-bg: #e7f5ec; --warn-bg: #fdf3d8; --bad-bg: #fde8e6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1a212d; --panel: #1f2531; --text: #dee2e6; --muted: #a5a8ad; --line: #3c414c;
    --ok: #4cc77a; --warn: #e3b341; --bad: #ff7b72; --ok-bg: #163b26; --warn-bg: #3a2d0a; --bad-bg: #4f1d19;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1a212d; --panel: #1f2531; --text: #dee2e6; --muted: #a5a8ad; --line: #3c414c;
  --ok: #4cc77a; --warn: #e3b341; --bad: #ff7b72; --ok-bg: #163b26; --warn-bg: #3a2d0a; --bad-bg: #4f1d19;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
h1, h2 { line-height: 1.2; }
h1 { font-size: 1.6rem; margin: 0 0 16px; }
h2 { font-size: 1.15rem; margin: 28px 0 4px; }
.muted { color: var(--muted); margin: 4px 0 12px; font-size: .9rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.overall { border-radius: 8px; padding: 14px 16px; font-weight: 600; border: 1px solid var(--line); background: var(--panel); }
.overall.operational { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.overall.degraded { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.overall.outage { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.notice { margin-top: 12px; border-radius: 8px; padding: 10px 14px; border: 1px solid var(--line); background: var(--panel); white-space: pre-line; }
.notice.warn { background: var(--warn-bg); border-color: var(--warn); }
.group, .incident { box-shadow: 0 3px 4px rgba(40, 59, 92, .1); }
.group { margin-top: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.group h3 { margin: 0; padding: 10px 16px; font-size: 1rem; font-weight: 500; line-height: 1.2; color: var(--text); border-bottom: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .name { flex: 1 1 auto; min-width: 0; }
.row .detail { display: block; font-size: .85rem; color: var(--muted); }
.row .uptime { order: 1; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.badge { flex: 0 0 auto; order: 2; font-size: .85rem; font-weight: 600; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.badge.operational { background: var(--ok-bg); color: var(--ok); }
.badge.degraded { background: var(--warn-bg); color: var(--warn); }
.badge.outage { background: var(--bad-bg); color: var(--bad); }
.badge.unchecked { background: var(--line); color: var(--text); }
.incident { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin-top: 10px; }
.incident.open { border-color: var(--bad); }
.incident .when { color: var(--muted); font-size: .85rem; }
.incident p { margin: 6px 0 0; white-space: pre-line; }
/* A long address in a note can't push the page sideways */
.notice, .incident p, .row .detail { overflow-wrap: anywhere; }
@media (min-width: 601px) { .row .badge { min-width: 8.75rem; text-align: center; } .row .uptime { min-width: 8.25rem; text-align: right; } }
@media (max-width: 600px) { .row { flex-wrap: wrap; row-gap: 2px; align-items: flex-start; } .row .name { flex: 1 1 0; } .row .uptime { order: 3; flex-basis: 100%; } }
