* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
:root {
  --ink: #0b0b0b;
  --muted: #6e6e73;
  --muted-2: #9a9aa0;
  --line: #e8e8e8;
  --line-soft: #f1f1f1;
  --bg: #ffffff;
  --s0: #2fae55;
  --s1: #d8a52b;
  --s2: #e07b39;
  --s3: #d93f3f;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.page { max-width: 680px; margin: 0 auto; padding: 34px 22px 60px; }

/* header */
.hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.brand { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; }
.subscribe {
  background: #111; color: #fff; text-decoration: none;
  font-size: 13px; font-weight: 500; padding: 9px 16px; border-radius: 8px;
  transition: background .15s;
}
.subscribe:hover { background: #333; }

/* alert / incident card */
.alert { margin-bottom: 18px; }
.all-ok {
  background: #2fae55; color: #fff; border-radius: 8px;
  padding: 13px 18px; font-size: 14.5px; font-weight: 500;
}
.inc-card { border: 1px solid #f0c9c9; border-radius: 10px; overflow: hidden; background: #fff; }
.inc-head {
  background: #fdeaea; color: #c0392b; font-weight: 600; font-size: 14.5px;
  padding: 11px 16px; display: flex; align-items: center; gap: 9px;
  border-bottom: 1px solid #f6dada;
}
.inc-head .warn { font-size: 15px; }
.inc-item { padding: 16px; }
.inc-item + .inc-item { border-top: 1px solid var(--line-soft); }
.inc-tag { display: inline-block; color: #c0392b; font-size: 12.5px; font-weight: 600; margin-bottom: 10px; }
.inc-title-row { display: flex; gap: 9px; align-items: flex-start; }
.inc-title-ico { color: #d93f3f; flex: 0 0 auto; margin-top: 1px; }
.inc-title { font-size: 14.5px; font-weight: 600; }
.inc-body { color: #3a3a3c; font-size: 13.5px; margin: 8px 0 0 23px; }
.inc-meta { color: var(--muted); font-size: 12.5px; margin: 10px 0 0 23px; }

/* system status card */
.status-card { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.sc-head { display: flex; align-items: center; gap: 18px; padding: 15px 18px; border-bottom: 1px solid var(--line-soft); }
.sc-title { font-size: 15px; font-weight: 600; margin: 0; }
.sc-range { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.sc-range .arrow { color: var(--muted-2); cursor: default; font-size: 15px; }

.rows { padding: 2px 18px 6px; }
.row { padding: 15px 0; }
.row + .row { border-top: 1px solid var(--line-soft); }
.row-top { display: flex; align-items: center; gap: 9px; width: 100%; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.chev { transition: transform .16s ease; }
.row.open .chev { transform: rotate(90deg); }
.sub { margin: 12px 0 2px 26px; padding-left: 14px; border-left: 2px solid var(--line-soft); }
.sub-item { padding: 7px 0; }
.sub-item + .sub-item { border-top: 1px solid var(--line-soft); }
.sub-top { display: flex; align-items: center; gap: 8px; }
.dot-s { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--s0); }
.dot-s.s1 { background: var(--s1); }
.dot-s.s2 { background: var(--s2); }
.dot-s.s3 { background: var(--s3); }
.sub-name { font-size: 13px; }
.sub-up { margin-left: auto; font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
.bar.mini { height: 6px; margin-top: 6px; gap: 1px; }
.bar.mini span { border-radius: 1px; min-width: 1px; }
.st-ico { width: 17px; height: 17px; flex: 0 0 auto; display: inline-flex; }
.st-ico svg { width: 17px; height: 17px; }
.ico-ok { color: var(--s0); }
.ico-mid { color: var(--s1); }
.ico-bad { color: var(--s3); }
.g-name { font-size: 14px; font-weight: 600; }
.g-count { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 3px; }
.g-count .chev { color: var(--muted-2); font-size: 14px; }
.g-uptime { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }

.bar { display: flex; gap: 2px; margin-top: 10px; height: 9px; }
.bar span { flex: 1 1 0; border-radius: 1.5px; min-width: 2px; }
.bar .s0 { background: var(--s0); }
.bar .s1 { background: var(--s1); }
.bar .s2 { background: var(--s2); }
.bar .s3 { background: var(--s3); }
.bar .nodata { background: #e3e3e3; }

.sc-foot { display: flex; justify-content: center; padding: 4px 0 16px; }
.history {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  color: #2b2b2b; text-decoration: none; font-size: 13px; background: #fff;
  transition: background .15s;
}
.history:hover { background: #f7f7f7; }

/* footer */
.foot { margin-top: 34px; text-align: center; color: var(--muted-2); font-size: 12px; }
.powered { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.powered b { color: #444; font-weight: 700; }
.disclaimer { max-width: 620px; margin: 0 auto; line-height: 1.6; color: #a2a2a8; }
.switcher { margin-top: 16px; }
.switcher a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.switcher a:hover { color: var(--ink); }

.row-skeleton { height: 52px; border-radius: 8px; background: linear-gradient(100deg,#f0f0f0 30%,#f7f7f7 50%,#f0f0f0 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@media (max-width: 560px) {
  .brand { font-size: 22px; }
  .sc-head { flex-wrap: wrap; gap: 8px; }
  .g-uptime { font-size: 11.5px; }
}

/* ---- brand link + minor fidelity tweaks ---- */
a.brand { text-decoration: none; color: inherit; }
.page { max-width: 660px; }
.brand { font-size: 23px; font-weight: 700; }
.subscribe { font-weight: 500; }

/* ---- history page ---- */
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .sep { color: var(--muted-2); }
.crumbs .cur { color: var(--muted); }
.hist-head { display: flex; align-items: center; gap: 18px; margin: 4px 0 10px; border-bottom: 1px solid var(--line-soft); padding-bottom: 14px; }
.hist-title { font-size: 15px; font-weight: 600; margin: 0; }
.filter { margin-left: auto; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 14px; font: inherit; font-size: 13px; color: #2b2b2b; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.filter:hover { background: #f7f7f7; }
.filter .fchev { color: var(--muted-2); }
.months { margin-top: 6px; }
.h-month { font-size: 13px; font-weight: 600; color: #111; margin: 24px 0 4px; }
.h-day { display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line-soft); }
.h-month + .h-day { border-top: 0; }
.h-date { width: 46px; flex: 0 0 auto; }
.h-date .dnum { font-size: 15px; font-weight: 600; color: #111; line-height: 1.2; }
.h-date .dwd { font-size: 12px; color: var(--muted); }
.h-incidents { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.h-inc { border-left: 3px solid var(--s0); padding-left: 14px; }
.h-inc.impact-critical { border-color: var(--s3); }
.h-inc.impact-major { border-color: var(--s2); }
.h-inc.impact-minor { border-color: var(--s1); }
.h-inc.impact-none { border-color: var(--s0); }
.h-inc.exp { cursor: pointer; }
.h-inc-top { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.h-inc-title { font-size: 13.5px; font-weight: 600; color: #111; }
.h-inc-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.h-inc-body { font-size: 13px; color: #5b5b60; margin-top: 4px; line-height: 1.5; }
.h-ups { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.upd { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 8px 0; font-size: 12.5px; }
.upd .upd-st { font-weight: 600; color: #333; text-transform: capitalize; }
.upd .upd-b { color: #5b5b60; flex: 1 1 100%; }
.upd .upd-t { color: var(--muted-2); font-size: 11.5px; }
