/* NYCE Pro matchup tabs. Uses bvp-lab.css tokens, so dark mode follows
   html.nyce-dark without extra rules. */

/* ---------- slate strip (folded lineup BvP) ---------- */
.slate-strip { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.slate-strip > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 15px; cursor: pointer; list-style: none;
  font-weight: 800; font-size: 13px; color: var(--ink);
}
.slate-strip > summary::-webkit-details-marker { display: none; }
.slate-strip > summary::before { content: "▸"; color: var(--brand); margin-right: 2px; transition: transform .15s; }
.slate-strip[open] > summary::before { transform: rotate(90deg); }
.slate-strip > summary span { flex: 1; }
.slate-strip > summary em { font-style: normal; font-size: 11.5px; color: var(--soft); font-weight: 600; }
.slate-strip[open] > summary em { visibility: hidden; }
.slate-strip > .card { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; box-shadow: none; }

/* ---------- tab bar ---------- */
.lab-tabs {
  position: sticky; top: calc(var(--lab-top-h, 0px) + 6px); z-index: 5;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin;
  padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  box-shadow: 0 4px 14px var(--shadow);
}
.lab-tabs [role="tab"] {
  flex: 0 0 auto; border: 0; border-radius: 8px; padding: 9px 14px;
  background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.lab-tabs [role="tab"]:hover { background: var(--panel-2); color: var(--ink); }
.lab-tabs [role="tab"][aria-selected="true"] { background: var(--brand); color: #fff; }
html.nyce-dark .lab-tabs [role="tab"][aria-selected="true"],
body.nyce-dark .lab-tabs [role="tab"][aria-selected="true"] { color: #06121f; }

.lab-tab { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.lab-tab[hidden] { display: none; }

/* Cards that used to sit in the old named grid areas now stack inside tabs. */
.lab-tab .spray-analysis-card,
.lab-tab .history-analysis-card,
.lab-tab .arsenal-analysis-card { grid-area: auto; }

.pro-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.pro-grid-2 > * { min-width: 0; }
@media (max-width: 1100px) { .pro-grid-2 { grid-template-columns: 1fr; } }

/* ---------- shared bits ---------- */
.pro-card h4, .pro-sub { margin: 16px 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); }
.pro-card h4:first-child { margin-top: 0; }
.pro-lead { margin: 10px 0; font-size: 13.5px; line-height: 1.55; color: var(--ink); font-weight: 600; }
.pro-foot { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.pro-muted { color: var(--muted); font-size: 13px; }
.pro-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 14px; }
.pro-cols p { margin: 0 0 9px; font-size: 13.5px; line-height: 1.55; color: var(--ink); }
@media (max-width: 900px) { .pro-cols { grid-template-columns: 1fr; } }

.pro-good { color: var(--good-d); }
.pro-bad { color: var(--bad-d); }
.pro-neutral { color: var(--muted); }

/* ---------- chips ---------- */
.pro-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pro-chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
  background: var(--panel-2); color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.pro-chip:hover { color: var(--ink); border-color: var(--brand); }
.pro-chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
html.nyce-dark .pro-chip[aria-pressed="true"], body.nyce-dark .pro-chip[aria-pressed="true"] { color: #06121f; }

/* ---------- verdict tiles ---------- */
.pro-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pro-tile {
  display: flex; flex-direction: column; gap: 3px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2);
}
.pro-tile small { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.pro-tile b { font-family: 'JetBrains Mono', monospace; font-size: 22px; color: var(--ink); }
.pro-tile span { font-size: 11.5px; color: var(--soft); font-weight: 600; }
.pro-tile-edge { background: var(--edge-b-bg); border-color: var(--edge-b-line); }
.pro-tile-edge small, .pro-tile-edge b, .pro-tile-edge span { color: var(--edge-b-ink); }

.pro-signals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pro-signals li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2);
}
.pro-signals li div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pro-signals b { font-size: 12.5px; color: var(--ink); }
.pro-signals span { font-size: 12px; color: var(--muted); }
.pro-pill {
  flex: 0 0 auto; font-style: normal; font-size: 11.5px; font-weight: 800; padding: 3px 9px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted);
}
.pro-pill.pro-good { background: var(--edge-b-bg); border-color: var(--edge-b-line); color: var(--edge-b-ink); }
.pro-pill.pro-bad { background: var(--panel); border-color: var(--bad-d); color: var(--bad-d); }

/* ---------- rate strip ---------- */
.pro-rates { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin: 10px 0; }
.pro-rate {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); text-align: center;
}
.pro-rate small { font-size: 11px; font-weight: 700; color: var(--muted); }
.pro-rate b { font-family: 'JetBrains Mono', monospace; font-size: 17px; color: var(--ink); }
.pro-rate span { font-size: 11px; color: var(--soft); font-weight: 600; }
.pro-rate-model { background: var(--edge-p-bg); border-color: var(--edge-p-line); }
.pro-rate-model small, .pro-rate-model b, .pro-rate-model span { color: var(--edge-p-ink); }

