:root {
  color-scheme: dark;
  --background: #0d0d0d;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-raised: #18181b;
  --border: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.06);
  --text: #f4f4f5;
  --text-soft: #d4d4d8;
  --text-muted: #a1a1aa;
  --brand: #f6c020;
  --brand-hover: #ffd65c;
  --operational: #34d399;
  --operational-text: #6ee7b7;
  --degraded: #fb923c;
  --degraded-text: #fdba74;
  --outage: #f87171;
  --outage-text: #fca5a5;
  --maintenance: #60a5fa;
  --maintenance-text: #93c5fd;
  --none: #3f3f46;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Geist, ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a {
  color: var(--brand);
}

a:hover {
  color: var(--brand-hover);
}

.mono {
  font-family: "Geist Mono", ui-monospace, monospace;
}

.muted {
  color: var(--text-muted);
}

.topbar {
  border-bottom: 1px solid var(--border-soft);
}

.topbar-inner {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--brand);
  color: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}

.brand-name {
  font-weight: 700;
  font-size: 18px;
}

.brand-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  border: 1px solid rgba(246, 192, 32, 0.35);
  border-radius: 6px;
  padding: 2px 8px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 10px 12px;
}

.button-primary {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 0;
  background: var(--brand);
  color: var(--background);
  font:
    600 14px Geist,
    ui-sans-serif,
    system-ui,
    sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.subscribe-menu {
  position: absolute;
  right: 16px;
  top: 68px;
  z-index: 20;
  width: min(360px, calc(100% - 32px));
  background: var(--surface-raised);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  padding: 8px;
}

.subscribe-title {
  margin: 0;
  padding: 12px 12px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.subscribe-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}

.subscribe-option:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.subscribe-option-highlight {
  background: rgba(246, 192, 32, 0.08);
}

.subscribe-option-title {
  font-weight: 600;
  font-size: 14px;
}

.subscribe-option-text {
  font-size: 13px;
  color: var(--text-muted);
}

.page {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.footer {
  padding-top: 20px;
  padding-bottom: 48px;
  border-top: 1px solid var(--border-soft);
  flex-direction: row;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.banner {
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid;
}

.banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--background);
}

.banner h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.banner p {
  margin: 2px 0 0;
  color: var(--text-soft);
  font-size: 14px;
}

.card {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.card-header {
  padding: 18px 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-soft);
}

.card-header h2 {
  margin: 0;
  font-size: 16px;
}

.incident-card {
  overflow: hidden;
}

.incident-kind {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.incident-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 8px 24px 16px;
}

.timeline li {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border-soft);
}

.timeline li:first-child {
  border-top: 0;
}

.timeline-stage {
  font-weight: 600;
  font-size: 14px;
}

.timeline-body {
  margin: 0;
  font-size: 14px;
  color: #e4e4e7;
  white-space: pre-line;
}

.timeline-time {
  font-size: 12px;
  color: var(--text-muted);
}

.component {
  padding: 18px 24px 16px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.component:first-of-type {
  border-top: 0;
}

.component-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.component-name {
  font-size: 15px;
  font-weight: 600;
}

.component-description {
  font-size: 13px;
  color: var(--text-muted);
}

.component-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  flex: none;
}

.bars-wrap {
  position: relative;
}

.bars {
  display: flex;
  gap: 2px;
  height: 34px;
}

.bar {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 2px;
  transition: opacity 0.12s;
}

.bars:hover .bar {
  opacity: 0.55;
}

.bars .bar:hover {
  opacity: 1;
}

.tooltip {
  position: absolute;
  top: 44px;
  z-index: 10;
  width: 240px;
  transform: translateX(-50%);
  background: var(--surface-raised);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  font-size: 13px;
}

.tooltip-date {
  font-weight: 600;
  margin-bottom: 6px;
}

.tooltip-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e4e4e7;
}

.bars-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.bars-legend .line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.bars-legend .uptime {
  color: var(--text-soft);
  font-weight: 500;
}

.legend {
  padding: 14px 24px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
}

.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.days h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.day {
  padding: 16px 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.day h3 {
  margin: 0;
  font-size: 15px;
  color: #e4e4e7;
}

.day p {
  margin: 0;
}

.day-incident {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.day-incident a {
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.notice {
  border-radius: 12px;
  padding: 14px 18px;
  border: 1px solid rgba(251, 146, 60, 0.4);
  background: rgba(251, 146, 60, 0.08);
  color: var(--degraded-text);
  font-size: 14px;
}

.back-link {
  font-size: 14px;
  text-decoration: none;
}

.detail-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lbl-30 {
  display: none;
}

@media (max-width: 640px) {
  .bar.old {
    display: none;
  }
  .lbl-90 {
    display: none;
  }
  .lbl-30 {
    display: inline;
  }
  .topbar-link {
    display: none;
  }
  .timeline li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}
