/* Self-hosted variable fonts (latin subset, weights 400–600). Both are SIL Open Font License. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   Design system: precision operations. Flat surfaces, hairline rules,
   typographic hierarchy. No decorative card chrome.

   Color tokens (including the "hacker" theme) are preserved verbatim.
   ========================================================================== */
:root {
  color-scheme: dark;
  --bg-app: #090a0c;
  --bg-surface-1: #111318;
  --bg-surface-2: #1a1d24;
  --bg-inset: #06070a;
  --border-subtle: #262933;
  --border-strong: #3b3f50;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #7d8595;

  --up-surface: rgba(16, 185, 129, 0.08);
  --up-border: rgba(16, 185, 129, 0.25);
  --up-solid: #10b981;
  --down-surface: rgba(239, 68, 68, 0.08);
  --down-border: rgba(239, 68, 68, 0.3);
  --down-solid: #ef4444;
  --warn-surface: rgba(245, 158, 11, 0.08);
  --warn-border: rgba(245, 158, 11, 0.25);
  --warn-solid: #f59e0b;

  --brand: #02bb6f;
  --brand-text: #2de99a;
  --brand-hover: #03a862;
  --brand-surface: rgba(2, 187, 111, 0.12);
  --brand-border: rgba(2, 187, 111, 0.35);
  /* Near-black on the brand green is 7.6:1 (6.1:1 on hover); white was 2.5:1. */
  --on-brand: #04130c;

  --focus-ring: var(--brand-text);
  --overlay: rgba(0, 0, 0, 0.75);
  --shadow-float: 0 18px 40px rgba(0, 0, 0, 0.55);

  --radius-sm: 2px;
  --radius: 3px;
  --radius-lg: 4px;

  --font-ui: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shell: 1240px;

  /* Type: 16px body, 14px secondary, 12px meta (the floor), then a Minor Third heading scale.
     Sizes use --fs-*; --text-* names are colours. */
  --fs-meta: 0.75rem;
  --fs-secondary: 0.875rem;
  --fs-body: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.44rem;
  --step-3: 1.728rem;
  --step-4: 2.074rem;
  --step-5: 2.488rem;

  /* Space: 4px micro steps, 8px for components and sections. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --gutter: var(--space-8);
  --hit: 44px;

  /* Viewports: narrow below 768px, medium to 1279px, wide from 1280px. */
  --vp-wide: 1280px;
}
@media (max-width: 767.98px) {
  :root {
    --gutter: var(--space-4);
  }
}
html[data-theme="light"] {
  color-scheme: light;
  --bg-app: #f4f6f9;
  --bg-surface-1: #ffffff;
  --bg-surface-2: #eef1f6;
  --bg-inset: #f8fafc;
  --border-subtle: #dfe3ea;
  --border-strong: #b6bdcc;
  --text-primary: #10151d;
  --text-secondary: #4b5563;
  --text-muted: #5b6472;
  /* Darker green so links read on the light canvas (about 5:1); the dark theme's mint was 2.3:1 here. */
  --brand-text: #047857;
  --up-surface: rgba(4, 120, 87, 0.08);
  --up-border: rgba(4, 120, 87, 0.28);
  --up-solid: #047857;
  --down-surface: rgba(185, 28, 28, 0.08);
  --down-border: rgba(185, 28, 28, 0.28);
  --down-solid: #b91c1c;
  --warn-surface: rgba(180, 83, 9, 0.08);
  --warn-border: rgba(180, 83, 9, 0.26);
  --warn-solid: #b45309;
  --overlay: rgba(15, 23, 42, 0.5);
  --shadow-float: 0 20px 44px rgba(16, 24, 40, 0.18);
}
html[data-theme="hacker"] {
  color-scheme: dark;
  --bg-app: #000000;
  --bg-surface-1: #060a06;
  --bg-surface-2: #0c140c;
  --bg-inset: #000000;
  --border-subtle: #1a3d1a;
  --border-strong: #2d6b2d;
  --text-primary: #4af626;
  --text-secondary: #39c11f;
  --text-muted: #2a8d18;

  --up-surface: rgba(74, 246, 38, 0.08);
  --up-border: rgba(74, 246, 38, 0.3);
  --up-solid: #4af626;
  --down-surface: rgba(255, 49, 49, 0.08);
  --down-border: rgba(255, 49, 49, 0.3);
  --down-solid: #ff3131;
  --warn-surface: rgba(255, 214, 10, 0.08);
  --warn-border: rgba(255, 214, 10, 0.3);
  --warn-solid: #ffd60a;

  --brand: #4af626;
  --brand-text: #4af626;
  --brand-hover: #39c11f;
  --brand-surface: rgba(74, 246, 38, 0.1);
  --brand-border: rgba(74, 246, 38, 0.35);
  --on-brand: #000000;

  --focus-ring: rgba(74, 246, 38, 0.6);
  --overlay: rgba(0, 0, 0, 0.85);
  --shadow-float: 0 18px 40px rgba(0, 0, 0, 0.75);

  --font-ui: var(--font-mono);
}
html[data-theme="hacker"] body {
  text-shadow: 0 0 1px rgba(74, 246, 38, 0.35);
}
html[data-theme="hacker"] body::before,
html[data-theme="hacker"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
html[data-theme="hacker"] body::before {
  z-index: 20;
  background: repeating-linear-gradient(
    to bottom,
    rgba(74, 246, 38, 0.05) 0px,
    rgba(74, 246, 38, 0.05) 1px,
    rgba(0, 0, 0, 0) 1px,
    rgba(0, 0, 0, 0) 3px
  );
}
html[data-theme="hacker"] body::after {
  z-index: 21;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.55) 100%);
}

