/* Desktop: full-width board -> full-width research. Mobile keeps inline evidence. */
.research-back{display:none}
.opportunity-comparison{margin-top:20px;border:1px solid var(--line);border-radius:8px;overflow:hidden}
.opportunity-heading,.opportunity-row{display:grid;grid-template-columns:minmax(170px,1.5fr) repeat(3,minmax(110px,1fr)) minmax(80px,.7fr);gap:12px;align-items:center;padding:12px 16px}
.opportunity-heading{background:var(--panel2);color:var(--muted);font-size:.875rem}
.opportunity-row{border-top:1px solid var(--line);font-size:1rem}
.opportunity-row strong{font-weight:500}.opportunity-row b{font-variant-numeric:tabular-nums}.opportunity-row small{color:var(--muted);font-size:.875rem}
.opportunity-mobile-label{display:none}.opportunity-line{margin-top:24px}.opportunity-line h4{font-size:1rem;margin:0 0 10px}
.opportunity-results{display:flex;flex-wrap:wrap;gap:12px;margin-top:14px}.opportunity-results>div{display:grid;gap:5px;background:var(--panel2);padding:16px;border-radius:8px;min-width:150px}.opportunity-results span{color:var(--muted);font-size:.875rem}.opportunity-results b{font-size:1.5rem}.opportunity-context{margin-top:20px}
@media(min-width:1001px){main.research-open .opportunity{grid-column:1/-1}}
@media(max-width:1000px){.opportunity-heading{display:none}.opportunity-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:16px}.opportunity-row>strong,.opportunity-row>small{grid-column:1/-1}.opportunity-mobile-label{display:block;font-size:.8125rem;color:var(--muted);margin-bottom:5px}.opportunity .section-title{align-items:flex-start;gap:12px;flex-wrap:wrap}}
.postgame-card{border-top:1px solid var(--line);padding:24px 0}
.postgame-empty{padding:32px 0;max-width:720px;line-height:1.7}
main[data-view="postgame"] .research-layout{display:block}
main[data-view="postgame"] #inspector{display:none}
@media(min-width:1001px){
 main:not([data-view="matchups"]) .research-layout{display:block}
 main:not([data-view="matchups"]):not(.research-open) #inspector{display:none}
 main.research-open:not([data-view="matchups"])>.page-heading,
 main.research-open:not([data-view="matchups"])>#stats,
 main.research-open:not([data-view="matchups"])>.notice,
 main.research-open:not([data-view="matchups"])>.controls,
 main.research-open:not([data-view="matchups"]) #results{display:none}
 main.research-open #inspector{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;background:none;border:0;overflow:visible;width:100%;max-width:1400px;margin:0 auto;align-items:start}
 main.research-open .research-back{display:block;grid-column:1/-1;justify-self:start;order:-3;margin-bottom:0}
 main.research-open .inspect-head{grid-column:1/-1;order:-2;border:1px solid var(--line);border-radius:10px;padding:26px 30px}
 main.research-open .inspect-head h2{font-size:2rem}
 main.research-open .inspect-section{border:1px solid var(--line);border-radius:10px;background:var(--panel);padding:26px;min-width:0}
 main.research-open .research-line{grid-column:1/-1;order:-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 32px;align-items:start}
 main.research-open .research-line .section-title{grid-column:1/-1}
 main.research-open .research-line .line-pair{grid-row:2/6;align-self:center}
 main.research-open .research-line .line-pair b{font-size:2.5rem}
 main.research-open .research-line>.note,main.research-open .research-line>details{grid-column:1/-1}
 main.research-open .research-line>.bar-label,main.research-open .research-line>.track{grid-column:2}
 main.research-open .research-history{grid-column:1/-1}
 main.research-open .read{font-size:1rem;line-height:1.7}
 main.research-open .usage-grid{gap:22px;margin-top:16px}
 main.research-open .usage-grid b{font-size:1.65rem}
 main.research-open .usage-grid span,main.research-open .note,main.research-open .risk,main.research-open .bar-label,main.research-open .checklist{font-size:.875rem}
 main.research-open .section-title h3,main.research-open .inspect-section summary{font-size:1rem}
 main.research-open .table-wrap{margin-top:16px}
 main.research-open .log-table{min-width:100%}
}

