/* views/record.css: the Record screen (#/record). Colors only through tokens. */
.rec-body { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.rec-sect { display: grid; gap: 14px; min-width: 0; align-content: start; }
.rec-sect > .chartblock { margin-bottom: 4px; }
.rec-sect > .chartblock + .chartblock { margin-top: 12px; }
.rec-board .st-num { font-size: clamp(2.2rem, 18cqw, 3.6rem); }

/* chart keys */
.rec-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 6px; font: 800 .875rem/1.3 var(--font-body); }
.rec-key-i { display: inline-flex; align-items: center; gap: 6px; }
.rec-key svg .ch-ring { stroke: var(--case); stroke-width: 2; }
.rec-key svg .cf-model { fill: var(--s-nfelo); }
.rec-key svg .cf-market { fill: var(--s-vegas); }
.rec-key svg .cf-other { fill: var(--ink-22); }
.rec-scatter { min-width: 0; }

/* best calls and biggest misses */
.rec-two { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@container screen (min-width: 760px) { .rec-two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rec-list { display: grid; gap: 10px; align-content: start; min-width: 0; }

/* game log */
.rec-log { display: grid; gap: 14px; min-width: 0; }
.rec-filters { display: grid; gap: 14px; min-width: 0; }
@container screen (min-width: 760px) { .rec-filters { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); } .rec-filters .field:last-child { grid-column: 1 / -1; } }
.rec-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rec-chips .week-chip { min-width: 56px; cursor: pointer; }
.rec-count { margin: 0; }
.rec-table-wrap { max-width: 100%; overflow-x: auto; border: 2px solid var(--e); border-radius: var(--r-sm); }
.rec-table { width: 100%; border-collapse: separate; border-spacing: 0; font: 700 .875rem/1.35 var(--font-body); }
.rec-table th, .rec-table td { padding: 10px 12px; text-align: left; vertical-align: middle; border-bottom: 2px dashed color-mix(in srgb, var(--e) 40%, transparent); }
.rec-table thead th { font: 800 .8125rem/1.3 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--tx-mu); background: var(--ab-fill); border-bottom: 2px solid var(--e); }
.rec-table tbody tr:last-child td { border-bottom: 0; }
.rec-table td.c-wk, .rec-table td.c-miss { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rec-table td.c-game { font-weight: 800; }
.rec-table tr.is-upset td { background: color-mix(in srgb, var(--accent) 35%, transparent); }
@media (max-width: 1179px) { .rec-table .c-pred, .rec-table .c-act { display: none; } } /* the details stay on the game page; stacked rows below show everything */
@container screen (max-width: 559px) {
  .rec-table-wrap { border: 0; overflow: visible; }
  .rec-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rec-table, .rec-table tbody { display: block; }
  .rec-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 14px; margin-bottom: 12px; background: var(--paper-f); border: var(--outline) solid var(--e); border-radius: var(--r-sm); box-shadow: var(--hard-sm) var(--hard-sm) 0 var(--s); }
  .rec-table tr.is-upset { background: var(--paper-f); }
  .rec-table td { display: block; padding: 0; border: 0; background: none !important; }
  .rec-table td.c-wk { grid-column: 1; grid-row: 1; color: var(--tx-mu); font-size: .8125rem; }
  .rec-table td.c-res { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .rec-table td.c-game { grid-column: 1; grid-row: 2; font-size: 1.0625rem; }
  .rec-table td.c-final, .rec-table td.c-pick, .rec-table td.c-pred, .rec-table td.c-act, .rec-table td.c-miss { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; }
  .rec-table td.c-pred, .rec-table td.c-act { display: flex; }
  .rec-table td[data-label]::before { content: attr(data-label); color: var(--tx-mu); font-weight: 700; }
  .rec-table td.c-wk::before, .rec-table td.c-game::before, .rec-table td.c-res::before { content: none; }
}

/* the sort control wraps instead of scrolling sideways */
.rec-log .field { grid-template-columns: minmax(0, 1fr); }
.rec-log .segwrap { max-width: 100%; }
.rec-log .seg { display: flex; flex-wrap: wrap; width: 100%; }
.rec-log .seg-btn { flex: 1 1 auto; min-width: 0; padding: 4px 12px; white-space: normal; line-height: 1.15; }
