/* Stageroom status page. Colours, spacing, radii and type sizes are the values of Stageroom's design tokens
   (packages/design-system/tokens.css in the main repository), copied here because this page must not depend on
   stage-room.com. Fonts: the token stacks, with no web font loaded, so the system fallback is used. */

:root {
  --neutral-0: #ffffff;
  --neutral-50: #f9fafb;
  --neutral-100: #f2f3f5;
  --neutral-200: #dee0e3;
  --neutral-400: #9b9fa3;
  --neutral-500: #777b80;
  --neutral-600: #5a5e63;
  --neutral-800: #2e3034;
  --neutral-850: #232529;
  --neutral-900: #191b1e;
  --neutral-950: #0f1114;
  --orange-400: #ff836b;
  --orange-600: #d3391d;
  --green-100: #d5f8eb;
  --green-300: #6fe7c5;
  --green-400: #0cd6ac;
  --green-700: #076450;
  --green-900: #092d24;
  --amber-100: #fff0d7;
  --amber-300: #ffcf7d;
  --amber-400: #fdba2f;
  --amber-700: #815c0a;
  --amber-900: #34260c;
  --red-100: #fee4e4;
  --red-300: #f88d92;
  --red-600: #c12440;
  --red-900: #3f191b;
  --blue-100: #e3f0fe;
  --blue-300: #8cc3fc;
  --blue-600: #006ebe;
  --blue-900: #12283e;

  --bg: var(--neutral-50);
  --surface: var(--neutral-0);
  --surface-sunken: var(--neutral-100);
  --border: var(--neutral-200);
  --border-strong: var(--neutral-500);
  --text: var(--neutral-950);
  --text-muted: var(--neutral-600);
  --accent-text: var(--orange-600);
  --focus-ring: var(--orange-600);
  --success: var(--green-700);
  --success-subtle: var(--green-100);
  --success-solid: var(--green-400);
  --warning: var(--amber-700);
  --warning-subtle: var(--amber-100);
  --warning-solid: var(--amber-400);
  --danger: var(--red-600);
  --danger-subtle: var(--red-100);
  --danger-solid: var(--red-600);
  --info: var(--blue-600);
  --info-subtle: var(--blue-100);
  --shadow-sm: 0 1px 2px rgba(15, 17, 20, 0.06), 0 1px 1px rgba(15, 17, 20, 0.04);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --radius-xs: 4px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --duration-fast: 160ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --font-display: Outfit, "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-text: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--neutral-950);
    --surface: var(--neutral-900);
    --surface-sunken: var(--neutral-950);
    --border: var(--neutral-800);
    --border-strong: var(--neutral-500);
    --text: var(--neutral-50);
    --text-muted: var(--neutral-400);
    --accent-text: var(--orange-400);
    --focus-ring: var(--orange-400);
    --success: var(--green-300);
    --success-subtle: var(--green-900);
    --warning: var(--amber-300);
    --warning-subtle: var(--amber-900);
    --danger: var(--red-300);
    --danger-subtle: var(--red-900);
    --info: var(--blue-300);
    --info-subtle: var(--blue-900);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 22px;
  overflow-wrap: anywhere;
}

a { color: var(--accent-text); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-xs); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; }
h1 { font-size: 32px; line-height: 38px; letter-spacing: -0.01em; }
h2 { font-size: 20px; line-height: 26px; margin-bottom: var(--space-3); }
h3 { font-size: 16px; line-height: 22px; }
p { margin: 0 0 var(--space-2); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 var(--space-4); }

/* Header and footer */
.top { border-bottom: 1px solid var(--border); background: var(--surface); }
.top-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); padding-top: var(--space-3); padding-bottom: var(--space-3); }
.home { display: inline-flex; }
.logo { display: block; height: 28px; width: auto; }
.langs ul { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); list-style: none; margin: 0; padding: 0; }
.langs a { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-muted); text-decoration: none; padding: var(--space-1) 0; display: inline-block; }
.langs a:hover { color: var(--text); text-decoration: underline; }
.langs a[aria-current="page"] { color: var(--text); text-decoration: underline; text-decoration-thickness: 2px; }

.foot { border-top: 1px solid var(--border); margin-top: var(--space-12); padding: var(--space-6) 0 var(--space-8); color: var(--text-muted); font-size: 13px; line-height: 18px; }

/* Intro */
.intro { padding: var(--space-8) 0 var(--space-6); }
.eyebrow { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--space-2); }
.lead { font-size: 18px; line-height: 28px; color: var(--text-muted); margin-top: var(--space-2); }
.muted { color: var(--text-muted); }
.caption { font-size: 13px; line-height: 18px; color: var(--text-muted); }
.plain { list-style: none; padding: 0; }

/* Cards */
.card, .banner, .incident-ongoing {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}
@media (min-width: 560px) {
  .card, .banner, .incident-ongoing { padding: var(--space-6); }
}

/* Overall banner: icon + word + colour, never colour alone */
.banner { display: flex; gap: var(--space-3); align-items: flex-start; border-width: 2px; }
.banner-icon { flex: none; width: 28px; height: 28px; }
.banner-title { font-size: 24px; line-height: 30px; margin-bottom: var(--space-1); }
.banner-text { margin-bottom: var(--space-1); }
.banner-time { font-size: 13px; line-height: 18px; color: var(--text-muted); margin: 0; }
.banner-up { border-color: var(--success); }
.banner-up .banner-icon { color: var(--success); }
.banner-degraded { border-color: var(--warning); background: var(--warning-subtle); }
.banner-degraded .banner-icon { color: var(--warning); }
.banner-down { border-color: var(--danger); background: var(--danger-subtle); }
.banner-down .banner-icon { color: var(--danger); }
.banner-unknown { border-color: var(--border-strong); }
.banner-unknown .banner-icon { color: var(--text-muted); }
.stale { font-size: 13px; line-height: 18px; margin: var(--space-2) 0 0; color: var(--warning); font-weight: 500; }

