:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: rgba(17, 32, 51, .84);
  --panel-strong: #10233a;
  --line: rgba(151, 174, 205, .16);
  --text: #f4f8fc;
  --muted: #95a9c2;
  --green: #3ee0a1;
  --green-soft: rgba(62, 224, 161, .13);
  --yellow: #ffc766;
  --red: #ff6b73;
  --blue: #5ca9ff;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 85% -10%, rgba(39, 137, 205, .28), transparent 38%),
    radial-gradient(circle at 0 36%, rgba(38, 196, 145, .09), transparent 32%),
    var(--bg);
  font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

.shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.masthead { height: 92px; display: flex; align-items: center; justify-content: space-between; }
.brand { color: var(--text); display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #07111f; font-weight: 900; background: linear-gradient(145deg, #79f2c0, #46aef7); }
.brand strong, .brand small { display: block; letter-spacing: .08em; }
.brand small { color: var(--muted); font-size: 10px; margin-top: -2px; }
.live { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.live span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 6px rgba(62,224,161,.09); }

.hero { min-height: 310px; padding: 64px; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(120deg, rgba(19,42,66,.96), rgba(9,24,40,.88)); display: flex; align-items: center; justify-content: space-between; gap: 40px; box-shadow: 0 30px 80px rgba(0,0,0,.18); }
.eyebrow { margin: 0 0 9px; color: var(--blue); font-weight: 800; font-size: 11px; letter-spacing: .18em; }
h1 { max-width: 740px; margin: 0; font-size: clamp(30px, 4vw, 52px); line-height: 1.15; letter-spacing: -.045em; }
.hero p:not(.eyebrow) { color: var(--muted); margin: 18px 0 0; }
.overall-badge { flex: 0 0 auto; width: 126px; height: 126px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; border: 1px solid currentColor; }
.overall-badge.healthy { color: var(--green); background: var(--green-soft); box-shadow: 0 0 50px rgba(62,224,161,.12); }
.overall-badge.degraded, .overall-badge.unknown { color: var(--yellow); background: rgba(255,199,102,.1); }
.overall-badge.down { color: var(--red); background: rgba(255,107,115,.1); }
.overall-badge.loading { color: var(--muted); }

.summary { margin: 20px 0 70px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.summary article { padding: 22px 24px; background: rgba(12,28,46,.76); border: 1px solid var(--line); border-radius: 16px; }
.summary span, .service-meta span { display: block; color: var(--muted); font-size: 12px; }
.summary strong { display: block; margin-top: 3px; font-size: 20px; }

.section { margin: 0 0 72px; }
.section-heading { margin-bottom: 22px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
h2 { margin: 0; font-size: 25px; letter-spacing: -.025em; }
button { appearance: none; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; color: var(--text); background: rgba(23,43,67,.8); cursor: pointer; }
button:hover { border-color: rgba(92,169,255,.55); }

.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.service-card { padding: 24px; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); }
.service-top { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.service-top h3 { margin: 0; font-size: 17px; }
.service-key { color: var(--muted); font-size: 11px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.status-pill { padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.status-pill.healthy { color: var(--green); background: var(--green-soft); }
.status-pill.down { color: var(--red); background: rgba(255,107,115,.11); }
.status-pill.degraded, .status-pill.unknown { color: var(--yellow); background: rgba(255,199,102,.1); }
.service-meta { margin-top: 23px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.service-meta strong { font-size: 14px; }
.service-error { margin: 14px 0 0; padding-top: 13px; border-top: 1px solid var(--line); color: var(--red); font-size: 12px; word-break: break-word; }

.history-list, .incident-list { border: 1px solid var(--line); border-radius: 17px; overflow: hidden; background: var(--panel); }
.history-row { display: grid; grid-template-columns: 220px 1fr 72px; align-items: center; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.history-row:last-child, .incident:last-child { border-bottom: 0; }
.history-row strong { font-size: 13px; }
.history-bars { height: 22px; display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.history-bars span { min-width: 2px; border-radius: 3px; background: rgba(149,169,194,.15); }
.history-bars span.ok { background: var(--green); }
.history-bars span.fail { background: var(--red); }
.history-uptime { text-align: right; font-size: 13px; }
.legend { margin: 0; color: var(--muted); font-size: 12px; }
.legend span { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin: 0 5px 0 12px; }

.incident { padding: 19px 22px; display: grid; grid-template-columns: 150px 1fr auto; gap: 18px; border-bottom: 1px solid var(--line); align-items: center; }
.incident time { color: var(--muted); font-size: 12px; }
.incident strong { display: block; font-size: 13px; }
.incident p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.incident-type { color: var(--red); font-size: 11px; font-weight: 800; }
.incident-type.recovered, .empty { color: var(--green); }
.empty { padding: 30px 22px; text-align: center; }
.error-box { padding: 24px; border: 1px solid rgba(255,107,115,.3); border-radius: 14px; color: #ffc2c6; background: rgba(255,107,115,.06); }

footer { min-height: 100px; padding: 28px 2px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 20px; }

@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 1160px); }
  .masthead { height: 76px; }
  .hero { min-height: 0; padding: 34px 25px; display: block; }
  .overall-badge { width: auto; height: auto; margin-top: 28px; padding: 11px; border-radius: 12px; }
  .summary { grid-template-columns: 1fr; margin-bottom: 54px; }
  .service-grid { grid-template-columns: 1fr; }
  .history-row { grid-template-columns: 1fr; gap: 9px; }
  .history-uptime { text-align: left; }
  .incident { grid-template-columns: 1fr; gap: 6px; }
  .section-heading { align-items: start; }
  .legend { display: none; }
  footer { display: block; }
  footer span { display: block; margin-bottom: 6px; }
}