/* ==========================================================================
   Base
   ========================================================================== */
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4 {
  margin: 0 0 10px;
  font-weight: 600;
  line-height: 1.2;
}
h1 {
  font-size: var(--step-3);
}
h2 {
  font-size: var(--step-1);
}
h3 {
  font-size: var(--fs-body);
}
p {
  margin: 0 0 12px;
}
a {
  color: var(--brand-text);
  text-underline-offset: 3px;
}
small {
  color: var(--text-muted);
  font-size: var(--fs-meta);
}
strong,
b {
  font-weight: 600;
}
em {
  font-style: normal;
  color: var(--brand-text);
}
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
::selection {
  background: var(--brand-surface);
}
.eyebrow {
  margin: 0 0 6px;
  color: var(--text-muted);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lede {
  max-width: 62ch;
  margin-bottom: 24px;
  color: var(--text-secondary);
  font-size: var(--fs-body);
}
.subtext,
.section-copy,
.meta,
.description {
  margin: 0;
  color: var(--text-secondary);
}
.subtext {
  font-size: var(--fs-meta);
  color: var(--text-muted);
}

/* Monospace telemetry */
.monitor-target,
.monitor-stats dd,
.monitor-check-note,
.price,
.count-badge,
.check-row span:nth-child(3),
.check-row time,
.report-row span:not(:first-child),
.preview-stats dd,
.preview-monitor small,
.agent-enrollment pre {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ==========================================================================
   Header / nav
   ========================================================================== */
header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 64px;
  padding: 0 var(--gutter);
  background: var(--bg-app);
  border-bottom: 1px solid var(--border-subtle);
}
.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text-primary);
  font-size: var(--fs-body);
  min-height: var(--hit);
  font-weight: 600;
  text-decoration: none;
}
.brand img {
  display: block;
  width: auto;
  height: 30px;
}
.brand span {
  color: var(--text-secondary);
  font-weight: 500;
}
/* A smaller logo leaves room for a page tag (e.g. "Operations") and the Menu button on phones. */
@media (max-width: 767.98px) {
  .brand img {
    height: 24px;
  }
}
nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
header nav {
  gap: var(--space-1);
}
nav a,
nav .nav-link {
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
nav a:hover,
nav .nav-link:hover {
  color: var(--text-primary);
}
nav .nav-link,
nav .link {
  border: 0;
  padding: 0;
  background: transparent;
  font-family: var(--font-ui);
  cursor: pointer;
}
nav a.button {
  color: var(--on-brand);
}
/* Top nav: links and text buttons share one look and highlight by glowing, never with a filled box. */
header nav a:not(.button),
header nav button:not(.button),
header nav summary {
  display: inline-flex;
  align-items: center;
  min-height: var(--hit);
  padding: 0 var(--space-3);
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  font: 500 var(--fs-secondary)/1.2 var(--font-ui);
  text-decoration: none;
  white-space: nowrap;
  transition: none;
}
header nav a:not(.button):hover,
header nav button:not(.button):hover,
header nav summary:hover,
header nav a:not(.button):focus-visible,
header nav button:not(.button):focus-visible,
header nav summary:focus-visible,
header nav details[open] > summary {
  background: transparent;
  color: var(--text-primary);
  text-shadow: 0 0 8px color-mix(in srgb, var(--brand-text) 70%, transparent), 0 0 2px color-mix(in srgb, var(--brand-text) 45%, transparent);
}
header nav > .button {
  margin-left: var(--space-2);
}
/* Keyboard focus keeps a visible marker without the box: an underline in the accent. */
header nav a:not(.button):focus-visible,
header nav button:not(.button):focus-visible,
header nav summary:focus-visible {
  outline: none;
  text-decoration: underline 2px var(--brand-text);
  text-underline-offset: 6px;
}
/* Narrow: navs with more than two items fold behind a Menu button (added by theme.js). */
.nav-toggle {
  display: none;
}
@media (max-width: 767.98px) {
  header.has-nav-menu .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: var(--hit);
    margin-left: auto;
    padding: 0 var(--space-3);
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
    font: 500 var(--fs-secondary)/1.2 var(--font-ui);
    transition: none;
  }
  header.has-nav-menu .nav-toggle:hover,
  header.has-nav-menu .nav-toggle[aria-expanded="true"],
  header.has-nav-menu .nav-toggle:focus-visible {
    background: transparent;
    color: var(--text-primary);
    text-shadow: 0 0 8px color-mix(in srgb, var(--brand-text) 70%, transparent), 0 0 2px color-mix(in srgb, var(--brand-text) 45%, transparent);
  }
  header.has-nav-menu .nav-toggle:focus-visible {
    outline: none;
    text-decoration: underline 2px var(--brand-text);
    text-underline-offset: 6px;
  }
  header.has-nav-menu > nav {
    position: absolute;
    z-index: 25;
    top: calc(100% + var(--space-2));
    right: var(--gutter);
    display: none;
    min-width: 224px;
    padding: var(--space-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--bg-surface-1);
    box-shadow: var(--shadow-float);
  }
  header.has-nav-menu.nav-open > nav {
    display: grid;
    gap: var(--space-1);
  }
  header.has-nav-menu > nav > a:not(.button),
  header.has-nav-menu > nav > button:not(.button) {
    justify-content: flex-start;
    width: 100%;
    font-size: var(--fs-body);
  }
  header.has-nav-menu > nav > .button {
    margin: var(--space-1) 0 0;
  }
}
@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 var(--up-border);
  }
  60% {
    box-shadow: 0 0 0 5px transparent;
  }
}
.home-start-free[hidden] {
  display: none;
}
.admin-tag {
  margin-left: 10px;
  padding: 2px 8px;
  border-left: 2px solid var(--brand);
  color: var(--text-muted);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ==========================================================================
   Buttons and controls
   ========================================================================== */
.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--hit);
  padding: var(--space-2) var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--on-brand);
  font: 600 var(--fs-secondary)/1.2 var(--font-ui);
  text-decoration: none;
  cursor: pointer;
}
.button:hover,
button:hover {
  background: var(--brand-hover);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.large {
  padding: var(--space-3) var(--space-6);
  font-size: var(--fs-secondary);
}
.secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.secondary:hover {
  background: var(--bg-surface-2);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.link {
  min-height: 0;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: var(--brand-text);
  font-weight: 600;
  text-decoration: none;
}
.link:hover {
  background: var(--brand-surface);
}
.danger-link {
  color: var(--down-solid);
}
.danger-link:hover {
  background: var(--down-surface);
}
input,
select,
textarea {
  width: 100%;
  min-height: var(--hit);
  padding: 9px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  color: var(--text-primary);
  font: 400 var(--fs-secondary) var(--font-ui);
}
input::placeholder {
  color: var(--text-muted);
}
input:hover,
select:hover {
  border-color: var(--border-strong);
}
input:focus-visible,
select:focus-visible {
  border-color: var(--brand);
  outline: 2px solid var(--focus-ring);
  outline-offset: 0;
}
input[type="checkbox"],
input[type="radio"] {
  width: 15px;
  height: 15px;
  min-height: 0;
  padding: 0;
  accent-color: var(--brand);
}
label {
  display: grid;
  gap: 6px;
  margin: 16px 0;
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
  font-weight: 500;
}
label small {
  font-weight: 400;
}
.notice {
  min-height: 1.4em;
  margin: 8px 0 0;
  color: var(--brand-text);
  font-size: var(--fs-secondary);
}
.notice.error,
.field-error {
  color: var(--down-solid);
}
.field-error {
  min-height: 1.1em;
  font-weight: 500;
}
input.invalid {
  border-color: var(--down-border);
  outline: 2px solid var(--down-surface);
}
button .button-spinner {
  display: none;
  width: 12px;
  height: 12px;
  border: 2px solid color-mix(in srgb, currentColor 35%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
button.is-loading .button-spinner {
  display: inline-block;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Landing page (body.home). Marketing route: hero, proof, how it works,
   features, use cases, pricing, closing CTA. Everything is scoped to .home
   so the app, auth and billing pages keep their own density.

   Type: Minor Third scale on a 16px body; weights 400 / 500 / 600 only;
   nothing below 12px. Space: 4px micro steps, 8px for components.
   Surfaces: the canvas is L0; the hero preview, feature band, pricing cards
   and closing CTA are L1 panels with a 1px border.
   ========================================================================== */
.home {
  --section-space: var(--space-16);
  --prose-max: 65ch;
  --fs-h3: var(--step-1);
  --fs-h2: var(--step-3);
  --fs-h1: var(--step-5);
  --fs-price: var(--step-4);
  --panel-edge: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
html[data-theme="light"] .home {
  --panel-edge: 0 1px 3px rgba(16, 24, 40, 0.06);
}
@media (max-width: 767.98px) {
  .home {
    --section-space: var(--space-12);
    --fs-h2: var(--step-2);
    --fs-h1: var(--step-4);
  }
}

.home h1 {
  font-size: var(--fs-h1);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.home h2 {
  font-size: var(--fs-h2);
  line-height: 1.2;
}
.home h3 {
  font-size: var(--fs-h3);
  line-height: 1.25;
}
.home h4 {
  font-size: var(--fs-body);
  line-height: 1.25;
}
.home p {
  margin: 0;
}
.home .eyebrow {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.08em;
}
.home .button {
  padding: var(--space-3) var(--space-6);
  font-size: var(--fs-secondary);
  font-weight: 600;
}
/* Page body: one centred column, capped at the wide viewport. */
.home main {
  width: 100%;
  max-width: var(--vp-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.home main > section {
  padding: var(--section-space) 0;
}
.home main > section + section {
  border-top: 1px solid var(--border-subtle);
}
.home main > section.feature-band,
.home main > section.landing-cta,
.home main > section.feature-band + section,
.home main > section.landing-cta + section {
  border-top: 0;
}
.section-intro {
  max-width: var(--prose-max);
  margin-bottom: var(--space-8);
}
.section-intro h2 {
  margin: 0 0 var(--space-3);
}
.section-intro > p:last-child {
  color: var(--text-secondary);
}

/* L1 panel shared by the preview, feature band, pricing cards and CTA. */
.panel-l1 {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface-1);
  box-shadow: var(--panel-edge);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: var(--space-12);
}
.hero h1 {
  max-width: 20ch;
  margin: 0 0 var(--space-6);
}
.home .lede {
  max-width: var(--prose-max);
  margin: 0 0 var(--space-8);
  color: var(--text-secondary);
  font-size: var(--fs-body);
}
.cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}
.home .subtext {
  margin-top: var(--space-4);
  color: var(--text-muted);
  font-size: var(--fs-meta);
}

.hero-preview {
  display: grid;
  gap: var(--space-6);
  margin: 0;
  padding: var(--space-6);
}
.hero-preview figcaption {
  color: var(--text-muted);
  font-size: var(--fs-meta);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.preview-monitor {
  display: grid;
  gap: var(--space-6);
}
.preview-monitor-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}
.preview-monitor-topline > div {
  display: grid;
  min-width: 0;
  gap: var(--space-1);
}
.preview-monitor small {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: var(--fs-meta);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--up-solid);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.preview-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--up-solid);
}
.home .preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: calc(-1 * var(--space-3)) 0 0;
  color: var(--text-muted);
  font-size: var(--fs-meta);
}
.preview-reliability {
  display: grid;
  gap: var(--space-2);
}
.preview-reliability > small {
  color: var(--text-muted);
}
.preview-reliability > div {
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  gap: 2px;
}
.preview-reliability span {
  height: 16px;
  border-radius: 1px;
  background: color-mix(in srgb, var(--up-solid) 70%, transparent);
}
.preview-reliability span:nth-child(12) {
  background: var(--warn-solid);
}
.preview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin: 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}
.preview-stats dt {
  color: var(--text-muted);
  font-size: var(--fs-meta);
}
.preview-stats dd {
  margin: var(--space-1) 0 0;
  font-size: var(--fs-body);
  font-weight: 500;
}

/* Proof */
.proof {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: var(--space-16);
}
.proof .section-intro {
  margin-bottom: 0;
}
.proof-points {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.proof-points li {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.proof-points li:first-child {
  padding-top: 0;
}
.proof-points li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.proof-points strong {
  font-weight: 600;
}
.proof-points span {
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
}

/* How it works */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-8);
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  padding-top: var(--space-4);
  border-top: 2px solid var(--border-strong);
}
.step-num {
  display: block;
  margin-bottom: var(--space-3);
  color: var(--brand-text);
  font-family: var(--font-mono);
  font-size: var(--fs-secondary);
  font-weight: 500;
}
.step h3 {
  margin: 0 0 var(--space-2);
}
.step p {
  color: var(--text-secondary);
}

/* Features: one L1 band, grouped by what the feature does. */
.home main > section.feature-band {
  margin: var(--section-space) 0;
  padding: var(--space-12) var(--space-8);
}
.feature-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-8);
}
.feature-group h3 {
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-strong);
}
.feature-group ul {
  display: grid;
  gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}
