:root {
  color-scheme: dark;
  --sb-bg: #0a0a0b;
  --sb-bg-soft: #0d0d10;
  --sb-line: rgba(255, 255, 255, 0.1);
  --sb-line-soft: rgba(255, 255, 255, 0.06);
  --sb-text: #f9fafb;
  --sb-soft: rgba(249, 250, 251, 0.74);
  --sb-muted: rgba(249, 250, 251, 0.52);
  --sb-faint: rgba(249, 250, 251, 0.36);
  --sb-panel: rgba(255, 255, 255, 0.035);
  --sb-panel-hover: rgba(255, 255, 255, 0.055);
  --sb-brand: #8b8cff;
  --sb-brand-soft: rgba(139, 140, 255, 0.18);
  --sb-brand-line: rgba(139, 140, 255, 0.38);
  --sb-brand-2: #4fd1c5;
  --sb-green: #34d399;
  --sb-blue: #60a5fa;
  --sb-amber: #fbbf24;
  --sb-orange: #fb923c;
  --sb-red: #f87171;
  --sb-radius: 8px;
}

body.status-board-page {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(139, 140, 255, 0.035) 0, rgba(10, 10, 11, 0) 320px),
    var(--sb-bg);
  color: var(--sb-text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  max-width: 100%;
  overflow-x: hidden;
}

.status-shell,
.status-shell *,
.status-shell *::before,
.status-shell *::after {
  box-sizing: border-box;
  min-width: 0;
}

body.status-board-page a {
  color: inherit;
}

body.status-board-page header a.bg-white {
  min-height: 34px !important;
  padding: 0 18px !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  border: 1px solid #ffffff !important;
  color: #111111 !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 34px !important;
}

body.status-board-page header a.bg-white:hover,
body.status-board-page header a.bg-white:focus-visible {
  background: #f3f4f6 !important;
  border-color: #f3f4f6 !important;
  color: #111111 !important;
}

.status-shell {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 76px;
}

.status-local-nav {
  margin-bottom: 18px;
  border-bottom: 1px solid var(--sb-line-soft);
}

.status-local-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 56px;
}

.status-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  color: var(--sb-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.status-brand img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.status-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.status-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  color: var(--sb-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0;
  transition: color 0.16s ease;
}

.status-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
}

.status-nav a:hover,
.status-nav a.is-active {
  color: var(--sb-text);
}

.status-nav a.is-active::after {
  background: var(--sb-brand);
}

.status-banner {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 42px 0 30px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--sb-line-soft);
}

.status-banner::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 0;
  width: 140px;
  height: 1px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--sb-brand-line), rgba(79, 209, 197, 0.24), transparent);
}

.status-banner__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  color: var(--sb-soft);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.status-banner__eyebrow-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--sb-brand);
  box-shadow: 0 0 0 4px rgba(139, 140, 255, 0.09);
}

.status-banner h1 {
  margin: 0;
  max-width: 860px;
  color: #ffffff;
  font-size: 48px;
  line-height: 1.06;
  font-weight: 880;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.status-banner p {
  margin: 0;
  max-width: 740px;
  color: var(--sb-soft);
  font-size: 15px;
  line-height: 1.75;
}

.status-banner__meta,
.status-actions,
.component-meta,
.history-meta,
.uptime-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.status-chip,
.status-pill,
.status-metric {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--sb-line);
  border-radius: var(--sb-radius);
  background: rgba(255, 255, 255, 0.025);
  color: var(--sb-soft);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.status-metric {
  background: transparent;
}

.status-pill {
  justify-content: center;
  white-space: nowrap;
}

.status-actions {
  margin-top: 2px;
}

.status-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  border-radius: var(--sb-radius);
  border: 1px solid var(--sb-line);
  text-decoration: none;
  font: inherit;
  font-size: 13px;
  font-weight: 820;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.status-btn--primary {
  color: #ffffff;
  background: rgba(139, 140, 255, 0.14);
  border-color: rgba(139, 140, 255, 0.34);
}

.status-btn--primary:hover,
.status-btn--primary:focus-visible {
  color: #ffffff;
  background: rgba(139, 140, 255, 0.22);
  border-color: rgba(139, 140, 255, 0.5);
}

.status-btn--secondary {
  color: var(--sb-text);
  background: transparent;
}

.status-btn--secondary:hover,
.status-btn--secondary:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 22px 0 38px;
  border-top: 1px solid var(--sb-line-soft);
  border-bottom: 1px solid var(--sb-line-soft);
}

