:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  font-synthesis: none;
  color-scheme: dark;
  --bg: #0b1014;
  --surface: #121a22;
  --surface-2: #1a2430;
  --text: #e8eef3;
  --muted: #93a4b3;
  --line: #273442;
  --green: #3ecf9a;
  --green-dim: #1a3d32;
  --amber: #e0ac50;
  --red: #f07167;
  --accent: #8af4cc;
  --brand: #173b3d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, #1a2a35 0%, var(--bg) 55%);
  min-height: 100vh;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #0b1014;
  padding: 8px 12px;
  z-index: 100;
  border-radius: 6px;
}

.skip:focus {
  left: 12px;
  top: 12px;
}

.page {
  max-width: 1080px;
  margin: auto;
  padding: 0 28px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  border-radius: 10px;
  display: block;
}

.separator { color: #5f7382; }

.top-nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

.quiet, .muted, .hint { color: var(--muted); }

.quiet {
  font-size: 13px;
  text-decoration: none;
}

.quiet:hover { text-decoration: underline; }

.banner {
  margin-top: 40px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  display: grid;
  gap: 22px;
}

.banner h1 {
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -1px;
  line-height: 1.15;
  margin: 10px 0 0;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.17em;
  color: var(--accent);
  font-weight: 700;
  margin: 0;
}

.lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  margin: 10px 0 0;
  max-width: 52ch;
}

.summary {
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0f151b;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 18px;
  font-weight: 600;
}

.summary.operational { color: var(--green); border-color: #2a5f4d; background: var(--green-dim); }
.summary.down { color: var(--red); border-color: #5a2f2c; background: #2a1513; }
.summary.degraded, .summary.maintenance { color: var(--amber); border-color: #5a4a22; background: #2a2213; }
.summary.unknown { color: var(--muted); }

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 32px 0 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

.tabs button {
  background: transparent;
  color: var(--muted);
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 12px 16px;
  font: 600 14px inherit;
  cursor: pointer;
  margin-bottom: -2px;
}

.tabs button[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

h2 {
  font-size: 17px;
  margin: 0;
  letter-spacing: -0.3px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 16px;
}

.muted { font-size: 12px; }

.groups { display: grid; gap: 22px; }

.group-title {
  margin: 0 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.services, .card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

.service { padding: 22px 24px; }
.service + .service { border-top: 1px solid var(--line); }

.service-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.service-name { font-weight: 600; }

.state {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}

.state.operational { color: var(--green); }
.state.down { color: var(--red); }
.state.degraded, .state.maintenance { color: var(--amber); }

.history {
  display: flex;
  gap: 3px;
  height: 32px;
}

.bar {
  flex: 1;
  min-width: 0;
  background: #2a3540;
  border-radius: 2px;
}

.bar.good { background: #2f9b78; }
.bar.mixed { background: var(--amber); }
.bar.bad { background: #c45f55; }

.range {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  margin-top: 9px;
}

.hint {
  font-size: 12px;
  line-height: 1.7;
  margin: 16px 0 0;
}

.empty {
  padding: 28px;
  color: var(--muted);
  font-size: 14px;
}

.day-block { margin-bottom: 28px; }

.day-title {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--text);
}

.day-events { display: grid; gap: 12px; }

.event-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  background: var(--surface);
}

.event-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.event-head h3 { margin: 0; font-size: 16px; }
.event-services { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.event-message { white-space: pre-wrap; line-height: 1.6; margin: 10px 0; }
.event-time { font-size: 12px; color: var(--muted); }

.card { padding: 24px; margin-bottom: 20px; }

.incident-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.incident-heading h3 { margin: 0 0 14px; font-size: 16px; }

.update {
  border-left: 2px solid var(--line);
  padding: 0 0 0 16px;
  margin: 18px 0;
}

.update p { white-space: pre-wrap; line-height: 1.6; font-size: 14px; }
.badge { font-size: 11px; color: var(--muted); }

footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  margin-top: 48px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  cursor: pointer;
  border: 0;
  background: #1f6f5d;
  color: white;
  border-radius: 8px;
  padding: 11px 17px;
  font: 600 13px inherit;
}

button:disabled { opacity: 0.5; cursor: wait; }
.secondary { background: var(--surface-2); color: var(--text); }
.danger { color: var(--red); background: #2a1513; }

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}

input, select, textarea {
  font: inherit;
  color: var(--text);
  border: 1px solid var(--line);
  background: #0f151b;
  padding: 11px;
  border-radius: 8px;
  width: 100%;
  min-width: 0;
}

input:focus, select:focus, textarea:focus, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

.narrow { max-width: 440px; }

#feedback { white-space: pre-wrap; color: var(--red); font-size: 14px; }
select[multiple] { min-height: 84px; }
[hidden] { display: none !important; }

#admin { padding-top: 40px; }
#admin h1 { font-size: clamp(28px, 4vw, 36px); margin: 12px 0; }

@media (max-width: 640px) {
  .page { padding: 0 16px; }
  .banner { padding: 20px; margin-top: 24px; }
  .service, .card { padding: 18px; }
  .grid { grid-template-columns: 1fr; }
  .history { gap: 2px; height: 26px; }
  .summary { font-size: 16px; }
  .section-heading, .service-head, .incident-heading, footer, .event-head { flex-direction: column; align-items: flex-start; }
}
