/* ============================================================
   Venue-stats panel — styles  (prefix vp-)
   Shared by ground.html (live) and Venue Stats Panel.html (harness).
   Relies on site.css custom properties (--ink, --paper, --ball, etc).
   ============================================================ */

/* section wrapper on the ground page — aligns the card to page content */
.g-vpanel-wrap {
  max-width: 1100px;
  margin: 56px auto 0;
  padding: 0 24px;
}

.vp {
  background: var(--paper-3);
  border: 1px solid var(--ink);
  padding: 0;
  font-family: var(--sans);
  position: relative;
}

/* header */
.vp-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--ink);
}
.vp-mark {
  font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: 5px; margin-bottom: 9px;
}
.vp-ball-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ball); display: inline-block; }
.vp-title {
  font-family: var(--serif); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.025em; line-height: 0.98; color: var(--ink);
}
.vp-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
.vp-head-r { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; flex-shrink: 0; }
.vp-pills { display: flex; gap: 0; border: 1px solid var(--rule-2); border-radius: 8px; overflow: hidden; }
.vp-pill {
  background: var(--paper-3); border: none; border-right: 1px solid var(--rule);
  padding: 7px 13px; font-family: var(--sans); font-size: 12px; font-weight: 600;
  color: var(--ink-2); cursor: pointer; transition: all 0.13s; display: flex; align-items: center; gap: 6px;
}
.vp-pill:last-child { border-right: none; }
.vp-pill:hover { background: var(--paper-2); }
.vp-pill.active { background: var(--ink); color: var(--paper-3); }
.vp-pill-n {
  font-size: 9.5px; font-weight: 600; color: var(--ink-4); font-variant-numeric: tabular-nums;
  background: var(--paper-2); border-radius: 20px; padding: 1px 6px;
}
.vp-pill.active .vp-pill-n { background: rgba(255,255,255,0.16); color: var(--paper-2); }
.vp-gender { display: flex; gap: 14px; }
.vp-gtab {
  background: none; border: none; padding: 0 0 2px; font-family: var(--sans); font-size: 12px;
  font-weight: 600; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent;
}
.vp-gtab.active { color: var(--ink); border-bottom-color: var(--ball); }
.vp-prov {
  font-family: var(--sans); font-size: 10px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-4);
}

/* ---- CHARACTER READ ---- */
.vp-read { padding: 22px 24px; background: var(--paper); border-bottom: 1px solid var(--rule); }

/* direction A: gauges */
.vp-gauges { display: flex; flex-direction: column; gap: 18px; }
.vp-gauge-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.vp-gauge-name {
  font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-2);
}
.vp-gauge-val { font-family: var(--serif); font-weight: 700; font-size: 19px; color: var(--ink); line-height: 1; }
.vp-pct { font-size: 0.62em; color: var(--ink-3); font-weight: 600; }
.vp-track { position: relative; height: 4px; background: var(--rule); border-radius: 2px; }
.vp-tick { position: absolute; top: -3px; width: 1px; height: 10px; background: var(--ink-4); transform: translateX(-50%); }
.vp-ball {
  position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%;
  background: var(--ball); transform: translate(-50%, -50%);
  box-shadow: inset -2px -2px 0 rgba(0,0,0,0.18), inset 2px 2px 0 rgba(255,255,255,0.18), 0 1px 4px rgba(168,35,26,0.35);
  border: 1.5px solid var(--paper-3);
}
.vp-gauge-foot {
  display: flex; justify-content: space-between; margin-top: 7px;
  font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
}
.vp-gauge-sub { letter-spacing: 0; text-transform: none; font-weight: 400; color: var(--ink-3); font-size: 11px; }

.vp-verdict {
  font-family: var(--serif); font-weight: 500; font-size: clamp(15px, 2vw, 17px);
  line-height: 1.4; color: var(--ink); letter-spacing: -0.01em;
}
.vp-read-gauges .vp-verdict { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--rule); }