.feature-group h4 {
  margin: 0 0 var(--space-1);
}
.feature-group p {
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
}
.plan-note {
  color: var(--text-muted);
  font-size: var(--fs-meta);
}

/* Use cases */
.use-case-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border-subtle);
}
.use-case-list li {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  align-items: baseline;
  gap: var(--space-6);
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.use-case-list .audience {
  color: var(--text-muted);
  font-size: var(--fs-secondary);
  font-weight: 500;
}
.use-case-list h3 {
  margin: 0 0 var(--space-2);
}
.use-case-list p {
  max-width: var(--prose-max);
  color: var(--text-secondary);
}

/* Pricing: same carousel markup as billing, but each plan is an L1 card. */
.home .pricing-trial {
  margin: var(--space-4) 0 0;
  font-size: var(--fs-secondary);
  font-weight: 500;
}
.home .billing-interval {
  margin-top: var(--space-6);
}
.home .billing-interval button {
  min-height: 44px;
}
.home .billing-interval button span {
  font-size: var(--fs-meta);
}
.home .pricing-carousel {
  margin-top: var(--space-8);
}
.home .pricing-carousel-head > p {
  font-size: var(--fs-secondary);
}
.home .pricing-scroll {
  position: relative;
  width: 44px;
  height: 44px;
}
.home .pricing-scroll::after {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: calc(100% + var(--space-2));
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-2);
  color: var(--text-primary);
  content: attr(data-tooltip);
  font-size: var(--fs-meta);
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease-out;
}
.home .pricing-scroll:focus-visible::after {
  opacity: 1;
}
@media (hover: hover) {
  .home .pricing-scroll:hover::after {
    opacity: 1;
  }
}
.home .pricing-grid {
  gap: var(--space-4);
  margin-top: 0;
}
.home .pricing-viewport {
  padding: var(--space-4) var(--space-1);
}
.home .pricing-card {
  padding: var(--space-6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface-1);
  box-shadow: var(--panel-edge);
}
.home .pricing-card.featured {
  border: 1px solid var(--brand);
  box-shadow: var(--panel-edge), inset 0 0 0 1px var(--brand);
}
.home .pricing-card h3 {
  margin: 0 0 var(--space-2);
}
.home .badge {
  top: calc(-1 * var(--space-3));
  left: var(--space-6);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--fs-meta);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
}
.home .price {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-price);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.home .price small {
  font-size: var(--fs-secondary);
  letter-spacing: 0;
}
.home .price .price-note {
  font-size: var(--fs-meta);
}
.home .pricing-card .description {
  min-height: 4.65em;
  font-size: var(--fs-secondary);
}
.home .features-list {
  margin: var(--space-4) 0 var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--fs-secondary);
}
.home .features-list li {
  margin: var(--space-2) 0;
  padding-left: var(--space-4);
}
.home .features-list li::before {
  width: 8px;
}
.home .features-list strong {
  font-weight: 500;
}
.home .pricing-included {
  max-width: var(--prose-max);
  margin-top: var(--space-6);
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
  font-weight: 400;
}

/* FAQ: one hairline list of disclosures, answers capped at prose width. */
.faq-list {
  border-top: 1px solid var(--border-subtle);
}
.faq-list details {
  border-bottom: 1px solid var(--border-subtle);
}
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--hit);
  padding: var(--space-4) 0;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary::after {
  flex: 0 0 auto;
  color: var(--text-muted);
  content: "+";
  font-family: var(--font-mono);
}
.faq-list details[open] summary::after {
  content: "−";
}
.faq-list summary:hover {
  color: var(--brand-text);
}
.faq-list details p {
  max-width: var(--prose-max);
  padding: 0 0 var(--space-6);
  color: var(--text-secondary);
}

/* Closing CTA: repeats the hero action once plans are on the table. */
.home main > section.landing-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  margin-bottom: var(--section-space);
  padding: var(--space-12) var(--space-8);
}
.landing-cta .section-intro {
  margin: 0;
}
.landing-cta .button {
  flex: 0 0 auto;
}

/* Footer */
.home .site-footer {
  padding: var(--space-12) var(--gutter) var(--space-16);
  font-size: var(--fs-secondary);
}
.home .footer-main,
.home .footer-bottom {
  max-width: var(--vp-wide);
}
.home .footer-brand p {
  margin-top: var(--space-3);
  font-size: var(--fs-secondary);
}
.home .footer-links {
  align-items: start;
  gap: var(--space-12);
}
.home .footer-links div {
  gap: 0;
}
.home .footer-links strong {
  margin-bottom: var(--space-2);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.08em;
}
.home .footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--fs-secondary);
}
.home .footer-bottom {
  margin-top: var(--space-8);
  font-size: var(--fs-meta);
}

/* Narrow: nav becomes a menu, every grid stacks. */
@media (max-width: 767.98px) {
  .hero,
  .proof {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .cta-group .button {
    width: 100%;
  }
  .hero-preview {
    padding: var(--space-4);
  }
  .steps-grid,
  .feature-groups {
    grid-template-columns: 1fr;
  }
  .home main > section.feature-band,
  .home main > section.landing-cta {
    padding: var(--space-8) var(--space-4);
  }
  .use-case-list li {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
  .home main > section.landing-cta {
    display: grid;
    gap: var(--space-6);
  }
  .landing-cta .button {
    width: 100%;
  }
  .home .footer-links {
    gap: var(--space-6);
  }
}


/* Pricing — flat columns with a top rule, no boxes */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px 24px;
  margin-top: 32px;
}
.pricing-carousel-head {
  display: none;
}
.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: 22px;
  border-top: 1px solid var(--border-subtle);
}
.pricing-card.featured {
  border-top: 3px solid var(--brand);
}
.pricing-card .button,
.pricing-card button {
  margin-top: auto;
}
.badge {
  position: absolute;
  top: -11px;
  left: 0;
  padding: 2px 9px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.price {
  margin: 4px 0 6px;
  font-size: var(--step-4);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.price small {
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: var(--fs-meta);
  font-weight: 400;
}
.pricing-card .description {
  min-height: 3.4em;
  font-size: var(--fs-secondary);
}
.features-list {
  margin: 14px 0 22px;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
}
.features-list li {
  position: relative;
  margin: 7px 0;
  padding-left: 18px;
}
.features-list li::before {
  position: absolute;
  left: 0;
  content: "";
  top: 0.52em;
  width: 6px;
  height: 1px;
  background: var(--border-strong);
}
.features-list strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 768px) {
  .pricing-carousel {
    margin-top: 32px;
  }
  .pricing-carousel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
  }
  .pricing-carousel-head > p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--fs-secondary);
  }
  .pricing-carousel-controls {
    display: flex;
    gap: 8px;
  }
  .pricing-scroll {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-primary);
    font-size: var(--step-1);
  }
  .pricing-scroll:hover {
    background: var(--bg-surface-2);
  }
  .pricing-scroll:disabled {
    cursor: not-allowed;
    opacity: 0.4;
  }
  .pricing-viewport {
    overflow-x: auto;
    padding: 14px 2px 14px;
    scroll-snap-type: x mandatory;
    scrollbar-color: var(--border-strong) transparent;
    scrollbar-width: thin;
  }
  @media (prefers-reduced-motion: no-preference) {
    .pricing-viewport {
      scroll-behavior: smooth;
    }
  }
  .pricing-viewport:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 4px;
  }
  .pricing-viewport::-webkit-scrollbar {
    height: 8px;
  }
  .pricing-viewport::-webkit-scrollbar-thumb {
    border-radius: 99px;
    background: var(--border-strong);
  }
  .pricing-grid {
    display: flex;
    width: max-content;
    gap: 40px;
    margin-top: 0;
  }
  .pricing-card {
    flex: 0 0 clamp(288px, 31vw, 356px);
    scroll-snap-align: start;
  }
}
/* Wide screens show all five plans side by side, so there is nothing to browse. */
@media (min-width: 1280px) {
  .pricing-carousel-head {
    display: none;
  }
  .pricing-viewport {
    overflow: visible;
    padding-inline: 0;
  }
  .pricing-grid {
    width: auto;
    gap: 28px;
  }
  .pricing-card {
    flex: 1 1 0;
    min-width: 0;
  }
}

/* ==========================================================================
   Footer / legal
   ========================================================================== */
