/* Theme: edit the variables. Light by default, dark via prefers-color-scheme.
   No web fonts, no scripts beyond the staleness check, no third-party requests. */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --ink: #14202b;
  --muted: #55616d;
  --border: #dcd8ce;
  --rule: #c9c4b8;
  --accent: #0b4f6c;
  --accent-ink: #ffffff;
  --mark: #c8553d;
  --mast-bg: #10202c;
  --mast-ink: #f3f1ea;
  --mast-muted: #a9b6c0;
  --ok: #1a7f4b;
  --degraded: #a85d00;
  --outage: #b42318;
  --unknown: #5d6675;
  --ok-tint: #e8f4ec;
  --degraded-tint: #fbf0dc;
  --outage-tint: #fbe9e6;
  --unknown-tint: #eceef0;
  --none: #e6e3da;
  --radius: 6px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --shadow: 0 1px 2px rgba(20, 32, 43, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d141a;
    --surface: #151f27;
    --ink: #e8ecef;
    --muted: #9ba8b3;
    --border: #25323d;
    --rule: #33424e;
    --accent: #7cc0d8;
    --accent-ink: #0d141a;
    --mark: #e07a5f;
    --mast-bg: #0a1016;
    --ok-tint: #12281d;
    --degraded-tint: #2c2210;
    --outage-tint: #2e1614;
    --unknown-tint: #1b252d;
    --none: #212c35;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); color: var(--ink); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted, .empty { color: var(--muted); }

/* ---- masthead */
.masthead { background: var(--mast-bg); color: var(--mast-ink); border-bottom: 3px solid var(--mark); }
.masthead-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-top: .8rem; padding-bottom: .8rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; min-width: 0; }
.brand-mark { flex: none; }
.brand-dot { fill: var(--mark); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; letter-spacing: .04em; line-height: 1.15; }
.brand-long { font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: var(--mast-muted); line-height: 1.3; }
.nav { display: flex; flex-wrap: wrap; gap: .15rem; margin-left: -.7rem; }
.nav a { color: var(--mast-ink); text-decoration: none; padding: .4rem .7rem; border-radius: var(--radius); font-size: .95rem; border-bottom: 2px solid transparent; }
.nav a:hover { background: rgba(255, 255, 255, .09); }
.nav a[aria-current="page"] { border-bottom-color: var(--mark); border-radius: var(--radius) var(--radius) 0 0; font-weight: 600; }