/* Saved weekly comparisons share the established research surface. */
.weekly-summary .summary-takeaway{font-size:1rem;line-height:1.7}
.weekly-summary .risk p{margin:6px 0 0}
.weekly-summary details{margin-top:18px}
.summary-grid{display:grid;grid-template-columns:1fr;gap:20px;margin:20px 0}
.summary-grid h4{margin:0 0 8px;font-size:1rem}
.summary-grid p{margin:0;font-size:1rem;line-height:1.7;overflow-wrap:anywhere}
@media(min-width:1001px){main.research-open .weekly-summary{grid-column:1/-1}.research-open .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Every content block fills its parent; avoid uneven half-width research cards. */
main{max-width:none}
.research-layout,main:not([data-view="matchups"]) .research-layout{display:grid;grid-template-columns:minmax(0,1fr);width:100%}
#results,#inspector,.inspect-head,.inspect-section,.table-wrap,.empty,.postgame-empty,footer{width:100%;max-width:100%;min-width:0}
#inspector{position:static}
main.research-open #inspector{grid-template-columns:minmax(0,1fr);max-width:none;margin:0;align-items:stretch}
main.research-open .inspect-section{grid-column:1/-1;align-self:stretch}
main.research-open .research-line{display:block}
main.research-open .research-line .line-pair{margin-top:16px}
.game-grid,.summary-grid,.research-open .summary-grid{grid-template-columns:minmax(0,1fr)}
.opportunity-results{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr))}
.opportunity-results>div{min-width:0}
.section-title{gap:12px;flex-wrap:wrap}
.read,.note,.risk,.subline,.inspect-section,.postgame-card{overflow-wrap:anywhere}
.subline{white-space:normal}
.usage-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.controls>label{min-width:0}
.controls .search{min-width:min(220px,100%)}
@media(max-width:650px){
 .inspect-section,.inspect-head{padding:18px 14px}
 .line-pair{grid-template-columns:repeat(2,minmax(0,1fr))}
 .usage-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .opportunity-row{gap:8px;padding:14px 10px}
 .opportunity-row b{font-size:1rem}
}