footer {
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
}
.site-footer {
  /* Room at the bottom so the floating theme toggle never covers the last footer line. */
  padding: 40px clamp(16px, 4vw, 40px) 72px;
}
.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  max-width: var(--shell);
  margin: 0 auto;
}
.footer-brand {
  max-width: 280px;
}
.footer-brand p {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: var(--fs-secondary);
}
.footer-links {
  display: flex;
  gap: clamp(28px, 5vw, 72px);
}
.footer-links div {
  display: grid;
  align-content: start;
  gap: 7px;
}
.footer-links strong {
  margin-bottom: 2px;
  color: var(--text-primary);
  font-size: var(--fs-meta);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-links a {
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--text-primary);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--shell);
  margin: 32px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: var(--fs-meta);
}
.footer-bottom p {
  margin: 0;
}
.legal-page {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 72px;
}
.legal-page h1 {
  font-size: var(--step-4);
}
.legal-updated {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
}
.legal-page section {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}
.legal-page section h2 {
  margin: 0 0 8px;
  font-size: var(--step-1);
}
.legal-page section p {
  margin: 0;
  color: var(--text-secondary);
}

/* ==========================================================================
   Auth
   ========================================================================== */
.auth main {
  width: min(420px, calc(100% - 32px));
  margin: 10vh auto 8vh;
}
.auth .brand {
  display: block;
  margin-bottom: 28px;
  font-size: var(--fs-body);
}
.auth .brand img {
  height: 34px;
}
.card {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 28px 0 20px;
}
.card h1 {
  margin: 6px 0 20px;
  font-size: var(--step-2);
}
.card form {
  display: grid;
  gap: 4px;
}
.card button[type="submit"],
.card form > button {
  width: 100%;
  min-height: var(--hit);
  margin-top: 8px;
}
.card > p:last-child {
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: var(--fs-secondary);
}
.auth-providers {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.auth-providers[hidden],
.auth-providers.is-suppressed,
.auth-providers [hidden] {
  display: none;
}
.auth-providers .button {
  width: 100%;
  min-height: var(--hit);
}
#mfa .secondary {
  width: 100%;
  min-height: var(--hit);
}
.auth-providers svg {
  width: 18px;
  height: 18px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-meta);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mfa-intro {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Dashboard shell
   ========================================================================== */
.dashboard {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 40px) 80px;
}
.admin-live {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.live-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--up-solid);
  animation: pulse 2s infinite;
}
.health-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
}
.health-pulse.up {
  background: var(--up-solid);
  animation: pulse 2s infinite;
}
.health-pulse.pending {
  background: var(--warn-solid);
}
.health-pulse.down {
  background: var(--down-solid);
}
.chip {
  padding: 2px 8px;
  border-left: 2px solid var(--border-strong);
  color: var(--text-secondary);
  font-size: var(--fs-meta);
  font-weight: 500;
}
.chip.warn {
  border-left-color: var(--warn-solid);
  color: var(--warn-solid);
}

/* Page header */
.app-dashboard {
  --panel-radius: 6px;
  --monitor-columns: minmax(0, 1.55fr) minmax(190px, 1fr) 76px 84px 72px 132px;
  display: grid;
  gap: 20px;
  padding-top: 28px;
}
.app-dashboard > .upgrade {
  margin: 0;
}
.dash-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.dash-header h1 {
  margin: 0;
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.dash-refresh {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 6px 0 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-variant-numeric: tabular-nums;
}
.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dash-actions button {
  min-height: var(--hit);
}

/* Summary tiles */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.stat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--panel-radius);
  background: var(--bg-surface-1);
}
.stat-tile:hover {
  border-color: var(--border-strong);
}
.stat-tile.is-down {
  border-color: var(--down-border);
  background: linear-gradient(var(--down-surface), var(--down-surface)), var(--bg-surface-1);
}
.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 20px;
}
.stat-label {
  color: var(--text-muted);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.stat-tag {
  padding: 1px 7px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: var(--fs-meta);
  font-weight: 600;
  white-space: nowrap;
}
.stat-reading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 10px;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: var(--step-3);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.stat-reading > span:not(.uptime-trend) {
  margin-right: auto;
  color: var(--text-muted);
  font-size: var(--fs-meta);
}
.stat-headline {
  display: block;
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.stat-tile.is-up .stat-headline {
  color: var(--up-solid);
}
.stat-tile.is-down .stat-headline {
  color: var(--down-solid);
}
.stat-tile.is-pending .stat-headline {
  color: var(--warn-solid);
}
.stat-tile.is-empty .stat-headline {
  color: var(--text-secondary);
}
.stat-action {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
}
.stat-action:hover {
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.stat-action span {
  display: inline-block;
  transition: transform 150ms var(--ease);
}
.stat-action:hover span {
  transform: translateX(2px);
}
.stat-note {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-meta);
  line-height: 1.45;
}
.stat-meter,
.health-bar {
  display: flex;
  gap: 2px;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--bg-surface-2);
}
.stat-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--brand);
  transition: width 320ms var(--ease);
}
.health-bar span {
  min-width: 4px;
  height: 100%;
}
.health-bar .up {
  background: var(--up-solid);
}
.health-bar .pending {
  background: var(--warn-solid);
}
.health-bar .down {
  background: var(--down-solid);
}
.health-bar .paused {
  background: var(--border-strong);
}
.uptime-trend {
  color: var(--text-muted);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.uptime-trend.up {
  color: var(--up-solid);
}
.uptime-trend.pending {
  color: var(--warn-solid);
}
.uptime-trend.down {
  color: var(--down-solid);
}
.stat-uptime.is-up .stat-value {
  color: var(--up-solid);
}
.stat-uptime.is-pending .stat-value {
  color: var(--warn-solid);
}
.stat-uptime.is-down .stat-value {
  color: var(--down-solid);
}
.stat-uptime.is-down {
  border-color: var(--border-subtle);
  background: var(--bg-surface-1);
}
.stat-uptime.is-up .uptime-chart {
  background: linear-gradient(90deg, var(--up-solid) 0 var(--uptime, 0%), var(--bg-surface-2) var(--uptime, 0%) 100%);
}
.stat-uptime.is-pending .uptime-chart {
  background: linear-gradient(90deg, var(--warn-solid) 0 var(--uptime, 0%), var(--bg-surface-2) var(--uptime, 0%) 100%);
}
.stat-uptime.is-down .uptime-chart {
  background: linear-gradient(90deg, var(--down-solid) 0 var(--uptime, 0%), var(--bg-surface-2) var(--uptime, 0%) 100%);
}
#incident-tile.is-down .stat-value {
  color: var(--down-solid);
}
.stat-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.plan-popover {
  position: relative;
}
.plan-popover > summary {
  color: var(--brand-text);
  font-size: var(--fs-meta);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
}
.plan-popover > summary::-webkit-details-marker {
  display: none;
}
.plan-popover > summary::after {
  content: " ▾";
  font-size: var(--fs-meta);
}
.plan-popover > div {
  position: absolute;
  z-index: 6;
  top: calc(100% + 8px);
  right: -6px;
  display: grid;
  gap: 10px;
  width: 250px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--panel-radius);
  background: var(--bg-surface-1);
  box-shadow: var(--shadow-float);
}
.plan-popover a {
  font-size: var(--fs-meta);
  font-weight: 600;
  text-decoration: none;
}
.plan-capabilities {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.plan-capabilities li {
  position: relative;
  padding-left: 14px;
  color: var(--text-secondary);
  font-size: var(--fs-meta);
  line-height: 1.35;
}
.plan-capabilities li::before {
  position: absolute;
  top: 0.5em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--up-solid);
  content: "";
}

/* Notice banners */
.upgrade[hidden] {
  display: none;
}
.upgrade {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 0;
  padding: 12px 14px;
  border-left: 3px solid var(--warn-solid);
  background: var(--warn-surface);
  font-size: var(--fs-secondary);
}
.app-dashboard .upgrade {
  border: 1px solid var(--warn-border);
  border-left: 3px solid var(--warn-solid);
  border-radius: var(--panel-radius);
}
.upgrade a,
.upgrade button {
  color: var(--warn-solid);
  white-space: nowrap;
}
.upgrade .link:hover {
  background: var(--warn-surface);
}
.support {
  border-left-color: var(--brand);
  background: var(--brand-surface);
}
.app-dashboard .support {
  border-color: var(--border-subtle);
  border-left-color: var(--brand);
}
.support a,
.support button {
  color: var(--brand-text);
}

/* ==========================================================================
   Section headers and panels
   ========================================================================== */
.panel {
  min-width: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--panel-radius);
  background: var(--bg-surface-1);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.panel-title {
  display: flex;
  flex: 1 1 220px;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-width: 0;
}
.panel-title h2 {
  margin: 0;
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.panel-copy {
  flex-basis: 100%;
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-meta);
  line-height: 1.45;
}
.count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  font-size: var(--fs-meta);
  font-weight: 600;
}
button.compact,
.button.compact {
  min-height: var(--hit);
  padding: 5px 12px;
  font-size: var(--fs-meta);
}
.dash-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  align-items: start;
  gap: 20px;
}