/* Components */
.components { list-style: none; margin: 0; padding: 0; }
.component { padding: var(--space-4) 0; border-top: 1px solid var(--border); }
.component:first-child { border-top: 0; padding-top: 0; }
.c-line { display: flex; gap: var(--space-2); align-items: flex-start; font-family: var(--font-text); font-weight: 400; font-size: 15px; line-height: 22px; }
.c-line .icon { flex: none; margin-top: 1px; }
.c-name { font-weight: 600; }
.c-state { font-weight: 600; }
.component-up .c-icon, .component-up .c-state { color: var(--success); }
.component-degraded .c-icon, .component-degraded .c-state { color: var(--warning); }
.component-down .c-icon, .component-down .c-state { color: var(--danger); }
.component-unknown .c-icon, .component-none .c-icon { color: var(--text-muted); }
.c-details { font-size: 13px; line-height: 18px; color: var(--text-muted); margin: var(--space-1) 0 var(--space-3) 28px; font-variant-numeric: tabular-nums; }

/* 90 days as bars. Level by colour AND height: full = no downtime, 60% = under an hour, 30% = an hour or more,
   a low stub = no data. */
.bars { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 1px; align-items: end; height: 32px; list-style: none; margin: 0; padding: 0; }
.bar { display: block; height: 100%; border-radius: 1px; background: var(--success-solid); }
.bar-partial { height: 60%; background: var(--warning-solid); }
.bar-major { height: 30%; background: var(--danger-solid); }
.bar-none { height: 15%; background: var(--border-strong); }
.bar-ends { display: flex; justify-content: space-between; gap: var(--space-2); font-size: 12px; line-height: 16px; color: var(--text-muted); margin-top: var(--space-1); font-variant-numeric: tabular-nums; }
.bar-ends .window { text-align: center; }
.bar-ends .short { display: none; }
@media (max-width: 559px) {
  .bars { grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 2px; }
  .bars .bar:nth-child(-n + 60) { display: none; }
  .bar-ends .long { display: none; }
  .bar-ends .short { display: inline; }
  .bar-ends .window { display: none; }
}

.legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); list-style: none; padding: 0; margin: var(--space-2) 0 0; font-size: 13px; line-height: 18px; color: var(--text-muted); }
.legend li { display: inline-flex; align-items: flex-end; gap: var(--space-2); }
.legend-bar { width: 6px; height: 16px; }
.legend-bar.bar-partial { height: 10px; }
.legend-bar.bar-major { height: 5px; }
.legend-bar.bar-none { height: 3px; }

/* Live check */
.live-list { list-style: none; padding: 0; margin: var(--space-3) 0; }
.live-row { display: flex; gap: var(--space-2); align-items: flex-start; padding: var(--space-1) 0; }
.live-host { font-weight: 600; }
.live-i { display: none; flex: none; margin-top: 1px; }
.live-row[data-state="checking"] .live-i-checking { display: block; color: var(--text-muted); }
.live-row[data-state="ok"] .live-i-ok { display: block; color: var(--success); }
.live-row[data-state="fail"] .live-i-fail { display: block; color: var(--danger); }
.live-row[data-state="ok"] .live-result { color: var(--success); font-weight: 600; }
.live-row[data-state="fail"] .live-result { color: var(--danger); font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: var(--space-2) var(--space-4);
  font: inherit; font-size: 14px; font-weight: 500; line-height: 20px;
  color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  cursor: pointer; text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease-standard);
}
.btn:hover { background: var(--surface-sunken); }

/* Incidents */
.incident { padding: var(--space-4) 0; border-top: 1px solid var(--border); }
.card .incident:first-of-type { border-top: 0; padding-top: 0; }
.incident.incident-ongoing { border: 2px solid var(--danger); padding: var(--space-4); }
@media (min-width: 560px) {
  .incident.incident-ongoing { padding: var(--space-6); }
}
.incident-meta { font-size: 13px; line-height: 18px; color: var(--text-muted); margin: var(--space-2) 0; }
.badge { display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px var(--space-2); border-radius: var(--radius-full); font-size: 12px; line-height: 16px; font-weight: 600; }
.badge-icon { width: 14px; height: 14px; }
.badge-investigating { background: var(--danger-subtle); color: var(--danger); }
.badge-identified { background: var(--warning-subtle); color: var(--warning); }
.badge-monitoring { background: var(--info-subtle); color: var(--info); }
.badge-resolved { background: var(--success-subtle); color: var(--success); }
.updates { list-style: none; padding: 0; margin: var(--space-3) 0 0; }
.updates li { padding-left: var(--space-3); border-left: 2px solid var(--border); margin-bottom: var(--space-3); }
.updates time { display: block; font-size: 13px; line-height: 18px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.update-text p:last-child { margin-bottom: 0; }

.how ul { margin: 0; padding-left: var(--space-6); color: var(--text-muted); }
.how li { margin-bottom: var(--space-2); }

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