
:root {
  color-scheme: light dark;
  --bg: #f2f4f3;
  --surface: #ffffff;
  --ink: #17211e;
  --muted: #5d6a65;
  --faint: #8b9792;
  --line: #dbe1de;
  --line-strong: #c3ccc8;
  --ok: #1d774b;
  --ok-quiet: #86a698;
  --warning: #a86200;
  --alert: #c0271c;
  --nodata: #68737d;
  --warning-wash: #fbf1dc;
  --alert-wash: #fbe6e3;
  --nodata-wash: #e9ecee;
  --focus: #17211e;
  --font: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1513;
    --surface: #171f1c;
    --ink: #e7edea;
    --muted: #9aa8a2;
    --faint: #6f7d77;
    --line: #26312d;
    --line-strong: #37443f;
    --ok: #4fc48c;
    --ok-quiet: #4d6b5e;
    --warning: #efb24c;
    --alert: #ff7366;
    --nodata: #93a0aa;
    --warning-wash: #2d2512;
    --alert-wash: #331a17;
    --nodata-wash: #1f2629;
    --focus: #e7edea;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--font); font-variant-numeric: tabular-nums;
}
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, p { margin: 0; }
.wrap { max-width: 1040px; margin: 0 auto; padding-inline: 24px; }

/* ---- top bar ---- */
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; padding-block: 14px; }
.brand { font-weight: 700; letter-spacing: -0.01em; text-decoration: none; margin-right: auto; }
.brand .tag { font-weight: 600; margin-left: 6px; vertical-align: 1px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 22px; align-items: center; }
.nav a { text-decoration: none; color: var(--muted); padding-block: 4px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.nav form { display: inline; }
.linklike { background: none; border: 0; padding: 4px 0; font: inherit; color: var(--muted); cursor: pointer; }
.linklike:hover { color: var(--ink); }
main { padding-block: 44px 96px; }

/* ---- status icon ---- */
.ico { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.ico circle, .ico path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico .solid { fill: currentColor; stroke: none; }
.ico .cut { stroke: var(--surface); stroke-width: 2; }
.s-ok { color: var(--ok); }
.s-warning { color: var(--warning); }
.s-alert { color: var(--alert); }
.s-nodata { color: var(--nodata); }
.quiet .s-ok { color: var(--ok-quiet); }

/* ---- the verdict ---- */
.verdict { display: grid; grid-template-columns: auto 1fr; column-gap: 20px; align-items: start; margin-bottom: 40px; }
.verdict .ico { width: 44px; height: 44px; margin-top: 6px; }
.verdict .ico circle, .verdict .ico path { stroke-width: 1.5; }
.verdict h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.12; font-weight: 650; letter-spacing: -0.025em; text-wrap: balance; }
.verdict p { grid-column: 2; margin-top: 10px; color: var(--muted); max-width: 62ch; }
.verdict p + p { margin-top: 4px; }

/* ---- 24 hour strip ---- */
.day { margin-bottom: 48px; }
.day svg { display: block; width: 100%; height: 20px; }
.day .base, .day .tick { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.day-axis { display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; margin-top: 4px; }
.day .seg-alert { fill: var(--alert); }
.day .seg-warning { fill: var(--warning); }
.day .seg-nodata { fill: var(--nodata); }
.caption { color: var(--muted); font-size: 13px; margin-bottom: 8px; }

/* ---- open incidents ---- */
.section-title { font-size: 1.05rem; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 12px; }
.open { list-style: none; margin: 0 0 48px; padding: 0; display: grid; gap: 10px; }
.open li { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid currentColor; border-radius: 6px; padding: 14px 18px; }
.open li > * { color: var(--ink); }
.open .head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.open .level { font-weight: 650; }
.open .level.s-alert { color: var(--alert); }
.open .level.s-warning { color: var(--warning); }
.open .level.s-nodata { color: var(--nodata); }
.open .name { font-weight: 600; }
.open .where { color: var(--muted); }
.open .what { margin-top: 4px; max-width: 78ch; }
.open .foot { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--muted); font-size: 13.5px; }
.tag { border: 1px solid var(--line-strong); border-radius: 999px; padding: 1px 9px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* ---- systems ---- */
.systems { display: grid; gap: 8px; }
.system { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.system > summary { list-style: none; cursor: pointer; display: flex; gap: 12px; align-items: center; padding: 14px 18px; }
.system > summary::-webkit-details-marker { display: none; }
.system > summary .title { font-weight: 600; }
.system > summary .state { margin-left: auto; color: var(--muted); text-align: right; }
.system > summary .chev { width: 14px; height: 14px; color: var(--faint); transition: transform .15s ease; flex: none; }
.system[open] > summary .chev { transform: rotate(90deg); }
.system .chev path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.system .body { border-top: 1px solid var(--line); padding: 6px 18px 18px; }
.group { margin-top: 16px; }
.group h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 22px minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows .ico { align-self: center; }
.rows a { text-decoration: none; }
.rows a:hover { text-decoration: underline; }
.rows .val { color: var(--muted); text-align: right; overflow-wrap: anywhere; }
.rows li.bad .val { color: var(--ink); }
.rows li.bad a { font-weight: 600; }
.note { color: var(--muted); font-size: 13.5px; }

/* ---- check page ---- */
.crumbs { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.check-head h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.2; font-weight: 650; letter-spacing: -0.02em; }
.status-line { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 12px; }
.status-word { font-weight: 650; }
.big { font-size: 2.4rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin-top: 22px; }
.detail { margin-top: 6px; color: var(--muted); max-width: 74ch; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; margin: 28px 0 0; max-width: 74ch; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.block { margin-top: 44px; }
.ranges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.ranges a { text-decoration: none; color: var(--muted); padding: 3px 10px; border-radius: 999px; border: 1px solid transparent; }
.ranges a[aria-current="true"] { color: var(--ink); border-color: var(--line-strong); background: var(--surface); }
.chart-box { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 14px 10px 6px; overflow-x: auto; }
.chart { display: block; width: 100%; min-width: 560px; height: auto; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--faint); font: 11px var(--font); }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart .band { fill: var(--ink); opacity: .08; }
.chart .dot { fill: var(--ink); }
.chart .th { stroke-width: 1.2; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.chart .th-alert { stroke: var(--alert); }
.chart .th-warning { stroke: var(--warning); }
.chart .thl { font: 600 11px var(--font); }
.chart .thl-alert { fill: var(--alert); }
.chart .thl-warning { fill: var(--warning); }
.chart .span-alert { fill: var(--alert); opacity: .13; }
.chart .span-warning { fill: var(--warning); opacity: .15; }
.chart .span-nodata { fill: var(--nodata); opacity: .15; }
.chart .mark-alert { fill: var(--alert); }
.chart .mark-warning { fill: var(--warning); }
.chart .mark-nodata { fill: var(--nodata); }
.chart .empty { fill: var(--muted); font: 13px var(--font); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--muted); font-size: 13px; margin-top: 8px; }
.legend i { display: inline-block; width: 18px; height: 0; border-top: 2px dashed currentColor; vertical-align: middle; margin-right: 6px; }
.legend b { display: inline-block; width: 12px; height: 12px; border-radius: 2px; background: currentColor; opacity: .3; vertical-align: -1px; margin-right: 6px; }

/* ---- tables ---- */
.table-box { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-weight: 600; font-size: 13px; color: var(--muted); padding: 6px 14px 6px 0; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
td { padding: 8px 14px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
td.nowrap, th.nowrap { white-space: nowrap; }
td.dim { color: var(--muted); }

/* ---- forms ---- */
.actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; }
label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
input, select, button { font: inherit; color: var(--ink); }
input[type="text"], input[type="password"], input[type="time"], input[type="date"], select, textarea {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; padding: 7px 10px; min-width: 0;
}
textarea { font: inherit; color: var(--ink); width: 100%; resize: vertical; line-height: 1.45; }
input[type="checkbox"] { width: 17px; height: 17px; margin: 0; accent-color: var(--ink); flex: none; }
input::placeholder, textarea::placeholder { color: var(--faint); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.btn { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; padding: 7px 14px; cursor: pointer; font-weight: 600; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.inline-form { display: inline; }
.flash { border: 1px solid var(--line-strong); border-radius: 6px; padding: 10px 14px; margin-bottom: 24px; background: var(--surface); }
.banner { border-radius: 6px; padding: 10px 14px; margin-bottom: 28px; background: var(--warning-wash); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.banner.s-alert { background: var(--alert-wash); }
.banner > span { color: var(--ink); }

/* ---- settings ---- */
.subnav { margin: 18px 0 24px; }
.settings { max-width: 620px; }
.settings + .settings { padding-top: 40px; border-top: 1px solid var(--line); }
.source { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.form { display: grid; gap: 16px; }
.form .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; overflow-wrap: anywhere; }
.check { display: flex; gap: 9px; align-items: center; color: var(--ink); font-size: 15px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.subgroup { display: grid; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.subgroup h3 { font-size: 13px; font-weight: 600; color: var(--muted); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.form-error { color: var(--alert); font-weight: 600; }
.form .flash { margin-bottom: 0; }
.settings { scroll-margin-top: 16px; }
.block-s { margin-top: 14px; max-width: 74ch; }

/* ---- login ---- */
.login { max-width: 360px; margin: 12vh auto 0; padding-inline: 24px; }
.login h1 { font-size: 1.7rem; font-weight: 650; letter-spacing: -0.02em; margin-bottom: 6px; }
.login p { color: var(--muted); margin-bottom: 24px; }
.login form { display: grid; gap: 14px; }
.login .error { color: var(--alert); margin: 0; }

@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  main { padding-block: 28px 72px; }
  .verdict { column-gap: 14px; }
  .verdict .ico { width: 32px; height: 32px; margin-top: 4px; }
  .rows li { grid-template-columns: 22px 1fr; }
  .rows .val { grid-column: 2; text-align: left; }
  .system > summary { flex-wrap: wrap; }
  .system > summary .state { margin-left: 30px; flex-basis: 100%; text-align: left; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  .form .pair { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