/* Search and status filter */
.monitor-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.monitor-tools[hidden] {
  display: none;
}
#monitor-search {
  width: 220px;
  min-height: var(--hit);
  padding: 5px 10px 5px 30px;
  background: var(--bg-inset) no-repeat 10px center / 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%237d8595' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.75'/%3E%3Cpath d='M10.5 10.5 14 14'/%3E%3C/svg%3E");
  font-size: var(--fs-secondary);
}
/* Status filter */
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-inset);
}
.segmented button {
  min-height: var(--hit);
  padding: 3px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--fs-meta);
  font-weight: 500;
}
.segmented button:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}
.segmented button[aria-pressed="true"] {
  background: var(--bg-surface-2);
  box-shadow: inset 0 0 0 1px var(--border-strong);
  color: var(--text-primary);
}
.segmented button span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-variant-numeric: tabular-nums;
}
.segmented .filter-down span {
  color: var(--down-solid);
}
.segmented .filter-pending span {
  color: var(--warn-solid);
}

/* ==========================================================================
   Monitor table — one dense row per monitor, problems first
   ========================================================================== */
.monitor-columns,
.monitor-main {
  display: grid;
  grid-template-columns: var(--monitor-columns);
  align-items: center;
  gap: 20px;
}
.monitor-columns {
  padding: 8px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.monitor-list {
  display: grid;
}
.monitor-panel,
.monitor {
  scroll-margin-top: 76px;
}
.monitor {
  position: relative;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.monitor-list > .monitor:last-of-type,
.monitor-list > .history:last-child {
  border-bottom: 0;
}
.monitor:hover {
  background: color-mix(in srgb, var(--bg-surface-2) 55%, transparent);
}
.monitor::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 3px;
  background: transparent;
  content: "";
}
.monitor.is-down {
  background: var(--down-surface);
}
.monitor.is-down::before {
  background: var(--down-solid);
}
.monitor.is-pending::before {
  background: var(--warn-solid);
}
.monitor.is-paused .monitor-main {
  opacity: 0.6;
}
.monitor-identity {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.monitor-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
}
.monitor-name strong {
  overflow: hidden;
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.monitor-target {
  max-width: 100%;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: var(--fs-meta);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
code.monitor-target {
  font-family: var(--font-mono);
}
a.monitor-target:hover {
  color: var(--brand-text);
  text-decoration: underline;
}
.monitor-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 12px;
  margin-top: 3px;
}
.monitor-meta span {
  color: var(--text-muted);
  font-size: var(--fs-meta);
  font-weight: 500;
}
.monitor-meta .ssl-expiry.soon {
  color: var(--down-solid);
}
.monitor-meta .maintenance-badge {
  color: var(--warn-solid);
  font-weight: 600;
}
.region-tag {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.region-tag.offline {
  color: var(--down-solid);
}
.app-dashboard .status {
  padding: 1px 7px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  font-size: var(--fs-meta);
}
.app-dashboard .status.up {
  border-color: var(--up-border);
  background: var(--up-surface);
}
.app-dashboard .status.down {
  border-color: var(--down-border);
  background: var(--down-surface);
}
.app-dashboard .status.unknown,
.app-dashboard .status.pending {
  border-color: var(--warn-border);
  background: var(--warn-surface);
  color: var(--warn-solid);
}
.app-dashboard .monitor-name .status {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sparklines inside a monitor row */
.monitor-trend {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.app-dashboard .reliability-wrap {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}
.app-dashboard .reliability-label {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
}
.app-dashboard .reliability {
  display: grid;
  grid-template-columns: repeat(var(--reliability-cells, 30), minmax(2px, 1fr));
  gap: 2px;
}
.app-dashboard .reliability-cell {
  height: 14px;
  border-radius: 1px;
}
.app-dashboard .reliability-wrap + .reliability-wrap .reliability-cell {
  height: 8px;
}
.app-dashboard .reliability-cell:hover {
  opacity: 1;
  outline: 1px solid var(--text-secondary);
  outline-offset: 1px;
}
.chart-tip {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  display: grid;
  gap: 1px;
  padding: 6px 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-surface-1);
  box-shadow: var(--shadow-float);
  color: var(--text-secondary);
  font-size: var(--fs-meta);
  line-height: 1.35;
  white-space: nowrap;
  pointer-events: none;
}
.chart-tip strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 500;
}
.chart-tip .down {
  color: var(--down-solid);
}

/* Telemetry columns */
.monitor-stats {
  display: contents;
}
.monitor-stats div {
  min-width: 0;
}
.monitor-stats dt {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.monitor-stats dd {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--fs-secondary);
  font-weight: 500;
  white-space: nowrap;
}
.monitor-stats dd.good {
  color: var(--up-solid);
}
.monitor-stats dd.warn {
  color: var(--warn-solid);
}
.monitor-stats dd.bad {
  color: var(--down-solid);
}
.monitor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.run-check-wrap {
  position: relative;
}
.run-check {
  min-height: var(--hit);
  padding: 4px 10px;
  border-color: var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--fs-meta);
  font-weight: 500;
  white-space: nowrap;
}
.run-check:hover {
  background: var(--bg-surface-2);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.run-check-error {
  position: absolute;
  z-index: 4;
  top: calc(100% + 6px);
  right: 0;
  width: 240px;
  padding: 8px 10px;
  border: 1px solid var(--down-border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface-1);
  box-shadow: var(--shadow-float);
  color: var(--down-solid);
  font-size: var(--fs-meta);
  line-height: 1.35;
}

/* Row menu */
.monitor-menu {
  position: relative;
}
.monitor-menu summary {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  list-style: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--fs-body);
  line-height: 1;
  cursor: pointer;
}
.monitor-menu summary:hover,
.monitor-menu[open] summary {
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.monitor-menu summary::-webkit-details-marker {
  display: none;
}
.monitor-menu > div {
  position: absolute;
  z-index: 5;
  top: 34px;
  right: 0;
  display: grid;
  min-width: 156px;
  padding: 5px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-1);
  box-shadow: var(--shadow-float);
}
.monitor-menu .link {
  justify-content: flex-start;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--fs-meta);
  font-weight: 500;
  text-align: left;
}
.monitor-menu .link:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}
.monitor-menu .danger-link:hover {
  background: var(--down-surface);
  color: var(--down-solid);
}

/* Row footnote: heartbeat setup, paused and agent notices */
.monitor-footer {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-lg);
  background: var(--bg-inset);
}
.heartbeat-usage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
  color: var(--text-muted);
  font-size: var(--fs-meta);
}
.heartbeat-usage code {
  padding: 2px 6px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-1);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}
.monitor-check-note {
  color: var(--text-muted);
  font-size: var(--fs-meta);
}

/* Sparklines (shared with the status page) */
.reliability-wrap {
  display: grid;
  gap: 4px;
}
.reliability-label {
  color: var(--text-muted);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.reliability {
  display: grid;
  grid-template-columns: repeat(var(--reliability-cells, 30), minmax(3px, 1fr));
  gap: 2px;
  width: 100%;
}
.reliability-cell {
  height: 18px;
  padding: 0;
  border-radius: 2px;
  background: linear-gradient(var(--border-subtle), var(--border-subtle)) center / 100% 3px no-repeat;
  transition: opacity 150ms var(--ease);
}
.reliability-cell.up {
  background: color-mix(in srgb, var(--up-solid) 72%, transparent);
}
.reliability-cell.down {
  background: var(--down-solid);
}
.reliability-cell.empty {
  background: linear-gradient(var(--border-subtle), var(--border-subtle)) center / 100% 3px no-repeat;
}
.reliability-cell:hover {
  opacity: 0.72;
}
.reliability-legend {
  display: none;
}
.reliability-key {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 1px;
}
.reliability-key.up {
  background: var(--up-solid);
}
.reliability-key.down {
  background: var(--down-solid);
}

/* Status badges — mark with a leading indicator, minimal chrome */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  color: var(--text-secondary);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.6;
  text-transform: uppercase;
  white-space: nowrap;
}
.status.up {
  color: var(--up-solid);
}
.status.down {
  color: var(--down-solid);
}
.status.unknown {
  color: var(--warn-solid);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  flex: 0 0 auto;
}
.dot.up {
  background: var(--up-solid);
}
.status.up .dot {
  animation: pulse 2s infinite;
}
.dot.down {
  width: 0;
  height: 0;
  border-radius: 0;
  background: transparent;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 7px solid var(--down-solid);
}
.status.unknown .dot {
  width: 8px;
  height: 8px;
  background: transparent;
  border: 1.5px solid color-mix(in srgb, var(--warn-solid) 35%, transparent);
  border-top-color: var(--warn-solid);
  animation: spin 1s linear infinite;
}

/* Check history panel */
.history {
  padding: 4px 18px 10px 36px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-inset);
}
.check-row,
.report-row,
.report-head {
  display: grid;
  grid-template-columns: 12px 66px 88px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: var(--fs-meta);
}
.check-row:last-child {
  border-bottom: 0;
}
.check-row time {
  color: var(--text-muted);
  font-size: var(--fs-meta);
}

