/*
 * Public status page (/status, /status/history, /status/incidents/{id}). Loaded after
 * home-minimal.css, which resets margins globally. Same top bar and pills as the legal pages.
 * Status is never shown by color alone: every color comes with an icon and a written label.
 */
:root {
  --st-ink: #0f172a;
  --st-ink-2: #334155;
  --st-muted: #64748b;
  --st-line: #e2e8f0;
  --st-surface: #ffffff;
  --st-soft: #f1f5f9;
  --st-blue: #0074ff;
  --st-radius: 18px;
  --st-max: 920px;

  --st-ok: #16a34a;
  --st-ok-text: #15803d;
  --st-ok-soft: #f0fdf4;
  --st-minor: #eab308;
  --st-minor-text: #a16207;
  --st-minor-soft: #fefce8;
  --st-partial: #f97316;
  --st-partial-text: #c2410c;
  --st-partial-soft: #fff7ed;
  --st-major: #dc2626;
  --st-major-text: #b91c1c;
  --st-major-soft: #fef2f2;
  --st-maint: #0074ff;
  --st-maint-text: #005fd1;
  --st-maint-soft: #eef5ff;
  --st-none: #e2e8f0;
}

.st-skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 50;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--st-ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.st-skip:focus { top: 12px; }

/* Top bar */
.st-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px max(16px, calc((100% - var(--st-max)) / 2));
  background: rgba(250, 250, 250, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.st-bar__brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.st-bar__brand img { display: block; height: 22px; width: auto; }
.st-bar__label {
  padding-left: 10px;
  border-left: 1px solid #cbd5e1;
  color: var(--st-ink-2);
  font-weight: 600;
  font-size: 0.9375rem;
}
.st-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: #ececf0; }
.st-seg a {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--st-ink-2);
  text-decoration: none;
  white-space: nowrap;
}
.st-seg a:hover { color: var(--st-ink); }
.st-seg a[aria-current="page"] { background: var(--st-surface); color: var(--st-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }

/* Page */
.st {
  width: 100%;
  max-width: calc(var(--st-max) + 32px);
  margin: 0 auto;
  padding: 32px 16px 56px;
}
.st--narrow { max-width: calc(760px + 32px); }
.st a { color: var(--st-blue); }
.st h1 { max-width: none; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.st-muted { color: var(--st-muted); }

.st-notice {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.st-notice--warn { background: var(--st-minor-soft); border: 1px solid #f5d58a; color: var(--st-ink); }

/* Overall status */
.st-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  border-radius: var(--st-radius);
  border: 1px solid var(--st-line);
  background: var(--st-surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.st-hero h1 {
  margin: 0;
  font-size: clamp(1.375rem, 4vw, 1.875rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.st-hero__meta { margin-top: 4px; color: var(--st-muted); font-size: 0.875rem; }
.st-hero .st-icon { width: 44px; height: 44px; flex: none; }
.st-hero .st-icon svg { width: 26px; height: 26px; }
.st-hero--ok { background: var(--st-ok-soft); border-color: #bbf7d0; }
.st-hero--minor { background: var(--st-minor-soft); border-color: #fde68a; }
.st-hero--partial { background: var(--st-partial-soft); border-color: #fed7aa; }
.st-hero--major { background: var(--st-major-soft); border-color: #fecaca; }
.st-hero--maint { background: var(--st-maint-soft); border-color: #cfe2ff; }

/* Icons and dots */
.st-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  color: #fff;
  flex: none;
}
.st-icon svg { width: 14px; height: 14px; }
.st-icon--ok { background: var(--st-ok); }
.st-icon--minor { background: var(--st-minor); color: #422006; }
.st-icon--partial { background: var(--st-partial); }
.st-icon--major { background: var(--st-major); }
.st-icon--maint { background: var(--st-maint); }
.st-icon--unknown { background: #94a3b8; }

.st-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.st-dot--ok { background: var(--st-ok); }
.st-dot--minor { background: var(--st-minor); }
.st-dot--partial { background: var(--st-partial); }
.st-dot--major { background: var(--st-major); }
.st-dot--maint { background: var(--st-maint); }

.st-text--ok { color: var(--st-ok-text); }
.st-text--minor { color: var(--st-minor-text); }
.st-text--partial { color: var(--st-partial-text); }
.st-text--major { color: var(--st-major-text); }
.st-text--maint { color: var(--st-maint-text); }
.st-text--unknown { color: var(--st-muted); }

/* Sections */
.st-section { margin-top: 40px; }
.st-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
}
.st-section__head .st-h2 { margin-bottom: 0; }
.st-h2 {
  margin-bottom: 14px;
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--st-ink);
}
.st-sub { margin-top: 4px; color: var(--st-muted); font-size: 0.9375rem; line-height: 1.5; }
.st-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--st-muted); font-size: 0.8125rem; }
.st-more { font-size: 0.9375rem; font-weight: 600; text-decoration: none; }
.st-more:hover { text-decoration: underline; }
.st-empty[hidden] { display: none; }
.st-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border: 1px solid var(--st-line);
  border-radius: 14px;
  background: var(--st-surface);
  color: var(--st-ink-2);
}

/* Chips and pills */
.st-chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--st-soft);
  color: var(--st-ink-2);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}
.st-chip--line { background: transparent; box-shadow: inset 0 0 0 1px var(--st-line); }
.st-chip--ok { background: var(--st-ok-soft); color: var(--st-ok-text); }
.st-chip--minor { background: var(--st-minor-soft); color: var(--st-minor-text); }
.st-chip--partial { background: var(--st-partial-soft); color: var(--st-partial-text); }
.st-chip--major { background: var(--st-major-soft); color: var(--st-major-text); }
.st-chip--maint { background: var(--st-maint-soft); color: var(--st-maint-text); }
.st-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--st-line);
  border-radius: 999px;
  background: var(--st-surface);
  color: var(--st-ink-2) !important;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}
.st-pill:hover { border-color: #cbd5e1; color: var(--st-ink) !important; }

/* Incidents and maintenance */
.st-incident {
  margin-bottom: 14px;
  padding: 20px 24px;
  border: 1px solid var(--st-line);
  border-left: 4px solid var(--st-muted);
  border-radius: 14px;
  background: var(--st-surface);
}
.st-incident--ok { border-left-color: var(--st-ok); }
.st-incident--minor { border-left-color: var(--st-minor); }
.st-incident--partial { border-left-color: var(--st-partial); }
.st-incident--major { border-left-color: var(--st-major); }
.st-incident--maint { border-left-color: var(--st-maint); }
.st-incident__kind { color: var(--st-muted); font-size: 0.8125rem; font-weight: 600; }
.st-incident h3 { margin-top: 6px; font-size: 1.125rem; line-height: 1.35; }
.st-incident h3 a { color: var(--st-ink); text-decoration: none; }
.st-incident h3 a:hover { color: var(--st-blue); }
.st-incident__window, .st-incident__affects { margin-top: 8px; color: var(--st-ink-2); font-size: 0.9375rem; }
.st-incident__affects span { color: var(--st-muted); }

.st-timeline { list-style: none; margin-top: 14px; border-left: 2px solid var(--st-line); }
.st-timeline li { position: relative; padding: 0 0 14px 18px; }
.st-timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--st-surface);
  border: 2px solid #94a3b8;
}
.st-timeline li:first-child::before { border-color: var(--st-blue); background: var(--st-blue); }
.st-timeline li:last-child { padding-bottom: 0; }
.st-timeline__meta { font-size: 0.875rem; color: var(--st-muted); }
.st-timeline__meta strong { color: var(--st-ink); margin-right: 6px; }
.st-timeline--full li { padding-bottom: 24px; }

.st-prose { margin-top: 4px; color: var(--st-ink-2); line-height: 1.6; font-size: 0.9688rem; overflow-wrap: anywhere; }
.st-prose p + p { margin-top: 10px; }

/* Components */
.st-group { margin-bottom: 18px; border: 1px solid var(--st-line); border-radius: var(--st-radius); background: var(--st-surface); overflow: hidden; }
.st-group__title {
  padding: 12px 20px;
  background: #f8fafc;
  border-bottom: 1px solid var(--st-line);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--st-muted);
}
.st-components { list-style: none; }
.st-component { padding: 16px 20px 14px; scroll-margin-top: 72px; }
.st-component + .st-component { border-top: 1px solid var(--st-line); }
.st-component__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.st-component__name strong { display: block; color: var(--st-ink); font-size: 1rem; }
.st-component__name span { display: block; margin-top: 2px; color: var(--st-muted); font-size: 0.8125rem; line-height: 1.4; }
.st-component__status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
.st-component__status .st-icon { width: 18px; height: 18px; }
.st-component__status .st-icon svg { width: 12px; height: 12px; }

.st-bars { display: flex; gap: 2px; height: 32px; margin-top: 12px; }
.st-day { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: var(--st-none); }
.st-day--ok { background: var(--st-ok); }
.st-day--minor { background: var(--st-minor); }
.st-day--partial { background: var(--st-partial); }
.st-day--major { background: var(--st-major); }
.st-day--maint { background: var(--st-maint); }
.st-day:hover, .st-day.is-active { opacity: 0.7; }
.st-bars__axis {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  color: var(--st-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}
.st-bars__rule { flex: 1; height: 1px; background: var(--st-line); }
.st-narrow { display: none; }

.st-tip {
  position: fixed;
  z-index: 60;
  max-width: 260px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--st-ink);
  color: #fff;
  font-size: 0.8125rem;
  line-height: 1.45;
  white-space: pre-line;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
}
.st-tip strong { display: block; }

/* Known issues */
.st-filter { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--st-muted); }
.st-filter select {
  padding: 7px 30px 7px 12px;
  border: 1px solid var(--st-line);
  border-radius: 999px;
  background: var(--st-surface);
  color: var(--st-ink);
  font: inherit;
}
.st-issues { list-style: none; display: grid; gap: 12px; }
.st-issue { padding: 18px 20px; border: 1px solid var(--st-line); border-radius: 14px; background: var(--st-surface); scroll-margin-top: 72px; }
.st-issue[hidden] { display: none; }
.st-issue__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.st-issue__title { margin-top: 10px; font-size: 1.0625rem; line-height: 1.35; color: var(--st-ink); }
.st-issue__meta { margin-top: 4px; color: var(--st-muted); font-size: 0.8125rem; line-height: 1.5; }
.st-issue--fixed .st-issue__title { color: var(--st-ink-2); }
.st-workaround { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--st-maint-soft); }
.st-workaround__label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--st-maint-text); }
.st-fixed { margin-top: 14px; }
.st-fixed summary { cursor: pointer; padding: 8px 0; font-weight: 600; color: var(--st-ink-2); }
.st-fixed .st-issues { margin-top: 8px; }

