@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(instrument-sans.woff2) format("woff2");
}

:root {
  --bg: #f2f4f0;
  --panel: #fafbf9;
  --soft: #e8ebe5;
  --border: #d8dcd3;
  --text: #141815;
  --muted: #5f6961;
  --ok: #2a9456;
  --degraded: #eeb024;
  --partial: #e0672b;
  --major: #cf3b34;
  --maint: #6a55c9;
  --unknown: #98a096;
  --nodata: #dde1d9;
  --ok-ink: #1d7541;
  --degraded-ink: #8a6100;
  --partial-ink: #b24a12;
  --major-ink: #b72c26;
  --maint-ink: #5642b5;
  --amber-ink: #231c06;
  --shadow: 0 10px 30px rgba(20, 30, 22, 0.16);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1210;
    --panel: #161a17;
    --soft: #1e231f;
    --border: #2a302b;
    --text: #e8ece8;
    --muted: #8e988f;
    --ok: #3fae6c;
    --degraded: #f0b93a;
    --partial: #ee7d42;
    --major: #e5544b;
    --maint: #8e7cf0;
    --unknown: #667067;
    --nodata: #252a26;
    --ok-ink: #58c483;
    --degraded-ink: #f0b93a;
    --partial-ink: #f28d58;
    --major-ink: #f0726a;
    --maint-ink: #a798f5;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15.5px/1.5 "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  word-spacing: 0.06em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-underline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 22px 64px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 34px 0 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; }
.logo { width: 22px; height: 19px; flex: none; }
.logo .l0 { fill: var(--ok); }
.logo .l1 { fill: var(--degraded); }
.logo .l3 { fill: var(--major); }

.btn {
  display: inline-block; padding: 8px 15px; border: 1px solid var(--border); border-radius: 99px;
  background: transparent; color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600;
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn:hover { background: var(--soft); }
.btn.is-static { color: var(--muted); cursor: default; }
.btn.is-static:hover { background: transparent; }
.btn:focus-visible, .row:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.subscribe { position: relative; }
.pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: 290px; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); font-size: 14.5px;
}
.pop p + p { margin-top: 6px; color: var(--muted); }
.pop p + p strong { color: var(--text); }

