/* /zzz/disc 的补充样式。app.css 先加载，这里只补驱动盘特有的部件。
   两条贯穿的规则：
     · 版面只有一条主线，其余靠 <details> 折叠 —— 平铺四张卡片没人知道从哪开始。
     · 依赖未公示假设的东西一律带 --serious 的边框或标记，精确解不带。 */

/* 单栏窄版：这一页的主体是一张卡 + 三个折叠，不需要 /zzz 的双栏 */
.shell-narrow { max-width: 760px; }
.shell-narrow .masthead { margin-bottom: 18px; }

/* ── 结论卡 ──────────────────────────────────────── */

.verdict-card { padding: 20px 22px 22px; }

.verdict-label {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  letter-spacing: 0.3px;
}

.verdict {
  margin: 6px 0 0;
  font-size: 30px;
  font-weight: 680;
  line-height: 1.2;
  letter-spacing: -0.2px;
  color: var(--accent);
}
.verdict[data-tone="good"]    { color: var(--accent); }
.verdict[data-tone="ok"]      { color: var(--ink); }
.verdict[data-tone="weak"]    { color: var(--serious); }
.verdict[data-tone="bad"]     { color: var(--critical); }
.verdict[data-tone="done"]    { color: var(--ink-2); }

.verdict-why {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.65;
}
.verdict-why b { color: var(--accent); font-weight: 650; }

.verdict-meter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.verdict-meter .meter { flex: 1 1 auto; }
.verdict-pct {
  flex: none;
  min-width: 62px;
  text-align: right;
  color: var(--accent);
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.verdict-branch {
  margin: 14px 0 0;
  padding: 10px 12px;
  background: var(--surface-2);
  border-left: 2px solid var(--accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.65;
}
.verdict-branch b { color: var(--accent); font-weight: 650; }
.branch-split {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 6px;
}
.branch-split span { white-space: nowrap; }

/* ── 驱动盘面板：照抄游戏里的样子 ──────────────────── */

.panel {
  margin-top: 20px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.panel-hint {
  margin: 0 0 12px;
  color: var(--ink-muted);
  font-size: 11.5px;
  line-height: 1.6;
}
.panel-hint b {
  color: var(--accent);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.panel-head {
  display: grid;
  grid-template-columns: 92px 1fr 88px;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}
.panel-head select {
  width: 100%;
  background: var(--surface-3);
  font-weight: 600;
}

.panel-subs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.sub-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}
.sub-row select {
  width: 100%;
  background: none;
  border-color: transparent;
  padding-left: 2px;
  font-size: 13.5px;
}
.sub-row select:hover { border-color: var(--hairline); background: var(--surface-3); }
.sub-row select:focus { border-color: var(--accent); background: var(--surface-3); }
/* 被判为有效的那几条点亮，一眼能看出这个盘有没有货 */
.sub-row[data-useful="true"] select { color: var(--accent); font-weight: 600; }
.sub-row[data-empty="true"] select { color: var(--ink-muted); font-style: italic; }

.sub-row .stepper { flex: none; background: var(--surface-3); }
.sub-row .stepper input[type="number"] { width: 38px; font-weight: 650; }
.sub-row .ups-mark {
  display: inline-block;
  min-width: 26px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.panel-foot {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-muted);
  font-size: 11.5px;
  line-height: 1.6;
}
.panel-foot b { color: var(--accent); font-weight: 600; }

.preset-field { margin-top: 18px; }
.preset-field > select { flex: none; width: 190px; }

/* ── 折叠区 ──────────────────────────────────────── */

.fold {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}
.fold > summary {
  padding: 14px 18px;
  cursor: pointer;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.12s, background 0.12s;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before {
  content: "▸";
  flex: none;
  color: var(--ink-muted);
  font-size: 11px;
  transition: transform 0.15s;
}
.fold[open] > summary::before { transform: rotate(90deg); }
.fold > summary:hover { color: var(--accent); background: var(--surface-2); }
.fold[open] > summary { border-bottom: 1px solid var(--hairline); }

.fold-tail {
  margin-left: auto;
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.fold-body { padding: 16px 18px 18px; }
.fold-body > .sub-head:first-child { margin-top: 0; }

.fold-assume { border-color: rgba(236, 131, 90, 0.3); }
.fold-assume > summary:hover { color: var(--serious); }

.tag-assume {
  padding: 2px 8px;
  border: 1px solid rgba(236, 131, 90, 0.45);
  border-radius: 999px;
  color: var(--serious);
  font-size: 10.5px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.assume-note { border-left: 2px solid rgba(236, 131, 90, 0.45); padding-left: 10px; }
.assume-note b { color: var(--serious); font-weight: 650; }

.sub-head {
  margin: 18px 0 9px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}

/* ── 词条多选 ───────────────────────────────────── */

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { position: relative; display: block; }
.chips input { position: absolute; opacity: 0; width: 0; height: 0; }
.chips span {
  display: block;
  padding: 6px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.chips span:hover { color: var(--ink-2); border-color: var(--accent-dim); }
.chips input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--plane);
  font-weight: 600;
}
.chips input:disabled + span {
  opacity: 0.32;
  cursor: not-allowed;
  text-decoration: line-through;
}
.chips input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-wash); }

/* ── 表格与图 ───────────────────────────────────── */

.readout caption {
  caption-side: top;
  text-align: left;
  padding-bottom: 8px;
  color: var(--ink-muted);
  font-size: 11.5px;
}
.readout .basis-exact { color: var(--ink-muted); }
.readout .basis-assume { color: var(--serious); }

.tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 16px 0; }

.bar { fill: var(--ramp-3); transition: fill 0.15s; }
.bar-hit { fill: var(--accent); }
.bar:hover, .bar-hit:hover { fill: var(--ramp-5); }
.bar-value { fill: var(--ink-2); font: 500 10.5px var(--sans); text-anchor: middle; }
.bar-value-hit { fill: var(--accent); font-weight: 650; }
.threshold-line { stroke: var(--serious); stroke-width: 1.2; stroke-dasharray: 4 3; }
.threshold-label { fill: var(--serious); font: 600 10.5px var(--sans); }

@media (max-width: 560px) {
  .verdict { font-size: 25px; }
  .panel-head { grid-template-columns: 1fr; }
  .preset-field { display: block; }
  .preset-field > select { width: 100%; margin-top: 8px; }
}
