/* Task-led live session. The existing monitoring elements and IDs stay intact. */
.study-plan { margin:0 0 24px; padding:20px; background:#f7faf8; border:1px solid var(--line); border-radius:20px; }
.study-plan summary { display:flex; flex-wrap:wrap; align-items:center; gap:12px; cursor:pointer; min-height:44px; }
.study-plan summary strong { font-size:1.15rem; }
.study-plan summary > span:last-child { color:var(--muted); font-size:.78rem; }
.study-plan .home-eyebrow { margin:0; }
.study-plan-body { padding-top:18px; }
.study-plan-body p { color:#384f46; line-height:1.65; font-size:.85rem; }
.study-plan-form, .study-plan-results { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.study-plan fieldset { min-width:0; padding:16px; border:1px solid var(--line); border-radius:12px; }
.study-plan legend { font-weight:750; font-size:.85rem; }
.study-plan label { display:grid; gap:7px; margin:10px 0; font-size:.8rem; color:#384f46; }
.study-plan input, .study-plan select { min-width:0; width:100%; min-height:44px; padding:10px; background:#fff; color:var(--ink); border:1px solid var(--line); border-radius:9px; font:inherit; }
.study-plan-controls { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:12px; }
.study-plan :is(input, select, button, summary):focus-visible, #study-plan-status:focus { outline:3px solid #286c5e; outline-offset:3px; }
.study-plan [aria-invalid="true"] { border-color:#a0453e; }
.study-plan-results { margin:22px 0; }
.study-plan-results > section { min-width:0; padding:16px; background:#fff; border:1px solid var(--line); border-radius:12px; }
.study-plan h3 { margin:0 0 12px; font-size:1rem; }
.study-plan dl { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr); gap:9px 14px; font-size:.8rem; }
.study-plan dt { color:var(--muted); }
.study-plan dd { margin:0; overflow-wrap:anywhere; }
#study-plan-suggestions { list-style:none; padding:0; }
#study-plan-suggestions li + li { margin-top:16px; border-top:1px solid var(--line); padding-top:16px; }
#study-plan-suggestions h4 { margin:0; font-size:.9rem; }
#study-plan-suggestions small { color:var(--muted); }
#study-plan-suggestions a { display:block; margin-top:10px; font-weight:700; }
#study-plan-timeline { display:grid; gap:10px; padding-left:24px; }
#study-plan-timeline[hidden] { display:none; }
#study-plan-timeline li { padding:12px; border:1px solid var(--line); border-radius:10px; font-size:.82rem; }
#study-plan-timeline li[data-kind="break"] { background:#eaf3ed; }
#study-plan-timeline span { display:block; margin-top:5px; color:var(--muted); }
#study-plan-errors { color:#98443e; font-size:.8rem; }
.fatigue-early-check { margin:16px 0 24px; }
#fatigue-early-status { color:var(--muted); font-size:.8rem; line-height:1.5; }
.fatigue-early-warning { padding:20px; background:#faf6e9; border:1px solid #d8c997; border-radius:16px; }
.fatigue-early-warning[hidden] { display:none; }
.fatigue-early-warning h2 { margin:0 0 10px; font-size:1.2rem; }
.fatigue-early-warning p { margin:0 0 10px; line-height:1.6; font-size:.9rem; }
.fatigue-early-warning small { color:var(--muted); line-height:1.5; }
.fatigue-early-controls { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }
.fatigue-early-controls .coach-button { min-height:44px; white-space:normal; }
.fatigue-early-controls button:focus-visible, #fatigue-early-status:focus { outline:3px solid #286c5e; outline-offset:3px; }
.fatigue-early-live { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
@media(max-width:520px) { .fatigue-early-controls { flex-direction:column; } .fatigue-early-controls .coach-button { width:100%; } }
.study-plan-storage, .study-plan-confirm { margin:18px 0; background:#fff; }
.study-plan-storage [aria-pressed="true"] { box-shadow:inset 0 0 0 2px #286c5e; }
#study-plan-confirm[hidden] { display:none; }
#study-plan-storage-status:focus { outline:3px solid #286c5e; outline-offset:3px; }
.study-plan-storage .coach-button, .study-plan-confirm .coach-button { white-space:normal; min-height:44px; }
@media(max-width:650px) { .study-plan-form, .study-plan-results { grid-template-columns:minmax(0,1fr); } .study-plan { padding:16px; } }
.coach-page .coach-intro {
  display:block;
  margin:18px 0 16px;
  padding:clamp(29px,3.5vw,45px);
  color:#f8fffb;
  background:radial-gradient(circle at 93% 15%,rgba(117,190,161,.35),transparent 29%),linear-gradient(125deg,#153e35,#276a58);
  border-radius:32px;
  overflow:hidden;
}
.coach-page .coach-intro .home-eyebrow { color:#b9e7d6; }
.coach-page .coach-intro h1 { max-width:none; margin:0 0 13px; font-size:clamp(3rem,5.2vw,5.2rem); line-height:.96; letter-spacing:-.07em; }
.coach-page .coach-intro h1 span { color:#b7e5d1; font-family:Georgia,serif; font-style:italic; font-weight:400; }
.coach-page .coach-intro .hero-lead { max-width:46ch; margin:0; color:#dceee7; font-size:clamp(.95rem,1.4vw,1.12rem); line-height:1.55; }

.coach-session-dock {
  position:sticky; top:10px; z-index:30;
  display:grid; grid-template-columns:minmax(185px,1fr) auto auto; align-items:center; gap:20px;
  margin-bottom:24px; padding:13px 18px;
  background:rgba(250,253,251,.96); border:1px solid rgba(28,80,67,.16); border-radius:22px;
  box-shadow:0 15px 45px rgba(24,67,56,.13); backdrop-filter:blur(18px);
}
.coach-page .coach-session-dock .coach-clock { max-width:none; min-width:0; padding:0; background:none; border:0; border-radius:0; box-shadow:none; }
.coach-page .coach-session-dock .coach-clock::before { display:none; }
.coach-page .coach-session-dock .coach-clock-topline { justify-content:flex-start; gap:10px; font-size:.66rem; }
.coach-page .coach-session-dock .coach-clock output { display:inline-block; margin:7px 0 0; font-size:clamp(1.7rem,2.5vw,2.5rem); line-height:1; }
.coach-page .coach-session-dock .coach-clock p { display:inline; margin-left:12px; font-size:.71rem; }
.coach-page .coach-session-dock .coach-session-actions { display:flex; flex-wrap:nowrap; margin:0; padding:0; border:0; }
.coach-page .coach-session-dock .coach-button { min-height:42px; white-space:nowrap; }
.coach-floating-action { display:grid; justify-items:end; gap:3px; }
.coach-floating-action .floating-monitor-button { min-height:42px; white-space:nowrap; }
.coach-floating-action p { margin:0; color:var(--muted); font-size:.62rem; text-align:right; }
.coach-page .posture-alert { position:sticky; top:112px; z-index:29; box-shadow:0 12px 32px rgba(71,56,22,.1); }

.coach-task-shell { display:grid; grid-template-columns:175px minmax(0,1fr); gap:clamp(22px,3.5vw,48px); align-items:start; margin:0 0 72px; scroll-margin-top:125px; }
.coach-task-shell[hidden], .coach-task-panel[hidden] { display:none!important; }
.coach-task-nav { position:sticky; top:120px; display:grid; gap:9px; padding:12px; background:#e8f1ec; border:1px solid rgba(32,83,68,.12); border-radius:19px; }
.coach-task-nav button { display:flex; align-items:center; gap:14px; width:100%; min-height:58px; padding:0 14px; color:#4d6a5d; background:transparent; border:1px solid transparent; border-radius:12px; cursor:pointer; font:750 .88rem/1.2 Inter,ui-sans-serif,system-ui,sans-serif; text-align:left; transition:background 160ms ease,color 160ms ease,transform 160ms ease; }
.coach-task-nav button:hover { transform:translateX(2px); background:rgba(255,255,255,.6); }
.coach-task-nav button[aria-selected="true"] { color:#fff; background:var(--green-deep); box-shadow:0 9px 18px rgba(29,79,65,.18); }
.coach-task-nav button:focus-visible { outline:3px solid rgba(40,108,94,.35); outline-offset:2px; }
.coach-task-nav button span { opacity:.66; font-size:.62rem; letter-spacing:.08em; }
.coach-task-content { min-width:0; }
.coach-task-panel { min-width:0; outline:0; animation:coach-appear 230ms ease both; }
.coach-panel-heading { display:flex; align-items:baseline; gap:24px; margin:2px 0 20px; }
.coach-panel-heading .home-eyebrow { margin:0; white-space:nowrap; font-size:.65rem; }
.coach-panel-heading h2 { margin:0; font-size:clamp(2.1rem,3.8vw,3.5rem); line-height:1.02; letter-spacing:-.06em; }

.coach-page .coach-workspace { grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr); gap:16px; padding:0; }
.coach-page .coach-camera-card { min-width:0; padding:23px; }
.coach-page .coach-camera-shell { min-height:300px; aspect-ratio:1.33; }
.coach-page .coach-signals { grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; gap:11px; }
.coach-page .coach-signals-heading { grid-column:1/-1; align-items:center; padding:0 3px 2px; }
.coach-page .coach-signals-controls { max-width:none; }
.coach-page .coach-metric-card { min-width:0; padding:18px; }
.coach-page .coach-metric-topline { gap:7px; }
.coach-page .coach-metric-topline h3 { font-size:.91rem; }
.coach-page .coach-score strong { font-size:1.9rem; }
.coach-page .coach-meter { margin:16px 0 11px; }
.coach-page .coach-metric-label { margin-bottom:0; font-size:.74rem; }
.coach-page .coach-light-readings { margin-top:9px; }
.coach-task-panel .fatigue-state-card { margin-top:16px; padding:22px 24px; box-shadow:none; }
.coach-task-panel .fatigue-state-card .coach-card-heading { margin-bottom:6px; }
.coach-task-panel .fatigue-state-card .coach-wellbeing-note { margin-top:8px; }
.fatigue-forecast { margin-top:22px; padding-top:22px; border-top:1px solid var(--line); }
.fatigue-forecast-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.fatigue-forecast-heading .home-eyebrow { margin:0 0 5px; }
.fatigue-forecast-heading h3 { margin:0; font-size:1.18rem; letter-spacing:-.03em; }
#fatigue-forecast-state { flex:0 0 auto; max-width:220px; padding:7px 10px; color:#647671; background:#e7efec; border-radius:99px; font-size:.64rem; font-weight:780; text-align:center; }
#fatigue-forecast-state[data-state="low"] { color:#1e6958; background:#e5f4ef; }
#fatigue-forecast-state[data-state="elevated"] { color:#775117; background:#f8efd9; }
#fatigue-forecast-state[data-state="high"] { color:#8a3e30; background:#fae7e2; }
.fatigue-forecast-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:18px; }
.fatigue-forecast-form label { display:grid; align-content:start; gap:7px; color:var(--muted); font-size:.7rem; font-weight:700; }
.fatigue-forecast-form label > span { display:flex; align-items:center; gap:7px; }
.fatigue-forecast-form input, .fatigue-forecast-form select { width:100%; min-height:43px; padding:0 11px; color:var(--ink); background:#f7faf9; border:1px solid var(--line); border-radius:11px; font:inherit; }
.fatigue-forecast-form label > span input { min-width:0; }
.fatigue-forecast-form input:focus-visible, .fatigue-forecast-form select:focus-visible { outline:3px solid rgba(40,108,94,.28); outline-offset:2px; }
.fatigue-forecast-form .coach-button { align-self:end; }
.fatigue-forecast-result { display:grid; gap:8px; margin-top:16px; padding:17px; background:#f1f7f5; border:1px solid rgba(40,108,94,.1); border-radius:16px; }
.fatigue-forecast-result > div { display:flex; align-items:center; justify-content:space-between; gap:15px; }
.fatigue-forecast-result > div span { color:var(--green); text-transform:uppercase; letter-spacing:.1em; font-size:.59rem; font-weight:800; }
.fatigue-forecast-result > div strong { font-size:1.25rem; }
.fatigue-forecast-result p { margin:0; color:var(--muted); font-size:.72rem; line-height:1.5; }
.fatigue-forecast-result small { color:#758680; font-size:.66rem; }
.fatigue-actions { min-width:0; margin-top:16px; padding:16px; background:#f7faf8; border:1px solid var(--line); border-radius:14px; }
.fatigue-actions h4 { margin:0; color:var(--ink); font-size:.9rem; }
.fatigue-actions > p { margin:10px 0; line-height:1.6; color:#384f46; font-size:.75rem; }
.fatigue-actions ul { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:14px 0; padding:0; list-style:none; }
.fatigue-actions li { min-width:0; padding:13px; background:#fff; border:1px solid var(--line); border-radius:11px; overflow-wrap:anywhere; }
.fatigue-actions h5 { margin:0; color:var(--ink); font-size:.8rem; line-height:1.4; }
.fatigue-actions li p { margin:8px 0 0; color:#384f46; font-size:.72rem; line-height:1.6; }
.fatigue-actions li .fatigue-action-timing { color:#22685a; font-weight:750; }
.fatigue-actions li .fatigue-action-reason { padding-top:8px; border-top:1px solid var(--line); }
.fatigue-actions-controls { display:flex; flex-wrap:wrap; gap:10px; }
.fatigue-actions-controls button { max-width:100%; min-height:44px; white-space:normal; text-align:center; }
.fatigue-actions button:focus-visible { outline:3px solid #286c5e; outline-offset:3px; }
.fatigue-actions[data-state="high"], .fatigue-actions[data-state="soon"] { border-color:#b88b4b; }
.fatigue-actions #fatigue-actions-feedback:empty { display:none; }
.suggestion-feedback-settings, .suggestion-feedback-prompt { min-width:0; margin:14px 0 0; padding:12px; border:1px solid var(--line); border-radius:10px; }
.suggestion-feedback-settings legend, .suggestion-feedback-prompt legend { max-width:100%; padding:0 5px; color:var(--ink); font-size:.75rem; font-weight:750; overflow-wrap:anywhere; }
.suggestion-feedback-settings label { display:flex; align-items:flex-start; gap:8px; font-size:.74rem; line-height:1.5; color:#384f46; }
.suggestion-feedback-settings input { flex:0 0 auto; width:18px; height:18px; margin:2px 0 0; accent-color:#286c5e; }
.suggestion-feedback-settings p { margin:10px 0; font-size:.72rem; line-height:1.6; color:#384f46; }
.suggestion-feedback-options { display:flex; flex-wrap:wrap; gap:7px; }
.suggestion-feedback-options button { min-height:44px; padding:8px 10px; color:#22685a; background:#f1f7f5; border:1px solid #8caea4; border-radius:8px; font:inherit; font-size:.72rem; cursor:pointer; }
#suggestion-feedback-status:empty { display:none; }
#suggestion-feedback-status:focus { outline:2px solid #286c5e; outline-offset:3px; }
.suggestion-feedback-settings input:focus-visible { outline:3px solid #286c5e; outline-offset:3px; }
@media (max-width:600px) { .fatigue-actions { padding:12px; } .fatigue-actions ul { grid-template-columns:1fr; } .fatigue-actions-controls button { width:100%; } }
.fatigue-graph { min-width:0; margin:16px 0 0; padding:14px 12px; background:#fff; border:1px solid var(--line); border-radius:14px; }
.fatigue-graph-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
.fatigue-graph-heading h4 { margin:0; color:var(--ink); font-size:.85rem; line-height:1.4; }
.fatigue-graph-heading label { display:flex; flex-wrap:wrap; align-items:center; gap:7px; color:#384f46; font-size:.72rem; }
.fatigue-graph-heading select { min-height:40px; max-width:100%; padding:6px 9px; color:#384f46; background:#f7faf9; border:1px solid var(--line); border-radius:8px; font:inherit; }
#fatigue-graph-status, .fatigue-graph figcaption { margin:11px 0; color:#384f46; font-size:.72rem; line-height:1.6; }
.fatigue-graph-legend { display:flex; flex-wrap:wrap; gap:9px 16px; margin:12px 0; color:#384f46; font-size:.7rem; }
.fatigue-graph-legend span { display:inline-flex; align-items:center; gap:7px; }
.fatigue-graph-legend i { display:inline-block; width:22px; height:0; border-top:3px solid #087f8c; }
.fatigue-graph-legend .fatigue-legend-projected { border-color:#be730b; border-top-style:dashed; }
.fatigue-graph-legend .fatigue-legend-window { height:10px; border:1px solid #b88b4b; background:#f6dfbb; }
.coach-demo-entry { display:flex; flex-wrap:wrap; align-items:center; gap:12px; font-size:.85rem; color:#536d73; }
.fatigue-graph-plot { min-width:0; width:100%; }
.fatigue-graph [hidden] { display:none; }
.fatigue-graph-plot svg { display:block; width:100%; height:auto; }
.fatigue-graph-comment { margin:12px 0; padding:12px; border-left:3px solid var(--green-deep); border-radius:8px; background:#f1f7f5; }
.fatigue-graph-comment h5 { margin:0 0 6px; color:var(--ink); font-size:.8rem; }
.fatigue-graph-comment p { margin:0 0 6px; color:#384f46; font-size:.75rem; line-height:1.6; }
.fatigue-graph-comment small { color:#384f46; font-size:.7rem; }
.fatigue-graph-table-details { margin-top:12px; }
.fatigue-graph-table-details summary { color:var(--green-deep); cursor:pointer; font-size:.76rem; font-weight:700; }
.fatigue-graph-table-scroll { max-width:100%; max-height:300px; margin-top:12px; overflow:auto; }
.fatigue-graph table { width:100%; border-collapse:collapse; font-size:.7rem; text-align:left; }
.fatigue-graph caption { padding-bottom:9px; color:#384f46; text-align:left; }
.fatigue-graph th, .fatigue-graph td { padding:8px; border-bottom:1px solid var(--line); color:#384f46; overflow-wrap:anywhere; }
.fatigue-graph th { color:var(--ink); background:#f1f7f5; }
.fatigue-graph select:focus-visible, .fatigue-graph summary:focus-visible, .fatigue-graph-table-scroll:focus-visible { outline:3px solid rgba(40,108,94,.4); outline-offset:3px; }
@media (max-width:480px) { .fatigue-graph { padding:12px 0; border-left:0; border-right:0; border-radius:0; } .fatigue-graph-heading { align-items:flex-start; flex-direction:column; } }
.fatigue-explanation { margin-top:14px; padding:14px 16px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.fatigue-explanation summary { cursor:pointer; color:var(--green-deep); font-size:.76rem; font-weight:750; }
.fatigue-explanation summary:focus-visible { outline:3px solid rgba(40,108,94,.28); outline-offset:5px; border-radius:4px; }
.fatigue-explanation-body { margin-top:14px; }
.fatigue-explanation-body p { margin:9px 0; color:var(--muted); font-size:.72rem; line-height:1.6; }
#fatigue-explanation-data-state { color:var(--ink); font-weight:750; }
#fatigue-explanation-inputs { display:grid; gap:10px; margin:14px 0; padding-left:20px; }
#fatigue-explanation-inputs li { min-width:0; overflow-wrap:anywhere; color:var(--muted); font-size:.7rem; line-height:1.5; }
#fatigue-explanation-inputs strong { color:var(--ink); font-weight:700; }
#fatigue-explanation-inputs span { display:block; margin-top:2px; }
.fatigue-feedback { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:14px; }
.fatigue-feedback > span { margin-right:4px; color:var(--muted); font-size:.68rem; font-weight:750; }
.fatigue-feedback button { min-height:35px; padding:0 12px; color:var(--green-deep); background:#fff; border:1px solid rgba(40,108,94,.24); border-radius:99px; cursor:pointer; font:700 .68rem/1 Inter,ui-sans-serif,system-ui,sans-serif; }
.fatigue-feedback button:disabled { cursor:not-allowed; opacity:.45; }
.fatigue-feedback button:focus-visible { outline:3px solid rgba(40,108,94,.28); outline-offset:2px; }
.fatigue-feedback p { flex-basis:100%; min-height:1em; margin:2px 0 0; color:var(--muted); font-size:.66rem; }
.coach-next-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:16px; }
.coach-next-actions button { display:flex; justify-content:space-between; gap:12px; align-items:center; min-height:82px; padding:18px 21px; color:#173e35; background:#e1f0e8; border:1px solid rgba(37,101,75,.14); border-radius:18px; cursor:pointer; font:760 1rem/1.2 Inter,ui-sans-serif,system-ui,sans-serif; text-align:left; transition:transform 160ms ease,box-shadow 160ms ease; }
.coach-next-actions button:nth-child(2) { background:#f6efe2; }
.coach-next-actions button:hover { transform:translateY(-2px); box-shadow:0 12px 24px rgba(29,72,55,.1); }
.coach-next-actions button:focus-visible { outline:3px solid rgba(40,108,94,.35); outline-offset:2px; }
.coach-next-actions span { font-size:1.3rem; }

.coach-disclosure { min-width:0; }
.coach-disclosure > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; list-style:none; cursor:pointer; color:var(--green-deep); font-size:.78rem; font-weight:750; }
.coach-disclosure > summary::-webkit-details-marker { display:none; }
.coach-disclosure > summary::after { content:"+"; font-size:1.1rem; font-weight:400; }
.coach-disclosure[open] > summary::after { content:"−"; }
.coach-disclosure > summary:focus-visible { outline:3px solid rgba(40,108,94,.35); outline-offset:3px; border-radius:4px; }
.coach-calibration-disclosure, .coach-camera-disclosure { margin-top:16px; padding:14px 16px; background:#f3f8f6; border:1px solid rgba(40,108,94,.12); border-radius:14px; }
.coach-calibration-disclosure .calibration-panel { margin:14px 0 0; padding:0; background:none; border:0; border-radius:0; }
.coach-camera-disclosure .coach-camera-note { margin:13px 0 0; }
.coach-metric-disclosure { margin-top:10px; padding-top:9px; border-top:1px solid var(--line); }
.coach-metric-disclosure > summary { color:var(--muted); font-size:.65rem; }
.coach-metric-disclosure .coach-metric-detail { margin:8px 0 0; }
.coach-schedule-disclosure, .coach-privacy-disclosure { margin-top:12px; padding:0 21px; background:#fff; border:1px solid rgba(32,83,68,.13); border-radius:17px; }
.coach-schedule-disclosure > summary, .coach-privacy-disclosure > summary { min-height:60px; font-size:.85rem; }
.coach-schedule-disclosure .coach-wellbeing, .coach-privacy-disclosure .privacy-monitoring { margin:0 0 20px; padding:16px; box-shadow:none; }

.coach-task-panel .recovery-control-card { max-width:780px; min-height:410px; padding:clamp(26px,4vw,45px); background:linear-gradient(125deg,#f7f2e8,#fffdf9); }
.coach-task-panel .recovery-control-card h2 { font-size:clamp(1.8rem,3.2vw,2.6rem); }
.coach-task-panel .recovery-fields { max-width:550px; margin:31px 0 20px; }
.coach-task-panel .recovery-result { max-width:650px; }
.coach-task-panel .coach-recovery-hint { max-width:48ch; margin:13px 0 0; color:var(--muted); font-size:.75rem; line-height:1.5; }
.coach-task-panel .indoor-activities { margin:0; padding:clamp(18px,2.5vw,30px); }
.coach-task-panel .indoor-activities-heading h2 { font-size:clamp(1.4rem,2.6vw,2.2rem); }
.coach-task-panel .indoor-activity-workspace { grid-template-columns:minmax(220px,.72fr) minmax(0,1.28fr); }

@keyframes coach-appear { from { opacity:.5; transform:translateY(7px); } to { opacity:1; transform:translateY(0); } }
@media (max-width:1100px) {
  .coach-session-dock { grid-template-columns:minmax(140px,1fr) auto; }
  .coach-floating-action { grid-column:2; grid-row:1; }
  .coach-session-dock .coach-session-actions { grid-column:1/-1; }
  .coach-page .coach-workspace { grid-template-columns:1fr; }
  .coach-page .coach-camera-shell { min-height:300px; max-height:440px; }
}
@media (max-width:760px) {
  .coach-page .coach-intro { margin:14px 0; padding:32px 25px; border-radius:24px; }
  .coach-page .coach-intro h1 { font-size:clamp(2.8rem,10vw,4.5rem); }
  .coach-session-dock { top:0; gap:10px; padding:11px 12px; border-radius:0 0 16px 16px; }
  .coach-page .coach-session-dock .coach-clock p { display:none; }
  .coach-page .coach-session-dock .coach-session-actions { display:flex; gap:7px; }
  .coach-page .coach-session-dock .coach-button { flex:1; min-width:0; min-height:38px; padding:0 8px; font-size:.68rem; }
  .coach-floating-action p { display:none; }
  .coach-floating-action .floating-monitor-button { min-height:34px; padding:0 9px; font-size:.62rem; }
  .coach-page .posture-alert { top:110px; }
  .coach-task-shell { display:block; scroll-margin-top:145px; }
  .coach-task-nav { position:sticky; top:111px; z-index:20; display:flex; gap:4px; margin-bottom:22px; padding:5px; border-radius:15px; }
  .coach-task-nav button { flex:1; justify-content:center; gap:5px; min-height:43px; padding:0 5px; font-size:.77rem; }
  .coach-task-nav button:hover { transform:none; }
  .coach-task-nav button span { display:none; }
  .coach-panel-heading { display:block; margin-bottom:17px; }
  .coach-panel-heading .home-eyebrow { margin-bottom:6px; }
  .coach-page .coach-signals { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .coach-task-panel .indoor-activity-workspace { grid-template-columns:1fr; }
}
@media (max-width:520px) {
  .coach-page .coach-intro h1 { font-size:clamp(2.65rem,12vw,3.6rem); }
  .coach-page .coach-session-dock .coach-clock output { font-size:1.55rem; }
  .coach-page .coach-session-dock .coach-session-actions .coach-button-primary { grid-column:auto; }
  .coach-page .coach-camera-card { padding:16px; }
  .coach-page .coach-camera-shell { width:100%; min-height:230px; aspect-ratio:auto; }
  .coach-page .monitoring-switch { width:auto; max-width:100%; }
  .coach-page .coach-signals { grid-template-columns:1fr; }
  .coach-next-actions { grid-template-columns:1fr; }
  .coach-next-actions button { min-height:62px; }
  .coach-task-panel .fatigue-state-card { padding:18px; }
  .fatigue-forecast-heading { flex-direction:column; }
  #fatigue-forecast-state { align-self:flex-start; }
  .fatigue-forecast-form { grid-template-columns:1fr; }
  .coach-task-panel .recovery-control-card { min-height:0; }
  .coach-task-panel .recovery-fields { grid-template-columns:1fr; }
}

/* Editorial hierarchy for the live workspace. The readings lead on small screens,
   while the camera remains the larger, quieter surface on desktop. */
body.coach-page .coach-intro {
  position:relative;
  isolation:isolate;
  padding:clamp(32px,3.3vw,48px);
  background:radial-gradient(circle at 90% 20%,rgba(166,224,197,.22),transparent 31%),
    linear-gradient(128deg,#123a32 0%,#1c4c40 60%,#286657 100%);
}
body.coach-page .coach-intro::after {
  content:"";
  position:absolute;
  z-index:-1;
  width:410px;
  height:410px;
  right:-125px;
  bottom:-295px;
  border:1px solid rgba(207,241,220,.19);
  border-radius:50%;
  box-shadow:0 0 0 60px rgba(207,241,220,.035),0 0 0 120px rgba(207,241,220,.025);
  pointer-events:none;
}
body.coach-page .coach-intro h1 { max-width:16ch; font-size:clamp(3rem,4.6vw,4.6rem); line-height:1.01; }
body.coach-page .coach-intro .hero-lead { max-width:53ch; color:#e0eee7; }
body.coach-page .coach-demo-entry {
  display:flex;
  align-items:center;
  gap:14px;
  margin:18px 0 0;
  color:#d4eadd;
  font-size:.875rem;
  line-height:1.5;
}
body.coach-page .coach-demo-entry .coach-button-secondary {
  flex:0 0 auto;
  min-height:44px;
  padding:10px 17px;
  color:#153e35;
  background:#c6ead9;
  border:1px solid #c6ead9;
  border-radius:12px;
  text-decoration:none;
  transition:background 180ms ease,transform 180ms ease;
}
body.coach-page .coach-demo-entry .coach-button-secondary:hover { background:#e2f5e9; transform:translateY(-2px); }
body.coach-page .coach-demo-entry .coach-button-secondary:focus-visible { outline:3px solid #e2f5e9; outline-offset:4px; }

body.coach-page .study-plan {
  border-color:#d3e3d8;
  background:#f0f6f1;
  box-shadow:0 10px 28px rgba(22,63,48,.035);
}
body.coach-page .study-plan summary { gap:12px 18px; }
body.coach-page .study-plan summary strong { font-size:1.18rem; letter-spacing:-.025em; }
body.coach-page .study-plan summary > span:last-child { font-size:.875rem; }
body.coach-page .study-plan label,body.coach-page .study-plan dl { font-size:.875rem; }
body.coach-page .study-plan-body p { font-size:.875rem; }
body.coach-page .study-plan { margin-bottom:18px; }
body.coach-page .coach-session-dock { margin-bottom:18px; padding:12px 18px; }
body.coach-page .coach-floating-action .floating-monitor-button { min-height:44px; font-size:.8125rem; line-height:1.25; }
body.coach-page .coach-floating-action p { font-size:.8125rem; }
body.coach-page .fatigue-early-check { margin:12px 0 16px; }
body.coach-page #fatigue-early-status { font-size:.875rem; }

body.coach-page .coach-workspace { align-items:start; }
body.coach-page .coach-camera-card { grid-column:1; grid-row:1; }
body.coach-page .coach-signals { grid-column:2; grid-row:1; gap:14px; }
body.coach-page .coach-signals-heading { padding:0 2px 7px; }
body.coach-page .coach-metric-card {
  min-height:173px;
  padding:clamp(18px,2vw,25px);
  border-color:#d8e6dd;
  background:#fff;
  transition:border-color 180ms ease,box-shadow 180ms ease,transform 180ms ease;
}
body.coach-page .coach-metric-card:first-of-type { background:#e9f4ed; border-color:#c7dfcf; }
body.coach-page .coach-metric-card:nth-of-type(2) { background:#f7f3e9; border-color:#e6dfcb; }
body.coach-page .coach-metric-card:focus-within { border-color:#7da993; box-shadow:0 0 0 3px rgba(43,113,86,.11); }
body.coach-page .coach-metric-topline p { font-size:.775rem; letter-spacing:.055em; }
body.coach-page .coach-metric-topline h3 { font-size:1.03rem; }
body.coach-page .coach-score strong { font-size:clamp(2.15rem,3vw,2.7rem); }
body.coach-page .coach-metric-label,body.coach-page .coach-metric-detail,
body.coach-page .coach-metric-disclosure > summary { font-size:.825rem; }
body.coach-page .analysis-status { max-width:none; font-size:.8125rem; }

body.coach-page .fatigue-state-card { border-color:#d7e4da; }
body.coach-page .fatigue-state-card h2 { font-size:1.55rem; }
body.coach-page .fatigue-state-card #fatigue-state,
body.coach-page #fatigue-forecast-state { max-width:none; font-size:.75rem; line-height:1.3; }
body.coach-page .fatigue-state-card > p:not(.coach-wellbeing-note) { font-size:.9rem; }
body.coach-page .fatigue-state-card > small { font-size:.8rem; }
body.coach-page .fatigue-state-card > .coach-wellbeing-note { font-size:.8rem; }
body.coach-page .fatigue-forecast {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
  gap:18px;
  padding-top:30px;
}
body.coach-page .fatigue-forecast-heading,body.coach-page .fatigue-forecast-form,
body.coach-page .fatigue-actions,body.coach-page .fatigue-graph,
body.coach-page .fatigue-explanation,body.coach-page .fatigue-feedback,
body.coach-page .fatigue-forecast > .coach-wellbeing-note { grid-column:1/-1; }
body.coach-page .fatigue-forecast-heading h3 { font-size:clamp(1.3rem,2.3vw,1.8rem); }
body.coach-page .fatigue-forecast-form { margin:0; gap:13px; }
body.coach-page .fatigue-forecast-form,
body.coach-page .fatigue-forecast-form :is(input,select,button) { scroll-margin-top:calc(var(--session-dock-height,96px) + 24px); }
body.coach-page .fatigue-forecast-form label { font-size:.875rem; }
body.coach-page .fatigue-forecast-form input,body.coach-page .fatigue-forecast-form select { min-height:48px; font-size:.925rem; }
body.coach-page .fatigue-forecast-result {
  align-content:start;
  align-self:start;
  min-width:0;
  margin:0;
  padding:22px;
  border-color:#d5e5db;
  border-radius:18px;
}
body.coach-page .fatigue-forecast-result > div span { font-size:.75rem; }
body.coach-page .fatigue-forecast-result p { font-size:.875rem; }
body.coach-page .fatigue-forecast-result small { font-size:.8rem; }
body.coach-page .four-hour-outlook { background:#f6f2e8; border-color:#e6dfc9; }
body.coach-page .four-hour-outlook h4 { margin:0; font-size:1.15rem; letter-spacing:-.025em; }
body.coach-page .four-hour-outlook label { display:flex; align-items:start; gap:9px; font-size:.875rem; line-height:1.45; }
body.coach-page .four-hour-outlook label input { flex:none; width:18px; height:18px; margin-top:2px; accent-color:#286c5e; }
body.coach-page .fatigue-actions { margin:0; padding:24px; border-radius:18px; }
body.coach-page .fatigue-actions h4 { font-size:1.2rem; letter-spacing:-.025em; }
body.coach-page .fatigue-actions > p,body.coach-page .fatigue-actions li p,
body.coach-page .suggestion-feedback-settings label,body.coach-page .suggestion-feedback-settings p { font-size:.875rem; }
body.coach-page .fatigue-actions h5 { font-size:1rem; }
body.coach-page .fatigue-actions li { padding:18px; border-radius:14px; }
body.coach-page .suggestion-feedback-options button { font-size:.8125rem; }
body.coach-page .fatigue-graph { margin:0; padding:22px; border-radius:18px; }
body.coach-page .fatigue-graph-heading h4 { font-size:1.15rem; }
body.coach-page .fatigue-graph-heading label,body.coach-page #fatigue-graph-status,
body.coach-page .fatigue-graph figcaption,body.coach-page .fatigue-graph-legend { font-size:.875rem; }
body.coach-page .fatigue-explanation { margin:0; padding:20px 22px; }
body.coach-page .fatigue-explanation summary,body.coach-page .fatigue-explanation-body p,
body.coach-page #fatigue-explanation-inputs li { font-size:.875rem; }
body.coach-page .fatigue-feedback > span,body.coach-page .fatigue-feedback button { font-size:.8125rem; }
body.coach-page .fatigue-feedback button { min-height:40px; }
body.coach-page .fatigue-forecast > .coach-wellbeing-note { font-size:.8rem; }
body.coach-page .suggestion-feedback-disclosure {
  margin:18px 0;
  border:1px solid #d5e3db;
  border-radius:13px;
  background:#fff;
}
body.coach-page .suggestion-feedback-disclosure > summary {
  min-height:48px;
  padding:12px 16px;
  color:#245b4e;
  font-size:.875rem;
  font-weight:750;
  cursor:pointer;
}
body.coach-page .suggestion-feedback-disclosure > summary:focus-visible { outline:3px solid #5f9b84; outline-offset:3px; }
body.coach-page .suggestion-feedback-disclosure .suggestion-feedback-settings {
  margin:0;
  padding:16px;
  border:0;
  border-top:1px solid #d5e3db;
  border-radius:0;
}
body.coach-page .suggestion-feedback-disclosure .suggestion-feedback-settings legend {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}

@media (min-width:821px) and (max-width:1100px) {
  body.coach-page .coach-session-dock { grid-template-columns:minmax(155px,1fr) auto minmax(145px,auto); gap:12px; }
  body.coach-page .coach-session-dock .coach-session-actions { grid-column:2; grid-row:1; }
  body.coach-page .coach-floating-action { grid-column:3; grid-row:1; }
}
@media (min-width:821px) {
  body.coach-page .coach-session-dock:has(#session-state[data-state="idle"]),
  body.coach-page .coach-session-dock:has(#session-state[data-state="finished"]),
  body.coach-page .coach-session-dock:has(#session-state[data-state="error"]) { position:static; }
  body.coach-page:has(#session-state[data-state="idle"]) .coach-task-nav,
  body.coach-page:has(#session-state[data-state="finished"]) .coach-task-nav,
  body.coach-page:has(#session-state[data-state="error"]) .coach-task-nav { top:16px; }
}

@media (hover:hover) {
  body.coach-page .coach-metric-card:hover { transform:translateY(-2px); box-shadow:0 12px 25px rgba(21,63,46,.07); }
}
@media (max-width:1100px) {
  body.coach-page .coach-camera-card { grid-column:1; grid-row:2; }
  body.coach-page .coach-signals { grid-column:1; grid-row:1; }
}
@media (max-width:700px) {
  body.coach-page .coach-signals { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.coach-page .coach-metric-card { min-height:148px; }
  body.coach-page .coach-metric-topline { align-items:start; flex-wrap:wrap; }
  body.coach-page .coach-score strong { font-size:2rem; }
  body.coach-page .fatigue-forecast { grid-template-columns:1fr; gap:14px; }
  body.coach-page .fatigue-forecast-heading,body.coach-page .fatigue-forecast-form,
  body.coach-page .fatigue-forecast-result,body.coach-page .fatigue-actions,
  body.coach-page .fatigue-graph,body.coach-page .fatigue-explanation,
  body.coach-page .fatigue-feedback,body.coach-page .fatigue-forecast > .coach-wellbeing-note { grid-column:1; }
}
@media (max-width:480px) {
  body.coach-page .coach-intro { padding:27px 23px; }
  body.coach-page .coach-demo-entry { align-items:flex-start; flex-direction:column; gap:8px; }
  body.coach-page .coach-signals { gap:9px; }
  body.coach-page .coach-signals-heading { align-items:flex-start; flex-direction:column; }
  body.coach-page .coach-metric-card { padding:14px; }
  body.coach-page .coach-metric-topline h3 { font-size:.92rem; }
  body.coach-page .coach-metric-topline p { font-size:.72rem; }
  body.coach-page .coach-score strong { font-size:1.8rem; }
  body.coach-page .coach-metric-label { font-size:.78rem; }
  body.coach-page .fatigue-forecast-form { grid-template-columns:1fr; }
  body.coach-page .fatigue-graph { padding:18px; border:1px solid #d8e3dc; border-radius:16px; }
}
@media (prefers-reduced-motion:reduce) {
  .coach-task-panel { animation:none; }
  .coach-task-nav button, .coach-next-actions button { transition:none; }
}

/* Four-hour learned endpoint outlook, separate from the heuristic graph. */
.four-hour-outlook h4 { margin:0; color:var(--green); }
.four-hour-outlook label { display:flex; align-items:center; gap:8px; font-size:.75rem; line-height:1.5; }
.four-hour-outlook input[type="checkbox"] { width:18px; height:18px; min-height:18px; flex:none; padding:0; accent-color:#28786e; }

/* Coach visual hierarchy: a small journey diagram, data-first readings, and
   progressive disclosure for the longer forecast explanation. */
body.coach-page .coach-intro {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(210px,290px);
  gap:clamp(26px,5vw,80px);
  align-items:center;
}
body.coach-page .coach-journey-map {
  position:relative;
  display:grid;
  gap:8px;
  margin:0;
  padding:12px;
  list-style:none;
  border:1px solid rgba(212,243,225,.22);
  border-radius:20px;
  background:rgba(228,250,236,.055);
  backdrop-filter:blur(5px);
}
body.coach-page .coach-journey-map::before {
  content:"";
  position:absolute;
  top:32px;
  bottom:32px;
  left:34px;
  width:1px;
  background:rgba(192,236,213,.35);
}
body.coach-page .coach-journey-map li {
  position:relative;
  display:flex;
  align-items:center;
  gap:16px;
  min-height:54px;
  padding:8px 12px;
  color:#e7f5ec;
  border-radius:12px;
}
body.coach-page .coach-journey-map li:first-child { background:rgba(208,244,223,.14); }
body.coach-page .coach-journey-map li span {
  display:grid;
  place-items:center;
  flex:none;
  width:24px;
  height:24px;
  color:#133d34;
  background:#c6ead9;
  border-radius:50%;
  font-size:.65rem;
  font-weight:800;
  font-variant-numeric:tabular-nums;
}
body.coach-page .coach-journey-map li strong { font-size:1.08rem; font-weight:650; letter-spacing:-.025em; }

body.coach-page .fatigue-early-check { margin:12px 0 18px; }
body.coach-page #fatigue-early-status {
  display:flex;
  align-items:center;
  gap:11px;
  min-height:46px;
  margin:0;
  padding:10px 15px;
  color:#365e50;
  background:#eaf3ee;
  border:1px solid #d6e6db;
  border-radius:13px;
  line-height:1.45;
}
body.coach-page #fatigue-early-status::before {
  content:"";
  flex:none;
  width:9px;
  height:9px;
  border:2px solid #4e8b70;
  border-radius:50%;
}
body.coach-page .fatigue-early-warning {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:18px 30px;
  padding:22px 26px;
  border-left:5px solid #ad752c;
  box-shadow:0 12px 30px rgba(91,67,25,.07);
}
body.coach-page .fatigue-early-warning[hidden] { display:none; }
body.coach-page .fatigue-early-warning h2 { font-size:1.38rem; letter-spacing:-.035em; }
body.coach-page .fatigue-early-warning small { display:block; font-size:.78rem; }
body.coach-page .fatigue-early-controls { max-width:360px; justify-content:flex-end; margin:0; }
body.coach-page .coach-warning-detail { margin-top:8px; color:#755323; }
body.coach-page .coach-warning-detail summary { width:max-content; max-width:100%; cursor:pointer; font-size:.8rem; font-weight:700; }
body.coach-page .coach-warning-detail p { max-width:62ch; margin:8px 0 0; font-size:.8rem; }
body.coach-page .coach-warning-detail summary:focus-visible,
body.coach-page .coach-model-detail summary:focus-visible,
body.coach-page .coach-graph-detail summary:focus-visible { outline:3px solid #4a8d73; outline-offset:3px; border-radius:3px; }

body.coach-page .coach-signals-heading { border-bottom:1px solid #d9e7dd; padding-bottom:12px; }
body.coach-page .coach-metric-card { position:relative; overflow:hidden; }
body.coach-page .coach-metric-card::before {
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:#9bc9ad;
}
body.coach-page .coach-metric-card:nth-of-type(2)::before { background:#d9b873; }
body.coach-page .coach-metric-card:nth-of-type(3)::before { background:#83b7bd; }
body.coach-page .coach-metric-card:nth-of-type(4)::before { background:#a1c6a5; }
body.coach-page .coach-meter {
  position:relative;
  height:10px;
  margin:18px 0 13px;
  background:#e2ece5;
  border-radius:99px;
}
body.coach-page .coach-meter::after {
  content:"";
  position:absolute;
  inset:0;
  background:repeating-linear-gradient(90deg,transparent 0,transparent calc(25% - 2px),rgba(255,255,255,.7) calc(25% - 2px),rgba(255,255,255,.7) 25%);
  pointer-events:none;
}
body.coach-page .coach-meter > div { transition:width 240ms ease,background 160ms ease; }
body.coach-page .coach-metric-label { min-height:1.4em; font-weight:740; }

body.coach-page .fatigue-state-card > .coach-wellbeing-note { max-width:68ch; }
body.coach-page .fatigue-forecast {
  position:relative;
  gap:16px;
  border-top:0;
  margin-top:22px;
  padding-top:30px;
}
body.coach-page .fatigue-forecast::before {
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:1px;
  background:linear-gradient(90deg,#9ccab0,transparent 75%);
}
body.coach-page .fatigue-forecast-heading { align-items:center; }
body.coach-page .fatigue-forecast-heading h3 { max-width:20ch; line-height:1.1; }
body.coach-page .fatigue-forecast-form {
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:13px;
  padding:22px;
  background:#f5f9f6;
  border:1px solid #d9e8dc;
  border-radius:18px;
}
body.coach-page .fatigue-forecast-form .coach-button { min-height:48px; }
body.coach-page .fatigue-forecast-result { min-height:208px; }
body.coach-page .fatigue-forecast-result:not(.four-hour-outlook) {
  background:linear-gradient(145deg,#e7f3eb,#f6faf6);
  border-color:#bddbc7;
}
body.coach-page .fatigue-forecast-result:not(.four-hour-outlook) > div {
  align-items:flex-start;
  flex-direction:column;
  gap:8px;
}
body.coach-page .fatigue-forecast-result:not(.four-hour-outlook) > div strong {
  color:#174d3d;
  font-size:clamp(2.3rem,3.6vw,3.5rem);
  line-height:1;
  letter-spacing:-.07em;
  font-variant-numeric:tabular-nums;
}
body.coach-page .fatigue-forecast-result:not(.four-hour-outlook) > div strong output { font:inherit; }
body.coach-page .four-hour-outlook { position:relative; gap:10px; }
body.coach-page .four-hour-outlook > div {
  min-height:36px;
  padding:6px 0;
  border-bottom:1px solid #e8ddc6;
}
body.coach-page .four-hour-outlook > div strong { color:#704e22; font-variant-numeric:tabular-nums; }
body.coach-page .coach-model-detail summary { color:#5b674f; cursor:pointer; font-size:.8rem; font-weight:700; }
body.coach-page .coach-model-detail p { margin:7px 0 0; }
body.coach-page .fatigue-graph {
  position:relative;
  overflow:hidden;
  padding:25px;
  background:#fbfdfb;
  border-color:#cbded0;
}
body.coach-page .fatigue-graph-heading h4 { max-width:30ch; font-size:1.3rem; line-height:1.2; letter-spacing:-.03em; }
body.coach-page .fatigue-graph-heading select { min-height:44px; }
body.coach-page .fatigue-graph:has(#fatigue-graph-plot[hidden]) #fatigue-graph-status {
  display:grid;
  align-content:end;
  min-height:148px;
  margin:16px 0;
  padding:24px;
  color:#355b4b;
  background:linear-gradient(180deg,#eff6f1,#e7f1e9);
  border:1px dashed #b3d1bb;
  border-radius:15px;
  font-weight:650;
}
body.coach-page .fatigue-graph:has(#fatigue-graph-plot[hidden]) #fatigue-graph-status::before {
  content:"";
  display:block;
  width:54px;
  height:46px;
  margin-bottom:15px;
  border-left:2px solid #9dbfa9;
  border-bottom:2px solid #9dbfa9;
  background:repeating-linear-gradient(0deg,transparent 0 13px,#ccdfd0 13px 14px);
  opacity:.8;
}
body.coach-page .fatigue-graph figcaption { display:flex; flex-wrap:wrap; gap:8px 18px; margin:16px 0 0; }
body.coach-page .coach-graph-detail summary { color:#245e4b; cursor:pointer; font-size:.84rem; font-weight:700; }
body.coach-page .coach-graph-detail p { max-width:90ch; margin:9px 0 0; line-height:1.55; }
body.coach-page .fatigue-graph-table-details { padding-top:12px; border-top:1px solid #d8e7db; }
body.coach-page .fatigue-actions { background:#f4f8f4; border-color:#d3e3d8; }
body.coach-page .fatigue-actions h4 { font-size:1.4rem; }
body.coach-page .fatigue-actions ul { counter-reset:coach-action; }
body.coach-page .fatigue-actions li { position:relative; padding-left:57px; counter-increment:coach-action; }
body.coach-page .fatigue-actions li::before {
  content:counter(coach-action,decimal-leading-zero);
  position:absolute;
  top:19px;
  left:17px;
  display:grid;
  place-items:center;
  width:27px;
  height:27px;
  color:#1d6049;
  background:#e0f0e4;
  border-radius:9px;
  font-size:.68rem;
  font-weight:800;
}
body.coach-page .fatigue-actions li .fatigue-action-reason { color:#526e60; }
.fatigue-action-more { margin-top:12px; padding-top:10px; border-top:1px solid var(--line); }
.fatigue-action-more > summary { width:max-content; max-width:100%; color:#2b6954; cursor:pointer; font-size:.82rem; font-weight:720; }
.fatigue-action-more > summary:focus-visible { outline:3px solid #4a8d73; outline-offset:3px; border-radius:3px; }
.fatigue-actions li .fatigue-action-more .fatigue-action-reason { margin:9px 0 0; padding:0; border:0; }

body.coach-page .coach-task-panel .recovery-control-card {
  display:grid;
  grid-template-columns:minmax(200px,.72fr) minmax(0,1.28fr);
  grid-template-areas:"intro fields" "intro action" "intro availability" "result result";
  grid-template-rows:auto auto auto 1fr;
  align-items:start;
  gap:12px 35px;
  min-height:0;
  background:linear-gradient(120deg,#f4f0e6 0 35%,#fffdf8 35% 100%);
}
body.coach-page .recovery-control-card > div:first-child { grid-area:intro; padding-top:12px; }
body.coach-page .recovery-control-card > div:first-child::after {
  content:"↗";
  display:block;
  margin-top:30px;
  color:#a8bdad;
  font-size:3.5rem;
  line-height:1;
  font-weight:300;
}
body.coach-page .coach-task-panel .recovery-fields { grid-area:fields; margin:0; max-width:none; }
body.coach-page .recovery-control-card > #request-recovery { grid-area:action; }
body.coach-page .recovery-control-card > #recovery-availability { grid-area:availability; }
body.coach-page .recovery-control-card > #request-recovery { justify-self:start; }
body.coach-page .recovery-control-card > #recovery-availability { margin:0; }
body.coach-page .recovery-control-card > .recovery-result { grid-area:result; margin-top:5px; }
body.coach-page .recovery-result h3 { font-size:1.45rem; }
body.coach-page .recovery-result p { font-size:.875rem; }
body.coach-page .indoor-activity-note { margin-top:18px; padding-top:15px; border-top:1px solid #d9e6db; }

@media (max-width:1180px) {
  body.coach-page .fatigue-forecast-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.coach-page .fatigue-early-warning { grid-template-columns:1fr; }
  body.coach-page .fatigue-early-controls { max-width:none; justify-content:flex-start; }
}
@media (max-width:900px) {
  body.coach-page .coach-intro { grid-template-columns:1fr; gap:22px; }
  body.coach-page .coach-journey-map { grid-template-columns:repeat(3,minmax(0,1fr)); }
  body.coach-page .coach-journey-map::before { top:38px; bottom:auto; left:20%; right:20%; width:auto; height:1px; }
  body.coach-page .coach-task-panel .recovery-control-card { grid-template-columns:1fr; grid-template-areas:"intro" "fields" "action" "availability" "result"; grid-template-rows:auto; background:linear-gradient(145deg,#f6f1e6,#fffdf8); }
  body.coach-page .recovery-control-card > div:first-child::after { display:none; }
}
@media (max-width:700px) {
  body.coach-page .fatigue-forecast-form { grid-template-columns:1fr; padding:16px; }
  body.coach-page .fatigue-forecast-result { min-height:0; }
  body.coach-page .coach-journey-map li { gap:8px; padding:8px; }
  body.coach-page .coach-journey-map li strong { font-size:.85rem; }
  body.coach-page .coach-journey-map li span { width:21px; height:21px; font-size:.58rem; }
  body.coach-page .fatigue-actions li { padding-left:55px; }
}
@media (max-width:480px) {
  body.coach-page .coach-journey-map { padding:7px; gap:2px; }
  body.coach-page .coach-journey-map li { flex-direction:column; align-items:flex-start; gap:5px; }
  body.coach-page .coach-journey-map::before { display:none; }
  body.coach-page .fatigue-graph { padding:17px; }
  body.coach-page .fatigue-graph:has(#fatigue-graph-plot[hidden]) #fatigue-graph-status { min-height:125px; padding:16px; }
}
@media (prefers-reduced-motion:reduce) {
  body.coach-page .coach-meter > div { transition:none; }
}

/* The analysis source stays outside switchable task panels so camera frames keep
   flowing when Monitor is not the visible panel. It is never shown or saved. */
body.coach-page .coach-analysis-video {
  position:absolute;
  right:0;
  bottom:0;
  width:2px;
  height:2px;
  opacity:.01;
  pointer-events:none;
}
body.coach-page .session-workspace[hidden] { display:none; }
body.coach-page .session-workspace:not([hidden]) {
  position:fixed;
  inset:0;
  z-index:10000;
  display:block;
  width:100vw;
  height:100dvh;
  background:#fff;
}
body.coach-page .session-workspace-page {
  display:block;
  width:100%;
  height:100%;
  border:0;
  background:#fff;
}
body.coach-page .session-workspace-launcher {
  position:absolute;
  left:clamp(12px,2vw,28px);
  bottom:clamp(12px,2vw,28px);
  z-index:1;
  max-width:calc(100vw - 24px);
  min-height:44px;
  padding:10px 16px;
  border:1px solid #c8ded1;
  border-radius:14px;
  background:rgba(250,253,250,.96);
  box-shadow:0 8px 30px rgba(15,52,39,.16);
  backdrop-filter:blur(12px);
  color:#23644e;
  font:700 .82rem system-ui,sans-serif;
  cursor:pointer;
}
body.coach-page .session-workspace-launcher[hidden] { display:none; }
body.coach-page .session-workspace-launcher:hover { background:#e6f2eb; }
body.coach-page .session-workspace-launcher:focus-visible { outline:3px solid #72bc91; outline-offset:3px; }
body.coach-page .floating-monitor-dock { z-index:10010; }
