/* ── 卡片 ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 24px 20px;
  display: flex; flex-direction: column;
  min-height: 0;
}
.card.alarm { border-color: var(--lv-soft); box-shadow: inset 3px 0 0 var(--lv); }
.card-h { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; }
.card-h .t { font-size: 24px; font-weight: 600; }
.card-h .s { font-size: 19px; color: var(--muted); }
.card-h .r { margin-left: auto; font-size: 19px; color: var(--muted); font-family: var(--mono); }

/* ── KPI ─────────────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); grid-template-rows: 1fr 1fr; gap: 20px; flex: 1; min-height: 0; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px 16px; display: flex; flex-direction: column; gap: 6px; }
.kpi.alarm { border-color: var(--lv-soft); box-shadow: inset 3px 0 0 var(--lv); }
/* 没有迷你线的卡（LQS）内容少：既不靠上也不堆在中间，
   三行标签 / 数值 / 徽章上下分散，把整张卡撑匀 */
.kpi.center { justify-content: space-between; gap: 10px; }
.kpi.center .chips { margin-top: 0; }
.kpi .l { font-size: 22px; color: var(--ink-2); }
.kpi .v { font-size: 80px; font-weight: 600; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .v.alarm { color: var(--lv-ink); }
.kpi .v u { font-size: 30px; font-weight: 500; color: var(--muted); margin-left: 8px; text-decoration: none; }
.kpi .v .star { font-size: 34px; margin-left: 6px; }
.kpi .d { font-size: 20px; color: var(--muted); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.kpi .d .up   { color: var(--green-ink); font-weight: 600; }
.kpi .d .down { color: var(--red-ink); font-weight: 600; }
.kpi .d .warn { color: var(--yellow-ink); font-weight: 600; }
/* 迷你线原来固定 42px 贴在卡底，一条细带看不出起伏。
   改成吃掉卡片剩下的高度，线在里面自适应纵向铺开。 */
.kpi svg { width: 100%; flex: 1; min-height: 64px; margin-top: auto; display: block; }
.kpi .bars { display: flex; gap: 4px; margin-top: auto; flex: 1; min-height: 64px; align-items: flex-end; }
.kpi .bars i { display: block; flex: 1; border-radius: 3px; border: 0; padding: 0; }
.kpi .bars i.clickable { cursor: pointer; }
.kpi .bars i.clickable:active { opacity: .6; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.chip {
  font-size: 20px; font-weight: 500;
  padding: 5px 14px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2);
}
.chip.ok  { background: var(--green-soft);  color: var(--green-ink); }
.chip.bad { background: var(--red-soft);    color: var(--red-ink); }
.chip.warn{ background: var(--yellow-soft); color: var(--yellow-ink); }
.chip.acc { background: var(--accent-soft); color: var(--accent-ink); }
.chip.orange { background: var(--orange-soft); color: var(--orange-ink); }

/* ── 数据新鲜度 ──────────────────────────────────────────── */
.fresh { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px 34px; }
.fresh .row { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.fresh .row i { width: 10px; height: 10px; border-radius: 50%; display: block; flex: none; }
.fresh .row .k { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fresh .row .c { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 18px; flex: none; }
.dot-green { background: var(--green); } .dot-yellow { background: var(--yellow); }
.dot-orange { background: var(--orange); } .dot-blue { background: var(--accent); }
.dot-red { background: var(--red); } .dot-de { background: var(--de); }

/* ── 增量 / 告警 ─────────────────────────────────────────── */
.delta-row {
  display: grid; grid-template-columns: 8px 1fr; gap: 14px;
  background: var(--surface-2); border-radius: 10px; overflow: hidden;
}
.delta-row + .delta-row { margin-top: 10px; }
.delta-row .bar { background: var(--lv); }
.delta-row .b { padding: 14px 14px 14px 0; font-size: 22px; line-height: 1.45; }
.delta-row .k { font-size: 18px; font-weight: 600; letter-spacing: .08em; color: var(--muted); margin-right: 10px; }

.alert-list { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }
.alert {
  display: grid; grid-template-columns: 8px 1fr auto; gap: 14px;
  background: var(--surface-2); border-radius: 10px; overflow: hidden; flex: none;
}
.alert .bar { background: var(--lv); }
/* 告警卡整体收一号：字太大时一屏只放得下两三条，
   而「需要关注」恰恰是最需要一眼看全的清单 */
.alert .b { padding: 11px 0; min-width: 0; }
.alert .t { font-size: 25px; font-weight: 600; line-height: 1.25; }
.alert .d { font-size: 19px; color: var(--ink-2); line-height: 1.45; margin-top: 5px;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.alert .m { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.alert .lv { padding: 11px 14px 0 0; }
.alert .lv span {
  font-size: 18px; font-weight: 700; letter-spacing: .08em;
  padding: 3px 10px; border-radius: 6px;
  background: var(--lv-soft); color: var(--lv-ink);
}
.owner {
  font-size: 18px; font-weight: 500;
  padding: 2px 10px; border-radius: 6px;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink-2);
}
.since { font-size: 18px; color: var(--muted); font-family: var(--mono); }
.more-line {
  margin-top: auto; display: flex; align-items: center; gap: 14px;
  padding-top: 8px; border-top: 1px solid var(--line-2); flex: none;
  font-size: 21px; color: var(--muted);
}
.more-line .nx { margin-left: auto; color: var(--accent-ink); }

/* ── 表格 ────────────────────────────────────────────────── */
table.wall { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.wall th {
  text-align: left; padding: 12px 12px;
  font-size: 20px; letter-spacing: .06em; color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.wall td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); font-size: 24px; }
/* 列多的榜单表（竞品对标）字号收一号，否则十列挤不下。
   行距固定的话，密度档不同、剩余空间也不同，总有一档会空半张卡：
   让表格撑满容器，多出来的高度由各行平分。内容超了照常滚。 */
table.wall.dense { height: 100%; }
/* 谁在说话：矩阵保持紧凑，剩余高度交给下面的样本小结 */
table.wall.matrix td, table.wall.matrix th { vertical-align: middle; }

/* 样本小结：读问题清单前的前提，纯文字，行距舒展一点填住整列 */
.snotes-wrap { flex: 1; min-height: 0; margin-top: 14px; }
.snotes { margin: 0; padding: 0; list-style: none; min-height: 100%;
          display: flex; flex-direction: column; justify-content: space-evenly; gap: 10px;
          overflow-y: auto; overscroll-behavior: contain; }
.snotes li { position: relative; padding-left: 20px; font-size: 20px; line-height: 1.55;
             color: var(--ink-2); }
.snotes li::before { content: ""; position: absolute; left: 3px; top: 12px;
                     width: 7px; height: 7px; border-radius: 50%; background: var(--de); }
.snotes b { color: var(--ink); font-variant-numeric: tabular-nums; }
.snotes b.down { color: var(--red-ink); }
table.wall.dense td { padding: 12px 8px; font-size: 21px; vertical-align: middle; }
table.wall.dense th { padding: 11px 8px; font-size: 18px; }
table.wall.dense td .sub { font-size: 17px; }
table.wall td.n, table.wall th.n { text-align: right; }
table.wall td.c, table.wall th.c { text-align: center; }
table.wall td .sub { font-size: 18px; color: var(--muted); font-family: var(--mono); }
table.wall tr.me td { background: var(--accent-soft); }
table.wall tr.me td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
table.wall td.dim { color: var(--muted); }
table.wall tfoot td { font-size: 20px; color: var(--muted); border-bottom: 0; padding-top: 14px; }
.up { color: var(--green-ink); } .down { color: var(--red-ink); }

/* ── S3 竞品页 ───────────────────────────────────────────── */
/* 汇总块：标签在上、数值居中、注解在下，整块撑满 */
.s3-tile { padding: 20px 22px; justify-content: space-between; min-height: 192px; }
.s3-tile .tl { font-size: 22px; color: var(--ink-2); }
.s3-tile .tv { font-size: 52px; font-weight: 600; font-variant-numeric: tabular-nums;
               line-height: 1.05; letter-spacing: -.01em; }
.s3-tile .ts { font-size: 20px; color: var(--muted); line-height: 1.4; }

/* 点带图并排各占半行。高度要和 stripPlot 的 viewBox 比例配上
   （1000 : 112），否则 meet 会把图整体缩小再居中，字就糊了 */
.s3-strip { padding: 10px 20px 8px; flex: none; height: 166px; }
.s3-strip .sh { display: flex; gap: 14px; align-items: baseline; flex: none; }
.s3-strip .sh .t { font-size: 20px; color: var(--ink-2); }
.s3-strip .sh .n { font-size: 18px; color: var(--muted); }
.s3-strip .sb { flex: 1; min-height: 0; }

/* ── 图表卡 ──────────────────────────────────────────────── */
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
              padding: 18px 22px; display: flex; flex-direction: column; min-height: 0; }
.chart-card .h { display: flex; align-items: baseline; gap: 16px; margin-bottom: 6px; }
.chart-card .h .t { font-size: 26px; font-weight: 600; }
.chart-card .h .s { font-size: 20px; color: var(--muted); margin-left: auto; }
/* 图注旁边的小按钮，别抢图的视线 */
.mini-btn {
  margin-left: 14px; flex: none;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  border-radius: 8px; padding: 4px 11px; font-size: 18px; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.mini-btn:active { border-color: var(--accent); color: var(--accent-ink); }
.tg-pick { display: flex; gap: 12px; flex-wrap: wrap; }
.tg-pick .bbtn { min-width: 120px; min-height: 64px; font-size: 26px; }
.chart-card svg { width: 100%; flex: 1; min-height: 0; display: block; }
.leg { display: flex; gap: 18px; font-size: 20px; color: var(--ink-2); margin-left: auto; }
.leg i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 7px; vertical-align: middle; }
.leg i.rect { height: 10px; }

/* ── 认可点 / 条形 ───────────────────────────────────────── */
.str { display: grid; grid-template-columns: 1fr 150px 48px; gap: 10px 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.str .t { font-size: 24px; font-weight: 600; }
.str .t .sid { font-family: var(--mono); font-size: 19px; color: var(--muted);
               font-weight: 600; margin-right: 9px; }
/* 引文放不下就换行，不省略——半句原话没有价值 */
.str .q { font-size: 19px; color: var(--muted); font-style: italic; margin-top: 3px;
          line-height: 1.45; overflow-wrap: anywhere; }
.str .track { height: 12px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.str .track i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.str .c { text-align: right; font-size: 26px; font-variant-numeric: tabular-nums; color: var(--ink); }

/* ── 模块条 ──────────────────────────────────────────────── */
.modbar { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 12px; }
.modt { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
        padding: 12px 14px; display: flex; flex-direction: column; gap: 7px;
        text-align: left; color: inherit; font: inherit; cursor: pointer; }
/* 选中的模块：下面的清单只留它。再点一次取消 */
.modt.on { border-color: var(--accent); background: var(--accent-soft); }
.modt.on .ml, .modt.on .mc b { color: var(--accent-ink); }
.modt .ml { font-size: 21px; font-weight: 600; }
.modt .mc { font-size: 19px; color: var(--muted); }
.modt .mc b { color: var(--ink); font-size: 24px; }
.modt .seg { display: flex; height: 7px; gap: 2px; border-radius: 2px; overflow: hidden; }
.modt .seg i { display: block; height: 100%; }
.seg .h { background: var(--red); } .seg .m { background: var(--orange); } .seg .l { background: var(--yellow); }

.sev { font-size: 20px; font-weight: 600; padding: 4px 12px; border-radius: 6px; white-space: nowrap; }
.sev.high { background: var(--red-soft); color: var(--red-ink); }
.sev.mid  { background: var(--orange-soft); color: var(--orange-ink); }
.sev.low  { background: var(--yellow-soft); color: var(--yellow-ink); }

.quote { font-size: 19px; color: var(--muted); font-style: italic; margin-top: 4px;
         display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* ── 评论筛选条（照参考页的 .filters）────────────────────── */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
           margin-bottom: 12px; flex: none; }
.filters .grp { display: flex; gap: 5px; flex-wrap: wrap; align-items: center;
                padding: 4px 6px; border: 1px solid var(--line); border-radius: 10px; }
.filters .grp > label { font-size: 17px; color: var(--muted); padding: 0 4px; }
.fbtn {
  border: 1px solid transparent; background: var(--surface-2); color: var(--ink-2);
  border-radius: 7px; padding: 5px 12px; font-size: 18px; cursor: pointer; min-height: 36px;
}
.fbtn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.filters select.st-in { min-height: 38px; font-size: 18px; padding: 4px 10px; width: auto; }

.rev-link { display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
            padding: 9px 12px; margin-bottom: 10px; flex: none;
            background: var(--accent-soft); border-radius: 9px; }
.rev-link .s { font-size: 18px; color: var(--accent-ink); }
.rev-link .chip b { margin-right: 6px; }
.rev-foot { flex: none; padding-top: 9px; margin-top: 9px; font-size: 18px;
            color: var(--muted); border-top: 1px solid var(--line-2); }

/* 评论卡里的归属标签，点了反查 */
.rtags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 9px; }
.rtag {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-2);
  border-radius: 7px; padding: 3px 10px; font-size: 17px; cursor: pointer;
  display: inline-flex; gap: 6px; align-items: baseline; max-width: 100%;
}
.rtag b { font-family: var(--mono); color: var(--muted); }
.rtag.iss.high { border-color: var(--red-soft); color: var(--red-ink); }
.rtag.iss.mid { border-color: var(--orange-soft); color: var(--orange-ink); }
.rtag.iss.low { border-color: var(--yellow-soft); color: var(--yellow-ink); }
.rtag.pos { border-color: var(--green-soft); color: var(--green-ink); }

/* 认可点整条可点，选中后右侧只看它引用的评论 */
.str.clickable { cursor: pointer; }
.str.clickable.on { background: var(--accent-soft); border-radius: 8px;
                    box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; }

/* ── 观察 ────────────────────────────────────────────────── */
.obs { display: flex; flex-direction: column; gap: 14px; }
.obs .o .t { font-size: 24px; font-weight: 600; margin-bottom: 4px; }
.obs .o .b { font-size: 20px; color: var(--ink-2); line-height: 1.5; }

/* ── 大数字块 ────────────────────────────────────────────── */
.bignums { display: flex; gap: 32px; }
.bignums .n { display: flex; flex-direction: column; gap: 2px; }
.bignums .v { font-size: 48px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.bignums .l { font-size: 20px; color: var(--muted); }
.bignums .l2 { font-size: 18px; color: var(--muted); }
.bignums { flex-wrap: wrap; gap: 28px 34px; }

/* 徽章词分布：本来就拿到了这八个桶，之前只合成一个数展示，太浪费 */
.badge-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px;
              flex: 1; min-height: 0; align-content: center; }
.bg { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.bg.off { opacity: .42; }
.bg .bv { font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.15; }
.bg .bl { font-size: 19px; color: var(--ink-2); margin-top: 2px; }
.bg .bh { font-size: 17px; color: var(--muted); margin-top: 1px; }

.hbar { display: grid; grid-template-columns: 64px 1fr 118px; gap: 12px; align-items: center; font-size: 21px; padding: 4px 0; }
.hist-body .hbar { grid-template-columns: 56px 1fr 112px 150px; padding: 6px 0; }
.hbar .k { color: var(--ink-2); }
.hbar .track { height: 18px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.hbar .track i.warn { background: var(--s2); }
.hbar .track i.bad  { background: var(--red); }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.hbar .v2 { text-align: right; font-size: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* 条内深色段 = 已验证购买，叠在总长度上 */
.hbar .track { position: relative; }
.hbar .track i.vp { position: absolute; left: 0; top: 0; background: var(--accent-ink); opacity: .85; }

/* 星级分布：条保持正常粗细（撑成色块反而难看），卡片只占内容需要的高度。
   多出来的高度让给上面的「谁在说话」——那是张表格，行拉开不违和。 */
.hist-body { flex: none; display: flex; flex-direction: column; gap: 0; }
.hist-body .hbar { padding: 7px 0; }
.hist-body .hbar .track { height: 26px; border-radius: 5px; }
.hist-body .hbar .track i { border-radius: 5px; }
.hist-body .note { margin-top: 12px; flex: none; }
.hist-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px;
            padding-top: 12px; border-top: 1px solid var(--line-2); flex: none; }
.hist-sum div { display: flex; flex-direction: column; gap: 3px; }
.hist-sum .k { font-size: 18px; color: var(--muted); }
.hist-sum b { font-size: 27px; font-weight: 600; font-variant-numeric: tabular-nums; }

.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 22px; }
.kv .k { color: var(--ink-2); }
.kv .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
/* 补充说明另起一行，别和主值挤在一起 */
.kv .v .sub { display: block; font-size: 19px; font-weight: 400; color: var(--muted); margin-top: 2px; }

.note { font-size: 19px; color: var(--muted); background: var(--surface-2);
        border-radius: 8px; padding: 10px 13px; line-height: 1.45; }
.note b { color: var(--ink); }

/* ── 日历热图 ────────────────────────────────────────────── */
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; font-size: 19px; color: var(--muted); text-align: center; margin-bottom: 6px; flex: none; }
/* 日历吃掉剩余高度，但下面的周汇总和摘要优先保住：
   画布小（宽松档）时让格子自己变矮，而不是把卡撑破 */
.cal { display: grid; grid-template-columns: repeat(7, 1fr);
       grid-auto-rows: minmax(0, 1fr); gap: 8px; flex: 1; min-height: 0; }
.cal .d {
  position: relative; border-radius: 8px; background: var(--seq-0);
  min-height: 52px; padding: 7px 10px;
  display: flex; flex-direction: column; gap: 2px; overflow: hidden;
  border: 1px solid transparent; cursor: pointer;
}
.cal .d.empty { background: none; border: 1px dashed var(--line); cursor: default; }
/* ── 明细弹窗 ────────────────────────────────────────────── */
/* 明细弹窗是居中的独立对话框，不从底部滑出：
   它是对某一条目的展开，不是一层新导航，居中更像「放大看这一条」 */
.sheet.detail {
  left: 50%; top: 50%; right: auto; bottom: auto;
  transform: translate(-50%, -50%);
  width: min(1180px, 78%); max-height: 78%;
  border: 1px solid var(--line); border-radius: 18px;
  padding: 26px 34px 30px; gap: 18px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .62);
  animation: popIn .2s cubic-bezier(.2,.8,.3,1);
}
@keyframes popIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
/* 评论详情内容多，用宽版 */
.sheet.detail.wide { width: min(1860px, 92%); max-height: 86%; }
.dt-chips { display: flex; gap: 9px; flex-wrap: wrap; flex: none; }
.dt-chips .chip { font-size: 19px; padding: 4px 13px; }
.sheet.detail .lvbar { width: 6px; height: 34px; align-self: center; border-radius: 3px;
                       background: var(--lv, var(--accent)); flex: none; }
.dt-body { overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 18px; }
.dt-kv { grid-template-columns: 200px 1fr; gap: 10px 24px; font-size: 21px; }
.dt-kv .v { text-align: left; }
.dt-blk .bh { font-size: 20px; color: var(--muted); margin-bottom: 6px;
              letter-spacing: .06em; font-weight: 600; }
.dt-blk .bb { font-size: 23px; line-height: 1.55; color: var(--ink); }
.dt-blk .ev { background: var(--surface-2); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; }
.dt-blk .ev .eq { font-size: 22px; line-height: 1.5; font-style: italic; }
.dt-blk .ev .em { font-size: 19px; color: var(--muted); margin-top: 5px; }

/* 可点开看全文的卡片 / 表格行 */
.alert.clickable, tr.clickable { cursor: pointer; }
.alert.clickable:active { background: var(--surface); }
tr.clickable:active td { background: var(--surface-2); }
.more-hint { font-size: 17px; color: var(--muted); margin-left: auto; padding-right: 14px; }

/* ── 图表点选数值卡 ──────────────────────────────────────── */
.hit { cursor: pointer; }
.hit.on { fill: rgba(124, 195, 226, .14); }
.chart-tip {
  position: absolute; z-index: 6; pointer-events: none;
  min-width: 260px; max-width: 420px;
  background: var(--surface-2); border: 1px solid var(--accent);
  border-radius: 10px; padding: 12px 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .55);
}
.chart-tip .tt { font-size: 22px; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.chart-tip .tr { display: flex; gap: 20px; font-size: 20px; line-height: 1.7; }
.chart-tip .tr span { color: var(--muted); }
.chart-tip .tr b { margin-left: auto; font-variant-numeric: tabular-nums; }

.cal .d.today { border-color: var(--accent-ink); }
/* 历史模式下正在看的那天，要比「今天」更抢眼，否则不知道自己停在哪 */
.cal .d.viewing { border-color: var(--yellow); box-shadow: inset 0 0 0 2px var(--yellow); }
/* 倒推补的那天用虚线框区分，别和实拍的混为一谈 */
.cal .d.recon { border-style: dashed; border-color: var(--accent-ink); }

/* 日历下方的周合计条 + 摘要，把同一份数据换角度再说一遍，
   免得 35 个格子里大半是空的时候整张卡显得空 */
.wk { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; flex: none; }
.wk .w { display: grid; grid-template-columns: 150px 1fr 70px 56px; gap: 12px;
         align-items: center; font-size: 19px; }
.wk .wl { color: var(--muted); font-family: var(--mono); }
.wk .wt { height: 14px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.wk .wt i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.wk .wv { text-align: right; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wk .wd { text-align: right; color: var(--muted); font-size: 17px; }

.cal-stats { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 12px; flex: none;
             margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.cst .cv { font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.15; }
.cst .cl { font-size: 19px; color: var(--ink-2); margin-top: 2px; }
.cst .cs { font-size: 17px; color: var(--muted); }
.cal .d .dd { font-size: 19px; color: var(--cal-ink); opacity: .82; }
.cal .d .vv { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums;
              margin-top: auto; color: var(--cal-ink); }
.cal .d .flag { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; }
.cal-legend { display: flex; gap: 18px; align-items: center; font-size: 19px; color: var(--muted); margin-top: 10px; flex: none; flex-wrap: wrap; }
.cal-legend .sc { display: flex; gap: 4px; align-items: center; }
.cal-legend .sc i { width: 20px; height: 12px; border-radius: 3px; display: block; }

/* ── 运行记录 ────────────────────────────────────────────── */
.runs { display: flex; flex-direction: column; }
.runs .r { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 21px; }
.runs .r .d { font-family: var(--mono); color: var(--muted); flex: none; width: 92px; }
.runs .r .st { font-size: 19px; font-weight: 600; padding: 2px 10px; border-radius: 5px; flex: none; }
.runs .r .st.success { background: var(--green-soft); color: var(--green-ink); }
.runs .r .st.partial { background: var(--yellow-soft); color: var(--yellow-ink); }
.runs .r .st.failed  { background: var(--red-soft); color: var(--red-ink); }
.runs .r .s { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 面板内的大按钮 ──────────────────────────────────────── */
.big-btns { display: flex; gap: 16px; flex-wrap: wrap; }
.bbtn {
  min-width: 200px; min-height: 78px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  border-radius: 14px; font-size: 26px; font-weight: 600; cursor: pointer;
  padding: 12px 26px;
}
.bbtn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.bbtn:disabled { opacity: .35; cursor: default; }
.bbtn .sub { display: block; font-size: 19px; font-weight: 400; color: var(--muted); margin-top: 4px; }

.date-grid { display: grid; grid-template-columns: repeat(11, 1fr); gap: 10px; }
.date-grid .dbtn {
  position: relative;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  border-radius: 10px; padding: 11px 8px; font-size: 22px; cursor: pointer;
  font-family: var(--mono);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.dbtn .dw { font-size: 17px; color: var(--muted); font-family: var(--sans); }
/* 倒推补的那天用虚线框，和日历里保持一致 */
.dbtn.recon { border-style: dashed; border-color: var(--accent-ink); }

/* 圆点是标记不是开关，配个图例免得以为点不掉是 bug */
.date-legend { display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
               font-size: 18px; color: var(--muted); margin-top: 4px; }
.date-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%;
                 margin-right: 6px; vertical-align: middle; }
.date-legend i.dash { border-radius: 3px; width: 14px; height: 10px;
                      border: 1px dashed var(--accent-ink); }
.date-legend .tip { margin-left: auto; color: var(--de); }
.date-grid .dbtn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.date-grid .dbtn i { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; }

.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.prod {
  display: flex; align-items: center; gap: 18px;
  border: 1px solid var(--line); background: var(--surface-2);
  border-radius: 14px; padding: 18px 20px; cursor: pointer; text-align: left;
}
.prod.on { border-color: var(--accent); background: var(--accent-soft); }
.prod img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 10px; flex: none; }
.prod .pn { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.prod .p1 { font-size: 26px; font-weight: 600; }
.prod .p2 { font-size: 20px; color: var(--muted); }
.prod .p3 { display: flex; gap: 8px; }
.prod .cur { margin-left: auto; font-size: 20px; color: var(--accent-ink); flex: none; }
.prod.ph { border-style: dashed; cursor: default; flex-direction: column; align-items: flex-start; gap: 8px; }
.prod.ph .p1 { color: var(--muted); }

/* ── 全屏错误页 ──────────────────────────────────────────── */
.fatal {
  position: absolute; inset: 0; background: var(--bg); z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 30px; text-align: center; padding: 0 120px;
}
.fatal .ic { width: 120px; height: 120px; border-radius: 50%; background: var(--red-soft);
             display: grid; place-items: center; font-size: 64px; color: var(--red-ink); font-weight: 600; }
.fatal .t { font-size: 64px; font-weight: 600; }
.fatal .d { font-size: 30px; color: var(--ink-2); max-width: 1100px; line-height: 1.55; }
.fatal .tags { display: flex; gap: 18px; font-size: 24px; }
.fatal .tags span { padding: 12px 22px; border-radius: 999px; background: var(--surface-2);
                    border: 1px solid var(--line); color: var(--ink-2); }
.fatal .cd { font-size: 34px; font-weight: 600; color: var(--accent-ink); }
.fatal .track { width: 520px; height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.fatal .track i { display: block; height: 100%; background: var(--accent); }
.fatal .f { font-size: 22px; color: var(--muted); }
.fatal .tk { display: flex; gap: 14px; align-items: center; }
.fatal .tk input {
  width: 640px; padding: 16px 20px; font-size: 26px; font-family: var(--mono);
  color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 12px;
}
.fatal .tk input:focus { outline: none; border-color: var(--accent); }
.fatal .tk button {
  padding: 17px 32px; font-size: 26px; font-weight: 600; color: #fff;
  background: var(--accent); border: 0; border-radius: 12px; cursor: pointer;
}
.fatal .tk button:disabled { opacity: .5; cursor: default; }
.fatal .tk-msg { font-size: 24px; color: var(--ink-2); }
.fatal .tk-msg.bad { color: var(--red-ink); }

.empty { display: flex; flex-direction: column; align-items: center; justify-content: center;
         flex: 1; color: var(--muted); font-size: 26px; text-align: center; gap: 10px; padding: 20px; }
.empty .sub { max-width: 560px; line-height: 1.5; }
.empty .sub { font-size: 20px; }

/* ── 设置面板 ────────────────────────────────────────────── */
.sheet.settings { top: 0; bottom: 0; border-radius: 0; padding: 22px 40px 20px; gap: 14px; }
.st-body {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px;
  align-content: start; padding-right: 8px;
}
.st-body::-webkit-scrollbar { width: 10px; }
.st-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; }

.st-group { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px 18px; }
.st-gt { font-size: 24px; font-weight: 600; margin-bottom: 4px; color: var(--accent-ink); }
.st-sub { font-size: 18px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; }
.st-h code { font-family: var(--mono); background: var(--bg); padding: 1px 6px;
             border-radius: 4px; font-size: 16px; }

.st-row { display: grid; grid-template-columns: minmax(150px, 260px) 1fr; gap: 16px;
          align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.st-row:last-of-type { border-bottom: 0; }
.st-t { font-size: 21px; color: var(--ink); }
.st-h { font-size: 17px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
/* 一格里可能有好几个控件（输入框 + 按钮 + 下拉 + 结果提示）。
   原来是横排，第三个元素被挤成一列竖字——设置页错乱就是这么来的。 */
.st-c { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.st-c > * { max-width: 100%; }
.st-stack { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.st-stack-h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.st-ro { text-align: right; color: var(--ink-2); font-size: 20px; }
.st-note { font-size: 17px; color: var(--muted); }

.st-in {
  background: var(--bg); border: 1px solid var(--line); color: var(--ink);
  border-radius: 8px; padding: 9px 12px; font-size: 20px; font-family: var(--sans);
  min-height: 44px;
}
.st-in:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.st-in[type=number] { font-family: var(--mono); text-align: right; }

/* 开关 */
.sw { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0;
      cursor: pointer; color: var(--muted); font-size: 19px; padding: 4px; }
.sw i { display: block; width: 58px; height: 32px; border-radius: 999px;
        background: var(--line); position: relative; transition: background .18s; }
.sw i::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px;
               border-radius: 50%; background: var(--muted); transition: transform .18s, background .18s; }
.sw.on i { background: var(--accent-soft); }
.sw.on i::after { transform: translateX(26px); background: var(--accent-ink); }
.sw.on { color: var(--accent-ink); }

/* 分段选择 */
.segbar { display: inline-flex; background: var(--bg); border: 1px solid var(--line);
          border-radius: 9px; padding: 3px; gap: 3px; }
.segb { border: 0; background: none; color: var(--ink-2); border-radius: 7px;
        padding: 8px 16px; font-size: 19px; cursor: pointer; min-height: 40px; }
.segb.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

.st-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.st-actions .bbtn { min-width: 0; min-height: 52px; font-size: 21px; padding: 10px 20px; }
.st-result { font-size: 19px; color: var(--muted); flex: 1; min-width: 0; line-height: 1.4; }
.st-result.ok { color: var(--green-ink); }
.st-result.bad { color: var(--red-ink); }

/* 跟在输入框后面的次级按钮，别抢主按钮的视觉分量 */
.bbtn.slim { min-width: 0; min-height: 50px; font-size: 20px; padding: 9px 18px; }
/* 模型清单的反馈挂在整行下方，不挤输入框 */
#models-result:empty { display: none; }
#models-result { text-align: right; margin-top: 8px; }

.st-lock { display: flex; align-items: center; gap: 14px; font-size: 21px;
           background: var(--yellow-soft); color: var(--yellow-ink);
           border-radius: 10px; padding: 14px 18px; }

.st-foot { display: flex; align-items: center; gap: 14px;
           border-top: 1px solid var(--line); padding-top: 16px; margin-top: 2px; }
.st-foot .bbtn { min-height: 62px; }
.bbtn.primary { background: var(--accent); border-color: var(--accent); color: #06212e; font-weight: 600; }
.bbtn.primary:disabled { background: var(--line); border-color: var(--line); color: var(--muted); }
.sheet-h .s.ok { color: var(--green-ink); }
.sheet-h .s.bad { color: var(--red-ink); }
.sheet-h .s.warn { color: var(--yellow-ink); }

/* ── 可滚动清单 ──────────────────────────────────────────
   墙面看板要求信息全量可见，所以清单一律不截断，
   放进滚动容器 + 底部渐隐提示，触控可上下拖。 */
.scroll-y {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.scroll-y::-webkit-scrollbar { width: 10px; }
.scroll-y::-webkit-scrollbar-track { background: transparent; }
.scroll-y::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; }
.scroll-y::-webkit-scrollbar-thumb:active { background: var(--de); }

/* 还有内容没看完时，底部一道渐隐提示 */
.scroll-wrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.scroll-wrap::after {
  content: ""; position: absolute; left: 0; right: 10px; bottom: 0; height: 40px;
  background: linear-gradient(transparent, var(--surface));
  pointer-events: none; opacity: 0; transition: opacity .2s;
}
.scroll-wrap.more::after { opacity: 1; }
.scroll-count { font-size: 19px; color: var(--muted); margin-left: auto; }

/* 表头在滚动时吸顶，否则滚下去就不知道哪列是哪列 */
.scroll-y table.wall thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface);
  box-shadow: inset 0 -1px 0 var(--line);
}
.st-body .scroll-y table.wall thead th { background: var(--surface-2); }

/* ── 表格列宽修正 ────────────────────────────────────────── */
table.wall td.nw, table.wall th.nw { white-space: nowrap; }
table.wall td .sub { white-space: nowrap; }