/* Player cards follow the same reading order at every viewport. */
main:is([data-view="players"],[data-view="board"]) #inspector,
main:is([data-view="players"],[data-view="board"]).research-open #inspector{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;background:none;border:0;overflow:visible}
main:is([data-view="players"],[data-view="board"]) #inspector>.inspect-head,
main:is([data-view="players"],[data-view="board"]) #inspector>.inspect-section{grid-column:1/-1;order:0;width:100%;border:1px solid var(--line);border-radius:10px;background:var(--panel);padding:24px}
main:is([data-view="players"],[data-view="board"]) #inspector>.inspect-head{order:-2}
main:is([data-view="players"],[data-view="board"]) #inspector>.research-back{order:-3}
main:is([data-view="players"],[data-view="board"]) #inspector>.research-line{display:block;order:0}
.team-research .postgame-card{padding:28px 0}
.team-research .postgame-card h4{margin:12px 0 20px}
.team-research .postgame-card p{margin:18px 0;line-height:1.8}
.team-research .postgame-card .risk{margin:24px 0;padding-left:18px}
.additional-research-block{padding:20px 0;border-bottom:1px solid var(--line)}
.additional-research-block:last-child{border-bottom:0}
@media(min-width:1001px){
 main:is([data-view="players"],[data-view="board"]).research-open #inspector{grid-template-columns:repeat(2,minmax(0,1fr))}
 main:is([data-view="players"],[data-view="board"]).research-open #inspector>.player-snapshot,
 main:is([data-view="players"],[data-view="board"]).research-open #inspector>.receiving-projection{grid-column:auto;height:100%}
}
@media(max-width:650px){main:is([data-view="players"],[data-view="board"]) #inspector>.inspect-head,main:is([data-view="players"],[data-view="board"]) #inspector>.inspect-section{padding:18px 14px}}

@media(min-width:1001px){
 main:is([data-view="players"],[data-view="board"]).research-open #inspector>.player-comparison-pair{grid-column:auto;height:100%}
}

#inspector .rated-heading{display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:1rem;line-height:1.5}
#inspector .rated-heading .pill{font-size:.875rem;font-weight:500;letter-spacing:normal;line-height:1.5;flex-shrink:0}
/* Database-derived research tools */
#advanced-research{width:100%;margin:0 0 24px;border:1px solid var(--line);border-radius:10px;background:var(--panel);padding:18px}
#advanced-research[hidden],main.research-open #advanced-research{display:none}
.research-filter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:18px;margin:20px 0}
.research-filter-grid label,.comparison-picker{display:flex;flex-direction:column;gap:9px;font-size:.9rem}
.research-filter-grid label:has(input){flex-direction:row;align-items:center}
.research-filter-grid select,.comparison-picker select{width:100%;min-width:0;background:var(--panel2);color:var(--text);border:1px solid var(--line);border-radius:6px;padding:12px}
.research-actions{display:flex;flex-wrap:wrap;gap:10px}.comparison-picker{max-width:520px;margin:20px 0}
.change-list{list-style:none;padding:0;margin:16px 0}.change-list li{padding:12px 0;border-bottom:1px solid var(--line)}.change-list span{display:block;color:var(--muted);font-size:.875rem;margin-top:6px}
.player-comparison{min-width:640px;width:100%}.player-comparison th,.player-comparison td{min-width:170px;white-space:normal;vertical-align:top}.player-comparison thead th{background:var(--panel2)}.player-comparison th:first-child{position:sticky;left:0;background:var(--panel);z-index:1;min-width:160px}.player-comparison button{margin-top:10px}
main[data-view="compare"] #inspector{display:none!important}main[data-view="compare"] .research-layout{display:block}
@media(max-width:650px){.research-filter-grid{grid-template-columns:1fr}#advanced-research{padding:14px}.player-comparison th:first-child{min-width:125px;max-width:140px}.player-comparison th,.player-comparison td{padding:12px}}

.previous-line-result{display:flex;flex-direction:column;align-items:flex-start;gap:.4rem;margin-top:.8rem;font-size:.875rem;line-height:1.5;overflow-wrap:anywhere}
.previous-outcome.hit{color:var(--good)}
.previous-outcome.miss{color:var(--red)}

/* Forecast and observed results are distinct groups within the existing prop block. */
.statistical-outlook{margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}
.statistical-outlook h4{font-size:1rem;margin:0 0 12px}
.forecast-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:16px}
.forecast-fields span{display:block;color:var(--muted);font-size:.875rem;margin-bottom:6px}
.forecast-fields strong{font-size:1rem;font-weight:500}
.player-snapshot .section-title{flex-wrap:wrap;gap:8px}
.player-snapshot .line-pair span,.player-snapshot .line-pair small{font-size:.875rem}

.structured-matchup-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:16px;margin:16px 0;align-items:start}
.matchup-stat-group{min-width:0;padding:16px;border:1px solid var(--line);border-radius:8px;background:var(--panel)}
.matchup-stat-group h4{margin:0 0 12px;font-size:1rem}
.matchup-environment{grid-column:1/-1}
.matchup-market-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr));gap:16px;margin:0}
.matchup-market-stats dt{font-size:.875rem;color:var(--muted);margin-bottom:5px}
.matchup-market-stats dd{font-size:1rem;margin:0;font-variant-numeric:tabular-nums}
.matchup-stat-table{width:100%;min-width:0;table-layout:fixed;font-size:1rem}
.matchup-stat-table th,.matchup-stat-table td{padding:10px 6px;white-space:normal;overflow-wrap:anywhere}
.matchup-stat-table th:first-child{width:44%;text-align:left;font-weight:400}
.matchup-stat-table td,.matchup-stat-table thead th:not(:first-child){text-align:right;font-variant-numeric:tabular-nums}
.matchup-stat-table small{display:block;font-size:.875rem;font-weight:400;color:var(--muted);margin-top:4px}
.matchup-stat-table strong{white-space:nowrap}
@media(max-width:500px){.matchup-stat-group{padding:12px}.matchup-stat-table{font-size:.875rem}.matchup-stat-table th,.matchup-stat-table td{padding:10px 3px}}

