:root {
  color-scheme: dark;
  --bg: #111412;
  --surface: #1a1e1b;
  --border: #313931;
  --text: #eef2e9;
  --muted: #a1afa2;
  --accent: #c3f377;
  --ok: #aee66c;
  --bad: #fa8b88;
  --unknown: #7f8c88;
  font: 15px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, select { font: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

.top {
  height: 88px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 max(24px, calc((100vw - 1152px) / 2));
}
.brand { font-size: 30px; font-weight: 750; letter-spacing: -1.6px; }
.env {
  margin-left: auto;
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

main { max-width: 1200px; margin: auto; padding: 40px 24px 58px; }
.summary {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 36px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--tone, var(--unknown));
  background: var(--surface);
  border-radius: 10px;
  padding: 24px 26px;
}
.summary-icon {
  height: 45px;
  width: 45px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--tone, var(--unknown)) 12%, transparent);
  border-radius: 50%;
  color: var(--tone, var(--unknown));
  font-size: 22px;
}
.summary h1 {
  font-size: 21px;
  font-weight: 520;
  letter-spacing: -.45px;
  line-height: 1.35;
  margin: 0;
}
.summary p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.operational { --tone: var(--ok); }
.outage { --tone: var(--bad); }
.unknown { --tone: var(--unknown); }

button {
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  padding: 8px 14px;
  color: var(--text);
}
button:hover { border-color: var(--muted); }
button:focus-visible, a:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.section { margin-bottom: 36px; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
h2 {
  font-size: 21px;
  font-weight: 520;
  letter-spacing: -.45px;
  line-height: 1.35;
  margin: 0;
}
.components { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.component {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 19px 22px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  text-align: left;
  background: transparent;
}
.component:last-child { border-bottom: 0; }
.component:hover, .component.selected { background: #1c231b; }
.component.selected { box-shadow: inset 3px 0 var(--accent); }
.component-name { flex: 1; font-size: 15px; }
.component-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  background: var(--tone);
  border-radius: 50%;
}
.badge {
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, var(--tone) 25%, transparent);
  border-radius: 5px;
  background: color-mix(in srgb, var(--tone) 10%, transparent);
  color: var(--tone);
  font-size: 11px;
  white-space: nowrap;
}

.history-section {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}
.select-label { font-size: 12px; color: var(--muted); }
select {
  margin-left: 8px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
  color: var(--text);
}
.history-stats {
  display: flex;
  gap: 30px;
  margin: 25px 0 16px;
  color: var(--muted);
  font-size: 12px;
}
.history-stats strong { margin-left: 6px; color: var(--text); font-weight: 500; }
.history-bars { display: flex; align-items: stretch; gap: 2px; height: 49px; }
.bar { flex: 1; min-width: 1px; border-radius: 2px; background: var(--tone); opacity: .85; }
.bar:hover { opacity: 1; outline: 1px solid white; }
.history-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
}
.legend { display: flex; align-items: center; gap: 6px; }
.legend-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--tone);
}

.timeline { border-top: 1px solid var(--border); }
.event { padding: 20px 0; border-bottom: 1px solid var(--border); }
.event-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.event h3 { margin: 0; font-size: 14px; font-weight: 550; }
.event time { font-size: 11px; color: var(--muted); }
.empty { padding: 20px; margin: 0; color: var(--muted); font-size: 13px; }
.notice {
  padding: 12px 16px;
  border: 1px solid var(--bad);
  border-radius: 6px;
  color: var(--bad);
  font-size: 13px;
}
footer { max-width: 1200px; margin: auto; padding: 0 24px 30px; color: var(--muted); font-size: 11px; }
[hidden] { display: none !important; }

@media (max-width: 700px) {
  .top { height: 70px; gap: 14px; }
  main { padding-top: 28px; }
  .summary { gap: 12px; padding: 18px 16px; margin-bottom: 28px; }
  .summary h1 { font-size: 17px; }
  .summary-icon { width: 34px; height: 34px; flex-shrink: 0; }
  .section-head { align-items: start; }
  .component { gap: 9px; padding: 16px 12px; }
  .history-section { padding: 18px 14px; }
  .history-bars { gap: 1px; }
  .history-stats { gap: 14px; flex-wrap: wrap; }
  .legend { display: none; }
  .badge { padding: 3px 6px; }
}