/* Reports */
.reports[hidden] {
  display: none;
}
.report-head,
.report-row {
  grid-template-columns: 2fr repeat(5, 1fr);
  padding: 9px 18px;
}
.report-head {
  color: var(--text-muted);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.report-row span:first-child {
  color: var(--text-primary);
  font-weight: 500;
}
.report-row:last-child {
  border-bottom: 0;
}
.report-row:hover {
  background: color-mix(in srgb, var(--bg-surface-2) 55%, transparent);
}

/* Incident history and maintenance windows */
.incident-head,
.incident-row {
  display: grid;
  grid-template-columns: 1.3fr 1.2fr 1fr 1.2fr;
  align-items: center;
  gap: 12px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: var(--fs-meta);
}
.incident-list > .incident-row:last-of-type {
  border-bottom: 0;
}
.incident-head {
  color: var(--text-muted);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.incident-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.incident-name a {
  overflow: hidden;
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.incident-name a:hover {
  color: var(--brand-text);
}
.incident-row.ongoing {
  background: var(--down-surface);
}
.incident-row.ongoing span:last-child {
  color: var(--down-solid);
  font-weight: 600;
}
.incident-row time,
.incident-row span:last-child {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.incident-row time {
  color: var(--text-muted);
}
.incident-more {
  margin: 10px 14px 12px;
}
/* The side column is narrow, so each window stacks: scope and state, then time, then note. */
.maintenance-list .incident-row {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "scope state" "time time" "note note";
  gap: 2px 12px;
  padding: 11px 18px;
}
.maintenance-list .incident-row > :nth-child(1) {
  grid-area: scope;
  color: var(--text-primary);
  font-weight: 500;
}
.maintenance-list .incident-row > :nth-child(2) {
  grid-area: note;
  color: var(--text-muted);
}
.maintenance-list .incident-row > :nth-child(2):empty {
  display: none;
}
.maintenance-list .incident-row > :nth-child(3) {
  grid-area: time;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
}
.maintenance-list .incident-row > :nth-child(4) {
  grid-area: state;
  font-family: var(--font-ui);
  white-space: nowrap;
}
.maintenance-row.active {
  background: var(--warn-surface);
}
.maintenance-row.active span:last-child {
  color: var(--warn-solid);
  font-weight: 600;
}
.maintenance-row .link {
  margin-left: 6px;
}

/* Empty states */
.empty:not(.reliability-cell) {
  margin: 0;
  padding: 24px 0;
  color: var(--text-muted);
  font-size: var(--fs-secondary);
}
.panel .empty:not(.reliability-cell) {
  padding: 20px 18px;
}
.empty-state {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 32px 18px;
}
.empty-state h3 {
  margin: 4px 0 6px;
  font-size: var(--step-1);
}
.empty-state p:not(.eyebrow) {
  max-width: 60ch;
  margin: 0 0 14px;
  color: var(--text-secondary);
}
.empty-illustration {
  display: grid;
  align-content: center;
  gap: 6px;
  width: 96px;
  height: 76px;
  padding: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.empty-illustration span {
  display: block;
  height: 5px;
  border-radius: 1px;
  background: var(--border-strong);
}
.empty-illustration span:first-child {
  width: 100%;
}
.empty-illustration span:nth-child(2) {
  width: 66%;
}
.empty-illustration span:nth-child(3) {
  width: 40%;
}

/* Skeletons */
.skeleton {
  display: block;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg-surface-1) 25%, var(--bg-surface-2) 50%, var(--bg-surface-1) 75%);
  background-size: 220% 100%;
  animation: shimmer 1.5s infinite linear;
}
@keyframes shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}
.skeleton-text {
  width: 70%;
  height: 1.6rem;
}
.skeleton-line {
  width: 100%;
  height: 12px;
}
.skeleton-line.short {
  width: 34%;
  height: 16px;
}
.monitor-skeleton {
  display: grid;
  gap: 10px;
  min-height: 76px;
}

/* ==========================================================================
   Dialogs — keep elevated surfaces for floating layers
   ========================================================================== */
dialog {
  width: min(520px, calc(100vw - 32px));
  max-width: 520px;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow-y: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-surface-1);
  color: var(--text-primary);
  box-shadow: var(--shadow-float);
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}
dialog form,
dialog > section {
  padding: 26px;
}
dialog h2 {
  font-size: var(--step-1);
}
.dialog-intro {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.dialog-intro h2 {
  margin: 5px 0 5px;
}
.dialog-intro > p:last-child {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
}
.security-settings form {
  display: grid;
  gap: 4px;
  padding: 0;
}
.security-settings p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
}
.security-settings .security-status strong {
  color: var(--text-primary);
}
.security-section {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.security-section:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.security-section h3 {
  margin: 0 0 4px;
  font-size: var(--fs-body);
}
.passkey-list {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.passkey-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-inset);
}
.passkey-list li > span {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
}
.passkey-list strong {
  overflow: hidden;
  font-size: var(--fs-secondary);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.passkey-list small {
  color: var(--text-muted);
  font-size: var(--fs-meta);
}
.passkey-list .empty {
  color: var(--text-muted);
  font-size: var(--fs-secondary);
}
.security-qr {
  justify-self: start;
  width: 168px;
  margin-bottom: 12px;
  padding: 8px;
  border-radius: var(--radius);
  background: #ffffff;
}
.security-qr svg {
  display: block;
  width: 100%;
  height: auto;
}
.security-key code {
  color: var(--text-primary);
  font-family: var(--font-mono);
  word-break: break-all;
}
.recovery-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 24px;
  margin: 0 0 14px;
  padding: 14px 14px 14px 36px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-inset);
  font-family: var(--font-mono);
  font-size: var(--fs-secondary);
}
.security-code-actions,
.security-on-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
.form-group {
  margin: 16px 0;
  padding: 0;
  border: 0;
}
.form-group legend {
  margin-bottom: 2px;
  padding: 0;
  color: var(--text-muted);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.alert-events {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0;
  padding: 12px 14px;
  border-left: 2px solid var(--border-strong);
}
.alert-events legend {
  padding: 0 4px;
  color: var(--text-muted);
  font-size: var(--fs-meta);
}
.alert-events label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--text-primary);
}
.alert-events input {
  width: auto;
}
.status-page-monitors > div {
  display: grid;
  gap: 8px;
  width: 100%;
}
.status-page-monitors .empty {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-secondary);
}

/* Integrations: Slack, Discord and webhook destinations */
#monitor-integration-list,
#alert-integration-list {
  display: grid;
  gap: 8px;
  width: 100%;
}
#monitor-integration-list .empty,
#alert-integration-list .empty {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-secondary);
}
.integration-kind-note {
  color: var(--text-muted);
  font-size: var(--fs-meta);
}
.integrations-settings > p:not(.notice):not(.eyebrow) {
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
}
.time-zone-form {
  display: grid;
  gap: 4px;
  padding: 0;
}
.time-zone-form label {
  margin: 0;
}
.integrations-heading {
  margin: 0 0 4px;
  font-size: var(--fs-body);
}
.integrations-upgrade {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--warn-border);
  border-radius: var(--radius);
  background: var(--warn-surface);
}
.integration-list li {
  flex-wrap: wrap;
  align-items: flex-start;
}
.integration-list li > span:not([class]) {
  min-width: 180px;
}
.integration-list li > .integration-kind {
  display: block;
  flex: none;
  min-width: 64px;
  align-self: flex-start;
  margin-top: 2px;
  padding: 3px 6px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--fs-meta);
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.integration-list li > .integration-kind.slack { border-color: #b57ad1; color: #c58ce0; }
.integration-list li > .integration-kind.discord { border-color: #6f7cf0; color: #8a95f5; }
html[data-theme="light"] .integration-list li > .integration-kind.slack { color: #7c3a99; }
html[data-theme="light"] .integration-list li > .integration-kind.discord { color: #4752c4; }
#integration-list-notice {
  margin: 0 0 10px;
}
#integration-list-notice:empty {
  min-height: 0;
}
.integration-list small.integration-failed {
  color: var(--down-solid);
}
.integration-list li > .integration-actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.integration-secret {
  display: grid;
  gap: 8px;
  justify-items: start;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--up-border);
  border-radius: var(--radius);
  background: var(--up-surface);
}
.integration-secret p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
}
.integration-secret code {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  word-break: break-all;
}
#integration-form {
  display: grid;
  gap: 4px;
  margin-top: 4px;
  padding: 16px 0 0;
  border-top: 1px solid var(--border-subtle);
}
#integration-form h3 {
  margin: 0;
  font-size: var(--fs-body);
}
#integration-url-hint a {
  color: var(--brand-text);
}

/* Team management */
.team-management {
  display: grid;
  gap: 16px;
}
#team-dialog {
  width: min(660px, calc(100vw - 32px));
  max-width: 660px;
}
.team-management h2 {
  margin: 5px 0 5px;
}
.team-management p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
}
.team-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding-top: 8px;
}
.team-form label {
  margin: 0;
}
.team-form > button {
  min-height: var(--hit);
  white-space: nowrap;
}
.team-form .notice {
  grid-column: 1 / -1;
  margin: 0;
}
.team-list {
  display: grid;
  gap: 6px;
}
.team-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid var(--border-subtle);
  font-size: var(--fs-secondary);
}

.team-pending {
  margin-left: 6px;
  color: var(--text-secondary);
}
.team-invitations {
  display: grid;
  gap: 8px;
}
.team-invitation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
}
.team-invitation-actions {
  display: flex;
  gap: 12px;
}
.team-invitations .notice:empty {
  display: none;
}
.team-invitations .notice {
  margin: 0;
}