/* direction B: spectrum */
.vp-read-spectrum .vp-verdict { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.vp-specs { display: flex; flex-direction: column; gap: 17px; }
.vp-spec-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.vp-spec-bar {
  position: relative; height: 11px; border-radius: 6px;
  background: linear-gradient(90deg, var(--rust) 0%, var(--ink-4) 50%, var(--turf) 100%);
}
.vp-spec-wickets { background: linear-gradient(90deg, var(--accent) 0%, var(--ink-4) 50%, var(--rust) 100%); }
.vp-spec-toss { background: linear-gradient(90deg, var(--turf) 0%, var(--ink-4) 50%, var(--gold) 100%); }
.vp-spec-marker {
  position: absolute; top: 50%; width: 4px; height: 22px; border-radius: 3px;
  background: var(--ink); transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px var(--paper), 0 2px 6px rgba(15,24,34,0.3);
}

/* direction C: verdict-first */
.vp-read-verdict { padding-top: 26px; padding-bottom: 26px; }
.vp-verdict-hero {
  font-family: var(--serif); font-weight: 700; font-size: clamp(20px, 3.4vw, 27px);
  line-height: 1.22; letter-spacing: -0.025em; color: var(--ink); max-width: 18em;
  text-wrap: balance; margin-bottom: 22px;
}
.vp-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.vp-chip { border: 1px solid var(--rule); border-radius: 9px; padding: 11px 12px 10px; background: var(--paper-3); }
.vp-chip-top {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px;
}
.vp-chip-top span:first-child {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
}
.vp-chip-top span:last-child { font-family: var(--serif); font-weight: 700; font-size: 15px; color: var(--ink); }
.vp-chip-track { position: relative; height: 4px; background: var(--rule); border-radius: 2px; }
.vp-chip-track .vp-ball { width: 11px; height: 11px; }
.vp-chip-foot {
  display: flex; justify-content: space-between; margin-top: 7px;
  font-size: 9px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4);
}

/* ---- STAT GRID ---- */
.vp-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1.1fr; gap: 0;
  border-bottom: 1px solid var(--rule);
}
.vp-group { padding: 18px 22px; border-right: 1px solid var(--rule); }
.vp-group:last-child { border-right: none; }
.vp-group-head {
  font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 15px;
}
.vp-cells { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.vp-cell-label {
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 5px;
}
.vp-cell-val { font-family: var(--serif); font-weight: 700; font-size: 25px; line-height: 0.95; color: var(--ink); }
.vp-unit { font-size: 0.46em; font-weight: 600; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.vp-cell-sub { font-size: 10.5px; color: var(--ink-3); margin-top: 5px; line-height: 1.35; }

/* pace/spin split */
.vp-split-bar {
  display: flex; height: 16px; border-radius: 4px; overflow: hidden; margin-bottom: 10px;
  border: 1px solid var(--rule);
}
.vp-split-pace { background: var(--ink); display: block; }
.vp-split-spin { background: var(--accent); display: block; }
.vp-split-legend { display: flex; gap: 16px; margin-bottom: 8px; }
.vp-split-key {
  display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.vp-split-key i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.vp-dot-pace { background: var(--ink); }
.vp-dot-spin { background: var(--accent); }

/* ---- SIX DIFFICULTY DUAL ---- */
.vp-six { padding: 20px 24px; border-bottom: 1px solid var(--rule); }
.vp-six-cols { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; }
.vp-six-tag {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 9px;
}
.vp-six-tag-real { color: var(--ball); }
.vp-six-num { font-family: var(--serif); font-weight: 700; font-size: 30px; line-height: 0.9; color: var(--ink); }
.vp-six-bar { height: 5px; background: var(--rule); border-radius: 3px; margin: 11px 0 7px; overflow: hidden; }
.vp-six-bar span { display: block; height: 100%; background: var(--ink-3); }
.vp-six-bar-real span { background: var(--ball); }
.vp-six-vs {
  font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--ink-4);
  align-self: center; padding-top: 18px;
}
.vp-six-note {
  font-family: var(--serif); font-weight: 500; font-size: 14px; line-height: 1.45;
  color: var(--ink-2); margin-top: 16px; padding-top: 14px; border-top: 1px dotted var(--rule);
  letter-spacing: -0.005em;
}

/* ---- THIN DATA ---- */
.vp-thin {
  padding: 30px 24px; display: flex; align-items: center; gap: 22px;
  border-bottom: 1px solid var(--rule);
}
.vp-thin-num {
  font-family: var(--serif); font-weight: 700; font-size: 56px; line-height: 0.85; color: var(--ink-4);
  flex-shrink: 0;
}
.vp-thin-txt { font-size: 14px; line-height: 1.55; color: var(--ink-3); max-width: 44ch; }
.vp-thin-txt strong { display: block; color: var(--ink-2); font-weight: 600; margin-bottom: 4px; font-size: 14.5px; }

/* ---- COMPARE ---- */
.vp-compare { padding: 16px 24px; }
.vp-compare-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.vp-select-wrap { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.vp-select-wrap::after {
  content: "▾"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  pointer-events: none; color: var(--ink-3); font-size: 11px;
}
.vp-select {
  width: 100%; appearance: none; -webkit-appearance: none;
  background: var(--paper); border: 1px solid var(--rule-2); border-radius: 8px;
  padding: 9px 30px 9px 13px; font-family: var(--sans); font-size: 13px; font-weight: 500;
  color: var(--ink); cursor: pointer;
}
.vp-overlay-link {
  font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--rule-2); padding-bottom: 2px; transition: all 0.13s; white-space: nowrap;
}
.vp-overlay-link:hover { color: var(--ball); border-bottom-color: var(--ball); }

.vp-cmp-grid { margin-top: 16px; border-top: 1px solid var(--rule); padding-top: 4px; }
.vp-cmp-names {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; padding: 8px 0 10px;
  font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
}
.vp-cmp-names span:nth-child(2), .vp-cmp-names span:nth-child(3) { text-align: right; }
.vp-cmp-a { color: var(--ball); }
.vp-cmp-b { color: var(--accent); }
.vp-cmp-row {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; padding: 7px 0; align-items: baseline;
  border-top: 1px dotted var(--rule);
}
.vp-cmp-label { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.vp-cmp-v { text-align: right; font-family: var(--serif); font-size: 15px; font-weight: 600; color: var(--ink-3); }
.vp-cmp-v.win { color: var(--ink); }

/* ============================================================
   TEST FORMAT  (prefix vp-result / vp-rseg / vp-tpitch)
   Hero three-way result bar + two-figure pitch line.
   ============================================================ */
.vp-read-test { padding: 22px 24px 24px; }
.vp-result-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.vp-result-tag {
  font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent);
}
.vp-neutral-flag {
  font-family: var(--sans); font-size: 9px; font-weight: 700; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--rust); white-space: nowrap;
  border: 1px solid var(--rust); border-radius: 20px; padding: 2px 9px;
}
.vp-result-bar {
  display: flex; height: 40px; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--rule); background: var(--rule);
}
.vp-rseg {
  display: flex; align-items: center; justify-content: center; min-width: 0;
  font-family: var(--sans); font-size: 13px; font-weight: 700; color: #fff;
  font-variant-numeric: tabular-nums; transition: width 0.3s ease;
  border-right: 1.5px solid var(--paper-3);
}
.vp-rseg:last-child { border-right: none; }
.vp-rseg-home, .vp-rseg-dec { background: var(--turf); }
.vp-rseg-away { background: var(--rust); }
.vp-rseg-draw { background: var(--ink-3); }
.vp-result-legend { display: flex; gap: 22px; margin-top: 13px; flex-wrap: wrap; }
.vp-rkey {
  display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600;
  color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.vp-rkey i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.vp-rkey b { font-family: var(--serif); font-weight: 700; color: var(--ink); margin-left: 1px; }
.vp-rdot-home, .vp-rdot-dec { background: var(--turf); }
.vp-rdot-away { background: var(--rust); }
.vp-rdot-draw { background: var(--ink-3); }
.vp-read-test .vp-verdict { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); }

