/* ============================================================
   Status page — 系统与线路状态
   依赖 base.css / pages.css；仅用既有 token，类名统一 .st- 前缀
   结构：总状态条 → 4 个数字 → 核心服务 → 9 条线路 → 历史事件
   ============================================================ */

/* ---------- 页头 ---------- */
.st-eyebrow{margin-top:24px}
.st-stamp{font-family:var(--f-mono);font-size:12px;line-height:20px;color:var(--ink-3);white-space:nowrap}
.st-stamp .mono{font-size:12px;color:var(--ink-2)}

/* ---------- 概览 ---------- */
.st-strip{align-items:center}
.st-stats{margin-top:24px}

/* ---------- 区块 ---------- */
.st-block{margin-top:56px}
.st-row{margin-bottom:24px;align-items:flex-end}
.st-hd{min-width:0}
.st-hd .sec2-sub{margin-top:8px;max-width:620px}
.st-row .sec2-title{margin-top:0}
.st-row-note{flex:none;font-size:13px;line-height:22px;color:var(--ink-3);white-space:nowrap}

/* ---------- 数据表（核心服务 / 中转线路共用） ---------- */
.st-panel .table-wrap{overflow-x:auto}
.st-table{min-width:0;table-layout:fixed}
.st-table tbody td{padding-top:16px;padding-bottom:16px}
.st-table tbody tr:hover td{background:var(--soft-2)}
.st-table thead th:first-child,
.st-table tbody td:first-child{padding-left:24px}
.st-table thead th:last-child,
.st-table tbody td:last-child{padding-right:24px}

