:root {
  --bg: #f5f7fa; --card: #ffffff; --text: #151922; --muted: #6b7380; --line: #e8ebf0; --soft: #f1f4f8;
  --ok: #16a34a; --ok-bg: #e8f8ee; --warn: #d97706; --warn-bg: #fef3e2; --bad: #dc2626; --bad-bg: #fdecec; --none: #cfd5de; --none-bg: #eef1f5;
  --accent: #2563eb; --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .05);
  --glow: rgba(22, 163, 74, .14);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116; --card: #161a21; --text: #e9ecf1; --muted: #8b94a3; --line: #252b35; --soft: #1d222b;
    --ok: #34d399; --ok-bg: #11291f; --warn: #fbbf24; --warn-bg: #2b2210; --bad: #f87171; --bad-bg: #2d1616; --none: #343b47; --none-bg: #1e232c;
    --accent: #60a5fa; --shadow: none; --glow: rgba(52, 211, 153, .12);
  }
}
body[data-state="degraded"] { --glow: rgba(217, 119, 6, .14); }
body[data-state="outage"] { --glow: rgba(220, 38, 38, .14); }
body[data-state="unknown"] { --glow: rgba(120, 130, 150, .1); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); position: relative; min-height: 100vh;
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; }
.glow { position: absolute; inset: 0 0 auto 0; height: 420px; pointer-events: none;
  background: radial-gradient(60% 100% at 50% 0%, var(--glow), transparent 70%); }
.wrap { position: relative; max-width: 1040px; margin: 0 auto; padding: 20px 16px 56px; }
.muted { color: var(--muted); } .small { font-size: 12px; }
h1, h2, p { margin: 0; }

