/* views/lab.css: the Lab screens (index, matchup, fourth downs, play outcomes, play calling). Colors only through tokens. */
.lab-hero { min-height: 330px; }
.lab-hero .plate-title, .learn-hero .plate-title, .ch1-hero .plate-title { font-size: clamp(1.7rem, 8.4cqw, 2.3rem); }
.lab-board { --pat-pos: 35% 75%; }
.lab-tool-tile .st-num svg { width: 1em; height: 1em; }
.lab-tool-tile { min-height: 190px; }
.lab-tool-tile .st-num { font-size: clamp(2.8rem, 22cqw, 4.8rem); }
.lab-trail { display: inline-flex; align-items: center; }

/* verdict card at the top of every tool */
.tool-verdict { display: grid; gap: 12px; padding: 16px; }
.tv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tv-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tv-text { font: 700 1rem/1.5 var(--font-body); }

/* controls beside results (desktop), stacked on phones */
.tool-grid { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.tool-side, .tool-out { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.tool-controls { display: grid; gap: 16px; align-content: start; }
.tool-controls .card-title { margin-bottom: 0; }
.tool-controls .segwrap { max-width: 100%; }
.sit-text { margin-top: -4px; }
@media (min-width: 1024px) {
  .tool-grid { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 32px; align-items: start; }
  .tool-side { position: sticky; top: 16px; }
  .lab-matchup .tool-grid, .lab-plays .tool-grid { grid-template-columns: 330px minmax(0, 1fr); }
}

.toggle-row { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.toggle-text { font: 800 1rem/1.3 var(--font-body); }

.spec-list { display: grid; gap: 0; }
.spec-row { display: grid; gap: 2px; padding: 12px 0; }
.spec-row + .spec-row { border-top: 2px dashed color-mix(in srgb, var(--e) 45%, transparent); }
.spec-list dt { font: 800 .8125rem/1.4 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--tx-mu); }
.spec-list dd { margin: 0; font: 700 .9375rem/1.45 var(--font-body); overflow-wrap: anywhere; }

/* charts inside tools */
.hm-host, .hist-host, .chart-holder { width: 100%; min-width: 0; }
.chart .ch-zero { stroke: var(--tx); stroke-width: 2.5; stroke-linecap: round; fill: none; pointer-events: none; }
.lab-gap { margin-top: 12px; }
.chartblock > .legend, .cc-plot > .legend { margin-bottom: 4px; }
.cc-plot > .foot-note { margin-bottom: 8px; }
.tiles { margin-bottom: 8px; padding-bottom: 16px; border-bottom: 2px dashed color-mix(in srgb, var(--e) 45%, transparent); }
.cc-plot > .callout { margin-bottom: 12px; }
.spot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-left: 14px; min-height: 44px; }
.spot-line { font: 800 .9375rem/1.35 var(--font-body); min-width: 0; }

/* fourth-down sheet: the three options as bars */
.fd-opts { display: grid; gap: 16px; }
.fd-opt { display: grid; gap: 8px; }
.fd-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.fd-name { font: 800 1rem/1.3 var(--font-body); flex: 1 1 auto; }
.fd-val { font: 800 1.25rem/1.1 var(--font-display); font-stretch: var(--stretch); order: 2; margin-left: auto; font-variant-numeric: tabular-nums; }
.fd-top .badge { order: 3; }
.fd-opt:not(.is-best) .progress-fill { background: var(--ink-22); }

/* play calling */
.caveat-list { display: grid; gap: 8px; padding-left: 18px; list-style: disc; margin-top: 4px; font-weight: 600; }
.pdetail { display: grid; gap: 8px; margin-top: 8px; }
.stack > .card .stat-strip { margin: 0; }

/* matchup */
.lab-matchup .pred-card { padding-bottom: 14px; }
.lab-matchup .pred-card .hero { margin: 4px 0 16px; }
.lab-matchup .pred-card .winbar { margin-bottom: 12px; }
.lab-matchup .pred-card .hero-num { font-size: clamp(4.4rem, 26cqw, 6.5rem); }
.whatif { display: grid; gap: 14px; }

/* segmented controls with long labels share the width and wrap instead of scrolling sideways */
.tool-controls .field, .whatif .field { grid-template-columns: minmax(0, 1fr); }
.tool-controls .seg, .whatif .seg { display: flex; flex-wrap: wrap; width: 100%; }
.tool-controls .seg-btn, .whatif .seg-btn { flex: 1 1 auto; min-width: 0; padding: 4px 12px; white-space: normal; line-height: 1.15; }

/* time machine */
.lab-timemachine .pred-card { padding-bottom: 14px; }
.lab-timemachine .pred-card .hero { margin: 4px 0 16px; }
.lab-timemachine .pred-card .winbar { margin-bottom: 12px; }
.lab-timemachine .pred-card .hero-num { font-size: clamp(4.4rem, 26cqw, 6.5rem); }
.lab-timemachine .tool-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .lab-timemachine .tool-grid { grid-template-columns: minmax(0, 1fr); } .lab-timemachine .tool-side { position: static; } }
@media (min-width: 1360px) { .lab-timemachine .tool-grid { grid-template-columns: 360px minmax(0, 1fr); } .lab-timemachine .tool-side { position: sticky; } }
.tm-pair { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; align-items: end; }
.lab-timemachine .tm-controls { grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; }
.tm-controls .btn { justify-self: start; }
.tm-top { display: grid; gap: 10px; }
.tm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tm-item { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 0; }
.tm-item + .tm-item { border-top: 2px dashed color-mix(in srgb, var(--e) 45%, transparent); }
.tm-rank { flex: none; width: 1.6em; font: 800 1.0625rem/1 var(--font-display); font-stretch: var(--stretch); }
.tm-name { flex: 1; min-width: 0; display: grid; }
.tm-name b { font: 800 1rem/1.25 var(--font-body); }
.tm-name small { font: 700 .875rem/1.3 var(--font-body); color: var(--tx-mu); }
.tm-btns { flex: none; display: flex; gap: 8px; }
.tm-load { min-width: 44px; padding: 0 12px; }
.tm-load[aria-pressed="true"] { background: var(--primary); }
