:root {
  --bg: #f6f6f5;
  --card: #fcfcfb;
  --fg: #0b0b0b;
  --muted: #52514e;
  --faint: #8a8984;
  --edge: #e4e3df;
  --nodata: #dcdbd6;
  --good: #0ca30c;
  --warning: #fab219;
  --critical: #d03b3b;
  --maint: #2a78d6;
  --series: #2a78d6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0e;
    --card: #1a1a19;
    --fg: #ffffff;
    --muted: #c3c2b7;
    --faint: #8f8e86;
    --edge: #2c2c2a;
    --nodata: #3a3a37;
    --maint: #3987e5;
    --series: #3987e5;
  }
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--fg); }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; }
.wrap { max-width: 860px; margin: 0 auto; padding: 24px 16px 64px; }

nav { display: flex; align-items: center; gap: 16px; margin-bottom: 40px; }
.brand { color: var(--fg); text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; margin-right: auto; }
.brand span { color: var(--muted); font-weight: 600; }
.nav-link { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.nav-link:hover { color: var(--fg); }
.brand { white-space: nowrap; }
@media (max-width: 420px) { .nav-link { display: none; } }
.open { color: var(--bg); background: var(--fg); text-decoration: none; font-weight: 700; font-size: 14px; padding: 8px 16px; border-radius: 999px; white-space: nowrap; }

section { margin-top: 40px; }
h2 { font-size: 15px; font-weight: 700; margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--edge); border-radius: 14px; }
.empty { color: var(--muted); font-size: 14px; padding: 18px 20px; }

.icon { width: 18px; height: 18px; flex: none; }
.is-up .icon, .s-up { color: var(--good); }
.is-slow .icon, .s-slow { color: var(--warning); }
.is-down .icon, .s-down { color: var(--critical); }
.is-maint .icon, .s-maint { color: var(--maint); }
.is-unknown .icon, .s-unknown { color: var(--faint); }

.banner { display: flex; align-items: center; gap: 14px; padding: 22px 22px; }
.banner .icon { width: 30px; height: 30px; }
.banner h1 { font-size: clamp(20px, 4vw, 26px); letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
.banner p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.notice { padding: 18px 20px; margin-top: 12px; border-left: 4px solid var(--edge); }
.notice.impact-minor { border-left-color: var(--warning); }
.notice.impact-major, .notice.impact-critical { border-left-color: var(--critical); }
.notice.maint { border-left-color: var(--maint); }
.notice h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.notice .when { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.notice .body { margin: 10px 0 0; font-size: 14px; white-space: pre-line; }
.affects { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.updates { list-style: none; margin: 12px 0 0; padding: 0; }
.updates li { padding: 10px 0 0; font-size: 14px; }
.updates li + li { border-top: 1px solid var(--edge); margin-top: 10px; }
.updates strong { text-transform: capitalize; }
.updates time { color: var(--muted); font-size: 12px; display: block; }
.updates p { margin: 2px 0 0; white-space: pre-line; }

.component { padding: 18px 20px; }
.component + .component { border-top: 1px solid var(--edge); }
.component-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.component-name { font-weight: 700; margin-right: auto; }
.component-uptime { color: var(--muted); font-size: 13px; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.bars { display: flex; gap: 2px; height: 34px; margin-top: 12px; touch-action: manipulation; }
.bar { flex: 1; min-width: 0; border-radius: 2px; background: var(--nodata); cursor: default; }
.bar.b-up { background: var(--good); }
.bar.b-slow { background: var(--warning); }
.bar.b-down { background: var(--critical); }
.bar.b-maint { background: var(--maint); }
.bar:hover, .bar.active { outline: 2px solid var(--fg); outline-offset: 1px; }
.axis { display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; margin-top: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 12px; margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
.tile { padding: 16px 20px; }
.tile + .tile { border-left: 1px solid var(--edge); }
.tile .label { color: var(--muted); font-size: 13px; }
.tile .value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
@media (max-width: 600px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile:nth-child(3) { border-left: 0; }
  .tile:nth-child(n+3) { border-top: 1px solid var(--edge); }
  .tiles.three { grid-template-columns: repeat(3, 1fr); }
  .tiles.three .tile:nth-child(3) { border-left: 1px solid var(--edge); border-top: 0; }
  .tile { padding: 14px 14px; }
  .tile .value { font-size: 20px; }
}

.chart { position: relative; padding: 8px 20px 12px; border-top: 1px solid var(--edge); }
.chart svg { display: block; width: 100%; height: 180px; overflow: visible; }
.chart .grid line { stroke: var(--edge); stroke-width: 1; }
.chart .grid text, .chart .xaxis text { fill: var(--faint); font-size: 11px; }
.chart .line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; }
.chart .area { fill: var(--series); opacity: 0.12; }
.chart .cross { stroke: var(--muted); stroke-width: 1; }
.chart .dot { fill: var(--series); stroke: var(--card); stroke-width: 2; }

.events { list-style: none; margin: 0; padding: 0; }
.events li { display: flex; align-items: flex-start; gap: 12px; padding: 14px 20px; font-size: 14px; }
.events li + li { border-top: 1px solid var(--edge); }
.events .what { flex: 1; }
.events .meta { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }

.history .day { padding: 16px 20px; }
.history .day + .day { border-top: 1px solid var(--edge); }
.history h3 { font-size: 14px; color: var(--muted); margin: 0; font-weight: 600; }
.history .incident { margin-top: 12px; }
.history .incident h4 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }

.tip {
  position: fixed; z-index: 10; pointer-events: none;
  background: var(--card); color: var(--fg); border: 1px solid var(--edge); border-radius: 10px;
  padding: 10px 12px; font-size: 13px; line-height: 1.4; max-width: 240px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.tip strong { display: block; font-size: 15px; }
.tip .sub { color: var(--muted); }

footer { margin-top: 48px; color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.sprite { position: absolute; width: 0; height: 0; }
.legend .l-good { background: var(--good); }
.legend .l-slow { background: var(--warning); }
.legend .l-down { background: var(--critical); }
.legend .l-maint { background: var(--maint); }
.legend .l-none { background: var(--nodata); }