/* Agent enrollment */
.agent-enrollment > p:not(.eyebrow):not(.notice) {
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
}
.agent-enrollment h2 {
  margin: 5px 0 8px;
}
.agent-downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}
.agent-requirement {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: var(--fs-meta);
}
.agent-enrollment pre {
  margin: 14px 0 6px;
  padding: 12px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  color: var(--text-primary);
  font-size: var(--fs-meta);
}
/* Local agents sit at the foot of the monitors panel, one card per agent. */
.agent-strip {
  padding: 14px 18px 16px;
  border-top: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--bg-inset) 55%, transparent);
}
.agent-strip-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-bottom: 12px;
}
.agent-strip-head h3 {
  margin: 0;
  font-size: var(--fs-secondary);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.agent-strip-head .panel-copy {
  flex-basis: auto;
  margin-left: auto;
}
.agent-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.agent-list .empty:not(.reliability-cell) {
  padding: 0;
}
.local-agent {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--panel-radius, 6px);
  background: var(--bg-surface-1);
}
.local-agent:hover {
  border-color: var(--border-strong);
}
.local-agent strong {
  font-size: var(--fs-secondary);
  font-weight: 600;
}
.local-agent p,
.local-agent-state small {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: var(--fs-meta);
}
.local-agent-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.local-agent-state small {
  margin: 0;
}
.local-agent-actions {
  display: flex;
  flex-basis: 100%;
  gap: 14px;
  margin-left: -4px;
}
.agent-enrollment h3 {
  margin: 16px 0 0;
  font-size: var(--fs-secondary);
}
.agent-enrollment code {
  font-size: var(--fs-meta);
}
.agent-offline {
  color: var(--down-solid);
}

/* ==========================================================================
   Admin console — shares the dashboard's header, stat tiles and panels
   ========================================================================== */
.admin-dashboard .stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.admin-dashboard .chip {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: var(--fs-meta);
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}
.admin-dashboard .chip.warn {
  border-color: var(--warn-border);
  background: var(--warn-surface);
  color: var(--warn-solid);
}
.admin-dashboard .bad {
  color: var(--down-solid);
}
.admin-dashboard .warn {
  color: var(--warn-solid);
}
.admin-dashboard .muted {
  color: var(--text-muted);
}
.admin-dashboard .mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.admin-dashboard .truncate {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Needs-attention list */
.attention {
  padding: 12px 16px;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--panel-radius);
  background: var(--bg-surface-1);
}
.attention:empty {
  display: none;
}
.attention.is-down {
  border-color: var(--down-border);
  border-left-color: var(--down-solid);
}
.attention.is-warn {
  border-color: var(--warn-border);
  border-left-color: var(--warn-solid);
}
.attention.is-clear {
  border-left-color: var(--up-solid);
}
.attention-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: var(--fs-secondary);
  font-weight: 600;
}
.attention ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.attention li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
}
.attention li .link {
  margin-left: auto;
  font-size: var(--fs-meta);
}
.attention-mark {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}
.attention li.tone-down .attention-mark {
  background: var(--down-solid);
}
.attention li.tone-warn .attention-mark {
  background: var(--warn-solid);
}
.attention li.tone-info .attention-mark {
  background: var(--brand);
}
.attention li.tone-down > span:nth-child(2) {
  color: var(--text-primary);
}
.attention-clear {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
}

/* Breakdown panels */
.admin-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 20px;
}
.panel-body {
  padding: 14px 18px 16px;
}
.panel-body .empty:not(.reliability-cell) {
  padding: 4px 0;
}
.panel-meta {
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-variant-numeric: tabular-nums;
}
.type-bars,
.channel-rows {
  display: grid;
  gap: 10px;
}
.type-bar,
.channel-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: var(--fs-meta);
}
.type-bar strong,
.channel-row strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--fs-secondary);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.channel-row small {
  grid-column: 2 / -1;
  margin-top: -6px;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
}
.type-meter {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--bg-surface-2);
}
.type-meter span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--brand);
}
.channel-row .type-meter span {
  background: var(--up-solid);
}
.channel-row .type-meter.bad span {
  background: var(--down-solid);
}
.facts {
  display: grid;
  margin: 0;
}
.type-bars + .facts {
  margin-top: 14px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}
.fact-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--fs-meta);
}
.fact-row:last-child {
  border-bottom: 0;
}
.fact-row dt {
  color: var(--text-secondary);
  white-space: nowrap;
}
.fact-row dd {
  margin: 0;
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
}
.fact-row dd.warn {
  color: var(--warn-solid);
}
.fact-row dd.bad {
  color: var(--down-solid);
}

/* Data tables */
.admin-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.admin-filters input,
.admin-filters select {
  width: auto;
  min-height: var(--hit);
  padding: 5px 10px;
  font-size: var(--fs-secondary);
}
.admin-filters input[type="search"] {
  width: 220px;
}
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
  white-space: nowrap;
  cursor: pointer;
}
.admin-table-wrap {
  overflow-x: auto;
}
.admin-table {
  min-width: 100%;
}
.admin-row {
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
}
.admin-table > .admin-row:last-child {
  border-bottom: 0;
}
.admin-row:not(.admin-head):hover {
  background: color-mix(in srgb, var(--bg-surface-2) 55%, transparent);
}
.admin-head {
  padding-top: 8px;
  padding-bottom: 8px;
  color: var(--text-muted);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.admin-row .primary {
  color: var(--text-primary);
  font-weight: 500;
}
.admin-row .num {
  text-align: right;
}
.admin-row .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.admin-row.is-down {
  background: var(--down-surface);
  box-shadow: inset 3px 0 0 var(--down-solid);
}
.admin-row.is-selected {
  background: var(--brand-surface);
  box-shadow: inset 3px 0 0 var(--brand);
}
.row-action {
  text-align: right;
}
.plans-table .admin-row {
  grid-template-columns: minmax(80px, 0.9fr) 80px 72px 96px 70px minmax(140px, 1.4fr) minmax(190px, 2fr) 60px 50px 64px;
  min-width: 1080px;
}
.users-table .admin-row {
  grid-template-columns: minmax(220px, 2.4fr) 90px 150px 120px 110px 70px;
  min-width: 820px;
}
.monitors-table .admin-row {
  grid-template-columns: minmax(240px, 2.4fr) minmax(140px, 1fr) minmax(170px, 1.3fr) 72px 80px;
  min-width: 820px;
}
.monitor-cell,
.status-cell {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.monitor-cell strong {
  color: var(--text-primary);
  font-weight: 500;
}
.status-cell .status {
  justify-self: start;
}
.monitor-cell small,
.status-cell small {
  font-size: var(--fs-meta);
}
.monitor-cell small {
  color: var(--text-secondary);
}
.monitor-cell .chips {
  margin-top: 3px;
}
.owner-link {
  max-width: 100%;
  overflow: hidden;
  color: var(--text-secondary);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.owner-link:hover {
  color: var(--brand-text);
}
.state-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: var(--fs-meta);
  font-weight: 600;
  white-space: nowrap;
}
.state-pill.up {
  border-color: var(--up-border);
  background: var(--up-surface);
  color: var(--up-solid);
}
.state-pill.pending {
  border-color: var(--warn-border);
  background: var(--warn-surface);
  color: var(--warn-solid);
}
.state-pill.down {
  border-color: var(--down-border);
  background: var(--down-surface);
  color: var(--down-solid);
}

/* Customer detail */
.user-detail {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--brand-border);
  background: color-mix(in srgb, var(--bg-inset) 55%, transparent);
}
.user-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.user-detail-head h3 {
  margin: 0;
  font-size: var(--step-1);
  overflow-wrap: anywhere;
}
.user-detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
}
.user-detail-actions {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.plan-adjust {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: var(--fs-meta);
}
.plan-adjust select {
  width: auto;
  min-height: var(--hit);
  padding: 4px 8px;
  font-size: var(--fs-secondary);
}
.user-detail .notice:empty {
  display: none;
}
.facts-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  column-gap: 24px;
  margin-top: 14px;
}
.facts-grid .fact-row:last-child {
  border-bottom: 1px solid var(--border-subtle);
}
.user-detail-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 18px;
}
.user-detail-lists h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: var(--fs-secondary);
}
.mini-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--fs-meta);
}
.mini-row > .truncate {
  display: grid;
}
.mini-row strong {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
}
.mini-row small {
  overflow: hidden;
  font-size: var(--fs-meta);
  text-overflow: ellipsis;
}
.mini-meta {
  color: var(--text-muted);
  font-size: var(--fs-meta);
  white-space: nowrap;
}

/* ==========================================================================
   Theme toggle
   ========================================================================== */
