:root {
  color-scheme: dark;
  --bg: #0a0b09;
  --text: #f5f5f4;
  --muted: #a3a3a3;
  --faint: #8a8a8a;
  --line: #262626;
  --card: rgba(23, 23, 23, 0.45);
  --accent: #a8e6b0;
  --operational: #a8e6b0;
  --degraded: #f0d78c;
  --major_outage: #f0a8a4;
  --maintenance: #9ec9ef;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: inherit; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  color: var(--accent);
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  transform: translateY(-150%);
  background: var(--accent);
  color: var(--bg);
  padding: 0.4rem 0.7rem;
  border-radius: 0.4rem;
  z-index: 2;
}

.skip:focus { transform: none; }

.wrap {
  width: min(48rem, 100%);
  margin: 0 auto;
  padding: 1.5rem;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
}

.brand {
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.top nav {
  display: flex;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.top a { text-underline-offset: 0.2rem; }
.top a:hover { color: var(--text); }

h1 {
  margin: 2.5rem 0 0.75rem;
  font-size: 2.4rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.lede, .help, .meta { color: var(--muted); }

.kicker {
  margin: 2.25rem 0 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.banner, .card, .incident, .component-row, .field {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 0.6rem;
}

.banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.15rem;
  margin-top: 1.5rem;
}

.banner strong { font-size: 1.15rem; }

.dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 0.35rem color-mix(in srgb, currentColor 22%, transparent);
  flex: none;
}

.tone-operational { color: var(--operational); }
.tone-degraded { color: var(--degraded); }
.tone-major_outage { color: var(--major_outage); }
.tone-maintenance { color: var(--maintenance); }

.component-list { display: flex; flex-direction: column; gap: 0.6rem; }

.component-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1rem;
}

.component-row p, .incident p { margin: 0.15rem 0 0; }

.name { font-weight: 600; }

.pill {
  border: 1px solid color-mix(in srgb, currentColor 50%, transparent);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.timeline { display: flex; flex-direction: column; gap: 0.75rem; }

.incident { padding: 1rem 1.05rem 1.05rem; }

.incident-top, .row-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.incident h3, .card h2, form h2 { margin: 0; font-size: 1.05rem; }

.updates { list-style: none; margin: 0.85rem 0 0; padding: 0; }
.updates li + li { margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px solid var(--line); }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 3rem 0 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.9rem;
}

.site-footer a { color: var(--muted); }

form { display: flex; flex-direction: column; gap: 1rem; }

.card { padding: 1rem; }

.card h2 { margin-bottom: 0.85rem; }

.stack { display: flex; flex-direction: column; gap: 0.85rem; }

label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.92rem; }

input, select, textarea {
  width: 100%;
  background: #12130f;
  color: var(--text);
  border: 1px solid #3a3a3a;
  border-radius: 0.5rem;
  padding: 0.7rem 0.75rem;
  font: inherit;
}

textarea { min-height: 7.5rem; resize: vertical; }

button, .button {
  font: inherit;
  border-radius: 0.5rem;
  padding: 0.75rem 0.95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button.primary {
  background: var(--accent);
  color: var(--bg);
  border: 0;
  font-weight: 700;
}

button.ghost, a.button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

button:disabled { opacity: 0.55; cursor: not-allowed; }

.row-actions { margin-top: 0.25rem; }
.row-actions button, .row-actions a { flex: 1; }

.result {
  min-height: 1.25rem;
  margin: 0;
}

.error { color: var(--major_outage); }
.ok { color: var(--operational); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  h1 { font-size: 2rem; margin-top: 1.75rem; }
  .component-row, .incident-top, .banner { align-items: flex-start; }
  .component-row { flex-direction: column; }
  .row-actions { flex-direction: column; }
}

@media (min-width: 800px) {
  .wrap { padding-top: 2rem; }
  h1 { font-size: 3rem; }
}
