:root {
  color-scheme: dark;
  --bg: #0e0c0a;
  --surface: #14110e;
  --surface-soft: #191510;
  --gold: #d9a94a;
  --gold-soft: #8e6a30;
  --text: #eee4d3;
  --muted: #a79b88;
  --line: #3a3023;
  --green: #5fb96a;
  --amber: #d6a246;
  --red: #ce685d;
  --unknown: #51493e;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 50% 18%, rgba(126, 89, 35, 0.06), transparent 36rem), var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
.site-header { min-height: 88px; padding: 0 2rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.brand { display: grid; text-decoration: none; line-height: 1; }
.brand span { color: var(--gold); font: 500 1.9rem/1 Georgia, "Times New Roman", serif; }
.brand small { margin-top: .2rem; color: var(--gold); font-size: .78rem; letter-spacing: .02em; }
nav { display: flex; align-self: stretch; gap: 2.8rem; }
nav a { position: relative; display: grid; place-items: center; text-decoration: none; color: var(--text); font-size: .94rem; }
nav a:hover, nav a:focus-visible, nav a.active { color: var(--gold); }
nav a.active::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: var(--gold); }

main { width: min(1180px, calc(100% - 3rem)); margin: 0 auto; padding: 3.1rem 0 4rem; }
.summary { min-height: 130px; display: flex; align-items: center; justify-content: center; gap: 1.6rem; text-align: left; }
.overall-icon { width: 62px; height: 62px; border: 4px solid currentColor; border-radius: 50%; display: grid; place-items: center; color: var(--green); font-size: 2rem; line-height: 1; }
.summary h1 { margin: 0; color: var(--gold); font: 500 clamp(2.25rem, 5vw, 4rem)/1.05 Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
.summary p { margin: .75rem 0 0; color: var(--muted); text-align: center; }
.summary p.provenance { margin-top: .3rem; color: var(--gold-soft); font-size: .75rem; }
.summary.degraded .overall-icon { color: var(--amber); }
.summary.major-outage .overall-icon { color: var(--red); }

.uptime { margin-top: 2.3rem; }
.section-head, .service-header { display: grid; align-items: end; }
.section-head { grid-template-columns: 1fr auto; margin-bottom: .7rem; }
h2 { margin: 0; color: var(--gold); font-size: 1.05rem; font-weight: 600; letter-spacing: .01em; }
.section-head span { color: var(--muted); font-size: .78rem; }
.history-rail { display: grid; grid-template-columns: repeat(90, minmax(2px, 1fr)); gap: 3px; height: 48px; }
.history-rail i { display: block; min-width: 2px; background: var(--unknown); border-radius: 1px; }
.history-rail i.operational { background: var(--green); }
.history-rail i.degraded { background: var(--amber); }
.history-rail i.major-outage { background: var(--red); }
.history-key { margin-top: .65rem; display: flex; flex-wrap: wrap; gap: 1rem; color: var(--muted); font-size: .72rem; }
.history-key span { display: inline-flex; align-items: center; gap: .35rem; }
.history-key i { width: 8px; height: 8px; border-radius: 50%; background: var(--unknown); }
.history-key i.operational { background: var(--green); }
.history-key i.degraded { background: var(--amber); }
.history-key i.major-outage { background: var(--red); }

.services { margin-top: 2.7rem; }
.service-header, .service-row { grid-template-columns: minmax(220px, 1.3fr) minmax(170px, 1fr) minmax(130px, .65fr); gap: 1rem; }
.service-header { padding: 0 .15rem .55rem; border-bottom: 1px solid var(--gold-soft); color: var(--gold); font-size: .98rem; }
.service-header h2 { font-size: inherit; }
.service-header span:last-child, .service-row > span:last-child { text-align: right; }
.service-row { min-height: 52px; display: grid; align-items: center; border-bottom: 1px solid var(--line); font-size: .94rem; }
.service-state { display: inline-flex; align-items: center; gap: .65rem; color: var(--green); text-transform: capitalize; }
.service-state::before { content: "✓"; width: 19px; height: 19px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: .7rem; }
.service-state.degraded { color: var(--amber); }
.service-state.major-outage { color: var(--red); }
.service-state.unknown { color: var(--muted); }
.uptime-value { color: var(--green); }
.uptime-value.unknown { color: var(--muted); }
.service-detail { display: block; margin-top: .18rem; color: var(--muted); font-size: .72rem; }

.incidents { margin-top: 2rem; }
.incidents h2 { padding-bottom: .55rem; border-bottom: 1px solid var(--gold-soft); }
.incident-list { margin-top: .75rem; border: 1px solid var(--line); background: rgba(20, 17, 14, .55); }
.incident { padding: 1rem 1.15rem; display: grid; grid-template-columns: 160px 1fr auto; gap: 1rem; border-bottom: 1px solid var(--line); }
.incident:last-child { border-bottom: 0; }
.incident time, .incident .state { color: var(--muted); font-size: .76rem; }
.incident p { margin: 0; font-size: .88rem; }
.incident .state { text-transform: capitalize; }
.empty { min-height: 110px; display: grid; place-items: center; color: var(--muted); font-size: .88rem; }
.loading { color: var(--muted); }
.error { color: var(--red); }
footer { min-height: 72px; padding: 0 2rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 2rem; color: var(--muted); font-size: .72rem; }

@media (max-width: 720px) {
  .site-header { min-height: 72px; padding: 0 1rem; }
  .brand span { font-size: 1.4rem; }
  nav { gap: 1.1rem; }
  nav a:first-child { display: none; }
  main { width: min(100% - 2rem, 1180px); padding-top: 2rem; }
  .summary { align-items: flex-start; justify-content: flex-start; min-height: 150px; gap: 1rem; }
  .overall-icon { flex: 0 0 46px; width: 46px; height: 46px; font-size: 1.4rem; border-width: 3px; }
  .summary h1 { font-size: 2.15rem; }
  .summary p { text-align: left; line-height: 1.5; }
  .section-head { grid-template-columns: 1fr; align-items: start; gap: .4rem; }
  .history-rail { gap: 1px; height: 38px; }
  .service-header, .service-row { grid-template-columns: 1.2fr 1fr; }
  .service-header span:last-child, .service-row > span:last-child { display: none; }
  .incident { grid-template-columns: 1fr; gap: .35rem; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: .35rem; padding: 1rem; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
