/* /{league}/expert page. Tokens, header, tables, .status-pill and skeletons
   come from main.css; .history-intro, .table-wrap/.ledger-table and
   .ledger-empty from history.css. This file only adds the scoreboard, the
   pick cards and the units line. */

.expert-subhead {
  font-family: 'Space Grotesk', 'IBM Plex Sans', sans-serif; font-weight: 600; font-size: 1.05rem;
  margin: 30px 0 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.expert-subnote { font-family: 'IBM Plex Mono', monospace; font-size: .7rem; font-weight: 500; color: var(--text-muted); }

/* --- Scoreboard: the record in one strip --- */
.expert-scoreboard {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.6fr); gap: 1px;
  background: var(--divider); border: 1px solid var(--divider); border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .3);
}
.expert-scoreboard > .skeleton { grid-column: 1 / -1; }
.score-cell { background: var(--card-bg); padding: 14px 16px; min-width: 0; }
.score-cell .label { font-size: .66rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.score-cell .value { font-family: 'IBM Plex Mono', monospace; font-size: 1.35rem; font-weight: 700; margin-top: 4px; }
.score-cell .value.positive { color: var(--win); }
.score-cell .value.negative { color: var(--loss); }
.score-cell .sub { font-size: .7rem; color: var(--text-muted); margin-top: 2px; }
.score-cell.spark { display: flex; flex-direction: column; justify-content: center; }
.score-cell.spark svg { width: 100%; height: 46px; display: block; margin-top: 4px; overflow: visible; }
.spark-zero { stroke: var(--divider); stroke-width: 1; stroke-dasharray: 3 3; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-line.negative { stroke: var(--loss); }
.spark-dot { fill: var(--accent); }
.spark-dot.negative { fill: var(--loss); }
.skeleton-scoreboard { height: 86px; }

/* --- Today's pick cards --- */
.expert-today { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.skeleton-expert-card { height: 260px; }
.expert-card {
  background: var(--card-bg); border: 1px solid var(--divider); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .3); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.expert-card.win { background: var(--recap-win-bg); border-color: rgba(var(--win-rgb), .35); }
.expert-card.loss { background: var(--recap-loss-bg); border-color: rgba(var(--loss-rgb), .3); }
.expert-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.expert-matchup { font-size: .76rem; color: var(--text-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expert-bet { font-family: 'Space Grotesk', 'IBM Plex Sans', sans-serif; font-weight: 700; font-size: 1.2rem; line-height: 1.25; margin: 0; text-wrap: balance; }
.expert-bet .bet-market { display: block; font-family: 'IBM Plex Sans', sans-serif; font-weight: 500; font-size: .8rem; color: var(--text-muted); margin-top: 3px; }

/* The price is the product here: the best number, and where to get it. */
.expert-price {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 10px; background: rgba(var(--bg-rgb), .45); border: 1px solid var(--divider);
}
.expert-odds { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 1.5rem; color: var(--text-primary); }
.expert-book {
  font-family: 'IBM Plex Mono', monospace; font-size: .7rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  padding: 4px 9px; border-radius: 20px; background: var(--accent); color: var(--ink);
}
.expert-price-meta { font-size: .72rem; color: var(--text-muted); line-height: 1.4; margin-left: auto; text-align: right; }
.expert-price-meta strong { color: var(--text-primary); font-weight: 600; }
.line-moved { color: var(--thin-edge); }

.expert-rationale { font-size: .88rem; line-height: 1.55; margin: 0; color: var(--text-primary); max-width: 65ch; }
.expert-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.expert-sources { display: flex; flex-wrap: wrap; gap: 6px; font-size: .72rem; min-width: 0; }
.expert-sources a {
  color: var(--info); text-decoration: none; padding: 3px 8px; border-radius: 12px;
  background: rgba(var(--info-rgb), .1); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.expert-sources a:hover { background: rgba(var(--info-rgb), .2); }
.expert-confidence { display: inline-flex; align-items: center; gap: 4px; font-size: .66rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); flex: none; }
.conf-pip { width: 7px; height: 7px; border-radius: 50%; background: var(--divider); }
.conf-pip.on { background: var(--accent); }
.expert-result { display: flex; align-items: center; gap: 10px; }
.expert-result .units { font-family: 'IBM Plex Mono', monospace; font-weight: 700; }
.expert-result .units.positive { color: var(--win); }
.expert-result .units.negative { color: var(--loss); }

/* --- Track record table --- */
.expert-table td.cell-bet { font-family: 'IBM Plex Sans', sans-serif; font-weight: 600; white-space: normal; min-width: 180px; }
.expert-table td.positive { color: var(--win); }
.expert-table td.negative { color: var(--loss); }
.expert-table .status-pill { padding: 3px 9px; font-size: .64rem; }
.expert-table details summary { cursor: pointer; color: var(--info); font-size: .72rem; font-weight: 500; list-style: none; }
.expert-table details summary::-webkit-details-marker { display: none; }
.expert-table details p { white-space: normal; font-weight: 400; font-size: .8rem; line-height: 1.5; color: var(--text-muted); margin: 6px 0 0; max-width: 60ch; }

/* --- What's working: record by conviction, market and side --- */
.expert-splits { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.split-card {
  background: var(--card-bg); border: 1px solid var(--divider); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .3); padding: 12px 14px; min-width: 0;
}
.split-card h4 { margin: 0 0 8px; font-size: .66rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); font-weight: 600; }
.split-card table { width: 100%; border-collapse: collapse; font-size: .8rem; font-variant-numeric: tabular-nums; }
.split-card th { text-align: right; font-size: .62rem; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); font-weight: 500; padding: 0 0 6px 8px; }
.split-card th:first-child, .split-card td:first-child { text-align: left; padding-left: 0; }
.split-card td { text-align: right; padding: 5px 0 5px 8px; border-top: 1px solid var(--divider); font-family: 'IBM Plex Mono', monospace; white-space: nowrap; }
.split-card td:first-child { font-family: 'IBM Plex Sans', sans-serif; font-weight: 600; white-space: normal; }
.split-card td.positive { color: var(--win); }
.split-card td.negative { color: var(--loss); }

@media (max-width: 720px) {
  .expert-scoreboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score-cell.spark { grid-column: 1 / -1; }
  .expert-today { grid-template-columns: minmax(0, 1fr); }
  .expert-price-meta { margin-left: 0; text-align: left; flex-basis: 100%; }
}