.theme-toggle {
  position: fixed;
  z-index: 30;
  right: var(--space-4);
  bottom: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--hit);
  padding: 0 var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-1);
  color: var(--text-secondary);
  font-size: var(--fs-meta);
  box-shadow: var(--shadow-float);
}
.theme-toggle:hover {
  background: var(--bg-surface-2);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.theme-toggle-indicator {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--on-brand);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 600;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
/* Below desktop the monitor row folds: identity and actions on top, sparklines and labelled stats below. */
@media (max-width: 1279.98px) {
  .monitor-columns {
    display: none;
  }
  .monitor-main {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 16px;
  }
  .monitor-identity {
    grid-column: 1;
    grid-row: 1;
  }
  .monitor-actions {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }
  .monitor-trend,
  .monitor-stats {
    grid-column: 1 / -1;
  }
  .monitor-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
  }
  .monitor-stats div {
    padding-left: 10px;
    border-left: 1px solid var(--border-subtle);
  }
  .monitor-stats dt {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    color: var(--text-muted);
    font-size: var(--fs-meta);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .dash-columns {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767.98px) {
  .app-dashboard {
    gap: 16px;
    padding-top: 20px;
  }
  .dash-header {
    align-items: stretch;
    flex-direction: column;
  }
  .dash-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .dash-actions #new-monitor {
    grid-row: 1;
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .stat-tile {
    padding: 12px 14px;
  }
  .stat-value {
    font-size: var(--step-2);
  }
  .stat-headline {
    font-size: var(--fs-body);
  }
  .stat-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .plan-popover > div {
    right: auto;
    left: -6px;
  }
  .panel-head,
  .monitor,
  .history,
  .agent-strip {
    padding-right: 14px;
    padding-left: 14px;
  }
  .monitor-name strong {
    white-space: normal;
  }
  .monitor-tools,
  #monitor-search {
    width: 100%;
  }
  .agent-strip-head .panel-copy {
    flex-basis: 100%;
    margin-left: 0;
  }
  .run-check {
    padding: 4px 8px;
  }
  .incident-head,
  .incident-row,
  .report-head,
  .report-row,
  .maintenance-list .incident-row {
    padding-right: 14px;
    padding-left: 14px;
  }
}
@media (max-width: 767.98px) {
  .stat-grid,
  .app-dashboard.admin-dashboard .stat-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1279.98px) {
  .admin-dashboard .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-columns {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 767.98px) {
  .footer-main,
  .footer-bottom {
    display: grid;
    gap: 24px;
  }
  .footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
  .upgrade {
    display: grid;
    gap: 8px;
  }
  .empty-state {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 18px;
  }
  .admin-filters {
    width: 100%;
  }
  .admin-filters input,
  .admin-filters select,
  .admin-filters input[type="search"] {
    flex: 1 1 140px;
    min-width: 0;
  }
  .admin-row,
  .panel-body,
  .user-detail {
    padding-right: 14px;
    padding-left: 14px;
  }
  .user-detail-lists {
    grid-template-columns: 1fr;
  }
  /* Customer and monitor rows stack into cards so status never needs a sideways scroll. */
  .users-table .admin-row,
  .monitors-table .admin-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    min-width: 0;
  }
  .users-table .admin-head,
  .monitors-table .admin-head {
    display: none;
  }
  .users-table .admin-row > :first-child,
  .monitors-table .admin-row > :first-child {
    flex-basis: 100%;
  }
  .users-table .row-action {
    margin-left: auto;
  }
  .monitors-table .owner-link {
    max-width: 60vw;
  }
  .team-form {
    grid-template-columns: 1fr;
  }
  .team-form > button {
    width: 100%;
  }
  .theme-toggle {
    right: 14px;
    bottom: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
/* Public status page */
.status-shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 40px;
}
.status-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 20px;
}
.status-header h1 {
  margin: 0;
  font-size: var(--step-2);
  overflow-wrap: anywhere;
}
.status-updated {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-meta);
}
.status-banner {
  margin-bottom: 28px;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--bg-inset);
  color: var(--text-secondary);
  font-weight: 600;
}
.status-banner.up {
  border-color: var(--up-border);
  background: var(--up-surface);
  color: var(--up-solid);
}
.status-banner.down {
  border-color: var(--down-border);
  background: var(--down-surface);
  color: var(--down-solid);
}
.status-monitors {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border-subtle);
}
.status-service {
  display: grid;
  gap: 10px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.status-service-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.status-service h2 {
  margin: 0;
  font-size: var(--fs-body);
  overflow-wrap: anywhere;
}
.status-service-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-meta);
}
.status-footer {
  margin-top: 40px;
  text-align: center;
}
.status-footer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: var(--fs-meta);
  text-decoration: none;
}
.status-footer img {
  height: 18px;
  width: auto;
}
.status-footer a:hover {
  color: var(--text-secondary);
}
.status-incidents {
  margin-top: 36px;
}
.status-incidents h2 {
  margin: 0 0 12px;
  font-size: var(--fs-body);
}
.status-incidents-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-secondary);
}
.status-incident {
  padding: 12px 0 12px 14px;
  border-left: 2px solid var(--border-strong);
}
.status-incident + .status-incident {
  margin-top: 8px;
}
.status-incident.ongoing {
  border-left-color: var(--down-solid);
}
.status-incident-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.status-incident h3 {
  margin: 0;
  font-size: var(--fs-secondary);
  overflow-wrap: anywhere;
}
.status-incident-head span {
  color: var(--text-muted);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status-incident.ongoing .status-incident-head span {
  color: var(--down-solid);
}
.status-incident p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: var(--fs-meta);
}

@media (max-width: 767.98px) {
  .incident-head {
    display: none;
  }
  .incident-row {
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
  }
  .report-head,
  .report-row {
    grid-template-columns: 1.6fr repeat(3, 1fr);
  }
  /* Checks and average response drop out on phones; uptime, incidents and downtime stay. */
  .report-head span:nth-child(2),
  .report-row span:nth-child(2),
  .report-head span:nth-child(6),
  .report-row span:nth-child(6) {
    display: none;
  }
}

/* Billing period switch and trial notes */
.billing-interval {
  display: inline-flex;
  margin: 16px 0 4px;
  padding: 3px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--bg-inset);
}
.billing-interval[hidden] {
  display: none;
}
.billing-interval button {
  padding: 6px 14px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
  font-weight: 600;
  cursor: pointer;
}
.billing-interval button[aria-pressed="true"] {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}
.billing-interval button span {
  margin-left: 6px;
  color: var(--up-solid);
  font-size: var(--fs-meta);
}
.price .price-note {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-meta);
  font-weight: 500;
  letter-spacing: 0;
}
.pricing-trial,
.signup-trial {
  margin: 0 0 8px;
  color: var(--up-solid);
  font-size: var(--fs-secondary);
  font-weight: 600;
}
.pricing-included {
  max-width: 72ch;
  margin-top: 24px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Monthly client report (always light: it is printed and sent to clients) */
.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  max-width: 820px;
  margin: 0 auto;
  padding: 16px;
  font-size: var(--fs-secondary);
}
.report-toolbar a {
  color: var(--text-secondary);
  text-decoration: none;
}
.report-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 0 auto;
}
.report-toolbar select {
  width: auto;
}
.report-sheet {
  max-width: 820px;
  margin: 0 auto 40px;
  padding: 40px clamp(16px, 5vw, 48px);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-surface-1);
}
.report-brand img {
  display: block;
  max-width: 220px;
  max-height: 48px;
  margin-bottom: 24px;
}
.report-brand strong {
  display: block;
  margin-bottom: 24px;
  font-size: var(--step-1);
}
.report-sheet h1 {
  margin: 4px 0 8px;
  font-size: var(--step-3);
}
.report-sheet h2 {
  margin: 32px 0 10px;
  font-size: var(--fs-body);
}
.report-note {
  margin: 0 0 8px;
  color: var(--warn-solid);
  font-size: var(--fs-secondary);
}
.report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.report-summary div {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 6px;
  background: var(--bg-inset);
}
.report-summary span {
  color: var(--text-muted);
  font-size: var(--fs-meta);
}
.report-summary strong {
  font-size: var(--step-1);
}
.report-sheet table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-secondary);
}
.report-sheet th,
.report-sheet td {
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: top;
}
.report-sheet th {
  color: var(--text-muted);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.report-empty {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
}
.report-footer {
  margin: 40px 0 0;
  color: var(--text-muted);
  font-size: var(--fs-meta);
}
@media (max-width: 767.98px) {
  .report-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-toolbar label {
    margin-left: 0;
  }
}
@media print {
  .report-toolbar {
    display: none;
  }
  .report-page {
    background: #fff;
  }
  .report-sheet {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
  }
  .report-sheet tr {
    break-inside: avoid;
  }
}
.client-reports {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 14px 18px;
  border-top: 1px solid var(--border-subtle);
}
.client-reports p {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
}
.client-reports-actions {
  display: flex;
  gap: 8px;
}
.client-reports-actions [hidden] {
  display: none;
}
.status-incident.maintenance.ongoing {
  border-left-color: var(--warn-solid);
}
.status-incident.maintenance.ongoing .status-incident-head span {
  color: var(--warn-solid);
}
.maintenance-monitors {
  display: grid;
  gap: 8px;
  width: 100%;
  padding-left: 22px;
}
.maintenance-monitors[hidden] {
  display: none;
}
.heartbeat-fail-hint {
  flex-basis: 100%;
}
.heartbeat-fail-hint code {
  padding: 1px 4px;
}