.status-card {
  min-height: 122px;
  padding: 22px 22px 20px 0;
  border-right: 1px solid var(--sb-line-soft);
}

.status-card + .status-card {
  padding-left: 22px;
}

.status-card:last-child {
  border-right: 0;
  padding-right: 0;
}

.status-card__label {
  margin-bottom: 12px;
  color: var(--sb-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.status-card__value {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 880;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.status-card__meta {
  margin: 0;
  color: var(--sb-soft);
  font-size: 13px;
  line-height: 1.6;
}

.status-notices {
  display: grid;
  gap: 10px;
  margin: -18px 0 36px;
}

.status-notice {
  padding: 13px 15px;
  border-left: 2px solid var(--sb-amber);
  border-radius: 0 var(--sb-radius) var(--sb-radius) 0;
  background: rgba(255, 255, 255, 0.03);
  color: var(--sb-soft);
  font-size: 14px;
  line-height: 1.6;
}

.status-notice--warning {
  border-left-color: var(--sb-amber);
  background: rgba(251, 191, 36, 0.06);
}

.status-notice--error {
  border-left-color: var(--sb-red);
  background: rgba(248, 113, 113, 0.07);
}

.status-notice--success {
  border-left-color: var(--sb-green);
  background: rgba(52, 211, 153, 0.06);
}

.status-section {
  margin-bottom: 46px;
}

.status-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--sb-line);
}

.status-section__head h2 {
  margin: 0;
  color: #ffffff;
  font-size: 23px;
  line-height: 1.25;
  font-weight: 850;
  letter-spacing: 0;
}

.status-section__head p {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--sb-muted);
  font-size: 14px;
  line-height: 1.65;
}

.status-section__link {
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 820;
  white-space: nowrap;
}

.status-section__link:hover {
  text-decoration: underline;
}

.component-list,
.status-stack,
.status-day-list {
  display: grid;
}

.status-row,
.status-day {
  padding: 20px 0;
  border-bottom: 1px solid var(--sb-line-soft);
}

.status-row:hover,
.status-day:hover {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0));
}

.component-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(178px, auto);
  gap: 22px;
  align-items: start;
}

.component-title,
.event-title,
.status-day__title {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 820;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.component-meta {
  margin-top: 10px;
}

.component-note {
  margin-top: 12px;
  color: var(--sb-soft);
  font-size: 14px;
  line-height: 1.65;
}

.component-aside {
  display: grid;
  gap: 10px;
  justify-items: end;
  text-align: right;
}

.component-aside strong {
  display: block;
  color: #ffffff;
  font-size: 21px;
  line-height: 1;
  font-weight: 880;
  letter-spacing: 0;
}

.component-aside span {
  color: var(--sb-muted);
  font-size: 12px;
}

.uptime-block {
  margin-top: 16px;
}

.uptime-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: var(--sb-muted);
  font-size: 12px;
  line-height: 1.4;
}

.uptime-strip {
  display: grid;
  grid-template-columns: repeat(var(--uptime-columns, 90), minmax(0, 1fr));
  gap: 2px;
}

.uptime-cell {
  height: 25px;
  min-width: 2px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.uptime-cell.is-operational {
  background: rgba(52, 211, 153, 0.95);
}

.uptime-cell.is-maintenance {
  background: rgba(96, 165, 250, 0.92);
}

.uptime-cell.is-degraded {
  background: rgba(251, 191, 36, 0.95);
}

.uptime-cell.is-partial_outage {
  background: rgba(251, 146, 60, 0.95);
}

.uptime-cell.is-major_outage {
  background: rgba(248, 113, 113, 0.95);
}

.uptime-cell.is-no_data {
  background: rgba(255, 255, 255, 0.1);
}

.uptime-legend {
  margin-top: 14px;
}

.uptime-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sb-muted);
  font-size: 12px;
}

