/* 速度看板专用样式。共用的颜色变量、字体、页头页脚在 ../tl.css。
 * 只改外观不影响功能；board.js 依赖的 id / data-* 见 README「改样式」一节，改完跑 node scripts/check-dom.mjs。 */
  .page-head { padding-top: 40px; padding-bottom: 28px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 48px; }
  .crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 8px; }
  .crumbs span + span::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
  .page-title { margin-top: 10px; font-weight: 600; font-size: clamp(36px, 4vw, 52px); line-height: 1.05; letter-spacing: -0.02em; }
  .page-sub { margin-top: 10px; font-size: 16px; color: var(--body); }
  .ep-chip { display: flex; align-items: center; gap: 12px; font-size: 14px; }
  .ep-chip .lbl { white-space: nowrap; padding: 2px 8px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 12.5px; font-weight: 600; }

  .bench { border: 1px solid var(--line); }
  .bar { padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--bg-2); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
  .bar h2 { font-size: 17px; font-weight: 600; color: var(--text); }
  .replay { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 14px; color: var(--muted); }
  .replay b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
  .track { width: 120px; height: 4px; background: var(--line); }
  .track i { display: block; height: 100%; background: var(--body); }
  .controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
  .cbtn { min-height: 36px; padding: 0 14px; border: 1px solid var(--btn-line); border-radius: 2px; background: none; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
  .cbtn:disabled { opacity: .45; cursor: default; }
  .cbtn:hover { border-color: var(--text); }
  .sel {
    min-height: 36px; padding: 0 32px 0 12px; border: 1px solid var(--line-strong); border-radius: 0; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239c988e' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 12px center;
    color: var(--text); font: inherit; font-size: 14px; appearance: none; cursor: pointer;
  }
  .check { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: 14px; color: var(--body); cursor: pointer; }
  .check input { width: 15px; height: 15px; accent-color: var(--text); }
  .latest { padding: 10px 20px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; font-size: 14px; color: var(--muted); }
  .latest b { color: var(--text); font-weight: 500; }

  .filters { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
  .filter { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
  .seg { display: flex; flex-wrap: wrap; }
  .seg button { min-height: 36px; padding: 0 14px; margin: 0 -1px -1px 0; background: none; border: 1px solid var(--line-strong); color: var(--body); font: inherit; font-size: 14px; cursor: pointer; }
  .seg button:hover { color: var(--text); }
  .seg button[aria-pressed="true"] { position: relative; z-index: 1; background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; }
  .seg button.soon:not([aria-pressed="true"]) { color: var(--muted); }
  .range { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

  .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
  .kpis > div { background: var(--bg); padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 4px; }
  .kpis .k { font-size: 14px; font-weight: 600; color: var(--body); display: flex; align-items: center; gap: 8px; }
  .kpis .v { font-weight: 600; font-size: 40px; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  .kpis .v small { font-size: 18px; letter-spacing: 0; }
  .kpis .s { font-size: 13.5px; color: var(--muted); }
  .sw { display: inline-block; width: 10px; height: 10px; }
  .sw.w { background: #1fa87c; } .sw.l { background: #4a4d52; } .sw.n { border: 1px dashed var(--btn-line); }

  .body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
  .main { min-width: 0; border-right: 1px solid var(--line); }
  .aside { min-width: 0; }
  /* 宽屏右栏吸顶、自己滚动：往下翻记录时 Selected race 一直看得见（照工作台模板） */
  /* 点 Details 后让 Selected race 闪一下，即使选中的本来就是这一场也有反馈 */
  .pane.flash { box-shadow: inset 0 0 0 1px var(--text); }
  /* 记录表里点 Details 在本行下面展开的详情（细线分格，不用卡片） */
  .tb tr.detail > td { padding: 0 0 18px; border-top: 0; }
  .tb tr.has-detail > td { border-bottom: 0; }
  .detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
  .detail-grid > div { background: var(--bg-2); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
  .detail-grid dt { font-size: 13px; color: var(--muted); }
  .detail-grid dd { margin: 0; font-size: 14.5px; color: var(--text); font-variant-numeric: tabular-nums; }
  .detail-foot { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 4px 24px; margin-top: 10px; }
  .detail-foot details { min-width: 0; flex: 1 1 320px; }
  /* 窄屏表格横向滚动：展开区按可见宽度排、贴住左边，不跟着 680px 的表格被截掉 */
  .detail-inner { position: sticky; left: 0; width: var(--detail-w, 100%); max-width: 100%; }
  .pane { transition: box-shadow .25s; }
  @media (max-width: 1080px) { .body { grid-template-columns: minmax(0, 1fr); } .main { border-right: 0; border-bottom: 1px solid var(--line); } }
  .block { padding: 20px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
  .block:last-child { border-bottom: 0; }
  .block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; }
  .block-head h3 { font-size: 17px; font-weight: 600; }
  .block-head .note { font-size: 13.5px; }
  .legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13.5px; color: var(--muted); }
  .legend span { display: inline-flex; align-items: center; gap: 6px; }

  /* 胜率趋势折线（board.js renderTrend）：单条线用 --win；带 = 95% Wilson 区间；50% 虚线 = 打平 */
  .trend { position: relative; min-height: 220px; }
  .trend svg { display: block; width: 100%; height: 220px; overflow: visible; outline: none; }
  .trend svg:focus-visible { outline: 1px solid var(--btn-line); outline-offset: 4px; }
  .trend .grid line { stroke: var(--line); stroke-width: 1; }
  .trend .grid line.par { stroke: var(--line-strong); stroke-dasharray: 3 4; }
  .trend .ax text { fill: var(--muted); font-size: 12px; font-family: var(--sans); font-variant-numeric: tabular-nums; }
  .trend .band { fill: var(--win); fill-opacity: 0.13; }
  .trend .line { fill: none; stroke: var(--win); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
  .trend .dot { fill: var(--win); stroke: var(--bg); stroke-width: 2; }
  .trend .dot.part { fill: var(--bg); stroke: var(--win); }
  .trend .cross { stroke: var(--btn-line); stroke-width: 1; }
  .trend .hit { fill: transparent; cursor: crosshair; }
  .trend .empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13.5px; }
  .trend-tip { position: absolute; top: 0; pointer-events: none; background: var(--bg-2); border: 1px solid var(--line-strong); padding: 8px 10px; font-size: 13px; color: var(--muted); white-space: nowrap; display: flex; flex-direction: column; gap: 2px; z-index: 2; }
  .trend-tip[hidden] { display: none; }
  .trend-tip b { color: var(--text); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .ci { position: relative; height: 18px; min-width: 200px; }
  .ci .axis { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
  .ci .mid { position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px dashed var(--line-strong); }
  .ci .rng { position: absolute; top: calc(50% - 1px); height: 2px; background: var(--body); }
  .ci .pt { position: absolute; top: calc(50% - 4px); width: 8px; height: 8px; margin-left: -4px; background: var(--win); }
  .ci-scale { position: relative; height: 16px; font-size: 12px; color: var(--muted); font-weight: 400; }
  .ci-scale span { position: absolute; top: 0; }
  .ci-scale span:nth-child(1) { left: 0; } .ci-scale span:nth-child(2) { left: 50%; transform: translateX(-50%); } .ci-scale span:nth-child(3) { right: 0; }

  .seq { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 12px; align-items: center; font-size: 14.5px; }
  .seq .tiles { display: flex; flex-wrap: wrap; gap: 3px; }
  .tile { width: 30px; height: 22px; padding: 0; border: 1px solid transparent; font: 500 11px/20px var(--mono); text-align: center; cursor: pointer; }
  .tile.w { background: #1fa87c; color: #0b0c0d; }
  .tile.l { background: #3a3d42; color: var(--body); }
  .tile.n { background: none; border: 1px dashed var(--btn-line); color: var(--muted); }
  .tile.on { outline: 2px solid var(--text); outline-offset: 1px; }
  .seq .none { color: var(--muted); font-size: 14px; }

  .tb tr.on td { background: var(--bg-2); }
  .tb tr[data-id] { cursor: pointer; }
  .tb td .sub { display: block; font-size: 13px; color: var(--muted); }
  .rec-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
  .empty { padding: 24px 0; color: var(--muted); }

  .pane { padding: 20px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
  .pane:last-child { border-bottom: 0; }
  .pane-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .pane-head h3 { font-size: 16px; font-weight: 600; }
  .pane-head a, .pane-head .textbtn { font-size: 13.5px; min-height: 0; }
  .kv { display: flex; flex-direction: column; font-size: 14px; }
  .kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
  .kv > div:last-child { border-bottom: 1px solid var(--line); }
  .kv dt { color: var(--muted); }
  .kv dd { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
  .pane .small { font-size: 13px; color: var(--muted); }
  .sel-id { font-family: var(--mono); font-size: 13.5px; color: var(--text); }
  .json { margin: 0; padding: 12px; max-height: 260px; overflow: auto; background: var(--code); border: 1px solid var(--line); font: 12.5px/1.6 var(--mono); color: var(--body); white-space: pre; }
  .big { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .big .v { font-weight: 600; font-size: 30px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  .big .v small { font-size: 13px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
  .quad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; font-size: 13px; color: var(--muted); }
  .quad b { display: block; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
  .hours { display: flex; align-items: flex-end; gap: 2px; height: 36px; }
  .hours i { flex: 1; background: #4a4d52; min-height: 2px; }
  .hours i:hover { background: var(--text); }

  .ref { padding-top: 56px; }
  .ref-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line-strong); }
  .ref-head h2 { font-size: 17px; font-weight: 600; }
  .ref details { border-bottom: 1px solid var(--line); }
  .ref summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 260px minmax(0, 1fr) 24px; gap: 16px; align-items: center; padding: 18px 0; }
  .ref summary::-webkit-details-marker { display: none; }
  .ref summary b { font-size: 18px; font-weight: 600; }
  .ref summary span { font-size: 14.5px; color: var(--muted); }
  .ref summary::after { content: "+"; font-size: 22px; color: var(--body); text-align: right; }
  .ref details[open] summary::after { content: "–"; }
  .ref .inner { padding: 4px 0 32px; display: flex; flex-direction: column; gap: 24px; }
  @media (max-width: 640px) { .ref summary { grid-template-columns: minmax(0, 1fr) 24px; } .ref summary span { display: none; } }

  .slim-foot { margin-top: 56px; border-top: 1px solid var(--line); }
  .slim-foot .wrap { padding-top: 20px; padding-bottom: 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; font-size: 13.5px; color: var(--muted); }
  .slim-foot nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
  .slim-foot a { color: var(--body); text-decoration: none; }
  .slim-foot a:hover { color: var(--text); }
  .slim-foot .discord { min-width: 32px; min-height: 32px; }
  .slim-foot .discord svg { width: 18px; height: 18px; }
