:root {
  color-scheme: dark;
  --bg: #171a18;
  --surface: #212622;
  --surface-raised: #29302b;
  --line: #445048;
  --text: #f2f3ee;
  --muted: #aeb7af;
  --accent: #e0a33b;
  --green: #77b894;
  --green-soft: #203a2e;
  --red: #e27b6e;
  --red-soft: #462724;
  --amber: #e0a33b;
  --amber-soft: #48371d;
  --blue: #8cb6d3;
  --blue-soft: #263945;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
  scrollbar-color: #657068 #252b27;
  scrollbar-width: thin;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

button {
  color: inherit;
}

:where(a, button):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, white);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 30;
  padding: 9px 12px;
  border-radius: var(--radius);
  background: var(--surface-raised);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 70px;
  padding: 12px max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand img {
  flex: 0 0 auto;
}

.brand span {
  display: grid;
  gap: 1px;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.last-update {
  color: var(--muted);
  font-size: 0.84rem;
  text-align: right;
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 72px;
}

.overview {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  min-height: 220px;
  padding-bottom: 46px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.25rem, 7vw, 4.8rem);
  line-height: 1.02;
}

h2 {
  margin: 0;
  font-size: 1.5rem;
}

h3 {
  margin: 0;
  font-size: 1.05rem;
}

.overview-copy {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.overall-status,
.state-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  font-weight: 800;
}

.overall-status {
  min-height: 46px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 16%, transparent);
}

.is-operational {
  color: var(--green);
}

.is-degraded {
  color: var(--amber);
}

.is-outage {
  color: var(--red);
}

.is-unknown,
.is-loading {
  color: var(--blue);
}

section:not(.overview) {
  padding-top: 48px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.component-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.component-card {
  min-height: 248px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.component-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.state-badge {
  font-size: 0.78rem;
}

.component-reason {
  min-height: 48px;
  margin: 16px 0 22px;
  color: var(--muted);
  line-height: 1.5;
}

.component-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.component-metrics div {
  display: grid;
  gap: 5px;
}

.component-metrics dt {
  color: var(--muted);
  font-size: 0.76rem;
}

.component-metrics dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

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

.uptime-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.uptime-bars {
  display: grid;
  grid-template-columns: repeat(30, minmax(2px, 1fr));
  gap: 2px;
  height: 24px;
}

.uptime-day {
  min-width: 2px;
  border-radius: 2px;
  background: var(--blue-soft);
}

.uptime-day.is-operational {
  background: var(--green);
}

.uptime-day.is-degraded {
  background: var(--amber);
}

.uptime-day.is-outage {
  background: var(--red);
}

.incident-section,
.history-section {
  margin-top: 12px;
}

.incident-list {
  border-top: 1px solid var(--line);
}

.incident-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.5fr) minmax(170px, 0.6fr);
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.incident-row p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.incident-time {
  color: var(--muted);
  font-size: 0.84rem;
  text-align: right;
}

.empty-copy {
  margin: 0;
  padding: 24px 0;
  color: var(--muted);
}

.status-error {
  margin-top: 42px;
  padding: 22px;
  border: 1px solid var(--red);
  border-radius: var(--radius);
  background: var(--red-soft);
}

.status-error p {
  color: var(--muted);
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 20%,
    color-mix(in srgb, var(--text) 8%, transparent) 45%,
    transparent 70%
  );
  animation: skeleton-shift 1.4s ease-in-out infinite;
}

@keyframes skeleton-shift {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton::after {
    animation: none;
  }
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

footer a:hover {
  color: var(--text);
}

@media (max-width: 840px) {
  .overview {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
  }

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

  .component-card {
    min-height: 0;
  }

  .incident-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .incident-time {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: center;
    padding: 11px 16px;
  }

  .last-update {
    max-width: 150px;
  }

  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  main {
    padding-top: 38px;
  }

  .overview {
    gap: 28px;
    padding-bottom: 36px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .component-header {
    align-items: flex-start;
    flex-direction: column;
  }

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