/* Keep player matchup evidence compact, with the same responsive groups as games. */
#inspector :is(.player-matchup-read,.player-td-assessment) .research-copy-group{max-width:none}
#inspector :is(.player-matchup-read,.player-td-assessment) .research-points{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:16px 28px}
#inspector :is(.player-matchup-read,.player-td-assessment) .research-stat-line{margin-left:0}
#inspector :is(.player-matchup-read,.player-td-assessment) .research-cautions{max-width:none}

/* Pair a single comparison with its interpretation instead of stretching its columns. */
#inspector :is(.player-matchup-read,.player-td-assessment) .research-stat-layout{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:20px;align-items:start}
#inspector :is(.player-matchup-read,.player-td-assessment) .research-stat-layout>.structured-matchup-stats:has(>.matchup-stat-group:nth-child(2)){grid-column:1/-1}
#inspector :is(.player-matchup-read,.player-td-assessment) .research-stat-layout>.structured-matchup-stats:only-child:not(:has(>.matchup-stat-group:nth-child(2))){max-width:560px}
#inspector :is(.player-matchup-read,.player-td-assessment) .research-stat-layout>.research-copy{min-width:0}

/* Give the assessment panels a consistent visual rhythm. */
#inspector :is(.player-matchup-read,.player-td-assessment) .structured-matchup-stats{align-items:stretch}
#inspector :is(.player-matchup-read,.player-td-assessment) .matchup-stat-group{height:100%}
#inspector :is(.player-matchup-read,.player-td-assessment) .matchup-stat-table tbody th{background:transparent;border-bottom:1px solid var(--line)}
#inspector :is(.player-matchup-read,.player-td-assessment) .matchup-stat-table thead th{background:var(--panel2)}
#inspector :is(.player-matchup-read,.player-td-assessment) .matchup-stat-table tbody tr:last-child :is(th,td){border-bottom:0}
#inspector :is(.player-matchup-read,.player-td-assessment) .matchup-market-stats{grid-template-columns:1fr;gap:12px}
#inspector :is(.player-matchup-read,.player-td-assessment) .matchup-market-stats>div{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:20px;padding:10px 0;border-bottom:1px solid var(--line)}
#inspector :is(.player-matchup-read,.player-td-assessment) .matchup-market-stats>div:last-child{border-bottom:0}
#inspector :is(.player-matchup-read,.player-td-assessment) .matchup-market-stats dt{margin:0}
#inspector :is(.player-matchup-read,.player-td-assessment) .research-stat-layout>.research-copy{border:1px solid var(--line);border-radius:8px;padding:16px;margin:16px 0;align-self:stretch}
#inspector :is(.player-matchup-read,.player-td-assessment) .research-copy .research-takeaway{margin-bottom:16px!important}
#inspector :is(.player-matchup-read,.player-td-assessment) .research-copy-group{margin-top:16px}
#inspector :is(.player-matchup-read,.player-td-assessment) .research-main-risk{margin-bottom:0}
.redzone-missing .missing-stat-label{font-size:1rem;font-weight:500;margin:24px 0 8px}
.redzone-missing .note{margin:0;line-height:1.6}

