/* Axira status page. Dark, near-black blue-grey ground with a restrained gold accent for the brand only.
   Status colours are tuned separately for the dark and the light theme. System fonts only (the CSP allows no font host). */
:root {
  --bg: #0b0e14; --surface: #121722; --surface2: #171d2b; --line: #232b3b; --text: #e8ebf2; --muted: #98a1b5; --gold: #c9a85c;
  --ok: #34c38f; --degraded: #e5b340; --partial: #f08a3c; --major: #f0585f; --maint: #6aa3ff; --unknown: #8b93a7; --none: #2a3243;
  --link: #7fb0ff; --strip-minor: #a06400; --strip-major: #c2410c; --strip-critical: #c0242c; --strip-maint: #2a5db0; /* solid incident strips: white text passes 4.5:1 on all four */
  --st: var(--unknown); /* default state colour; .s-* classes override it on the element */
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f6f8; --surface: #ffffff; --surface2: #f0f2f6; --line: #dfe3ea; --text: #14181f; --muted: #556075; --gold: #86671a;
    --ok: #0b7d54; --degraded: #8f6200; --partial: #b04a0c; --major: #c0242c; --maint: #2a5db0; --unknown: #55607a; --none: #d9dde6; --link: #1f55b0;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f6f8; --surface: #ffffff; --surface2: #f0f2f6; --line: #dfe3ea; --text: #14181f; --muted: #556075; --gold: #86671a;
  --ok: #0b7d54; --degraded: #8f6200; --partial: #b04a0c; --major: #c0242c; --maint: #2a5db0; --unknown: #55607a; --none: #d9dde6; --link: #1f55b0;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.bar { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
.wordmark { display: block; width: 102px; height: 26px; }
.mark { display: none; border-radius: 7px; }
.heading { margin: 0; padding-left: 16px; border-left: 1px solid var(--line); color: var(--muted); font-size: .95rem; flex: 1; }
.tools { display: flex; gap: 8px; margin-left: auto; }
.btn { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 6px 12px; font: inherit; font-size: .88rem; cursor: pointer; min-width: 40px; }
.btn:hover, .btn:focus-visible { border-color: var(--gold); outline: none; }

/* state colours */
.s-operational { --st: var(--ok); } .s-degraded { --st: var(--degraded); } .s-partial_outage { --st: var(--partial); }
.s-major_outage { --st: var(--major); } .s-maintenance { --st: var(--maint); }
.s-unknown, .s-stale, .s-unavailable { --st: var(--unknown); }

/* banner */
.banner {
  margin-top: 28px; padding: 24px 26px; border-radius: 16px;
  background: var(--surface); background: color-mix(in srgb, var(--st) 13%, var(--surface));
  border: 1px solid var(--line); border-color: color-mix(in srgb, var(--st) 45%, var(--line)); border-left: 6px solid var(--st);
}
.banner-main { display: flex; gap: 16px; align-items: flex-start; }
.dot { flex: none; width: 14px; height: 14px; margin-top: 8px; border-radius: 50%; background: var(--st); box-shadow: 0 0 0 5px color-mix(in srgb, var(--st) 22%, transparent); }
.banner h1 { margin: 0; font-size: 1.55rem; line-height: 1.25; font-weight: 650; }
.banner p { margin: 4px 0 0; color: var(--muted); }
/* all clear: one slim line, the check time on the right */
.banner.slim { margin-top: 20px; padding: 12px 18px; border-radius: 12px; border-left-width: 4px; display: flex; align-items: center; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.banner.slim .banner-main { align-items: center; gap: 12px; }
.banner.slim .dot { margin-top: 0; width: 10px; height: 10px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--st) 22%, transparent); }
.banner.slim h1 { font-size: 1.02rem; font-weight: 620; }
.banner.slim #banner-sub { display: none; }

/* the check time: its own line, outside the live region, visible while an incident is open */
.checked-line { margin: 14px 0 0; text-align: right; color: var(--muted); font-size: .82rem; }
.checked-line:empty { display: none; }

/* sections */
h2 { margin: 40px 0 12px; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 650; }
.section-sub { margin: -6px 0 14px; color: var(--muted); font-size: .88rem; }
.empty { color: var(--muted); margin: 0; }

