/*
 * status.azrouter.dev — the web app's /status design as plain CSS (DESIGN.md tokens). Dark is the
 * landing's black stage; a light system preference gets the site's light theme. No third party:
 * fonts are self-hosted (fonts/OFL.txt).
 */
@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/fonts/nunito-sans-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Gelasio";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/gelasio-400-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  /* Landing stage (DESIGN.md stage-*), the accent split for a dark ground. */
  --page: oklch(0 0 0);
  --ink: oklch(0.97 0.006 253.83);
  --card: oklch(0.155 0 0);
  --muted: oklch(0.68 0 0);
  --border: oklch(1 0 0 / 0.09);
  --separator: oklch(1 0 0 / 0.07);
  --accent: oklch(0.66 0.184 253.83);
  --focus: oklch(0.68 0.172 253.83);
  --success: oklch(0.7329 0.1935 150.81);
  --warning: oklch(0.8203 0.1388 76.34);
  --danger: oklch(0.594 0.1967 24.63);
  --empty: oklch(1 0 0 / 0.1);
  --card-shadow: inset 0 1px 0 oklch(1 0 0 / 0.05);
  --bar: oklch(0 0 0 / 0.82);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --page: oklch(0.972 0.003 255);
    --ink: oklch(0.21 0.012 255);
    --card: oklch(1 0 0);
    --muted: oklch(0.51 0.014 255);
    --border: oklch(0.89 0.005 255);
    --separator: oklch(0.915 0.004 255);
    --accent: oklch(0.54 0.195 253.83);
    --focus: oklch(0.54 0.195 253.83);
    --success: oklch(0.62 0.17 150.81);
    --warning: oklch(0.7819 0.1585 72.33);
    --danger: oklch(0.6532 0.2328 25.74);
    --empty: oklch(0.21 0.012 255 / 0.1);
    --card-shadow: 0 1px 2px oklch(0.25 0.03 255 / 0.04), 0 12px 28px -18px oklch(0.25 0.03 255 / 0.16);
    --bar: oklch(0.972 0.003 255 / 0.88);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  background: var(--page);
}
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font: 400 14px/1.6 "Nunito Sans", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: color-mix(in oklab, var(--accent) 35%, transparent);
}
a {
  color: inherit;
}
a:focus-visible,
summary:focus-visible,
time:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 10;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
}
.skip:focus {
  top: 12px;
}
/* One centered 768px column for the bar, the content and the footer, so their edges line up at every
   width (qc2 S-6: the content sat left in a 1152px frame on desktop). */
.frame {
  width: 100%;
  max-width: calc(768px + 2 * 16px);
  margin-inline: auto;
  padding-inline: 16px;
}
@media (min-width: 640px) {
  .frame {
    max-width: calc(768px + 2 * 20px);
    padding-inline: 20px;
  }
}
.muted {
  color: var(--muted);
}

/* Header bar (DESIGN.md "Bar (inner pages)"). */
.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 64px;
  border-bottom: 1px solid var(--separator);
  background: var(--bar);
  backdrop-filter: blur(12px);
}
.bar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 6px;
}
.mark {
  width: 28px;
  height: 28px;
  flex: none;
  color: var(--accent);
}
.wordmark-text {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}
.bar-nav {
  display: flex;
  gap: 4px;
}
.bar-nav a {
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms var(--ease);
}
/* Phones keep the wordmark and the two links that matter here; the catalog is one tap from the mark. */
@media (max-width: 399px) {
  .bar-nav a {
    padding-inline: 8px;
  }
  .bar-nav .wide {
    display: none;
  }
}
@media (hover: hover) and (pointer: fine) {
  .bar-nav a:hover {
    color: var(--ink);
  }
}

/* Editorial header: eyebrow, serif title, lead. */
.intro {
  max-width: 768px;
  padding-top: 48px;
}
@media (min-width: 640px) {
  .intro {
    padding-top: 64px;
  }
}
.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}
h1 {
  margin: 12px 0 0;
  font-family: "Gelasio", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.lead {
  margin: 16px 0 0;
  max-width: 672px;
  font-size: 15px;
  line-height: 1.87;
  color: var(--muted);
  text-wrap: pretty;
}

/* The card: zerouter's "Live pulse" dialog body. */
.card {
  max-width: 768px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
section.card {
  margin-top: 40px;
}
.card-head {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--separator);
}
.overall {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.overall h2 {
  margin: 0;
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.note {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--muted);
}
.noscript {
  max-width: 768px;
  margin-top: 16px;
}
.icon {
  width: 14px;
  height: 14px;
  flex: none;
  transition: color 150ms var(--ease);
}
.icon-lg {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}
.tone-up {
  color: var(--success);
}
.tone-degraded {
  color: var(--warning);
}
.tone-down {
  color: var(--danger);
}
.tone-unknown,
.tone-checking {
  color: var(--muted);
}
.groups {
  padding: 4px 20px;
}
@media (min-width: 640px) {
  .card-head,
  .groups {
    padding-inline: 24px;
  }
}
.group {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--separator);
}
.group:last-child {
  border-bottom: 0;
}
.group h3 {
  margin: 0;
  padding: 16px 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid var(--separator);
}
.row:last-child {
  border-bottom: 0;
}
@media (min-width: 640px) {
  .row {
    grid-template-columns: 13rem minmax(0, 1fr) 3.5rem;
    align-items: center;
    gap: 12px;
  }
}
.name {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.state {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 6px;
  font-size: 12px;
  line-height: 18px;
  color: var(--muted);
}
.num {
  font-variant-numeric: tabular-nums;
}
.days-bar {
  display: flex;
  align-items: stretch;
  gap: 1px;
  height: 24px;
  min-width: 0;
}
.day {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 1px;
  background: var(--empty);
}
/* One UTC day of counted checks (status-history.mjs), the legend's four colors. */
.day-u {
  background: var(--success);
}
.day-d {
  background: var(--warning);
}
.day-o {
  background: var(--danger);
}
.uptime {
  margin: 0;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  padding: 12px 20px;
  border-top: 1px solid var(--separator);
  font-size: 12px;
  color: var(--muted);
}
@media (min-width: 640px) {
  .legend {
    padding-inline: 24px;
  }
}
.key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.swatch-up {
  background: var(--success);
}
.swatch-degraded {
  background: var(--warning);
}
.swatch-down {
  background: var(--danger);
}
.swatch-empty {
  background: var(--empty);
}
.days {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
time {
  text-decoration: underline dotted color-mix(in oklab, currentColor 40%, transparent);
  text-underline-offset: 3px;
  cursor: help;
  font-variant-numeric: tabular-nums;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Methodology. */
.method {
  margin-top: 24px;
  padding: 16px 20px;
}
@media (min-width: 640px) {
  .method {
    padding-inline: 24px;
  }
}
.method summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.method ul {
  margin: 12px 0 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 28px;
  color: var(--muted);
}

/* Page footer: the rule spans the content column, not the frame's padding (qc2 S-6). */
.page-foot {
  margin-top: 80px;
  padding-bottom: 32px;
}
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-top: 24px;
  border-top: 1px solid var(--separator);
  font-size: 13px;
  color: var(--muted);
}
.foot a {
  text-underline-offset: 3px;
}

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