:root {
  --bg: #0d1018;
  --surface: #121925;
  --surface-raised: #172131;
  --surface-soft: #101722;
  --line: #263448;
  --text: #f3f7fb;
  --secondary: #c4d0df;
  --muted: #8290a5;
  --blue: #00aaff;
  --coral: #ff7f50;
  --green: #30d38c;
  --amber: #ffb020;
  --red: #ff5c68;
  --unknown: #435165;
  --radius: 10px;
  --page-width: 100%;
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(0,170,255,.09), transparent 28rem),
    radial-gradient(circle at 90% 0%, rgba(255,127,80,.055), transparent 24rem),
    var(--bg);
  line-height: 1.4;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }

.site-header, main, footer {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}
.site-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.site-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}
.site-brand-title {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -.025em;
  white-space: nowrap;
}
.site-brand-title span { color: var(--blue); }
.site-brand-subtitle {
  color: var(--muted);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.api-link {
  color: var(--secondary);
  font-size: .74rem;
  font-weight: 700;
  text-decoration: none;
}
.api-link:hover, .api-link:focus-visible { color: var(--blue); }

main {
  flex: 1 0 auto;
  margin-block: 0;
  padding: 26px 0 38px;
}
.status-layout { display: block; }
.dashboard-columns {
  display: block;
}
.components-panel, .incidents-panel {
  padding: 0;
  border: 0;
  background: transparent;
}
.incidents-panel { margin-top: 26px; }
.incidents-panel .empty {
  min-height: 0;
  height: auto;
  display: block;
  text-align: left;
}
.status-summary {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto minmax(170px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--unknown);
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--surface-raised), var(--surface));
}
.status-summary.status-operational { border-left-color: var(--green); }
.status-summary.status-degraded,
.status-summary.status-partial_outage { border-left-color: var(--amber); }
.status-summary.status-major_outage { border-left-color: var(--red); }
.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--unknown);
  box-shadow: 0 0 0 5px rgba(67,81,101,.15);
}
.status-operational .status-dot { background: var(--green); box-shadow: 0 0 0 5px rgba(48,211,140,.11); }
.status-degraded .status-dot, .status-partial_outage .status-dot { background: var(--amber); }
.status-major_outage .status-dot { background: var(--red); }
.summary-copy h1 { margin: 0; font-size: 1.18rem; line-height: 1.2; }
.summary-copy p { margin: 3px 0 0; color: var(--muted); font-size: .75rem; }
.summary-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 470px; }
.summary-meta span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--secondary);
  background: rgba(0,0,0,.12);
  font-size: .67rem;
  white-space: nowrap;
}

.section-heading {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 15px 0 10px;
}
h1, h2, h3 { font-weight: 750; letter-spacing: -.02em; }
h2 { margin: 0; font-size: .94rem; }
h3 { margin: 0; font-size: .84rem; }
.legend { display: flex; flex-wrap: wrap; gap: 11px; color: var(--muted); font-size: .63rem; }
.key::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 2px;
  background: var(--unknown);
}
.key.operational::before { background: var(--green); }
.key.degraded::before { background: var(--amber); }