/* Saved offers use the same compact cards as matchup statistics. */
.saved-offer-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.saved-offer-heading h4{margin:0}
.saved-offer-stats{margin:0;display:grid;gap:0}
.saved-offer-stats>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;padding:12px 0;border-bottom:1px solid var(--line);align-items:baseline}
.saved-offer-stats>div:last-child{border-bottom:0}
.saved-offer-stats dt{font-size:.875rem;color:var(--muted)}
.saved-offer-stats dd{margin:0;text-align:right;font-size:1rem;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#inspector .player-extra .structured-matchup-stats{align-items:stretch}
#inspector .player-extra .saved-offer-card{height:100%}
#inspector .player-extra .postgame-card{padding:20px 0}
#inspector .player-extra .postgame-card>h4{margin:16px 0}

/* Match the scoring-environment height to the adjacent red-zone panels in game outlook rows. */
.target-table .structured-matchup-stats{align-items:stretch}
.target-table .structured-matchup-stats>.matchup-stat-group{height:100%}

/* Team research keeps exactly three comparison columns on wide screens. */
.saved-game-research .postgame-card{container-type:inline-size}
.saved-game-research .structured-matchup-stats{grid-template-columns:minmax(0,1fr);align-items:stretch}
.saved-game-research .matchup-stat-group{height:100%}
.saved-game-research .matchup-stat-table tbody th{background:transparent;border-bottom:1px solid var(--line)}
.saved-game-research .matchup-stat-table tbody tr:last-child :is(th,td){border-bottom:0}
.saved-game-research .team-outlook-summary{border:1px solid var(--line);border-radius:8px;padding:16px;margin:20px 0 0;background:var(--panel)}
.saved-game-research .team-outlook-summary h4{margin:0 0 8px;font-size:1rem}
.saved-game-research .team-outlook-summary p{margin:0;line-height:1.7}
@container(min-width:700px){.saved-game-research .structured-matchup-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@container(min-width:1100px){.saved-game-research .structured-matchup-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* A single current reading, with dated evidence available on demand. */
.current-player-research article + article { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line, #354151); }
.current-player-research p { line-height: 1.65; }
.dated-prop-research { margin-top: 1rem; }
.dated-prop-research .postgame-card { margin-top: 1rem; }

/* Separate saved research entries within their parent section. */
#inspector .research-entry,
.saved-game-research > .research-entry{
 min-width:0;margin:16px 0 0;padding:22px;
 background:var(--panel2);border:1px solid var(--line);
 border-radius:10px;overflow-wrap:anywhere;
}
#inspector .research-entry > .eyebrow,
.saved-game-research > .research-entry > .eyebrow{
 margin:0 0 12px;padding-bottom:12px;border-bottom:1px solid var(--line);
}
#inspector .research-entry > :last-child,
.saved-game-research > .research-entry > :last-child{margin-bottom:0}
@media(max-width:650px){
 #inspector .research-entry,
 .saved-game-research > .research-entry{padding:16px;margin-top:14px}
}

/* Rotate reading colors across saved entries, independently of outlook grades. */
#inspector .research-entry,
.saved-game-research > .research-entry{
 --entry-bg:var(--research-blue-bg);--entry-accent:var(--research-blue-accent);
 background:var(--entry-bg);border-left:3px solid var(--entry-accent);
}
#inspector .research-entry:nth-of-type(4n+2),
.saved-game-research > .research-entry:nth-of-type(4n+2){
 --entry-bg:var(--research-teal-bg);--entry-accent:var(--research-teal-accent);
}
#inspector .research-entry:nth-of-type(4n+3),
.saved-game-research > .research-entry:nth-of-type(4n+3){
 --entry-bg:var(--research-plum-bg);--entry-accent:var(--research-plum-accent);
}
#inspector .research-entry:nth-of-type(4n),
.saved-game-research > .research-entry:nth-of-type(4n){
 --entry-bg:var(--research-warm-bg);--entry-accent:var(--research-warm-accent);
}
#inspector .research-entry > :is(.eyebrow,h3,h4),
.saved-game-research > .research-entry > :is(.eyebrow,h3,h4){color:var(--entry-accent)}

