/* Radar (js/pages/radar.js): the radar cards, the Turnarounds field of rockets (days in, against the move since coming in;
   the stop at -20%, liftoff at +50%), the replayed basket, and Pump watch with what past pumps did the week after. */
.rd-list { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.8125rem; }
.rd-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 14px; margin-bottom: 16px; }
.rd-card { display: flex; flex-direction: column; align-items: stretch; gap: 8px; text-align: left; white-space: normal; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--deck); color: var(--text); font: inherit; cursor: pointer; }
.rd-card:hover { border-color: var(--brass); }
.rd-card.on { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass) inset; }
.rd-card-h { display: flex; align-items: center; gap: 8px; }
.rd-card-h b { font-size: 1.0625rem; }
.rd-live { font-size: 0.6875rem; font-weight: 700; color: #052e16; background: var(--bull); border-radius: 999px; padding: 1px 8px; }
.rd-card-d { color: var(--muted); font-size: 0.8125rem; line-height: 1.45; }
.rd-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rd-kpis span { display: flex; flex-direction: column; gap: 2px; background: var(--deck-2); border-radius: 8px; padding: 7px 9px; min-width: 0; }
.rd-kpis em { font-style: normal; font-size: 0.6875rem; color: var(--faint); }
.rd-kpis b { font-size: 1rem; }
.rd-wait { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 280px; text-align: center; }
.rd-wait .muted { font-size: 0.8125rem; max-width: 460px; }

.rd-grid { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; align-items: stretch; }
.rd-field-wrap { flex: 999 1 560px; min-width: 0; margin: 0; }
.rd-sel { flex: 1 1 300px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.rd-field { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #070f24; margin-top: 8px; }
.rd-head, .rd-lane { display: grid; grid-template-columns: 96px repeat(4, minmax(0, 1fr)); }
.rd-head span { padding: 6px 8px; font-size: 0.6875rem; color: #6c7ba6; border-left: 1px solid #16224a; }
.rd-head span:first-child { border-left: 0; }
.rd-lane { border-top: 1px solid #16224a; }
.rd-lane.lifted { background: #121c38; border-bottom: 2px dashed #00e5ff; }
.rd-lane.climbing { background: #0c1a3a; }
.rd-lane.pad { background: #0a1531; }
.rd-lane-h { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; font-size: 0.6875rem; }
.rd-lane-h b { letter-spacing: .06em; text-transform: uppercase; font-size: 0.6875rem; }
.rd-lane-h small { color: #6c7ba6; font-size: 0.6875rem; }
.rd-lane-h em { font-style: normal; font-size: 1.125rem; font-weight: 700; color: #e6eaf2; margin-top: 2px; }
.rd-lane.lifted .rd-lane-h b { color: #7ff3ff; }
.rd-lane.climbing .rd-lane-h b { color: #8fa3d6; }
.rd-lane.pad .rd-lane-h b { color: #7486b8; }
.rd-cell { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; padding: 7px 5px; min-height: 44px; border-left: 1px solid #16224a; }
.rd-stop { border-top: 2px solid var(--bear); padding: 3px 10px 5px; text-align: right; font-size: 0.6875rem; color: #ff8fa3; }
.rd-rocket { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px 2px 4px; min-height: 24px;
  background: rgba(16, 26, 54, .9); border: 1px solid #2a3557; border-radius: 7px; color: #e6eaf2; font: inherit; cursor: pointer; white-space: nowrap; }
.rd-rocket:hover { border-color: #8fa3d6; }
.rd-rocket svg { width: 9px; height: 13px; flex: none; }
.rd-rocket b { font-size: 0.75rem; font-family: ui-monospace, monospace; }
.rd-rocket span { font-size: 0.6875rem; font-weight: 700; }
.rd-rocket.lifted { border-color: #00e5ff; box-shadow: 0 0 8px rgba(0, 229, 255, .3); }
.rd-rocket.sel { border: 2px solid #fff; padding: 1px 5px 1px 3px; }
.rd-empty { display: grid; place-items: center; min-height: 160px; color: #8fa3d6; font-size: 0.875rem; padding: 20px; text-align: center; }
.rd-sel-h { display: flex; align-items: baseline; gap: 8px; }
.rd-sel-h b { font-size: 1.25rem; }
.rd-sel-move { display: flex; align-items: baseline; gap: 10px; }
.rd-sel-move b { font-size: 1.5rem; }
.rd-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 0.8125rem; }
.rd-dl dt { color: var(--faint); }
.rd-dl dd { margin: 0; }
.rd-sel h3 { margin: 4px 0 0; font-size: 0.8125rem; color: var(--muted); }
.rd-why { margin: 0; padding-left: 18px; font-size: 0.8125rem; line-height: 1.5; }
.rd-note { margin: 8px 0 0; font-size: 0.78125rem; line-height: 1.5; color: var(--muted); }

.rd-replay { margin-bottom: 16px; }
.rd-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 8px; }
.rd-kpi-row > div { display: flex; flex-direction: column; gap: 2px; background: var(--deck-2); border-radius: 8px; padding: 9px 11px; }
.rd-kpi-row em { font-style: normal; font-size: 0.6875rem; color: var(--faint); }
.rd-kpi-row b { font-size: 1.25rem; }
.rd-kpi-row small { font-size: 0.6875rem; color: var(--muted); }
.rd-closed { margin-top: 10px; }
.rd-closed summary { cursor: pointer; color: var(--brass); font-size: 0.8125rem; }
.rd-tbl { width: 100%; border-collapse: collapse; font-size: 0.8125rem; margin-top: 6px; }
.rd-tbl th { text-align: left; color: var(--faint); font-weight: 600; font-size: 0.75rem; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rd-tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); }
.rd-tbl .n { text-align: right; font-variant-numeric: tabular-nums; }
.rd-tbl tr[data-sel] { cursor: pointer; }
.rd-tbl tr[data-sel]:hover { background: var(--deck-2); }
.tbl-wrap { overflow-x: auto; }
.rd-kind { font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); }
.rd-kind.turn { color: #7ff3ff; border-color: #00e5ff; }
.rd-kind.confirm { color: var(--bull); border-color: var(--bull); }
.rd-kind.base { color: var(--muted); }
.rd-chip { display: inline-block; font-size: 0.6875rem; padding: 2px 8px; border-radius: 999px; background: var(--deck-2); border: 1px solid var(--line); color: var(--muted); }
.rd-chip.warn { color: var(--warn); border-color: var(--warn); }

.rd-pumps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; margin-top: 8px; }
.rd-pump { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--deck-2); display: flex; flex-direction: column; gap: 8px; }
.rd-pump.repeat { border-color: var(--warn); }
.rd-pump-h { display: flex; justify-content: space-between; align-items: baseline; }
.rd-pump-h b { font-size: 1.0625rem; }
.rd-pump-big { font-size: 1.75rem; font-weight: 800; }
.rd-pump-big small { font-size: 0.8125rem; font-weight: 500; color: var(--muted); }
.rd-pump-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rd-pump-since { font-size: 0.8125rem; }
.rd-odds { display: flex; flex-direction: column; gap: 4px; font-size: 0.75rem; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 8px; }
.rd-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line); }
.rd-bar .up { background: var(--bull); } .rd-bar .dn { background: var(--bear); margin-left: auto; }
.rd-empty-box { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 18px 4px; font-size: 0.875rem; }
@media (max-width: 700px) {
  .rd-head { display: none; }
  .rd-lane { grid-template-columns: 1fr 1fr; }
  .rd-lane-h { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 8px; }
  .rd-lane-h em { margin: 0 0 0 auto; }
  .rd-cell { border-left: 0; border-top: 1px solid #16224a; }
  .rd-cell::before { content: attr(data-q); flex-basis: 100%; font-size: 0.625rem; color: #6c7ba6; }
  .rd-cell:nth-of-type(odd) { border-left: 1px solid #16224a; }
}
@media (max-width: 700px) { .rd-kpis { grid-template-columns: 1fr 1fr; } }

/* test the rules / compare */
.rd-rules { margin-bottom: 16px; }
.rd-rules > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; }
.rd-rules > summary::-webkit-details-marker { display: none; }
.rd-rules > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
.rd-rules[open] > summary::before { transform: rotate(90deg); }
.rd-rules > summary .ghost.small { margin-left: auto; }
.rd-rules-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; margin-top: 12px; }
.rd-rules fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 4px; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 12px; }
.rd-rules legend { font-size: 0.75rem; color: var(--muted); padding: 0 4px; }
.rd-f { margin-bottom: 10px; min-width: 0; }
.rd-f > span:first-child { font-size: 0.75rem; }
.rd-f small { font-size: 0.6875rem; color: var(--faint); }
.rd-in { display: flex; align-items: center; gap: 6px; }
.rd-in input { width: 100%; max-width: 110px; }
.rd-in em { font-style: normal; font-size: 0.75rem; color: var(--muted); }
.rd-chk { flex-direction: row; align-items: center; gap: 8px; grid-column: 1 / -1; }
.rd-chk > span { font-size: 0.8125rem !important; color: var(--text, inherit) !important; }
.rd-rules-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.rd-rules-act .muted { font-size: 0.75rem; }
.rd-sweep { margin-top: 16px; }
.rd-sweep-in { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 8px; }
.rd-sweep-in .field { margin-bottom: 0; flex: 1 1 150px; }
.rd-sweep-in input, .rd-sweep-in select { width: 100%; }
.rd-sw-tbl tr.cur td { background: rgba(0, 229, 255, .07); }
.rd-stop.none { border-top-style: dashed; border-top-color: var(--line); color: var(--muted); }
.rd-rules-act .muted.warn { color: var(--bear); font-weight: 600; }
.rd-pit { margin-bottom: 14px; font-size: 0.8125rem; line-height: 1.5; }
.rd-pit .ghost.small { margin-left: 6px; }
