/* Runs Created card, rail RC badges, and the Savant head-to-head dropdown.
   Uses bvp-lab.css tokens, so html.nyce-dark themes it with no extra rules. */

.rc-up { color: var(--good-d); }
.rc-down { color: var(--bad-d); }
.rc-flat { color: var(--muted); }

/* ---------- RC card ---------- */
.rc-card h4 { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); }
.rc-card h4 small { text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--muted); margin-left: 4px; }
.rc-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.rc-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); min-width: 0; }
.rc-tile small { font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.rc-tile b { font-family: 'JetBrains Mono', monospace; font-size: 24px; color: var(--ink); }
.rc-tile span { font-size: 11.5px; font-weight: 600; color: var(--soft); }
.rc-tile.rc-up { background: var(--edge-b-bg); border-color: var(--edge-b-line); }
.rc-tile.rc-up b, .rc-tile.rc-up small, .rc-tile.rc-up span { color: var(--edge-b-ink); }
.rc-tile.rc-down b { color: var(--bad-d); }

.rc-parts { margin-top: 14px; }
.rc-part { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr) 64px; gap: 10px; align-items: center; padding: 4px 0; }
.rc-part span { font-size: 12.5px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-part em { font-style: normal; font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: 12.5px; text-align: right; }
.rc-part-bar { position: relative; height: 12px; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--line); overflow: hidden; }
.rc-mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--soft); }
.rc-fill { position: absolute; top: 0; bottom: 0; }
.rc-fill.rc-up { background: var(--good); }
.rc-fill.rc-down { background: var(--bad); }
.rc-fill.rc-flat { background: var(--soft); }

