:root {
  --bg: #0f1117; --panel: #171a23; --line: #262a37; --fg: #e9eaf0; --muted: #969bb0;
  --rsa: #e07a5f; --ec: #3d9be9; --pq: #b07cf0; --act: #7fd4c1; --leaf: #f2c14e;
  --ok: #3ccf8e; --bad: #ff5d5d;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--ec); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.top { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; padding-bottom: 6px; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: .2px; }
.bird { font-size: 22px; }
.gh { font-size: 14px; color: var(--muted); text-decoration: none; border: 1px solid var(--line); padding: 6px 10px; border-radius: 8px; }
.gh:hover { color: var(--fg); }

.status { display: flex; gap: 18px; align-items: flex-start; margin: 14px 0 10px; padding: 24px; border-radius: 16px;
  background: linear-gradient(135deg, #14261f, #121821); border: 1px solid #1f4a37; }
.status.alert { background: linear-gradient(135deg, #3a1517, #1a1218); border-color: #6b2228; }
.status.loading { background: var(--panel); border-color: var(--line); }
.status-dot { flex: none; width: 18px; height: 18px; margin-top: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 6px rgba(60,207,142,.15); animation: pulse 2.4s infinite; }
.status.alert .status-dot { background: var(--bad); box-shadow: 0 0 0 6px rgba(255,93,93,.18); }
.status.loading .status-dot { background: var(--muted); }
@keyframes pulse { 50% { box-shadow: 0 0 0 11px rgba(60,207,142,0); } }
.status h1 { margin: 0; font-size: clamp(26px, 5.4vw, 42px); line-height: 1.12; letter-spacing: -.5px; }
.status p { margin: 8px 0 0; color: #c4c7d4; }
.alert-list { margin: 10px 0 0; padding-left: 18px; }
.alert-list li { margin: 4px 0; }

.meta { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-size: 14px; margin: 0 2px 18px; }
.meta b { color: var(--fg); font-weight: 600; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.card .n { font-size: clamp(24px, 4vw, 32px); font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.card .l { color: var(--muted); font-size: 13px; }
.card .s { font-size: 13px; color: #c4c7d4; margin-top: 2px; }
.card.pq .n { color: var(--pq); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; min-width: 0; }
.panel h2 { margin: 0 0 4px; font-size: 19px; }
.hint { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two .panel { margin-bottom: 16px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); margin-bottom: 8px; align-items: center; }
.sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw.rsa { background: var(--rsa); } .sw.ec { background: var(--ec); } .sw.pq { background: var(--pq); }
.sw.act { background: var(--act); } .sw.leaf { background: var(--leaf); }
.chart svg { display: block; width: 100%; height: auto; }
.chart text { font: 11px system-ui, sans-serif; fill: var(--muted); }

.share { margin: 14px 0; }
.share .t { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; gap: 8px; }
.share .t span:last-child { color: var(--muted); white-space: nowrap; }
.bar { display: flex; height: 30px; border-radius: 8px; overflow: hidden; background: #222634; font-weight: 700; font-size: 13px; color: #15161d; }
.bar div { display: flex; align-items: center; padding: 0 10px; white-space: nowrap; min-width: 0; }
.bar .r { background: var(--rsa); } .bar .e { background: var(--ec); justify-content: flex-end; } .bar .o { background: var(--pq); }

.iss { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 6px 10px; align-items: center; font-size: 13.5px; }
.iss .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iss .track { display: flex; height: 14px; border-radius: 4px; overflow: hidden; }
.iss .pc { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }

.kv { width: 100%; border-collapse: collapse; font-size: 14px; }
.kv td { padding: 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv td:last-child { text-align: right; font-variant-numeric: tabular-nums; padding-left: 10px; }
.kv tr:last-child td { border-bottom: 0; }

.rules { margin: 6px 0 0; padding-left: 0; list-style: none; counter-reset: r; }
.rules li { padding: 12px 0 12px 44px; position: relative; border-bottom: 1px solid var(--line); }
.rules li:last-child { border-bottom: 0; }
.rules li::before { content: attr(data-k); position: absolute; left: 0; top: 12px; width: 30px; height: 30px; border-radius: 8px;
  background: #222634; display: grid; place-items: center; font-weight: 700; color: var(--leaf); }
.rules b { display: block; margin-bottom: 2px; }
.rules small { color: var(--muted); font-size: 13px; display: block; margin-top: 4px; }
.pill { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; margin-left: 6px; vertical-align: 1px; font-weight: 600; }
.pill.ok { background: rgba(60,207,142,.14); color: var(--ok); } .pill.bad { background: rgba(255,93,93,.16); color: var(--bad); }

.entry { border-left: 3px solid var(--bad); padding: 4px 0 4px 12px; margin: 10px 0; }
.entry .d { color: var(--muted); font-size: 13px; }
.entry .x { font-size: 13px; color: #c4c7d4; font-family: ui-monospace, Menlo, monospace; overflow-wrap: anywhere; }
.empty { color: var(--muted); }

.prose p, .prose li { color: #cfd2dd; }
.prose ul { padding-left: 20px; }
.idea { border-left: 3px solid var(--leaf); padding-left: 12px; font-style: italic; }
.foot { color: var(--muted); font-size: 13px; padding-top: 6px; padding-bottom: 34px; }
.foot a { color: var(--muted); }

@media (max-width: 820px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .two { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 12px; }
  .status { padding: 18px 16px; gap: 12px; }
  .status-dot { width: 14px; height: 14px; margin-top: 9px; }
  .panel { padding: 14px; }
  .card { padding: 12px; }
}