.vp-tpitch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 34px;
  padding: 20px 24px 22px; border-bottom: 1px solid var(--rule);
}
.vp-sample-note {
  padding: 14px 24px; border-bottom: 1px solid var(--rule); background: var(--paper);
  font-family: var(--serif); font-weight: 500; font-size: 13.5px; line-height: 1.5; color: var(--ink-2);
}
.vp-sample-note strong { color: var(--ink); font-weight: 700; }

/* ---- FOOT (microbrand for screenshots) ---- */
.vp-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 24px; border-top: 1px solid var(--ink); background: var(--ink);
}
.vp-foot-brand {
  font-family: var(--serif); font-weight: 800; font-size: 15px; letter-spacing: -0.03em;
  color: var(--paper-3); display: flex; align-items: center;
}
.vp-foot-brand .vp-ball-dot { width: 6px; height: 6px; margin-left: 1px; }
.vp-foot-meta {
  font-family: var(--sans); font-size: 10px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-4); font-variant-numeric: tabular-nums;
}

/* ---- responsive: phone-width ---- */
@media (max-width: 560px) {
  .vp-head { flex-direction: column; }
  .vp-head-r { align-items: flex-start; width: 100%; }
  .vp-grid { grid-template-columns: 1fr; }
  .vp-group { border-right: none; border-bottom: 1px solid var(--rule); }
  .vp-group:last-child { border-bottom: none; }
  .vp-chips { grid-template-columns: 1fr; }
  .vp-six-cols { grid-template-columns: 1fr; gap: 14px; }
  .vp-six-vs { padding: 0; text-align: center; }
  .vp-tpitch { grid-template-columns: 1fr; gap: 18px; }
  .g-vpanel-wrap { padding: 0 16px; }
}