/* incident and maintenance blocks: one solid strip in the impact colour, updates below, newest first */
.blocks { margin-top: 20px; }
.inc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.inc.i-minor { --strip: var(--strip-minor); } .inc.i-major { --strip: var(--strip-major); } .inc.i-critical { --strip: var(--strip-critical); } .inc.m { --strip: var(--strip-maint); }
.inc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; padding: 12px 18px; background: var(--strip); color: #fff; }
.inc-title { margin: 0; font-size: 17px; line-height: 1.35; font-weight: 650; overflow-wrap: anywhere; }
.inc-head a { color: #fff; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; opacity: .92; white-space: nowrap; }
.inc-head a:hover, .inc-head a:focus-visible { color: #fff; opacity: 1; }
.inc-body { padding: 2px 18px 14px; }
.upd { padding: 12px 0; border-top: 1px solid var(--line); }
.upd:first-child { border-top: 0; }
.upd-text { margin: 0; font-size: 15px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.upd-text strong { font-weight: 700; }
.upd-time { margin: 3px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.aff { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.inc-body > :first-child { border-top: 0; }

/* components */
.group > summary { cursor: pointer; padding: 12px 4px; font-weight: 650; list-style-position: inside; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 14px; } /* no overflow:hidden, the tooltip must not be clipped */
.row:first-child { border-radius: 15px 15px 0 0; } .row:last-child { border-radius: 0 0 15px 15px; } .row:only-child { border-radius: 15px; }
.row { padding: 18px 22px 16px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.name { font-weight: 620; font-size: 1.02rem; }
.label { color: var(--st); font-weight: 620; font-size: .92rem; display: inline-flex; align-items: center; gap: 7px; }
.label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--st); }
.wrap-bars { position: relative; margin: 14px 0 8px; }
.bars { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; height: 36px; border-radius: 6px; outline-offset: 4px; touch-action: manipulation; }
.bars:focus-visible { outline: 2px solid var(--gold); }
.seg { border-radius: 999px; background: var(--none); transition: transform .12s ease, opacity .12s ease; }
.seg.b-ok { background: var(--ok); } .seg.b-degraded { background: var(--degraded); } .seg.b-partial { background: var(--partial); } .seg.b-major { background: var(--major); }
.seg.on { transform: scaleY(1.14); outline: 2px solid var(--text); outline-offset: 1px; }
.bars:hover .seg:not(.on) { opacity: .8; }
.bars-foot { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .8rem; }
.bars-foot .mid { color: var(--text); font-weight: 600; }
.tip { position: absolute; z-index: 5; left: 0; bottom: calc(100% + 10px); width: max-content; max-width: min(300px, 86vw); padding: 10px 12px; border-radius: 10px; background: var(--surface2); color: var(--text); border: 1px solid var(--line); box-shadow: 0 8px 28px rgb(0 0 0 / .35); font-size: .84rem; pointer-events: none; }
.tip.below { bottom: auto; top: calc(100% + 10px); }
.tip .d { font-weight: 650; }
.tip .u { color: var(--muted); }
.tip ul { margin: 6px 0 0; padding-left: 16px; }
.tip li { overflow-wrap: anywhere; }

/* past incidents by day: resolved, so no strip; calm */
.day { padding: 16px 0; border-top: 1px solid var(--line); }
.day:first-child { border-top: 0; }
.day h3 { margin: 0 0 10px; font-size: 15px; font-weight: 650; }
.pinc { margin: 0 0 14px; }
.pinc:last-child { margin-bottom: 0; }
.pinc .inc-title { font-size: 16px; font-weight: 600; color: var(--link); }
.pinc .upd { padding: 9px 0; }
.pinc .upd:first-of-type { padding-top: 6px; border-top: 0; }
.pinc .aff { padding-top: 8px; }

/* footer */
.foot { padding: 44px 20px 56px; color: var(--muted); font-size: .85rem; }
.foot p { margin: 4px 0; }
.foot-brand { color: var(--gold); font-weight: 650; letter-spacing: .03em; }
.small { font-size: .8rem; }
[hidden] { display: none !important; }

@media (max-width: 520px) {
  body { font-size: 14px; }
  .wrap { padding: 0 14px; }
  .bar { flex-wrap: wrap; gap: 6px 12px; padding-top: 10px; padding-bottom: 10px; }
  .heading { order: 3; flex-basis: 100%; border-left: 0; padding-left: 0; }
  .banner { padding: 18px 16px; } .banner h1 { font-size: 1.25rem; }
  .banner.slim { padding: 11px 14px; } .banner.slim h1 { font-size: .98rem; }
  .inc-head { padding: 11px 14px; } .inc-title { font-size: 16px; } .inc-body { padding: 2px 14px 12px; } .upd-text { font-size: 14px; }
  .row { padding: 16px 14px 14px; }
  .bars { gap: 1px; height: 30px; }
}
@media (max-width: 359px) { .wordmark { display: none; } .mark { display: block; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