.component-list { display: grid; grid-template-columns: 1fr; gap: 8px; }
.component-list > .component-card:last-child:nth-child(odd) {
  width: 100%;
  grid-column: auto;
  justify-self: stretch;
}
.component-card, .incident, .chart-card, .panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--surface);
}
.component-card { box-shadow: inset 2px 0 var(--blue); }
.component-card { min-height: 112px; padding: 15px 17px; }
.component-head, .incident-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.component-head h3 a { text-decoration: none; }
.component-head h3 a:hover, .component-head h3 a:focus-visible { color: var(--blue); }
.component-head p {
  margin: 2px 0 8px;
  color: var(--muted);
  font-size: .67rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-text {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .65rem;
  font-weight: 750;
  white-space: nowrap;
}
.status-text::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--unknown);
}
.status-operational.status-text::before { background: var(--green); }
.status-degraded.status-text::before, .status-partial_outage.status-text::before { background: var(--amber); }
.status-major_outage.status-text::before,
.status-schema_error.status-text::before,
.status-content_error.status-text::before,
.status-http_error.status-text::before,
.status-timeout.status-text::before,
.status-connection_error.status-text::before { background: var(--red); }
.uptime-bars {
  height: 38px;
  display: grid;
  grid-template-columns: repeat(90, minmax(1px, 1fr));
  gap: 1px;
}
.uptime-bars.large { height: 44px; }
.bar { min-width: 1px; border-radius: 1px; background: var(--unknown); opacity: .65; }
.bar.status-operational { background: var(--green); opacity: 1; }
.bar.status-degraded, .bar.status-partial_outage { background: var(--amber); opacity: 1; }
.bar.status-major_outage { background: var(--red); opacity: 1; }
.bar-caption {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 5px;
  color: var(--muted);
  font-size: .57rem;
}
.bar-caption strong { color: var(--secondary); font-size: .64rem; }
.bar-caption span:last-child { text-align: right; }

.incident-list { display: grid; gap: 8px; }
.incident { padding: 12px 14px; }
.incident-date { margin: 3px 0 0; color: var(--muted); font-size: .66rem; }
.pill { padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .61rem; }
.update { margin-top: 9px; padding-left: 12px; border-left: 2px solid rgba(0,170,255,.3); }
.update p { margin: 2px 0; color: var(--secondary); font-size: .73rem; }
.update time { color: var(--muted); font-size: .61rem; }
.empty {
  padding: 10px 13px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-soft);
  font-size: .72rem;
}
.empty.success { color: var(--green); }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; color: var(--muted); font-size: .68rem; }
.breadcrumb a:hover { color: var(--blue); }
.detail-hero {
  margin-bottom: 14px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  background: var(--surface);
}
.detail-hero .eyebrow { margin: 0 0 3px; color: var(--blue); font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.detail-hero h1 { margin: 0; font-size: 1.35rem; }
.detail-hero > p { margin: 5px 0; color: var(--secondary); font-size: .75rem; }
.detail-hero + section, .detail-hero + section + section { margin-top: 14px; }
.detail-hero + section h2, .detail-hero + section + section h2 { margin-bottom: 7px; }
code { padding: 2px 5px; border-radius: 4px; color: #7ddcff; background: rgba(0,170,255,.08); font-size: .72rem; }
.endpoint-list { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.endpoint-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border-bottom: 1px solid var(--line); text-decoration: none; }
.endpoint-list a:last-child { border: 0; }
.endpoint-list a:hover { background: rgba(0,170,255,.045); }
.endpoint-list small { display: block; color: var(--muted); font-size: .66rem; }
.history-chart { width: 100%; height: 210px; }
.chart-empty { color: var(--muted); font-size: .72rem; text-align: center; }

footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 10px 0 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .61rem;
  text-align: center;
}
footer p { margin: 0; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { border-radius: 8px; background: #33445a; }

@media (max-width: 720px) {
  .site-header, main, footer { width: calc(100% - 20px); }
  main { padding-block: 14px 24px; }
  .component-list { grid-template-columns: 1fr; }
  .component-list > .component-card:last-child:nth-child(odd) {
    width: 100%;
    grid-column: auto;
  }
  .status-summary { grid-template-columns: auto 1fr; }
  .summary-meta { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
}

@media (max-width: 480px) {
  .site-header { min-height: 50px; }
  .site-brand-subtitle { display: none; }
  main { padding-top: 12px; }
  .status-summary { min-height: 0; padding: 12px; gap: 10px; }
  .summary-copy h1 { font-size: 1rem; }
  .summary-copy p { font-size: .66rem; }
  .summary-meta span { font-size: .59rem; }
  .section-heading { min-height: 38px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 4px; }
  .component-card { padding: 10px; }
  .component-head p { display: none; }
  .component-head { margin-bottom: 7px; }
  .uptime-bars { height: 24px; }
  footer { display: block; }
  footer p + p { margin-top: 3px; }
}

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