.banner { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: 14px; color: #fff; background: var(--unknown); }
.banner h1, .banner h2 { font-size: 25px; line-height: 1.2; font-weight: 600; letter-spacing: -0.025em; }
.banner p { margin-top: 3px; font-size: 15px; opacity: 0.92; overflow-wrap: anywhere; }
.banner-icon { width: 30px; height: 30px; flex: none; }
.b-ok { background: var(--ok); }
.b-warn { background: var(--degraded); color: var(--amber-ink); }
.b-partial { background: var(--partial); }
.b-bad { background: var(--major); }
.b-maint { background: var(--maint); }
.b-pending { background: var(--unknown); }

.meta { margin: 12px 2px 0; font-size: 13.5px; color: var(--muted); }
.meta a { color: var(--muted); }
.note { margin: 14px 2px 0; max-width: 78ch; font-size: 14.5px; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 26px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat { padding: 18px 20px 17px; min-width: 0; border-left: 1px solid var(--border); }
.stat:first-child { padding-left: 2px; border-left: 0; }
.stat-value { font-size: 30px; line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: -0.01em; }
.stat-label { margin-top: 7px; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.stat-note { margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--muted); }

.panel { margin-top: 14px; padding: 18px 20px 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.stats + .panel { margin-top: 26px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-head .muted { font-size: 13.5px; text-align: right; }

.bar { display: block; width: 100%; height: 34px; overflow: hidden; }
.bar path { fill: none; stroke-width: 10; stroke-dasharray: 4 1; }
.bar .l0 { stroke: var(--ok); }
.bar .l1 { stroke: var(--degraded); }
.bar .l2 { stroke: var(--partial); }
.bar .l3 { stroke: var(--major); }
.bar .lx { stroke: var(--nodata); }

.axis { display: flex; align-items: center; gap: 12px; margin-top: 9px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.axis i { flex: 1; height: 1px; background: var(--border); }

.tip {
  position: fixed; z-index: 50; max-width: 260px; padding: 7px 11px; border-radius: 8px; pointer-events: none;
  background: var(--text); color: var(--bg); font-size: 13px; line-height: 1.4; box-shadow: var(--shadow);
}
.tip b { display: block; font-weight: 600; }

.block { margin-top: 46px; }
.block h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.count { margin-left: 7px; color: var(--muted); font-size: 15px; font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.empty { margin-top: 14px; padding: 20px; border: 1px dashed var(--border); border-radius: 14px; color: var(--muted); text-align: center; }

#live-incidents, h2 + .incident { margin-top: 14px; }
.incident { padding: 17px 2px 18px; border-top: 1px solid var(--border); }
.incident:last-child { border-bottom: 1px solid var(--border); }
.incident-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13.5px; }
.svc { font-weight: 600; text-decoration: none; }
.svc:hover { text-decoration: underline; }
.incident h3 { margin-top: 6px; font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.incident h3 a { text-decoration: none; }
.incident h3 a:hover { text-decoration: underline; }
.update { margin-top: 5px; max-width: 78ch; font-size: 14.5px; color: var(--muted); overflow-wrap: anywhere; }

.chip { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--muted); background: var(--soft); }
.c-minor { color: var(--degraded-ink); background: color-mix(in srgb, var(--degraded) 22%, transparent); }
.c-major { color: var(--partial-ink); background: color-mix(in srgb, var(--partial) 18%, transparent); }
.c-critical { color: var(--major-ink); background: color-mix(in srgb, var(--major) 17%, transparent); }
.c-maintenance { color: var(--maint-ink); background: color-mix(in srgb, var(--maint) 17%, transparent); }

details.more > summary { padding: 14px 2px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: " ↓"; color: var(--muted); }
details.more > summary:hover { color: var(--muted); }
details.more[open] > summary { display: none; }

.updates { margin: 12px 0 0; padding: 0; list-style: none; max-width: 78ch; }
.updates li { padding: 0 0 0 16px; margin-top: 14px; border-left: 2px solid var(--border); font-size: 14.5px; }
.updates p { margin-top: 3px; white-space: pre-line; overflow-wrap: anywhere; }

.toolbar { display: flex; align-items: center; gap: 16px; }
.toolbar h2 { margin-right: auto; }
#q { width: 230px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 99px; background: var(--panel); color: var(--text); font: inherit; font-size: 14.5px; }
#q::placeholder { color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; white-space: nowrap; cursor: pointer; user-select: none; }
.check input { width: 15px; height: 15px; margin: 0; accent-color: var(--text); }

.group { margin-top: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); overflow: hidden; }
.group > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 20px; cursor: pointer; list-style: none; }
.group > summary::-webkit-details-marker { display: none; }
.group-name { font-size: 12.5px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }
.group-name::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 11px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); vertical-align: 2px; transition: transform 0.12s; }
.group[open] .group-name::before { transform: rotate(45deg); }
.group-count { font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.group-count.has-issues { color: var(--text); }

.row { display: grid; grid-template-columns: minmax(0, 215px) minmax(0, 1fr) 118px; align-items: center; gap: 20px; padding: 10px 20px; border-top: 1px solid var(--border); text-decoration: none; }
.row:hover { background: var(--soft); }
.row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.row .bar { height: 20px; }
.row .status { text-align: right; font-size: 14px; white-space: nowrap; }

.dot { display: inline-block; width: 8px; height: 8px; margin-right: 11px; border-radius: 2px; background: var(--unknown); flex: none; vertical-align: 1px; }
.dot.s-operational { background: var(--ok); }
.dot.s-degraded, .dot.i-dot-minor { background: var(--degraded); }
.dot.s-partial_outage, .dot.i-dot-major { background: var(--partial); }
.dot.s-major_outage, .dot.i-dot-critical { background: var(--major); }
.dot.s-maintenance { background: var(--maint); }

.status { font-weight: 600; color: var(--muted); }
.status.s-operational { color: var(--ok-ink); }
.status.s-degraded { color: var(--degraded-ink); }
.status.s-partial_outage { color: var(--partial-ink); }
.status.s-major_outage { color: var(--major-ink); }
.status.s-maintenance { color: var(--maint-ink); }

body.only-issues .row[data-ok="1"], .row.no-match, .group.is-empty { display: none; }

.back { display: inline-block; margin-bottom: 16px; font-size: 14.5px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--text); }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.detail-head h1 { font-size: 34px; line-height: 1.15; font-weight: 600; letter-spacing: -0.035em; }

.comp-group { padding: 11px 20px 9px; border-top: 1px solid var(--border); font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.comp { display: flex; justify-content: space-between; gap: 16px; padding: 11px 20px; border-top: 1px solid var(--border); }
.comp .status { font-size: 14px; white-space: nowrap; }
.comp.note { color: var(--muted); font-size: 14.5px; }
.panel.flush > :first-child { border-top: 0; }

.past { display: flex; align-items: flex-start; gap: 3px; padding: 12px 20px; border-top: 1px solid var(--border); }
.past .dot { margin-top: 8px; }
.past > div { flex: 1; min-width: 0; }
.past-name { font-weight: 500; overflow-wrap: anywhere; }
.past-name a { text-decoration: none; }
.past-name a:hover { text-decoration: underline; }
.past .muted { font-size: 13.5px; }
.past .chip { margin-top: 3px; }

.foot { margin-top: 60px; padding-top: 22px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--muted); }
.foot p { max-width: 78ch; }
.foot p + p { margin-top: 8px; }
.foot a { color: var(--muted); }
.foot .status { font-weight: 600; text-decoration: none; }
.foot .status:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(odd) { padding-left: 2px; border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .row { grid-template-columns: minmax(0, 1fr) auto; }
  .row .bar { display: none; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 16px 44px; }
  .top { padding: 20px 0 18px; }
  .brand { font-size: 16px; gap: 9px; white-space: nowrap; }
  .wide { display: none; }
  .btn { padding: 7px 12px; }
  .banner { padding: 17px; gap: 12px; border-radius: 12px; }
  .banner h1, .banner h2 { font-size: 20px; }
  .stat { padding: 14px 14px 13px; }
  .stat-value { font-size: 25px; }
  .toolbar { flex-wrap: wrap; }
  #q { order: 3; width: 100%; }
  .detail-head { flex-direction: column; }
  .detail-head h1 { font-size: 27px; }
  .panel-head { flex-direction: column; gap: 0; }
  .panel-head .muted { text-align: left; }
  .axis span:nth-child(3), .axis i:nth-child(4) { display: none; }
  .panel { padding: 16px 16px 13px; }
  .group > summary, .row, .comp, .past, .comp-group { padding-left: 16px; padding-right: 16px; }
}