/* Past incidents */
.st-past { list-style: none; border: 1px solid var(--st-line); border-radius: 14px; background: var(--st-surface); overflow: hidden; }
.st-past__item { padding: 16px 20px; border-left: 4px solid var(--st-muted); }
.st-past__item + .st-past__item { border-top: 1px solid var(--st-line); }
.st-past__item--ok { border-left-color: #94a3b8; }
.st-past__item--minor { border-left-color: var(--st-minor); }
.st-past__item--partial { border-left-color: var(--st-partial); }
.st-past__item--major { border-left-color: var(--st-major); }
.st-past__item--maint { border-left-color: var(--st-maint); }
.st-past__item > a { font-weight: 600; color: var(--st-ink); text-decoration: none; }
.st-past__item > a:hover { color: var(--st-blue); text-decoration: underline; }
.st-past__latest { margin-top: 4px; color: var(--st-ink-2); font-size: 0.9375rem; line-height: 1.5; overflow-wrap: anywhere; }
.st-past__meta { margin-top: 4px; color: var(--st-muted); font-size: 0.8125rem; line-height: 1.5; }

/* Incident detail */
.st-crumbs { margin-bottom: 16px; font-size: 0.875rem; color: var(--st-muted); }
.st-crumbs a { text-decoration: none; }
.st-detail { padding: 24px 28px; border: 1px solid var(--st-line); border-top: 4px solid var(--st-muted); border-radius: var(--st-radius); background: var(--st-surface); }
.st-detail--minor { border-top-color: var(--st-minor); }
.st-detail--partial { border-top-color: var(--st-partial); }
.st-detail--major { border-top-color: var(--st-major); }
.st-detail--maint { border-top-color: var(--st-maint); }
.st-detail--ok { border-top-color: #94a3b8; }
.st-detail h1 { margin: 8px 0 0; font-size: clamp(1.5rem, 4.5vw, 2.125rem); letter-spacing: -0.025em; line-height: 1.2; }
.st-facts { display: grid; gap: 10px; margin-top: 18px; }
.st-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; font-size: 0.9375rem; }
.st-facts dt { color: var(--st-muted); }
.st-facts dd { color: var(--st-ink); }
.st-affected { list-style: none; display: grid; gap: 6px; }
.st-affected li { display: flex; align-items: center; gap: 8px; }
.st-affected .st-icon { width: 16px; height: 16px; }
.st-affected .st-icon svg { width: 11px; height: 11px; }
.st-postmortem { padding: 20px 24px; border-radius: 14px; background: var(--st-soft); }

.st-pagehead h1 { margin: 8px 0 0; font-size: clamp(1.75rem, 5vw, 2.5rem); letter-spacing: -0.03em; }
.st-pagehead .st-pill { margin-top: 16px; margin-right: 6px; }
.st-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 28px; color: var(--st-muted); font-size: 0.875rem; }