.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; }
.logo { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: #fff; font-size: 15px;
  background: linear-gradient(135deg, #2563eb, #7c3aed); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--card); border: 1px solid var(--line); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--none); }
[data-state="operational"] .dot { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
[data-state="degraded"] .dot { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-bg); }
[data-state="outage"] .dot { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }

.hero { text-align: center; margin-bottom: 24px; }
.hero h1 { font-size: 28px; letter-spacing: -.5px; line-height: 1.25; }
.hero .lead { color: var(--muted); margin-top: 8px; }
.hero h1 em { font-style: normal; }
[data-state="operational"] .hero h1 em { color: var(--ok); }
[data-state="degraded"] .hero h1 em { color: var(--warn); }
[data-state="outage"] .hero h1 em { color: var(--bad); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 22px; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-r { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.eyebrow { font-size: 12px; color: var(--muted); letter-spacing: .5px; }
.h2 { font-size: 16px; font-weight: 700; }

.stats { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stat { background: var(--soft); border-radius: 12px; padding: 10px 14px; }
.stat .v { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat.big .v { font-size: 24px; color: var(--ok); }
[data-state="degraded"] .stat.big .v { color: var(--warn); }
[data-state="outage"] .stat.big .v { color: var(--bad); }
.stat .k { color: var(--muted); font-size: 12px; margin-top: 2px; }

.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.day { border-radius: 10px; padding: 7px 4px; text-align: center; background: var(--none-bg); }
.day .d { font-size: 12px; color: var(--muted); }
.day .p { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.day .b { height: 4px; border-radius: 2px; margin: 6px 8px 0; background: var(--none); }
.day.operational { background: var(--ok-bg); } .day.operational .b { background: var(--ok); } .day.operational .p { color: var(--ok); }
.day.degraded { background: var(--warn-bg); } .day.degraded .b { background: var(--warn); } .day.degraded .p { color: var(--warn); }
.day.outage { background: var(--bad-bg); } .day.outage .b { background: var(--bad); } .day.outage .p { color: var(--bad); }

.sub-h { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.sub-h .muted { font-weight: 400; font-size: 12px; margin-left: 6px; }
.strip { display: flex; gap: 1px; height: 30px; align-items: flex-end; overflow: hidden; }
.strip i { flex: 1; min-width: 0; border-radius: 2px; background: var(--ok); opacity: .85; }
.strip i.empty { background: var(--none); opacity: .45; height: 8%; }
.strip i.fail { background: var(--bad); opacity: 1; height: 100% !important; }
.rule { margin-top: 10px !important; }

.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-h h2 { font-size: 17px; }
#groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; margin-bottom: 22px; }
#pricing .card { margin-bottom: 0; padding: 0; overflow: hidden; }
#pricing { margin-bottom: 0; }
.g-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.g-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.g-spec { color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 2px; }
.tag { font-size: 11px; white-space: nowrap; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.g-price { text-align: right; white-space: nowrap; }
.g-price b { font-size: 20px; font-variant-numeric: tabular-nums; }
.g-price small { color: var(--muted); font-size: 12px; margin-left: 2px; }
.g-price div { color: var(--muted); font-size: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 16px; font-size: 14px; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--soft); }
td.mid { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; white-space: nowrap; }
td.mid .mid-copy { position: relative; display: inline-block; cursor: pointer; border-radius: 6px; padding: 1px 4px; margin: -1px -4px; max-width: 100%; }
td.mid .mid-copy:hover, td.mid .mid-copy:focus-visible { background: var(--soft); outline: none; }
td.mid .mid-copy em { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); padding: 0 5px; border-radius: 4px; background: var(--soft);
  font-family: -apple-system, "PingFang SC", sans-serif; font-style: normal; font-size: 11px; color: var(--accent); display: none; white-space: nowrap; }
td.mid .mid-copy:hover em, td.mid .mid-copy:focus-visible em, td.mid .mid-copy.copied em { display: block; }
td.pr { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.infobar { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 9px 14px; margin-bottom: 16px; box-shadow: var(--shadow); }
.notices { flex: 1 1 320px; min-width: 0; }
.nt { display: flex; align-items: baseline; gap: 8px; font-size: 13px; line-height: 1.6; flex-wrap: wrap; }
.nt .badge { font-size: 11px; font-weight: 600; padding: 0 7px; border-radius: 999px; background: rgba(37, 99, 235, .12); color: var(--accent); }
.nt.warn .badge { background: var(--warn-bg); color: var(--warn); }
.contacts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.copy { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--soft); color: var(--text);
  border-radius: 10px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.copy:hover { border-color: var(--accent); }
.copy span { color: var(--muted); font-size: 12px; }
.copy b { font-weight: 600; }
.copy em { font-style: normal; color: var(--accent); font-size: 12px; }
.bulk { margin: -6px 0 12px; }
footer { text-align: center; color: var(--muted); font-size: 12px; margin-top: 8px; }

@media (max-width: 640px) {
  .wrap { padding-top: 14px; }
  .top { margin-bottom: 24px; }
  .hero h1 { font-size: 25px; }
  .card { padding: 16px; border-radius: 16px; margin-bottom: 20px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 12px; }
  .stat .v { font-size: 18px; }
  .stat.big { grid-column: 1 / -1; }
  .stat.big .v { font-size: 28px; }
  .sec-h { flex-direction: column; gap: 2px; align-items: flex-start; }
  .bulk { margin-top: 0; }
  .days { gap: 5px; }
  .day { padding: 8px 2px; }
  .day .d { font-size: 11px; }
  .day .p { font-size: 11px; letter-spacing: -.4px; }
  .day .b { margin: 6px 5px 0; }
  .g-h { padding: 14px 16px; }
  th, td { padding: 10px 16px; }
  .g-price b { font-size: 21px; }
  td.mid { font-size: 12px; }
  .card-h { flex-direction: column; align-items: flex-start; gap: 8px; }
  .card-r { justify-content: flex-start; }
}

/* 嵌入 Sub2API 自定义菜单（iframe）时：宿主已有品牌与标题，去掉重复，整体更紧凑 */
.embed .top, .embed .hero, .embed .glow { display: none; }
.embed .wrap { padding-top: 12px; max-width: 1200px; }
.embed body { background: transparent; }
