/* race-plan: checkpoint timeline, pace band (screen preview + print) */
#race-plan[hidden] { display: none; }
.rp { display: grid; gap: 14px; margin-top: 8px; }
.rp-head { display: grid; gap: 6px; }
.rp-head .eyebrow { color: var(--accent-ink); }
.rp-head h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 750; letter-spacing: -0.03em; }
.rp-head .lead { text-wrap: pretty; font-size: 1.02rem; color: var(--ink); max-width: 62ch; }
.rp-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.92rem; }
.rp-table th, .rp-table td { padding: 9px 12px; text-align: left; white-space: nowrap; }
.rp-table thead th { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); border-bottom: 1px solid var(--line); }
.rp-table th.n, .rp-table td { font-family: var(--font-data); }
.rp-table tbody th { text-transform: none; letter-spacing: 0; font-size: 0.92rem; font-family: var(--font-body); font-weight: 600; color: var(--ink); }
.rp-table td { text-align: right; }
.rp-table thead th.n { text-align: right; }
.rp-table tbody tr:not(.sub) { border-top: 1px solid var(--line); }
.rp-table tbody tr:first-child { border-top: 0; }
.rp-table td.g { color: var(--muted); }
.rp-table td.g.up { color: var(--heat); }
.rp-table td.warm { color: var(--heat); }
.rp-table tr.hot > :first-child { box-shadow: inset 3px 0 0 var(--heat); }
.rp-table tr.fin th, .rp-table tr.fin td { color: var(--accent-ink); }
.rp-table tr.sub td { text-align: left; padding: 0 12px 9px; font-family: var(--font-body); font-size: 0.78rem; color: var(--muted); white-space: normal; }
.rp-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
.rp-heat { display: flex; gap: 10px; align-items: baseline; padding: 12px 16px; border-radius: var(--r-sm); background: rgba(255,255,255,0.05); border: 1px solid var(--line); max-width: none; }
.rp-heat.on { background: rgba(255, 155, 94, 0.09); border-color: rgba(255, 155, 94, 0.3); }
.rp-note { font-size: 0.8rem; max-width: 76ch; }
.rp-take { display: grid; gap: 12px; margin-top: 10px; }
.rp-take h3 { font-size: var(--step-1); }
.rp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.rp-card { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 16px; border-radius: var(--r); padding: 16px; align-items: center; }
.rp-card h4 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.05rem; font-weight: 650; letter-spacing: -0.02em; }
.rp-card p { font-size: 0.86rem; margin-bottom: 14px; }
.rp-card .btn { padding: 9px 16px; font-size: 0.9rem; }
.rp-prev { height: 240px; overflow: hidden; border-radius: 10px; position: relative; }
.rp-prev:not(.lock)::after { content: ""; position: absolute; inset: auto 0 0 0; height: 70px; background: linear-gradient(transparent, rgba(11, 22, 17, 0.95)); }
.rp-prev-in { zoom: 0.78; width: 3.5cm; margin: 0 auto; }
.rp-prev.lock { box-shadow: 0 0 0 1px var(--glass-border), 0 10px 28px rgba(0,0,0,0.4); border-radius: 16px; background: #060d0a; }
.rp-lock { display: block; width: 100%; height: auto; }
.rp-status:empty { display: none; }

/* the band: black on white, 3.5 cm wide, two columns of cells */
.rp-band { width: 3.5cm; background: #fff; color: #000; font-family: -apple-system, "Helvetica Neue", Arial, sans-serif; border: 0.4pt dashed #000; box-sizing: border-box; display: flex; flex-direction: column; break-inside: avoid; }
.rp-bh { padding: 0.18cm 0.15cm 0.12cm; border-bottom: 0.6pt solid #000; display: grid; gap: 1pt; text-align: center; }
.rp-bh b { font-size: 6.4pt; line-height: 1.12; letter-spacing: -0.01em; }
.rp-bh span { font-size: 5pt; color: #333; }
.rp-bh .g { font-size: 8.6pt; font-weight: 700; color: #000; font-variant-numeric: tabular-nums; margin-top: 1pt; }
.rp-bg { display: grid; grid-auto-flow: column; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(var(--rpc), var(--rh)); }
.rp-c { display: flex; flex-direction: column; justify-content: center; align-items: center; border-bottom: 0.3pt solid #aaa; border-right: 0.3pt solid #aaa; line-height: 1.05; }
.rp-c .l { font-size: 5.2pt; color: #333; white-space: nowrap; }
.rp-c .t { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 8pt; font-weight: 700; font-variant-numeric: tabular-nums; }
.rp-c.half, .rp-c.fin { background: #000; color: #fff; }
.rp-c.half .l, .rp-c.fin .l { color: #fff; }
.rp-c.up .l { color: #000; font-weight: 700; }
.rp-bf { padding: 0.1cm; border-top: 0.6pt solid #000; font-size: 4.6pt; text-align: center; color: #222; }
#rp-print { display: none; }
.rp-page { break-after: page; display: grid; gap: 0.5cm; justify-items: center; font-family: -apple-system, "Helvetica Neue", Arial, sans-serif; color: #000; }
.rp-cut { font-size: 8pt; max-width: 15cm; text-align: center; margin: 0; }
.rp-sheet { display: flex; gap: 2.2cm; justify-content: center; align-items: flex-start; }

@media (max-width: 760px) {
  .rp-table { font-size: 0.8rem; }
  .rp-table th, .rp-table td { padding: 9px 5px; }
  .rp-table thead th { letter-spacing: 0.04em; font-size: 0.62rem; }
  .rp-table tbody th { font-size: 0.84rem; }
  .rp-table th:first-child, .rp-table td:first-child { padding-left: 10px; }
  .rp-table th:last-child, .rp-table td:last-child { padding-right: 10px; }
  .rp-table tr.sub td { padding-inline: 10px; }
  .rp-card { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .rp-prev { height: 210px; }
  .rp-prev-in { zoom: 0.66; }
}
@media (max-width: 420px) {
  .rp-cards { grid-template-columns: minmax(0, 1fr); }
  .rp-heat { flex-direction: column; gap: 6px; }
}

@media print {
  html.rp-printing body > *:not(#rp-print) { display: none !important; }
  html.rp-printing, html.rp-printing body { background: #fff !important; }
  html.rp-printing #rp-print { display: block; }
  html.rp-printing .rp-band, html.rp-printing .rp-c { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.rp-table th, .rp-table td { border-bottom: 0; }
#race-plan, .rp, .rp > * { min-width: 0; }
.rp-card > * { min-width: 0; }
/* shared-layout guard: let the single grid column shrink below its widest child (also needed in site.css as .wrap { grid-template-columns: minmax(0, 1fr) }) */
