:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #ececf0;
  --text: #151518;
  --muted: #6e6e73;
  --line: rgba(21, 21, 24, 0.1);
  --line-strong: rgba(21, 21, 24, 0.17);
  --accent: #3a70e4;
  --accent-soft: rgba(58, 112, 228, 0.12);
  --up: #16845b;
  --up-soft: rgba(22, 132, 91, 0.12);
  --degraded: #a86408;
  --degraded-soft: rgba(168, 100, 8, 0.12);
  --down: #c6413d;
  --down-soft: rgba(198, 65, 61, 0.12);
  --empty: #dedee3;
  --header: rgba(245, 245, 247, 0.9);
  --max: 1080px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #111114;
  --surface-2: #1b1b1f;
  --text: #f5f5f7;
  --muted: #a1a1a7;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --up: #4bd39c;
  --up-soft: rgba(75, 211, 156, 0.14);
  --degraded: #f0a647;
  --degraded-soft: rgba(240, 166, 71, 0.14);
  --down: #ff716c;
  --down-soft: rgba(255, 113, 108, 0.14);
  --empty: #25252a;
  --header: rgba(0, 0, 0, 0.88);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
.shell, .header-inner { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 14px; border-radius: 10px; background: var(--text); color: var(--bg); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 50; top: 0; min-height: 72px; border-bottom: 1px solid var(--line); background: var(--header); }
.header-inner { min-height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; }
.brand { justify-self: start; display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 740; letter-spacing: -.02em; }
.brand img { width: 30px; height: 30px; display: block; object-fit: contain; }
.primary-nav { display: flex; align-items: center; gap: 32px; color: var(--muted); font-size: 14px; font-weight: 620; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--text); }
.theme-toggle { justify-self: end; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.theme-toggle:hover { background: var(--surface-2); }
.theme-toggle:focus-visible, a:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 3px; }
.theme-toggle svg { grid-area: 1 / 1; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-sun { display: none; }
:root[data-theme="dark"] .theme-moon { display: none; }
:root[data-theme="dark"] .theme-sun { display: block; }

.status-hero { padding: clamp(82px, 11vw, 148px) 0 72px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 20px; color: var(--accent); font-size: 12px; font-weight: 760; letter-spacing: .09em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 850px; margin-bottom: 22px; font-size: clamp(58px, 8vw, 108px); line-height: .91; letter-spacing: -.075em; }
.lede { max-width: 680px; margin-bottom: 20px; color: var(--muted); font-size: clamp(19px, 2.3vw, 27px); line-height: 1.45; letter-spacing: -.02em; }
.updated { margin: 0; color: var(--muted); font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }

.status-section { padding: 82px 0; border-bottom: 1px solid var(--line); }
.overview { min-height: 116px; display: flex; align-items: center; gap: 20px; margin-bottom: 82px; padding: 28px 30px; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--surface); }
.status-orb { width: 13px; height: 13px; flex: 0 0 auto; border-radius: 50%; }
.overview h2 { margin: 0 0 6px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.035em; }
.overview p { margin: 0; color: var(--muted); }
.overview.ok .status-orb { background: var(--up); box-shadow: 0 0 0 5px var(--up-soft); }
.overview.degraded .status-orb, .overview.partial .status-orb { background: var(--degraded); box-shadow: 0 0 0 5px var(--degraded-soft); }
.overview.major .status-orb { background: var(--down); box-shadow: 0 0 0 5px var(--down-soft); }
.section-heading { max-width: 720px; margin-bottom: 34px; }
.section-heading h2, .support-band h2 { margin-bottom: 15px; font-size: clamp(34px, 5vw, 56px); line-height: 1; letter-spacing: -.055em; }
.section-heading > p:last-child, .support-band p, .explainer-grid article > p:last-child { color: var(--muted); font-size: 17px; line-height: 1.65; }

.service-list { border: 1px solid var(--line); border-radius: 22px; background: var(--surface); overflow: hidden; }
.service-row { padding: 26px 28px; border-bottom: 1px solid var(--line); }
.service-row:last-child { border-bottom: 0; }
.service-head { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(220px, 1.5fr) auto; align-items: center; gap: 20px; margin-bottom: 20px; }
.service-name { font-size: 17px; font-weight: 700; }
.service-description { color: var(--muted); font-size: 14px; }
.pill { padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 720; }
.pill.operational { color: var(--up); background: var(--up-soft); }
.pill.degraded { color: var(--degraded); background: var(--degraded-soft); }
.pill.down { color: var(--down); background: var(--down-soft); }
.bars { height: 34px; display: flex; align-items: stretch; gap: 3px; }
.bars i { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: var(--empty); }
.bars i.u { background: var(--up); }
.bars i.p { background: var(--degraded); }
.bars i.d { background: var(--down); }
.service-meta { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }

.status-explainer { background: var(--surface); }
.explainer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; }
.explainer-grid article { padding-top: 24px; border-top: 1px solid var(--line-strong); }
.explainer-grid h3 { margin-bottom: 14px; font-size: 28px; line-height: 1.08; letter-spacing: -.04em; }
.support-band { display: flex; align-items: center; justify-content: space-between; gap: 60px; }
.support-band > div { max-width: 720px; }
.button { min-height: 48px; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 10px; padding: 0 22px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 700; }
.button:hover { transform: translateY(-1px); }

.site-footer { padding: 34px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; color: var(--muted); font-size: 13px; }
.footer-inner nav { display: flex; gap: 24px; }
.footer-inner a:hover { color: var(--text); }

@media (max-width: 760px) {
  /* One shared logical gutter keeps every mobile box exactly centred. Using
     the larger safe-area inset on BOTH sides also avoids a notch creating a
     visibly wider left or right margin in landscape. */
  :root { --mobile-gutter: max(15px, env(safe-area-inset-left), env(safe-area-inset-right)); }
  .shell, .header-inner { width: 100%; padding-inline: var(--mobile-gutter); }
  .header-inner { grid-template-columns: 1fr auto; }
  .primary-nav { display: none; }
  .status-hero { padding-top: 72px; }
  h1 { font-size: clamp(52px, 16vw, 78px); }
  .overview { margin-bottom: 64px; padding: 24px; }
  .service-row { padding: 23px 20px; }
  .service-head { grid-template-columns: 1fr auto; gap: 8px 14px; }
  .service-description { grid-column: 1 / -1; grid-row: 2; }
  .bars { height: 28px; gap: 1px; }
  .bars i { min-width: 1px; }
  .explainer-grid { grid-template-columns: 1fr; gap: 42px; }
  .support-band, .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-inner nav { flex-wrap: wrap; gap: 14px 22px; }
}