.pro-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 11.5px; color: var(--muted); font-weight: 600; margin: 6px 0; }
.pro-key { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin-right: 3px; }
.pro-key-over { background: var(--good); }
.pro-key-under { background: var(--line); border: 1px solid var(--soft); }
.pro-key-dot { border-radius: 50%; background: var(--brand); }
.pro-key-line { height: 3px; background: var(--brand-2); }

/* ---------- SVG charts ---------- */
.pro-chart { width: 100%; overflow-x: auto; }
.pro-chart svg { display: block; width: 100%; min-width: 560px; height: auto; }
.pro-grid { stroke: var(--line); stroke-width: 1; opacity: .7; }
.pro-axis { fill: var(--soft); font-size: 11px; font-family: Inter, system-ui, sans-serif; font-weight: 600; }
.pro-strong { fill: var(--ink); font-weight: 800; }
.pro-bar-over { fill: var(--good); }
.pro-bar-under { fill: var(--line); stroke: var(--soft); stroke-width: .6; }
.pro-val { font-size: 11.5px; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.pro-val-over { fill: var(--good-d); }
.pro-val-under { fill: var(--muted); }
.pro-dot { fill: var(--brand); stroke: var(--panel); stroke-width: 1.5; }
/* tonight's pregame projection: a dashed not-yet-played slot and a ringed blue dot */
.pro-proj-slot { fill: none; stroke: var(--brand); stroke-width: 1.2; stroke-dasharray: 4 3; opacity: .55; }
.pro-proj-sep { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.pro-dot-proj { fill: var(--brand); stroke: var(--panel); stroke-width: 2.5; }
.pro-val-proj { fill: var(--brand); }
.pro-proj-lab { fill: var(--brand); font-weight: 800; }
.pro-key-proj { border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--brand); }
.pro-line { stroke: var(--hot); stroke-width: 2; stroke-dasharray: 6 4; }
.pro-linelab { fill: var(--hot-d); font-size: 11.5px; font-weight: 800; font-family: Inter, system-ui, sans-serif; }
.pro-flag { fill: var(--yellow-d); font-size: 12px; }
.pro-overlay { fill: none; stroke: var(--brand-2); stroke-width: 2; }
.pro-overlay-dot { fill: var(--brand-2); }
.pro-overlay-axis { fill: var(--brand2-d); }
.pro-trend { fill: none; stroke-width: 2.4; stroke-linejoin: round; }
.pro-trend.pro-g-fb { stroke: var(--bad); }
.pro-trend.pro-g-br { stroke: var(--brand); }
.pro-trend.pro-g-os { stroke: var(--good); }

.pro-swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.pro-swatch.pro-g-fb { background: var(--bad); }
.pro-swatch.pro-g-br { background: var(--brand); }
.pro-swatch.pro-g-os { background: var(--good); }

/* ---------- stat boxes + tables ---------- */
.pro-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.pro-stat { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); }
.pro-stat small { font-size: 11px; font-weight: 700; color: var(--muted); }
.pro-stat b { font-family: 'JetBrains Mono', monospace; font-size: 19px; color: var(--ink); }
.pro-stat span { font-size: 11px; color: var(--soft); font-weight: 600; }

.pro-table-wrap { width: 100%; overflow-x: auto; margin-top: 10px; }
.pro-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pro-table caption { text-align: left; font-size: 12px; font-weight: 800; color: var(--muted); padding-bottom: 6px; }
.pro-table th, .pro-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; color: var(--ink); white-space: nowrap; }
.pro-table th { font-size: 11px; font-weight: 800; color: var(--soft); text-transform: uppercase; letter-spacing: .03em; }
.pro-table th:first-child, .pro-table td:first-child { text-align: left; }
.pro-table td { font-family: 'JetBrains Mono', monospace; }
.pro-table td:first-child { font-family: Inter, system-ui, sans-serif; font-weight: 700; }
.pro-innings td.pro-inn { background: color-mix(in srgb, var(--hot) calc(var(--heat) * 45%), transparent); text-align: center; }
.pro-innings td.pro-inn-off { color: var(--soft); text-align: center; }
.pro-innings th { text-align: center; }
.pro-facts th { text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--ink); white-space: normal; width: 36%; vertical-align: top; }
.pro-facts td { font-family: Inter, system-ui, sans-serif; text-align: left; white-space: normal; color: var(--muted); line-height: 1.5; }
.pro-sources { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.pro-sources b { color: var(--ink); }

/* ---------- meters (form + advantage) ---------- */
.pro-meter-row { display: grid; grid-template-columns: minmax(130px, 1.3fr) minmax(90px, 1fr) 76px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pro-meter-row div:first-child { display: flex; flex-direction: column; gap: 1px; }
.pro-meter-row b { font-size: 12.5px; color: var(--ink); }
.pro-meter-row span { font-size: 11.5px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.pro-meter-row em { font-style: normal; font-size: 12px; font-weight: 800; text-align: right; font-family: 'JetBrains Mono', monospace; }
.pro-meter { position: relative; height: 10px; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--line); overflow: hidden; }
.pro-meter-mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--soft); }
.pro-meter-fill { position: absolute; top: 0; bottom: 0; background: var(--soft); }
.pro-meter-fill.pro-good { background: var(--good); }
.pro-meter-fill.pro-bad { background: var(--bad); }
.pro-meter-fill.pro-neutral { background: var(--soft); }