/* ---- page heading */
.page-head { background: var(--surface); border-bottom: 1px solid var(--border); padding: 2rem 0 1.6rem; }
.page-head h1 { margin: 0; font-size: clamp(1.6rem, 1.1rem + 2vw, 2.35rem); }
.eyebrow { margin: 0 0 .45rem; font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lede { margin: .6rem 0 0; max-width: 46rem; color: var(--muted); font-size: 1.06rem; }

main section { margin: 2.25rem 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem 1rem; margin-bottom: .9rem; padding-bottom: .5rem; border-bottom: 1px solid var(--rule); }
.section-head h2 { margin: 0; font-size: 1.3rem; }
.section-head p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---- status pills (never colour alone: icon plus label) */
.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .22rem .7rem .22rem .5rem; border-radius: 999px; font-size: .82rem; font-weight: 700; line-height: 1.3; color: #fff; background: var(--unknown); white-space: nowrap; }
.pill-ico { display: inline-grid; place-items: center; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: rgba(255, 255, 255, .22); font-size: .72rem; line-height: 1; }
.pill-ico::before { content: "?"; }
.pill.status-ok { background: var(--ok); }
.pill.status-ok .pill-ico::before { content: "\2713"; }
.pill.status-degraded { background: var(--degraded); }
.pill.status-degraded .pill-ico::before { content: "!"; }
.pill.status-outage { background: var(--outage); }
.pill.status-outage .pill-ico::before { content: "\2715"; }

/* ---- overall banner */
.overall { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 2rem; margin-top: 1.75rem; padding: 1.15rem 1.3rem; background: var(--unknown-tint); border: 1px solid var(--border); border-left: 6px solid var(--unknown); border-radius: var(--radius); }
.overall.status-ok { background: var(--ok-tint); border-left-color: var(--ok); }
.overall.status-degraded { background: var(--degraded-tint); border-left-color: var(--degraded); }
.overall.status-outage { background: var(--outage-tint); border-left-color: var(--outage); }
.overall-main { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.overall .pill { font-size: .95rem; padding: .32rem .9rem .32rem .6rem; }
.overall-text { margin: 0; font-size: 1.12rem; font-weight: 600; }
.overall-meta { margin: 0; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }

.notice { margin: 1rem 0; padding: .7rem 1rem; border-radius: var(--radius); background: var(--degraded-tint); border: 1px solid var(--degraded); }
.notice-stale { margin-top: 1.25rem; background: var(--outage); border-color: var(--outage); color: #fff; font-weight: 600; }
.is-stale .overall, .is-stale .grid, .is-stale .status-line { opacity: .55; }

/* ---- cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem 1.05rem; box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.card-head h3 { margin: 0; font-size: 1.02rem; }
.kind, .note { color: var(--muted); font-size: .88rem; margin: .3rem 0 0; }
.note { color: var(--ink); }
dl { display: grid; grid-template-columns: 1fr auto; gap: .25rem .75rem; margin: .8rem 0 .2rem; font-size: .9rem; }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.history { display: flex; height: 20px; margin-top: .7rem; border-radius: 2px; overflow: hidden; }
.history .h { flex: 1; background: var(--none); }
.history .h:first-child { border-radius: 2px 0 0 2px; }
.history .h:last-child { border-radius: 0 2px 2px 0; }
.h-ok { background: var(--ok) !important; }
.h-degraded { background: #d9902a !important; }
.h-outage { background: var(--outage) !important; }
.h-unknown { background: #9aa3ad !important; }
.history-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: .72rem; margin-top: .2rem; }

/* ---- tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--bg); }
tr.ongoing td:first-child { box-shadow: inset 4px 0 0 var(--outage); font-weight: 600; }
@media (max-width: 640px) {  /* incidents become stacked records: no sideways scrolling on a phone */
  .incidents thead { position: absolute; left: -9999px; }
  .incidents table, .incidents tbody, .incidents tr, .incidents td { display: block; }
  .incidents tr { padding: .6rem .9rem; border-bottom: 1px solid var(--border); }
  .incidents tr:last-child { border-bottom: 0; }
  .incidents td { border: 0; padding: .12rem 0; white-space: normal; }
  .incidents td::before { content: attr(data-label) ": "; color: var(--muted); font-size: .8rem; }
  .incidents td:first-child { font-weight: 700; }
  .incidents td:first-child::before { content: none; }
  .incidents tr.ongoing { box-shadow: inset 4px 0 0 var(--outage); }
  .incidents tr.ongoing td:first-child { box-shadow: none; }
}
.empty { padding: 1rem 1.1rem; background: var(--surface); border: 1px dashed var(--rule); border-radius: var(--radius); margin: 0; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.steps li { counter-increment: step; position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem .95rem 3.1rem; box-shadow: var(--shadow); font-size: .95rem; }
.steps li::before { content: counter(step); position: absolute; left: .9rem; top: .85rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .85rem; }
.reading-cols { display: grid; gap: 1.25rem 2.5rem; }
@media (min-width: 860px) { .reading-cols { grid-template-columns: 5fr 7fr; } }
.legend, .explain { margin: 0; padding: 0; list-style: none; }
.legend li { display: grid; grid-template-columns: 11.5rem 1fr; gap: .75rem; align-items: start; margin-bottom: .6rem; font-size: .92rem; }
.legend .pill { justify-self: start; }
@media (max-width: 520px) { .legend li { grid-template-columns: 1fr; gap: .25rem; } }
.explain li { margin-bottom: .6rem; padding-left: 1rem; border-left: 2px solid var(--rule); font-size: .95rem; }

/* ---- content pages (landing, about): plain building blocks */
.hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: clamp(2.2rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero h1 { margin: 0; max-width: 20ch; font-size: clamp(2rem, 1.1rem + 3.8vw, 3.4rem); line-height: 1.08; }
.hero .lede { font-size: clamp(1.05rem, .95rem + .5vw, 1.25rem); max-width: 40rem; margin-top: 1.1rem; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.btn { display: inline-block; padding: .65rem 1.15rem; border-radius: var(--radius); border: 1.5px solid var(--accent); font-weight: 600; text-decoration: none; color: var(--accent); background: transparent; }
.btn:hover { background: var(--bg); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.12); }

.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: 2rem; padding: .8rem 1rem; max-width: 46rem; background: var(--bg); border: 1px solid var(--border); border-left: 5px solid var(--unknown); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.status-line.status-ok { border-left-color: var(--ok); }
.status-line.status-degraded { border-left-color: var(--degraded); }
.status-line.status-outage { border-left-color: var(--outage); }
.status-line-text { font-weight: 600; }
.status-line-more { color: var(--muted); font-size: .85rem; margin-left: auto; text-decoration: underline; text-underline-offset: .15em; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.stats li { padding: 1.1rem 1.2rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 0 -1px -1px 0; }
.stat-n { display: block; font-family: var(--serif); font-size: 2.1rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-l { display: block; color: var(--muted); font-size: .9rem; margin-top: .25rem; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem; }
.feature { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 1.1rem 1.2rem 1.2rem; box-shadow: var(--shadow); }
.feature h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }
.feature .step { display: block; margin-bottom: .5rem; font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mark); }

.split { display: grid; gap: 1.5rem 3rem; align-items: start; }
@media (min-width: 860px) { .split { grid-template-columns: 4fr 7fr; } }
.split > h2 { margin: 0; font-size: 1.5rem; }
.split .section-note { color: var(--muted); font-size: .95rem; margin-top: .6rem; }

.prose { max-width: 44rem; }
.prose h2 { font-size: 1.4rem; margin: 2.4rem 0 .6rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { font-size: 1.02rem; margin: 1.4rem 0 .35rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1em; }
.prose li { margin-bottom: .4rem; }
.with-aside { display: grid; gap: 2rem 3.5rem; align-items: start; margin-top: 2.25rem; margin-bottom: 2.25rem; }
@media (min-width: 940px) { .with-aside { grid-template-columns: minmax(0, 1fr) 17rem; } .aside { position: sticky; top: 1.25rem; } }
.aside { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.15rem; box-shadow: var(--shadow); font-size: .92rem; }
.aside h2 { font-family: var(--sans); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6rem; }
.aside dl { grid-template-columns: 1fr; gap: 0; margin: 0; }
.aside dt { margin-top: .65rem; font-size: .8rem; }
.aside dt:first-child { margin-top: 0; }
.aside dd { text-align: left; font-weight: 600; }
.callout { margin: 1.2rem 0; padding: .9rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: var(--radius); }
.callout p:last-child { margin-bottom: 0; }
.two-lists { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin: 1rem 0; }
.two-lists > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1.1rem; }
.two-lists h3 { margin: 0 0 .5rem; font-size: .95rem; }
.two-lists ul { margin: 0; }
.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: .1rem 0; margin: 2.5rem 0; }

/* ---- footer */
.site-footer { margin-top: 3.5rem; background: var(--mast-bg); color: var(--mast-muted); font-size: .88rem; }
.site-footer a { color: var(--mast-ink); }
.footer-in { display: grid; gap: 1.5rem 3rem; padding-top: 2rem; padding-bottom: 1.5rem; }
@media (min-width: 860px) { .footer-in { grid-template-columns: 5fr 6fr; } }
.footer-brand { font-family: var(--serif); font-size: 1.1rem; color: var(--mast-ink); margin-bottom: .5rem; }
.footer-about p:last-child { max-width: 34rem; margin: 0; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.25rem 2rem; }
.footer-h { margin: 0 0 .45rem; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mast-ink); }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: .25rem; }
.footer-meta { border-top: 1px solid rgba(255, 255, 255, .14); padding-top: .9rem; padding-bottom: 1.5rem; }
.footer-meta p { margin: 0; font-variant-numeric: tabular-nums; }

@media print {
  .masthead, .site-footer { background: none; color: #000; border: 0; }
  .site-footer a, .nav a { color: #000; }
  .nav, .actions, .skip { display: none; }
  .card, .feature, .table-scroll { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}
@media (prefers-reduced-motion: no-preference) { .btn, .nav a { transition: background-color .12s, filter .12s; } }
