/* ==========================================================================
   Edgecourt Model — iOS Liquid Glass Split-View Bento Cockpit
   ========================================================================== */

.v7-cockpit {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

/* Left Sticky Frosted Glass Control Column */

.v7-sidebar {
  position: sticky;
  top: 136px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.v7-form {
  padding: 20px;
}

.v7-form-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.v7-form-top h2 {
  font-size: 16px;
  font-weight: 680;
}

/* Vertical Glass Matchup Stack with Centered Tactile Swap */

.v7-matchup-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  margin-bottom: 16px;
  background: var(--glass-subtle);
  box-shadow: inset 0 0 0 1px var(--line-subtle);
  border-radius: var(--r-md);
}

.v7-matchup-stack label {
  margin: 0;
}

.v7-player-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 620;
  color: var(--muted);
}

.v7-side-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.v7-side-dot--a {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.v7-side-dot--b {
  background: var(--muted-soft);
}

.v7-matchup-stack input {
  font-size: 13.5px;
  font-weight: 580;
  min-height: 40px;
}

.v7-swap-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
}

.v7-swap-line {
  flex: 1;
  height: 1px;
  background: var(--line-subtle);
}

.v7-swap-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  min-height: 30px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--glass-strong);
  color: var(--ink-secondary);
  font-size: 11.5px;
  font-weight: 600;
  box-shadow: var(--pill-shadow);
  transition-property: background-color, color, box-shadow, scale;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.v7-swap-btn:hover {
  background: var(--glass-hover);
  color: var(--accent-ink);
}

.v7-swap-btn:active {
  scale: 0.96;
}

.v7-section-label {
  font-size: 10.5px;
  font-weight: 660;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 0 8px;
}

.v7-sidebar-fields {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.v7-sidebar-fields label {
  margin: 0;
}

.v7-pair-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* iOS Segmented Glass Controls */

.v7-seg-control {
  display: flex;
  padding: 3px;
  gap: 3px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--r-pill);
  min-height: 36px;
}

.v7-seg-control button {
  flex: 1;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 580;
  padding: 5px 8px;
  white-space: nowrap;
  transition-property: background-color, color, box-shadow, scale;
  transition-duration: 140ms;
  transition-timing-function: ease-out;
}

.v7-seg-control button:hover {
  color: var(--ink);
}

.v7-seg-control button:active {
  scale: 0.96;
}

.v7-seg-control button.active {
  background: var(--glass-strong);
  color: var(--ink);
  font-weight: 650;
  box-shadow: var(--pill-shadow);
}

.v7-seg-control button.active[data-v7-surface="Hard"] {
  color: var(--surface-hard-ink);
}

.v7-seg-control button.active[data-v7-surface="Clay"] {
  color: var(--surface-clay-ink);
}

.v7-seg-control button.active[data-v7-surface="Grass"] {
  color: var(--surface-grass-ink);
}

/* Optional Manual Bookmaker Odds Disclosure */

.market-lab-details {
  margin: 14px 0 16px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--glass-subtle);
  box-shadow: inset 0 0 0 1px var(--line-subtle);
}

.market-lab-details summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 620;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.market-lab-details summary::-webkit-details-marker {
  display: none;
}

.v7-chevron {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
  transition-property: transform;
  transition-duration: 180ms;
  transition-timing-function: ease-out;
}

details[open] > summary .v7-chevron {
  transform: rotate(180deg);
}

.market-lab-details > p {
  margin: 8px 0 12px;
  font-size: 11.5px;
}

.v7-odds-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.v7-odds-grid label {
  margin: 0;
}

/* Compact Glass Model Provenance Footer Card */

.v7-provenance-card {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v7-provenance-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.v7-provenance-top b {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink);
}

.v7-provenance-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.v7-mono-chip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-secondary);
  background: var(--glass-subtle);
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 2px 7px;
  border-radius: var(--r-pill);
}

/* ==========================================================================
   Right Column: Live Forecast Bento Glass Stage
   ========================================================================== */

