.coach-actions{display:flex;flex-wrap:wrap;gap:10px}
/* Keep the workbench's copied table header inside its scroll window, including
   local checkouts where the shared workbench stylesheet is unavailable. */
.sticky-head{position:fixed;z-index:25;overflow:hidden;pointer-events:none;background:var(--surface)}
.sticky-head table{border-collapse:collapse;table-layout:fixed}
.sticky-head[hidden]{display:none}
.coach-actions .intel-action{margin:0}
.coach-roster-table{white-space:normal;table-layout:fixed}
.coach-roster-table th{white-space:normal;line-height:1.4;padding:11px 10px;vertical-align:bottom}
.coach-roster-table td{vertical-align:middle;font-size:12px;line-height:1.5;white-space:normal;padding:11px 10px}
.coach-roster-table th:nth-child(1){width:72px;text-align:center}
.coach-roster-table th:nth-child(3){width:220px}
.coach-roster-table th:nth-child(4),.coach-roster-table th:nth-child(5){width:84px}
.coach-roster-table th:nth-child(6){width:136px}
.coach-roster-table th:nth-child(7){width:68px}
.coach-roster-table th:nth-child(8){width:62px}
.coach-roster-table th:nth-child(9){width:176px}
.coach-roster-table th:nth-child(n+4):nth-child(-n+8),.coach-roster-table tr[data-athlete] td:nth-child(n+4):nth-child(-n+8){text-align:right}
.coach-roster-table tr[data-athlete] td:first-child{text-align:center}
.coach-roster-table tr[data-athlete] td:nth-child(n+4):nth-child(-n+8){font-family:var(--mono);font-variant-numeric:tabular-nums}
.coach-roster-table td.coach-no-pair{color:var(--muted);font:11px/1.4 Inter,system-ui,sans-serif!important}
.coach-roster-table input[type=checkbox]{width:20px;height:20px;accent-color:var(--accent);cursor:pointer}
.coach-roster-table select,.coach-profile-dialog select{background:var(--bg);color:var(--ink);border:1px solid var(--line-strong);border-radius:6px;min-height:42px;padding:7px 9px;font:12px Inter,system-ui,sans-serif;max-width:220px}
.coach-roster-table select{width:100%;max-width:none;min-height:36px}
.coach-event-text{display:block;padding-left:10px;font:12px/1.4 Inter,system-ui,sans-serif}
.coach-roster-table td small{display:block;color:var(--muted);font:11px Inter,system-ui,sans-serif;margin-top:4px}
.coach-roster-table tr[data-included=false]{background:rgba(255,255,255,.015)}
.coach-roster-table tr[data-included=false] td:not(:first-child){color:var(--muted)}
.coach-roster-table tr[data-review-open=true] td{border-bottom:0}
.coach-table-note{margin-top:10px}
.coach-athlete-button{color:var(--accent);border:0;background:none;padding:0;text-align:left;cursor:pointer;font:600 13px Inter,system-ui,sans-serif;line-height:1.5;text-decoration:underline;text-underline-offset:3px}
.coach-warning,.coach-medal-badge{display:inline-block;padding:4px 7px;margin-top:6px;margin-right:6px;border:1px solid #77623a;border-radius:5px;color:#ffd376;background:rgba(255,211,118,.06);font:11px Inter,system-ui,sans-serif}
.coach-profile-dialog{width:min(1120px,calc(100vw - 28px));max-height:92vh;overflow:auto;background:var(--surface);color:var(--ink);border:1px solid var(--line-strong);border-radius:12px;padding:24px}
.coach-profile-dialog::backdrop{background:rgba(0,0,0,.75)}
.coach-profile-header{display:flex;justify-content:space-between;gap:20px;align-items:center;border-bottom:1px solid var(--line);margin-bottom:16px;padding-bottom:16px}
.coach-profile-header h2{margin:0;font-size:24px}
.coach-profile-header .intel-action{margin:0}
.coach-profile-intro{display:flex;justify-content:space-between;gap:20px;align-items:end;margin-bottom:20px}
.coach-profile-intro p{color:var(--muted);font-size:13px;line-height:1.65;margin:5px 0}
.coach-profile-intro label{display:grid;gap:6px;font-size:12px;color:var(--muted)}
.coach-profile-dialog a{color:var(--accent)}
.coach-profile-dialog .kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.coach-profile-dialog .kpi strong{font-size:23px}
.coach-profile-dialog .kpi small{line-height:1.5}
.coach-profile-chart{padding:15px;border:1px solid var(--line);border-radius:8px;margin:18px 0}
.coach-profile-chart svg{display:block;width:100%;height:auto}
.coach-profile-chart text{fill:var(--muted);font:12px Inter,system-ui,sans-serif}
.coach-profile-chart line{stroke:var(--line)}
.coach-chart-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:11px;color:var(--muted);line-height:1.7}
.coach-chart-legend span:first-child{color:var(--accent)}
.coach-chart-legend span:nth-child(2){color:#ffd376}
.coach-profile-dialog .table-wrap{max-height:340px}
.coach-profile-dialog table{white-space:normal;min-width:700px}
.coach-profile-dialog .profile-results-toolbar{display:flex;justify-content:space-between;gap:15px;align-items:center;margin:20px 0 10px}
.coach-profile-dialog h3{font-size:16px;margin:15px 0 10px}
.coach-medal-badge{border:1px solid #77623a;border-radius:5px;color:#ffd376;background:rgba(255,211,118,.06);font:11px Inter,system-ui,sans-serif}
.coach-review-cell{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;font-family:Inter,system-ui,sans-serif}
.coach-review-cell .intel-action{margin:0;min-height:32px;padding:6px 10px;font-size:11px}
.coach-review-toggle{border:0;background:none;padding:6px 0;color:var(--accent);cursor:pointer;font:600 12px Inter,system-ui,sans-serif;white-space:nowrap}
.coach-review-toggle span{font-size:14px}
.coach-review-toggle:hover{text-decoration:underline;text-underline-offset:3px}
.coach-review-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.coach-review-empty{color:var(--muted);font-size:12px}
.coach-roster-table .coach-review-row td{padding:4px 10px 18px 82px;font-family:Inter,system-ui,sans-serif;background:rgba(255,255,255,.012)}
.coach-review-entry{display:grid;gap:10px;min-width:0}
.coach-review-entry+.coach-review-entry{margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}
.coach-review-answers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0}
.coach-review-answers>div{min-width:0;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--bg)}
.coach-review-answers dt{margin-bottom:6px;color:var(--muted);font-size:11px;font-weight:600}
.coach-review-answers dd{margin:0;color:var(--ink);font-size:13px;line-height:1.55;white-space:pre-line;overflow-wrap:anywhere}
.coach-review-comment{margin:0;color:var(--ink);font-size:13px;line-height:1.55;white-space:pre-line;overflow-wrap:anywhere}
.coach-review-goal-summary{margin:0;padding:8px 10px;border-left:2px solid var(--accent);background:rgba(87,241,219,.05);color:var(--ink);font-size:13px;line-height:1.5}
.coach-review-legacy{color:#ffd376!important}
.coach-review-dialog{width:min(920px,calc(100vw - 28px));max-height:92vh;overflow:auto;background:var(--surface);color:var(--ink);border:1px solid var(--line-strong);border-radius:12px;padding:24px}
.coach-review-dialog::backdrop{background:rgba(0,0,0,.75)}
.coach-review-dialog form{display:grid;gap:14px}
.coach-review-dialog label{font-weight:600;line-height:1.5}
.coach-review-dialog textarea{box-sizing:border-box;width:100%;resize:vertical;background:var(--bg);color:var(--ink);border:1px solid var(--line-strong);border-radius:8px;padding:12px;font:14px/1.6 Inter,system-ui,sans-serif}
.coach-review-dialog textarea:focus{outline:2px solid var(--accent);outline-offset:2px}
.coach-review-questions{display:grid;gap:14px}
.coach-review-questions label{display:grid;gap:7px}
.coach-review-questions label>span{font-size:15px}
.coach-review-questions small{text-align:right;color:var(--muted);font-weight:400}
.coach-review-goal{margin:2px 0 0;padding:16px;border:1px solid var(--line-strong);border-radius:9px}
.coach-review-goal legend{padding:0 7px;color:var(--accent);font-weight:700}
.coach-review-goal>p{margin:0 0 13px;color:var(--muted);font-size:13px;line-height:1.55}
.coach-review-goal-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.coach-review-goal-grid label{display:grid;gap:6px;color:var(--muted);font-size:12px}
.coach-review-goal-grid select{box-sizing:border-box;width:100%;min-width:0;max-width:none;background:var(--bg);color:var(--ink);border:1px solid var(--line-strong);border-radius:6px;min-height:44px;padding:8px;font:12px Inter,system-ui,sans-serif}
.coach-review-goal-grid select:focus{outline:2px solid var(--accent);outline-offset:2px}
.coach-review-goal-grid select:disabled{opacity:.55}
.coach-review-evidence{margin:0;padding:14px;border-left:3px solid var(--accent);background:rgba(87,241,219,.06);color:var(--muted);line-height:1.65}
.coach-review-season-evidence{display:grid;gap:12px;padding:16px;border:1px solid var(--line);border-radius:9px;background:rgba(255,255,255,.012)}
.coach-review-season-head{display:flex;justify-content:space-between;align-items:end;gap:16px}
.coach-review-season-head h3{margin:4px 0 0;font-size:17px}
.coach-review-season-head .intel-action{margin:0;flex:0 0 auto}
.coach-review-medals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.coach-review-medal{padding:11px;border:1px solid var(--line);border-radius:7px;background:var(--bg)}
.coach-review-medal span{display:block;color:#ffd376;font:700 10px var(--mono);letter-spacing:.1em;text-transform:uppercase}
.coach-review-medal strong{display:block;margin:5px 0;font-size:13px}
.coach-review-medal p{margin:0;color:var(--muted);font-size:11px;line-height:1.5}
.coach-review-medal a{display:inline-block;margin-top:6px;color:var(--accent);font-size:11px}
.coach-review-medal-empty{margin:0;color:var(--muted);font-size:13px;line-height:1.6}
.coach-review-season-evidence .coach-profile-chart{margin:0}
.coach-review-footer{display:flex;justify-content:space-between;gap:14px;align-items:center;color:var(--muted);font-size:12px}
.coach-review-footer>div{display:flex;gap:8px}
.coach-review-footer .intel-action{margin:0}
@media(max-width:1180px){
  .coach-roster-table{display:block;width:100%}
  .coach-roster-table thead{display:none}
  .coach-roster-table tbody{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
  .coach-roster-table tr[data-athlete]{position:relative;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;padding:14px;border:1px solid var(--line-strong);border-radius:10px;background:var(--surface)}
  .coach-roster-table tr[data-athlete] td{display:block;min-width:0;padding:0;border:0}
  .coach-roster-table tr[data-athlete] td:nth-child(n+4):nth-child(-n+8){text-align:left}
  .coach-roster-table tr[data-athlete] td:nth-child(1){position:absolute;top:15px;left:14px;width:auto}
  .coach-roster-table tr[data-athlete] td:nth-child(1)::before{content:none}
  .coach-roster-table tr[data-athlete] td:nth-child(2){grid-column:1/-1;padding-left:38px}
  .coach-roster-table tr[data-athlete] td:nth-child(2)::before{content:none}
  .coach-roster-table tr[data-athlete] td:nth-child(3),.coach-roster-table tr[data-athlete] td:nth-child(9){grid-column:1/-1}
  .coach-roster-table tr[data-athlete] td::before{content:attr(data-label);display:block;margin-bottom:4px;color:var(--muted);font:600 10px/1.45 Inter,system-ui,sans-serif;letter-spacing:.06em;text-transform:uppercase}
  .coach-event-text{padding-left:0}
  .coach-roster-table tr[data-review-open=true]{border-bottom:0;border-radius:10px 10px 0 0}
  .coach-roster-table .coach-review-row{display:block;margin-top:-14px;border:1px solid var(--line-strong);border-top:0;border-radius:0 0 10px 10px;background:var(--surface)}
  .coach-roster-table .coach-review-row td{display:block;padding:0 14px 14px;border:0;background:none}
  .coach-review-answers{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:700px){
  .coach-profile-dialog{padding:16px}
  .coach-profile-header{align-items:flex-start}
  .coach-profile-header h2{font-size:20px}
  .coach-profile-dialog .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .coach-profile-intro{flex-direction:column;align-items:stretch}
  .coach-profile-intro select{max-width:100%;width:100%}
  .coach-roster-table tr[data-athlete]{grid-template-columns:repeat(3,minmax(0,1fr))}
  .coach-review-dialog{box-sizing:border-box;width:calc(100vw - 16px);max-height:96vh;padding:16px}
  .coach-review-evidence{font-size:13px}
  .coach-review-season-head{align-items:stretch;flex-direction:column}
  .coach-review-season-head .intel-action{width:100%}
  .coach-review-medals{grid-template-columns:1fr}
  .coach-review-goal-grid{grid-template-columns:1fr}
  .coach-review-footer{align-items:stretch;flex-direction:column}
  .coach-review-footer>div{display:grid;grid-template-columns:1fr 1fr}
  .coach-review-footer .intel-action{width:100%}
}
/* Touch screens of any size: the review action and include box are easy to hit. */
@media(pointer:coarse){
  .coach-review-cell .intel-action{min-height:40px;font-size:12px}
  .coach-review-toggle{min-height:40px}
  .coach-roster-table input[type=checkbox]{width:24px;height:24px}
}