/* Subscribe */
.st-subscribe {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-radius: var(--st-radius);
  background: var(--st-soft);
  scroll-margin-top: 72px;
}
.st-subscribe h2 { font-size: 1.0625rem; }
.st-subscribe p { margin-top: 4px; max-width: 34rem; color: var(--st-muted); font-size: 0.9375rem; line-height: 1.5; }
.st-subscribe__links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }

.st a:focus-visible, .st-seg a:focus-visible, .st-bar__brand:focus-visible, .st summary:focus-visible, .st select:focus-visible {
  outline: 2px solid var(--st-blue);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (max-width: 640px) {
  .st { padding-top: 20px; }
  .st-bar__label { display: none; }
  .st-seg a { padding: 6px 10px; }
  .st-seg__sub { display: none; }
  .st-hero { padding: 18px; gap: 12px; }
  .st-component { padding: 14px 16px 12px; }
  .st-component__name span { display: none; }
  .st-group__title { padding: 10px 16px; }
  /* The last 30 days only. */
  .st-day:nth-child(-n+60) { display: none; }
  .st-bars { gap: 3px; height: 28px; }
  .st-wide { display: none; }
  .st-narrow { display: inline; }
  .st-incident, .st-detail { padding: 18px; }
  .st-facts div { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: no-preference) {
  .st-day { transition: opacity 0.12s; }
}

@media print {
  .st-bar, .st-subscribe, .st-skip, .af-privacy-banner { display: none !important; }
}