.pro-adv-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.pro-adv-head { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(140px, 2fr) 52px; gap: 12px; align-items: center; }
.pro-adv-head div:first-child { display: flex; flex-direction: column; gap: 1px; }
.pro-adv-head b { font-size: 13px; color: var(--ink); }
.pro-adv-head small { font-size: 11px; color: var(--soft); font-weight: 700; }
.pro-adv-head em { font-style: normal; font-weight: 800; font-size: 13px; text-align: right; font-family: 'JetBrains Mono', monospace; }
.pro-meter-wide { height: 12px; }
.pro-meter-fill.pro-adv-batter { background: var(--good); }
.pro-meter-fill.pro-adv-pitcher { background: var(--brand); }
.pro-meter-fill.pro-adv-neutral { background: var(--soft); }
em.pro-adv-batter { color: var(--good-d); }
em.pro-adv-pitcher { color: var(--brand-d); }
em.pro-adv-neutral { color: var(--muted); }
.pro-adv-txt { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 5px; font-size: 12px; color: var(--muted); }
.pro-adv-txt span:last-child { text-align: right; }
.pro-adv-names { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.pro-adv-names b { color: var(--ink); }
.pro-adv-names span:last-child { text-align: right; }
/* Context and display-only rows stay readable but carry less visual weight than skill. */
.pro-adv-context .pro-meter-fill { opacity: .5; }

/* ---------- zone grids ---------- */
.pro-zones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; justify-items: center; margin-top: 8px; }
.pro-zone { margin: 0; width: 100%; max-width: 280px; }
.pro-zone figcaption { text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 8px; }
.pro-zone-box { position: relative; aspect-ratio: 1 / 1.08; }
.pro-zq {
  position: absolute; width: 50%; height: 50%;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--zc, var(--panel-2)) calc(var(--za, 0) * 60%), var(--panel-2));
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; color: var(--ink);
}
.pro-zq span { position: absolute; padding: 5px 6px; }
.pro-zq-tl { left: 0; top: 0; border-radius: 10px 0 0 0; }
.pro-zq-tr { right: 0; top: 0; border-radius: 0 10px 0 0; }
.pro-zq-bl { left: 0; bottom: 0; border-radius: 0 0 0 10px; }
.pro-zq-br { right: 0; bottom: 0; border-radius: 0 0 10px 0; }
.pro-zq-tl span { left: 0; top: 0; }
.pro-zq-tr span { right: 0; top: 0; }
.pro-zq-bl span { left: 0; bottom: 0; }
.pro-zq-br span { right: 0; bottom: 0; }
.pro-zone-inner {
  position: absolute; left: 17%; right: 17%; top: 15%; bottom: 15%;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  border: 2px solid var(--ink); background: var(--panel); z-index: 1;
}
.pro-zc {
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--zc, var(--panel)) calc(var(--za, 0) * 75%), var(--panel));
  font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 800; color: var(--ink);
}

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .lab-tabs [role="tab"] { padding: 8px 11px; font-size: 12.5px; }
  .pro-zones { grid-template-columns: 1fr; }
  .pro-meter-row { grid-template-columns: minmax(0, 1fr) 70px; }
  .pro-meter-row .pro-meter { grid-column: 1 / -1; grid-row: 2; }
  .pro-adv-head { grid-template-columns: minmax(0, 1fr) 52px; }
  .pro-adv-head .pro-meter { grid-column: 1 / -1; grid-row: 2; }
  .pro-adv-txt, .pro-adv-names { grid-template-columns: 1fr; }
  .pro-adv-txt span:last-child, .pro-adv-names span:last-child { text-align: left; }
  .pro-chart svg { min-width: 520px; }
}