.v7-stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.v7-results {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@keyframes v7CardEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.v7-stagger {
  animation: v7CardEnter 320ms ease-out both;
}

.v7-stagger-1 { animation-delay: 0ms; }
.v7-stagger-2 { animation-delay: 80ms; }
.v7-stagger-3 { animation-delay: 160ms; }

.v7-card {
  padding: 22px 24px;
}

.v7-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.v7-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.v7-card-head h2 {
  font-size: 21px;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin-bottom: 4px;
}

.v7-card-head p {
  font-size: 12.5px;
  color: var(--muted);
}

.v7-headline-prob {
  text-align: right;
  padding: 10px 16px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  min-width: 170px;
}

.v7-headline-prob span {
  display: block;
  font-size: 10px;
  font-weight: 660;
  color: var(--accent-ink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.v7-headline-prob strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  font-weight: 720;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Luminous Frosted Dual Probability Bar */

.v7-prob-wrap {
  margin: 4px 0 20px;
}

.v7-prob-labels {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 640;
  font-variant-numeric: tabular-nums;
}

.v7-prob-labels span:first-child {
  color: var(--accent-ink);
}

.v7-prob-labels span:last-child {
  color: var(--ink-secondary);
}

.v7-prob-bar {
  display: flex;
  height: 14px;
  padding: 2px;
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--glass-subtle);
  box-shadow: inset 0 0 0 1px var(--line);
  gap: 2px;
}

.v7-bar-a {
  background: linear-gradient(90deg, var(--accent) 0%, #38bdf8 100%);
  height: 100%;
  border-radius: var(--r-pill) 3px 3px var(--r-pill);
  transition-property: width;
  transition-duration: 320ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.v7-bar-b {
  background: var(--chart-bar-muted);
  height: 100%;
  border-radius: 3px var(--r-pill) var(--r-pill) 3px;
  transition-property: width;
  transition-duration: 320ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

/* Subgrid: Player Profile + Signal Components */

.v7-subgrid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 22px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line-subtle);
}

.v7-subgrid h3,
.v7-card h3 {
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 660;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Signal Component Contribution Bars */

.v7-contrib-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v7-contrib-row {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.v7-contrib-label {
  color: var(--ink-secondary);
  font-weight: 560;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v7-contrib-track {
  position: relative;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--glass-subtle);
  box-shadow: inset 0 0 0 1px var(--line-subtle);
  overflow: hidden;
}

.v7-contrib-mid {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--input-border);
}

.v7-contrib-fill {
  position: absolute;
  top: 1px;
  bottom: 1px;
  border-radius: var(--r-pill);
}

.v7-contrib-fill--pos {
  left: 50%;
  background: var(--accent);
}

.v7-contrib-fill--neg {
  right: 50%;
  background: #f97316;
}

.v7-contrib-val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink);
}

.v7-contrib-meta {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line-subtle);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Total Games & Game Handicap Side-by-Side Glass Bento */

.v7-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.v7-two-col table th {
  padding: 9px 8px;
  font-size: 10px;
}

.v7-two-col table td {
  padding: 9px 8px;
  font-size: 12px;
}

.v7-sets-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 16px;
}

.v7-set-tile {
  flex: 1;
  min-width: 90px;
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: var(--glass-subtle);
  box-shadow: inset 0 0 0 1px var(--line-subtle);
}

.v7-set-tile span {
  display: block;
  font-size: 10.5px;
  font-weight: 640;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.v7-set-tile strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.v7-set-bar {
  margin-top: 7px;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--line);
  overflow: hidden;
}

.v7-set-bar i {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--accent);
}

/* Ladders & Record Disclosure */

.v7-ladder {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-subtle);
}

.v7-ladder summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 620;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.v7-ladder summary::-webkit-details-marker {
  display: none;
}

.v7-row-highlight {
  background: var(--glass-selected) !important;
}

.v7-row-highlight td:first-child b {
  color: var(--accent-ink);
}

.model-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 14px;
}

.model-save {
  padding: 16px 22px;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--r-xl);
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.model-save span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.v7-empty-state {
  padding: 56px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.v7-empty-state h3 {
  font-size: 17px;
  font-weight: 660;
  color: var(--ink);
  text-transform: none;
  letter-spacing: -0.015em;
}

.v7-empty-state p {
  max-width: 440px;
}

/* Verified Out-of-Sample Record */

.v7-record {
  padding: 16px 22px;
}

.v7-record summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--ink);
}

.v7-record summary::-webkit-details-marker {
  display: none;
}

.v7-record-body {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-subtle);
}

.v7-record-body h3 {
  margin: 18px 0 10px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.v7-record-body h3:first-of-type {
  margin-top: 10px;
}

/* Fractional Kelly Research Sizing Controls & Result Strip */

.v7-kelly-panel {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--glass-subtle);
  box-shadow: inset 0 0 0 1px var(--line-subtle);
}

.v7-kelly-hint {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

.v7-kelly-strip {
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  background: var(--glass-subtle);
  box-shadow: inset 0 0 0 1px var(--line-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v7-kelly-strip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.v7-kelly-badge {
  font-size: 11.5px;
  font-weight: 620;
  color: var(--ink-secondary);
}

.v7-kelly-rec {
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.45;
}

.v7-kelly-warn {
  font-size: 11.5px;
  color: var(--amber-ink, #b45309);
  line-height: 1.4;
}

.v7-kelly-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 1280px) {
  .v7-cockpit {
    grid-template-columns: 350px minmax(0, 1fr);
  }
  .v7-two-col,
  .v7-subgrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .v7-cockpit {
    grid-template-columns: minmax(0, 1fr);
  }
  .v7-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .v7-form,
  .v7-card {
    padding: 16px;
  }
  .v7-headline-prob {
    text-align: left;
    width: 100%;
  }
  .v7-pair-grid,
  .v7-odds-grid {
    grid-template-columns: 1fr;
  }
}
