:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #020617;
  background: #f8fafc;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}

.site-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1080px) / 2));
  color: #f8fafc;
  background: #0f172a;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #93c5fd;
  border-radius: 6px;
  color: #bfdbfe;
  font-size: 18px;
}

.brand-light {
  color: #cbd5e1;
  font-weight: 500;
}

.header-label {
  color: #cbd5e1;
  font-size: 14px;
}

.page-shell {
  width: min(100% - 40px, 820px);
  margin: 64px auto;
  flex: 1;
}

.eyebrow {
  margin: 0 0 12px;
  color: #0369a1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
}

h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(34px, 6vw, 48px);
  line-height: 1.1;
  letter-spacing: -.03em;
}

.intro-copy {
  max-width: 650px;
  margin: 18px 0 32px;
  color: #334155;
  font-size: 18px;
  line-height: 1.6;
}

.status-panel,
.help-panel {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 18px #0f172a0b;
}

.status-panel {
  padding: 26px;
}

.preview-controls h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 21px;
}

.preview-controls > p {
  color: #334155;
  line-height: 1.55;
}

.preview-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.preview-buttons button {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  color: #0f172a;
  background: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.preview-buttons button:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #0369a1;
}

.preview-buttons button:disabled {
  cursor: wait;
  opacity: .65;
}

.preview-buttons button:focus-visible {
  outline: 3px solid #0369a1;
  outline-offset: 3px;
}

.preview-note {
  font-size: 14px;
}

.status-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-heading h2,
.help-panel h2 {
  margin: 0;
  color: #0f172a;
  font-size: 21px;
}

.status-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  background: #64748b;
}

.status-dot--good { background: #15803d; }
.status-dot--planned { background: #b45309; }
.status-dot--active { background: #b91c1c; }
.status-dot--unknown { background: #64748b; }

.status-summary {
  margin: 12px 0 0 24px;
  color: #334155;
  font-size: 16px;
  line-height: 1.55;
}

.event-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0 0;
}

.event-details div {
  min-width: 0;
  padding: 14px;
  border-radius: 6px;
  background: #f1f5f9;
}

.event-details div:last-child {
  grid-column: 1 / -1;
}

dt {
  margin-bottom: 5px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

dd {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.last-updated {
  margin: 20px 0 0;
  color: #64748b;
  font-size: 13px;
}

.help-panel {
  margin-top: 20px;
  padding: 22px 26px;
}

.help-panel p {
  margin: 10px 0 0;
  color: #334155;
  line-height: 1.55;
}

.footer-note {
  margin: 22px 0 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.site-footer {
  padding: 20px 24px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

:focus-visible {
  outline: 3px solid #0369a1;
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .site-header {
    min-height: 60px;
    padding-inline: 18px;
  }

  .page-shell {
    width: min(100% - 32px, 820px);
    margin-block: 42px;
  }

  .event-details {
    grid-template-columns: 1fr;
  }

  .event-details div:last-child {
    grid-column: auto;
  }

  .status-panel {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---- per-service status ---- */
.services-panel { margin-top: 24px; }
.status-dot--operational { background: #15803d; }
.status-dot--degraded { background: #b45309; }
.status-dot--down { background: #b91c1c; }
.status-dot--maintenance { background: #0369a1; }

.service-group { margin-top: 24px; }
.service-group h3 {
  margin: 0 0 8px;
  color: #475569;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.service-list { margin: 0; padding: 0; list-style: none; }
.service { padding: 14px 0; border-top: 1px solid #e2e8f0; }
.service-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.service-name { color: #0f172a; font-size: 17px; font-weight: 600; }
.service-state { display: inline-flex; align-items: center; gap: 8px; color: #0f172a; font-size: 15px; font-weight: 600; }
.service-state--down { color: #991b1b; }
.service-state--degraded { color: #92400e; }
.service-state--maintenance { color: #075985; }
.service-uptime { margin: 6px 0 8px; color: #475569; font-size: 14px; }
.history { display: flex; gap: 2px; height: 26px; }
.history-day { flex: 1; min-width: 2px; border-radius: 2px; background: #e2e8f0; }
.history-day--up { background: #15803d; }
.history-day--degraded { background: #d97706; }
.history-day--down { background: #b91c1c; }
@media (max-width: 560px) { .history { gap: 1px; } }