.uptime-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.tone-operational {
  color: #bbf7d0;
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.28);
}

.tone-maintenance {
  color: #dbeafe;
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.28);
}

.tone-degraded {
  color: #fef3c7;
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
}

.tone-partial_outage {
  color: #ffedd5;
  background: rgba(251, 146, 60, 0.1);
  border-color: rgba(251, 146, 60, 0.3);
}

.tone-major_outage {
  color: #fee2e2;
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.32);
}

.tone-no_data {
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.12);
}

.status-empty {
  padding: 18px 0;
  border-bottom: 1px solid var(--sb-line-soft);
  color: var(--sb-soft);
  font-size: 14px;
  line-height: 1.7;
}

.status-feed-url,
.status-feed-input {
  display: block;
  width: 100%;
  margin-top: 2px;
  padding: 13px 14px;
  border: 1px solid var(--sb-line);
  border-radius: var(--sb-radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--sb-soft);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
  min-width: 0;
}

.status-feed-input:focus {
  outline: 2px solid rgba(52, 211, 153, 0.36);
  outline-offset: 2px;
  border-color: rgba(52, 211, 153, 0.45);
}

.event-meta,
.history-copy {
  color: var(--sb-soft);
  font-size: 14px;
  line-height: 1.65;
}

.history-meta {
  margin-bottom: 10px;
  color: var(--sb-muted);
  font-size: 12px;
  line-height: 1.5;
}

.status-day__title {
  margin-bottom: 12px;
}

.status-history-item + .status-history-item {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--sb-line-soft);
}

.status-footer {
  display: none;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 980px) {
  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-card:nth-child(2n) {
    border-right: 0;
    padding-right: 0;
  }

  .status-card:nth-child(n + 3) {
    border-top: 1px solid var(--sb-line-soft);
  }

  .component-row {
    grid-template-columns: 1fr;
  }

  .component-aside {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .status-shell {
    width: min(100% - 24px, 1160px);
    padding-top: 22px;
    padding-bottom: 58px;
  }

  .status-local-nav__inner {
    align-items: stretch;
    flex-direction: column;
    min-height: 0;
    padding-bottom: 10px;
  }

  .status-nav {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 16px;
  }

  .status-nav a {
    min-width: max-content;
  }

  .status-banner {
    padding: 34px 0 28px;
  }

  .status-banner::before {
    left: 0;
    top: 16px;
    bottom: auto;
  }

  .status-banner h1 {
    font-size: clamp(2.15rem, 10vw, 2.75rem);
    line-height: 1.08;
  }

  .status-banner p {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .status-banner__meta,
  .status-actions,
  .component-meta,
  .history-meta,
  .uptime-legend {
    align-items: stretch;
  }

  .status-chip,
  .status-metric,
  .status-pill {
    white-space: normal;
  }

  .status-actions {
    flex-direction: column;
  }

  .status-btn {
    width: 100%;
    min-height: 46px;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .status-card,
  .status-card + .status-card,
  .status-card:last-child,
  .status-card:nth-child(2n) {
    padding: 18px 0;
    border-right: 0;
    border-top: 1px solid var(--sb-line-soft);
  }

  .status-card:first-child {
    border-top: 0;
  }

  .status-section__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .status-section__link {
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .status-row,
  .status-day {
    padding: 18px 0;
  }

  .uptime-block__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .uptime-cell {
    height: 20px;
  }
}

@media (max-width: 420px) {
  .status-shell {
    width: min(100% - 20px, 1160px);
  }

  .status-nav {
    margin-left: -10px;
    margin-right: -10px;
    padding: 0 10px 6px;
  }

  .status-banner {
    padding: 30px 0 24px;
  }

  .status-card__value {
    font-size: 25px;
  }

  .component-aside {
    width: 100%;
  }

  .component-aside .status-pill {
    width: 100%;
  }

  .uptime-strip {
    gap: 1px;
  }

  .uptime-cell {
    height: 18px;
    border-radius: 2px;
  }
}