.rc-lenses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.rc-lens { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: var(--panel); min-width: 0; }
.rc-big { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.rc-big small { font-family: Inter, system-ui, sans-serif; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.rc-big.rc-up { color: var(--good-d); }
.rc-big.rc-down { color: var(--bad-d); }
.rc-lens dl { margin: 0; display: grid; grid-template-columns: auto; gap: 2px; }
.rc-lens dt { font-size: 11px; font-weight: 800; color: var(--soft); margin-top: 5px; }
.rc-lens dd { margin: 0; font-size: 12.5px; color: var(--ink); font-weight: 600; }
.rc-shifts { list-style: none; margin: 0; padding: 0; }
.rc-shifts li { display: grid; grid-template-columns: minmax(0, 1fr) 52px 52px; gap: 6px; font-size: 12.5px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.rc-shifts li:last-child { border-bottom: 0; }
.rc-shifts span { color: var(--ink); font-weight: 600; }
.rc-shifts b { font-family: 'JetBrains Mono', monospace; text-align: right; color: var(--ink); }
.rc-shifts em { font-style: normal; font-family: 'JetBrains Mono', monospace; font-weight: 800; text-align: right; }
.rc-foot { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.rc-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }

@media (max-width: 1280px) {
  .rc-lenses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) { .rc-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .rc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-lenses { grid-template-columns: 1fr; }
  .rc-part { grid-template-columns: minmax(0, 1fr) 60px; }
  .rc-part .rc-part-bar { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Zone Threat band ---------- */
.zt-band { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.zt-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.zt-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.zt-main b { font-family: 'JetBrains Mono', monospace; font-size: 26px; color: var(--ink); }
.zt-main span { font-size: 11.5px; color: var(--muted); font-weight: 600; line-height: 1.35; }
.zt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.zt-chip { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); }
@media (max-width: 640px) { .zt-row { grid-template-columns: 1fr; } }

/* ---------- rail badge ---------- */
.rail-rcline { display: block; margin-top: 2px; font-size: 11px; font-weight: 700; color: var(--muted);
  font-family: 'JetBrains Mono', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-rcline b { font-weight: 800; }

/* ---------- Savant dropdown ---------- */
/* The strip's lineup column was an auto grid track, so it grew to its widest
   row (754px inside a 533px side) and clipped every batter's stat line along
   with this panel. A 0-minimum track keeps both inside the side. */
.nyce-bvp-lineup { grid-template-columns: minmax(0, 1fr); }
.nyce-bvp-row.savant-open { box-shadow: inset 3px 0 0 var(--brand); }
.savant-panel { border-bottom: 1px solid var(--line); background: var(--panel-2); padding: 10px 15px 12px; }
.savant-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.savant-head b { font-size: 13.5px; color: var(--ink); }
.savant-head span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 1px; }
.savant-close { border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 8px;
  width: 28px; height: 28px; font-size: 16px; line-height: 1; cursor: pointer; flex: 0 0 auto; }
.savant-close:hover { color: var(--ink); border-color: var(--brand); }
.savant-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 8px 0; }
.savant-line b { font-family: 'JetBrains Mono', monospace; font-size: 17px; color: var(--ink); }
.savant-line span { font-size: 12px; color: var(--muted); font-weight: 600; }
.savant-ops-explain { margin: 0 0 9px; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--brand) 36%, var(--line));
  border-radius: 8px; background: color-mix(in srgb, var(--brand) 6%, var(--panel)); }
.savant-ops-explain b { display: block; color: var(--ink); font: 800 12px/1.35 'JetBrains Mono', monospace; }
.savant-ops-explain span { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; font-weight: 600; line-height: 1.4; }
.savant-tag { font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); white-space: nowrap; }
.savant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.savant-cell { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--panel); min-width: 0; }
.savant-cell small { display: block; font-size: 10.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.savant-cell b { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--ink); }
.savant-empty { margin: 8px 0; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.savant-note { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.savant-staff { margin-top: 8px; overflow-x: auto; }
.savant-staff summary { cursor: pointer; font-size: 12px; font-weight: 800; color: var(--ink); padding: 4px 0; }
.savant-staff summary small { color: var(--muted); font-weight: 700; }
.savant-staff table { width: 100%; border-collapse: collapse; font-size: 12px; }
.savant-staff th, .savant-staff td { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: right; color: var(--ink); white-space: nowrap; }
.savant-staff th { font-size: 10.5px; color: var(--soft); text-transform: uppercase; letter-spacing: .03em; font-weight: 800; }
.savant-staff th:first-child, .savant-staff td:first-child { text-align: left; }
.savant-staff td small { color: var(--muted); }
.savant-staff td:not(:first-child) { font-family: 'JetBrains Mono', monospace; }
@media (max-width: 640px) {
  .savant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Offense Quality: the final score ---------- */
.oq-band { margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel-2); }
.oq-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.oq-formula { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 12px;
  padding-top: 10px; border-top: 1px dashed var(--line); }
.oq-formula > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.oq-formula em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); }
.oq-formula b { font-family: 'JetBrains Mono', monospace; font-size: 19px; color: var(--ink); line-height: 1.2; }
.oq-formula small { font-size: 11px; font-weight: 600; color: var(--soft); }
.oq-formula i { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 17px;
  font-weight: 700; color: var(--muted); padding-bottom: 2px; }
.oq-total b { font-size: 24px; color: var(--good-d); }
@media (max-width: 640px) { .oq-row { grid-template-columns: 1fr; } .oq-formula { gap: 8px; } }

.zt-pitcher { margin: 10px 0 0; font-size: 12px; font-weight: 600; color: var(--soft); }
.zt-pitcher b { font-family: 'JetBrains Mono', monospace; font-size: 14px; }

/* ---------- rail sort toggle ---------- */
.rc-railsort { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); margin: 0 0 8px; }
.rc-railsort > span { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); }
.rc-railsort button { font: inherit; font-size: 11.5px; font-weight: 700; padding: 4px 10px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--soft); }
.rc-railsort button.on { background: var(--edge-b-bg); border-color: var(--edge-b-line); color: var(--edge-b-ink); }
.rc-railsort em { flex: 1 1 100%; font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--muted); }
