/* Shared workspace treatment. Component layout remains in styles.css. */
:root { --bg: #f7f8fa; --surface: #fff; --surface-2: #f0f3f6; --ink: #20262d; --muted: #596574; --line: #dce2e8; --teal: #007f83; --red: #c52540; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 16px; line-height: 1.5; }
body :is(button,input,select,textarea) { font-family: inherit; letter-spacing: 0; }
body :is(h1,h2,h3,h4,strong,b,button,summary,label) { font-weight: 600; }
body h1 { font-size: 30px; line-height: 1.2; }
body h2 { font-size: 21px; line-height: 1.3; }
body h3 { font-size: 18px; }
body :is(small,.muted,.data-line) { font-size: 14px; }
body :is(input,select) { min-height: 44px; border: 1px solid #b8c3ce; border-radius: 6px; background: white; padding: 8px 12px; font-size: 16px; }
body :is(button,summary) { min-height: 40px; }
body :is(button,summary,input,select,a):focus-visible { outline: 3px solid #007f83; outline-offset: 3px; }
.topbar { background: #fff; display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; }
.topbar .brand-block { flex: 0 0 auto; }
.topbar .mode-nav { flex: 1 0 max-content; min-height: 66px; }
.topbar .topbar-context { flex: 0 1 auto; margin-left: auto; padding-left: 0; }
.main-workspace { max-width: 1680px; margin: auto; width: 100%; }
.workspace-header { padding-top: 20px; padding-bottom: 18px; }
.header-metrics { display: none; }
.data-error .status-dot { background: var(--red); }
.view-player .workspace-header { display: none; }
.section-heading { margin-bottom: 14px; }
.league-toolbar { background: transparent; border: 0; padding: 0 0 18px; }
.league-ledger table { font-variant-numeric: tabular-nums; }
.league-ledger td { height: 56px; font-size: 16px; }
.league-ledger .player-name-button strong { font-weight: 600; }
.league-ledger .sort-button { font-size: 14px; }
.league-ledger tbody tr:hover { background: #edf7f7; }
.league-ledger td:nth-child(8) { color: #00777c; font-size: 18px; }
.league-ledger .avatar { width: 38px; height: 38px; }
.players-table-panel .table-shell { max-height: max(280px, calc(100vh - 390px)); }
.comparison-picker .section-heading,.compare-picker-title strong { display: none; }
.comparison-picker { padding: 0 0 16px; }
.compare-player-picker { padding: 12px 16px; background: white; border: 1px solid var(--line); border-radius: 6px; }
.compare-picker-title { padding: 0; margin: 0; border: 0; }
.compare-search label { display: none; }
.compare-search-filters summary { min-height: 28px; font-size: 14px; color: var(--muted); }
.compare-filter-grid { padding-top: 8px; }
.comparison-profiles { padding: 12px 0; }
.comparison-profiles .compare-details,.comparison-profiles .coverage-tags { display: none; }
.comparison-profiles h2 { font-size: 22px; }
.comparison-profiles .compare-photo { width: 64px; height: 64px; }
.comparison-career { padding-top: 18px; }
.player-detail-toolbar { gap: 12px; padding: 12px 0; }
.player-detail-page .card-header { padding: 16px 0; }
.player-detail-page .card-title h2 { font-size: 28px; }
.player-detail-page .card-photo { width: 100px; height: 100px; }
.hvi-chart-card { max-width: 1100px; margin: 0 auto; }
.hvi-plot { height: 280px; }
.hvi-dot-label { font-size: 14px; font-weight: 600; }
.hvi-point { cursor: pointer; }
.hvi-point::before { content: ''; position: absolute; inset: -8px; }
.hvi-point:not(.is-active):not(.is-latest):not(.is-peak):not(:hover):not(:focus) .hvi-dot-label { opacity: 0; }
.mean-marker { position: absolute; top: 0; height: 18px; width: 2px; background: #20262d; }
.hvi-point:focus { outline: 3px solid #007f83; outline-offset: 4px; z-index: 5; }
.hvi-axis-label { font-weight: 400; font-size: 14px; }
.chart-gridline { position: absolute; width: 100%; border-top: 1px solid #dce2e8; pointer-events: none; }
.chart-gridline span { position: absolute; right: calc(100% + 8px); top: -11px; font-size: 13px; color: var(--muted); }
.chart-gridline.is-zero { border-color: #647484; border-top-width: 2px; }
.hvi-plot-area,.comparison-hvi-chart .hvi-plot-area { left: 48px; right: 35px; }
.hvi-axis,.comparison-hvi-chart .hvi-axis { left: 48px; right: 35px; }
.comparison-hvi-point.series-b { border-radius: 1px; }
.fingerprint-context > :nth-child(-n+3) { display: none; }
.fingerprint-context { grid-template-columns: repeat(2,minmax(0,1fr)); }
.fingerprint-feature > div:first-child span,
.fingerprint-traits :is(span,strong),
.rink-map-legend,
.rink-map-legend strong,
.fingerprint-scale span,
.fingerprint-context span { font-size: 14px; }
.comparable-list button > div > strong { font-size: 16px; }
.fingerprint-feature > i { position: relative; background: repeating-linear-gradient(to right,#e5eaef 0,#e5eaef calc(50% - 1px),#a5b1bf calc(50% - 1px),#a5b1bf 50%); }
.rink-heatmap { width:100%; max-width:none; height:auto; min-height:0; max-height:none; aspect-ratio:210 / 95; }
.fingerprint-evidence { align-items: start; }
.live-projection { background: #20262d; border-radius: 6px; margin: 16px 0; }
.simulation-scoreboard { display: none; }
.simulation-details { border: 0; }
.simulation-details > summary { font-size: 20px; }
.simulation-detail { border: 0; }
.scenario-live-summary { background: #20262d; }
.scenario-delta-strip strong { font-variant-numeric: tabular-nums; }
.scenario-delta-strip span::after { content: ' change'; }
.scenario-outlook-card { box-shadow: none; }
.win-probability { display: flex; height: 12px; background: #c52540; border-radius: 4px; overflow: hidden; grid-column: 1/-1; }
.win-probability span { background: #00a6a6; }
.compare-dot-track { height: 18px; position: relative; background: #edf0f4; border-radius: 3px; min-width: 100px; }
.compare-dot-track i { position: absolute; width: 10px; height: 10px; top: 4px; background: #007f83; border-radius: 50%; transform: translateX(-50%); }
.compare-dot-track i + i { background: #c52540; border-radius: 1px; }
.mobile-player-meta { display: none; }
.comparison-dot-plots { padding: 16px 0 24px; }
.comparison-dot-row { display: grid; grid-template-columns: 140px 70px minmax(100px,1fr) 70px; align-items: center; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.comparison-dot-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.dot-plot-legend { display:flex; flex-wrap:wrap; justify-content:flex-start; gap:10px 24px; margin-bottom:12px; padding:12px 0; font-size:14px; border-bottom:1px solid var(--line); }
.dot-plot-legend > span { display:flex; align-items:center; gap:8px; min-width:0; font-weight:600; }
.dot-plot-legend i { display:block; width:10px; height:10px; flex:0 0 10px; background:currentColor; }
.dot-plot-legend .legend-player-a i { border-radius:50%; }
.dot-plot-legend .legend-mean i { width:2px; flex-basis:2px; height:18px; margin:0 4px; }
.dot-plot-legend small { flex-basis:100%; color:var(--muted); font-size:13px; }
.league-benchmark { position: absolute; top: -3px; height: 14px; width: 2px; background: #20262d; transform: translateX(-1px); }
.chart-tooltip { display: none; position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); padding: 6px 10px; background: #20262d; color: white; font-size: 14px; font-weight: 400; white-space: nowrap; border-radius: 4px; pointer-events: none; }
.hvi-point:hover .chart-tooltip,.hvi-point:focus .chart-tooltip { display: block; }
.hvi-point:hover,.hvi-point:focus { z-index: 10; }
.comparison-profiles .coverage-tag-row { display: none; }
.comparison-profiles .tag-row { display: none; }
.compare-coverage { display: block; margin-top: 6px; color: var(--muted); }
.compare-profile { padding-top: 4px; padding-bottom: 4px; }
.compare-primary { margin-top: 10px; padding-top: 10px; }
.data-explanation { padding: 20px 0; border-bottom: 1px solid var(--line); }
.data-explanation dl { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 12px 24px; max-width: 1050px; }
.data-explanation dt { font-weight: 600; }
.data-explanation dd { margin: 0; }
.scenario-comparison-grid { display: block; overflow-x: auto; }
.scenario-before-after { width: 100%; min-width: 0; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.game-lab { gap: 16px; }
.matchup-builder { background: transparent; border: 0; padding: 0; }
.simulation-details-body { padding: 16px; }
.simulation-detail { padding: 0 0 20px; margin: 0; }
.scenario-before-after :is(td,th) { padding: 12px; border-bottom: 1px solid var(--line); text-align: right; }
.scenario-before-after :is(td,th):first-child { text-align: left; }
.simulation-note { grid-column: 1/-1; color: var(--muted); font-size: 14px; margin: 0; }
.builder-editor-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding-bottom: 16px; }
.builder-editor-nav h2 { margin: 0; }
.builder-editor .scenario-context { display: none; }
.chart-alignment { width: 150px; flex-shrink: 0; }
.chart-alignment button { min-height: 36px; }
@media(min-width:1000px) {
  .scenario-live-summary { position: sticky; top: 68px; z-index: 12; }
}
@media(max-width:760px) {
  .topbar { gap: 0; }
  .topbar .brand-block { order: 1; }
  .topbar .topbar-context { order: 2; }
  .topbar .mode-nav { order: 3; flex-basis: 100%; min-height: 40px; }
  body .main-workspace { padding: 12px; }
  body h1 { font-size: 26px; }
  .comparison-picker .wide-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .compare-player-picker { padding: 8px; }
  .compare-player-picker input { font-size: 14px; padding: 8px; width: 100%; }
  .comparison-profiles { gap: 8px; }
  .comparison-profiles { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .comparison-profiles .versus-mark { display: none; }
  .comparison-profiles .compare-profile { padding: 8px; }
  .comparison-profiles .compare-identity,.comparison-profiles .compare-profile:last-child .compare-identity { flex-direction: column; align-items: flex-start; gap: 6px; }
  .comparison-profiles .compare-photo { width: 48px; height: 48px; }
  .comparison-profiles .compare-primary { display: block; padding-top: 0; }
  .comparison-profiles .compare-primary > div:not(:first-child) { display: none; }
  .comparison-profiles .compare-identity h2 { display: none; }
  .comparison-profiles .compare-identity p { font-size: 12px; }
  .comparison-profiles .compare-team { display: none; }
  .comparison-profiles .compare-primary > div:first-child { display: flex; align-items: baseline; justify-content: space-between; }
  .comparison-profiles h2 { font-size: 18px; }
  .comparison-profiles .compare-details,.comparison-profiles .coverage-tag-row { display: none; }
  .comparison-profiles .compare-grades { gap: 8px; }
  .league-ledger .table-shell { overflow: auto; max-height: 58vh; }
  .league-board:not(.show-more-stats) .players-table-panel table { min-width: 0; table-layout: fixed; }
  .league-board:not(.show-more-stats) .players-table-panel :is(th,td):first-child { min-width: 0; max-width: none; width: 76%; }
  .league-ledger table { width: 100%; min-width: 0; }
  .league-ledger th,.league-ledger td { display: none; }
  .league-ledger th:first-child,.league-ledger td:first-child,.league-ledger th:nth-child(8),.league-ledger td:nth-child(8) { display: table-cell; }
  .league-ledger td:first-child { width: 76%; }
  .league-ledger td:nth-child(8) { text-align: right; }
  .league-ledger .player-name-button { min-width: 0; }
  .league-ledger .player-name-button strong { font-size: 16px; white-space: normal; }
  .league-ledger .player-archetype { display: none; }
  .mobile-player-meta { display: block; font-size: 14px; color: var(--muted); }
  .comparison-dot-row { grid-template-columns: 90px 48px minmax(50px,1fr) 48px; gap: 8px; font-size: 14px; }
  .compare-dot-track { min-width: 0; }
  .data-explanation dl { grid-template-columns: 1fr; gap: 4px; }
  .data-explanation dd { margin-bottom: 12px; }
  .chart-tooltip { white-space: normal; width: 140px; }
  .show-more-stats .table-shell { overflow-x: auto; }
  .show-more-stats table { min-width: 1000px; }
  .show-more-stats th,.show-more-stats td { display: table-cell; }
  .player-detail-actions { flex-wrap: wrap; }
  .player-detail-toolbar { flex-wrap: wrap; }
  .dossier-grades { width: 100%; }
  .hvi-chart-card { overflow-x: auto; padding-bottom: 12px; }
  .hvi-chart-card.is-axis-angled .hvi-plot { min-width: 660px; }
  .hvi-chart-card.is-axis-compact .hvi-plot { min-width: 1000px; }
  .rink-map-legend { flex-wrap: wrap; }
}
