/* Desktop review table and responsive finding cards share the same controls/rows. */
.results-page main{max-width:1300px;padding-top:28px}
.results-page .app-header{padding-top:14px;padding-bottom:14px}
.analysis-result{font:14px/1.6 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text)}
.analysis-result h1,.analysis-result h2,.analysis-result h3,.analysis-result strong,.analysis-result summary,.result-table td,.result-table th,.result-table button{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.analysis-result .back{color:var(--muted);display:inline-block;margin-bottom:12px}
.result-heading{display:flex;align-items:baseline;gap:16px;flex-wrap:wrap;margin-bottom:24px}
.result-heading h1{font-size:30px;letter-spacing:-.02em;font-weight:800;margin:0;overflow-wrap:anywhere}
.result-date{color:var(--muted);font-size:var(--font-small)}
.result-heading>button{margin-left:auto;font-size:var(--font-small);padding:7px 12px}
.result-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin:0 0 18px}
.result-stats .stat{position:relative;min-height:140px;padding:18px;border:1px solid var(--line);border-radius:13px;background:var(--panel);overflow:hidden}
.result-stats .stat::before{content:'';position:absolute;inset:7px auto 7px 0;width:3px;background:var(--brand);border-radius:4px}
.result-stats .stat.red::before{background:var(--red)}.result-stats .stat.yellow::before{background:var(--yellow)}
.result-stats .stat small{display:block;text-transform:uppercase;letter-spacing:.08em;font-size:var(--font-label);color:var(--muted);font-weight:750}
.result-stats .stat strong{font-size:36px;line-height:1.2;font-weight:850;letter-spacing:-.04em;margin:5px 0;display:block}
.result-stats .stat.red strong{color:var(--red)}.result-stats .stat.yellow strong{color:var(--yellow)}
.stat-detail{font-size:var(--font-small);color:var(--muted);display:block;overflow-wrap:anywhere}
.result-notices{border:1px solid var(--warning-line);border-left:3px solid var(--yellow);background:var(--warning-bg);border-radius:8px;margin:0 0 20px;color:var(--yellow);padding:12px 16px;font-size:14px}
.result-notices summary{cursor:pointer;font-weight:650}.result-notices p{margin:10px 0;line-height:1.6}
.section-label,.result-timeline>h3{font-size:var(--font-label);letter-spacing:.12em;color:var(--muted);text-transform:uppercase;font-weight:750}
.result-health .health-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:10px 0 0}
.result-health .health{border:1px solid var(--line);border-left:3px solid var(--success);border-radius:9px;background:var(--panel);padding:14px;min-height:90px;display:flex;flex-direction:column;gap:8px}
.result-health .health.warning{border-left-color:var(--yellow);background:var(--warning-bg)}
.result-health .health strong{font-size:14px;color:var(--text);display:block}
.result-health .health>span{font-size:var(--font-small);color:var(--muted);overflow-wrap:anywhere}
.health-footnote{font-size:var(--font-small);color:var(--muted);margin:8px 0 16px}
.result-timeline{padding:16px 20px;margin:0 0 16px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.result-timeline>h3{margin:0 0 15px}.timeline-halves{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px}.timeline-halves.single{grid-template-columns:1fr}
.timeline-half{min-width:0}.timeline-half+.timeline-half{border-left:1px solid var(--line);padding-left:20px}
.half-heading{font-size:var(--font-label);text-transform:uppercase;letter-spacing:.08em;display:flex;gap:10px;flex-wrap:wrap;margin-bottom:13px;font-weight:700}
.half-heading>span{font-size:var(--font-label);color:var(--muted);letter-spacing:0}
.timeline-track{display:flex;align-items:center;gap:12px;margin:14px 0;min-height:30px}
.timeline-name{font-size:var(--font-label);line-height:1.5;width:110px;flex:none;overflow-wrap:anywhere;display:flex;align-items:center;gap:6px;color:var(--muted)}
.timeline-dots{position:relative;flex:1;height:30px;border-bottom:1px solid var(--line);min-width:0}
.timeline-dot{position:absolute;top:9px;transform:translateX(-50%);width:8px;height:8px;min-width:0;padding:0;border:0;border-radius:50%;background:var(--yellow)}
.timeline-dot.error{background:var(--red);width:10px;height:10px;top:8px}
.timeline-dot.closed{opacity:.4}.timeline-dot:hover{outline:2px solid var(--brand-ink);outline-offset:3px}
.time-labels{display:flex;justify-content:space-between;margin-left:122px;font-size:var(--font-label);color:var(--muted)}
.result-timeline .help{margin:14px 0 0}
.result-chips{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 20px}
.result-chips .chip{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:24px;background:var(--panel);font-size:var(--font-small);color:var(--text);padding:8px 12px}
.result-chips .chip.selected{border-color:var(--brand);background:var(--panel2)}
.issue-dot,.side-dot{display:inline-block;width:9px;height:9px;border-radius:50%;flex:none;background:var(--yellow)}.issue-dot.error{background:var(--red)}
.side-dot{border-radius:2px;background:var(--blue)}.side-dot.side-1{background:var(--purple)}
/* Filters stick to the viewport; table headings stick inside its scroll region. */
.result-controls{display:grid;gap:10px;margin-bottom:14px;padding:12px 0;background:var(--bg);position:sticky;top:0;z-index:5;border-bottom:1px solid var(--line)}
.result-filter-row,.result-search-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.filter-segments{display:inline-flex;border:1px solid var(--line);border-radius:9px;padding:3px;gap:2px;background:var(--segment-bg)}
.filter-segments button{background:transparent;border:1px solid transparent;padding:8px 10px;border-radius:6px;color:var(--muted);font-size:var(--font-small)}
.filter-segments button.active{background:var(--panel);border-color:var(--input-line);color:var(--brand-ink);font-weight:650}.filter-segments button:disabled{cursor:default}
.result-filter-row select{font-size:var(--font-small);padding:10px;max-width:250px;flex:1;min-width:140px;border-radius:7px}
.result-search-row>input{width:46%;min-width:240px;font-size:14px;padding:11px 13px;border-radius:9px;flex:0 1 480px}
.result-search-row>.actions{margin-left:auto;display:flex;align-items:center;gap:10px}
.result-search-row a,.result-search-row button{font-size:var(--font-small);padding:9px 12px}
.result-search-row a{border:1px solid var(--line);border-radius:6px;color:var(--brand-ink)}
.analysis-result .result-table{border:1px solid var(--line);border-radius:12px;overflow:auto;background:var(--panel);margin:0;max-height:65vh;scroll-padding-top:56px}
.result-table table{width:100%;min-width:1100px;border-collapse:separate;border-spacing:0;font:14px/1.6 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;table-layout:fixed}
.result-table th{position:sticky;top:0;z-index:2;padding:14px 12px;text-align:left;font-size:var(--font-label);letter-spacing:.06em;text-transform:uppercase;color:var(--muted);border-bottom:1px solid var(--line);background:var(--table-heading)}
.result-table th:nth-child(1){width:10%}.result-table th:nth-child(2){width:15%}.result-table th:nth-child(3){width:7%}.result-table th:nth-child(4){width:12%}.result-table th:nth-child(5){width:29%}.result-table th:nth-child(6){width:14%}.result-table th:nth-child(7){width:13%}
.result-table td{padding:14px 12px;border-bottom:1px solid var(--line);vertical-align:top;color:var(--text);overflow-wrap:anywhere}
.result-table tbody tr:last-child td{border-bottom:0}.result-table .finding-row:hover{background:var(--hover-bg)}
.result-table .finding-row>td:first-child{border-left:3px solid var(--yellow)}.result-table .finding-row.error>td:first-child{border-left-color:var(--red)}
.result-table .finding-row.reviewed{background:var(--inset-bg)}
.result-table .message{font-size:14px;font-weight:550;line-height:1.7;min-width:0}
.table-team{display:flex;align-items:baseline;gap:6px;font-size:var(--font-small);font-weight:650}
.result-table .player-cell{font-size:14px;color:var(--muted)}
.result-table .event-time{border:0;padding:4px 0;background:transparent;color:var(--text);font-weight:700;font-size:14px;white-space:nowrap}
.half-badge{display:inline-block;font-size:11px;border:1px solid var(--line);border-radius:3px;padding:0 3px;color:var(--muted);margin-left:5px}
.result-table .badge{font-size:var(--font-label);padding:3px 8px;border:1px solid var(--warning-line);font-weight:750}
.result-table .badge.error{border-color:var(--error-line)}
.result-table .note-tag{font-size:var(--font-label);line-height:1.6;color:var(--muted);margin-top:6px;overflow-wrap:anywhere}
.decision-cell label{display:flex;gap:8px;align-items:center;font-size:var(--font-small);color:var(--muted);margin:0;min-height:36px;cursor:pointer}
.decision-cell input{width:18px;height:18px;min-width:18px;padding:0;margin:0;flex:none;cursor:pointer}
.result-table .inspect-button{font-size:var(--font-small);border:0;background:transparent;color:var(--brand-ink);padding:8px 0;text-decoration:underline;text-underline-offset:3px}
.analysis-result .pager button,.analysis-result .pager select{font-size:var(--font-small);padding:8px 10px}
.analysis-result>.help{margin-top:18px}.analysis-result>.actions a{font-size:var(--font-small)}
@media(max-width:1050px){.result-stats .stat{padding:14px}.result-stats .stat strong{font-size:30px}.result-health .health-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
/* Short screens and phones keep filters in flow so they cannot obscure findings. */
@media(max-width:760px),(max-height:650px){.result-controls{position:static}}
@media(max-width:760px){
  .results-page main{padding:24px 14px 40px}.result-heading{gap:8px}.result-heading h1{font-size:26px}.result-date{width:100%;order:3}
  .result-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.result-stats .stat:last-child{grid-column:1/-1;min-height:100px}
  .result-health .health-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .timeline-halves{grid-template-columns:1fr}.timeline-half+.timeline-half{border-left:0;border-top:1px solid var(--line);padding:15px 0 0}
  .result-timeline{padding:14px}.timeline-name{width:90px}.time-labels{margin-left:102px}
  .result-search-row>input{width:100%;min-width:0;flex-basis:100%}.result-search-row>.actions{margin-left:0}
  .result-filter-row select{max-width:none}.filter-segments button{min-height:40px}
  .analysis-result .result-table{max-height:none;overflow:visible;border:0;background:transparent;border-radius:0}
  .result-table table,.result-table tbody{display:block;min-width:0;width:100%}
  .result-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .result-table .finding-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;grid-template-areas:'time severity' 'side player' 'action action' 'issue issue' 'decision decision';background:var(--panel);border:1px solid var(--line);border-left:4px solid var(--yellow);border-radius:12px;padding:16px;margin-bottom:14px}
  .result-table .finding-row.error{border-left-color:var(--red)}.result-table .finding-row.reviewed{background:var(--inset-bg)}
  .result-table .finding-row>td{display:block;border:0;padding:0;min-width:0}
  .result-table .finding-row>td::before{content:attr(data-label);display:block;color:var(--muted);font-size:var(--font-label);font-weight:650;margin-bottom:3px}
  .result-table .finding-row>td:nth-child(1){grid-area:time;border-left:0}
  .result-table .finding-row>td:nth-child(2){grid-area:side}
  .result-table .finding-row>td:nth-child(3){grid-area:player}
  .result-table .finding-row>td:nth-child(4){grid-area:action}
  .result-table .finding-row>td:nth-child(5){grid-area:issue;font-size:15px}
  .result-table .finding-row>td:nth-child(6){grid-area:severity}
  .result-table .finding-row>td:nth-child(7){grid-area:decision;display:flex;gap:8px 16px;align-items:center;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:10px}
  .result-table .finding-row>.decision-cell::before{flex-basis:100%;margin:0}
  .decision-cell label,.result-table .inspect-button,.result-table .event-time{min-height:44px}
  .result-table .note-tag{display:none}.result-table .empty{display:block;width:100%}
}
@media(max-width:380px){.result-health .health-grid{grid-template-columns:1fr}}
