/* swimrillo v0.1.0-beta.1 | Night-only · course-first navigation · coach reports */
html, html[data-theme="night"] { color-scheme:dark; }
.sr-theme-toggle,[data-theme-toggle]{display:none!important}
:root{--sr-beta5-cyan:#49d5e4;--sr-beta5-orange:#ffb96f;--sr-beta5-lilac:#c7a9ff}
[hidden]{display:none!important}

/* Course selector is first in the Meets flow; filters use the actual race course. */
.sr-meet-topcourse{min-width:0}
.sr-beta-course-switch{display:flex;padding:4px;gap:4px;border:1px solid #42667e;background:#091e33;border-radius:13px;min-height:49px}
.sr-beta-course-switch button{flex:1;min-height:40px;border:0;border-radius:9px;padding:6px 12px;background:transparent;color:#bed8e7;font-weight:850;font-size:17px;cursor:pointer}
.sr-beta-course-switch small{font-weight:600;font-size:11px;opacity:.75;margin-left:3px}
.sr-beta-course-switch button.active{background:#49d5e4;color:#06263c;box-shadow:0 3px 13px #49d5e425}
.sr-beta-course-switch button:focus-visible,.ra-course-switch button:focus-visible,.sr-top3-tabs button:focus-visible{outline:3px solid #b6fff5;outline-offset:2px}
body[data-page="meets"] .meet-explorer-controls{display:grid!important;grid-template-columns:minmax(175px,.95fr) minmax(165px,.95fr) minmax(230px,1.5fr);gap:12px!important;align-items:end}
body[data-page="meets"] .meet-explorer-controls>div{min-width:0}
body[data-page="meets"] .meet-explorer-controls>div:last-child{grid-column:1/-1}
body[data-page="meets"] .meet-explorer-controls .sr-meet-topcourse label{display:block;margin-bottom:4px}

/* Within a selected meet: choose SCM/LCM, then stroke, then the event card. */
.ra-course-first{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:9px;padding:13px 4px 0}
.ra-course-first .ra-kicker,.ra-stroke-step{font-size:11px;letter-spacing:.11em;color:#9cc3d3;font-weight:850}
.ra-course-switch{display:flex;gap:5px;padding:3px;border:1px solid #41657c;border-radius:12px;background:#091e32}
.ra-course-switch button{min-height:40px;border:0;border-radius:9px;padding:8px 15px;font-size:13px;font-weight:850;background:transparent;color:#b8d1df;cursor:pointer}
.ra-course-switch button[aria-pressed="true"]{color:#052b40;background:#49d5e4}
.ra-course-switch button:disabled{opacity:.35;cursor:not-allowed}
.ra-toolbar{justify-content:start;align-items:center;gap:13px;flex-wrap:wrap;margin-top:12px}
.ra-toolbar .ra-filters{flex:1;min-width:230px}
.ra-toolbar .ra-result-count{margin-left:auto}
.ra-filters button:disabled{opacity:.35;cursor:not-allowed}
.ra-cards:empty::before{content:'No results for the selected course and stroke.';display:block;padding:18px;color:#b8d0df}

/* 50m, 100m, 150m checkpoints instead of 0–50m labels. */
.ra-checkpoints li .ra-split-grid>span:first-child strong,.ra-checkpoints li>span:first-child strong{font-size:clamp(19px,2vw,26px)}
.ra-checkpoint-panel .ra-split-head>span:first-child{color:#9bd7db}
.ra-chart-inspector strong{font-size:clamp(18px,1.7vw,23px)}

/* Best-three official race split comparison. Solid winner; two coloured dashed runners-up. */
.sr-top3-tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:10px 0 12px;border:1px solid #47647b;border-radius:12px;padding:4px;background:#0a1d30}
.sr-top3-tabs button{border:0;border-radius:9px;min-height:42px;background:transparent;color:#b4cadc;font-weight:850;font-size:clamp(12px,1.1vw,15px);padding:7px 10px;cursor:pointer}
.sr-top3-tabs button[aria-pressed="true"]{background:#49d5e4;color:#042b41}
.sr-top3-results{min-height:230px}
.sr-top3-head h4{font:850 clamp(20px,2vw,26px)/1.2 Outfit,system-ui,sans-serif;margin:0 0 5px;color:#e8f8ff}
.sr-top3-head p{font-size:12px;line-height:1.5;color:#acc6d6;margin:0 0 10px}
.sr-top3-chart{display:block;width:100%;height:auto;margin:4px 0 12px;overflow:visible}
.sr-top3-chart text{font:11px 'DM Sans',system-ui,sans-serif;fill:#b4cede}
.sr-top3-trace path{stroke-width:3;stroke-linejoin:round;stroke-linecap:round}
.sr-top3-trace circle{stroke:#082338;stroke-width:1.7}
.sr-top3-trace-1 path{stroke:var(--sr-beta5-cyan)}
.sr-top3-trace-1 circle{fill:var(--sr-beta5-cyan)}
.sr-top3-trace-2 path{stroke:var(--sr-beta5-orange);stroke-dasharray:9 6}
.sr-top3-trace-2 circle{fill:var(--sr-beta5-orange)}
.sr-top3-trace-3 path{stroke:var(--sr-beta5-lilac);stroke-dasharray:3 6}
.sr-top3-trace-3 circle{fill:var(--sr-beta5-lilac)}
.sr-top3-legend{display:grid;gap:8px}
.sr-top3-entry{display:grid;grid-template-columns:30px auto minmax(0,1fr);gap:9px;align-items:center;padding:8px;border:1px solid #35576b;border-radius:9px;min-width:0;background:#10283c}
.sr-top3-entry strong{white-space:nowrap;font-size:clamp(13px,1.5vw,17px);font-variant-numeric:tabular-nums;color:#eaf8ff}
.sr-top3-entry small{text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#afc9d8;font-size:11px}
.sr-line-swatch{height:0;border-top:3px solid var(--sr-beta5-cyan)}
.sr-top3-entry-2 .sr-line-swatch{border-color:var(--sr-beta5-orange);border-top-style:dashed}
.sr-top3-entry-3 .sr-line-swatch{border-color:var(--sr-beta5-lilac);border-top-style:dashed}

/* Coach Insights dashboard: the report is a focused fourth tab. */
.sr-insights-tabs{width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.sr-insights-tabs button{min-width:0;white-space:normal;line-height:1.2;font-size:clamp(12px,1.2vw,16px);padding:9px 7px}
.sr-insights-split-teaser{border:1px solid #3b6f7c;border-radius:15px;background:linear-gradient(105deg,#12344a,#0d273b);padding:16px 19px;margin:12px 0;display:flex;justify-content:space-between;align-items:center;gap:20px}
.sr-insights-split-teaser h3{font:850 clamp(21px,2vw,28px)/1.12 Outfit,system-ui,sans-serif;margin:3px 0 4px;color:#e6f8ff}
.sr-insights-split-teaser p{margin:0;color:#b6cbd9;font-size:12px;line-height:1.45;max-width:600px}
.sr-split-teaser-action{display:flex;align-items:flex-end;flex-direction:column;gap:5px;min-width:200px}
.sr-split-teaser-action strong{font:900 clamp(25px,2.8vw,38px)/1 Outfit,system-ui,sans-serif;color:#68f4ea}
.sr-split-teaser-action span{font-size:11px;color:#adcede;text-align:right;line-height:1.35}
.sr-split-teaser-action button,.sr-report-print{min-height:38px;background:#1b5662;color:#d5fffb;border:1px solid #4bcbd0;border-radius:9px;font-weight:850;padding:7px 12px;cursor:pointer;font-size:12px}
.sr-split-teaser-action button:disabled{opacity:.65;cursor:progress}
.sr-report-pane{padding:9px 1px}
.sr-report-controls{display:grid;grid-template-columns:minmax(140px,1fr) minmax(210px,2fr) auto;gap:12px;align-items:end;margin:13px 0}
.sr-report-controls label{display:grid;gap:6px;min-width:0;font-size:12px;color:#aecbd9;font-weight:850}
.sr-report-controls select{width:100%;min-width:0}
.sr-report-print{min-height:43px}
.sr-report-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px 20px;border:1px solid #386b79;border-radius:15px;background:linear-gradient(110deg,#122f47,#124451);margin:12px 0}
.sr-report-heading h3{font:900 clamp(25px,2.7vw,38px)/1.05 Outfit,system-ui,sans-serif;color:#effcff;margin:4px 0}
.sr-report-heading p{color:#bad5e0;font-size:13px;margin:0}
.sr-report-badge{font-size:11px;font-weight:900;letter-spacing:.12em;padding:8px 12px;border:1px solid #579cab;border-radius:99px;color:#aef5eb;white-space:nowrap}
.sr-report-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:12px 0}
.sr-report-metrics>div{padding:14px 15px;border:1px solid #375b74;border-radius:13px;background:#102a40;min-width:0}
.sr-report-metrics small{font-size:11px;color:#b0cbd8;font-weight:750;display:block;margin-bottom:8px}
.sr-report-metrics strong{font:900 clamp(24px,2.4vw,36px)/1 Outfit,system-ui,sans-serif;color:#7eede4}
.sr-report-context{font-size:12px;color:#b5d2df;line-height:1.6;margin:10px 0 18px}
.sr-report-chart,.sr-report-events{border:1px solid #365a72;border-radius:15px;padding:16px 19px;margin:12px 0;background:#102538}
.sr-report-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 13px}
.sr-report-section-heading h4{font:850 clamp(20px,1.9vw,25px)/1 Outfit,system-ui,sans-serif;margin:0}
.sr-report-section-heading small{color:#aec5d5;font-size:12px}
.sr-report-stroke{display:grid;grid-template-columns:minmax(98px,1.2fr) minmax(90px,2fr) 90px;gap:10px;align-items:center;margin:11px 0}
.sr-report-stroke>span{font-size:13px;font-weight:750}
.sr-report-stroke>strong{text-align:right;color:#85f2e7;font-variant-numeric:tabular-nums;font-size:15px}
.sr-report-bar{height:12px;border-radius:99px;background:#1e4659;overflow:hidden}
.sr-report-bar i{display:block;height:100%;border-radius:99px;background:#42d8d7}
.sr-report-bar i.is-slower{background:#ffb96f}
.sr-report-event{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) auto;gap:14px;align-items:center;padding:12px 13px;margin:7px 0;border:1px solid #315169;border-radius:12px;background:#132f44;color:#e6f8ff;text-decoration:none}
.sr-report-event:hover,.sr-report-event:focus-visible{border-color:#49d5e4;background:#1b4053}
.sr-report-event strong{font-size:clamp(15px,1.5vw,19px);display:block}
.sr-report-event em{font-style:normal;color:#9fece4;font-size:11px;margin-left:6px}
.sr-report-event small{color:#a6c4d4;font-size:11px;display:block;margin-top:3px}
.sr-report-time{display:grid;gap:4px;text-align:right;font-variant-numeric:tabular-nums}
.sr-report-time span{font-weight:800;font-size:13px}
.sr-report-time b{font-size:15px;color:#b4cad6}
.sr-report-time b.is-better{color:#83f0de}
.sr-report-time b.is-slower{color:#ffb96f}
.sr-report-event>span:last-child{color:#78e8df;font-size:19px}

@media(max-width:860px){
 body[data-page="meets"] .meet-explorer-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .sr-report-controls{grid-template-columns:1fr 1.3fr}
 .sr-report-print{grid-column:1/-1;justify-self:start}
}
@media(max-width:580px){
 body[data-page="meets"] .meet-explorer-controls{grid-template-columns:1fr 1fr;gap:9px!important}
 body[data-page="meets"] .meet-explorer-controls>div:nth-child(2){grid-column:2}
 body[data-page="meets"] .meet-explorer-controls>div:nth-child(3){grid-column:1/-1}
 .sr-beta-course-switch button{font-size:13px;padding:5px}
 .sr-beta-course-switch small{font-size:10px}
 .sr-insights-tabs button{min-height:44px;font-size:12px;padding:7px 3px}
 .sr-insights-split-teaser{align-items:stretch;flex-direction:column;gap:12px;padding:14px}
 .sr-split-teaser-action{align-items:stretch;min-width:0;flex-direction:row;flex-wrap:wrap;justify-content:space-between;gap:8px}
 .sr-split-teaser-action span{flex:1 1 100%;order:3;text-align:left}
 .sr-report-controls{grid-template-columns:1fr;gap:8px}
 .sr-report-print{grid-column:auto;justify-self:stretch}
 .sr-report-heading{padding:15px;gap:9px}
 .sr-report-badge{font-size:9px;padding:6px}
 .sr-report-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 .sr-report-event{grid-template-columns:minmax(0,1fr) auto;gap:7px;padding:11px}
 .sr-report-event .sr-report-time{grid-column:1;grid-row:2;text-align:left}
 .sr-report-event>span:last-child{grid-column:2;grid-row:1/span 2}
 .sr-top3-entry{grid-template-columns:27px auto;gap:5px}
 .sr-top3-entry small{grid-column:2;text-align:left}
 .ra-course-first{align-items:stretch;flex-direction:column;gap:6px}
 .ra-course-switch{width:100%}
 .ra-course-switch button{flex:1;min-width:0}
 .ra-stroke-step{flex:1 1 100%}
 .ra-toolbar .ra-filters{min-width:0}
 .ra-toolbar .ra-result-count{margin:0}
}
@media print{
 body[data-page="insights"]{color:#071e31;background:white!important}
 body[data-page="insights"] :is(.topbar,.foot,.pagehead,.sr-insights-toolbar,.sr-insights-tabs,.sr-insights-status,.sr-report-controls,.sr-insights-help){display:none!important}
 body[data-page="insights"] .sr-insights-pane:not([data-insights-pane="report"]){display:none!important}
 body[data-page="insights"] .sr-report-pane{display:block!important}
 body[data-page="insights"] :is(.sr-report-heading,.sr-report-metrics>div,.sr-report-chart,.sr-report-events,.sr-report-event){color:#082133!important;background:white!important;border-color:#b3cbd5!important}
 body[data-page="insights"] :is(.sr-report-heading h3,.sr-report-event strong,.sr-report-metrics strong){color:#082133!important}
 body[data-page="insights"] :is(.sr-report-event small,.sr-report-heading p,.sr-report-context,.sr-report-section-heading small){color:#37566a!important}
 .sr-report-event{break-inside:avoid}
}