/* 核心服务 */
.st-svc-table th:first-child{width:48%}
.st-svc-table th:nth-child(2){width:18%}
.st-svc-table th:nth-child(3){width:34%}
.st-svc-name{display:flex;align-items:center;gap:12px;min-width:0}
.st-ic{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:9px;background:var(--tint);border:1px solid var(--brand-line);color:var(--brand);flex:none}
.st-svc-name b{display:block;font-size:15px;line-height:24px;font-weight:600;color:var(--ink)}
.st-svc-name small{display:block;font-size:12px;line-height:18px;color:var(--ink-3)}
.st-pill{background:#fff;border-color:var(--line);color:var(--ink);gap:8px}
.st-pill .dot{width:8px;height:8px}
.st-avail{display:flex;align-items:center;justify-content:flex-end;gap:16px}
.st-avail-v{font-size:13px;line-height:20px;color:var(--ink);font-variant-numeric:tabular-nums}
.st-uptime{width:220px;height:24px;flex:none}

/* 中转线路 */
.st-line-table th:first-child{width:16%}
.st-line-table th:nth-child(2){width:23%}
.st-line-table th:nth-child(3){width:17%}
.st-line-table th:nth-child(4){width:12%}
.st-line-table th:nth-child(5){width:32%}
.st-line{display:flex;align-items:baseline;gap:8px;min-width:0}
.st-line b{font-size:15px;line-height:24px;font-weight:600;color:var(--ink);white-space:nowrap}
.st-code{font-size:11px;line-height:18px;color:var(--ink-3);letter-spacing:.04em}
.st-path{font-size:14px;line-height:24px;color:var(--ink-2);white-space:nowrap}
.st-ar{color:var(--ink-4);margin:0 2px}
.st-lat{white-space:nowrap;font-size:13px;color:var(--ink)}
.st-na{color:var(--ink-4)}
.st-line-table .st-uptime{width:100%;max-width:260px}
.st-line-table .st-avail{justify-content:flex-end}

/* 图例：沿用 .uptime-legend，色块由本页给出 */
.st-legend{gap:14px;flex:none}
.st-lg{display:inline-block;width:10px;height:10px;border-radius:2px}
.st-lg-ok{background:var(--brand-line)}
.st-lg-warn{background:#E9A23B}
.st-lg-bad{background:var(--off)}
.st-lg-off{background:var(--soft);box-shadow:inset 0 0 0 1px var(--line-3)}

/* 表格脚注 */
.st-panel-foot{gap:24px}
.st-panel-foot p{max-width:760px;line-height:22px}

/* ---------- 历史事件 ---------- */
.st-filter{flex:none}
.st-timeline{
  margin-top:8px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--r);
  overflow:hidden;
}
.st-inc{
  display:grid;
  grid-template-columns:96px minmax(0,1fr);
  gap:28px;
  padding:24px 28px;
}
.st-inc + .st-inc{border-top:1px solid var(--line)}
.st-inc[hidden]{display:none}
.st-inc-date{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:2px;
  padding-top:2px;
  text-align:right;
}
.st-inc-day{font-size:20px;line-height:26px;font-weight:500;color:var(--ink);letter-spacing:-.01em}
.st-inc-year{font-size:11px;line-height:16px;color:var(--ink-4);letter-spacing:.06em}
.st-inc-body{position:relative;min-width:0;padding-left:24px;border-left:1px solid var(--line)}
.st-inc-body::before{
  content:"";
  position:absolute;
  left:-4.5px;
  top:9px;
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--brand);
}
.st-inc-top{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.st-inc-title{font-size:17px;line-height:26px;font-weight:600;color:var(--ink)}
.st-inc-meta{margin-top:6px;font-size:12px;line-height:18px;color:var(--ink-3);letter-spacing:.02em}
.st-inc-desc{margin-top:8px;max-width:820px;font-size:14px;line-height:24px;color:var(--ink-2)}
.st-inc-empty{padding:32px;text-align:center;font-size:14px;color:var(--ink-3)}

/* ---------- 页尾 CTA ---------- */
.st-cta-ghost{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:52px;
  padding:0 24px;
  border:1px solid rgba(255,255,255,.45);
  border-radius:var(--r-btn);
  color:#fff;
  font-size:15px;
  font-weight:600;
  white-space:nowrap;
  transition:border-color .16s,background-color .16s;
}
.st-cta-ghost:hover{border-color:#fff;background:rgba(255,255,255,.08);box-shadow:none}

/* ---------- 订阅弹窗 ---------- */
.st-sub-form{display:flex;flex-direction:column;gap:18px}
.st-sub-opts{border:0;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.st-sub-opts legend{padding:0;margin-bottom:6px;font-size:14px;line-height:24px;font-weight:600;color:var(--ink)}
.st-sub-note{font-size:12px;line-height:20px;color:var(--ink-3)}
.st-sub-form .dlg-actions{margin-top:4px}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width:1024px){
  .st-strip{gap:16px}
  .st-row-note{white-space:normal;text-align:right}
  .st-uptime{width:150px}
  .st-avail{gap:12px}
  .st-svc-table th:first-child{width:42%}
  .st-svc-table th:nth-child(3){width:40%}
  .st-line-table th:first-child{width:17%}
  .st-line-table th:nth-child(2){width:21%}
  .st-line-table th:nth-child(3){width:17%}
  .st-line-table th:nth-child(4){width:12%}
  .st-line-table th:nth-child(5){width:33%}
  .st-line-table .st-uptime{width:150px;max-width:150px}
  .st-line-table .st-avail{gap:10px}
}
@media (max-width:860px){
  .st-row{flex-direction:column;align-items:flex-start;gap:16px}
  .st-row-note{text-align:left}
  .st-legend{flex-wrap:wrap}
  .st-filter{align-self:flex-start}
}
@media (max-width:900px){
  /* 表格 → 卡片 */
  .st-panel .table-wrap{overflow:visible}
  .st-table,
  .st-table tbody{display:block}
  .st-table thead{display:none}
  .st-table tbody tr{
    display:grid;
    gap:12px;
    padding:18px;
    border:1px solid var(--line);
    border-radius:var(--r);
    background:#fff;
  }
  .st-table tbody tr + tr{margin-top:12px}
  .st-table tbody td{display:block;padding:0;border:0}
  .st-table thead th:first-child,
  .st-table tbody td:first-child,
  .st-table thead th:last-child,
  .st-table tbody td:last-child{padding-left:0;padding-right:0}
  .st-uptime{gap:1px}
  .st-uptime i{min-width:1px;border-radius:0}
  .st-table tbody tr:hover td,
  .st-table tbody td{background:transparent}
  .st-table tbody tr:hover td{background:transparent}

  /* 核心服务卡 */
  .st-svc-table tbody tr{grid-template-columns:minmax(0,1fr) auto;align-items:center}
  .st-svc-table td:first-child{grid-column:1}
  .st-svc-table td:nth-child(2){grid-column:2;justify-self:end}
  .st-svc-table td:nth-child(3){grid-column:1/-1;padding-top:14px;border-top:1px solid var(--line)}
  .st-svc-table .st-avail{justify-content:space-between;gap:20px}
  .st-svc-table .st-uptime{width:auto;flex:1;max-width:none;height:22px}

  /* 线路卡 */
  .st-line-table tbody tr{
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:
      "line state"
      "path path"
      "lat lat"
      "avail avail";
    align-items:center;
  }
  .st-line-table td:nth-child(1){grid-area:line}
  .st-line-table td:nth-child(2){grid-area:path;display:flex;align-items:center;gap:8px;font-size:13px}
  .st-line-table td:nth-child(2)::before{content:"传输路径";font-size:12px;line-height:18px;color:var(--ink-3);flex:none}
  .st-line-table td:nth-child(3){grid-area:state;justify-self:end}
  .st-line-table td:nth-child(4){
    grid-area:lat;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding-top:12px;
    border-top:1px solid var(--line);
  }
  .st-line-table td:nth-child(4)::before{content:"当前延迟";font-size:12px;line-height:18px;color:var(--ink-3)}
  .st-line-table td:nth-child(5){grid-area:avail;display:flex;flex-direction:column;gap:6px;align-items:stretch}
  .st-line-table td:nth-child(5)::before{content:"可用率 / 近 90 天";font-size:12px;line-height:18px;color:var(--ink-3)}
  .st-line-table td:nth-child(4),
  .st-line-table td:nth-child(5){text-align:left}
  .st-line-table .st-avail{flex-direction:row;justify-content:space-between;gap:16px}
  .st-line-table .st-avail-v{order:1}
  .st-line-table .st-uptime{order:2;flex:1;max-width:none;width:auto;height:22px}
  .st-line-table .st-path{white-space:normal}
  .st-panel-foot{flex-direction:column;align-items:flex-start;gap:10px}

}

@media (max-width:760px){
  .st-eyebrow{margin-top:20px}
  .st-stamp{white-space:normal}
  .st-block{margin-top:40px}
  .st-row{margin-bottom:20px}
  .st-row .sec2-title{font-size:26px;line-height:34px}

  /* 历史事件 */
  .st-filter{width:100%;display:flex}
  .st-filter .tab-btn{flex:1;justify-content:center;padding:0 10px}
  .st-timeline{margin-top:16px}
  .st-inc{grid-template-columns:1fr;gap:10px;padding:20px 18px}
  .st-inc-date{flex-direction:row;align-items:baseline;justify-content:flex-start;gap:8px;text-align:left;padding-top:0}
  .st-inc-day{font-size:15px;line-height:24px;font-weight:600;color:var(--ink-3)}
  .st-inc-year{font-size:11px;line-height:16px}
  .st-inc-body{padding-left:16px}
  .st-inc-body::before{left:-4px;top:8px}
  .st-inc-title{font-size:16px;line-height:24px}
  .st-inc-desc{font-size:14px;line-height:23px}

  /* 页尾 CTA：两个动作等宽纵向排列 */
  .cta-band .cta-actions{display:flex;flex-direction:column;width:100%;gap:12px}
  .cta-band .cta-actions .btn-white{width:100%}
  .st-cta-ghost{width:100%}
}
@media (max-width:420px){
  .st-legend{gap:10px;font-size:11px}
  .st-svc-name b{font-size:14px}
  .st-svc-name small{font-size:11.5px;line-height:17px}
  .st-inc-top{gap:8px}
  .st-filter .tab-btn{font-size:13px;padding:0 6px}
  .st-filter .tab-btn .n{display:none}
}
/* ============================================================

.st-live-uptime i.unknown{background:#e3e5e2}.st-live-uptime i{cursor:help}.st-data-error{padding:12px;color:#8a5800;background:#fff5d6;border-radius:8px;margin-top:16px}
