@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #030508;
  --surface: #0a0d14;
  --surface-2: #10151f;
  --line: #1b2230;
  --text: #f2f5fa;
  --muted: #9aa4b5;
  --dim: #7b8497;
  --blue: #0f62fe;
  --blue-soft: #4589ff;
  --ok: #42be65;
  --deg: #f1c21b;
  --part: #ff832b;
  --down: #fa4d56;
  --mnt: #4589ff;
  --none: #262d3b;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8fb;
    --surface: #ffffff;
    --surface-2: #f0f3f8;
    --line: #dfe4ec;
    --text: #0b1220;
    --muted: #4c5668;
    --dim: #6b7486;
    --ok: #24a148;
    --deg: #d2a106;
    --part: #eb6200;
    --down: #da1e28;
    --mnt: #0f62fe;
    --none: #dde2ea;
    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 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-soft); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue-soft); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); }
[id] { scroll-margin-top: 80px; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 10; }

/* header */
.top { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 85%, transparent); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(10px); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo { height: 30px; width: auto; display: block; color: var(--text); }
.brand-tag { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-left: 1px solid var(--line); padding-left: 10px; }
.top nav { display: flex; gap: 18px; font-size: 14px; }
.top nav a { color: var(--muted); }
.top nav a:hover { color: var(--text); text-decoration: none; }

main.wrap { padding-top: 28px; padding-bottom: 24px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h2 { font-size: 13px; font-family: var(--mono); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 32px 0 12px; }

/* banner */
.banner { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); position: relative; overflow: hidden; }
.banner::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c, var(--ok)); }
.banner h1 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.banner p { margin: 2px 0 0; font-size: 13px; }
.bn-icon { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--ok)) 18%, transparent); color: var(--c, var(--ok)); }
.bn-icon svg { width: 20px; height: 20px; }
.bn-operational { --c: var(--ok); }
.bn-degraded { --c: var(--deg); }
.bn-partial { --c: var(--part); }
.bn-major { --c: var(--down); }
.bn-maintenance { --c: var(--mnt); }

/* incidents */
.stack h2 { margin-top: 28px; }
.inc { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c, var(--deg)); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; }
.inc h3 { font-size: 17px; font-weight: 600; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.imp-none, .imp-minor { --c: var(--deg); }
.imp-partial { --c: var(--part); }
.imp-major { --c: var(--down); }
.imp-maintenance { --c: var(--mnt); }
.tag { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 4px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.affects, .window { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.updates { list-style: none; margin: 12px 0 0; padding: 0; }
.updates li { padding: 10px 0 0; border-top: 1px solid var(--line); margin-top: 10px; }
.updates li:first-child { border-top: 0; margin-top: 0; }
.updates p { margin: 2px 0; }
.updates time { font-size: 12px; color: var(--dim); }
.u-st { font-weight: 600; }

/* components */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.row, .product > summary { display: block; padding: 16px 18px; border-top: 1px solid var(--line); }
.card > :first-child, .card > :first-child > summary { border-top: 0; }
.product { border-top: 1px solid var(--line); }
.product > summary { border-top: 0; cursor: pointer; list-style: none; }
.product > summary::-webkit-details-marker { display: none; }
.product > summary:hover { background: var(--surface-2); }
.row-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.name { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.count { font: 400 12px/1 var(--mono); color: var(--dim); }
.chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; flex: none; }
.product[open] .chev { transform: rotate(45deg); }
.regions { background: var(--surface-2); border-top: 1px solid var(--line); }
.region { padding-left: 34px; }
.region .name { font-weight: 500; }
.regions .row:first-child { border-top: 0; }

.st { font-size: 13px; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; color: var(--c); }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-operational { --c: var(--ok); }
.st-degraded { --c: var(--deg); }
.st-partial { --c: var(--part); }
.st-down { --c: var(--down); }
.st-maintenance { --c: var(--mnt); }
.st-unknown { --c: var(--dim); }

.bars { display: grid; grid-template-columns: repeat(90, 1fr); gap: 2px; height: 32px; }
.bars i, .legend i { display: block; border-radius: 2px; background: var(--none); }
.bars i:hover { opacity: .7; }
.d-ok { background: var(--ok) !important; }
.d-deg { background: var(--deg) !important; }
.d-part { background: var(--part) !important; }
.d-down { background: var(--down) !important; }
.d-mnt { background: var(--mnt) !important; }
.axis { display: flex; justify-content: space-between; font: 400 12px/1 var(--mono); color: var(--dim); margin-top: 8px; gap: 8px; }
.ax-up { color: var(--muted); }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--dim); margin: 14px 2px 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; }

/* history */
.history .day { border-bottom: 1px solid var(--line); padding: 14px 0; }
.history .day h3 { font-size: 15px; font-weight: 600; }
.history .day > p { margin: 4px 0 0; font-size: 14px; }
.history ul { list-style: none; padding: 0; margin: 8px 0 0; }
.history li { margin-bottom: 10px; }
.history h4 { font-size: 15px; font-weight: 600; color: var(--c, var(--text)); }
.history li p { margin: 2px 0; font-size: 14px; }
.history li .muted { font-size: 12px; }

.wrap.foot { color: var(--dim); font-size: 13px; padding-top: 16px; padding-bottom: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.foot p { margin: 0; }
.foot a { color: var(--muted); }

/* tooltip (progressive enhancement) */
.tip { position: fixed; z-index: 20; pointer-events: none; background: var(--text); color: var(--bg); font-size: 12px; line-height: 1.45; padding: 8px 10px; border-radius: 8px; max-width: 260px; white-space: pre-line; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.tip b { display: block; font-weight: 600; }
.tip[hidden] { display: none; }

@media (max-width: 640px) {
  body { font-size: 14px; }
  .top .wrap { height: 56px; }
  .logo { height: 24px; }
  .top nav a + a { display: none; }
  .banner { padding: 16px; }
  .banner h1 { font-size: 19px; }
  .row, .product > summary { padding: 14px; }
  .region { padding-left: 24px; }
  .bars { grid-template-columns: repeat(30, 1fr); height: 28px; }
  .bars i:nth-child(-n+60) { display: none; }
  .ax-from { font-size: 0; }
  .ax-from::after { content: "30 days ago"; font-size: 12px; }
  .row-h { flex-wrap: wrap; gap: 4px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
