/* "Console" theme: a clean analytics-console look. Navy sidebar with a bright blue active item, a light blue-grey canvas,
   white rounded cards on soft shadows, Plus Jakarta Sans, big bold figures, royal blue as the primary. Light by default;
   the dark mode keeps the same structure on deep navy. */
:root {
  color-scheme: dark;
  /* load-focus bands: low aerobic / high aerobic / anaerobic, three clearly different hues */
  --focus-low: var(--s1); --focus-high: var(--s2); --focus-ana: var(--s4);
  --bg: #0b1020; --rail: #0a0f1f; --surface: #131a2e; --surface-2: #1a2238;
  --ink: #e8ecf7; --ink-2: #b7c0d8; --muted: #8c96b2;
  --grid: #1e2740; --axis: #2d3754; --border: #242e48; --wash: rgba(110, 139, 255, 0.08);
  --accent: #6e8bff; --accent-ink: #0b1020; --accent-tint: rgba(110, 139, 255, 0.16); --accent-text: #93a8ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.35), 0 14px 32px rgba(0, 0, 0, 0.4);
  /* categorical (validated both modes: CVD ΔE light 9.9 / dark 10.8, all checks pass) */
  --s1: #5b7bff; --s2: #c98415; --s3: #14a897; --s4: #9b74f7; --s5: #e0508f; --s6: #5e9a22; --s7: #2b9bdb; --s8: #e5525f;
  --bar-muted: #2d3754;
  --seq-1: #22336e; --seq-2: #2f4aa8; --seq-3: #5b7bff; --seq-4: #a9b9ff;
  --heat-0: #1a2238; --heat-1: #22336e; --heat-2: #2f4aa8; --heat-3: #4566e8; --heat-4: #7c95ff;
  /* HR zones keep the grey / blue / green / amber / red convention */
  --zone-1: #8a96ad; --zone-2: #4f8ff7; --zone-3: #1fbf87; --zone-4: #f2a422; --zone-5: #f05a5a;
  --str-1: #2e2a63; --str-2: #4a3f9c; --str-3: #7a6bd8;
  --pmc-ctl: #6e8bff; --pmc-ctl-area: rgba(110, 139, 255, 0.16); --pmc-atl: #e0508f; --pmc-tsb: #e89a1f; --pmc-tss: #2bc4b0; --pmc-if: #a98bfa;
  --pmc-tsb-text: #e89a1f; --pmc-if-text: #b9a1fb;
  --good: #22b35e; --good-text: #4cd38a;
  --warn: #e5a100; --warn-text: #f2c14e;
  --serious: #e8590c; --serious-text: #ff8a4c;
  --crit: #e5404f; --crit-text: #ff7b86;
  --banner-bg: #131a2e; --banner-ink: #e8ecf7; --banner-muted: #8c96b2; --banner-line: #242e48;
  --banner-h: 64px;
  --rail-w: 204px;
  --radius: 12px;
  --f-display: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;  /* figures use tabular-nums */
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fb; --rail: #0e1630; --surface: #ffffff; --surface-2: #f1f4fa;
  --ink: #0f172a; --ink-2: #334155; --muted: #5b6478;
  --grid: #edf1f7; --axis: #d5dce8; --border: #e3e8f1; --wash: rgba(59, 91, 253, 0.05);
  --accent: #3b5bfd; --accent-ink: #ffffff; --accent-tint: #eef2ff; --accent-text: #2f4ae0;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 6px 18px rgba(16, 24, 40, 0.06);
  --shadow-hover: 0 2px 6px rgba(16, 24, 40, 0.07), 0 16px 34px rgba(59, 91, 253, 0.13);
  --s1: #3b5bfd; --s2: #c97800; --s3: #0e9f8f; --s4: #8b5cf6; --s5: #db2777; --s6: #5b9e1a; --s7: #0284c7; --s8: #dc3545;
  --bar-muted: #d5dce8;
  --seq-1: #c3ceff; --seq-2: #8ea2ff; --seq-3: #3b5bfd; --seq-4: #2a45d8;
  --heat-0: #eef2ff; --heat-1: #c3ceff; --heat-2: #8ea2ff; --heat-3: #5b7bff; --heat-4: #2a45d8;
  --zone-1: #94a3b8; --zone-2: #3b82f6; --zone-3: #10b981; --zone-4: #f59e0b; --zone-5: #ef4444;
  --str-1: #e6e1fb; --str-2: #c4b8f4; --str-3: #8b7ae0;
  --pmc-ctl: #3b5bfd; --pmc-ctl-area: rgba(59, 91, 253, 0.12); --pmc-atl: #db2777; --pmc-tsb: #c97800; --pmc-tss: #0b7f72; --pmc-if: #8b5cf6;
  --pmc-tsb-text: #8a5300; --pmc-if-text: #6d3fe0;
  --good: #12a150; --good-text: #0b7a3b;
  --warn: #e5a100; --warn-text: #8a5a00;
  --serious: #e8590c; --serious-text: #b5440a;
  --crit: #dc3545; --crit-text: #b42330;
  --banner-bg: #ffffff; --banner-ink: #0f172a; --banner-muted: #5b6478; --banner-line: #e3e8f1;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; font: 14.5px/1.5 var(--f-body); }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; letter-spacing: 0.01em; text-wrap: balance; line-height: 1.1; }
h1 { font-size: clamp(28px, calc(3.4vw / var(--vz, 1)), 38px); font-weight: 700; text-transform: uppercase; }
h2 { font-size: 22px; font-weight: 600; }
h3 { font-size: 17px; font-weight: 600; }
p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--s1); outline-offset: 2px; }
.mono, .num, td.num, .kv dd { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
/* metric titles: 10px uppercase, wide tracking, semibold, gray-400 */
.micro { font: 600 10px/1.3 var(--f-body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* telemetry banner */
.telemetry {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--banner-h);
  display: flex;
  align-items: stretch;
  color: var(--banner-ink);
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--banner-bg);
  box-shadow: none;
  border-bottom: 0;
}
.telemetry::-webkit-scrollbar { display: none; }
.telemetry .brand { color: var(--banner-ink); width: var(--rail-w); flex: none; border-right: 1px solid var(--banner-line); padding: 0 22px; overflow: hidden; white-space: nowrap; }
.telemetry .brand .lbl { text-transform: none; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }  /* MyTrainingDesk in its own case, one
   colour: in capitals the one long word read heavy (Mathis, 21 Oct) */
.t-data { display: flex; align-items: stretch; flex: 1; min-width: 0; }
.t-seg { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 20px; border-right: 1px solid var(--banner-line); flex: none; }
.t-seg .micro { color: var(--banner-muted); }
button.t-seg { font: inherit; color: inherit; background: none; border: 0; border-right: 1px solid var(--banner-line); text-align: left; cursor: pointer; align-items: flex-start; position: relative; }
button.t-seg:hover { background: rgb(255 255 255 / 0.04); }
button.t-seg[aria-expanded="true"] { background: rgb(255 255 255 / 0.07); }
button.t-seg[aria-expanded="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }
button.t-seg:focus-visible { outline-offset: -3px; }
.tpop { position: fixed; top: calc(var(--banner-h) + 6px); z-index: 60; width: min(360px, calc(calc(100vw / var(--vz, 1)) - 16px)); max-height: calc(calc(100vh / var(--vz, 1)) - var(--banner-h) - 20px); overflow-y: auto;
  background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 12px 32px rgb(0 0 0 / 0.28);
  padding: 16px 18px 14px; display: grid; gap: 10px; animation: tpop-in 120ms ease-out; }
@keyframes tpop-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .tpop { animation: none; } }
.tpop h4 { margin: 0; padding-right: 24px; font: 600 19px/1.15 var(--f-display); }
.tpop p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.tpop .pp-big { font: 600 30px/1 var(--f-display); color: var(--ink); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tpop .pp-big small { font: 400 13px var(--f-body); color: var(--muted); }
.tpop .pp-now { color: var(--ink); } .tpop .pp-now b { font-weight: 600; }
.tpop .pp-why { font-size: 12.5px; color: var(--muted); }
.tpop .pp-facts { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tpop .pp-facts li { font-size: 12.5px; padding: 2px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--ink-2); }
.tpop .pp-link { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; justify-self: start; }
.tpop .pp-link:hover { text-decoration: underline; }
.tpop .pp-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.tpop .pp-x:hover { background: var(--wash); color: var(--ink); }
.pp-chart { width: 100%; height: auto; display: block; overflow: visible; }
.pp-chart text { font-family: var(--f-body); font-size: 10.5px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.pp-chart .pp-grid { stroke: var(--grid); stroke-width: 1; }
.pp-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.pp-scale span { font-size: 11px; text-align: center; padding: 14px 2px 0; color: var(--muted); position: relative; line-height: 1.2; }
.pp-scale span::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px; border-radius: 2px; background: var(--c); opacity: .35; }
.pp-scale span.on { color: var(--ink); font-weight: 600; } .pp-scale span.on::before { opacity: 1; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--c); }
.t-val { font: 600 19px/1.1 var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
.t-val small { font: 500 11px var(--f-mono); color: var(--banner-muted); margin-left: 4px; letter-spacing: 0; }
.t-sub { font: 500 10.5px var(--f-mono); color: var(--banner-muted); white-space: nowrap; }
.t-race .t-val { font-size: 21px; }
.t-status { justify-content: center; }
.t-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 600 11px var(--f-body);
  padding: 5px 10px;
  border: 1px solid var(--banner-line);
  white-space: nowrap;
  border-radius: 999px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  background: var(--accent-tint);
  border-color: transparent;
  color: var(--accent-text);
}
.t-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--banner-muted); }
.t-pill.good i { background: var(--good); } .t-pill.warn i { background: var(--warn); } .t-pill.crit i { background: var(--crit); }
.t-sync { margin-left: auto; border-right: 0; border-left: 1px solid var(--banner-line); align-items: flex-end; }
.t-err { padding: 0 20px; display: flex; align-items: center; color: #f87171; font-size: 13px; }

/* shell */
.shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: calc(calc(100vh / var(--vz, 1)) - var(--banner-h)); }
.side { background: var(--rail); border-right: 1px solid var(--border); padding: 18px 12px; display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: var(--banner-h); height: calc(calc(100vh / var(--vz, 1)) - var(--banner-h)); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 700; font-size: 19px;
  text-transform: uppercase; letter-spacing: 0.06em; }
.brand-mark { background: linear-gradient(135deg, #8ea2ff, #3b5bfd); clip-path: none; border-radius: 7px; width: 26px; height: 26px; }
.side nav { display: grid; gap: 4px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); text-decoration: none; color: var(--ink-2);
  font-weight: 500; border: 1px solid transparent; }
.side nav a .n { font: 600 11px var(--f-mono); width: 20px; height: 20px; border-radius: 4px; display: inline-grid; place-items: center;
  border: 1px solid var(--border); color: var(--muted); flex: none; }
.side nav a:hover { background: var(--wash); color: var(--ink); }
.side nav a[aria-current="page"] { background: var(--surface); color: var(--ink); border-color: var(--border); }
.side nav a[aria-current="page"] .n { border-color: var(--accent); background: rgba(255, 255, 255, 0.22); color: #fff; }
.side-foot { margin-top: auto; display: grid; gap: 10px; font-size: 13px; padding-top: 14px; border-top: 1px solid var(--border); }
.athlete { padding: 0 6px; }
.athlete strong { display: block; font-size: 14px; }
.athlete span { color: var(--muted); font-size: 12px; }
.side-actions { display: flex; gap: 6px; }
/* the way back to the website (25 Oct 2026): a quiet line under the date, not a third button; a tile when the rail is folded */
.site-link { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; color: var(--muted); font-size: 12.5px; font-weight: 500; text-decoration: none; width: fit-content; }
.site-link:hover, .site-link:focus-visible { color: var(--ink); outline: none; }
.site-link .ico { font-size: 12px; line-height: 1; order: 2; opacity: .8; }  /* the arrow after the words: a way out, not a caption */
.site-link .lbl { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color .15s; }
.site-link:hover .lbl { text-decoration-color: currentColor; }
html.rail-collapsed .site-link { width: 38px; height: 34px; padding: 0; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius); }
html.rail-collapsed .site-link:hover { border-color: var(--muted); }
html.rail-collapsed .site-link .ico { display: inline; font-size: 15px; line-height: 1; }
.asof { color: var(--muted); padding: 0 6px; font: 500 11px var(--f-mono); }
.btn { border: 1px solid var(--border); background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 6px 12px; cursor: pointer; font-weight: 500; font-size: 13px; }
.btn:hover { border-color: var(--muted); }
.btn.ghost { background: transparent; }

.main { min-width: 0; }
main { padding: 26px 28px 64px; display: grid; gap: 24px; max-width: 1360px; outline: none; }

/* page header */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; }
.page-head .eyebrow { margin-bottom: 4px; }
.eyebrow { font: 600 10px/1.3 var(--f-body); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.lede { color: var(--muted); max-width: 70ch; margin-top: 6px; font-size: 14px; }
section { display: grid; gap: 12px; }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 20px; }
.sec-head p { color: var(--muted); font-size: 13px; }

/* controls */
.seg { display: inline-flex; overflow: hidden; flex-wrap: wrap; border: 0; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; border-left: 1px solid var(--border); background: transparent; padding: 6px 12px; cursor: pointer; color: var(--muted);
  font: 600 11px var(--f-body); text-transform: uppercase; letter-spacing: 0.06em; }
.seg button:first-child { border-left: 0; }
.seg button:hover { color: var(--ink); background: var(--wash); }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.controls label { font-size: 13px; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
input[type="date"], input[type="month"], select { font: 500 13px var(--f-mono); padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font: 500 13px var(--f-body); color: var(--ink-2); background: transparent; border: 1px solid var(--border); border-radius: 999px;
  padding: 3px 11px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 4px; align-content: start; }
.tile .label { font: 600 10px/1.3 var(--f-body); color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 12px; }
.tile .value { font: 600 24px/1.15 var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.tile .value small { font: 500 12px var(--f-mono); color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.tile .note { font-size: 12px; color: var(--muted); }

/* telemetry ribbon: one bordered block, 4 columns, 1px dividers */
.ribbon { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ribbon .cell { background: var(--surface); padding: 14px 18px 13px; display: grid; gap: 5px; align-content: start; min-width: 0; }
.ribbon .cell[title] { cursor: help; }
.ribbon .v { font: 600 26px/1.1 var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; white-space: nowrap; }
.ribbon .v small { font: 500 12px var(--f-mono); color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.ribbon .sub { font: 500 11px/1.3 var(--f-mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ribbon .sub b { color: var(--ink-2); font-weight: 600; }
.ribbon .sub.alert b { color: var(--crit-text); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: grid; gap: 10px; min-width: 0; align-content: start; padding: 16px 18px 14px; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; align-items: center; border-bottom: 0; padding-bottom: 0; }
.card-head h2, .card-head h3 { margin: 0; font: 600 11px/1.4 var(--f-body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); }
.card-head p { font-size: 12px; color: var(--muted); }
.card-head .legend { font-size: 12px; }
.split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; }
.stats { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.stats div { display: grid; gap: 1px; }
.stats b { font: 600 15px var(--f-mono); font-variant-numeric: tabular-nums; }
.stats b small { color: var(--muted); font-weight: 500; font-size: 11px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* status */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 1px 8px 1px 6px; border-radius: 999px;
  background: var(--wash); border: 1px solid var(--border); color: var(--ink-2); white-space: nowrap; }
.chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.st-good { color: var(--good-text); } .st-good i { background: var(--good); }
.st-warn { color: var(--warn-text); } .st-warn i { background: var(--warn); }
.st-crit { color: var(--crit-text); } .st-crit i { background: var(--crit); }
.st-off { color: var(--warn-text); } .st-off i { background: var(--warn); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 7px; flex: none; }

/* legends & charts */
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); font-size: 12.5px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 12px; height: 12px; border-radius: 3px; }
.legend .ln { width: 14px; height: 3px; border-radius: 2px; }
.legend .tk { width: 14px; height: 0; border-top: 2px solid var(--ink); }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { font-family: var(--f-mono); font-size: 10.5px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .endlabel { fill: var(--ink); font-weight: 600; font-size: 11.5px; }
.chart .axlabel { font-family: var(--f-body); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.chart .inklabel { fill: var(--ink-2); font-size: 11.5px; }
.tip { position: absolute; pointer-events: none; background: var(--surface-2); color: var(--ink); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 10px; font-size: 12.5px; line-height: 1.45; min-width: 150px; z-index: 5; font-variant-numeric: tabular-nums; }
.tip b { display: block; font-weight: 600; margin-bottom: 2px; }
.tip .row { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.tip strong { font-family: var(--f-mono); font-weight: 600; }
.tip .row span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.tip .k { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card .table-wrap { border: 0; border-radius: 0; margin: 0 -16px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--grid); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--wash); }
tbody tr.link { cursor: pointer; }
th { font: 600 10px/1.3 var(--f-body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); background: var(--surface); border-bottom-color: var(--border); }
td.num { font-size: 13px; }
th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
th button::after { content: "↕"; color: var(--axis); font-size: 11px; }
th button[data-dir="asc"]::after { content: "↑"; color: var(--ink-2); }
th button[data-dir="desc"]::after { content: "↓"; color: var(--ink-2); }
th button:focus-visible { outline: 2px solid var(--s1); }
.num { text-align: right; }
th.num button { flex-direction: row-reverse; }
td.wrap { white-space: normal; min-width: 200px; max-width: 340px; }
.dim { color: var(--muted); }

/* states */
.loading { color: var(--muted); display: flex; align-items: center; gap: 10px; padding: 18px 0; }
.loading::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--axis); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { color: var(--ink-2); padding: 14px 0; display: grid; gap: 2px; }
.empty strong { color: var(--ink); font-weight: 600; }
.empty span { color: var(--muted); font-size: 13.5px; }
.error { border: 1px solid var(--border); border-left: 3px solid var(--crit); background: var(--surface); border-radius: var(--radius); padding: 10px 14px; display: grid; gap: 2px; }
.error strong { color: var(--crit-text); }
.error span { color: var(--ink-2); font-size: 13.5px; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; display: grid; }
.list li { display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--grid); }
.list li:first-child { border-top: 0; }
.when { font-family: var(--f-display); font-weight: 600; font-size: 15px; line-height: 1.1; text-transform: uppercase; }
.when small { display: block; font-family: var(--f-body); font-size: 12px; color: var(--muted); text-transform: none; font-weight: 500; }
.what small { display: block; color: var(--muted); font-size: 13px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 14px; margin: 0; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.back { font-size: 13px; color: var(--ink-2); text-decoration: none; }
.back:hover { color: var(--ink); }
.prose { max-width: 70ch; white-space: pre-wrap; color: var(--ink-2); }

/* calendar */
.cal { display: grid; overflow: hidden; }
.cal .day { background: var(--surface); display: flex; flex-direction: column; min-width: 0; }
.cal .day.out { background: var(--bg); }
.cal .day.out .dn { color: var(--muted); }
.cal .day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal .dn { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal .wk { background: var(--surface); padding: 6px 8px; font-size: 12px; color: var(--ink-2); display: grid; align-content: start; gap: 2px; font-variant-numeric: tabular-nums; }
.cal .wk b { color: var(--ink); font-size: 14px; }
.pill { display: block; text-decoration: none; font-size: 12px; line-height: 1.3; padding: 3px 6px; border-radius: 4px; border-left: 3px solid var(--c, var(--muted));
  background: var(--wash); overflow: hidden; }
.pill.planned { background: transparent; box-shadow: inset 0 0 0 1px var(--border); border-left-style: dashed; }
.pill .t { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.pill .m { color: var(--muted); font-variant-numeric: tabular-nums; }
.pill:hover { background: var(--grid); }
.pill.event { border-left-color: var(--ink); font-weight: 600; }

/* strength */
.sets { display: flex; flex-wrap: wrap; gap: 6px; }
.set { font-size: 12.5px; border: 1px solid var(--border); border-radius: 5px; padding: 3px 8px; font-variant-numeric: tabular-nums; }
.set.done { background: var(--wash); }

@media (max-width: 1100px) {

  .split { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: column; gap: 12px; padding: 14px 16px; }
  .side nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-foot { margin-top: 0; }
  .telemetry { position: static; }
  .telemetry .brand { width: auto; }
  .ribbon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main { padding: 20px 16px 48px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  .cal { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cal .wk, .cal .hd.wkh { display: none; }
  .cal .day { min-height: 70px; padding: 3px; }
  .pill .m { display: none; }
}
@media (prefers-reduced-motion: reduce) { .loading::before { animation: none; } }

/* ask coach */
.c-log { display: grid; gap: 18px; }
.turn.user { display: flex; justify-content: flex-end; }
.turn.assistant { display: grid; gap: 8px; }
.md { line-height: 1.6; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol { margin: 0 0 10px; }
.md h1, .md h2, .md h3, .md h4 { font-family: var(--f-display); text-transform: none; font-size: 19px; margin: 14px 0 6px; }
.md code { font-size: 13px; background: var(--wash); padding: 1px 5px; border-radius: 4px; }
.md pre { background: var(--wash); padding: 10px; border-radius: 6px; overflow-x: auto; }
.md-table { overflow-x: auto; margin: 0 0 10px; }
.md table { font-size: 14px; width: auto; min-width: 50%; }
.md th, .md td { border: 1px solid var(--grid); padding: 5px 10px; white-space: normal; }
.md th { background: var(--wash); }
.tool-row { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--muted); padding: 1px 0; min-width: 0; }
.tool-row .ti { width: 14px; text-align: center; flex: none; color: var(--good-text); }
.tool-row.failed .ti { color: var(--crit-text); }
.tool-row .tn { color: var(--ink-2); font-weight: 500; flex: none; }
.tool-row .ta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* a plan or race the coach asked to delete: the athlete's Delete / Keep it (coachapi.CONFIRM) */
.c-confirm { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin: 10px 0; padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--crit) 35%, var(--border)); border-radius: var(--radius); background: var(--surface); }
.c-confirm .cf-what { font-weight: 500; color: var(--ink); }
.c-confirm .cf-act { display: flex; gap: 8px; }
.c-confirm .cf-done { font-size: 13px; color: var(--muted); }
.c-confirm.deleted .cf-done, .c-confirm.failed .cf-done { color: var(--crit-text); }
.c-confirm:not(.waiting):not(.sending) { border-color: var(--border); }
.tool-row.write .tn::after { content: " · change"; color: var(--warn-text); font-weight: 600; }
.spin { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--axis); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
.working { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.suggest button { padding: 5px 12px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }

/* workouts enhancements */
.delta { font-weight: 600; color: var(--ink-2); }
.fine { font-size: 12.5px; }
.heat-foot { display: flex; justify-content: flex-end; }
.heat-legend { display: flex; align-items: flex-end; gap: 6px; }
.heat-legend .end { font: 600 10px var(--f-body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding-bottom: 14px; }
.heat-legend .bin { display: grid; justify-items: center; gap: 3px; }
.heat-legend .bin i { width: 14px; height: 14px; border-radius: 3px; display: block; }
.heat-legend .bin span { font: 500 9.5px var(--f-mono); color: var(--muted); white-space: nowrap; }
input[type="search"] { font: inherit; font-size: 13px; padding: 5px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--ink); min-width: 220px; }

/* page bodies rendered after load get the same rhythm as main */
main > div[id$="-body"], main div[id$="-body"] { display: grid; gap: 20px; align-content: start; }
.card-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card-tools .chips button { font-size: 12px; padding: 3px 10px; }
.card-tools .chips button[aria-pressed="false"] { opacity: 0.55; }
.card-tools .chips button[aria-pressed="false"] .dot { background: transparent !important; box-shadow: inset 0 0 0 1.5px var(--muted); }
.card-tools .chips button[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); border-color: var(--muted); }

/* training page */
.jump { position: sticky; top: var(--banner-h); z-index: 12; display: flex; flex-wrap: wrap; gap: 2px; padding-block: 8px; background: var(--bg);
  border-bottom: 1px solid var(--border); margin-top: -8px; }
.jump button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 5px 10px; border-radius: var(--radius);
  font: 600 10.5px var(--f-body); text-transform: uppercase; letter-spacing: 0.08em; }
.jump button:hover { color: var(--ink); background: var(--wash); }
[id^="sec-"] { scroll-margin-top: calc(var(--banner-h) + 52px); }
main > .sec-head { margin-top: 10px; margin-bottom: -10px; }
main > .sec-head h2 { font-size: 20px; }
.signals { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; }
.signal { background: var(--surface); display: grid; gap: 6px; align-content: start; grid-template-rows: auto auto 14px auto; padding: 16px 18px 18px; }
.signal .micro { display: inline-flex; align-items: center; gap: 6px; }
.signal .micro i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.signal b { font: 600 28px/1 var(--f-display); font-variant-numeric: tabular-nums; color: var(--ink); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.signal b small { font: 500 13px/1.2 var(--f-body); color: var(--muted); }
.signal > span:last-child { font-size: 12px; color: var(--muted); line-height: 1.4; }
.signal.good .micro i { background: var(--good); } .signal.warn .micro i { background: var(--warn); } .signal.crit .micro i { background: var(--crit); }
/* signal gauges: one 6px instrument strip per card, ticks and needles stand 14px tall */
.sg { position: relative; align-self: center; }

.rv-kpis .signal { grid-template-rows: auto auto 22px auto; }
.sg-spark { display: block; width: 100%; height: 22px; overflow: visible; }
.sg-spark polyline { fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sg-spark path { stroke: var(--ink); stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sg-spark .base { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }

.sg-weeks { display: flex; gap: 3px; height: 6px; }
.sg-weeks span { flex: 1; border-radius: 2px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--grid); }
.sg-weeks span.done { background: var(--ink-2); box-shadow: none; opacity: 0.45; }
.sg-weeks span.now { background: var(--accent); box-shadow: none; }
.card .tbl .table-wrap { margin: 0; border: 0; }
.card .tbl td, .card .tbl th { padding: 6px 8px; }
@media (max-width: 820px) {
  .jump { position: static; }
    }

.legend .dt { width: 9px; height: 9px; border-radius: 50%; }
.legend .rg { width: 9px; height: 9px; border-radius: 50%; box-sizing: border-box; }
.legend .bar { width: 5px; height: 12px; border-radius: 1px; opacity: 0.55; }
.tip-acts { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--border); display: grid; gap: 1px; }
.tip-acts .row span:first-child { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* collapsible rail */
.btn .ico, .rail-toggle .ico { display: none; }
.rail-toggle { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font: 600 10.5px var(--f-body); text-transform: uppercase; letter-spacing: 0.08em; padding: 6px; border-radius: var(--radius); }
.rail-toggle .ico { display: inline-grid; place-items: center; width: 20px; font-size: 14px; letter-spacing: 0; }
.rail-toggle:hover { color: var(--ink); background: var(--wash); }
#refresh.busy .ico { animation: spin 0.8s linear infinite; }
html.rail-collapsed { --rail-w: 64px; }
html.rail-collapsed .side { padding: 18px 10px; align-items: center; }
html.rail-collapsed .lbl, html.rail-collapsed .athlete, html.rail-collapsed .asof { display: none; }
@media (min-width: 761px) { html.rail-collapsed .telemetry .brand { padding: 0; justify-content: center; } }  /* phones keep their logo where it is */
html.rail-collapsed .side nav a { justify-content: center; padding: 8px 0; width: 42px; }
html.rail-collapsed .side nav a .n { width: 24px; height: 24px; font-size: 12px; }
html.rail-collapsed .side-foot { justify-items: center; border-top: 0; }
html.rail-collapsed .side-actions { flex-direction: column; }
html.rail-collapsed .btn .ico { display: inline; font-size: 15px; line-height: 1; }
html.rail-collapsed .side-actions .btn { width: 38px; height: 34px; padding: 0; display: grid; place-items: center; }
.shell, .telemetry .brand { transition: grid-template-columns 160ms ease, width 160ms ease; }
@media (prefers-reduced-motion: reduce) { .shell, .telemetry .brand { transition: none; } #refresh.busy .ico { animation: none; } }
@media (max-width: 820px) {
  .rail-toggle { display: none; }
  html.rail-collapsed { --rail-w: 204px; }
  html.rail-collapsed .lbl, html.rail-collapsed .athlete, html.rail-collapsed .asof { display: revert; }
}

/* session page */

.rep-stats { align-content: start; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; padding-top: 6px; }
tr.rep-row td:first-child { font-weight: 600; }
tr.dim-row td { color: var(--muted); background: var(--wash); }

/* calendar (TrainingPeaks-style cards) */
.cal-scroll { overflow-x: auto; }
.cal { grid-template-columns: repeat(7, minmax(128px, 1fr)) minmax(210px, 1.35fr); min-width: 1100px; background: var(--grid); border: 0; border-radius: 16px; box-shadow: var(--shadow); gap: 1px; }
.cal .hd { background: var(--surface); font: 600 12px var(--f-body); text-transform: none; letter-spacing: 0; color: var(--muted); padding: 12px 12px 10px; }
.cal .day { min-height: 150px; padding: 6px; gap: 6px; }
.cal .dn { font: 600 12px var(--f-mono); color: var(--ink-2); padding: 2px 4px; border-radius: 4px; align-self: flex-start; }
.cal .day .dn.is-today { background: var(--accent); color: var(--accent-ink); }
.cal .day.out { background: var(--bg); }
.cal .day.out .wcard, .cal .day.out .mcard { opacity: 0.7; }
.s-ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wcard { display: grid; text-decoration: none; border-top: 4px solid var(--axis); font-size: 12px; line-height: 1.3; }
.wcard:hover { border-color: var(--muted); }
.wcard.wc-good { border-top-color: var(--good); background: color-mix(in srgb, var(--good) 7%, var(--surface)); }
.wcard.wc-warn { border-top-color: var(--warn); background: color-mix(in srgb, var(--warn) 7%, var(--surface)); }
.wcard.wc-crit { border-top-color: var(--crit); background: color-mix(in srgb, var(--crit) 6%, var(--surface)); }
.wcard.wc-off { border-top-color: var(--warn); background: color-mix(in srgb, var(--warn) 7%, var(--surface)); }
.wcard.wc-planned { border-style: dashed; border-top-style: solid; border-top-color: var(--border); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); border-left-style: solid; border-top: 0; }
.w-top { display: flex; gap: 6px; align-items: flex-start; }
.w-title { font-weight: 600; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; }
.w-lines { font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; gap: 2px 8px; font-family: var(--f-body); }
.w-lines b { font-weight: 600; font-size: 12px; }
.w-lines b small { font-weight: 500; color: var(--muted); font-size: 10.5px; }
.w-lines .ok { color: var(--good-text); }
.w-lines .p { color: var(--muted); font-size: 10.5px; margin-top: 2px; flex-basis: 100%; }
.w-lines span:not(.p):not(.ok) { color: var(--muted); font-size: 11px; }
.mcard { border-radius: 5px; font-size: 11.5px; display: flex; flex-wrap: wrap; gap: 4px; border: 0; padding: 0; background: none; }

.ecard { display: grid; gap: 1px; padding: 5px 8px; font-size: 12px; border: 0; border-left: 3px solid var(--ink); border-radius: 10px; background: color-mix(in srgb, var(--ink) 6%, var(--surface)); }
.ecard span { color: var(--muted); font-size: 11px; }
.cal .wk { padding: 10px 12px; gap: 10px; align-content: start; }

.cal-legend .bar { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.cal-legend .bar.outline { height: 8px; border: 1px dashed var(--muted); background: transparent; }
@media (max-width: 820px) {
  .cal { min-width: 980px; grid-template-columns: repeat(7, minmax(120px, 1fr)) 200px; }
  .cal .wk, .cal .hd.wkh { display: grid; }
}
.wcard { color: var(--ink); border: 0; border-left: 3px solid var(--sc, var(--axis)); border-radius: 10px; padding: 7px 8px 8px 9px; gap: 4px; background: color-mix(in srgb, var(--sc, var(--muted)) 9%, var(--surface)); box-shadow: none; }

/* ask coach: full-height chat app (conversations | chat) */
main:has(.coach-app) { padding: 12px 16px; max-width: none; }
.coach-app { display: grid; grid-template-columns: 240px minmax(0, 1fr); height: calc(calc(100vh / var(--vz, 1)) - var(--banner-h) - 24px); min-height: 480px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }

.c-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.c-empty { padding: 8px; font-size: 12.5px; line-height: 1.4; }

.c-chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.c-chat-head { padding: 10px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.c-head-text { flex: 1; min-width: 0; }

.coach-app.list-hidden { grid-template-columns: minmax(0, 1fr); }

.nav-sub a.all { color: var(--accent); font-weight: 500; margin-top: 2px; }
.nav-sub a.all:hover { text-decoration: underline; }
.c-chat-head h2 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70ch; }
.c-chat-head p { font-size: 12px; margin-top: 1px; }
.c-scroll { flex: 1; overflow-y: auto; min-height: 0; }
.c-inner { max-width: 1400px; margin: 0 auto; padding: 0 28px; }
.c-scroll .c-inner { padding-block: 20px 12px; }
.c-log { display: grid; gap: 22px; }
.turn.assistant { display: grid; gap: 10px; }
.turn.assistant .who { font: 600 10px var(--f-body); text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.turn.user .bubble { background: var(--surface-2); color: var(--ink); border: 1px solid var(--border); border-radius: 14px 14px 4px 14px; padding: 9px 14px; max-width: 70%; }
.activity { border: 1px solid var(--border); border-radius: var(--radius); background: var(--wash); font-size: 13px; }
.activity summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 7px 10px; color: var(--ink-2); }
.activity summary::-webkit-details-marker { display: none; }
.activity summary::after { content: "▸"; margin-left: auto; color: var(--muted); font-size: 11px; }
.activity[open] summary::after { content: "▾"; }
.activity .a-ok { color: var(--good-text); }

.c-welcome { text-align: center; padding: calc(8vh / var(--vz, 1)) 0 18px; display: grid; gap: 6px; }
.c-welcome h3 { font-size: 26px; }
.suggest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.suggest-grid button { text-align: left; font: 500 13.5px var(--f-body); color: var(--ink); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; cursor: pointer; line-height: 1.35; }
.suggest-grid button:hover { border-color: var(--accent); background: var(--wash); }
.composer { border-top: 1px solid var(--border); padding-block: 12px 10px; background: var(--surface); }
.c-box { display: flex; align-items: flex-end; gap: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); padding: 8px 8px 8px 14px; }
.c-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.c-box textarea { flex: 1; border: 0; background: transparent; resize: none; font: inherit; color: var(--ink); max-height: 180px; padding: 6px 0; outline: none; }
.c-send { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 17px; font-weight: 700; cursor: pointer; flex: none; }
.c-send:disabled { opacity: 0.4; cursor: default; }
.c-box #c-stop { height: 34px; }
.c-hint { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; text-align: center; }
@media (max-width: 900px) {
  .coach-app { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: calc(calc(100vh / var(--vz, 1)) - 32px); }

  .c-inner { padding: 0 14px; }
}
/* sub-lists hang off their section on a guide line that starts under the number badge */
.nav-sub { display: grid; gap: 1px; margin: 2px 0 8px 20px; padding-left: 10px; border-left: 1px solid var(--border); min-width: 0; border-left-color: rgba(255, 255, 255, 0.12); }
.side nav:not([data-section="dashboard"]) #dash-pages, .side nav:not([data-section="coach"]) #coach-recent { display: none; }
.nav-sub a { font-size: 12.5px; line-height: 1.35; color: var(--muted); text-decoration: none; padding: 5px 8px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side nav .nav-sub a { display: block; }  /* text-overflow needs a block: a flex link clips mid-word */
.nav-sub a:hover { color: var(--ink); }
/* the open item: ink text and an accent bar sitting on the guide line, not the boxed style of the main links */
.side nav .nav-sub a[aria-current="page"], .nav-sub a.on { color: var(--ink); font-weight: 600; background: none; border-color: transparent; }
.ns-item { position: relative; }
.ns-item:has(a.on)::before { content: ""; position: absolute; left: -11px; top: 4px; bottom: 4px; width: 2px; border-radius: 1px; background: var(--accent); }
/* sidebar sub-items: the name, then its own slot for the delete button (shown on hover / keyboard focus), never over the text */
.ns-item { display: flex; align-items: center; gap: 2px; border-radius: 4px; min-width: 0; }
.nav-sub .ns-item a { flex: 1; min-width: 0; }
.ns-item:hover { background: var(--wash); }
.nav-sub .ns-item:hover a { background: none; }
.ns-del { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted);
  font: 600 11px var(--f-body); border-radius: 4px; cursor: pointer; visibility: hidden; }
.ns-item:hover .ns-del, .ns-del:focus-visible, .ns-del.armed { visibility: visible; }
.ns-del:hover { color: var(--crit-text); background: var(--surface); }
.ns-del:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.ns-del.armed { width: auto; padding: 0 6px; color: var(--surface); background: var(--crit); }
.c-log .md table { min-width: 60%; }

/* annual training plan: season timeline */
.season { display: grid; gap: 4px; margin-top: 6px; }

.next-weeks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.nw { gap: 4px; }
.nw b { font: 600 22px var(--f-mono); }
.nw b small { font-size: 12px; color: var(--muted); font-weight: 500; }
.nw-phase { justify-self: start; padding: 3px 10px 3px 8px; border-radius: 999px; font-weight: 600; font-size: 12.5px; background: color-mix(in srgb, var(--c) 14%, transparent); }
.nw-kind { font-size: 12px; color: var(--muted); }
.nw-kind.rec { color: var(--s1); }
.nw.now { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
@media (max-width: 900px) { .next-weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ATP week editor */
.nw { position: relative; }
.nw-acts { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; }
.nw-acts .btn { padding: 3px 9px; font-size: 12px; text-decoration: none; }
.modal-back { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / 0.55); }
.modal { width: min(440px, 100%); display: grid; gap: 12px; padding: 20px; }
.modal h3 { margin: 0; font-size: 17px; }
.fld { display: grid; gap: 5px; }
.fld input, .fld select, .fld textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 9px; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.fld textarea { resize: vertical; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.form-err { margin: 0; color: var(--crit-text); font-size: 13px; }
.diff { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; align-items: baseline; }
.diff dd { margin: 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.diff s { color: var(--muted); }
.diff b { font-variant-numeric: tabular-nums; }

fieldset.fld { border: 0; padding: 0; margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.checks input { accent-color: var(--accent); }

/* Training Plans: season planner */
.race-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.race-chip { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 14px 8px 8px; background: var(--surface-2); }
.race-chip > div { display: grid; }
.race-chip b { font-size: 14px; }
.race-chip .dim { font-size: 12px; }
.prio { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; font: 700 14px var(--f-mono); border: 1.5px solid var(--ink-2); color: var(--ink); }
.prio.p-a { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.atp-chart text.atp-band-t { font: 600 10.5px var(--f-body); letter-spacing: 0.04em; text-transform: uppercase; fill: var(--ink); }
.atp-chart text.atp-str-t { font: 500 10px var(--f-body); fill: var(--ink); }
.atp-chart text.atp-lane-t { font: 500 10px var(--f-mono); fill: var(--muted); text-transform: uppercase; }
.atp-chart text.atp-race-t { font: 600 11px var(--f-body); fill: var(--ink); }
.atp-chart .atp-today-s { font-weight: 500; fill: var(--ink-2); text-transform: none; }
.atp-chart text.atp-today-t { font: 600 10px var(--f-mono); fill: var(--accent); text-transform: uppercase; }
.atp-chart .atp-hit:hover { fill: var(--wash) !important; }
.tip-note { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--border); color: var(--ink-2); max-width: 240px; white-space: normal; }
.tip-hint { margin-top: 4px; color: var(--muted); font-size: 11px; }
.sec-head.sub h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.nw { border-top: 3px solid var(--c, var(--border)); gap: 8px; }
.nw.now { border-color: var(--accent); border-top-color: var(--accent); box-shadow: none; }
.nw-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--t, var(--surface-2)); color: var(--ink); }
.tag.plain { background: transparent; border: 1px solid var(--border); color: var(--ink-2); }
.nw-note { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; margin: 2px 0 0; }
.spark { display: block; }

/* header settings toggle + slide-in panel */
.t-btn {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  border: 0;
  background: transparent;
  color: var(--banner-ink);
  font: 600 11px var(--f-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  border-left: 1px solid var(--banner-line);
}
.t-btn:hover { background: rgba(255, 255, 255, 0.06); }
.t-btn[aria-expanded="true"], .t-btn[aria-current="page"] { background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 -2px 0 var(--accent); }
.t-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.drawer-back { position: fixed; inset: var(--banner-h) 0 0 0; z-index: 40; background: rgb(0 0 0 / 0.45); display: flex; justify-content: flex-end; }
.drawer {
  width: min(940px, 100%);
  height: 100%;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  padding: 22px 26px 40px;
  display: grid;
  align-content: start;
  gap: 20px;
  animation: drawer-in 160ms ease-out;
  background: var(--bg);
}
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.drawer-head h2 { margin: 2px 0 4px; font-family: var(--f-display); font-size: 30px; text-transform: uppercase; letter-spacing: 0.03em; }
.drawer-head .lede { margin: 0; max-width: 60ch; }
.drawer-x { font-size: 15px; padding: 6px 10px; }

/* settings: thresholds in one strip, zones as a ribbon over a table */
.drawer.set { width: min(640px, 100%); padding: 20px 22px 36px; }
.drawer.set .grid-2 { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.drawer.set .th-strip { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
.drawer.set .th { padding: 10px 12px 12px; }
.drawer.set .th .micro, .drawer.set .th > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer.set .th .micro { font-size: 11px; letter-spacing: -0.01em; }
.drawer.set .th b { font-size: 24px; }
.th-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.th { background: var(--surface); padding: 12px 16px 14px; display: grid; gap: 4px; align-content: start; }
.th b { font: 600 28px/1 var(--f-display); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 5px; }
.th b small { font: 500 12.5px var(--f-body); color: var(--muted); }
.th > span:last-child:not(.micro) { font-size: 12px; color: var(--muted); }
.zcard .card-head p b { color: var(--ink); font-weight: 600; }
.zribbon { margin: 6px 0 4px; }
.zr-bar { position: relative; height: 12px; border-radius: 3px; background: var(--surface-2); }
.zr-bar span { position: absolute; top: 0; bottom: 0; }
.zr-bar span:first-child { border-radius: 3px 0 0 3px; } .zr-bar span:nth-last-child(2) { border-radius: 0 3px 3px 0; }
.zr-thr { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.zr-ticks { position: relative; height: 16px; }
.zr-ticks em { position: absolute; top: 3px; transform: translateX(-50%); font: 500 10.5px var(--f-mono); font-style: normal; color: var(--muted); white-space: nowrap; }
.ztable td:first-child { white-space: nowrap; } .ztable .dot { margin-right: 8px; vertical-align: 1px; }
.ztable small { font-family: var(--f-body); }

@keyframes drawer-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .drawer { animation: none; } }
@media (max-width: 700px) { .t-btn span { display: none; } .drawer { padding: 16px; } }

/* best-effort record tiles */
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; margin-top: 10px; }
.rec { display: grid; gap: 1px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--surface-2); }
.rec:hover { border-color: var(--muted); }
.rec b { font: 600 16px var(--f-mono); font-variant-numeric: tabular-nums; }
.rec b small { font-size: 11px; color: var(--muted); font-weight: 500; }
.rec-sub { font: 500 11px var(--f-mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-sub i { font-style: normal; color: var(--accent); text-transform: uppercase; font-size: 10px; letter-spacing: 0.05em; }
.rec.fresh { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }

/* progress */
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.pg { display: grid; gap: 4px; align-content: start; }
.pg-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.pg-extra { font: 500 11px var(--f-mono); color: var(--ink-2); }
.pg-val { font: 600 28px/1.05 var(--f-display); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.pg-val small { font: 500 12.5px var(--f-body); color: var(--muted); }
.pg-trend { font-weight: 600; color: var(--ink-2); justify-self: start; display: inline-flex; padding: 3px 10px; background: var(--surface-2); font-size: 12.5px; border-radius: 10px; }
.pg-trend.up { color: var(--good-text); background: color-mix(in srgb, var(--good) 14%, transparent); } .pg-trend.down { color: var(--crit-text); background: color-mix(in srgb, var(--crit) 12%, transparent); }
.pg-lv { font-size: 12.5px; color: var(--muted); }
/* shared: deltas, sparklines and fill tracks (dashboard widgets, plans) */
.pg-delta { font: 600 12px var(--f-mono); color: var(--ink-2); }
.pg-delta small { font: 500 11px var(--f-body); color: var(--muted); }
.pg-delta.up { color: var(--good-text); } .pg-delta.down { color: var(--crit-text); }
.spark-lg { width: 100%; height: 46px; margin: 4px 0 2px; overflow: visible; }
.spark-lg .sp-ref { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.spark-lg .sp-target { stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.spark-lg polyline { vector-effect: non-scaling-stroke; }
.pg-track { position: relative; height: 6px; background: var(--wash); border-radius: 3px; border: 1px solid var(--grid); }
.pg-track i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 3px; }
.pg-track b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-2); transform: translateX(-2px); }
/* weekly mini chart: HTML columns (hover/focus targets) over an optional SVG line */
.wk-chart { position: relative; height: 64px; margin-top: 10px; border-bottom: 1px solid var(--axis); }
.wk-cols { position: absolute; inset: 0; display: flex; }
.wk { position: relative; flex: 1; display: flex; justify-content: center; outline: none; border-radius: 3px; }
.wk:hover, .wk:focus-visible { background: var(--wash); }
.wk:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.wk-bar { position: absolute; bottom: 0; border-radius: 999px 999px 4px 4px; width: min(14px, 50%); }
.wk.partial .wk-bar, .wk.partial .wk-dot { opacity: 0.45; }
.wk-dot { position: absolute; margin-bottom: -3.5px; border-radius: 50%; box-sizing: content-box; width: 8px; height: 8px; background: var(--surface) !important; border: 2.5px solid currentColor; }
.wk-target { position: absolute; width: min(24px, 80%); height: 2px; margin-bottom: -1px; background: var(--ink); border-radius: 1px; }
.wk-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wk-line polyline { fill: none; stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.wk-ref { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--muted); }
.wk-axis { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); margin-top: 3px; }
.wk-key { display: inline-flex; align-items: center; gap: 5px; } .wk-key i { width: 14px; border-top: 1px dashed var(--muted); }
.pg-tip[hidden] { display: none; }
.pg-tip { position: absolute; bottom: calc(100% + 6px); z-index: 5; display: grid; gap: 1px; white-space: nowrap; padding: 6px 9px; border-radius: var(--radius);
  background: var(--banner-bg); color: var(--banner-ink); font-size: 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); pointer-events: none; }
.pg-tip b { font-weight: 600; } .pg-tip span { color: var(--banner-muted); }

/* Training sub-tabs */
.subtabs {
  position: sticky;
  top: var(--banner-h);
  z-index: 12;
  display: flex;
  margin: 4px 0 0;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 0;
  gap: 4px;
  padding: 2px 0;
  background: var(--bg);
}
.subtabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font: 600 12px var(--f-body); text-transform: uppercase; letter-spacing: 0.07em;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subtabs a:hover { color: var(--ink); }
.subtabs a:focus:not(:focus-visible) { outline: none; }
.subtabs a[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.subtabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tabpanel { display: grid; gap: 18px; }
.tabpanel > .sec-head:first-child { margin-top: 0; }
@media (max-width: 760px) { .subtabs { position: static; } }

/* training load (acute vs chronic) + load focus */
.lb-band { fill: color-mix(in srgb, var(--accent) 14%, transparent); }
.lb-chronic { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 4; }
.lb-acute { fill: none; stroke: var(--s1); stroke-width: 2; stroke-linejoin: round; }
.lb-dot { fill: var(--s1); stroke: var(--surface); stroke-width: 2; }
.lb-cross { stroke: var(--axis); stroke-width: 1; }
.tl-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 1000px) { .tl-grid { grid-template-columns: 1fr; } }
.tl-head { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: flex-end; }
.tl-head > div { display: grid; gap: 1px; }
.tl-head b { font: 600 22px var(--f-mono); font-variant-numeric: tabular-nums; }
.tl-head b small { font-size: 11px; color: var(--muted); font-weight: 500; }
.tl-status { font: 600 13px var(--f-body); display: inline-flex; align-items: center; gap: 7px; }
.tl-status i { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.tl-status.good i { background: var(--good); } .tl-status.warn i { background: var(--warn); } .tl-status.crit i { background: var(--crit); } .tl-status.low i { background: var(--s1); }
.ratio-scale { position: relative; display: grid; grid-template-columns: 8fr 5fr 2fr 5fr; gap: 2px; height: 8px; margin: 10px 0 18px; }
.ratio-scale span { border-radius: 2px; }
.ratio-scale .r-low { background: color-mix(in srgb, var(--s1) 45%, var(--surface)); }
.ratio-scale .r-opt { background: color-mix(in srgb, var(--good) 70%, var(--surface)); }
.ratio-scale .r-high { background: color-mix(in srgb, var(--warn) 70%, var(--surface)); }
.ratio-scale .r-vhigh { background: color-mix(in srgb, var(--crit) 70%, var(--surface)); }
.ratio-scale em { position: absolute; top: 12px; font: 500 10px var(--f-mono); color: var(--muted); font-style: normal; transform: translateX(-50%); }
.ratio-scale .r-mark { position: absolute; top: -5px; width: 3px; height: 18px; background: var(--ink); border-radius: 2px; transform: translateX(-1.5px); }
.focus-rows { display: grid; gap: 14px; margin-top: 6px; }
.focus-row { display: grid; gap: 5px; }
.focus-row .fr-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.focus-row .fr-top b { font-family: var(--f-mono); }
.focus-track { position: relative; height: 14px; background: var(--wash); border: 1px solid var(--grid); border-radius: 4px; }
.focus-track .ft-target { position: absolute; top: -1px; bottom: -1px; border: 1.5px dashed var(--ink-2); border-radius: 4px; }
.focus-track .ft-bar { position: absolute; left: 0; top: 2px; bottom: 2px; border-radius: 3px; }
.focus-row .fr-sub { font-size: 11.5px; color: var(--muted); }
.focus-row .fr-sub .short { color: var(--warn-text); } .focus-row .fr-sub .over { color: var(--serious-text); }
.focus-head { display: grid; gap: 2px; }
.focus-head b { font: 600 17px var(--f-body); }
.legend i.dash { width: 14px; height: 0; border-top: 2px dashed var(--muted); background: none; }

/* my dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; grid-auto-flow: dense; }
.dw { grid-column: span var(--span, 1); min-width: 0; display: grid; gap: 8px; align-content: start; }
.dw .card-head { margin: 0; }
.dash-grid.editing .dw { outline: 1px dashed var(--axis); outline-offset: 3px; }
.dash-grid.editing .dw-bar { cursor: grab; }
.dw.dragging { opacity: 0.35; }
.dw-ph { grid-column: span var(--span, 1); min-height: 120px; border: 2px dashed var(--accent); border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.dw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: -4px -4px 0; padding-bottom: 6px; border-bottom: 1px solid var(--grid); }
.dw-bar .dw-name { flex: 1 1 90px; min-width: 0; font: 600 11px var(--f-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-bar .btn { padding: 2px 7px; font-size: 12px; min-width: 26px; }
.grip { color: var(--muted); cursor: grab; font-size: 14px; line-height: 1; }
.dash-empty { grid-column: 1 / -1; }
.mw { display: grid; gap: 4px; }
.mw-title { font-weight: 600; font-size: 15px; }
.mw-note { font-size: 11.5px; color: var(--muted); }
.mw .ratio-scale { margin: 6px 0 16px; }
.dash-wrap.editing { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 14px; align-items: start; }
.lib { display: grid; gap: 12px; position: sticky; top: calc(var(--banner-h) + 12px); max-height: calc(calc(100vh / var(--vz, 1)) - var(--banner-h) - 24px); overflow-y: auto; }
.lib-head h3 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; }
.lib-head p { margin: 0; }
.dash-wrap.editing .dash-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .dash-wrap.editing { grid-template-columns: 1fr; } .lib { position: static; max-height: none; } }
.lib-group { display: grid; gap: 6px; }
.lib-items { display: grid; gap: 6px; }
.lib-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); cursor: grab; }
.lib-item:hover { border-color: var(--muted); }
.lib-item > div { flex: 1; min-width: 0; display: grid; }
.lib-item b { font-size: 13px; }
.lib-item span { font-size: 11.5px; color: var(--muted); }
.lib-item .btn { padding: 2px 9px; }
.wl { list-style: none; margin: 0; padding: 0; display: grid; }
.wl a { display: grid; grid-template-columns: auto 78px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 2px; border-bottom: 1px solid var(--grid); color: var(--ink); text-decoration: none; font-size: 13px; }
.wl li:last-child a { border-bottom: 0; }
.wl a:hover { background: var(--wash); }
.wl-d { font: 500 12px var(--f-mono); color: var(--muted); }
.wl-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-v { font: 500 12px var(--f-mono); color: var(--ink-2); white-space: nowrap; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dw { grid-column: span min(var(--span, 1), 2); } }
@media (max-width: 640px) { .dash-grid { grid-template-columns: 1fr; } .dw { grid-column: 1 / -1; } }
.lib[hidden] { display: none; }
/* my dashboard: pages of titled sections */
.dash-secs { display: grid; gap: 26px; min-width: 0; }
.dsec { display: grid; gap: 10px; }
.dsec-head { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.dsec-head h2 { margin: 0; font-size: 20px; }
.dsec-head.edit { border-bottom-style: dashed; }
.dsec-title-in, .dash-title-in { flex: 1; min-width: 0; font: 600 20px/1.2 var(--f-display); letter-spacing: 0.01em; color: var(--ink); background: transparent;
  border: 1px solid transparent; border-radius: var(--radius); padding: 2px 6px; margin-left: -7px; }
.dash-title-in { width: min(640px, 100%); font: 800 26px var(--f-body); text-transform: none; letter-spacing: -0.02em; }
.dsec-title-in:hover, .dash-title-in:hover { border-color: var(--border); }
.dsec-title-in:focus, .dash-title-in:focus { outline: 2px solid var(--accent); outline-offset: 0; background: var(--surface); }
.dsec-title-in::placeholder { color: var(--muted); font-weight: 400; }
.dash-grid .dash-empty { grid-column: 1 / -1; min-height: 70px; display: grid; place-items: center; border: 1px dashed var(--axis); border-radius: var(--radius); }
.dash-grid:not(.editing) .dash-empty { display: none; }
.dash-grid .dash-empty p { margin: 0; font-size: 13px; }
.lib-fields { display: flex; flex-wrap: wrap; gap: 6px; }
.lib-field { font: 500 12.5px var(--f-body); color: var(--ink); padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); cursor: grab; }
.lib-field:hover { border-color: var(--accent); }
.lib-field:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dw.drop-on { outline: 2px solid var(--accent) !important; outline-offset: 3px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.dw .mw-note { margin: 4px 0 0; }
.dw-acts { display: flex; gap: 3px; margin-left: auto; }
.dw { position: relative; }
.dw-resize { position: absolute; right: 2px; bottom: 2px; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none; border-radius: 0 0 6px 0;
  background: linear-gradient(135deg, transparent 50%, var(--muted) 50%, var(--muted) 58%, transparent 58%, transparent 70%, var(--muted) 70%, var(--muted) 78%, transparent 78%); opacity: .7; }
.dw-resize:hover, .dw.resizing .dw-resize { opacity: 1; background-color: color-mix(in srgb, var(--accent) 18%, transparent); }
.dw-size { position: absolute; right: 24px; bottom: 6px; font: 600 11px var(--f-mono); color: var(--accent); pointer-events: none; }
.dw.resizing { outline: 2px solid var(--accent) !important; cursor: nwse-resize; }
.dw.resizing .dw-body { opacity: .5; }

.busy-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; padding: 8px 12px; border: 1px solid var(--border);
  border-left: 3px solid var(--warn); border-radius: var(--radius); background: var(--surface); font-size: 13px; }
.busy-note[hidden] { display: none; }
.busy-note span { flex: 1; min-width: 200px; }

/* annual plan inside the calendar's weekly summary */

.sa-edit { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 13px; }
.sa-edit:hover { color: var(--ink); }

.day.wk-focus { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.wk.wk-focus { box-shadow: inset 0 0 0 2px var(--accent); }
/* week panel */
.modal.wp { width: min(620px, 100%); max-height: calc(calc(100vh / var(--vz, 1)) - 40px); overflow-y: auto; }
.wp-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.wp-head h3 { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.wp-body { display: grid; gap: 10px; }
.wp-fill { display: grid; gap: 4px; }
.wp-fill .short { color: var(--warn-text); } .wp-fill .over { color: var(--serious-text); }
.wp-sub { margin: 6px 0 0; }
.modal-actions a.btn { text-decoration: none; }

/* Ask Coach running in the background */
.nav-sub a .spin { width: 9px; height: 9px; margin-right: 6px; vertical-align: -1px; border-width: 1.5px; }
.coach-toast { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: grid; gap: 2px; min-width: 240px; max-width: 340px; padding: 12px 14px;
  background: var(--surface); color: var(--ink); text-decoration: none; border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius); box-shadow: 0 8px 24px rgb(0 0 0 / 0.25); animation: drawer-in 160ms ease-out; }
.coach-toast b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coach-toast:hover { border-color: var(--muted); }
.asof.sync { display: flex; align-items: center; gap: 6px; color: var(--accent); }
.asof.sync[hidden] { display: none; }
.asof.sync .spin { width: 9px; height: 9px; border-width: 1.5px; }
html.rail-collapsed .asof.sync { font-size: 0; justify-content: center; }

/* calendar weekly summary: one reading per week */
.wk.ws { display: grid; gap: 10px; align-content: start; border-top: 3px solid var(--c); }
.ws-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ws-phase { font: 600 12.5px var(--f-body); display: inline-flex; align-items: center; gap: 6px; }
.ws-phase .dim { font-weight: 500; }
.ws-hours { display: grid; gap: 5px; }
.ws-big { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.ws-big b { font: 600 22px var(--f-mono); font-variant-numeric: tabular-nums; }
.ws-big span { font-size: 12px; color: var(--muted); }
.ws-bar { position: relative; height: 8px; border-radius: 4px; background: var(--wash); border: 1px solid var(--grid); display: none; }
.ws-bar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.ws-bar .done { left: 0; background: var(--c, var(--s1)); }
.ws-bar .ahead { background: color-mix(in srgb, var(--c, var(--s1)) 35%, transparent); }
.ws-bar .tgt { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }

.ws-rows { display: grid; font-size: 12px; gap: 3px; }
.ws-row { display: grid; grid-template-columns: 1fr auto 62px; gap: 8px; align-items: baseline; }
.ws-row b { font: 600 13px var(--f-mono); text-align: right; }
.ws-row .dim { font-family: var(--f-mono); text-align: right; }
.ws-th { font: 600 9.5px var(--f-body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ws-th span:nth-child(n+2) { text-align: right; }
.ws-pmc { display: flex; flex-wrap: wrap; gap: 4px 10px; font: 600 12px var(--f-mono); align-items: center; }
.ws-pmc i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; }
.ws-pmc .dim { font: 500 10px var(--f-body); }
.ws-notes summary { cursor: pointer; font-size: 11.5px; color: var(--muted); }
.ws-notes p { margin: 4px 0 0; font-size: 11.5px; color: var(--ink-2); }
.ws-foot { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--grid); padding-top: 6px; }

/* interactive calendar */
.day { position: relative; }
.day-add { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 5px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity 120ms; }
.day:hover .day-add, .day-add:focus-visible { opacity: 1; }
.day-add:hover { color: var(--ink); border-color: var(--muted); }
@media (hover: none) { .day-add { opacity: .7; } }
.wc-wrap { position: relative; }
.wc-wrap.dragging { opacity: .35; }
.w-more { position: absolute; top: 4px; right: 4px; width: 22px; height: 20px; border: 0; border-radius: 4px; background: var(--surface-2);
  color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; opacity: 0; }
.wc-wrap:hover .w-more, .w-more:focus-visible { opacity: 1; }
.w-more:hover { color: var(--ink); }
.day.drop-target { outline: 2px dashed var(--accent); outline-offset: -3px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.day.drop-target.drop-copy { outline-style: dotted; }
.app-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgb(0 0 0 / .25); font-size: 13.5px; max-width: calc(calc(100vw / var(--vz, 1)) - 32px); }
.app-toast .btn { padding: 3px 10px; }
.modal.sf { width: min(520px, 100%); }

.sf-kind { justify-self: start; }
.sf-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 8px; border-top: 1px solid var(--grid); }
.sf-copy { display: inline-flex; gap: 4px; align-items: center; }
.sf-copy input { font: inherit; font-size: 13px; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 6px; }
.sf-tools a.btn { text-decoration: none; }
.btn.danger { color: var(--crit-text); }
.btn.danger.armed { background: var(--crit); color: var(--surface); border-color: var(--crit); }
.wc-wrap { user-select: none; -webkit-user-select: none; }
.wc-wrap a { -webkit-user-drag: none; user-drag: none; }
.sf-kind button { white-space: nowrap; }

/* coach dock: background requests from other pages */
.coach-dock { position: fixed; right: 18px; bottom: 18px; z-index: 65; width: min(380px, calc(calc(100vw / var(--vz, 1)) - 36px)); max-height: calc(calc(100vh / var(--vz, 1)) - 120px);
  overflow-y: auto; display: grid; gap: 8px; }
.coach-dock[hidden] { display: none; }
.cd-task { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgb(0 0 0 / .25); padding: 10px 12px; display: grid; gap: 6px; }
.cd-task.done { border-left-color: var(--good); }
.cd-head { display: flex; align-items: baseline; gap: 8px; }
.cd-head b { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; overflow-wrap: anywhere; }  /* two lines, so the request stays readable and the date it is about is never cut */
.cd-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.cd-state { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.cd-state .spin { width: 10px; height: 10px; border-width: 1.5px; }
.cd-text summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.cd-text .md { font-size: 13px; max-height: 220px; overflow-y: auto; }
.cd-open { font-size: 12px; color: var(--accent); text-decoration: none; justify-self: start; }
.cd-changes { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--good-text); }
.cd-changes .bad { color: var(--crit-text); }

/* charts inside coach answers */
.c-chart { margin: 10px 0; padding: 10px 12px 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); display: grid; gap: 4px; }
.c-chart figcaption { font: 600 11px var(--f-body); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); }
.c-chart .legend:empty { display: none; }
.c-chart.pending { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.c-chart-err { color: var(--muted); font-size: 12.5px; }

/* coach memory panel */
.drawer.mem { width: min(620px, 100%); }
.mem-add { display: grid; grid-template-columns: 130px 1fr auto; gap: 6px; }
.mem-add select, .mem-add input, .mem-note textarea { font: inherit; font-size: 13.5px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 9px; }
.mem-list { display: grid; gap: 14px; }
.mem-list section { display: grid; gap: 6px; }
.mem-list h4 { margin: 0; }
.mem-note { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: start; }
.mem-note textarea { resize: vertical; min-height: 36px; }
.mem-meta { grid-column: 1; font-size: 11px; color: var(--muted); }
.mem-note .btn { grid-row: 1; grid-column: 2; padding: 4px 9px; }

/* weekly review */
.review { display: grid; gap: 10px; }
.review:empty { display: none; }
.rv-tools { display: flex; gap: 8px; align-items: center; }
.rv-running { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }

.rv-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }

/* weekly review */
.review { overflow: hidden; }

.tab-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: 2px; }
.tab-dot[hidden] { display: none; }

.rv-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .rv-charts { grid-template-columns: 1fr; } }
.rv-chart { margin: 0; padding: 10px 12px 6px; border: 1px solid var(--grid); border-radius: var(--radius); display: grid; gap: 4px; min-width: 0; align-content: start; }
.rv-chart figcaption { font: 600 11px var(--f-body); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); }
.rv-analysis { border-top: 1px solid var(--grid); padding-top: 12px; display: grid; gap: 8px; }
.rv-analysis h4 { margin: 0; }

/* structured weekly analysis */
.an { display: grid; gap: 14px; }
.an-head { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--wash); border-left: 3px solid var(--muted); }
.an-head.good { border-left-color: var(--good); } .an-head.warn { border-left-color: var(--warn); } .an-head.bad { border-left-color: var(--crit); }
.an-head p { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.4; }
.an-badge { flex: none; font: 600 10.5px var(--f-body); padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border); margin-top: 2px; text-transform: none; letter-spacing: 0; font-size: 12px; }
.an-head.good .an-badge { color: var(--good-text); } .an-head.warn .an-badge { color: var(--warn-text); } .an-head.bad .an-badge { color: var(--crit-text); }

/* coach's sections: label column + the coach's paragraph, hairline between them */
.an-secs { display: grid; border-top: 1px solid var(--grid); }
.an-sec { display: grid; grid-template-columns: 200px minmax(0, 72ch); gap: 6px 20px; padding: 12px 0; border-bottom: 1px solid var(--grid); }
.an-sec h5 { margin: 0; display: grid; grid-template-columns: 8px 1fr; column-gap: 8px; align-items: center; align-content: start; font: 600 14px/1.3 var(--f-body); }
.an-sec h5 small { grid-column: 2; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.an-sec p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.an-sec p b, .an-take p b, .an-head p b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.an-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.an-sec.good .an-dot { background: var(--good); } .an-sec.warn .an-dot { background: var(--warn); } .an-sec.bad .an-dot { background: var(--crit); }
.an-sec.good small { color: var(--good-text); } .an-sec.warn small { color: var(--warn-text); } .an-sec.bad small { color: var(--crit-text); }
@media (max-width: 800px) { .an-sec { grid-template-columns: 1fr; } }
.an-take { padding: 12px 16px; border-radius: var(--radius); background: var(--wash); border-left: 3px solid var(--accent); }
.an-take h5 { margin: 0 0 4px; font: 600 11px var(--f-body); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); }
.an-take p { margin: 0; font-size: 14.5px; line-height: 1.55; max-width: 80ch; }
.an-still { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }

.an-sessions h5 { margin: 0 0 6px; font: 600 11px var(--f-body); text-transform: uppercase; letter-spacing: .07em; }

.an-sessions ul { list-style: none; margin: 0; padding: 0; display: grid; }
.an-sessions li { display: grid; grid-template-columns: 22px 64px minmax(120px, 220px) 1fr; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--grid); font-size: 13px; }
.an-sessions li:last-child { border-bottom: 0; }
.an-mark { font-weight: 700; text-align: center; color: var(--muted); }
.an-sessions li.good .an-mark { color: var(--good-text); } .an-sessions li.warn .an-mark { color: var(--warn-text); } .an-sessions li.bad .an-mark { color: var(--crit-text); }
.an-date { font: 500 12px var(--f-mono); color: var(--muted); }
.an-title { font-weight: 600; }
.an-note { color: var(--ink-2); }
@media (max-width: 700px) { .an-sessions li { grid-template-columns: 22px 60px 1fr; } .an-note { grid-column: 3; } }
.rv-head { flex-wrap: wrap; gap: 8px; }
.rv-nav { display: flex; align-items: center; gap: 8px; }
.rv-nav h3 { margin: 0; }
.rv-nav .btn { padding: 4px 10px; }
.rv-live { font: 600 10px var(--f-body); text-transform: uppercase; letter-spacing: .07em; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--border)); border-radius: 999px; padding: 2px 7px; margin-left: 6px; vertical-align: 2px; }
.rv-empty { display: grid; gap: 8px; justify-items: start; }
.rv-empty p { margin: 0; }

/* annual plan detail: execution report */
.ad-hero { display: grid; gap: 22px; padding: 22px 24px; border-top: 3px solid var(--vc, var(--axis)); }
.ad-hero.good { --vc: var(--good); } .ad-hero.warn { --vc: var(--warn); }
.ad-top { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 20px 36px; align-items: center; }
.ad-verdict h2 { font: 700 34px/1.05 var(--f-display); color: var(--ink); }
.ad-hero.good .ad-verdict h2 { color: var(--good-text); } .ad-hero.warn .ad-verdict h2 { color: var(--warn-text); }
.ad-verdict p { margin: 6px 0 0; font-size: 15px; color: var(--ink-2); max-width: 36ch; }
.ad-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.ad-figs > div { padding: 2px 18px; border-left: 1px solid var(--grid); }
.ad-figs dt { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.ad-figs dd { margin: 0; display: grid; gap: 3px; font-size: 13px; color: var(--muted); }
.ad-figs dd b { font: 600 32px/1 var(--f-display); color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 4px; }
.ad-figs dd span { font-size: 12.5px; } .ad-figs dd > span:first-child { font-size: 13px; }
.ad-meter { height: 4px; border-radius: 2px; background: var(--grid); position: relative; margin-top: 4px; max-width: 140px; }
.ad-meter i { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: var(--vc, var(--ink-2)); }
.ad-bad { color: var(--crit-text); font-weight: 600; }
.ad-strip-wrap { display: grid; gap: 6px; }
.ad-where { margin: 0; font-size: 13px; color: var(--muted); } .ad-where b { font: 600 16px var(--f-display); color: var(--ink); }
.ad-strip { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; height: 30px; margin-top: 22px; }
.ad-c { position: relative; border-radius: 3px; background: var(--grid); }
.ad-c.hit { background: var(--good); } .ad-c.under { background: var(--warn); } .ad-c.over { background: var(--s1); }
.ad-c.none { background: var(--axis); }
.ad-c.now { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); }
.ad-flag { position: absolute; bottom: calc(100% + 4px); left: 50%; white-space: nowrap; font: 600 13px var(--f-display); color: var(--ink); padding-left: 8px; border-left: 2px solid var(--ink-2); line-height: 1; padding-bottom: 2px; }
.ad-flag.p-a { border-color: var(--s8); } .ad-flag.p-b { border-color: var(--s2); }
.ad-c:last-child .ad-flag, .ad-c:nth-last-child(-n+6) .ad-flag { left: auto; right: 50%; padding: 0 8px 2px 0; border-left: 0; border-right: 2px solid var(--ink-2); }
/* a name moved up a row (stackFlags): its line runs down past the lower row, whose names sit over it */
.ad-strip.two-rows { margin-top: 42px; }
.ad-flag:not(.up) { z-index: 1; background: var(--surface); }
.ad-c .ad-flag.up { padding-bottom: 22px; }
.ad-months { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); font-size: 11.5px; color: var(--muted); }
.ad-months span { white-space: nowrap; }
.ad-key { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 12px; color: var(--muted); }
.ad-key span { display: inline-flex; align-items: center; gap: 6px; }
.ad-key i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.ad-key i.hit { background: var(--good); } .ad-key i.under { background: var(--warn); } .ad-key i.over { background: var(--s1); } .ad-key i.now { box-shadow: inset 0 0 0 2px var(--ink); }
.ad-grid { align-items: start; }
.ad-sports { display: grid; gap: 14px; }
.ad-sname { display: flex; align-items: baseline; gap: 8px; } .ad-sname b { font: 600 16px var(--f-display); }
.ad-sname span { margin-left: auto; font: 600 16px var(--f-display); font-variant-numeric: tabular-nums; }
.ad-sbar { height: 8px; border-radius: 4px; background: var(--wash); margin: 6px 0 4px; position: relative; }
.ad-sbar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; }
.ad-smeta { margin: 0; font-size: 12.5px; color: var(--muted); }
.ad-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin-bottom: 16px; }
.ad-specs > div { display: grid; } .ad-specs span { font-size: 12.5px; color: var(--muted); }
.ad-specs b { font: 600 19px/1.2 var(--f-display); } .ad-specs small { font-size: 12px; color: var(--muted); }
.ad-races { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--grid); margin-bottom: 16px; }
.ad-race { display: flex; align-items: center; gap: 12px; } .ad-race > div { display: grid; }
.ad-race b { font: 600 16px var(--f-display); } .ad-race span:not(.prio) { font-size: 12.5px; color: var(--muted); }
.ad-missed { list-style: none; margin: 0; padding: 0; display: grid; }
.ad-missed li { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; padding: 8px 0; border-top: 1px solid var(--grid); font-size: 13.5px; }
.ad-missed li:first-child { border-top: 0; }
#ad-ask { justify-self: start; width: auto; }
@media (max-width: 1000px) { .ad-top { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .ad-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 0; } .ad-figs > div:nth-child(3) { border-left: 0; padding-left: 0; } .ad-figs > div:first-child { padding-left: 0; border-left: 0; } .ad-months span:nth-child(even) { visibility: hidden; } }

/* ================================================================ the "Console" look: what it adds beyond the rules above
   (the navy sidebar and its scoped colours, the top bar, cards, buttons). Its changes to those rules are in them. */
html { font-feature-settings: "tnum" 1; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.01em; }
.micro, .eyebrow { font: 600 11.5px/1.3 var(--f-body); text-transform: none; letter-spacing: 0; color: var(--muted); }

/* navy sidebar in both modes: its own ink, scoped */
.side, .telemetry .brand {
  --ink: #eef1fb; --ink-2: #b3bcd6; --muted: #8b95b3; --wash: rgba(255, 255, 255, 0.06); --border: rgba(255, 255, 255, 0.09);
  --surface: #17213f; --surface-2: #1c2748; --axis: rgba(255, 255, 255, 0.16); --accent: #3b5bfd; --accent-ink: #ffffff; }
.side { background: var(--rail); border-right: 0; padding: 18px 14px; }
.side nav a { border: 0; border-radius: 10px; padding: 9px 12px; color: var(--ink-2); font-weight: 600; }
.side nav a:hover { background: var(--wash); color: var(--ink); }
.side nav a .n { border: 0; border-radius: 7px; background: rgba(255, 255, 255, 0.08); color: var(--ink-2); font: 700 11px var(--f-body); }
.side nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px rgba(59, 91, 253, 0.35); }
.side nav .nav-sub a[aria-current="page"], .nav-sub a.on { background: none; box-shadow: none; color: #fff; }
.ns-item:has(a.on)::before { background: #8ea2ff; }
.nav-sub a.all { color: #a9b9ff; }
.side .btn { background: transparent; border-color: rgba(255, 255, 255, 0.14); color: var(--ink-2); }
.side .btn:hover { border-color: rgba(255, 255, 255, 0.3); color: var(--ink); }
.athlete strong { color: var(--ink); }

/* top bar: white strip, brand cell continues the navy sidebar */
.telemetry .brand { background: var(--rail); border-right: 0; color: #fff; font: 800 17px var(--f-body); letter-spacing: -0.01em; }
.t-seg { border-right: 0; padding: 0 18px; }
.t-seg + .t-seg { box-shadow: inset 1px 0 0 var(--banner-line); }
.t-val { font: 800 21px/1.1 var(--f-body); letter-spacing: -0.01em; }

/* page head: plain bold title */
.page-head h1 { font-size: 26px; text-transform: none; letter-spacing: -0.02em; }

/* cards: white, rounded, soft shadow, no outline */
.card, .rv-chart, .signal, .th, .tile { border: 0; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card-head h2, .card-head h3, .rv-chart figcaption { font: 700 15px/1.3 var(--f-body); text-transform: none; letter-spacing: -0.005em; color: var(--ink); }
.card-head p { font-size: 12.5px; }
.sec-head h2, main > .sec-head h2, .dsec-head h2 { font-size: 18px; text-transform: none; letter-spacing: -0.01em; }
.dsec-head { border-bottom: 0; }

/* KPI rows: separate cards instead of a joined strip */
.signals, .th-strip { background: transparent; border: 0; gap: 14px; overflow: visible; }
.signal .micro i { width: 9px; height: 9px; border-radius: 3px; }
.signal b, .pg-val, .th b, .tile .value, .an-ev b { font-family: var(--f-body); font-weight: 800; letter-spacing: -0.02em; }
.signal b small, .pg-val small, .th b small { font-weight: 500; }

.sg-weeks span, .sg-pips span { border-radius: 999px; height: 8px; }
.num, td.num, .kv dd { font-family: var(--f-body); }

/* tabs and range switch: pills */
.subtabs a { font: 600 13.5px var(--f-body); text-transform: none; letter-spacing: 0; border: 0; border-radius: 999px; padding: 8px 16px; margin: 0; color: var(--muted); }
.subtabs a:hover { background: var(--wash); color: var(--ink); }
.subtabs a[aria-selected="true"] { background: var(--accent-tint); color: var(--accent-text); }
.seg button { border: 0; border-radius: 999px; font-weight: 600; text-transform: none; letter-spacing: 0; padding: 6px 12px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12); }

/* buttons */
.btn { border-radius: 10px; border-color: var(--border); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 12px rgba(59, 91, 253, 0.28); }

/* charts */
.chart text { font-family: var(--f-body); font-size: 11px; }
.legend .sw, .legend .dt { border-radius: 3px; }
.chip, .tl-status, .an-badge, .rv-live { border-radius: 999px; }
.tip, .pg-tip, .tpop, .modal { border-radius: 12px; }
.lib-item, .lib-field { border-radius: 10px; }
.lib-field { border-radius: 999px; }

.t-data, .t-btn, .telemetry > .t-seg { box-shadow: inset 0 -1px 0 var(--banner-line); }
.drawer-head h2 { text-transform: none; font-size: 26px; letter-spacing: -0.02em; }
.drawer.set .th-strip { gap: 8px; }
.drawer.set .th { padding: 10px 10px 12px; }

/* ---------------- KPI cards: icon chip, figure + visual, caption */
.signal.kpi { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 16px; }
.kpi-head { display: flex; align-items: center; gap: 10px; }
.kpi-head .micro { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.kpi-ico { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent-text); }
.kpi-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.signal.good .kpi-ico { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good-text); }
.signal.warn .kpi-ico { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn-text); }
.signal.crit .kpi-ico { background: color-mix(in srgb, var(--crit) 14%, transparent); color: var(--crit-text); }
.kpi-st { display: none; }
.kpi-body { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.kpi-main { display: grid; gap: 6px; min-width: 0; }
.kpi-main b { font-size: 30px; line-height: 1; }
.kpi-cap { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.kpi-viz { flex: none; overflow: visible; }
.kpi-viz .kv-c { font: 800 14px var(--f-body); fill: var(--ink); }
.kpi-viz .kv-s { font: 500 9.5px var(--f-body); fill: var(--muted); }
.kpi-viz.gauge.faint { opacity: 0.55; }
.sg-spark .ln { fill: none; stroke: var(--s7); stroke-width: 2; vector-effect: non-scaling-stroke; }
.sg-spark path:not(.ln):not([style]) { stroke: var(--s7); }
.rv-kpis .signal.kpi { grid-template-rows: none; }

/* progress: trends as tinted pills, smoother week charts */
.wk-line path.ln { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.kpi-main b.word { font-size: 22px; letter-spacing: -0.01em; }
.sg-spark path[style] { stroke: none; }
.sg-spark path.ln { stroke: var(--s7); stroke-width: 2; stroke-linecap: round; }
.sg-spark path:not(.ln):not([style]) { stroke: var(--s7); stroke-width: 5; }

/* ---------------- calendar, console style: one card, hairline grid, sport-tinted session chips */
.cal .hd.wkh { color: var(--ink-2); }
.cal .day { background: var(--surface); padding: 8px; gap: 6px; min-height: 140px; }
.cal .day.past { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.cal .day.out { background: var(--surface-2); }
.cal .day.today { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.cal .dn { font: 700 12.5px var(--f-body); color: var(--ink-2); padding: 3px 8px; border-radius: 999px; }
/* session chip: sport-tinted, colour bar on the left; planned = outlined */
.wcard:hover { background: color-mix(in srgb, var(--sc, var(--muted)) 15%, var(--surface)); }
.wcard.wc-good, .wcard.wc-warn, .wcard.wc-crit, .wcard.wc-off { border-top: 0; background: color-mix(in srgb, var(--sc, var(--muted)) 9%, var(--surface)); }
.w-top .s-ico { color: var(--sc); }
.w-lines b { font-size: 12px; }

/* daily wellness: one row of small chips */
.m-chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); font-size: 11px; }
.m-chip span { color: var(--muted); font-weight: 500; }
.m-chip b { font: 700 11px var(--f-body); color: var(--ink); }
/* weekly summary: hours + ring, then done vs plan */
.cal .wk.ws { border-top: 0; background: var(--surface); box-shadow: inset 3px 0 0 var(--c); padding: 12px 14px; }
.ws-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ws-big b { font: 800 22px var(--f-body); letter-spacing: -0.02em; }
.cal-legend .bar { height: 8px; width: 8px; border-radius: 999px; }

/* ---------------- annual plan, console style */
.atp-kpis { margin-bottom: 2px; }
.sec-head.sub h3 { font: 700 16px var(--f-body); text-transform: none; letter-spacing: -0.01em; color: var(--ink); }
.nw > b { font: 800 26px/1 var(--f-body); letter-spacing: -0.02em; }
.nw-phase .dim { font-weight: 500; }
.nw.now { box-shadow: var(--shadow), inset 0 0 0 2px var(--accent); }
.nw-kind { font-size: 12.5px; color: var(--muted); }
.tag { border-radius: 999px; }
.spark rect { rx: 3px; }

/* ================================================================ motion: charts draw in once, KPIs sweep to their value,
   cards arrive in sequence on page load; everything off with prefers-reduced-motion */
@keyframes td-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes td-fade { from { opacity: 0; } }
@keyframes td-grow-y { from { transform: scaleY(0); } }
@keyframes td-grow-x { from { transform: scaleX(0); } }
@keyframes td-sweep { from { stroke-dasharray: 0 100; } }
@keyframes td-pop { 0% { opacity: 0; transform: scale(0.4); } 70% { transform: scale(1.12); } 100% { opacity: 1; transform: scale(1); } }
@keyframes td-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes td-tip { from { opacity: 0; transform: translateY(4px) scale(0.97); } }

@media (prefers-reduced-motion: no-preference) {
  /* charts: lines trace left to right, areas fade in after, bars grow from the baseline with a small stagger */
  svg.enter .draw, .kpi-viz .draw, .wk-line .draw, .sg-spark .draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: td-draw 1.1s cubic-bezier(.3, .7, .2, 1) both; }
  svg.enter .area, .wk-line .area, .sg-spark .area { animation: td-fade .9s ease .35s both; }
  svg.enter .bar { transform-box: fill-box; transform-origin: 50% 100%; animation: td-grow-y .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0ms); }
  svg.enter .hbar { transform-box: fill-box; transform-origin: 0 50%; animation: td-grow-x .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0ms); }
  svg.enter circle:not([style*="transparent"]) { animation: td-fade .5s ease .5s both; }
  /* KPI visuals: rings and donuts sweep to their value, the gauge needle pops in at the end */
  .kpi-viz .sweep { animation: td-sweep 1.1s cubic-bezier(.3, .7, .2, 1) both; animation-delay: calc(var(--d, 0ms) + 150ms); }
  .kpi-viz .pop { transform-box: fill-box; transform-origin: center; animation: td-pop .45s ease 1s both; }
  .kpi-viz text { animation: td-fade .6s ease .5s both; }
  /* progress week columns grow, left to right */
  .wk-bar { transform-origin: 50% 100%; animation: td-grow-y .6s cubic-bezier(.2, .8, .2, 1) both; }
  .wk:nth-child(2) .wk-bar { animation-delay: 50ms; } .wk:nth-child(3) .wk-bar { animation-delay: 100ms; } .wk:nth-child(4) .wk-bar { animation-delay: 150ms; }
  .wk:nth-child(5) .wk-bar { animation-delay: 200ms; } .wk:nth-child(6) .wk-bar { animation-delay: 250ms; } .wk:nth-child(n+7) .wk-bar { animation-delay: 300ms; }
  .sg-weeks span { transform-origin: 0 50%; animation: td-grow-x .7s cubic-bezier(.2, .8, .2, 1) .2s both; }
  /* page load: cards rise into place in sequence (not while editing a dashboard, where widgets re-render on every change) */
  main .signal, main .card, main .rv-chart, main .th, .cal { animation: td-rise .45s cubic-bezier(.2, .8, .2, 1) both; }
  .signals > :nth-child(2), .th-strip > :nth-child(2) { animation-delay: 60ms; } .signals > :nth-child(3), .th-strip > :nth-child(3) { animation-delay: 120ms; }
  .signals > :nth-child(4), .th-strip > :nth-child(4) { animation-delay: 180ms; } .signals > :nth-child(5), .th-strip > :nth-child(5) { animation-delay: 240ms; }
  .dash-grid.editing .card, .dash-grid.editing .dw { animation: none; }
  /* interaction feedback */
  .tip:not([hidden]), .pg-tip:not([hidden]) { animation: td-tip .14s ease-out both; }
  .subtabs a, .seg button, .side nav a, .btn, .wcard, .lib-field, .nav-sub a, .ns-item { transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease; }
  .wcard { transition: background-color .18s ease, transform .18s ease; }
  .wcard:hover { transform: translateY(-1px); }
  .kpi-ico { transition: transform .2s ease; }
  .signal.kpi:hover .kpi-ico { transform: scale(1.08) rotate(-4deg); }
}

/* load balance: a ratio on a zoned range scale. Your value sits in a callout above; the zone you're in is in full colour */
.lbs { position: relative; padding-top: 30px; margin-top: 2px; }
.lbs-call { position: absolute; top: 0; transform: translateX(-50%); }
.lbs-call span { display: block; font: 800 12px/1 var(--f-body); color: var(--surface); background: var(--ink); padding: 5px 8px; border-radius: 8px; white-space: nowrap; }
.lbs-call::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: var(--ink); }
.lbs.young .lbs-call span { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); outline: 1.5px dashed var(--muted); outline-offset: 2px; }
.lbs.young .lbs-call::after { border-top-color: var(--ink); }
.lbs-bar { display: flex; gap: 3px; height: 12px; }
.lbs-bar span { border-radius: 3px; background: color-mix(in srgb, var(--z) 28%, var(--surface)); }
.lbs-bar span.on { background: var(--z); }
.lbs-bar span:first-child { border-radius: 999px 3px 3px 999px; } .lbs-bar span:last-child { border-radius: 3px 999px 999px 3px; }
.lbs-names { display: flex; gap: 3px; margin-top: 5px; }
.lbs-names span { text-align: center; font: 500 11px var(--f-body); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: clip; }
.lbs-names span.on { font-weight: 800; color: var(--t); }
@media (prefers-reduced-motion: no-preference) { .lbs-bar span { transform-origin: 0 50%; animation: td-grow-x .6s cubic-bezier(.2,.8,.2,1) both; } .lbs-call { animation: td-fade .4s ease .55s both; } }
.signal.kpi .sg { align-self: stretch; width: 100%; }

/* ---------------- hover: cards lift with a deeper shadow; off with reduced motion and while editing a dashboard */
@media (prefers-reduced-motion: no-preference) {
  .signal.kpi, .card, .rv-chart, .nw, .th { transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s ease; }
  .signal.kpi:hover, .nw:hover, .th:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
  main .card:not(.review):not(:has(.card)):hover, .rv-chart:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
  .dash-grid.editing .card:hover, .drawer .card:hover, .modal:hover { transform: none; box-shadow: var(--shadow); }
  .kpi-viz { transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
  .signal.kpi:hover .kpi-viz { transform: scale(1.06); }
  .signal.kpi:hover .lbs-bar span.on { filter: saturate(1.2) brightness(1.04); }
}
/* a calendar card waiting for TrainingPeaks to confirm a change */
@keyframes td-saving { 50% { opacity: 0.45; } }
/* a recording file from the computer held over a finished session (card, quick view, the session page's summary) */
/* a session shown before its save ends (calLocal): it pulses (.saving) and can't be opened yet */
.wc-wrap[data-wid^="local-"] { pointer-events: none; }
.rec-over .wcard, .qv.rec-over, .sd-sum.rec-over { outline: 2px dashed var(--accent) !important; outline-offset: 2px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.sd-rec { margin: 0; font-size: 12.5px; color: var(--muted); }
.sd-rec b { color: var(--ink-2); font-weight: 600; }
.lnk { border: 0; padding: 0; background: none; font: inherit; color: var(--accent-text, var(--accent)); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.lnk:hover, .lnk:focus-visible { color: var(--ink); outline: none; }
.sd-sum.saving { opacity: .6; pointer-events: none; }
.wc-wrap.saving { pointer-events: none; }
.wc-wrap.saving .wcard { opacity: 0.7; }
@media (prefers-reduced-motion: no-preference) { .wc-wrap.saving .wcard { animation: td-saving 1.1s ease-in-out infinite; } }

/* ---------------- calendar weekly summary: daily load bars and the intensity mix */
.wl { display: grid; gap: 4px; }
.wl-lh { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.wl-lh .dim { font-weight: 500; font-size: 10.5px; }
.wl-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; align-items: end; }
.wl-day { display: grid; gap: 2px; justify-items: center; }
.wl-col { position: relative; width: 100%; max-width: 16px; height: 34px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.wl-col i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 4px 4px 0 0; }
.wl-col .pl { background: color-mix(in srgb, var(--accent) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.wl-col .wl-dn { background: var(--accent); left: 3px; right: 3px; }
.wl-day em { font-style: normal; font-size: 10px; color: var(--muted); }
.wl-day.today em { color: var(--accent); font-weight: 700; }
.wl-mix { display: grid; gap: 4px; }
.wl-mixbar { position: relative; display: flex; gap: 2px; height: 8px; border-radius: 999px; overflow: visible; }
.wl-mixbar span:first-child { border-radius: 999px 0 0 999px; } .wl-mixbar span:last-of-type { border-radius: 0 999px 999px 0; }
.wl-mixbar span:only-of-type { border-radius: 999px; }
.wl-tgt { position: absolute; top: -3px; bottom: -3px; border: 1.5px solid var(--ink); border-radius: 4px; pointer-events: none; }
.wl-cap { font-size: 11px; color: var(--muted); }
.wl-cap .ok { color: var(--good-text); font-weight: 600; } .wl-cap .under, .wl-cap .over { color: var(--warn-text); font-weight: 600; }

/* ---------------- calendar week view: tall day columns, each session in full */
.cal.cal-week { grid-template-columns: repeat(7, minmax(150px, 1fr)) minmax(230px, 1.3fr); }
.cal.cal-week .day { min-height: 520px; padding: 10px; gap: 8px; }
.cal.cal-week .wcard { padding: 9px 10px 10px 11px; gap: 6px; }
.cal.cal-week .w-title { -webkit-line-clamp: 3; font-size: 13px; }
.w-struct { display: none; }
.w-struct.on { display: block; position: relative; height: 64px; margin: 2px -2px 0; border-radius: 6px; background: color-mix(in srgb, var(--surface) 70%, transparent); overflow: hidden; }
.w-struct .tip { white-space: nowrap; }
.w-effort { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.w-desc { font-size: 11.5px; line-height: 1.45; color: var(--ink-2); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; overflow: hidden; }
.cal.cal-week .wcard:hover .w-desc { -webkit-line-clamp: 30; }
#cal-view { margin-right: 6px; }

/* planning: workout library beside the calendar */
.cal-split { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.lib { width: 280px; position: sticky; top: 12px; max-height: calc(calc(100vh / var(--vz, 1)) - 24px); display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.lib[hidden] { display: none; }
.lib-head { display: flex; align-items: center; gap: 4px; }
.lib-head h3 { margin: 0 auto 0 0; font-size: 14px; }
.lib-head .btn { padding: 2px 8px; }
.lib-q, .lib-filters select { font: inherit; font-size: 13px; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 8px; min-width: 0; }
.lib-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lib-hint { margin: 0; }
.lib-list { list-style: none; margin: 0 -4px; padding: 0 4px; overflow-y: auto; display: grid; gap: 4px; align-content: start; min-height: 0; }
.lib-item { width: 100%; display: grid; line-height: 1.3; grid-template-columns: auto 1fr; gap: 1px 6px; align-items: start; text-align: left; font: inherit; font-size: 12.5px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--sc); border-radius: var(--radius); padding: 6px 8px; cursor: grab; }
.lib-item:hover { border-color: var(--muted); border-left-color: var(--sc); }
.lib-item[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: var(--accent); border-left-color: var(--sc); }
.lib-item .s-ico { grid-row: span 2; margin-top: 1px; }
.lib-name { font-weight: 600; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lib-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 11px var(--f-mono); font-variant-numeric: tabular-nums; color: var(--muted); }
.lib-more { padding: 6px 2px; }
body.lib-placing .cal .day { cursor: copy; }
body.lib-placing .cal .day:hover { outline: 2px dashed var(--accent); outline-offset: -3px; }
@media (max-width: 900px) { .cal-split { grid-template-columns: 1fr; } .lib { width: auto; position: static; max-height: calc(60vh / var(--vz, 1)); } }

/* while the library is open it takes the summary column's place: the days keep their width */
.cal-split:has(.lib:not([hidden])) .cal { min-width: 820px; grid-template-columns: repeat(7, minmax(112px, 1fr)); }
.cal-split:has(.lib:not([hidden])) .cal > .wkh, .cal-split:has(.lib:not([hidden])) .cal > .wk { display: none; }

/* planning: week actions */
.ws-tools { display: inline-flex; align-items: center; gap: 2px; }

.modal.wkf { width: min(560px, 100%); max-height: calc(calc(100vh / var(--vz, 1)) - 40px); overflow-y: auto; }
.wkf-sec { border: 0; border-top: 1px solid var(--grid); margin: 0; padding: 10px 0 0; display: grid; gap: 8px; }
.wkf-sec legend { font: 600 13px var(--f-body); padding: 0 6px 0 0; }
.wkf-sec textarea { font: inherit; font-size: 13.5px; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; resize: vertical; }
.wkf-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.wkf-presets .btn { font-size: 12.5px; padding: 4px 10px; }
.wkf-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; font-size: 13px; }
.wkf-row .fine { flex: 1 1 240px; }

.wkf-to input { font: inherit; font-size: 13px; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 6px; margin-left: 4px; }
.wkf-sec p { margin: 0; }

/* planning: session preview on hover */

.wp-head { display: flex; gap: 6px; align-items: flex-start; font-size: 13.5px; }
.wp-head b { color: var(--ink); flex: 1; text-align: left; }
.wp-head .s-ico { flex: none; margin-top: 2px; }

@keyframes td-pop { from { opacity: 0; transform: translateY(2px); } }

/* header figures coloured by meaning */
.t-val.tone-good { color: var(--good-text); } .t-val.tone-warn { color: var(--warn-text); } .t-val.tone-crit { color: var(--crit-text); }

/* weekly summary refinements: one-line head, centred daily-load bars */
.ws-head { flex-wrap: nowrap; }
.ws-phase { min-width: 0; flex: 1 1 auto; white-space: nowrap; }
.ws-phase .ws-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ws-phase .dim, .ws-tools { flex: none; white-space: nowrap; }
.wk.ws { grid-template-columns: minmax(0, 1fr); }

/* the week's call to action: ask the coach, shift or copy */
.ws-cta { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; font: 600 12.5px var(--f-body); cursor: pointer;
  color: var(--accent-ink); background: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius); }
.ws-cta:hover { filter: brightness(1.08); }
.ws-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the summary stays in view: week view fits more screens, and when the calendar must scroll sideways the summary column
   stays pinned to the right edge (overflow: clip keeps the rounded frame without making .cal its own scroll box) */
.cal { overflow: clip; }
.cal.cal-week { min-width: 960px; grid-template-columns: repeat(7, minmax(108px, 1fr)) minmax(216px, 1.2fr); }
.cal > .wkh, .cal > .wk { position: sticky; right: 0; z-index: 3; }
.cal > .wk { box-shadow: -8px 0 14px -10px rgb(0 0 0 / .35); }

/* sidebar toggle: an explicit button, the arrow shows which way the sidebar goes */
.rail-toggle { width: 100%; justify-content: flex-start; gap: 8px; padding: 7px 10px; border: 1px solid var(--border); background: transparent; color: var(--ink-2);
  font: 600 12.5px var(--f-body); text-transform: none; letter-spacing: 0; border-radius: var(--radius); }
.rail-toggle:hover { color: var(--ink); border-color: var(--muted); background: var(--wash); }
.rail-toggle .rt-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rail-toggle .rt-chev { transform-box: fill-box; transform-origin: center; transition: transform 160ms; }
html.rail-collapsed .rail-toggle { width: 40px; height: 36px; justify-content: center; padding: 0; }
html.rail-collapsed .rail-toggle .lbl { display: none; }
html.rail-collapsed .rail-toggle .rt-chev { transform: scaleX(-1); }
@media (prefers-reduced-motion: reduce) { .rail-toggle .rt-chev { transition: none; } }

/* logo: rounded square, a ridge and two rising trail lines, drawn in the accent */
.brand-mark { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--logo, var(--accent)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  background: none; clip-path: none; border-radius: 0; }
.telemetry .brand { --logo: #8ea2ff; }

/* training views: one segmented bar, the active view a filled pill */
.subtabs { width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; gap: 2px; padding: 4px; margin-bottom: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.subtabs a { padding: 7px 16px; border-radius: 9px; white-space: nowrap; }
.subtabs a[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.subtabs a[aria-selected="true"] .tab-dot { background: var(--accent-ink); }
.subtabs { position: static; }  /* scrolls away with the page */

/* settings: coach style, four cards to pick from */
.cs { display: grid; gap: 10px; margin-bottom: 18px; }

.cs-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .cs-opts { grid-template-columns: 1fr; } }
.cs-opt { position: relative; display: grid; align-content: start; gap: 3px; padding: 10px 12px 11px 34px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.cs-opt:hover { border-color: var(--muted); }
.cs-opt input { position: absolute; left: 12px; top: 12px; margin: 0; accent-color: var(--accent); }
.cs-opt b { font-size: 13.5px; color: var(--ink); }
.cs-opt span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.cs-opt:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.cs-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* per-chart period: a chip in the chart's (or section's) header with a small menu */
.ch-tools, .sec-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.sec-head:has(.rchip) { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rchip { position: relative; flex: none; }
.rchip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; font: 600 12.5px var(--f-body); color: var(--ink-2); cursor: pointer; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.rchip-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; color: var(--accent-text); }
.rchip-btn:hover, .rchip-btn[aria-expanded="true"] { color: var(--ink); border-color: var(--accent); }
.rchip-car { font-size: 10px; color: var(--muted); }
.rchip-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: 230px; display: grid; gap: 2px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 30px rgb(0 0 0 / .18); }
.rchip-menu > button { text-align: left; font: 500 13px var(--f-body); color: var(--ink-2); background: none; border: 0; border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.rchip-menu > button:hover, .rchip-menu > button:focus-visible { background: var(--wash); color: var(--ink); }
.rchip-menu > button[aria-checked="true"] { background: var(--accent-tint); color: var(--accent-text); font-weight: 600; }
.rchip-custom { display: grid; gap: 6px; margin-top: 4px; padding: 8px 4px 2px; border-top: 1px solid var(--grid); font-size: 12px; color: var(--muted); }
.rchip-custom label { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 6px; }
.rchip-custom input { font: inherit; font-size: 12.5px; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px; min-width: 0; }
.rchip-custom .btn { justify-self: end; padding: 4px 12px; font-size: 12.5px; }
.is-busy { opacity: .5; transition: opacity .15s; pointer-events: none; }

/* intensity mix: one 100% bar (easy / moderate / hard), the easy target marked */

.imx-key { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.imx-key i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.imx-key .imx-v { color: var(--ink); font: 700 12px var(--f-body); }
.imx-key small { font-size: 10.5px; }

/* weekly review: the blocking "coach is writing" popup */
.rv-wait .modal { width: min(400px, 100%); justify-items: center; text-align: center; padding: 28px 26px 24px; outline: none; }
.rv-wait .modal p { margin: 0; }
.rv-wait .modal-actions { justify-self: stretch; }
.spin.big { width: 34px; height: 34px; border-width: 3px; }
/* a raw (unparsed) analysis wraps instead of stretching the review */
.rv-analysis { min-width: 0; }
.rv-analysis pre { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }

/* coach style cards with portraits: the photo, a label pill in the coach's colour, a one-line summary */
.cs-opts { gap: 10px; }
.cs-opt { padding: 0; overflow: hidden; gap: 0; border-radius: 12px; }
.cs-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cs-pic { position: relative; display: block; aspect-ratio: 590 / 464; background: var(--surface-2); }
.cs-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.cs-opt:hover .cs-pic img { transform: scale(1.03); }
.cs-opt .cs-tag { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 5px; border-radius: 999px;
  font: 700 12.5px var(--f-body); color: #fff; background: color-mix(in srgb, var(--cc) 88%, transparent); backdrop-filter: blur(4px); }
.cs-tag svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: rgb(255 255 255 / .18); fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cs-opt[data-k="army"] { --cc: #3f4b38; } .cs-opt[data-k="scientific"] { --cc: #4a5fe6; }
.cs-opt[data-k="balanced"] { --cc: #2c7a62; } .cs-opt[data-k="soft"] { --cc: #b2677d; }
.cs-opt .cs-check { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; display: none; place-items: center; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font: 800 13px/1 var(--f-body); box-shadow: 0 2px 6px rgb(0 0 0 / .25); }
.cs-sum { display: block; padding: 8px 11px 10px; font-size: 12px; color: var(--muted); line-height: 1.35; }
.cs-opt:has(input:checked) .cs-check { display: grid; }
.cs-opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); background: var(--surface); }
.cs-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .cs-pic img { transition: none; } }
/* four coaches side by side; two by two on narrow screens */
.cs-opts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cs-pic { aspect-ratio: 4 / 5; }
.cs-pic img { object-position: 50% 20%; }
.cs-opt .cs-tag { left: 6px; right: 6px; bottom: 6px; justify-content: flex-start; font-size: 12px; padding-right: 8px; }
@media (max-width: 640px) { .cs-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* settings: a centred popup, one collapsible section per topic (profile first) */
.ss-car { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.ss-zones { display: grid; gap: 12px; }
.ss-zones .card { box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .ss-car { transition: none; } }
/* the review's call to action: talk it through with the coach */
.rv-discuss { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; font-weight: 700; flex: none; }
.rv-discuss svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
/* actions that hand something to the coach: one recognisable style everywhere (accent tint, ✨) */
.btn.coach-cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent-text, var(--ink));
  background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.btn.coach-cta:hover { background: color-mix(in srgb, var(--accent) 20%, var(--surface)); border-color: var(--accent); }
.ws-big .ws-ahead { color: var(--accent-text); font-weight: 600; }

/* ATP training blocks: grouped by race cycle, one compact row per block */
.tb { display: grid; gap: 8px; }
.tb-cycle { border: 1px solid var(--border); border-radius: 12px; }
.tb-cycle > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; border-radius: 12px; }
.tb-cycle > summary::-webkit-details-marker { display: none; }
.tb-cycle > summary:hover { background: var(--wash); }
.tb-cycle[open] > summary { border-bottom: 1px solid var(--grid); border-radius: 12px 12px 0 0; }
.tb-cycle[open] > summary .ss-car { transform: rotate(180deg); }
.tb-cycle .ss-car { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.tb-ct { font: 700 14px var(--f-body); color: var(--ink); }
.tb-cs { margin-left: auto; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tb-list { list-style: none; margin: 0; padding: 4px 6px 6px; }
.tb-row { display: grid; grid-template-columns: minmax(0, 1.6fr) 130px 90px 48px 78px 64px; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: 13px; }
.tb-row + .tb-row { border-top: 1px solid var(--grid); }
.tb-row.now { background: color-mix(in srgb, var(--accent) 8%, transparent); border-top-color: transparent; }
.tb-row.now + .tb-row { border-top-color: transparent; }
.tb-row.past { opacity: .6; }
.tb-name { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); min-width: 0; flex-wrap: wrap; }
.tb-name em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--muted); }
.tb-race { font-weight: 500; font-size: 12px; color: var(--muted); }
.tb-name .chip { font-size: 11px; }
.tb-dates { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tb-spark { display: flex; align-items: flex-end; }
.tb-num { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tb-num b { color: var(--ink); }
@media (max-width: 760px) { .tb-row { grid-template-columns: minmax(0, 1fr) auto auto; } .tb-dates, .tb-spark, .tb-row .tb-num.dim { display: none; } }
@media (prefers-reduced-motion: reduce) { .tb-cycle .ss-car { transition: none; } }

/* Ask Coach: the chosen coach's portrait beside its replies and in the header */
.ava { width: 34px; height: 34px; flex: none; border-radius: 50%; background-color: var(--surface-2); background-repeat: no-repeat;
  background-size: 250%; background-position: 50% 16%; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border); }
.ava.lg { width: 44px; height: 44px; }
/* each coach's face centred in the circle (photo 480x377 at 250%: a 192 px window, x% = left/288, y% = top/185) */
.ava[data-coach="army"] { background-position: 52% 11%; } .ava[data-coach="scientific"] { background-position: 49% 16%; }
.ava[data-coach="balanced"] { background-position: 49% 10%; } .ava[data-coach="soft"] { background-position: 49% 17%; }
.turn.assistant { grid-template-columns: 34px minmax(0, 1fr); align-items: start; column-gap: 12px; }
.turn.assistant > .ava { position: sticky; top: 8px; }
.turn-body { display: grid; gap: 10px; min-width: 0; }
.turn.assistant .who { text-transform: none; letter-spacing: 0; font: 700 12.5px var(--f-body); color: var(--ink); }
.c-chat-head { align-items: center; }
.c-chat-head > .ava { margin-right: 4px; }
.c-with b { color: var(--ink); font-weight: 600; }

/* the coach's profile card (click a portrait in Ask Coach) */
button.ava { border: 0; padding: 0; cursor: pointer; }
button.ava:hover { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--accent); }
button.ava:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.modal.cc { width: min(440px, 100%); padding: 0; gap: 0; overflow: hidden; max-height: calc(calc(100vh / var(--vz, 1)) - 40px); overflow-y: auto; }
.cc-pic { position: relative; aspect-ratio: 480 / 300; background-size: cover; background-position: 50% 22%; }
.cc-x { position: absolute; top: 10px; right: 10px; background: rgb(0 0 0 / .45); color: #fff; border-color: transparent; }
.cc-x:hover { background: rgb(0 0 0 / .6); color: #fff; }
.cc-body { display: grid; gap: 8px; padding: 16px 20px 18px; }
.cc-body h3 { margin: 0; font-size: 20px; }
.cc-body p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.cc-body .cc-tag { font-weight: 700; color: var(--accent-text, var(--accent)); }
.cc-body h4 { margin: 6px 0 0; font-size: 12.5px; color: var(--ink); }
.cc-traits { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: 13px; color: var(--ink-2); }
.cc-quote { margin: 4px 0 0; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--wash); border-radius: 6px; font-size: 13px; font-style: italic; color: var(--ink-2); }
.c-chat-head > button.ava { margin-right: 4px; }

/* ATP training blocks: a row opens into the block's purpose, numbers, weeks and a coach CTA */
.tb-row { grid-template-columns: minmax(0, 1.6fr) 130px 90px 48px 78px 64px 16px; cursor: pointer; }
.tb-row:hover { background: var(--wash); }
.tb-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tb-row .ss-car { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.tb-row.open .ss-car { transform: rotate(180deg); }
.tb-row.open { background: var(--wash); border-radius: 8px 8px 0 0; }
.tb-detail { display: grid; gap: 12px; margin: 0 0 8px; padding: 12px 14px 14px; background: var(--wash); border-radius: 0 0 8px 8px; border-left: 3px solid var(--c); }
.tb-purpose { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.tb-purpose b { color: var(--ink); }
.tb-stats { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.tb-weeks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tb-wk { width: 100%; display: grid; grid-template-columns: 44px 70px 170px minmax(0, 1fr); gap: 4px 10px; align-items: center; text-align: left; font: inherit; font-size: 12.5px;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.tb-wk:hover { border-color: var(--muted); }
.tb-weeks li.now .tb-wk { border-color: var(--accent); }
.tb-weeks li.past .tb-wk { opacity: .7; }
.tb-wn { font-weight: 700; color: var(--ink); }
.tb-wd, .tb-wh { font-variant-numeric: tabular-nums; }
.tb-wh b { color: var(--ink); }
.tb-wt { display: flex; flex-wrap: wrap; gap: 4px; }
.tb-wnote { grid-column: 2 / -1; font-size: 12px; color: var(--muted); line-height: 1.4; }
.tb-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
@media (max-width: 760px) { .tb-row { grid-template-columns: minmax(0, 1fr) auto auto 16px; } .tb-wk { grid-template-columns: 44px 1fr; } .tb-wt, .tb-wnote { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .tb-row .ss-car { transition: none; } }

/* first-run welcome on Overview: three steps, ticked off as they happen */
.welcome { display: grid; gap: 14px; padding: 18px 20px; margin-bottom: 14px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  background: linear-gradient(0deg, var(--surface), color-mix(in srgb, var(--accent) 6%, var(--surface))); }
.welcome[hidden] { display: none; }
.wl-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.wl-top h2 { margin: 0; font-size: 20px; }
.wl-top p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }
.wl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wl-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); }
.wl-steps li.next { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.wl-steps li.done { opacity: .65; }
.wl-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--f-body); background: var(--surface-2); color: var(--ink-2); }
.wl-steps li.next .wl-n { background: var(--accent); color: var(--accent-ink); }
.wl-steps li.done .wl-n { background: var(--good); color: #fff; }
.wl-steps h3 { margin: 0; font-size: 14.5px; }
.wl-steps p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; max-width: 70ch; }
.wl-steps .btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.wl-ok { font-size: 12.5px; font-weight: 600; color: var(--good-text); }
@media (max-width: 760px) { .wl-steps li { grid-template-columns: 30px minmax(0, 1fr); } .wl-steps li > :last-child { grid-column: 2; justify-self: start; } }

/* sign-in: a calm full-screen card in front of the app */
.signin { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--accent) 14%, var(--bg)), var(--bg)); }
.si-card { width: min(400px, 100%); display: grid; gap: 14px; padding: 28px 26px 24px; border-radius: 16px; box-shadow: 0 20px 50px rgb(0 0 0 / .18); }
.si-brand { display: flex; align-items: center; gap: 9px; font: 800 14px var(--f-body); letter-spacing: .02em; color: var(--ink); }
.si-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
a.si-brand { text-decoration: none; }
.si-site { font-size: 12.5px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.si-site:hover, .si-site:focus-visible { color: var(--ink); text-decoration: underline; }
.si-brand .brand-mark { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.si-card h1 { margin: 6px 0 0; font: 800 24px var(--f-body); text-transform: none; letter-spacing: -0.01em; }
.si-sub { margin: -6px 0 4px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.si-card .fld { display: grid; gap: 5px; }
.si-card input { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.si-card input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.si-go { padding: 11px 14px; font-weight: 700; margin-top: 4px; }

.si-switch { margin: 2px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.si-switch button { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--accent-text, var(--accent)); cursor: pointer; }
.si-switch button:hover { text-decoration: underline; }
.si-card input[name="code"] { font-family: var(--f-mono, ui-monospace); letter-spacing: .08em; text-transform: uppercase; }
/* email codes, password reset, help line */
.si-card input.si-otp { font: 700 24px var(--f-mono, ui-monospace); letter-spacing: .32em; text-align: center; padding: 12px; }
.si-sub b { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.si-note { margin: -4px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--wash); font-size: 12.5px; color: var(--muted); }
.si-alt { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.si-alt button, .si-forgot { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent-text, var(--accent)); cursor: pointer; }
.si-alt button:disabled { color: var(--muted); cursor: default; }
.si-alt button:not(:disabled):hover, .si-forgot:hover { text-decoration: underline; }
.si-forgot { justify-self: end; margin-top: 2px; }
.si-change { display: grid; gap: 8px; padding: 12px; border-radius: 10px; background: var(--wash); }
.si-change[hidden] { display: none; }
.si-help { margin: 0; padding-top: 12px; border-top: 1px solid var(--border); text-align: center; font-size: 12.5px; color: var(--muted); }
.si-help a { color: inherit; font-weight: 600; }
.form-err.ok { color: var(--good-text); }

/* settings: TrainingPeaks link and invites */
#set-tp p, #set-invite p { margin: 0; font-size: 13.5px; line-height: 1.5; }

.tpc-steps { margin: 0; padding-left: 20px; font-size: 13px; color: var(--ink-2); display: grid; gap: 3px; }
.tpc-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tpc-row select, .tpc-row input { font: inherit; font-size: 13.5px; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; min-width: 0; flex: 1 1 200px; }
.tpc-row select { flex: 0 0 auto; }
.tpc-paste summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.tpc-paste[open] { display: grid; gap: 8px; }
.tpc-paste code { font-size: 12px; }
.inv-new { display: grid; gap: 6px; padding: 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); }
.inv-code { font: 800 20px var(--f-mono, ui-monospace); letter-spacing: .1em; color: var(--ink); }

.tpc-acc { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; }
.tpc-acc.taken { opacity: .6; }

/* TrainingPeaks sign-in expired */
.tp-expired { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 24px 0; padding: 10px 14px;
  border-radius: 12px; font-size: 13.5px; background: color-mix(in srgb, var(--warn) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--border)); }
.tpc-bad::before { content: "●"; color: var(--warn); margin-right: 6px; }
.error [data-tp-reconnect] { margin-top: 8px; justify-self: start; }

/* sign-in backdrop: drifting ridges and a runner on the trail (still when motion is reduced) */
.signin { overflow: hidden; }
.si-card { position: relative; z-index: 1; }
.si-scene { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 72%; pointer-events: none; }
.si-ridge path { fill: color-mix(in srgb, var(--accent) 10%, transparent); }
.si-ridge.r2 path { fill: color-mix(in srgb, var(--accent) 16%, transparent); }
.si-hill { fill: color-mix(in srgb, var(--accent) 24%, var(--bg)); }
.si-trail { fill: none; stroke: var(--accent); stroke-opacity: .55; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 14; }
.si-runner { offset-path: path("M-40 560 C 180 540, 260 470, 420 455 S 700 360, 860 330 S 1120 250, 1260 270 S 1500 330, 1660 300"); offset-rotate: 0deg; }
.si-runner circle { fill: var(--accent); }
.si-runner .si-glow { fill: color-mix(in srgb, var(--accent) 30%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .si-ridge { animation: si-drift 140s linear infinite; }
  .si-ridge.r2 { animation-duration: 80s; }
  .si-trail { animation: si-dash 1.2s linear infinite; }
  .si-runner { animation: si-run 16s cubic-bezier(.45, .05, .55, .95) infinite; }
  .si-glow { animation: si-pulse 1.1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
}
@media (prefers-reduced-motion: reduce) { .si-runner { offset-distance: 62%; } }
@keyframes si-drift { to { transform: translateX(-1600px); } }
@keyframes si-dash { to { stroke-dashoffset: -16; } }
@keyframes si-run { from { offset-distance: 0%; opacity: 0; } 6% { opacity: 1; } 94% { opacity: 1; } to { offset-distance: 100%; opacity: 0; } }
@keyframes si-pulse { 50% { transform: scale(1.5); opacity: .35; } }

/* welcome flow (after joining): steps on the sign-in backdrop */
.ob-card { width: min(460px, 100%); }

.ob-body { display: grid; gap: 12px; }
.ob-body h1 { margin: 4px 0 0; font: 800 22px var(--f-body); text-transform: none; letter-spacing: -0.01em; }
.ob-found { display: grid; gap: 8px; }
.ob-wait { display: flex; align-items: center; gap: 8px; margin: 4px 0; color: var(--muted); font-size: 13.5px; }
.ob-acc { margin: 0; font-size: 14px; }
.ob-drop { display: grid; place-items: center; gap: 2px; padding: 22px 14px; border: 2px dashed var(--border); border-radius: 14px; cursor: pointer; text-align: center; background: var(--wash); }
.ob-drop b { color: var(--accent-text, var(--accent)); } .ob-drop span { font-size: 12.5px; color: var(--muted); }
a.si-go { display: flex; justify-content: center; text-decoration: none; }
.ob-files { margin-top: 14px; } .ob-files summary { cursor: pointer; font-size: 13px; color: var(--muted); } .ob-files[open] summary { margin-bottom: 8px; }
.ob-drop.over, .ob-drop:hover { border-color: var(--accent); } .ob-drop.busy { opacity: .6; pointer-events: none; }
.ob-drop[hidden] { display: none; }
/* the Sessions step when sessions are already there: the other ways in, folded, as one list of two rows, each a title,
   a line and its button on the right (the files button also takes a drop) */
.ob-more .ob-list { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ob-more .ob-opt { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; padding: 12px 14px; }
.ob-more .ob-opt + .ob-opt { border-top: 1px solid var(--border); }
.ob-more .ob-opt b { display: block; font-size: 14px; color: var(--ink); }
.ob-more .ob-opt span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.ob-more .ob-opt-go, .ob-more .ob-drop.ob-drop-sm { width: 172px; box-sizing: border-box; justify-content: center; white-space: nowrap; font: 600 13px/1 var(--f-body);
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--ink); text-decoration: none; }
.ob-more .ob-drop.ob-drop-sm { display: inline-flex; gap: 0; }
.ob-more .ob-drop.ob-drop-sm b { font: inherit; color: inherit; margin: 0; } .ob-more .ob-drop.ob-drop-sm span { display: none; }
.ob-more .ob-opt-go:hover, .ob-more .ob-drop.ob-drop-sm:hover, .ob-more .ob-drop.ob-drop-sm.over { border-color: var(--accent); color: var(--accent-text, var(--accent)); }
@media (max-width: 420px) { .ob-more .ob-opt { grid-template-columns: 1fr; gap: 10px; } .ob-more .ob-opt-go, .ob-more .ob-drop.ob-drop-sm { justify-self: start; } }
.ob-prog { display: grid; gap: 6px; } .ob-prog p { margin: 0; color: var(--ink-2); }
.ob-prog[hidden] { display: none; }
.ob-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ob-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .4s ease; }
.ob-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* welcome flow: goal race and season plan */
.ob-race { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--wash); }
.ob-race p { margin: 0; font-size: 14px; line-height: 1.45; }
.ob-flag { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font: 800 14px var(--f-body); background: var(--accent); color: var(--accent-ink); }
.ob-flag.plan { background: var(--s1); }

.si-card select { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.ob-unit { position: relative; display: grid; }
.ob-unit input { padding-right: 34px; }
.ob-unit em { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 13px; color: var(--muted); pointer-events: none; }

.ob-plan { height: 92px; display: flex; align-items: flex-end; gap: 2px; padding: 6px 0 0; border-bottom: 1px solid var(--border); }
.ob-plan i { flex: 1; min-width: 2px; border-radius: 2px 2px 0 0; opacity: .85; position: relative; }
.ob-plan i.race { opacity: 1; }
.ob-plan i.race::after { content: ""; position: absolute; left: 50%; top: -9px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--accent); }
.ob-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; font-size: 12px; color: var(--muted); }
.ob-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ob-legend i { width: 9px; height: 9px; border-radius: 2px; }

.ob-back { justify-self: start; margin: -4px 0 -8px; padding: 2px 0; border: 0; background: none; font: 600 12.5px var(--f-body); color: var(--muted); cursor: pointer; }
.ob-back:hover { color: var(--ink); }
.ob-clean { display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.ob-clean label { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: var(--bg); }
.ob-clean label:has(input:checked) { border-color: var(--crit); background: color-mix(in srgb, var(--crit) 6%, var(--bg)); }
.ob-clean input { margin-top: 3px; accent-color: var(--crit); }
.ob-clean span { display: grid; gap: 1px; font-size: 13.5px; }
.ob-kept { list-style: none; margin: 0 0 4px; padding: 0; }
.ob-kept li { padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.ob-clean span .dim { font-size: 12px; }

/* settings: golden invite, delete account */

.acc-del-form { display: flex; flex-wrap: wrap; gap: 8px; }
.acc-del-form[hidden] { display: none; }
.acc-del-form input { flex: 1 1 180px; font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }

/* welcome flow: the coach conversation for the season (Ask Coach, embedded) */
.ob-card.wide { width: min(880px, 100%); }
.ob-coach .coach-app { height: min(calc(56vh / var(--vz, 1)), 560px); min-height: 320px; }
.ob-coach .c-chat-head { padding: 8px 12px; }
.ob-coach .c-chat-head h2 { font-size: 15px; }
@media (max-height: 700px) { .ob-coach .coach-app { height: calc(46vh / var(--vz, 1)); } }

/* coach: one panel for its work before answering (reasoning + sources read); a single live line, the timeline inside */
.work { border: 1px solid var(--border); border-radius: var(--radius); background: var(--wash); font-size: 13px; }
.work summary { cursor: pointer; list-style: none; display: grid; gap: 3px; padding: 7px 10px; color: var(--ink-2); }
.work summary::-webkit-details-marker { display: none; }
.w-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.w-head b { font-weight: 500; flex: none; }
.w-head .w-d { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-head::after { content: "▸"; margin-left: auto; color: var(--muted); font-size: 11px; flex: none; }
.work[open] .w-head::after { content: "▾"; }
.work .a-ok { color: var(--good-text); }
.w-prev { padding-left: 22px; color: var(--muted); font-style: italic; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.work[open] .w-prev { display: none; }
.w-list { padding: 6px 10px 9px 12px; border-top: 1px solid var(--border); display: grid; gap: 4px; max-height: 340px; overflow-y: auto; }
.w-think { color: var(--muted); font-style: italic; line-height: 1.5; padding: 2px 0 2px 10px; border-left: 2px solid color-mix(in srgb, var(--accent) 30%, var(--border)); }
.w-think p { margin: 0 0 4px; } .w-think p:last-child { margin: 0; }

/* welcome flow: the season questions */

.ob-qnav { justify-content: space-between; align-items: center; }

.ob-build { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.ob-build li { display: flex; align-items: center; gap: 10px; }

/* the tour: a spotlight that glides from part to part, with a note (and its arrow) that follows */
#tour { position: fixed; inset: 0; z-index: 300; --tour-ease: cubic-bezier(.22, .8, .24, 1); }
.tour-dim { position: fixed; inset: 0; width: 100%; height: 100%; animation: tour-fade .35s ease; }
.tour-shade { fill: rgb(10 14 30 / .58); }
.tour-ring { position: fixed; border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 2px var(--accent);
  transition: left .5s var(--tour-ease), top .5s var(--tour-ease), width .5s var(--tour-ease), height .5s var(--tour-ease); }
.tour-ring[hidden] { display: block; opacity: 0; }
.tour-ring.pulse::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 2px var(--accent); animation: tour-pulse 1.1s ease-out .45s 2; }
@keyframes tour-pulse { from { box-shadow: 0 0 0 2px var(--accent); opacity: .9; } to { box-shadow: 0 0 0 14px var(--accent); opacity: 0; } }
@keyframes tour-fade { from { opacity: 0; } }
.tour-tip { position: fixed; left: 50%; top: 50%; width: min(330px, calc(calc(100vw / var(--vz, 1)) - 24px)); display: grid; gap: 8px; padding: 14px 16px 12px; border-radius: 14px;
  box-shadow: 0 18px 44px rgb(0 0 0 / .28); transition: left .5s var(--tour-ease), top .5s var(--tour-ease); animation: tour-fade .3s ease; }
.tour-body { display: grid; gap: 6px; transition: opacity .14s ease, transform .14s ease; }
.tour-body.swap { opacity: 0; transform: translateY(4px); }
.tour-tip h3 { margin: 0; font-size: 16px; }
.tour-tip p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.tour-wait { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.tour-chs { display: flex; gap: 4px; }
.tour-chs button { flex: 1; height: 5px; padding: 0; border: 0; border-radius: 99px; background: var(--surface-2, var(--wash)); cursor: pointer; transition: background .3s ease; }
.tour-chs button.done { background: color-mix(in srgb, var(--accent) 45%, var(--surface-2, var(--wash))); }
.tour-chs button.now { background: var(--accent); }
.tour-chs button:hover { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }
.tour-caret { position: absolute; width: 12px; height: 12px; background: inherit; transform: rotate(45deg); display: none; }
.tour-tip[data-side="left"] .tour-caret { display: block; left: -6px; margin-top: -6px; }
.tour-tip[data-side="top"] .tour-caret { display: block; top: -6px; margin-left: -6px; }
.tour-tip[data-side="bottom"] .tour-caret { display: block; bottom: -6px; margin-left: -6px; }
.tour-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
.tour-nav span { display: flex; gap: 6px; }
.tour-next { display: grid; gap: 6px; }
.tour-next button { display: grid; gap: 1px; text-align: left; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); cursor: pointer; font: inherit; color: var(--ink); transition: border-color .15s, transform .15s; }
.tour-next button:hover { border-color: var(--accent); transform: translateX(2px); }
.tour-next b { font-size: 13.5px; } .tour-next span { font-size: 12px; color: var(--muted); }
.tour-offer { position: fixed; right: 20px; bottom: 20px; z-index: 250; width: min(300px, calc(calc(100vw / var(--vz, 1)) - 32px)); display: grid; gap: 4px; padding: 14px 16px 12px; border-radius: 14px; box-shadow: 0 16px 40px rgb(0 0 0 / .2); animation: tour-in .35s var(--tour-ease, ease); }
.tour-offer p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.tour-offer a.btn { text-decoration: none; }
@media (max-width: 760px) { .tour-offer { right: 16px; bottom: calc(var(--tabbar-h, 0px) + 16px + env(safe-area-inset-bottom)); } }  /* above the phone's tab bar */
@keyframes tour-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) {
  .tour-ring, .tour-tip, .tour-body, .tour-chs button { transition: none; }
  .tour-dim, .tour-tip, .tour-offer, .tour-ring.pulse::after { animation: none; }
}
.ob-card:has(.ob-qnav) { width: min(540px, 100%); }
.ob-body { min-width: 0; }

.tour-ring.snap, .tour-tip.snap { transition: none; }

/* ---------------- Settings page: a menu of sections, one section at a time */
.sp { display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-areas: "top top" "nav main"; gap: 22px 36px; max-width: 1080px; }
.sp-top { grid-area: top; display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.sp-top h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.01em; }
.sp-nav { grid-area: nav; display: grid; gap: 18px; align-content: start; position: sticky; top: calc(var(--banner-h) + 20px); }
.sp-group { display: grid; gap: 2px; }
.sp-g { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 10px 4px; }
.sp-nav a { display: grid; gap: 1px; padding: 7px 10px 8px; border-radius: 8px; text-decoration: none; color: var(--ink-2); border-left: 2px solid transparent; }
.sp-nav a[hidden] { display: none; }
.sp-nav a:hover { background: var(--wash); color: var(--ink); }
.sp-nav a.on { background: var(--accent-tint); color: var(--ink); border-left-color: var(--accent); border-radius: 0 8px 8px 0; }
.sp-nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sp-t { font-size: 14px; font-weight: 600; }
.sp-sum { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-sum:empty { display: none; }
.sp-main { grid-area: main; min-width: 0; }
.sp-pane[hidden] { display: none; }
.sp-head { margin-bottom: 18px; max-width: 64ch; }
.sp-head h2 { font-size: 20px; font-weight: 700; }
.sp-head p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.sp-body { display: grid; gap: 18px; }
.sp-body > .loading { padding: 20px 0; }

/* profile: the thresholds as one instrument strip, then label / value rows on hairlines */
.sp-body .th-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--border); box-shadow: none; }
.sp-body .th { padding: 14px 16px 15px; gap: 6px; }
.sp-body .th .micro { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.sp-body .th b { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }

/* zones: each zone set as a quiet block, no card chrome */
.sp-body .ss-zones { display: grid; gap: 22px; }
.sp-body .zcard { box-shadow: none; padding: 16px 18px; }

/* connection, account and invite rows read as setting rows */
.sp-body .tpc-row { padding: 2px 0; }

@media (max-width: 860px) {
  .sp { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "nav" "main"; gap: 14px; }
  .sp-nav { position: static; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
  .sp-group { display: contents; }
  .sp-g, .sp-sum { display: none; }
  .sp-nav a { white-space: nowrap; border-left: 0; border-radius: 999px; padding: 6px 12px; background: var(--surface); border: 1px solid var(--border); }
  .sp-nav a.on { border-radius: 999px; border-color: var(--accent); }
  .sp-body .th-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.sp-top h1 { font-size: 26px; text-transform: none; letter-spacing: -0.02em; }
/* the thresholds read as one instrument: a single band with hairline dividers, not five cards */
.sp-body .th-strip { gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sp-body .th-strip .th { border: 0; border-radius: 0; box-shadow: none; animation: none; transform: none; background: transparent; }
.sp-body .th-strip .th + .th { border-left: 1px solid var(--border); }
.sp-body .th-strip .th:hover { transform: none; box-shadow: none; }
@media (max-width: 860px) { .sp-body .th-strip .th:nth-child(3) { border-left: 0; } .sp-body .th-strip .th:nth-child(n+3) { border-top: 1px solid var(--border); } }
.sp-body .ss-zones .zcard:only-child .card-head h3 { display: none; }  /* the section already says which zones */
.sp-body .ss-zones .zcard:only-child .card-head { justify-content: flex-start; }
.sp-main, .sp-pane { display: block; }
.sp-pane[hidden] { display: none; }
.sp-body { align-content: start; }

/* settings rows: grouped in one surface, hairlines between, the action on the right */
.sgroup-h { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 6px 0 -10px; }
.sgroup { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 13px 16px; }
.srow + .srow, .sgroup > * + .srow, .sgroup > .srow + * { border-top: 1px solid var(--border); }
.srow-l { display: grid; gap: 3px; min-width: 0; max-width: 62ch; }
.srow-l b { font-size: 14px; font-weight: 600; color: var(--ink); }
.srow-l span { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.srow-v { color: var(--ink); font-weight: 500; font-size: 14px; font-variant-numeric: tabular-nums; }
.srow-l .srow-v { font-size: 12.5px; font-weight: 600; }
.srow-r { display: flex; align-items: center; gap: 8px; flex: none; }
.srow-wide { flex-wrap: wrap; }
.srow-wide .srow-r { flex: 1 1 320px; justify-content: flex-end; }
.srow-r input { font: inherit; font-size: 13.5px; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; min-width: 0; flex: 1 1 200px; max-width: 280px; }
.srow-muted .srow-l b { color: var(--ink-2); font-weight: 500; }
.spill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.spill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.spill.ok { color: var(--good-text); background: color-mix(in srgb, var(--good) 12%, transparent); }
.sgroup .inv-new { margin: 0 12px 12px; }
.srow-wide .srow-r:has(.inv-send) { flex-wrap: wrap; }
/* Settings → Notifications: a switch per kind */
.ntf-sw { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.ntf-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ntf-sw i { width: 38px; height: 22px; border-radius: 11px; background: var(--axis); position: relative; transition: background 0.15s; flex: none; }
.ntf-sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.ntf-sw input:checked + i { background: var(--accent); } .ntf-sw input:checked + i::after { transform: translateX(16px); }
.ntf-sw input:disabled + i { opacity: 0.45; } .ntf-sw:has(input:disabled) { cursor: default; }
.ntf-sw input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .ntf-sw i, .ntf-sw i::after { transition: none; } }
.inv-send { display: flex; align-items: center; gap: 7px; flex: 1 0 100%; justify-content: flex-end; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.srow-r .inv-send input { flex: none; width: 16px; height: 16px; padding: 0; margin: 0; accent-color: var(--accent); }
.inv-send[hidden] { display: none; }
.inv-sent { margin: 0; font-size: 13.5px; }
.inv-sent::before { content: "●"; color: var(--good); margin-right: 6px; }
/* Help → Contact */
.ct-form { display: grid; gap: 12px; padding: 16px; margin-top: 18px; }
.ct-form .sgroup-h { margin: 0; }
.ct-form .fld { display: grid; gap: 5px; }
.ct-form select { justify-self: start; font: inherit; font-size: 14px; padding: 7px 9px; }
.ct-form .fine { margin: 0; }
.ct-sent { display: grid; gap: 4px; justify-items: start; margin-top: 18px; padding: 16px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--good) 40%, var(--border)); background: color-mix(in srgb, var(--good) 8%, var(--surface)); }
.ct-sent span { font-size: 13.5px; color: var(--ink-2); }
.ct-sent .btn { margin-top: 8px; }
#set-contact a { color: var(--accent-text, var(--accent)); font-weight: 600; }
.danger-zone { border-color: color-mix(in srgb, var(--crit) 35%, var(--border)); }
.danger-zone .acc-del-form { justify-content: flex-end; flex-wrap: wrap; }
.danger-zone .acc-del-form[hidden] { display: none; }
.danger-zone .acc-del-form input { font: inherit; font-size: 13.5px; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; flex: 1 1 200px; max-width: 280px; }
.danger-zone .form-err { margin: 0 16px 12px; }
.sp-body .sgroup .srow-r .srow-v { text-align: right; }
@media (max-width: 640px) { .srow { flex-direction: column; align-items: stretch; } .srow-r { justify-content: flex-start; flex-wrap: wrap; } }
.srow-r a.btn { text-decoration: none; }

/* settings menu v2: each group its own panel, the tour its own call to action */
.sp-nav { gap: 12px; }
.sp-group { gap: 1px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.sp-g { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px; margin-bottom: 2px; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 700; color: var(--ink); }
.sp-g svg { width: 18px; height: 18px; padding: 3px; border-radius: 6px; background: var(--accent-tint); fill: none; stroke: var(--accent-text); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; box-sizing: content-box; }
.sp-nav a { border-left: 0; border-radius: 8px; }
.sp-nav a.on { border-radius: 8px; box-shadow: inset 3px 0 0 var(--accent); }
.sp-tour { display: grid; gap: 4px; padding: 14px 14px 12px; border-radius: var(--radius); color: var(--ink);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface) 70%); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); }
.sp-tour b { font-size: 14px; }
.sp-tour span { font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.sp-tour > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* profile v2: who you are, thresholds coloured by what they measure, details side by side */
.sp-id { display: flex; align-items: center; gap: 14px; }
.sp-ava { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 50%; font: 700 18px var(--f-display); letter-spacing: .02em;
  color: #fff; background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--s4))); }
.sp-id > div { display: grid; gap: 3px; }
.sp-id b { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.sp-id span { font-size: 13px; color: var(--muted); }
.sp-body .th-strip .th { position: relative; padding-top: 17px; }
.sp-body .th-strip .th::before { content: ""; position: absolute; left: 16px; right: 16px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--th-c, var(--border)); }
.sp-body .th-strip .th.pw { --th-c: var(--s4); } .sp-body .th-strip .th.hr { --th-c: var(--s5); } .sp-body .th-strip .th.pace { --th-c: var(--s3); }
.sp-body .th-strip .th .micro { color: color-mix(in srgb, var(--th-c, var(--muted)) 70%, var(--ink-2)); }
.sp-body .th-strip .th b small { color: var(--muted); }
.sp-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.sp-cols > div { display: grid; gap: 18px; }
.sp-cols .srow { padding: 10px 14px; }
.sp-cols .srow-l b { font-weight: 500; color: var(--muted); font-size: 13.5px; }
.sp-body .sgroup .srow-l b { font-weight: 500; }
.sp-src { margin: -6px 0 0; }
@media (max-width: 980px) { .sp-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .sp-group { display: contents; } .sp-g, .sp-tour { display: none; } }
.sp-id .sp-ava { color: #fff; font-size: 18px; }

/* zone editing: inputs, then the exact new zones next to the current ones */
.zcard .card-head { align-items: flex-start; }
.zedit-btn { margin-left: auto; }
.zcard.editing { box-shadow: 0 0 0 2px var(--accent-tint), 0 0 0 1px var(--accent); }
.zed { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 14px; }
.zed .fld { display: grid; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.zed input { font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 9px 44px 9px 12px; width: 150px; box-sizing: border-box; font-variant-numeric: tabular-nums; }
.zed input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.zed .ob-unit em { right: 10px; font-size: 12px; }
.zed-prev { min-height: 40px; }
.zed-prev .fine .spin { vertical-align: -2px; margin-right: 4px; }
.zcmp tr.chg td:last-child b { color: var(--accent-text); }
.zcmp td b { font-weight: 600; }
.zed-act { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.zed-act > span { flex: 1 1 260px; }
.sp-body .ss-zones .zcard.editing .card-head h3 { display: block; }
.zed-warn { margin: 10px 0 0; padding: 9px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45; color: var(--warn-text); background: color-mix(in srgb, var(--warn) 12%, transparent); }

/* your picture */
/* a person's picture is a span.ava; the coach's is a button.ava with its own photo rules above: keep them apart */
span.ava { display: grid; place-items: center; overflow: hidden; border-radius: 50%; flex: none; color: #fff; font-weight: 700;
  background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--s4))); box-shadow: none; }
span.ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.athlete { display: flex; align-items: center; gap: 10px; }
.athlete > div { min-width: 0; }

.sp-id .sp-ava { width: 64px; height: 64px; font-size: 21px; color: #fff; }
.sp-photo { position: relative; display: block; border-radius: 50%; cursor: pointer; }
.sp-photo-cta { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; background: rgb(10 14 30 / .55); color: #fff;
  font-size: 11.5px; font-weight: 700; opacity: 0; transition: opacity .15s ease; }
.sp-photo:hover .sp-photo-cta, .sp-photo:focus-within .sp-photo-cta { opacity: 1; }
.sp-photo:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }

.link { border: 0; background: none; padding: 0; font: inherit; color: var(--accent-text); font-weight: 600; cursor: pointer; }
.link:hover { text-decoration: underline; }
.sp-id .sp-photo-cta { color: #fff; }

/* photo framing */
.crop-back { z-index: 260; }
.crop { width: min(380px, calc(calc(100vw / var(--vz, 1)) - 32px)); display: grid; gap: 12px; justify-items: center; text-align: center; }
.crop h3 { margin: 0; font-size: 17px; }
.crop > p { margin: -6px 0 0; }
.crop-stage { position: relative; width: 300px; height: 300px; border-radius: 12px; overflow: hidden; cursor: grab; touch-action: none; background: var(--surface-2); }
.crop-stage.dragging { cursor: grabbing; }
.crop-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.crop-stage canvas { width: 300px; height: 300px; display: block; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 200px rgb(10 14 30 / .5); outline: 2px solid rgb(255 255 255 / .85); outline-offset: -1px; pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: 10px; width: 300px; color: var(--muted); font-weight: 700; }
.crop-zoom input { flex: 1; accent-color: var(--accent); }
.crop .modal-actions { width: 100%; justify-content: flex-end; }

/* signing in to TrainingPeaks in the server's browser */
.tps-back { z-index: 270; }
.tps { width: min(500px, calc(calc(100vw / var(--vz, 1)) - 16px)); max-height: calc(calc(100vh / var(--vz, 1)) - 16px); overflow: auto; display: grid; gap: 14px; padding: 18px; }
.tps-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tps-head h3 { margin: 0 0 4px; font-size: 18px; }
.tps-head p { margin: 0; max-width: 46ch; }
.tps-form, .tps-code { display: grid; gap: 12px; }
.tps-form[hidden], .tps-code[hidden], .tps-view[hidden], .tps-alt[hidden] { display: none; }
.tps .fld input { padding: 10px 12px; font-size: 15px; }
.tps-code-q { margin: 0; }
.tps-wait { display: flex; align-items: center; gap: 8px; margin: 0; min-height: 18px; }
.tps-wait[hidden], .tps-wait .spin[hidden] { display: none; }
.tps-alt { margin: 0; text-align: center; }
.tps-view { display: grid; gap: 10px; }
.tps-view-q { margin: 0; }
.tps-screen { position: relative; justify-self: center; width: 100%; max-width: 460px; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--border); }
.tps-screen canvas { display: block; max-width: 100%; touch-action: none; cursor: default; margin: 0 auto; }
.tps-kbd { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* you, top right */
.t-me { gap: 9px; padding: 0 16px 0 14px; text-transform: none; letter-spacing: 0; font-size: 13px; }
.t-me[hidden] { display: none; }
.ava-top { width: 32px; height: 32px; font-size: 12px; box-shadow: 0 0 0 2px var(--banner-bg), 0 0 0 3px var(--banner-line); }

.t-me-car { width: 14px; height: 14px; fill: none; stroke: var(--banner-muted); stroke-width: 2; stroke-linecap: round; transition: transform .15s ease; }
.t-me[aria-expanded="true"] .t-me-car { transform: rotate(180deg); }
.me-menu { position: fixed; z-index: 70; width: 250px; padding: 6px; display: grid; gap: 1px; box-shadow: 0 16px 40px rgb(0 0 0 / .22); border-radius: 12px; }
.me-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.me-head > div { display: grid; gap: 1px; min-width: 0; }
.me-head b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-head > div > span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ava-menu { width: 38px; height: 38px; font-size: 13px; }
.me-menu [role=menuitem] { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: none;
  font: 500 13.5px var(--f-body); color: var(--ink); text-decoration: none; cursor: pointer; }
.me-menu [role=menuitem]:hover, .me-menu [role=menuitem]:focus-visible { background: var(--wash); outline: none; }
.me-menu .me-out { margin-top: 4px; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; color: var(--crit-text); }
@media (max-width: 860px) { .t-me-car { display: none; } .t-me { padding: 0 10px; } }
.sgroup-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sg-link { font-size: 12.5px; font-weight: 600; color: var(--accent-text); text-decoration: none; }
.sg-link::after { content: " ↗"; }
.sg-link:hover { text-decoration: underline; }
.w-form { gap: 6px; }
.w-form .ob-unit input { width: 110px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 7px 34px 7px 10px; box-sizing: border-box; }
.w-form .ob-unit em { right: 10px; font-size: 12px; }
.ava-blank { background: var(--accent-tint); }
.ava-blank svg { width: 18px; height: 18px; fill: none; stroke: var(--accent-text); stroke-width: 1.8; stroke-linecap: round; }

/* you, top right: room for your picture and full name */
.t-me { gap: 11px; padding: 0 18px 0 16px; min-width: 190px; justify-content: flex-start; }
.t-me .ava-top { width: 36px; height: 36px; font-size: 13px; }
.t-me-text { display: grid; gap: 1px; text-align: left; min-width: 0; }
.t-me-text b { font-size: 13.5px; font-weight: 600; color: var(--banner-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.t-me-text small { font-size: 11px; font-weight: 500; color: var(--banner-muted); white-space: nowrap; }
.t-me .t-me-car { margin-left: auto; }
a.me-head { text-decoration: none; color: var(--ink); border-radius: 8px; }
a.me-head:hover, a.me-head:focus-visible { background: var(--wash); outline: none; }
.me-menu .me-strong { font-weight: 700; }
.me-menu.me-demo a[role=menuitem] { cursor: default; }  /* the demo: listed, not opened (05-shell) */
@media (max-width: 860px) { .t-me { min-width: 0; } .t-me-text, .t-me-car { display: none; } }
.me-menu a.me-head[role=menuitem] { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); border-radius: 8px 8px 0 0; }
.inv-gold-old { margin: 0 16px 12px; }
.wl-act { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.wl-act a.btn { text-decoration: none; }
#setup.setup { margin-bottom: 18px; }
@media (max-width: 640px) { .wl-steps li { grid-template-columns: 30px minmax(0, 1fr); } .wl-act { grid-column: 2; justify-content: flex-start; } }

/* welcome flow v3: the runner climbs with your progress to the summit flag */
.si-flag { display: none; }
.si-pole { stroke: var(--ink-2); stroke-width: 3; stroke-linecap: round; }
.si-pennant { fill: var(--accent); transform-box: fill-box; transform-origin: 0% 50%; transform: scaleX(.35); opacity: .55; transition: transform .8s cubic-bezier(.3, 1.4, .5, 1) .9s, opacity .4s ease .9s; }
.ob-shell { position: relative; z-index: 1; width: 100%; display: grid; place-items: center; }
/* the card's top row: the brand, and the time left at the other end */
.ob-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ob-left { margin: 0; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ob-card:has(.ob-exit) .ob-left { margin-right: 124px; }  /* clear of Finish later */
/* the season questions with "Your season" beside them */
.ob-card.ob-two { width: min(920px, 100%); }
.ob-card.ob-two .ob-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 26px; align-items: start; }
.ob-q { display: grid; gap: 12px; min-width: 0; }
.ob-prev { position: sticky; top: 0; display: grid; gap: 10px; padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.ob-prev-h { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.ob-prev-race { display: grid; gap: 2px; }
.ob-prev-race b { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.ob-prev-race span { font-size: 12.5px; color: var(--muted); }
.ob-prev-race em { font-style: normal; font-size: 22px; font-weight: 800; color: var(--accent-text); font-variant-numeric: tabular-nums; margin-top: 4px; }
.ob-prev-others { display: grid; gap: 2px; margin: 0; font-size: 12px; color: var(--ink-2); }

.ob-prev-warn { font-size: 12px; color: var(--warn-text); }
/* the coaches */
.ob-card.ob-wide { width: min(820px, 100%); }
.ob-coaches { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* the coach's first words */
.ob-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.ob-note-pic { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; flex: none; }
.ob-note b { font-size: 13px; }
.ob-note p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.ob-note .ob-wait { margin: 0; }
@media (max-width: 760px) { .ob-card.ob-two .ob-body { grid-template-columns: minmax(0, 1fr); } .ob-prev { position: static; } .ob-coaches { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .onboard .si-runner, .si-pennant { transition: none; } }

/* the climb: the steps on an elevation profile, the runner glides up to the summit flag at Ready */

.ob-climb { margin: 4px 0 6px; }
.ob-climb-art { position: relative; height: 64px; }
.ob-climb svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* the profile: a faint shade under the whole climb, a deeper one under the stretch done (fading to the base) */
.ob-climb-fill { fill: url(#ob-climb-shade); opacity: .5; }
.ob-climb-fill-done { fill: url(#ob-climb-shade); }
#ob-climb-shade stop:first-child { stop-color: color-mix(in srgb, var(--accent) 30%, transparent); }
#ob-climb-shade stop:last-child { stop-color: color-mix(in srgb, var(--accent) 0%, transparent); }
.ob-climb-line { fill: none; stroke: var(--border); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ob-climb-done { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ob-climb-art > span { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.ob-climb-art > .ob-climb-steps { inset: 0; width: auto; height: auto; }
.ob-climb-steps i { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 2px var(--border); }
.ob-climb-steps i.done { background: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.ob-climb-steps i.now { width: 12px; height: 12px; margin: -6px 0 0 -6px; background: var(--surface); box-shadow: 0 0 0 2.5px var(--accent); }
.ob-climb-me::before { content: ""; position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 26%, transparent); animation: si-pulse 1.1s ease-in-out infinite; }
.ob-climb-me::after { content: ""; position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.ob-climb-flag i { position: absolute; left: 0; bottom: 0; width: 2px; height: 24px; margin-left: -1px; background: var(--ink-2); border-radius: 1px; }
.ob-climb-flag b { position: absolute; left: 1px; bottom: 13px; width: 16px; height: 11px; background: var(--muted); clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform-origin: 0 50%; transform: scaleX(.4); transition: transform .7s cubic-bezier(.3, 1.5, .5, 1) .9s, background .3s ease .9s; }
.ob-climb.summit .ob-climb-flag b { transform: scaleX(1); background: var(--good); }
.ob-climb-labels { list-style: none; margin: 0; padding: 0; position: relative; height: 16px; }
.ob-climb-labels li { position: absolute; top: 2px; transform: translateX(-50%); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.ob-climb-labels li:first-child { transform: none; } .ob-climb-labels li:last-child { transform: translateX(-100%); }
.ob-climb-labels li.done { color: var(--ink-2); }
.ob-climb-labels li.now { color: var(--ink); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .ob-climb-me::before { animation: none; } .ob-climb-flag b { transition: none; } }

/* welcome flow form v2: clear fields, the goal race as a card, chips, a slider, errors where they belong */
.ob-q .fld { display: grid; gap: 6px; }
.ob-q .fld > span:first-child, .ob-q fieldset > legend { font-size: 13px; font-weight: 600; color: var(--ink-2); text-transform: none; letter-spacing: 0; }
.ob-q .opt { font-style: normal; font-weight: 500; color: var(--muted); margin-left: 4px; font-size: 12px; }
.ob-q input:not([type=radio]):not([type=checkbox]):not([type=range]), .ob-q select {
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--ink) 16%, var(--border)); border-radius: 10px; padding: 10px 12px; font-size: 14.5px; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease; }
.ob-q input:not([type=radio]):not([type=checkbox]):not([type=range]):hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--border)); }
.ob-q input:not([type=radio]):not([type=checkbox]):not([type=range]):focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.ob-q input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.ob-q .fld.bad input { border-color: var(--crit); box-shadow: 0 0 0 3px color-mix(in srgb, var(--crit) 14%, transparent); }

/* training time */

/* footer: where you are among the questions */
.ob-qnav { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--border); }

/* a tall card scrolls with the page; a short one stays centred */
.signin.onboard { display: block; overflow-y: auto; }
.signin.onboard .si-scene { position: fixed; }
.ob-shell { min-height: 100%; padding: 20px 0; box-sizing: border-box; }
.ob-qnav [data-go] { white-space: nowrap; }

/* planning the season with the coach (welcome flow): the conversation left, the proposal right */
.ob-convo { display: grid; gap: 16px; align-content: start; max-height: min(calc(52vh / var(--vz, 1)), 560px); overflow-y: auto; padding: 4px 4px 4px 0; overscroll-behavior: contain; }
.ob-convo .turn.user .bubble { max-width: 88%; }
.ob-convo .turn.user.brief .bubble { font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.ob-convo .turn.user.brief .bubble b { display: block; color: var(--ink); margin-bottom: 2px; }
.ob-ask { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.ob-ask textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; resize: vertical; min-height: 44px; }
.ob-ask textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.ob-prev-next { margin: 4px 0 0; }
.ob-prop-hours { margin: 2px 0 0; display: grid; gap: 2px; }
.ob-prop-hours b { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.ob-prop-hours span.dim { font-size: 12px; color: var(--muted); }
.ob-prop-sum { margin: 0; font-size: 13.5px; line-height: 1.5; }
.ob-prop-phases { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.ob-prop-phases b { color: var(--ink); }
.ob-prop-list b { font-size: 12.5px; }
.ob-prop-list ul { margin: 3px 0 0; padding-left: 18px; display: grid; gap: 2px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.ob-card.ob-two .ob-prev { max-height: calc(calc(100vh / var(--vz, 1)) - 140px); overflow-y: auto; }

/* ---------------------------------------------------------------- phones: tab bar, compact top bar, one column */
.tabbar { display: none; }
.dn-dow { display: none; }
@media (max-width: 760px) {
  :root { --banner-h: 56px; --tabbar-h: 60px; }
  .side { display: none; }
  .shell { grid-template-columns: 1fr; min-height: calc(calc(100vh / var(--vz, 1)) - var(--banner-h)); }
  main { padding: 16px 14px calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); gap: 18px; }
  /* top bar: the logo, the numbers sliding sideways, your photo */
  .telemetry { position: sticky; top: 0; padding-top: env(safe-area-inset-top); height: calc(var(--banner-h) + env(safe-area-inset-top)); overflow: hidden; }
  .telemetry .brand { width: auto; padding: 0 12px 0 14px; border-right: 0; }
  .telemetry .brand .lbl { display: none; }
  .t-data { overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .t-data::-webkit-scrollbar { display: none; }
  .t-seg { padding: 0 14px; scroll-snap-align: start; }
  .t-me { padding: 0 10px 0 6px; }
  .t-me .t-me-text, .t-me .t-me-car { display: none; }
  /* the sections, at the bottom */
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border); }
  .tabbar a { display: grid; justify-items: center; align-content: center; gap: 3px; text-decoration: none; color: var(--muted); font: 600 10.5px var(--f-body); letter-spacing: .01em; -webkit-tap-highlight-color: transparent; }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[aria-current="page"] { color: var(--accent-text, var(--accent)); }
  .tabbar a[aria-current="page"] svg { stroke-width: 2.2; }
  .tabbar a:active { transform: scale(.94); }
  /* headings and tabs that slide sideways instead of spilling out */
  .page-head { flex-wrap: wrap; gap: 10px; }
  .page-head h1 { font-size: 26px; }
  .subtabs { overflow-x: auto; scrollbar-width: none; max-width: 100%; flex-wrap: nowrap; }
  .subtabs::-webkit-scrollbar { display: none; }
  .subtabs a { flex: none; }
  .me-menu { width: min(280px, calc(calc(100vw / var(--vz, 1)) - 16px)); }
  .me-menu [role=menuitem] { padding: 11px 12px; }
  /* things that float above the page keep clear of the tab bar */
  .app-toast, .coach-dock { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); }
  .coach-dock { right: 10px; width: calc(calc(100vw / var(--vz, 1)) - 20px); }
}

/* phones: the calendar. Week = the days as a list (each in full), then the week summary; month = a compact grid
   where sessions are coloured bars and a tap opens that week */
@media (max-width: 760px) {
  #cal-lib, .cal-legend .bar.outline { display: none; }
  .sec-head .controls { flex-wrap: wrap; gap: 6px; }
  .cal-legend { gap: 4px 12px; font-size: 11.5px; }
  .cal-scroll { overflow: visible; }
  .cal.cal-week { display: flex; flex-direction: column; min-width: 0; gap: 0; background: none; border: 0; border-radius: 0; overflow: visible; }
  .cal.cal-week .hd { display: none; }
  .cal.cal-week .day { min-height: 0; padding: 10px 12px 12px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; gap: 8px; }
  .cal.cal-week .day.empty { padding: 8px 12px; flex-direction: row; align-items: center; }
  .cal.cal-week .day .dn { font-size: 14px; }
  .cal.cal-week .dn-dow { display: inline; color: var(--muted); font-weight: 700; }
  .cal.cal-week .day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
  .cal.cal-week .day.out { opacity: .65; }
  .cal.cal-week .day-add { position: absolute; right: 10px; top: 8px; opacity: 1; }
  .cal.cal-week .day { position: relative; }
  .cal.cal-week .mcard { flex-direction: row; flex-wrap: wrap; }
  .cal.cal-week .wk { display: grid; border: 1px solid var(--border); border-radius: 12px; margin: 4px 0 18px; padding: 12px 14px; }
  .cal.cal-week .wcard { width: 100%; }
  /* month: compact grid */
  .cal:not(.cal-week) { grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 0; }
  .cal:not(.cal-week) .wk, .cal:not(.cal-week) .hd.wkh { display: none; }
  .cal:not(.cal-week) .hd { padding: 6px 0; text-align: center; font-size: 9.5px; letter-spacing: .04em; }
  .cal:not(.cal-week) .day { min-height: 58px; padding: 4px 3px; gap: 3px; cursor: pointer; }
  .cal:not(.cal-week) .day-add, .cal:not(.cal-week) .mcard, .cal:not(.cal-week) .pill, .cal:not(.cal-week) .w-more { display: none; }
  .cal:not(.cal-week) .dn { font-size: 11px; text-align: center; }
  .cal:not(.cal-week) .dn-today { display: none; }
  .cal:not(.cal-week) .dn.is-today { justify-self: center; align-self: center; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 11px; }
  .cal:not(.cal-week) .day.today { outline: 0; box-shadow: none; }
  .cal:not(.cal-week) .wc-wrap { pointer-events: none; }
  .cal:not(.cal-week) .wcard { display: block; height: 5px; padding: 0; border-radius: 3px; overflow: hidden; font-size: 0; background: var(--sc, var(--accent)); border: 0; }
  .cal:not(.cal-week) .wcard.wc-planned { background: none; box-shadow: inset 0 0 0 1.5px var(--sc, var(--accent)); }
  .cal:not(.cal-week) .wcard > * { display: none; }
  .cal:not(.cal-week) .ecard { font-size: 0; padding: 0; text-align: center; }
  .cal:not(.cal-week) .ecard b { font-size: 11px; display: block; white-space: nowrap; overflow: hidden; }
}

/* phones: the dashboard's widgets take their content's height; Ask Coach fills the screen between the bars */
@media (max-width: 760px) {
  .dash-grid .dw { min-height: 0 !important; }
  .dw-resize { display: none; }
  main:has(.coach-app) { padding: 0 0 calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .coach-app { height: calc(calc(100dvh / var(--vz, 1)) - var(--banner-h) - var(--tabbar-h) - env(safe-area-inset-top) - env(safe-area-inset-bottom)); min-height: 0; border: 0; border-radius: 0; }
  .c-chat-head { padding: 8px 12px; gap: 8px; }
  .c-chat-head > .ava { width: 36px; height: 36px; margin-right: 0; }
  .c-chat-head h2 { font-size: 15px; }
  .c-chat-head .c-with { display: none; }
  .c-chat-head .btn { padding: 6px 10px; font-size: 13px; }
  .c-hint { display: none; }
  .ob-coach .coach-app { height: min(calc(56vh / var(--vz, 1)), 560px); }
}

/* phones: dashboard pages as chips; Ask Coach's past conversations */
.dash-tabs, .c-past-btn { display: none; }
@media (max-width: 760px) {
  .dash-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -4px -14px 0; padding: 0 14px 2px; }
  .dash-tabs::-webkit-scrollbar { display: none; }
  .dash-tabs a { flex: none; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
  .dash-tabs a.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  .dash-tabs a.dt-new { border-style: dashed; color: var(--accent-text, var(--accent)); background: none; }
  .c-past-btn { display: inline-flex; }
  .c-past-panel { max-height: calc(50vh / var(--vz, 1)); overflow-y: auto; border-bottom: 1px solid var(--border); background: var(--surface-2); display: grid; grid-template-columns: minmax(0, 1fr); }
  .c-past-panel[hidden] { display: none; }
  .c-past-panel a { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 12px 16px; border-bottom: 1px solid var(--grid); color: var(--ink); text-decoration: none; font-size: 14px; }
  .c-past-panel a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .c-past-panel a small { flex: none; color: var(--muted); font-size: 12px; }
  .c-past-panel a { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
  .c-past-ask { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--grid); background: color-mix(in srgb, var(--crit) 8%, var(--surface)); font-size: 13.5px; }
  .c-past-ask .btn.danger { background: var(--crit); color: var(--surface); border-color: var(--crit); }
  .c-past-ask span { flex: 1; min-width: 0; }
  .c-past-hint { padding: 10px 16px; font-size: 12px; margin: 0; }
  .c-past-panel a.on { font-weight: 700; }
  .c-past-empty { margin: 0; padding: 14px 16px; display: flex; gap: 8px; align-items: center; }
}

/* phones: iPhone zooms into any field under 16px when you tap it; the welcome climb's step names stay apart */
@media (max-width: 760px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), textarea, select { font-size: 16px !important; }
  .ob-climb-labels li { font-size: 10px; }
}

/* phones: the compact performance chart's end labels */
.pmc-compact .pmc-end-v { font: 700 13px var(--f-body); font-variant-numeric: tabular-nums; }
.pmc-compact .pmc-end-n { font: 500 10.5px var(--f-body); }
.pmc-compact .pmc-zone { fill: var(--ink-2); font-size: 9.5px; }
.pmc-compact .pmc-zone { paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }

/* phones: the top bar as one calm row. The logo sits on the bar itself (no dark block); the numbers slide sideways,
   Form first (the daily "am I fresh?"), each a small label over its value, no third line; your photo at the end */
@media (max-width: 760px) {
  .telemetry { align-items: center; }
  .telemetry .brand { background: none; color: var(--banner-ink); padding: 0 6px 0 14px; height: 100%; }
  .telemetry .brand { --logo: var(--accent); }
  .telemetry .brand .brand-mark { width: 26px; height: 26px; }
  .t-data { align-self: stretch; }
  .t-seg, .telemetry button.t-seg { padding: 0 12px; gap: 1px; border-right: 0; position: relative; }
  .t-seg + .t-seg::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: var(--banner-line); }
  .t-seg .micro { font-size: 10px; letter-spacing: .02em; max-width: 128px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .t-val, .t-race .t-val { font-size: 17px; }
  .t-val small { font-size: 10.5px; }
  .t-sub, .t-status, .t-sync { display: none; }
  .t-seg[data-pop="tsb"] { order: -3; } .t-seg[data-pop="ctl"] { order: -2; } .t-seg[data-pop="atl"] { order: -1; }
  .t-me { align-self: center; height: 44px; padding: 0 12px 0 8px; border-left: 0; }
  .t-me .ava-top { width: 32px; height: 32px; }
}

/* phones: Settings as a phone settings screen. The list: you on top, then grouped rows (name, current value,
   chevron), the tour at the end. A section: its own screen with "‹ Settings" back; rows stack their control under
   their words */
.sp-me, .sp-back { display: none; }
@media (max-width: 760px) {
  .sp { display: block; }
  .sp-top { padding-bottom: 10px; margin-bottom: 14px; }
  .sp-list .sp-main, .sp-detail .sp-nav, .sp-detail .sp-top { display: none; }
  .sp-list .sp-me { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid var(--border); border-radius: 14px;
    background: var(--surface); text-decoration: none; color: var(--ink); }
  .sp-me .ava { width: 52px; height: 52px; font-size: 18px; }
  .sp-me span { display: grid; gap: 2px; min-width: 0; }
  .sp-me b { font-size: 17px; }
  .sp-me small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sp-list .sp-nav { position: static; display: grid; gap: 20px; }
  .sp-list .sp-group { display: grid; gap: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
  .sp-list .sp-g { display: flex; align-items: center; gap: 6px; padding: 10px 16px 6px; font-size: 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
  .sp-list .sp-g svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .sp-list .sp-nav a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t c" "s c"; align-items: center; gap: 1px 10px;
    min-height: 52px; padding: 10px 14px 10px 16px; border: 0; border-radius: 0; border-left: 0; background: none; color: var(--ink); }
  .sp-list .sp-nav a + a { border-top: 1px solid var(--grid); }
  .sp-list .sp-nav a::after { content: ""; grid-area: c; width: 8px; height: 8px; border: solid var(--muted); border-width: 2px 2px 0 0; transform: rotate(45deg); }
  .sp-list .sp-nav a.on { background: none; }
  .sp-list .sp-t { grid-area: t; font-size: 15.5px; font-weight: 600; }
  .sp-list .sp-sum { display: block; grid-area: s; font-size: 13px; }
  .sp-list .sp-sum:empty { display: none; }
  .sp-list .sp-nav a.on { border-left: 0; background: none; }
  .sp-list .sp-group { padding: 0; margin: 0; }
  .sp-list .sp-g { margin: 0; }
  .sp-list .sp-tour { display: grid; gap: 8px; padding: 16px; border-radius: 14px; }
  /* one section */
  .sp-back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: -6px 0 6px -4px; padding: 0 4px; font-weight: 600; font-size: 15px;
    color: var(--accent-text, var(--accent)); text-decoration: none; }
  .sp-back::before { content: ""; width: 9px; height: 9px; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(45deg); }
  .sp-head { margin-bottom: 14px; }
  .sp-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
  .sgroup { border-radius: 14px; }
  .srow { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 16px; }
  .srow-l { max-width: none; }
  .srow-l b { font-size: 15px; }
  .srow-l span { font-size: 13.5px; }
  .srow-r { flex-wrap: wrap; }
  .srow-r .btn { min-height: 42px; }
  .sp-body .table-wrap { overflow-x: auto; }
}

/* phones: the calendar week as a strip of days, the week on one line, then the chosen day */
@media (max-width: 760px) {
  .cal-legend { display: none; }
  .cal-phone { display: grid; gap: 12px; }
  .cp-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 6px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
  .cp-d { display: grid; justify-items: center; gap: 2px; padding: 6px 0 7px; min-height: 64px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .cp-dow { font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
  .cp-n { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
  .cp-d.past .cp-n { color: var(--ink-2); }
  .cp-d.today .cp-n { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent-text, var(--accent)); }
  .cp-d[aria-selected="true"] .cp-n { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
  .cp-d[aria-selected="true"] .cp-dow { color: var(--accent-text, var(--accent)); }
  .cp-d:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
  /* a day's sessions as small bars, coloured by how they went (planned ones outlined) */

  /* the week on one line */

  /* the chosen day */
  .cal-phone .day { display: grid; gap: 10px; min-height: 0; padding: 0; border: 0; background: none; opacity: 1; }
  .cal-phone .day[hidden] { display: none; }
  .cal-phone .day > .dn, .cal-phone .day > .day-add { display: none; }
  .cp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .cp-head h3 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
  .cp-add { min-height: 38px; }
  .cal-phone .mcard { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0; border: 0; background: none; font-size: 13px; color: var(--muted); }
  .cal-phone .m-chip { background: none; padding: 0; }
  .cal-phone .wc-wrap { position: relative; }
  .cal-phone .wcard { display: grid; gap: 6px; width: 100%; padding: 14px 44px 14px 16px; border-radius: 14px; font-size: 14px; }
  .cal-phone .w-title { font-size: 15.5px; font-weight: 700; white-space: normal; }
  .cal-phone .w-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; }
  .cal-phone .w-more { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; opacity: 1; }
  .cal-phone .ecard { padding: 12px 14px; border-radius: 12px; font-size: 14px; }
  .cp-rest { margin: 0; padding: 22px 16px; border: 1px dashed var(--border); border-radius: 14px; text-align: center; color: var(--muted); font-size: 14px; }
}

/* the page column is the screen's width at most: wide content (stats, tables, charts) wraps or scrolls inside it */
main { grid-template-columns: minmax(0, 1fr); }
main > * { min-width: 0; }
.card, .card > * { min-width: 0; }
.tbl, .table-wrap { max-width: 100%; overflow-x: auto; }

/* planning the season on a phone: a full-screen chat (the conversation scrolls, the message box stays at the bottom);
   the coach's season opens as a sheet over it */
.ob-sheet-bar, .ob-sheet-go, .ob-see { display: none; }
.ob-ready:not([hidden]) { display: flex; align-items: center; gap: 12px; margin-top: 4px; padding: 10px 10px 10px 14px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.ob-ready p { flex: 1; min-width: 0; margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.ob-ready p b { color: var(--ink); }
.ob-ready [data-go] { white-space: nowrap; }
.ob-ready.busy p b { color: var(--ink-2); font-weight: 600; }
@media (max-width: 760px) {
  .signin:has(.ob-chat) { padding: 0; place-items: stretch; }
  .signin:has(.ob-chat) .ob-shell { padding: 0; min-height: 0; height: calc(100dvh / var(--vz, 1)); place-items: stretch; }
  .ob-card.ob-chat { width: 100%; height: calc(100dvh / var(--vz, 1)); max-height: calc(100dvh / var(--vz, 1)); border-radius: 0; box-shadow: none; display: flex; flex-direction: column; gap: 6px;
    padding: calc(10px + env(safe-area-inset-top)) 0 0; overflow: hidden; }
  .ob-card.ob-chat > .ob-top { padding: 0 14px; }
  .ob-card.ob-chat .ob-climb, .ob-card.ob-chat .ob-left { display: none; }
  .ob-card.ob-chat .ob-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0; }
  .ob-card.ob-chat .ob-q { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
  .ob-card.ob-chat .ob-q > h1 { padding: 0 14px; font-size: 19px; }
  .ob-card.ob-chat .ob-q > .si-sub { display: none; }
  .ob-card.ob-chat .ob-convo { flex: 1; min-height: 0; max-height: none; padding: 6px 14px 10px; }
  .ob-card.ob-chat .ob-convo .turn.assistant { grid-template-columns: 28px minmax(0, 1fr); column-gap: 8px; }
  .ob-card.ob-chat .ob-convo .turn.assistant > .ava { width: 28px; height: 28px; }
  .ob-card.ob-chat .ob-convo .md { font-size: 15px; line-height: 1.5; }
  .ob-see:not([hidden]) { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 14px; padding: 10px 14px; border-radius: 12px;
    border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); color: var(--ink); font: inherit; cursor: pointer; }
  .ob-see span { font-size: 13px; font-weight: 600; color: var(--accent-text, var(--accent)); }
  .ob-see b { font-size: 14px; font-variant-numeric: tabular-nums; }
  .ob-see.fresh { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
  @media (prefers-reduced-motion: no-preference) { .ob-see.fresh { animation: ob-see-new 900ms ease-out 2; } }
  .ob-card.ob-chat .ob-ask { padding: 8px 14px 0; border-top: 1px solid var(--border); background: var(--surface); }
  .ob-card.ob-chat .ob-ask textarea { min-height: 44px; max-height: calc(30dvh / var(--vz, 1)); }
  .ob-card.ob-chat .ob-qnav { padding: 6px 14px calc(8px + env(safe-area-inset-bottom)); margin: 0; border: 0; background: var(--surface); }
  .ob-card.ob-chat .ob-qnav .btn { min-height: 36px; padding: 6px 12px; font-size: 13px; }
  /* the sheet */
  .ob-card.ob-chat .ob-prev { position: fixed; inset: 0; z-index: 5; max-height: none; border-radius: 0; border: 0; padding: 0 16px calc(16px + env(safe-area-inset-bottom));
    background: var(--surface); overflow-y: auto; transform: translateY(100%); visibility: hidden; transition: transform 220ms ease, visibility 0s 220ms; }
  .ob-card.ob-chat .ob-prev.open { transform: none; visibility: visible; transition: transform 240ms ease; }
  .ob-card.ob-chat .ob-sheet-bar { display: flex; position: sticky; top: 0; z-index: 1; align-items: center; justify-content: space-between; gap: 10px;
    padding: calc(12px + env(safe-area-inset-top)) 0 10px; background: var(--surface); border-bottom: 1px solid var(--border); margin-bottom: 10px; }
  .ob-card.ob-chat .ob-sheet-bar .btn { font-size: 13px; padding: 6px 10px; }
  .ob-card.ob-chat .ob-prev-body { display: grid; gap: 10px; }
  .ob-card.ob-chat .ob-sheet-go { display: block; position: sticky; bottom: 0; padding: 12px 0 0; background: var(--surface); }
  .ob-card.ob-chat .ob-sheet-go .btn { width: 100%; }
  @media (prefers-reduced-motion: reduce) { .ob-card.ob-chat .ob-prev, .ob-card.ob-chat .ob-prev.open { transition: none; } }
}
@keyframes ob-see-new { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 0%, transparent); } }
@media (max-width: 760px) {
  .ob-card.ob-chat .ob-q > h1 { order: -1; }
  .ob-card.ob-chat .ob-convo { order: 0; }
  .ob-card.ob-chat .ob-ready:not([hidden]) { order: 1; flex-wrap: wrap; gap: 8px; margin: 6px 14px 0; padding: 8px 10px; }
  .ob-card.ob-chat .ob-ready p { flex-basis: 100%; font-size: 13px; }
  .ob-card.ob-chat .ob-ready .ob-see { flex: 1; justify-content: center; margin: 0; padding: 8px 10px; white-space: nowrap; }
  .ob-card.ob-chat .ob-ready .ob-see b { display: none; }  /* the hours are in the sheet */
  .ob-card.ob-chat .ob-ready [data-go] { min-height: 40px; padding: 8px 14px; font-size: 14px; }
  .ob-card.ob-chat .ob-ask { order: 2; }
  .ob-card.ob-chat .ob-qnav { order: 3; padding-top: 2px; }
  .ob-card.ob-chat .ob-qnav .btn { min-height: 30px; padding: 3px 10px; font-size: 12.5px; }
  .ob-card.ob-chat .ob-prev-body > .ob-prev-h { display: none; }
  .ob-card.ob-chat .ob-ask textarea { min-height: 44px; height: 44px; }
}

/* leaving the welcome flow (taken through it again): a quiet "Finish later" in the card's top-right corner */
.ob-card { position: relative; }
.ob-exit { position: absolute; top: 16px; right: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px 0 8px;
  border: 0; border-radius: 999px; background: none; color: var(--muted); font: 600 13px var(--f-body); cursor: pointer; }
.ob-exit svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ob-exit:hover { background: var(--wash); color: var(--ink); }
.ob-exit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ob-card:has(.ob-exit) .ob-climb { margin-top: 10px; }
@media (max-width: 760px) {
  .ob-exit { top: calc(8px + env(safe-area-inset-top)); right: 8px; }
}

/* phones: the plan library as a list of plans */
.plib { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.plib-row { position: relative; display: grid; gap: 4px; padding: 14px 40px 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  color: var(--ink); text-decoration: none; }
.plib-row::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border: solid var(--muted); border-width: 2px 2px 0 0; transform: rotate(45deg); }
.plib-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plib-top b { font-size: 16px; }
.plib-dates { font-size: 14px; font-variant-numeric: tabular-nums; }
.plib-meta { font-size: 13px; color: var(--muted); }
.plib-races { font-size: 13px; line-height: 1.5; padding-top: 4px; border-top: 1px solid var(--grid); margin-top: 4px; }

/* the admin dashboard */
.spill.bad { color: var(--crit-text); background: color-mix(in srgb, var(--crit) 12%, transparent); }
.spill:not(.ok):not(.bad) { color: var(--muted); background: var(--wash); }

.adm-problems { display: grid; }
.adm-prob { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 16px; font-size: 12.5px; align-items: baseline; }
.adm-prob + .adm-prob { border-top: 1px solid var(--grid); }
.adm-when { color: var(--muted); font-variant-numeric: tabular-nums; }
.adm-lvl { font-weight: 700; color: var(--warn-text); }
.adm-prob.error .adm-lvl, .adm-prob.critical .adm-lvl { color: var(--crit-text); }
.adm-msg { overflow-wrap: anywhere; color: var(--ink-2); }

@media (max-width: 760px) {

  .adm-prob { grid-template-columns: auto minmax(0, 1fr); }
  .adm-msg { grid-column: 1 / -1; }
  .adm-strip { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .adm-s-r { text-align: left; }
  .adm-axis { grid-template-columns: minmax(0, 1fr); }
  .adm-axis > span:first-child, .adm-axis > span:last-child { display: none; }
}

/* the admin dashboard: 24-hour strips (an hour a square), coach activity, grouped problems */
.adm-board { display: grid; gap: 10px; padding: 14px 16px; }
.adm-strip { display: grid; grid-template-columns: 136px minmax(0, 1fr) 210px; gap: 12px; align-items: center; }
.adm-s-l { font-size: 13.5px; font-weight: 600; }
.adm-s-r { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.adm-cells { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; }
.adm-c { display: block; height: 22px; min-width: 0; padding: 0; border: 0; border-radius: 3px; background: var(--good); cursor: pointer; }
.adm-c.warn { background: var(--warn); }
.adm-c.bad { background: var(--crit); }
.adm-c.off { background: var(--wash); box-shadow: inset 0 0 0 1px var(--grid); }
.adm-c:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.adm-cells .adm-c:hover { filter: brightness(1.12); transform: scaleY(1.12); }
.adm-axis { display: grid; grid-template-columns: 136px minmax(0, 1fr) 210px; gap: 12px; margin-top: -4px; }

.adm-note { margin: 2px 0 0; min-height: 18px; font-size: 12.5px; color: var(--ink-2); }

.adm-n { font-weight: 700; color: var(--ink-2); }
.adm-when { font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 760px) {
  .adm-board { padding: 12px 14px; }
  .adm-strip { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l r" "c c"; gap: 4px 10px; }
  .adm-s-l { grid-area: l; } .adm-s-r { grid-area: r; text-align: right; } .adm-cells { grid-area: c; }
  .adm-c { height: 18px; }
  .adm-axis { grid-template-columns: minmax(0, 1fr); }
  .adm-axis > span:first-child, .adm-axis > span:last-child { display: none; }

}

/* no TrainingPeaks account yet: three steps, each with its action */
/* the TrainingPeaks connect guide (tpGuide): the welcome flow's tick rows, numbered, each step's actions under its line */
.ob-checks.tpg li { grid-template-columns: 22px 1fr; align-items: start; }
.tpg .ob-mark { margin-top: 1px; }
.ob-mark.num { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.ob-mark.now { background: var(--accent); color: #fff; }
.ob-mark.num::before, .ob-mark.now::before { content: attr(data-n); }
.ob-checks.tpg li:has(.ob-mark.num) b { color: var(--muted); }
.tpg-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tpg-act a.btn { text-decoration: none; }
.tpg-found { flex-basis: 100%; display: grid; gap: 6px; }
.tpg-ok { margin: 12px 2px 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.tpg-box .ob-actions { margin-top: 12px; }
.tpg-modal { width: min(520px, 100%); }

/* ---------------------------------------------------------------- calendar: the week scroller (desktop month view)
   Weeks run on, past above and plan below; the day names stay pinned; a session's status is its card's colour, as in
   TrainingPeaks (green on plan, amber partly or off plan, red missed, grey unplanned, white dashed still planned). */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cal-x-wrap { overflow: visible; }
.cal.cal-x { overflow: visible; }
.cal-x .hd { position: sticky; top: var(--banner-h, 64px); z-index: 6; box-shadow: 0 1px 0 var(--grid); }
.cal-x .hd:first-child { border-top-left-radius: 16px; }
.cal-x .hd.wkh { border-top-right-radius: 16px; }
.cal-x .day { min-height: 104px; padding: 6px 6px 5px; gap: 4px; }
.cal-x .day .dn { font-size: 12px; padding: 2px 7px; }
.cal-month { grid-column: 1 / -1; background: var(--surface); padding: 16px 14px 6px; font: 500 14px var(--f-body); color: var(--muted); }
.cal-month b { font-weight: 800; font-size: 16px; color: var(--ink); margin-right: 4px; }
.cal-edge { height: 1px; }

/* status as the card's fill, in every calendar view */
.cal .wcard.wc-good { background: color-mix(in srgb, var(--good) 15%, var(--surface)); border-color: color-mix(in srgb, var(--good) 38%, var(--surface)); }
.cal .wcard.wc-warn { background: color-mix(in srgb, var(--warn) 17%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 42%, var(--surface)); }
.cal .wcard.wc-crit { background: color-mix(in srgb, var(--crit) 13%, var(--surface)); border-color: color-mix(in srgb, var(--crit) 36%, var(--surface)); }
.cal .wcard.wc-off { background: color-mix(in srgb, var(--warn) 17%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 42%, var(--surface)); }
.cal .wcard.wc-none { background: color-mix(in srgb, var(--ink) 6%, var(--surface)); border-color: color-mix(in srgb, var(--ink) 14%, var(--surface)); }
.cal .wcard.wc-planned { background: var(--surface); border: 1px dashed color-mix(in srgb, var(--ink) 28%, var(--surface)); }
.cal .wcard.wc-good, .cal .wcard.wc-warn, .cal .wcard.wc-crit, .cal .wcard.wc-off, .cal .wcard.wc-none { border-top-width: 1px; border-top-style: solid; }

/* the compact card: icon and title, one line of numbers */
.cal .wcard.wc-x { padding: 6px 8px 7px; border-radius: 8px; gap: 3px; box-shadow: none; }
.cal .wcard.wc-x:hover { filter: brightness(0.97); }
.wc-x .w-top { display: flex; gap: 6px; align-items: flex-start; }
.wc-x .s-ico { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.wc-x .w-title { font: 650 12.5px/1.3 var(--f-body); color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wc-x .w-line { font: 600 11.5px var(--f-body); color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-x .w-more { top: 5px; right: 5px; }

/* health values: one quiet line at the foot of the day */
.mline { margin-top: auto; display: flex; flex-wrap: wrap; gap: 2px 9px; padding: 2px 2px 0; font: 600 10.5px var(--f-body); color: var(--muted); font-variant-numeric: tabular-nums; }
.mline > span { display: inline-flex; align-items: center; gap: 3px; }
.mline svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* the week summary, compact until "More" */
.ws.ws-x { gap: 8px; padding: 10px 12px; }
.ws-x:not(.open) .ws-bar, .ws-x:not(.open) .wl-mix, .ws-x:not(.open) .ws-pmc, .ws-x:not(.open) .ws-notes,
.ws-x:not(.open) .ws-foot, .ws-x:not(.open) .ws-rows .ws-row:nth-child(n+3) { display: none; }
.ws-more { border: 0; background: none; padding: 2px 4px; border-radius: 5px; font: 600 12px var(--f-body); color: var(--accent-text, var(--accent)); cursor: pointer; }
.ws-more:hover { text-decoration: underline; }
/* compact summary: hours and ring, the week's daily load, TSS done / plan; days without sessions keep the day's type
   sizes (the generic empty-state rule enlarged their health line) */
.cal .day.empty .mline span, .cal .day.empty .m-chip span { font-size: inherit; }
.ws-x:not(.open) { gap: 6px; }
.ws-x:not(.open) .ws-top .kpi-viz { width: 44px; height: 44px; }
.ws-x:not(.open) .ws-big b { font-size: 19px; }
.ws-x:not(.open) .ws-big span { font-size: 11.5px; }
.ws-x:not(.open) .wl-lh { display: none; }
.ws-x:not(.open) .wl-col { height: 20px; max-width: 12px; }
.ws-x:not(.open) .wl-day em { font-size: 9px; }
.ws-x:not(.open) .ws-rows .ws-th { display: none; }
.ws-x:not(.open) .ws-rows .ws-row { font-size: 11.5px; }
/* the scroller's controls stay pinned under the top bar, the day names under them */
.cal-bar { position: sticky; top: var(--banner-h, 64px); z-index: 7; background: var(--bg); margin: 0 -4px; padding: 10px 4px; }
.cal-x .hd { top: calc(var(--banner-h, 64px) + var(--calbar-h, 0px)); }
.ws-more { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; color: var(--muted); }
.ws-more:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.ws-more svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.ws-more[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ---------------------------------------------------------------- calendar: quick view, right-click menu */
.qv { position: fixed; z-index: 40; right: 16px; top: calc(var(--banner-h, 64px) + 12px); bottom: 16px; width: min(380px, calc(calc(100vw / var(--vz, 1)) - 32px));
  overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 18px; border-radius: 16px;
  box-shadow: 0 18px 48px rgb(15 23 42 / .22), 0 0 0 1px var(--border); background: var(--surface); animation: qv-in .16s ease-out; }
@keyframes qv-in { from { transform: translateX(16px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .qv { animation: none; } }
.qv-head { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; }
.qv-head .s-ico { width: 20px; height: 20px; margin-top: 3px; }
.qv-head h3 { margin: 0; font: 800 18px/1.3 var(--f-body); letter-spacing: -0.01em; }
.qv-nav { display: inline-flex; gap: 2px; }
.qv-nav .btn { padding: 4px 9px; min-width: 30px; font-size: 15px; }
.qv-when { margin: -4px 0 0; font-size: 13px; color: var(--ink-2); }
.qv-st { display: inline-block; padding: 1px 8px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.qv-st.good { background: color-mix(in srgb, var(--good) 18%, var(--surface)); color: var(--good-text); }
.qv-st.warn { background: color-mix(in srgb, var(--warn) 20%, var(--surface)); color: var(--warn-text, var(--ink)); }
.qv-st.crit { background: color-mix(in srgb, var(--crit) 15%, var(--surface)); color: var(--crit-text); }
.qv-st.off { background: color-mix(in srgb, var(--warn) 20%, var(--surface)); color: var(--warn-text, var(--ink)); }
.qv-st.none, .qv-st.planned { background: var(--surface-2); color: var(--ink-2); }
.qv-figs { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.qv-figs th, .qv-figs td { padding: 6px 0; border-bottom: 1px solid var(--grid); text-align: right; }
.qv-figs thead th { font-size: 11.5px; font-weight: 600; color: var(--muted); padding-top: 0; }
.qv-figs tbody th { text-align: left; font-weight: 500; color: var(--ink-2); }
.qv-figs td { font-weight: 700; color: var(--ink); padding-left: 12px; }
.qv-figs td.dim { font-weight: 500; color: var(--muted); }
.qv-cap { font-size: 11.5px; color: var(--muted); }
.qv-desc { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); white-space: pre-line; }
.qv-prs { margin: 0; font-size: 13px; font-weight: 600; }
.qv-cmt { margin: 0; padding: 8px 10px; border-left: 3px solid var(--border); background: var(--wash); border-radius: 0 8px 8px 0; font-size: 13px; display: grid; gap: 2px; }
.qv-cmt cite { font-style: normal; font-size: 11.5px; color: var(--muted); }
.qv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.qv-actions a.btn { text-decoration: none; }
.qv-hint { margin: -4px 0 0; font-size: 11.5px; color: var(--muted); }
.cal .wc-wrap.qv-on .wcard { outline: 2px solid var(--accent); outline-offset: 1px; }

.cmenu { position: fixed; z-index: 60; min-width: 220px; padding: 6px; border-radius: 12px; display: grid; gap: 1px;
  box-shadow: 0 12px 32px rgb(15 23 42 / .2), 0 0 0 1px var(--border); background: var(--surface); }
.cmenu .cm-t { margin: 2px 8px 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.cmenu button { display: flex; justify-content: space-between; gap: 16px; align-items: center; border: 0; background: none; padding: 7px 9px; border-radius: 7px;
  font: 500 13.5px var(--f-body); color: var(--ink); text-align: left; cursor: pointer; }
.cmenu button:hover, .cmenu button:focus-visible { background: var(--surface-2); outline: none; }
.cmenu button.danger { color: var(--crit-text); }
.cmenu button.danger.armed { background: color-mix(in srgb, var(--crit) 14%, var(--surface)); font-weight: 700; }
.cmenu kbd { font: 600 11px var(--f-body); color: var(--muted); }
.cmenu hr { border: 0; border-top: 1px solid var(--grid); margin: 4px 2px; }
.qv-figs { table-layout: auto; }
.qv-figs th, .qv-figs td { text-transform: none; letter-spacing: 0; background: none; width: auto; }
.qv-figs tbody th { width: 46%; }
.qv-figs tbody th { font-size: 13px; }

/* ---------------------------------------------------------------- calendar step 3: season band, races, profiles, selection */
/* the annual plan's phase as a band down the left of each week (the season's structure shows while scrolling) */
.cal-x .day.ph { box-shadow: inset 4px 0 0 var(--ph); padding-left: 10px; }
.cal-x .day.ph.today { box-shadow: inset 4px 0 0 var(--ph), inset 0 0 0 2px var(--accent); }
/* race days: the day itself says so; the race card is a banner in its priority's colour */
.cal .day.race-day { background: color-mix(in srgb, var(--race-c, var(--ink)) 7%, var(--surface)); }
.cal .race-A { --race-c: var(--accent); } .cal .race-B { --race-c: var(--warn); } .cal .race-C { --race-c: var(--muted); }
.cal .ecard.race { background: var(--race-c); color: #fff; border: 0; border-radius: 8px; padding: 6px 9px; }
.cal .ecard.race b { color: #fff; font-weight: 800; }
.cal .ecard.race span { color: rgb(255 255 255 / .85); font-weight: 600; }
.cal .ecard.race.race-C { color: var(--ink); background: color-mix(in srgb, var(--ink) 12%, var(--surface)); }
.cal .ecard.race.race-C b, .cal .ecard.race.race-C span { color: var(--ink); }
.ws-race { display: grid; gap: 1px; margin: -2px 0 2px; padding: 5px 8px; border-radius: 8px; font: 800 12px var(--f-body);
  background: color-mix(in srgb, var(--race-c, var(--ink)) 14%, var(--surface)); color: var(--ink); }
.ws-race span { font-weight: 500; font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-race.race-A { --race-c: var(--accent); } .ws-race.race-B { --race-c: var(--warn); } .ws-race.race-C { --race-c: var(--muted); }
/* planned cards: the session's interval profile, small */
.wc-x .w-mini { display: block; height: 0; overflow: hidden; }
.wc-x .w-mini.on { height: 16px; margin-top: 2px; opacity: .85; }
.wc-x .w-mini svg { display: block; width: 100%; height: 16px; }
/* selection: shift-click; the bar at the bottom acts on all of it */
.cal .wc-wrap.sel .wcard { outline: 2px solid var(--accent); outline-offset: 1px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent); }
.calsel { position: fixed; z-index: 45; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--surface); box-shadow: 0 14px 40px rgb(15 23 42 / .25), 0 0 0 1px var(--border); font-size: 13.5px; }
.calsel .dim { color: var(--muted); }
.calsel-move { display: inline-flex; gap: 6px; align-items: center; }
.calsel input[type=date] { font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--ink); }
.calsel .btn.armed { background: color-mix(in srgb, var(--crit) 16%, var(--surface)); color: var(--crit-text); font-weight: 700; }

/* ---------------------------------------------------------------- calendar: what you can do, in sight */
body.cal-selecting .cal .wcard { cursor: pointer; }
/* add, inside the day: a dashed row after its sessions, on hover (always reachable with the keyboard) */
.cal .day-add-in { display: block; width: 100%; min-height: 26px; padding: 3px 6px; border: 1px dashed color-mix(in srgb, var(--ink) 22%, var(--surface));
  border-radius: 8px; background: transparent; font: 600 12px var(--f-body); color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .12s; }
.cal .day:hover .day-add-in, .cal .day-add-in:focus-visible { opacity: 1; }
.cal .day-add-in:hover { color: var(--accent-text, var(--accent)); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
@media (min-width: 761px) { .cal .day-add { display: none; } }
/* the gestures, said once by the legend */
.cal-legend .cal-how { order: 99; margin-left: auto; color: var(--muted); font-size: 12px; }

/* in the scroller, the legend and the gestures ride in the pinned bar, on their own line */
.cal-bar { flex-wrap: wrap; row-gap: 6px; }
.cal-bar .cal-legend { flex-basis: 100%; font-size: 12px; gap: 2px 12px; }

/* ---------------------------------------------------------------- calendar review fixes */
/* fits a laptop: the days share the width, the summary keeps a readable minimum (no sideways overflow) */
.cal.cal-x { grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(178px, 1.25fr); min-width: 0; }
@media (max-width: 1280px) { .cal-x .wc-x .w-line { font-size: 11px; } .ws.ws-x { padding: 9px 10px; } }
/* status as a symbol as well as a colour: ✓ on plan, half disc partly, × missed (red), ! off plan (amber like partly: it was done; Mathis, 14 Oct), + unplanned */
.wcard .w-top { display: flex; gap: 6px; align-items: flex-start; }
.wcard .w-title { flex: 1; min-width: 0; }
.w-gl { flex: none; width: 14px; height: 14px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.w-gl .fill { fill: currentColor; stroke: none; }
.gl-good { color: var(--good-text); } .gl-warn { color: var(--warn-text); } .gl-crit { color: var(--crit-text); } .gl-off { color: var(--warn-text); } .gl-none { color: var(--muted); }
.cal .wc-wrap:hover .w-gl, .cal .wc-wrap:focus-within .w-gl { visibility: hidden; }  /* the ⋯ button takes that corner on hover */
.cal-legend .lg-gl { width: 12px; height: 12px; margin: 0 3px -2px 0; }

.cal-how b { font-weight: 600; color: var(--ink-2); }
/* a week still ahead: its planned hours, quieter than done hours */
.ws-ahead-wk b { color: var(--ink-2); }
.ws-top .kpi-viz text.kv-c { font-size: 11px; }
/* the quick view floats on top of the calendar, under the pinned bar, as tall as it needs */
.qv { top: calc(var(--banner-h, 64px) + var(--calbar-h, 0px) + 10px); bottom: auto; max-height: calc(calc(100vh / var(--vz, 1)) - var(--banner-h, 64px) - var(--calbar-h, 0px) - 26px); }
.qv .qv-actions { margin-top: 4px; }
/* legend swatches: a small card in the status colour with its symbol */
.cal-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.lg-sw { display: inline-grid; place-items: center; width: 18px; height: 14px; border-radius: 4px; border: 1px solid transparent; }
.lg-sw .lg-gl { width: 10px; height: 10px; margin: 0; }
.lg-sw.sw-good { background: color-mix(in srgb, var(--good) 15%, var(--surface)); border-color: color-mix(in srgb, var(--good) 38%, var(--surface)); }
.lg-sw.sw-warn { background: color-mix(in srgb, var(--warn) 17%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 42%, var(--surface)); }
.lg-sw.sw-crit { background: color-mix(in srgb, var(--crit) 13%, var(--surface)); border-color: color-mix(in srgb, var(--crit) 36%, var(--surface)); }
.lg-sw.sw-off { background: color-mix(in srgb, var(--warn) 17%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 42%, var(--surface)); }
.lg-sw.sw-none { background: color-mix(in srgb, var(--ink) 6%, var(--surface)); border-color: color-mix(in srgb, var(--ink) 14%, var(--surface)); }
.lg-sw.sw-planned { background: var(--surface); border: 1px dashed color-mix(in srgb, var(--ink) 28%, var(--surface)); }

/* ---------------------------------------------------------------- calendar review, round 2 */
/* the mini profile: a quiet silhouette of the session's steps (only sessions with a shape get one) */
.wc-x .w-mini.on { height: 15px; opacity: 1; }
.wc-x .w-mini .bar { fill: color-mix(in srgb, var(--ink) 30%, var(--surface)) !important; }
/* the health line: readable (12px floor) */
.mline { font-size: 11.5px; gap: 2px 10px; }
.mline svg { width: 12px; height: 12px; }
/* the chevron: no focus ring after a click (the keyboard keeps it), a pressed look while the details are open */
.ws-more:focus:not(:focus-visible) { outline: none; }
.ws-more[aria-expanded="true"] { background: var(--surface-2); color: var(--ink); }
/* an opened week in the month: its sessions in full, like the week view */
.cal-x .day.day-focus { gap: 8px; }
.cal-x .day.day-focus .wcard { padding: 9px 10px 10px 11px; gap: 6px; }
.cal-x .day.day-focus .w-title { -webkit-line-clamp: 3; font-size: 13px; }
.cal-x .day.day-focus .wcard:hover .w-desc { -webkit-line-clamp: 30; }
/* every day on the same white: no shade for past days, no tint for today (its outline and badge mark now) */
.cal .day.past, .cal .day.today { background: var(--surface); }
/* the pinned day names: square corners (a rounded corner let what scrolls behind show through) */
.cal-x .hd:first-child, .cal-x .hd.wkh { border-radius: 0; }
/* detailed cards (week view, opened weeks): white, the status as a coloured left edge; compact cards keep the fill */
.cal .wcard:not(.wc-x).wc-good, .cal .wcard:not(.wc-x).wc-warn, .cal .wcard:not(.wc-x).wc-crit, .cal .wcard:not(.wc-x).wc-off, .cal .wcard:not(.wc-x).wc-none {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--st); }
.cal .wcard:not(.wc-x).wc-good { --st: var(--good); }
.cal .wcard:not(.wc-x).wc-warn { --st: var(--warn); }
.cal .wcard:not(.wc-x).wc-crit { --st: var(--crit); }
.cal .wcard:not(.wc-x).wc-off { --st: var(--warn); }
.cal .wcard:not(.wc-x).wc-none { --st: color-mix(in srgb, var(--ink) 30%, var(--surface)); }
.cal .wcard:not(.wc-x) .w-struct.on { background: var(--surface-2); }
/* the session open in the quick view: a neutral dark outline (blue means today; the left edge keeps the status colour) */
.cal .wc-wrap.qv-on .wcard { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 6px 18px rgb(15 23 42 / .14); }
/* today: the blue "Today" badge is enough, no outline around the day (desktop) */
@media (min-width: 761px) {
  .cal .day.today { box-shadow: none; }
  .cal-x .day.ph.today { box-shadow: inset 4px 0 0 var(--ph); }
}
/* a day in three quiet bands: the date, the sessions, the health values (thin lines from edge to edge) */
.cal .dsep { display: block; height: 1px; background: var(--grid); margin: 0 -6px 2px; }
.cal.cal-week .dsep { margin: 0 -10px 2px; }
.cal .day .mline { margin: -2px 0 0; padding: 0 2px; }  /* in the date band, under the date */
.cal.cal-week .day .mline { margin: -2px 0 0; }
.cal .day .mline { min-height: 16px; }
/* cards sit slightly above the day (planned ones stay flat with their dashed edge) */
.cal .wcard:where(:not(.wc-planned)), .cal .wcard.wc-x:where(:not(.wc-planned)) { box-shadow: 0 1px 3px rgb(15 23 42 / .10), 0 4px 12px rgb(15 23 42 / .09); }
/* hovering a card never changes its size (the full description is in the quick view) */
.cal.cal-week .wcard:hover .w-desc, .cal-x .day.day-focus .wcard:hover .w-desc { -webkit-line-clamp: 9; }

/* ---------------------------------------------------------------- calendar: moving a session */
.cal .wc-wrap[data-move] .wcard { cursor: grab; }
body.cal-dragging, body.cal-dragging * { cursor: grabbing !important; user-select: none; }
/* the card under the pointer: lifted, slightly tilted */
.drag-float { position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; will-change: transform; }
.drag-float .wcard { transform: rotate(1.5deg) scale(1.03); box-shadow: 0 18px 40px rgb(15 23 42 / .28) !important; background: var(--surface); }
.drag-float.back { transition: transform .18s ease-out; }
.drag-float.back .wcard { transform: none; transition: transform .18s ease-out; }
.drag-float.copy::after { content: "Copy"; position: absolute; top: -9px; right: -6px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 700 11px var(--f-body); }
/* where it lands: the day lights up, a dashed slot shows the place */
.cal .wc-wrap.dragging { opacity: .3; }
.cal .day.drop-target { outline: 0; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
/* a file from the computer over a day: it becomes a session there (a ring and a word, the file comes from outside the page) */
.cal .day.drop-file { position: relative; box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.cal .day.drop-file::after { content: "Drop to add"; position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 4px 10px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font: 700 12px var(--f-body); white-space: nowrap; pointer-events: none; }
.drop-slot { display: block; min-height: 38px; padding: 8px 10px; border: 2px dashed var(--accent); border-radius: 8px; background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  font: 600 12px var(--f-body); color: var(--accent-text, var(--accent)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: slot-in .12s ease-out; }
@keyframes slot-in { from { opacity: 0; transform: scaleY(.6); } }
@media (prefers-reduced-motion: reduce) { .drop-slot { animation: none; } .drag-float .wcard { transform: none; } .drag-float.back, .drag-float.back .wcard { transition: none; } }
body.cal-dragging .cal .w-more, body.cal-dragging .cal .day-add-in { opacity: 0 !important; pointer-events: none; }
/* the interval chart in a card: no empty band above it */
.cal .wcard .w-struct.on, .cal .wcard:not(.wc-x) .w-struct.on { background: none; height: 52px; }

/* Plan this week stays in reach on a collapsed week (a little smaller) */
.ws-x:not(.open) .ws-cta { padding: 5px 8px; font-size: 12px; margin-top: 2px; }
/* chart legends you can click: a series hides or shows */
.lg-tog { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 3px 6px; margin: -3px -2px; border-radius: 6px; font: inherit; color: inherit; cursor: pointer; }
.lg-tog:hover { background: var(--surface-2); }
.lg-tog[aria-pressed="false"] { opacity: .45; text-decoration: line-through; text-decoration-color: var(--muted); }
.lg-tog:focus:not(:focus-visible) { outline: none; }
/* performance chart: a series hidden from its legend */
#pmc.hide-ctl [data-s="ctl"], #pmc.hide-atl [data-s="atl"], #pmc.hide-tsb [data-s="tsb"], #pmc.hide-tss [data-s="tss"], #pmc.hide-if [data-s="if"] { display: none; }

/* ---------------------------------------------------------------- phone calendar, round 2 */
@media (max-width: 760px) {
  /* month: each session a bar in its status colour (like the desktop cards), the chosen day marked */
  .cal:not(.cal-week) .wcard.wc-good { background: var(--good); }
  .cal:not(.cal-week) .wcard.wc-warn { background: var(--warn); }
  .cal:not(.cal-week) .wcard.wc-crit { background: var(--crit); }
  .cal:not(.cal-week) .wcard.wc-off { background: var(--warn); }
  .cal:not(.cal-week) .wcard.wc-none { background: color-mix(in srgb, var(--ink) 30%, var(--surface)); }
  .cal:not(.cal-week) .wcard.wc-planned { background: none; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 40%, var(--surface)); }
  .cal:not(.cal-week) .day { cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .cal:not(.cal-week) .day.cp-sel { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); box-shadow: inset 0 0 0 2px var(--accent); }
  /* the chosen day's sessions, under the month */
  .cp-dayview { display: grid; gap: 10px; margin-top: 16px; }
  .cp-dayview .cal.cp-list { margin: 0; }
  .cp-list .day { border: 0 !important; padding: 0 !important; background: none !important; box-shadow: none !important; display: grid; gap: 10px; }
  .cp-openweek { justify-self: start; font-size: 14px; font-weight: 600; color: var(--accent-text, var(--accent)); text-decoration: none; padding: 6px 0; }
  /* the day's cards: the same look as on desktop (status as the left edge, planned dashed) */
  .cal-phone .wcard.wc-planned, .cp-list .wcard.wc-planned { border: 1.5px dashed color-mix(in srgb, var(--ink) 28%, var(--surface)) !important; background: var(--surface); }
  .cal-phone .mline, .cp-list .mline { font-size: 13px; gap: 4px 14px; margin: 0; padding: 0; }
  .cal-phone .mline svg, .cp-list .mline svg { width: 14px; height: 14px; }
  .cal-phone .wcard, .cp-list .wcard { -webkit-touch-callout: none; user-select: none; }  /* a long press opens the actions, not the link preview */
  .cp-list .wcard { display: grid; gap: 6px; width: 100%; padding: 14px 44px 14px 16px; border-radius: 14px; font-size: 14px; }
  .cp-list .w-title { font-size: 15.5px; font-weight: 700; white-space: normal; }
  .cp-list .w-more { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; opacity: 1; }
}
/* the action sheet (phone): a session's actions from the bottom of the screen */
.asheet-back { position: fixed; inset: 0; z-index: 90; background: rgb(15 23 42 / .35); display: flex; align-items: flex-end; animation: as-fade .15s ease-out; }
.asheet { width: 100%; max-height: calc(85dvh / var(--vz, 1)); overflow: auto; background: var(--surface); border-radius: 18px 18px 0 0; padding: 8px 16px calc(14px + env(safe-area-inset-bottom));
  display: grid; gap: 4px; box-shadow: 0 -10px 30px rgb(15 23 42 / .2); animation: as-up .2s ease-out; }
@keyframes as-up { from { transform: translateY(40px); opacity: .4; } }
@keyframes as-fade { from { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .asheet, .asheet-back { animation: none; } }
.as-grab { justify-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: 2px 0 8px; }
.as-head { display: flex; gap: 10px; align-items: center; padding: 4px 2px 10px; border-bottom: 1px solid var(--grid); margin-bottom: 4px; }
.as-head .s-ico { width: 22px; height: 22px; flex: none; }
.as-head b { display: block; font-size: 16px; }
.as-head span { font-size: 13px; color: var(--muted); }
.as-item { display: block; width: 100%; min-height: 48px; padding: 12px 6px; border: 0; background: none; text-align: left; font: 600 16px var(--f-body); color: var(--ink); text-decoration: none; border-radius: 10px; }
.as-item:active { background: var(--surface-2); }
.as-item.danger { color: var(--crit-text); }
.as-item.danger.armed { background: color-mix(in srgb, var(--crit) 14%, var(--surface)); }
.as-cancel { text-align: center; color: var(--muted); margin-top: 6px; background: var(--surface-2); }
.as-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 52px; padding: 4px 6px; }
.as-row label { font: 600 16px var(--f-body); }
.as-row input { font: inherit; font-size: 15px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--ink); min-width: 0; }
.as-row .btn { min-height: 42px; }
/* the app on the home screen, then its notifications (17-install.js): the action sheet, with what the phone will show */
.asheet.inst { gap: 0; padding-left: 20px; padding-right: 20px; text-align: center; }
.inst h3 { margin: 6px 0 6px; font: 800 19px/1.25 var(--f-body); letter-spacing: -0.01em; color: var(--ink); }
.inst-done { margin: 8px 0 0; font-size: 13.5px; font-weight: 700; color: var(--good-text); }
.inst-why { margin: 0 auto 14px; max-width: 34ch; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.inst-tile { justify-self: center; display: grid; justify-items: center; gap: 6px; margin: 6px 0 4px; }
.asheet.inst:focus { outline: none; }
.inst-tile img { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 0 0 1px var(--border), 0 6px 18px rgb(15 23 42 / .22); }
.inst-tile span { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.inst-steps { list-style: none; counter-reset: inst; margin: 0 0 14px; padding: 0; display: grid; gap: 0; text-align: left; border-top: 1px solid var(--grid); }
.inst-steps li { counter-increment: inst; display: grid; grid-template-columns: 28px auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 11px 2px; border-bottom: 1px solid var(--grid); }
.inst-steps li::before { content: counter(inst); grid-row: 1 / 3; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-text); font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.inst-steps li > b { font-size: 15.5px; color: var(--ink); }
.inst-steps li > span:not(.inst-dots) { grid-column: 2 / 4; font-size: 13px; color: var(--muted); line-height: 1.35; }
.inst-g { width: 19px; height: 22px; color: var(--accent-text); justify-self: start; }
.inst-dots { font-size: 18px; font-weight: 800; color: var(--accent-text); line-height: 1; }
.inst-note { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13.5px; line-height: 1.45; color: var(--ink-2); text-align: left; }
.inst-acts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; }
.inst-acts .btn { min-height: 46px; font-size: 15px; justify-content: center; }
/* a notification as the phone shows it: what they'd get, before they're asked */
.inst-banner { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; margin: 8px 0 12px; padding: 10px 12px; border-radius: 16px; text-align: left;
  background: color-mix(in srgb, var(--surface-2) 80%, var(--ink) 4%); border: 1px solid var(--grid); box-shadow: 0 8px 22px rgb(15 23 42 / .14); }
.inst-banner img { width: 38px; height: 38px; border-radius: 9px; box-shadow: 0 0 0 1px var(--border); }
.inst-banner b { display: block; font-size: 14px; color: var(--ink); }
.inst-banner span { display: block; font-size: 13.5px; color: var(--ink-2); }
.inst-banner i { align-self: start; font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  /* the phone's day list sits outside the grid: the same card look as the calendar (white, status as the left edge) */
  .cal-phone .wcard { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--st, var(--border)); box-shadow: 0 1px 3px rgb(15 23 42 / .08), 0 3px 10px rgb(15 23 42 / .06); }
  .cal-phone .wcard.wc-good { --st: var(--good); } .cal-phone .wcard.wc-warn { --st: var(--warn); } .cal-phone .wcard.wc-crit { --st: var(--crit); } .cal-phone .wcard.wc-off { --st: var(--warn); }
  .cal-phone .wcard.wc-none { --st: color-mix(in srgb, var(--ink) 30%, var(--surface)); }
  .cal-phone .wcard.wc-planned { box-shadow: none; }
  .cal-phone .w-struct.on, .cp-list .w-struct.on { background: none; height: 56px; }
  /* the month's day panel: no grid box around it */
  .cp-dayview .cal.cp-list { background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; gap: 0; min-width: 0; }
}
/* the Today badge is white on blue whatever the day holds (an empty day's text rule made it grey) */
.cal .dn.is-today, .cal .dn.is-today .dn-today, .cal .day.empty .dn.is-today span { color: var(--accent-ink); }

/* ---------------------------------------------------------------- tour: the drag demo, told step by step */
#tour.tour-demoing .tour-tip, #tour.tour-demoing .tour-ring { opacity: 0; transition: opacity .2s; }
#tour.tour-demoing .tour-dim { opacity: .35; transition: opacity .2s; }
/* where it lands */
.dash-grid.demo-drop { position: relative; outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 6%, transparent); z-index: 301; }
.dash-grid.demo-drop::after { content: "Drop here"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 4px 10px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font: 700 12px var(--f-body); pointer-events: none; }
.dash-grid.demo-hit { animation: demo-hit .45s ease-out; }
@keyframes demo-hit { 40% { background: color-mix(in srgb, var(--accent) 22%, transparent); } }
/* the widget being picked up */
.lib-item.demo-lift { position: relative; z-index: 301; transform: scale(.97); box-shadow: 0 0 0 2px var(--accent); transition: transform .2s, box-shadow .2s; }
/* the chip carried by the finger */
.demo-chip { position: absolute; z-index: 302; transform: translate(-30px, -50%) scale(.9); display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px;
  border-radius: 12px; background: var(--surface); color: var(--ink); font: 700 14px var(--f-body); white-space: nowrap; pointer-events: none;
  box-shadow: 0 0 0 2px var(--accent), 0 10px 26px rgb(15 23 42 / .25); transition: transform .25s ease-out; }
.demo-chip.held { transform: translate(-30px, -50%) scale(1.04) rotate(-2deg); box-shadow: 0 0 0 2px var(--accent), 0 18px 40px rgb(15 23 42 / .32); }
.demo-chip.drop { transform: translate(-30px, -50%) scale(.85); opacity: 0; transition: transform .3s ease-in, opacity .3s ease-in; }
.demo-chip .grip { color: var(--muted); }
.demo-finger { position: absolute; left: 22px; top: 60%; width: 34px; height: 34px; border-radius: 50%; background: rgb(15 23 42 / .22);
  box-shadow: 0 0 0 3px rgb(255 255 255 / .9); animation: demo-press .55s ease-out; }
@keyframes demo-press { from { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .demo-chip, .demo-chip.held, .demo-chip.drop, .demo-finger, .dash-grid.demo-hit { transition: none; animation: none; } }
.dash-grid.demo-drop > * { visibility: hidden; }  /* its own "drop here" text gives way to the demo label */

/* welcome flow: Skip for now on the season steps, a quiet link (the season can be planned later) */
.ob-skip-link { border: 0; background: none; padding: 8px 6px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--accent-text, var(--accent)); cursor: pointer; min-height: 36px; }
.ob-skip-link:hover { text-decoration: underline; }
.ob-skip-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ob-skip { margin-top: 12px; }

/* Settings → Account: a small form opens under the row it changes (name, email, password) */
.acc-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 12px; align-items: end; padding: 4px 18px 16px; }
.acc-form[hidden] { display: none; }
.acc-form .fld { margin: 0; }
.acc-form .fld input { width: 100%; }
.acc-form .fld input[readonly] { color: var(--ink-2, var(--ink)); background: transparent; }
.acc-form .acc-code { grid-column: 1 / -1; display: grid; gap: 8px; }
.acc-form .acc-code .fld { max-width: 220px; }
.acc-form-go { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.acc-form .form-err { grid-column: 1 / -1; margin: 0; }
.acc-form .acc-forgot { grid-column: 1 / -1; margin: -2px 0 0; }
.acc-form .acc-forgot[hidden], .acc-form .fld[hidden] { display: none; }

/* the calendar's workout library sticks below the pinned bars (top bar + calendar bar), not under them */
@media (min-width: 901px) {
  .cal-split > .lib { top: calc(var(--banner-h, 64px) + var(--calbar-h, 0px) + 12px); max-height: calc(calc(100vh / var(--vz, 1)) - var(--banner-h, 64px) - var(--calbar-h, 0px) - 24px); }
}

/* phone: dots on line charts are small solid points in the line's colour (rings took the room and hid the line) */
@media (max-width: 760px) {
  .wk-dot { width: 5px; height: 5px; margin-bottom: -2.5px; border: 0; background: currentColor !important; }
  svg .ln-dot { r: 2.2px; fill: currentColor !important; stroke-width: 0 !important; }
}
/* weekly charts: no drawing-in (its dash trick leaves gaps on a non-scaling stroke, which the old ringed dots hid) */
.wk-line .draw { stroke-dasharray: none !important; animation: none !important; }

/* phones, Week view: each day's load in the day strip, then the week in one card (More opens the rest in place) */
@media (max-width: 760px) {
  .cp-d { align-content: start; }
  /* each day: a track the load fills (solid done, light planned, in the colour of how the day went), the sessions'
     sport icons under it side by side (13 Oct, Mathis: "enhance the display") */
  .cp-load { position: relative; width: 22px; height: 30px; margin-top: 4px; border-radius: 5px; background: color-mix(in srgb, var(--ink) 5%, transparent); overflow: hidden; }  /* no outline (Mathis, 13 Oct) */
  .cp-load .pl, .cp-load .wl-dn { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 0; }
  .cp-load .pl { background: color-mix(in srgb, var(--c-day, var(--accent)) 32%, transparent); }
  .cp-load .wl-dn { background: var(--c-day, var(--accent)); }
  .cp-load.st-good { --c-day: var(--good); } .cp-load.st-warn { --c-day: var(--warn); } .cp-load.st-crit { --c-day: var(--crit); } .cp-load.st-off { --c-day: var(--warn); }
  .cp-load.st-planned { --c-day: var(--accent); } .cp-load.st-none { --c-day: var(--muted); }
  .cp-chips { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px; width: 100%; max-width: 44px; min-height: 18px; margin-top: 4px; }
  .cp-chips .cp-chip { width: 18px; height: 18px; border-radius: 5px; }
  .cp-chips .cp-chip .s-ico { width: 12px; height: 12px; color: currentColor !important; }
  .cp-chips:empty { visibility: hidden; }
  .cp-plus { font-style: normal; font-size: 10px; font-weight: 700; color: var(--muted); line-height: 1; }
  .cp-flag { position: absolute; top: -2px; right: -9px; font-style: normal; font-size: 10px; line-height: 1; color: var(--ink); }

  .cp-wk { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
  .cpw-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  .cpw-t { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; font-weight: 600; }
  .cpw-t .ws-phase { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
  .cpw-t .ws-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cpw-t .sa-edit { width: 30px; height: 30px; margin: -6px 0; border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer; }
  .cpw-h { display: inline-flex; align-items: baseline; gap: 5px; font-size: 12px; color: var(--muted); white-space: nowrap; }
  .cpw-h b { font: 700 16px var(--f-body); color: var(--ink); font-variant-numeric: tabular-nums; }
  .cpw-bar .ws-bar { display: block; --c: var(--accent); }
  .cpw-more { display: inline-grid; place-items: center; width: 32px; height: 32px; margin: -4px -6px -4px 0; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
  .cpw-more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.15s; }
  .cpw-more[aria-expanded="true"] { background: var(--surface-2); color: var(--ink); } .cpw-more[aria-expanded="true"] svg { transform: rotate(180deg); }
  .cpw-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
  .cpw-sub { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
  .cpw-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
  .cpw-sub .k-plan { width: 12px; height: 6px; border-radius: 3px; margin: 0; background: color-mix(in srgb, var(--accent) 35%, transparent); }
  .cpw-mix .wl-lh .dim { display: none; }
  .cpw-body { display: grid; gap: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
  .cpw-body[hidden] { display: none; }
  .cpw-mix .wl-mix { margin: 0; }
  .cpw-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
  .cpw-stat { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 1px; min-width: 0; }
  .cpw-stat em { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cpw-stat b { font: 700 16px var(--f-body); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cpw-stat small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* the intensity mix's target: a band under the bar, not a box floating on it */
  .cpw-mix .wl-mixbar { margin-bottom: 6px; }
  .cpw-mix .wl-tgt { top: calc(100% + 3px); bottom: auto; height: 3px; border: 0; border-radius: 2px; background: var(--ink-2); }
  .cpw-cta .ws-cta { width: 100%; }
}
/* the day strip inside the week card: no box of its own */
@media (max-width: 760px) {
  .cp-wk .cp-strip { margin: 2px -8px 0; padding: 0; border: 0; border-radius: 0; background: none; }
  .cp-wk .cpw-bar { margin-top: 2px; }
}
/* week card: the days, then a line, then the training-time bar with its key */
@media (max-width: 760px) {
  .cpw-time { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
  .cpw-tl { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  .cpw-lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-2, var(--ink)); }
  .cp-wk .cpw-bar { margin-top: 0; }
}

/* ---------- session page: summary, the session timeline, zones + what it says, laps + totals ---------- */
.sd-sum { display: grid; gap: 14px; }
.sd-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 20px; }
.sd-k { display: grid; gap: 2px; align-content: start; }
.sd-k b { font: 800 30px/1.05 var(--f-body); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.sd-k b small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.sd-k > small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sd-chips { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--ink); }
.sd-chip { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 600; }
.sd-chip em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.sd-chip small { color: var(--muted); font-weight: 500; }
.sd-desc { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.sd-desc .prose { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.sd-tl .card-head { flex-wrap: wrap; gap: 8px 16px; }
.sd-tl .legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 12px; color: var(--muted); }

#streams svg .lap-n { font: 600 10.5px var(--f-body); fill: var(--muted); }
.sd-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }

.sd-row > .card:only-child { grid-column: 1 / -1; }
@media (max-width: 1000px) { .sd-row, .sd-row-wide { grid-template-columns: 1fr; } }
/* zones: one bar for the whole session, then a row per zone (time, share) */
.sd-zones .card-head .seg { margin-left: auto; }
.zbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; background: var(--surface-2); }
.zbar span { min-width: 3px; }
.zrows { display: grid; margin-top: 14px; }
.zrow { display: grid; grid-template-columns: 10px minmax(92px, auto) minmax(0, 1fr) minmax(60px, 1.2fr) 52px 40px; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 13px; font-variant-numeric: tabular-nums; }
.zrow:first-child { border-top: 0; }
.zrow > i { width: 10px; height: 10px; border-radius: 3px; }
.zrow b { font-weight: 600; white-space: nowrap; }
.zr-range { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zr-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; } .zr-bar i { display: block; height: 100%; border-radius: 3px; }
.zr-t { text-align: right; font-weight: 600; } .zr-p { text-align: right; color: var(--muted); }
.zrow.none { color: var(--muted); } .zrow.none b { font-weight: 500; }
.zrow.top b, .zrow.top .zr-t { color: var(--ink); } .zrow.top { background: linear-gradient(90deg, var(--surface-2), transparent 70%); border-radius: 8px; }
/* what it says: short lines with a status mark */
.sd-says ul { list-style: none; margin: 0; padding: 0; display: grid; }
.sd-say { display: grid; grid-template-columns: 10px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.sd-say:first-child { border-top: 0; padding-top: 2px; }
.sd-say > i { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--muted); }
.sd-say.good > i { background: var(--good); } .sd-say.warn > i { background: var(--warn); } .sd-say.crit > i { background: var(--crit); }
.sd-say div { display: grid; gap: 1px; }
.sd-say span { font-size: 12px; color: var(--muted); }
.sd-say b { font: 700 16px var(--f-body); font-variant-numeric: tabular-nums; color: var(--ink); }
.sd-say small { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
/* laps: pace as a bar behind the number */

#laps .tbl, #laps table { width: 100%; }
/* totals in small groups */
.sd-totals { display: grid; gap: 14px; }
.sd-totals .tg h4 { margin: 0 0 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.sd-totals .kv { margin: 0; }
.sd-totals .kv { grid-template-columns: 180px 1fr; }

/* session page: one rhythm — 24px between sections (as the page), the same two columns on every row, equal heights */
#d-analysis { display: grid; gap: 24px; }
#d-analysis:empty { display: none; }
.sd-row, .sd-row-wide { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
@media (max-width: 1000px) { .sd-row, .sd-row-wide { grid-template-columns: 1fr; } }
.sd-row > .card { display: flex; flex-direction: column; }

/* session timeline legend: each item shows or hides its layer (pressed = shown) */
.sd-legend { gap: 6px !important; }
.lg-t { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 500 12.5px var(--f-body); cursor: pointer; }
.lg-t:hover { border-color: var(--muted); }
.lg-t[aria-pressed="false"] { color: var(--muted); background: transparent; border-style: dashed; }
.lg-t[aria-pressed="false"] i { opacity: .3; }
.lg-t:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lg-t i { display: inline-flex; flex: none; }
.sw-plan { gap: 2px; } .sw-plan b { width: 6px; height: 9px; border-radius: 2px; }
.sw-plan .work { background: var(--accent); } .sw-plan .rest { background: color-mix(in srgb, var(--s1) 40%, transparent); } .sw-plan .easy { background: color-mix(in srgb, var(--muted) 35%, transparent); }
.sw-laps { width: 14px; height: 10px; border-left: 1px dashed var(--muted); border-right: 1px dashed var(--muted); }
.sw-tgt { width: 16px; height: 9px; border-radius: 2px; background: color-mix(in srgb, var(--good) 18%, transparent); border-top: 1.5px dashed var(--good); }
.sw-over { width: 16px; height: 3px; border-radius: 2px; background: var(--warn); box-shadow: 0 3px 0 color-mix(in srgb, var(--warn) 25%, transparent); }
.sw-line { width: 14px; height: 3px; border-radius: 2px; }
#streams svg .tg-pill { font: 600 10.5px var(--f-body); fill: color-mix(in srgb, var(--good) 70%, var(--ink)); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }

/* session totals: one slim strip, its groups side by side */
.sd-totals { display: grid; gap: 10px; }
.sd-totals .tgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 28px; }
.sd-totals .tg { display: grid; align-content: start; gap: 2px; }
.sd-totals .tg h4 { margin: 0 0 4px; font: 600 11.5px var(--f-body); color: var(--muted); }
.tg-r { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 13px; color: var(--ink-2); }
.tg-r b { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* laps: compact rows, faint dividers, sort arrows only on hover (or on the sorted column) */
.sd-laps .table-wrap { overflow-x: auto; }
.sd-laps table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.sd-laps th { padding: 6px 12px; font-size: 11px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.sd-laps td { padding: 6px 12px; border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent); color: var(--ink); }
.sd-laps tbody tr:last-child td { border-bottom: 0; }
.sd-laps tbody tr:hover td { background: var(--surface-2); }
.sd-laps td:first-child { color: var(--muted); }
.sd-laps th button::after { opacity: 0; transition: opacity .15s; }
.sd-laps th:hover button::after, .sd-laps th button[data-dir="asc"]::after, .sd-laps th button[data-dir="desc"]::after { opacity: 1; }
.hr-z { display: inline-flex; align-items: center; gap: 6px; }
.hr-z i { width: 7px; height: 7px; border-radius: 50%; }
/* phones: the session legend is one swipeable line of light chips (a box only on what's hidden) */
@media (max-width: 760px) {
  .sd-tl .card-head { display: grid; gap: 8px; }
  .sd-legend { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; gap: 2px !important;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 24px), transparent); }
  .sd-legend::-webkit-scrollbar { display: none; }
  .lg-t { flex: none; min-height: 28px; padding: 3px 8px; gap: 5px; border-color: transparent; background: none; font-size: 12px; white-space: nowrap; }
  .lg-t[aria-pressed="false"] { border-color: var(--border); }
  .lg-t:focus:not(:focus-visible) { outline: none; }
  .lg-t i { transform: scale(.85); }
}
/* phones: a whisper of a chip on each legend item, so it reads as something to tap */
@media (max-width: 760px) {
  .lg-t[aria-pressed="true"] { background: color-mix(in srgb, var(--surface-2) 70%, transparent); border-color: color-mix(in srgb, var(--border) 55%, transparent); }
}
.sd-laps .card-head { flex-wrap: wrap; gap: 8px 14px; }
.sd-laps .card-head .seg { margin-left: auto; }
.sd-laps td small { color: var(--muted); }

/* big screens: pages grow (centred) instead of stopping at 1360px; the calendar takes the whole width */
@media (min-width: 1700px) {
  main { max-width: none; width: 100%; box-sizing: border-box; padding-inline: clamp(28px, calc(2.2vw / var(--vz, 1)), 56px); }
}
/* large monitors: everything a touch bigger, so the page isn't laptop-sized in a sea of space */
/* big screens: everything 12% larger; viewport units divide by it (--vz) so full-height panels still fit the screen */
@media (min-width: 2200px) { html { zoom: 1.12; } :root { --vz: 1.12; } }
/* each day's band (date + health line) in a faint tint, so a week's row of dates reads as its header */
.cal .dband { display: grid; gap: 4px; align-content: start; justify-items: start; margin: -6px -6px 0; padding: 6px 6px 4px; background: color-mix(in srgb, var(--surface-2) 65%, var(--surface)); }
.cal .dband > :not(.dn) { justify-self: stretch; }
.cal.cal-week .dband { margin: -10px -10px 0; padding: 10px 10px 4px; }
.cal .dband + .dsep { margin-top: 0; }
/* week actions (⋮) on the summary */
.ws-kebab { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; }
.ws-kebab svg { width: 16px; height: 16px; fill: currentColor; }
.ws-kebab:hover, .ws-kebab[aria-expanded="true"] { background: var(--surface-2); color: var(--ink); }
.ws-kebab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cmenu button[disabled] { opacity: .45; cursor: default; }
/* dragging several sessions: the card is a small stack with a count */
.drag-float.stack { box-shadow: 4px 4px 0 -1px var(--surface), 4px 4px 0 0 var(--border), 8px 8px 0 -1px var(--surface), 8px 8px 0 0 var(--border), 0 12px 28px rgb(0 0 0 / .18); }
.drag-count { position: absolute; top: -9px; right: -9px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font: 700 12px/24px var(--f-body); text-align: center; }
/* desktop: the week's ✎ is in its ⋮ menu (room for the phase name) */
@media (min-width: 761px) { .ws:has(> .ws-kebab) .ws-head .sa-edit { display: none; } }
/* week summary header: the phase name keeps its width; "Week n/N" gives way first when the column is narrow */
.ws-head .ws-phase .ws-name { flex: 0 0 auto; }
.ws-head .ws-phase .dim { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-head .ws-tools { flex: none; }
/* selected sessions: ink, not another blue (the cards' charts, Today and the buttons are blue already) — a dark outline,
   a faint grey tint and a small ✓ badge in the corner */
.cal .wc-wrap.sel { position: relative; }
.cal .wc-wrap.sel .wcard { outline: 1.5px solid var(--ink); outline-offset: 2px; box-shadow: none; background: color-mix(in srgb, var(--ink) 4%, var(--surface)); }
.cal .wc-wrap.sel::after { content: "✓"; position: absolute; top: -8px; left: -8px; z-index: 2; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink); color: var(--surface); font: 700 11px/18px var(--f-body); text-align: center; box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
/* calendar cards: the session's shape in deep navy (pale for easy and recovery, darker for the work): calmer than the
   bright accent, distinct from the card colours (status edge, selection, Today) */
:root { --prof-ink: #a9b6ec; }
:root[data-theme="light"] { --prof-ink: #24367a; }
.cal .wcard svg path.bar[style*="--seq-1"] { fill: color-mix(in srgb, var(--prof-ink) 18%, var(--surface)) !important; }
.cal .wcard svg path.bar[style*="--seq-2"] { fill: color-mix(in srgb, var(--prof-ink) 34%, var(--surface)) !important; }
.cal .wcard svg path.bar[style*="--seq-3"] { fill: color-mix(in srgb, var(--prof-ink) 55%, var(--surface)) !important; }
.cal .wcard svg path.bar[style*="--seq-4"] { fill: color-mix(in srgb, var(--prof-ink) 82%, var(--surface)) !important; }

/* the calendar folds the top bar (64 → 40px: the second line folds away, the value shrinks) and the sidebar; both glide:
   their sizes are animatable properties, so the bar, the sidebar and everything pinned under them move together */
@property --banner-h { syntax: "<length>"; inherits: true; initial-value: 64px; }
/* only the top bar's height glides (a short vertical move); the sidebar's width switches in one layout — animating it
   re-laid out the whole calendar on every frame, while the calendar was being drawn: it stuttered */
html.bars-anim { transition: --banner-h .2s cubic-bezier(.2, .7, .2, 1); }
html.bars-anim .t-seg .t-sub { transition: opacity .2s ease, max-height .28s cubic-bezier(.2, .7, .2, 1); }
html.bars-anim .t-seg .t-val, html.bars-anim .t-seg .t-val small { transition: font-size .28s cubic-bezier(.2, .7, .2, 1); }
html.bars-anim .side .lbl, html.bars-anim .telemetry .brand .lbl { transition: opacity .18s ease; }
.t-seg .t-sub { max-height: 16px; overflow: hidden; }
.side { overflow: hidden; } .side .lbl { white-space: nowrap; }
@media (min-width: 761px) {
  :root.cal-fold { --banner-h: 40px; }
  :root.cal-fold .t-seg { gap: 1px; padding: 0 14px; }
  :root.cal-fold .t-seg .t-sub { max-height: 0; opacity: 0; }
  :root.cal-fold .t-seg .t-val { font-size: 15px; line-height: 1.05; }
  :root.cal-fold .t-seg .t-val small { font-size: 10.5px; }
  :root.cal-fold .t-seg .micro { font-size: 10px; }
  :root.cal-fold .t-me .ava { width: 26px; height: 26px; }
  :root.cal-fold .t-me small { display: none; }
}
@media (prefers-reduced-motion: reduce) { html.bars-anim, html.bars-anim * { transition: none !important; } }
/* sidebar labels fade out and back in with the rail */
html.bars-anim .side .lbl, html.bars-anim .telemetry .brand .lbl { transition: opacity .18s ease, display .18s allow-discrete; }
html.rail-collapsed .side .lbl, html.rail-collapsed .telemetry .brand .lbl { opacity: 0; }
@starting-style { html.bars-anim:not(.rail-collapsed) .side .lbl, html.bars-anim:not(.rail-collapsed) .telemetry .brand .lbl { opacity: 0; } }
/* folded top bar (calendar): the form-zone pill slims to fit 40px with air above and below */
@media (min-width: 761px) {
  :root.cal-fold .t-pill { padding: 2px 9px; font-size: 12px; line-height: 1.35; gap: 6px; }
  :root.cal-fold .t-pill i { width: 6px; height: 6px; }
  html.bars-anim .t-pill { transition: padding .2s ease, font-size .2s ease; }
}
@media (min-width: 761px) { :root.cal-fold .t-seg.t-status { flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; } }
/* fitness, fatigue and form: one width for the three (their second lines differ in length), narrower when folded */
.t-seg[data-pop="ctl"], .t-seg[data-pop="atl"], .t-seg[data-pop="tsb"] { width: 168px; box-sizing: border-box; }
.t-seg[data-pop="ctl"] .t-sub, .t-seg[data-pop="atl"] .t-sub, .t-seg[data-pop="tsb"] .t-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (min-width: 761px) { :root.cal-fold .t-seg[data-pop="ctl"], :root.cal-fold .t-seg[data-pop="atl"], :root.cal-fold .t-seg[data-pop="tsb"] { width: 112px; } }
html.bars-anim .t-seg[data-pop="ctl"], html.bars-anim .t-seg[data-pop="atl"], html.bars-anim .t-seg[data-pop="tsb"] { transition: width .2s cubic-bezier(.2, .7, .2, 1); }
@media (max-width: 760px) { .t-seg[data-pop="ctl"], .t-seg[data-pop="atl"], .t-seg[data-pop="tsb"] { width: auto; } }
@media (min-width: 761px) { :root.cal-fold .t-seg.t-status .t-sub { display: none; } }

/* the week's ⋮ sits on the line between the days and the summary, near the top of the week (as TrainingPeaks puts it
   beside the week), a small round handle over the boundary */
.cal > .ws { overflow: visible; }
.cal > .ws > .ws-kebab { position: absolute; top: 10px; left: -14px; z-index: 5; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 1px 3px rgb(15 23 42 / .12); color: var(--ink-2); }
.cal > .ws > .ws-kebab svg { width: 14px; height: 14px; }
.cal > .ws > .ws-kebab:hover, .cal > .ws > .ws-kebab[aria-expanded="true"] { background: var(--surface-2); color: var(--ink); border-color: var(--muted); }
/* the week's ⋮: halfway down the week on its boundary (the top corner is busy: Today, the phase, the chevron), quiet
   until the week is hovered */
.cal > .ws > .ws-kebab { top: 50%; transform: translateY(-50%); border-color: transparent; box-shadow: none; color: var(--muted); background: var(--surface); }
.cal > .ws > .ws-kebab:hover, .cal > .ws > .ws-kebab:focus-visible, .cal > .ws > .ws-kebab[aria-expanded="true"],
.cal:has(.day[data-date]:hover) > .ws > .ws-kebab:hover { border-color: var(--border); box-shadow: 0 1px 3px rgb(15 23 42 / .12); color: var(--ink); }
.cal > .ws:hover > .ws-kebab { border-color: var(--border); color: var(--ink-2); }
/* as in TrainingPeaks: a narrow gutter between the days and the summary, with the week's ⋮ standing in it at the top of
   the week — plain grey dots, no circle */
.cal.cal-x > .wk, .cal.cal-x > .wkh { margin-left: 26px; }
.cal > .ws > .ws-kebab { top: 12px; left: -25px; transform: none; width: 22px; height: 28px; border: 0 !important; border-radius: 6px;
  background: none !important; box-shadow: none !important; color: color-mix(in srgb, var(--ink) 45%, var(--surface)); }
.cal > .ws > .ws-kebab svg { width: 18px; height: 18px; }
.cal > .ws > .ws-kebab:hover, .cal > .ws > .ws-kebab[aria-expanded="true"], .cal > .ws > .ws-kebab:focus-visible { color: var(--ink); background: var(--surface-2) !important; }
.cal > .ws:hover > .ws-kebab { color: color-mix(in srgb, var(--ink) 65%, var(--surface)); }
/* the summary column gets the gutter's width back (its content keeps the same room) */
.cal.cal-x { grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(204px, 1.42fr); }
/* the gutter is white like the cards (the calendar's grey behind it clashed with the date rows' tint); the ⋮ stands
   halfway down the week */
.cal.cal-x > .wk { box-shadow: -26px 0 0 0 var(--surface), -34px 0 14px -10px rgb(0 0 0 / .18); }
.cal.cal-x > .wk.ws { box-shadow: inset 3px 0 0 var(--c), -26px 0 0 0 var(--surface), -34px 0 14px -10px rgb(0 0 0 / .18); }  /* the phase colour stays on its edge */
.cal.cal-x > .wkh { box-shadow: -26px 0 0 0 var(--surface); }
.cal > .ws > .ws-kebab { top: 50%; transform: translateY(-50%); }
/* a week whose menu is open: one tinted frame over its days, cards included, not the summary */
.wk-hl { position: absolute; z-index: 3; pointer-events: none; background: color-mix(in srgb, var(--accent) 12%, transparent);
  box-shadow: inset 0 0 0 2px var(--accent); animation: wk-hl-in .15s ease; }
@keyframes wk-hl-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wk-hl { animation: none; } }

/* a day's own ⋮, top right of its date band: shown on hover, and while its menu is open */
.cal .dband { position: relative; }
.cal .day-kebab { position: absolute; top: 3px; right: 3px; width: 24px; height: 22px; border-radius: 6px; opacity: 0; transition: opacity .12s ease; }
.cal .day-kebab svg { width: 14px; height: 14px; }
.cal .day:hover .day-kebab, .cal .day-kebab:focus-visible, .cal .day-kebab[aria-expanded="true"] { opacity: 1; }
@media (hover: none) { .cal .day-kebab { opacity: .7; } }

/* Training Plans: "Plan a season with your coach" under an empty plan */
.empty-act { display: flex; justify-content: center; margin: 0 0 18px; }
.sec-head > [data-plan-season] { margin-left: auto; align-self: center; }  /* the subtitle stays by its title */

/* the annual-plan week form: hours stepper + period, strength and limiters as the plan's own chips */
.atp-ed { gap: 14px; }
.atp-ed .fld { min-width: 0; }
.atp-ed legend { padding: 0; margin-bottom: 6px; }
.ae-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: end; }
.ae-step { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.ae-step:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.ae-step input { width: 4.2em; border: 0 !important; background: none !important; outline: 0 !important; padding: 7px 2px 7px 4px !important; text-align: right;
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 16px !important; }
.ae-step span { padding-right: 4px; font-size: 13px; }
.ae-step button { width: 34px; align-self: stretch; border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; border-radius: var(--radius); }
.ae-step button:hover { color: var(--ink); background: var(--surface-2); }
.ae-step button:focus-visible { outline: 2px solid var(--accent); }
.ae-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ae-chip { position: relative; cursor: pointer; }
.ae-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ae-chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink-2); font-size: 13px; transition: background-color .12s ease, border-color .12s ease; }
.ae-chip:hover span { border-color: var(--muted); }
.ae-chip input:checked + span { background: var(--t, color-mix(in srgb, var(--accent) 12%, var(--surface))); border-color: transparent; color: var(--ink); font-weight: 600; }
.ae-chip.lim input:checked + span::before { content: "✓"; font-size: 11px; }
.ae-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 760px) { .ae-chip span { min-height: 36px; } }

/* Training Plans on phones: a 2×2 glance, a season chart that swipes, one coming week at a time */
.phone-only, .nw-nav { display: none; }
@media (max-width: 760px) {
  .desk-only { display: none; }
  .phone-only { display: inline; }
  /* the season at a glance: four small tiles, no rings */
  .atp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atp-kpis .signal.kpi { padding: 12px 12px 13px; gap: 6px; }
  .atp-kpis .kpi-ico, .atp-kpis .kpi-viz { display: none; }
  .atp-kpis .kpi-head .micro { font-size: 12px; }
  .atp-kpis .kpi-main b { font-size: 22px; }
  .atp-kpis .kpi-main b.word { font-size: 17px; }
  .atp-kpis .kpi-main b small { font-size: 12px; }
  .atp-kpis .kpi-cap { font-size: 11.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  /* season plan: one swipeable line of key, the chart wider than the screen */
  .card-head:has(#atp-legend) { display: grid; gap: 8px; }
  #atp-legend { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; font-size: 12px; margin: 0 -16px; padding: 0 16px; }
  #atp-legend::-webkit-scrollbar { display: none; }
  #atp-legend > * { flex: none; }
  .atp-scroll { overflow-x: auto; margin: 0 -16px; padding: 0 16px; overscroll-behavior-x: contain; scrollbar-width: none; }
  .atp-scroll::-webkit-scrollbar { display: none; }
  .atp-scroll .atp-chart { max-width: none; }
  /* coming up: full-width cards that snap, ‹ 1 / 4 › beside the title */
  .sec-head:has(.nw-nav) { align-items: center; }
  .nw-nav { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-variant-numeric: tabular-nums; }
  .nw-nav .btn { width: 36px; height: 36px; padding: 0; font-size: 20px; line-height: 1; display: grid; place-items: center; }
  .nw-nav .btn:disabled { opacity: .35; }
  .next-weeks { display: flex; align-items: flex-start; grid-template-columns: none; gap: 16px; overflow-x: auto; overflow-y: hidden; transition: height .2s ease; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
  .next-weeks::-webkit-scrollbar { display: none; }
  .next-weeks > .nw { flex: 0 0 100%; scroll-snap-align: start; margin: 0; }
  .nw-note { cursor: pointer; }
  .nw-note > span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }  /* the clip on the text, not its padded box */
  .nw-note.open > span { display: block; }
}

/* the top bar's training load: phones only, in the focus race's place */
@media (min-width: 761px) { .t-load { display: none !important; } }
@media (max-width: 760px) { .t-race { display: none !important; } }

/* the season chart: hit areas are invisible, the week picked by a tap is lit */
.atp-hit { fill: transparent; }
.atp-hit.picked { fill: color-mix(in srgb, var(--accent) 12%, transparent); }
@media (max-width: 760px) { .atp-scroll .tip { max-width: min(300px, calc(calc(100vw / var(--vz, 1)) - 56px)); } }
/* a tapped week's tooltip: tappable, with its way in */
.tip.tip-touch { pointer-events: auto; z-index: 6; }  /* above the chart's tap areas */
.tip-cta { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 40px; margin-top: 10px; padding: 0 12px;
  border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: 600 13.5px var(--f-body); cursor: pointer; }
.tip-cta:active { filter: brightness(.92); }
.tip-touch .tip-note { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }  /* the full note is in the week's panel */

/* phone month: each session a small chip with its sport icon, its fill the status (key under the grid) */
@media (max-width: 760px) {
  .cal:not(.cal-week) .day { flex-direction: row; flex-wrap: wrap; align-content: flex-start; justify-content: center; gap: 3px; }
  .cal:not(.cal-week) .day > .dn, .cal:not(.cal-week) .day > .ecard, .cal:not(.cal-week) .day > :not(.wc-wrap) { flex-basis: 100%; }
  .cal:not(.cal-week) .day > .dn.is-today { flex-basis: auto; margin: 0 calc(50% - 11px); }
  .cal:not(.cal-week) .wc-wrap { flex: none; }
  .cal:not(.cal-week) .wcard, .cp-chip { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 6px; padding: 0; overflow: hidden;
    background: color-mix(in srgb, var(--ink) 34%, var(--surface)); box-shadow: none !important; border: 0; color: #fff; }
  .cal:not(.cal-week) .wcard > *, .cal:not(.cal-week) .wcard .w-top > :not(.s-ico) { display: none; }
  .cal:not(.cal-week) .wcard { border: 0 !important; }  /* the cards' status edge stays on the cards, not on the chips */
  .cal:not(.cal-week) .wcard > .w-top { display: contents; }
  .cal:not(.cal-week) .wcard .s-ico { width: 13px; height: 13px; color: currentColor !important; }
  .cal:not(.cal-week) .wcard.wc-good, .cp-chip.wc-good { background: var(--good); }
  .cal:not(.cal-week) .wcard.wc-warn, .cp-chip.wc-warn { background: var(--warn); }
  .cal:not(.cal-week) .wcard.wc-crit, .cp-chip.wc-crit { background: var(--crit); }
  .cal:not(.cal-week) .wcard.wc-off, .cp-chip.wc-off { background: var(--warn); }
  .cal:not(.cal-week) .wcard.wc-none, .cp-chip.wc-none { background: color-mix(in srgb, var(--ink) 34%, var(--surface)); }
  .cal:not(.cal-week) .wcard.wc-planned, .cp-chip.wc-planned { background: var(--surface); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 38%, var(--surface)) !important; color: color-mix(in srgb, var(--ink) 60%, var(--surface)); }
  .cp-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 10px 0 0; font-size: 12px; color: var(--ink-2); }
  .cp-key span { display: inline-flex; align-items: center; gap: 5px; }
  .cp-key .cp-chip { width: 12px; height: 12px; border-radius: 4px; }
}
/* the tour's demo of the season chart: the button it "taps" */
.tip-cta.demo-tap { animation: demo-tap 1.1s ease-out 2; }
@keyframes demo-tap { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); transform: scale(1); }
  20% { transform: scale(.96); } 40% { transform: scale(1); } 100% { box-shadow: 0 0 0 14px transparent; } }
.tb-wk.demo-tap, .tb-acts .demo-tap { animation: demo-tap 1.1s ease-out 2; position: relative; z-index: 1; }
.wl-steps li.done.nudge { opacity: 1; }  /* ticked, but its reminder (connect your watch) stays readable */

/* the tour while a step's demo plays: "Watching…" with a bar running along the button, then "Next" with one glow */
.tour-tip .btn.playing { position: relative; overflow: hidden; background: color-mix(in srgb, var(--accent) 72%, var(--surface)); }
.tour-tip .btn.playing::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 40%; border-radius: 2px;
  background: rgb(255 255 255 / .85); animation: tour-watch 1.2s ease-in-out infinite; }
@keyframes tour-watch { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.tour-tip .btn.ready { animation: tour-ready 1s ease-out 2; }
@keyframes tour-ready { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
@media (prefers-reduced-motion: reduce) { .tour-tip .btn.playing::after, .tour-tip .btn.ready { animation: none; } }

/* the tour's finger: where a demo taps (press: a ripple) or what it shows (point: a small bob) */
#tour-finger { position: fixed; z-index: 320; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; pointer-events: none;
  background: rgb(255 255 255 / .5); border: 2.5px solid var(--accent); box-shadow: 0 3px 12px rgb(10 14 30 / .35);
  opacity: 0; transform: scale(1.25); transition: left .45s cubic-bezier(.3, .7, .3, 1), top .45s cubic-bezier(.3, .7, .3, 1), opacity .2s ease, transform .2s ease; }
#tour-finger.on { opacity: 1; transform: scale(1); }
#tour-finger.press { transform: scale(.78); background: rgb(255 255 255 / .75); }
#tour-finger.press::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--accent); animation: finger-ripple .45s ease-out; }
@keyframes finger-ripple { to { transform: scale(2.2); opacity: 0; } }
#tour-finger.point { animation: finger-bob 1.1s ease-in-out infinite; }
@keyframes finger-bob { 50% { transform: translateY(5px) scale(.94); } }
@media (prefers-reduced-motion: reduce) { #tour-finger { transition: none; } #tour-finger.point, #tour-finger.press::after { animation: none; } }

/* a strength session: sets in their own units, done ticked; a circuit as rounds (one column per round) */

.sx-block { display: grid; gap: 0; }
.sx-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.sx-name b { font-weight: 650; }
.sx-video { font-size: 12px; font-weight: 600; color: var(--accent-text, var(--accent)); text-decoration: none; padding: 1px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface)); white-space: nowrap; }
.sx-video:hover { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.sx-note { flex-basis: 100%; font-size: 12.5px; color: var(--muted); }
.sx-set { display: inline-flex; align-items: baseline; gap: 6px; min-height: 34px; padding: 6px 10px; border-radius: 9px; font-variant-numeric: tabular-nums;
  border: 1px solid var(--border); background: var(--surface); font-size: 13.5px; }
.sx-set b { font-weight: 650; }
.sx-set small { font-size: 11.5px; color: var(--muted); }
.sx-set.done { background: color-mix(in srgb, var(--good) 9%, var(--surface)); border-color: color-mix(in srgb, var(--good) 35%, var(--border)); }
.sx-set.part { background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); }
.sx-set.todo { border-style: dashed; color: var(--ink-2); }
.sx-ok { font-style: normal; font-weight: 800; color: var(--good-text, var(--good)); font-size: 12px; }
/* one row per exercise, a column per round (circuit) or per set */

@media (max-width: 760px) {

  /* the round, headings hidden */
}

/* the strength session player: one set at a time, big targets for a gym floor; full screen on a phone */
.sxp-start-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.sxp-start { min-height: 46px; padding: 0 22px; font-size: 15px; }
body.sxp-open { overflow: hidden; }
.sxp { position: fixed; inset: 0; z-index: 260; display: grid; grid-template-rows: auto 1fr auto; background: var(--bg); color: var(--ink);
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
@media (min-width: 761px) { .sxp { inset: 24px max(24px, calc(calc(50vw / var(--vz, 1)) - 300px)); border-radius: 22px; box-shadow: 0 30px 80px rgb(10 14 30 / .35), 0 0 0 100vmax rgb(10 14 30 / .45); } }
.sxp-head { position: relative; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; padding: 12px 14px 14px; }
.sxp-x, .sxp-list-b { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 18px; color: var(--ink-2); cursor: pointer; }
.sxp-ht { display: grid; text-align: center; min-width: 0; }
.sxp-ht b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sxp-ht span { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sxp-body { overflow-y: auto; padding: 22px 20px; display: grid; align-content: start; gap: 12px; }
.sxp-where { margin: 0; font-size: 13px; font-weight: 650; color: var(--accent-text, var(--accent)); text-transform: none; }
.sxp-ex { margin: 0; font: 800 28px/1.15 var(--f-body); letter-spacing: -.02em; }
.sxp-body .sx-video { justify-self: start; font-size: 13px; padding: 4px 12px; }
.sxp-note { margin: 0; color: var(--ink-2); font-size: 14px; }
.sxp-foot { display: grid; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--grid); background: var(--bg); }
.sxp-go { min-height: 54px; font-size: 16.5px; border-radius: 14px; }
.sxp-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sxp-nav .btn { min-height: 44px; }
/* rest and hold: a countdown ring */
.sxp-timer { justify-items: center; text-align: center; align-content: center; }
.sxp-ring { position: relative; width: min(calc(66vw / var(--vz, 1)), 260px); aspect-ratio: 1; }
.sxp-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sxp-ring circle { fill: none; stroke: var(--grid); stroke-width: 9; }
.sxp-ring .sxp-arc { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 0; transition: stroke-dashoffset .25s linear; }
.sxp-ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 800 52px/1 var(--f-body); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
/* all sets, and the end */
.sxp-lst section { display: grid; gap: 8px; } .sxp-lst h3 { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.sxp-lrow { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--grid); }
.sxp-lrow > span, .sxp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sxp-chip { min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font: 650 15px var(--f-body); color: var(--ink); cursor: pointer; }
.sxp-chip.done { background: color-mix(in srgb, var(--good) 14%, var(--surface)); border-color: color-mix(in srgb, var(--good) 40%, var(--border)); color: var(--good-text, var(--good)); }
.sxp-chip.on { border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.sxp-chip.w { font-size: 13.5px; }
.sxp-q { display: grid; gap: 8px; margin-top: 8px; } .sxp-q > span { font-weight: 650; } .sxp-q small { color: var(--muted); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .sxp-ring .sxp-arc, .sxp-prog i { transition: none; } }
.sxp-foot .btn { width: 100%; justify-content: center; }
.sxp-q .sxp-chips:has([data-rpe]) { display: grid; grid-template-columns: repeat(5, 1fr); }
/* player: the setup screen, the menu sheet, pause */
.sxp-chip small { display: block; font-size: 9.5px; font-weight: 600; color: var(--accent-text, var(--accent)); line-height: 1; margin-top: 2px; }
.sxp-chip:has(small) { height: auto; padding-block: 5px; }
.sxp-paused { margin: 6px 0 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); color: var(--ink); font-weight: 600; }
.sxp-sheet { position: absolute; inset: 0; z-index: 5; display: grid; align-items: end; background: rgb(10 14 30 / .45); border-radius: inherit; }
.sxp-sheet-in { display: grid; gap: 6px; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); background: var(--bg); border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgb(10 14 30 / .25); }
.sxp-sheet-in button { min-height: 50px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); font: 600 15.5px var(--f-body); color: var(--ink); text-align: left; padding: 0 16px; cursor: pointer; }
.sxp-sheet-in button.danger { color: var(--crit-text, var(--crit)); }
.sxp-sheet-in .sxp-sheet-x { text-align: center; background: none; border-color: transparent; color: var(--ink-2); }
.sxp-sheet-t { display: grid; gap: 4px; margin: 4px 4px 8px; } .sxp-sheet-t span { color: var(--ink-2); font-size: 14px; }
.sxp-sheet-in button.danger:only-of-type, [role=alertdialog] .sxp-sheet-in button.danger { background: var(--crit); color: #fff; border-color: var(--crit); text-align: center; }
/* an exercise video, in the app */
.vid-back { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; background: rgb(10 14 30 / .75); }
.vid-box { width: min(860px, 100%); display: grid; gap: 10px; }
.vid-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #fff; }
.vid-x { width: 44px; height: 44px; border-radius: 12px; border: 0; background: rgb(255 255 255 / .14); color: #fff; font-size: 18px; cursor: pointer; }
.vid-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.vid-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid-out { justify-self: start; color: rgb(255 255 255 / .8); font-size: 13px; }

/* a strength session's exercises: one line each (plan once, a dot per set, video button) */

.sx-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 40px; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--grid); }

.sx-what { display: grid; gap: 2px; min-width: 0; }
.sx-what b { font-weight: 650; }
.sx-plan { font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sx-plan em { font-style: normal; color: var(--good-text, var(--good)); font-weight: 600; margin-left: 4px; }
.sx-pips { display: grid; justify-items: end; gap: 3px; }
.sx-pips span { display: flex; gap: 5px; }
.sx-pips i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--ink) 28%, var(--surface)); }
.sx-pips i.done { background: var(--good); border-color: var(--good); }
.sx-pips i.part { background: var(--warn); border-color: var(--warn); }
.sx-pips small { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sx-row.all .sx-pips small { color: var(--good-text, var(--good)); font-weight: 650; }
a.sx-vid { display: grid; place-items: center; width: 40px; height: 40px; padding: 0 0 0 2px; border-radius: 50%; font-size: 13px; }
/* phones: the session's figures as one compact band, the start button full width */
@media (max-width: 760px) {

  .sxp-start-row { display: grid; gap: 6px; }
  .sxp-start-row .sxp-start { width: 100%; justify-content: center; min-height: 52px; font-size: 16px; }
  .sxp-start-row .dim { font-size: 12.5px; text-align: center; }
}
  /* a word, not a figure: smaller so it fits */
/* player: the exercise's plan in full and its sets as a strip */
.sxp-set { display: grid; gap: 2px; justify-items: start; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.sxp-set span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.sxp-set b { font-size: 14.5px; font-variant-numeric: tabular-nums; }
.sxp-set.done { background: color-mix(in srgb, var(--good) 11%, var(--surface)); border-color: color-mix(in srgb, var(--good) 40%, var(--border)); }
.sxp-set.done b { color: var(--good-text, var(--good)); }
.sxp-set.on { border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }

/* a circuit: the exercises in order down a line, a bracket back up to 1 with ×rounds on it, rounds as columns */
.sx-cw { max-width: 760px; }
.sx-rh, .sx-step { display: grid; grid-template-columns: 26px 32px minmax(0, 1fr) repeat(var(--n), 52px) 40px; align-items: center; column-gap: 10px; }
.sx-rh { padding-bottom: 4px; }
.sx-rh span { text-align: center; font-size: 11.5px; font-weight: 650; color: var(--muted); white-space: nowrap; }
.sx-rh span.done { color: var(--good-text, var(--good)); } .sx-rh span.part { color: var(--ink); }
.sx-rh .n { display: none; } .sx-rh b { font-weight: inherit; }
.sx-loop { list-style: none; margin: 0; padding: 0; position: relative; }
.sx-step { position: relative; padding: 10px 0; }
.sx-step > .sx-node { grid-column: 2; }
/* the line down through the numbers (each row draws its part) */
.sx-step::before { content: ""; position: absolute; left: calc(26px + 10px + 15px); top: 0; bottom: 0; width: 2px; background: color-mix(in srgb, var(--accent) 28%, var(--surface)); }
.sx-step:first-child::before { top: 50%; } .sx-step:last-of-type::before { bottom: 50%; }
/* the bracket back up: from the last number, along the left, into the first, arrow on top */
.sx-step::after { content: ""; position: absolute; left: 6px; width: 30px; top: 0; bottom: 0; border-left: 2px solid color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.sx-step:first-child::after { top: 50%; border-top: 2px solid color-mix(in srgb, var(--accent) 45%, var(--surface)); border-top-left-radius: 14px; }
.sx-step:last-of-type::after { bottom: 50%; border-bottom: 2px solid color-mix(in srgb, var(--accent) 45%, var(--surface)); border-bottom-left-radius: 14px; }
.sx-step:first-child .sx-node::before { content: ""; position: absolute; left: -9px; top: 50%; margin-top: -5px; border: 5px solid transparent; border-left: 7px solid color-mix(in srgb, var(--accent) 60%, var(--surface)); }
.sx-step:only-of-type::after, .sx-step:only-of-type::before { display: none; }
.sx-times { position: absolute; left: 7px; top: 50%; transform: translate(-50%, -50%); z-index: 2; padding: 3px 6px; border-radius: 999px; font: 800 12px var(--f-body);
  color: #fff; background: var(--accent); font-variant-numeric: tabular-nums; }
.sx-node { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font: 750 13.5px var(--f-body);
  color: var(--accent-text, var(--accent)); background: var(--surface); border: 2px solid color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.sx-rc { display: grid; place-items: center; }
.sx-rc i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--ink) 28%, var(--surface)); }
.sx-rc i.done { background: var(--good); border-color: var(--good); }
.sx-rc i.none { border-style: dashed; opacity: .4; }
@media (max-width: 760px) {
  .sx-rh, .sx-step { grid-template-columns: 22px 30px minmax(0, 1fr) repeat(var(--n), 22px) 36px; column-gap: 8px; }
  .sx-rh .w { display: none; } .sx-rh .n { display: inline; }
  .sx-step::before { left: calc(22px + 8px + 14px); }
  .sx-node { width: 30px; height: 30px; }
  a.sx-vid { width: 36px; height: 36px; }
}
.sx-node.done { color: #fff; background: var(--good); border-color: var(--good); }
.sx-facts { margin: -4px 0 0; color: var(--ink-2); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.sx-facts b { color: var(--ink); font-weight: 700; }
/* a set's dot is a button: tap when done */
.sx-dot { display: grid; place-items: center; width: 34px; height: 34px; margin: -10px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.sx-dot i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--ink) 28%, var(--surface)); transition: background-color .15s ease, transform .15s ease; }
.sx-dot:hover i { border-color: var(--good); background: color-mix(in srgb, var(--good) 18%, var(--surface)); }
.sx-dot.done i { background: var(--good); border-color: var(--good); }
.sx-dot.part i { background: var(--warn); border-color: var(--warn); }
.sx-dot:active i { transform: scale(.82); }
.sx-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.sx-pips span { gap: 4px; }
.sx-pips .sx-dot { margin: -10px -6px; }
@media (max-width: 760px) { .sx-dot { width: 40px; height: 40px; } .sx-dot i { width: 16px; height: 16px; } }

/* player v2: one set at a time, the session as segments, the exercise's picture, the target in big numbers */
.sxp-head { grid-template-columns: 44px 1fr auto; padding-bottom: 12px; }
.sxp-hb { display: flex; gap: 6px; min-width: 44px; justify-content: flex-end; }
.sxp-ib { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 16px; cursor: pointer; }
.sxp-media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 7; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: #000; cursor: pointer; }
.sxp-media img { width: 100%; height: 100%; object-fit: cover; opacity: .9; display: block; }
.sxp-media .sxp-play { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; padding-left: 4px;
  background: rgb(255 255 255 / .92); color: #111; font-size: 20px; box-shadow: 0 6px 20px rgb(0 0 0 / .35); }
.sxp-media.sm { width: 76px; flex: none; aspect-ratio: 16 / 10; border-radius: 10px; }
.sxp-media.sm .sxp-play { width: 26px; height: 26px; font-size: 10px; padding-left: 2px; }
.sxp-bigs { display: grid; gap: 10px; margin: 6px 0 4px; }
.sxp-bigs:has(> :nth-child(2)) { grid-template-columns: 1fr 1fr; }
.sxp-big { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 4px; padding: 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.sxp-big button { height: 52px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg); font-size: 26px; color: var(--ink); cursor: pointer; }
.sxp-big button:active { background: var(--surface-2); transform: scale(.96); }
.sxp-bv { display: grid; justify-items: center; line-height: 1; }
.sxp-bv output { font: 800 56px/1 var(--f-body); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.sxp-bv span { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.sxp-bigs:has(> :nth-child(2)) .sxp-bv output { font-size: 40px; }
.sxp-bigs.sm .sxp-big { grid-template-columns: 44px 1fr 44px; padding: 8px; }
.sxp-bigs.sm .sxp-big button { height: 44px; font-size: 22px; }
.sxp-bigs.sm .sxp-bv output { font-size: 34px; }
.sxp-nextc { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border)); }
.sxp-nextc > div { display: grid; gap: 1px; min-width: 0; }
.sxp-nextc span { font-size: 11.5px; font-weight: 700; color: var(--accent-text, var(--accent)); text-transform: uppercase; letter-spacing: .04em; }
.sxp-nextc b { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sxp-nextc small { color: var(--ink-2); font-size: 13px; }
.sxp-nextbox { display: grid; gap: 10px; width: 100%; max-width: 420px; text-align: left; }
.sxp-foot .sxp-nav:has(> :nth-child(3)) { grid-template-columns: 1fr 1.3fr 1fr; }
.sxp-done { font-size: 19px; min-height: 60px; }
/* timers: rest amber, ready / hold blue; the last 3 seconds pulse */
.sxp-rest .sxp-arc { stroke: var(--warn); }
.sxp-rest .sxp-where { color: var(--warn-text, var(--warn)); }
.sxp-ready .sxp-ring b { font-size: 96px; }
.sxp-ring.urgent b { color: var(--crit-text, var(--crit)); animation: sxp-pulse 1s ease-in-out infinite; }
@keyframes sxp-pulse { 50% { transform: scale(1.06); } }
.sxp-timer { gap: 16px; }
.sxp-timer .sxp-ring { width: min(calc(58vw / var(--vz, 1)), 240px); }
/* the end: the session in numbers, RPE as a scale */
.sxp-fin-h { display: flex; align-items: center; gap: 14px; }
.sxp-fin-ic { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--good); color: #fff; font: 800 28px var(--f-body); }
.sxp-fin-ic.part { background: color-mix(in srgb, var(--warn) 18%, var(--surface)); color: var(--ink); font-size: 16px; }
.sxp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
.sxp-stats div { display: grid; gap: 2px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.sxp-stats b { font: 800 26px/1 var(--f-body); font-variant-numeric: tabular-nums; } .sxp-stats b small { font-size: 14px; color: var(--muted); font-weight: 600; }
.sxp-stats span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sxp-rpe { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.sxp-rpe button { height: 46px; border-radius: 10px; border: 1px solid var(--border); background: hsl(var(--h) 55% 92%); color: hsl(var(--h) 45% 25%); font: 700 15px var(--f-body); cursor: pointer; }
.sxp-rpe button.on { background: hsl(var(--h) 55% 42%); color: #fff; border-color: transparent; transform: scale(1.06); }
.sxp-rpe-l { display: flex; justify-content: space-between; margin: 2px 2px 0; font-size: 11.5px; color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sxp-rpe button:not(.on) { background: hsl(var(--h) 30% 18%); color: hsl(var(--h) 50% 80%); } }
:root[data-theme="dark"] .sxp-rpe button:not(.on) { background: hsl(var(--h) 30% 18%); color: hsl(var(--h) 50% 80%); }
@media (prefers-reduced-motion: reduce) { .sxp-ring.urgent b { animation: none; } }
.sxp-ib { display: grid; place-items: center; color: var(--ink-2); }
.sxp-ib svg { width: 20px; height: 20px; fill: currentColor; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sxp-ib svg [fill="none"] { fill: none; }
.sxp-ib[aria-pressed="false"] { color: var(--muted); }
@media (min-width: 761px) { .sxp-media:not(.sm) { aspect-ratio: 16 / 6; } }

/* the player's cover (Before you start) */
.sxp-cover { gap: 14px; padding-top: 0; }
.sxp-hero { position: relative; margin: 0 -20px; height: 180px; overflow: hidden; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #0b1020)); }
.sxp-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sxp-hero > div { position: absolute; inset: auto 0 0 0; padding: 40px 20px 14px; background: linear-gradient(transparent, rgb(8 12 26 / .85)); color: #fff; }
.sxp-hero span { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .85; }
.sxp-hero h2 { margin: 2px 0 0; font: 800 24px/1.15 var(--f-body); letter-spacing: -.02em; }
@media (min-width: 761px) { .sxp-hero { margin: 0 -20px; border-radius: 0; } }
.sxp-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sxp-kpis div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.sxp-kpis b { font: 800 24px/1 var(--f-body); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.sxp-kpis span { font-size: 12px; color: var(--muted); font-weight: 600; }
.sxp-instr { font-size: 14px; color: var(--ink-2); }
.sxp-instr summary { list-style: none; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sxp-instr summary::-webkit-details-marker { display: none; }
.sxp-instr summary::after { content: " More"; color: var(--accent-text, var(--accent)); font-weight: 600; }
.sxp-instr[open] summary { display: none; } .sxp-instr p { margin: 0; }
.sxp-list { display: grid; gap: 8px; }
.sxp-list-h { display: flex; align-items: center; justify-content: space-between; margin: 0; }
.sxp-list-h .sx-x { font-size: 13px; padding: 3px 10px; }
.sxp-list ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.sxp-list li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: var(--surface); }
.sxp-list li + li { border-top: 1px solid var(--grid); }
.sxp-list li > div { display: grid; gap: 1px; min-width: 0; }
.sxp-list li b { font-size: 15px; } .sxp-list li span { font-size: 13px; color: var(--ink-2); }
.sxp-th { position: relative; flex: none; width: 64px; height: 44px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #000; cursor: pointer; }
.sxp-th img { width: 100%; height: 100%; object-fit: cover; opacity: .85; display: block; }
.sxp-th span { position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .9); color: #111; font-size: 9px; padding-left: 2px; }
.sxp-th.none { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-weight: 700; }
.sxp-rests { display: grid; gap: 10px; }
.sxp-rests h3 { margin: 4px 0 0; font-size: 15px; }
.sxp-rests .sxp-q { margin: 0; gap: 6px; } .sxp-rests .sxp-q > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.sxp-segc { display: flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface-2); }
.sxp-segc button { position: relative; flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: none; font: 650 14px var(--f-body); color: var(--ink-2); cursor: pointer; font-variant-numeric: tabular-nums; }
.sxp-segc button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(10 14 30 / .14); }
.sxp-segc .sug { position: absolute; top: 5px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.sxp-sw { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; }
.sxp-sw > span { display: grid; gap: 2px; } .sxp-sw small { color: var(--muted); font-size: 12.5px; }
.sxp-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sxp-sw i { flex: none; position: relative; width: 48px; height: 28px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 22%, var(--surface)); transition: background-color .15s ease; }
.sxp-sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .15s ease; }
.sxp-sw input:checked + i { background: var(--good); } .sxp-sw input:checked + i::after { transform: translateX(20px); }
.sxp-sw input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.sxp.on-cover .sxp-ht, .sxp.on-cover .sxp-segs { visibility: hidden; }
.sxp-list ol { gap: 0; }
.sxp-list-h .sx-x { flex: none; padding: 3px 10px; border-radius: 999px; font: 800 13px var(--f-body); color: var(--accent-text, var(--accent)); background: color-mix(in srgb, var(--accent) 11%, var(--surface)); }

/* player: one set (picture with the name over it, the target in the middle, rounds as dots) */
.sxp-set2 { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.sxp-set2 > * { flex-shrink: 0; }
.sxp-cov { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; max-height: calc(34vh / var(--vz, 1)); padding: 0; border: 0; border-radius: 20px; overflow: hidden; background: #000; cursor: pointer; text-align: left; }
.sxp-cov img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; }
.sxp-cov > div { position: absolute; inset: auto 0 0 0; padding: 36px 16px 14px; background: linear-gradient(transparent, rgb(8 12 26 / .88)); }
.sxp-cov .sxp-where { color: rgb(255 255 255 / .85); margin: 0; }
.sxp-cov .sxp-ex { color: #fff; margin: 2px 0 0; font-size: 28px; }
.sxp-cov .sxp-play { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; padding-left: 3px;
  background: rgb(255 255 255 / .92); color: #111; font-size: 14px; box-shadow: 0 4px 14px rgb(0 0 0 / .35); }
.sxp-nocov .sxp-ex { font-size: 30px; margin: 2px 0 0; }
.sxp-set2 .sxp-note { margin: -4px 0 0; }
.sxp-target { flex: 1 0 auto; display: grid; align-content: center; justify-items: center; gap: 10px; min-height: 180px; }
.sxp-target .sxp-bigs { width: 100%; margin: 0; }
.sxp-target .sxp-big { border: 0; background: none; padding: 0; grid-template-columns: 64px 1fr 64px; }
.sxp-target .sxp-big button { height: 64px; border-radius: 50%; font-size: 30px; background: var(--surface); }
.sxp-target .sxp-bv output { font-size: 96px; }
.sxp-target .sxp-bigs:has(> :nth-child(2)) .sxp-bv output { font-size: 56px; }
.sxp-target .sxp-bigs:has(> :nth-child(2)) .sxp-big { grid-template-columns: 48px 1fr 48px; }
.sxp-target .sxp-bigs:has(> :nth-child(2)) .sxp-big button { height: 48px; font-size: 24px; }
.sxp-target .sxp-bv span { font-size: 15px; }
.sxp-plan-was { margin: -6px 0 0; font-size: 13px; color: var(--warn-text, var(--warn)); font-weight: 600; }
.sxp-nx { display: flex; align-items: baseline; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.sxp-nx span { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-text, var(--accent)); }
.sxp-nx b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } .sxp-nx small { color: var(--ink-2); white-space: nowrap; margin-left: auto; }
.sxp-nx.last span { color: var(--good-text, var(--good)); }
.sxp-row { display: grid; grid-template-columns: 56px 1fr 56px; gap: 8px; }
.sxp-sq { min-height: 60px; font-size: 26px; padding: 0; border-radius: 16px; }
.sxp-row .sxp-go { min-height: 60px; }
.sxp-link { justify-self: center; border: 0; background: none; color: var(--ink-2); font: 600 13.5px var(--f-body); text-decoration: underline; padding: 6px; cursor: pointer; }
/* the set's video, playing in place of its picture */
.sxp-vid { cursor: default; min-height: 200px; max-height: none; }
.sxp-vcap { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 0; }
.sxp-vcap > div { display: grid; min-width: 0; }
.sxp-vid-x { flex: none; }
.sxp-vcap .sxp-where { margin: 0; } .sxp-vcap .sxp-ex { margin: 0; font-size: 24px; }
/* set screen: rounds as tappable chips, this round's exercises below */
.sxp-target { flex: 0 0 auto; min-height: 0; padding: 8px 0 4px; }
.sxp-this { display: grid; gap: 6px; }
.sxp-this h3 { margin: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sxp-this ol { list-style: none; margin: 0; padding: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.sxp-this li + li { border-top: 1px solid var(--grid); }
.sxp-this li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; font: inherit; color: var(--ink-2); text-align: left; cursor: pointer; }
.sxp-this i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font: 700 12.5px var(--f-body); font-style: normal; border: 1.5px solid var(--border); }
.sxp-this b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sxp-this span { font-size: 13px; font-variant-numeric: tabular-nums; }
.sxp-this .done { color: var(--muted); } .sxp-this .done i { background: var(--good); border-color: var(--good); color: #fff; }
.sxp-this .on { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); color: var(--ink); }
.sxp-this .on i { border-color: var(--accent); color: var(--accent-text, var(--accent)); } .sxp-this .on b { font-weight: 750; }
.sxp-this li { cursor: default; }
/* the rounds as status tags (information, not buttons) */
.sxp-isdone { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--good); color: #fff; font-weight: 700; }
/* done and current: green stays green; "current" is a ring around it */
.sxp-this li.done.on i { border-color: var(--good); background: var(--good); color: #fff; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px color-mix(in srgb, var(--accent) 55%, transparent); }

/* an exercise's name swaps it; the swap panel */
.sx-swap { display: inline-flex; align-items: baseline; gap: 6px; justify-self: start; max-width: 100%; padding: 0; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.sx-swap b { font-weight: 650; }
.sx-swap span { font-size: 12px; color: var(--muted); opacity: .7; transition: opacity .15s ease, color .15s ease; }
.sx-swap:hover b { text-decoration: underline; text-underline-offset: 3px; } .sx-swap:hover span { opacity: 1; color: var(--accent-text, var(--accent)); }
@media (hover: none) { .sx-swap span { opacity: 1; } }
.swp { width: min(560px, 100%); max-height: min(calc(86vh / var(--vz, 1)), 760px); display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 10px; }
.swp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.swp-head h3 { margin: 2px 0 0; } .swp-head p { margin: 2px 0 0; font-size: 13px; }
.swp-q { font: inherit; font-size: 15px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--ink); }
.swp-q:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.swp-cap { margin: 0; min-height: 1em; }
.swp-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; border-radius: 14px; border: 1px solid var(--border); }
.swp-list li + li { border-top: 1px solid var(--grid); }
.swp-it { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; background: var(--surface); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.swp-it:hover { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.swp-it img, .swp-noimg { width: 64px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--surface-2); display: block; }
.swp-it > span:not(.swp-go) { display: grid; gap: 1px; min-width: 0; }
.swp-it b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .swp-it small { color: var(--muted); font-size: 12px; }
.swp-it.armed { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); box-shadow: inset 3px 0 0 var(--accent); }
.swp-go { padding: 6px 14px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 13.5px; }
.swp-none { padding: 18px 14px; color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .modal-back:has(.swp) { align-items: end; padding: 0; } .swp { width: 100%; border-radius: 20px 20px 0 0; max-height: calc(88vh / var(--vz, 1)); } }
.swp-f { display: flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface-2); }
.swp-f[hidden] { display: none; }
.swp-f button { flex: 1; min-height: 38px; border: 0; border-radius: 9px; background: none; font: 650 14px var(--f-body); color: var(--ink-2); cursor: pointer; }
.swp-f button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(10 14 30 / .14); }
.swp { grid-template-rows: auto auto auto auto 1fr auto; }
/* swap panel: muscle groups as a grid, search results under their muscle */
.swp-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
.swp-g { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-height: 52px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.swp-g:hover { border-color: var(--accent); }
.swp-g b { font-weight: 650; } .swp-g span { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.swp-g.cur { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.swp-list li.swp-groups + li { border-top: 0; }
.swp-h { position: sticky; top: 0; z-index: 1; padding: 8px 12px; background: var(--surface-2); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.swp-h span { color: var(--muted); font-weight: 600; margin-left: 4px; }
.swp-back { border: 0; background: none; padding: 0 6px 0 0; font: inherit; color: var(--accent-text, var(--accent)); font-weight: 650; cursor: pointer; }
.swp-cap { text-transform: none; }
/* swap panel: a result's thumbnail previews its clip */
.swp-row { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: center; background: var(--surface); padding-left: 10px; }
.swp-row .swp-it { grid-template-columns: minmax(0, 1fr) auto; padding-left: 12px; }
.swp-row > .swp-noimg { width: 64px; height: 40px; }
.swp-pv { position: relative; width: 64px; height: 40px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #000; cursor: pointer; }
.swp-pv img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .85; }
.swp-pv span { position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; padding-left: 2px; background: rgb(255 255 255 / .9); color: #111; font-size: 9px; }
.swp-pv.on { box-shadow: 0 0 0 2px var(--accent); } .swp-pv.on span { background: var(--accent); color: #fff; }
.swp-vid { padding: 0 10px 10px; background: var(--surface); }
.swp-list li.swp-vid { border-top: 0; }
.swp-vid > div { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; border-radius: 12px; overflow: hidden; background: #000; }
.swp-vid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* an exercise's clip, opened under its row */
.clip-row { list-style: none; padding: 0 10px 10px; background: var(--surface); }
.sx-loop > .clip-row, .sx-rows > .clip-row { padding: 0 0 10px 0; background: none; }
.sx-loop > .clip-row { margin-left: calc(26px + 32px + 20px); }
.sxp-list li.clip-row + li { border-top: 1px solid var(--grid); }
.sxp-list li + li.clip-row { border-top: 0; }
.clip { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; max-height: max(200px, calc(46vh / var(--vz, 1))); border-radius: 12px; overflow: hidden; background: #000; }
/* YouTube's player as YouTube shows it (its title, buttons, logo): the box's whole area, nothing over it, at least 200 px tall (YouTube's rules) */
.clip iframe, .sxp-vid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.clip-on { box-shadow: 0 0 0 2px var(--accent); }
a.sx-vid.clip-on { background: var(--accent); color: #fff; }
@media (max-width: 760px) { .sx-loop > .clip-row { margin-left: calc(22px + 30px + 16px); } }
.sxp-list li.clip-row, .clip-row { display: block; }
.sx-circ > .sx-cw > .clip-row { margin: 4px 0 0 calc(26px + 32px + 20px); padding: 0; background: none; }
@media (max-width: 760px) { .sx-circ > .sx-cw > .clip-row { margin-left: 0; } }

/* an exercise's target and a circuit's rounds are buttons: tap to change the plan */
.sx-edit { display: inline-flex; align-items: baseline; gap: 5px; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.sx-edit i { font-style: normal; font-size: 11px; color: var(--muted); opacity: .7; }
.sx-edit:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; } .sx-edit:hover i { opacity: 1; color: var(--accent-text, var(--accent)); }
@media (hover: none) { .sx-edit i { opacity: 1; } }
button.sx-times { border: 0; cursor: pointer; font-family: var(--f-body); }
button.sx-times:hover { filter: brightness(1.1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.pe { width: min(440px, 100%); display: grid; gap: 12px; }
.pe-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.pe-row > span { font-weight: 650; }
.pe-step { display: flex; align-items: center; gap: 6px; }
.pe-step button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); font-size: 22px; color: var(--ink); cursor: pointer; }
.pe-step output { min-width: 56px; text-align: center; font: 800 24px var(--f-body); font-variant-numeric: tabular-nums; }
.pe-note { margin: 0; font-size: 13px; }
@media (max-width: 760px) { .modal-back:has(.pe) { align-items: end; padding: 0; } .pe { width: 100%; border-radius: 20px 20px 0 0; } }
/* add an exercise to a block; remove one from its ✎ panel */
.sx-add { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1.5px dashed color-mix(in srgb, var(--ink) 18%, var(--surface)); border-radius: 14px;
  background: none; font: 650 14.5px var(--f-body); color: var(--ink-2); cursor: pointer; text-align: left; }
.sx-add span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent-text, var(--accent)); font-size: 18px; line-height: 1; }
.sx-add:hover { border-color: var(--accent); color: var(--ink); }
.sx-circ .sx-add { margin-left: calc(26px + 10px); width: calc(100% - 36px); }
.pe .modal-actions { flex-wrap: wrap; }
.pe-del { margin-right: auto; }
.pe-del.armed { background: var(--crit); color: #fff; border-color: var(--crit); }
@media (max-width: 760px) { .sx-circ .sx-add { margin-left: 0; width: 100%; } }
/* player: where you are, one box per round (or exercise); the current one wide and named */
.sxp-trk { grid-column: 1 / -1; display: flex; gap: 6px; margin-top: 10px; min-width: 0; }
.sxp-tg { flex: 1 1 0; min-width: 34px; display: grid; place-items: center; height: 34px; padding: 0 8px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; }
.sxp-tg b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sxp-tg.done { background: color-mix(in srgb, var(--good) 16%, var(--surface)); color: var(--good-text, var(--good)); }
.sxp-tg.cur { flex: 5 1 0; height: auto; min-height: 46px; padding: 6px 12px; place-items: start; align-content: center; gap: 5px; background: var(--surface);
  color: var(--ink); box-shadow: inset 0 0 0 2px var(--accent); }
.sxp-tg.cur b { font-size: 13.5px; color: var(--accent-text, var(--accent)); }
.sxp-tg.cur span { display: flex; gap: 4px; width: 100%; }
.sxp-tg.cur i { flex: 1; height: 5px; border-radius: 3px; background: var(--grid); }
.sxp-tg.cur i.d { background: var(--good); }
.sxp-tg.cur i.on { background: var(--accent); }
.sxp.on-cover .sxp-trk { display: none; }
.sxp-cov .sxp-where:empty, .sxp-nocov .sxp-where:empty { display: none; }
/* a clip's cover: the exercise's picture until the video plays clean */

/* the swap panel's way from a group's best-known exercises to all of them */
.swp-more { list-style: none; padding: 10px 12px 12px; }
.swp-more button { width: 100%; min-height: 44px; border: 1px dashed var(--grid); border-radius: 12px; background: none; color: var(--accent); font: 600 14px var(--f-body); cursor: pointer; }
.swp-more button:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }

/* phone: the swap sheet has a set height (the list scrolls inside), within the part the keyboard leaves visible */
@media (max-width: 760px) { .swp { height: min(calc(88dvh / var(--vz, 1)), calc(var(--vvh, calc(100dvh / var(--vz, 1))) - 12px)); max-height: none; } }

/* the quick view opens beside its session: it slides in from that side */
.qv.qv-left { animation-name: qv-in-left; }
@keyframes qv-in-left { from { transform: translateX(-16px); opacity: 0; } }

/* the quick view's strength session: its circuit drawn as on the page (smaller, no round columns), other blocks as a list */
.qv-sx { display: grid; gap: 12px; }
.qv-sx:empty { display: none; }
.sqv h4 { margin: 0 0 4px; font: 700 13.5px var(--f-body); color: var(--ink); }
.sqv h4 span { font-weight: 500; color: var(--muted); font-size: 12.5px; margin-left: 4px; }
.sqv .sx-step { grid-template-columns: 26px 28px minmax(0, 1fr); padding: 6px 0; }
.sqv .sx-step::before { left: calc(26px + 10px + 13px); }
.sqv .sx-node { width: 28px; height: 28px; font-size: 12.5px; }
.sqv-what { display: grid; min-width: 0; }
.sqv-what b, .sqv-list b { font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sqv-what small, .sqv-list small { color: var(--muted); font-size: 12px; }

/* the session's start: the screen turns to the accent, 3-2-1 in a ring that fills, the first exercise named under it, Go */
.sxp-launch { position: absolute; inset: 0; z-index: 30; display: grid; place-content: center; justify-items: center; gap: 22px; padding: 24px;
  background: var(--accent); color: #fff; opacity: 0; transition: opacity .25s ease; cursor: pointer; border-radius: inherit; }
.sxp-launch.on { opacity: 1; }
.sxl-cap { margin: 0; font: 700 15px var(--f-body); letter-spacing: .02em; opacity: .85; }
.sxp-launch.go .sxl-cap { visibility: hidden; }
.sxl-ring { position: relative; width: 190px; height: 190px; display: grid; place-items: center; }
.sxl-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.sxl-ring circle { fill: none; stroke: rgb(255 255 255 / .22); stroke-width: 8; }
.sxl-ring .sxl-arc { stroke: #fff; stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: calc(339.3 * (1 - var(--k, 0) / 3)); transition: stroke-dashoffset .8s linear; }
.sxl-n { font: 800 88px/1 var(--f-body); font-variant-numeric: tabular-nums; }
.sxp-launch.go .sxl-n { font-size: 64px; }
.sxl-n.pop { animation: sxl-pop .8s cubic-bezier(.2,.8,.2,1); }
@keyframes sxl-pop { 0% { transform: scale(1.5); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(1); } }
.sxl-first { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 16px; background: rgb(255 255 255 / .14); max-width: 100%; }
.sxl-first img { width: 72px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; }
.sxl-first span { display: grid; min-width: 0; }
.sxl-first small { font-size: 12px; opacity: .8; }
.sxl-first b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sxl-first em { font-style: normal; font-size: 13.5px; opacity: .9; }
.sxl-skip { margin: 0; font-size: 12.5px; opacity: .7; }
@media (prefers-reduced-motion: reduce) { .sxp-launch, .sxl-ring .sxl-arc { transition: none; } }

/* session editor: a planner on desktop (session on the left, the steps' work area on the right), stacked on a phone */
.modal.sf.sf-build { width: min(780px, 100%); max-height: calc(calc(100dvh / var(--vz, 1)) - 32px); overflow-y: auto; overscroll-behavior: contain; }
.sf-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sf-hd h3 { margin: 2px 0 0; }
.sf-body, .sf-meta { display: grid; gap: 12px; align-content: start; min-width: 0; }

.sf-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.sf-tiles button { display: grid; justify-items: center; gap: 4px; padding: 8px 4px 7px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg);
  color: var(--ink-2); font: inherit; font-size: 11.5px; line-height: 1.2; cursor: pointer; text-align: center; }
.sf-tiles button .s-ico { width: 20px; height: 20px; }
.sf-tiles button:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); color: var(--ink); }
.sf-tiles button[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--ink); font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--accent); }
.sf-tiles button:disabled { cursor: default; opacity: .6; }

.fld input:disabled { color: var(--ink-2); background: var(--surface-2); }

.se-link { border: 0; background: none; padding: 2px 0; color: var(--accent); font: inherit; font-size: 12.5px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.se-link:hover { text-decoration: underline; }
.se { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); min-width: 0; align-content: start; }
.se-locked { gap: 8px; justify-items: start; }
.se-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.se-sum { display: flex; align-items: baseline; font-variant-numeric: tabular-nums; }
.se-sum > span { display: inline-flex; align-items: baseline; gap: 4px; padding: 0 14px; border-left: 1px solid var(--border); line-height: 1.1; }
.se-sum > span:first-child { padding-left: 0; border-left: 0; }
.se-sum b { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.se-sum small { font-size: 12px; font-weight: 600; color: var(--muted); }
.se-tools { display: flex; align-items: center; gap: 8px; }
.se-metric button { padding: 4px 10px; font-size: 12.5px; }
.se-hist { display: inline-flex; gap: 2px; }
.se-hist button { width: 30px; height: 28px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--ink); cursor: pointer; font-size: 15px; }
.se-hist button:disabled { opacity: .35; cursor: default; }
.se-prof { display: grid; gap: 6px; }
.se-prof .chart { min-height: 130px; }
.se-prof path.bar { transition: opacity .15s; }
.se-prof path.bar.dim { opacity: .28; }
.chart text.prof-band-t { font-size: 10px; fill: var(--muted); font-weight: 600; }

/* the steps as one table: same columns for every row, a repeat's steps on a rail */
.se-list { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; }
.se-row { display: grid; grid-template-columns: 14px 52px 112px minmax(80px, 1fr) 78px 136px 136px minmax(0, 84px) 92px; gap: 6px; align-items: center;
  min-height: 42px; padding: 3px 6px 3px 4px; border-left: 3px solid transparent; border-bottom: 1px solid var(--grid); }
.se-colh { min-height: 26px; border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 600; color: var(--muted); }
.se-colh .r, .se-btime { text-align: right; }
.se-row.in-b { border-left-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 3.5%, transparent); }
.se-row.in-b .se-name { margin-left: 10px; width: calc(100% - 10px); }
.se-block { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); border-bottom-color: transparent; }
.se-addin { min-height: 30px; }
.se-addin .se-link { grid-column: 4 / -1; justify-self: start; margin-left: 10px; }
.se-row:not(.se-colh):hover, .se-row.hov { background: color-mix(in srgb, var(--zc, var(--accent)) 7%, var(--surface)); }
.se-row.picked { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--accent); border-radius: 6px; }
.se-row input, .se-row select { font: inherit; font-size: 13.5px; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 5px 6px; min-width: 0; width: 100%; box-sizing: border-box; }
.se-row select { cursor: pointer; }
.se-row input:hover, .se-row select:hover { border-color: var(--border); background: var(--bg); }
.se-row input:focus, .se-row select:focus { outline: 2px solid var(--accent); outline-offset: 0; background: var(--bg); border-color: transparent; }
.se-name { font-weight: 500; }
.se-dur { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; padding-left: 4px !important; padding-right: 6px !important; }
.se-zone { color: var(--ink) !important; border-left: 4px solid var(--zc) !important; font-weight: 500; }
.se-tgt { display: inline-flex; align-items: center; gap: 2px; min-width: 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.se-tgt.ro { color: var(--ink); padding-left: 6px; }
.se-tgt input { width: 50px; flex: none; text-align: center; padding: 5px 2px; font-weight: 600; font-variant-numeric: tabular-nums; border-color: var(--border); background: var(--bg); }
.se-tgt small { font-size: 11px; color: var(--muted); margin-left: 2px; }
.se-eq { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.se-where { position: relative; height: 8px; border-radius: 4px; background: var(--grid); overflow: hidden; }
.se-where i { position: absolute; top: 0; bottom: 0; background: var(--zc, var(--accent)); border-radius: 2px; }
.se-block .se-where i { background: var(--accent); opacity: .6; }
.se-rep { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; white-space: nowrap; }
.se-rep input { width: 38px; text-align: center; font-weight: 700; border-color: var(--border); background: var(--bg); }
.se-bsum { font-size: 12.5px; padding-left: 6px; }
.se-btime { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; padding-right: 6px; }
.se-grip { cursor: grab; color: var(--muted); font-size: 11px; letter-spacing: -2px; user-select: none; text-align: center; opacity: .5; }
.se-row:hover .se-grip { opacity: 1; }
.dragging { opacity: .45; }
.drop-before { box-shadow: inset 0 3px 0 var(--accent); }
.drop-after { box-shadow: inset 0 -3px 0 var(--accent); }
.se-acts { display: inline-flex; gap: 2px; justify-content: flex-end; opacity: .55; }
.se-row:hover .se-acts, .se-row.picked .se-acts, .se-row:focus-within .se-acts { opacity: 1; }
.se-acts button { width: 22px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; }
.se-acts button:hover { background: var(--wash); color: var(--ink); }
.se-acts button[data-a="del"]:hover { color: var(--crit-text); }
.se-adds { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.se-addb { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg);
  color: var(--ink); font: inherit; font-size: 12.5px; cursor: pointer; }
.se-addb::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--zc); }
.se-addb:hover { border-color: var(--zc); }

.se-empty { display: grid; gap: 12px; }
.se-empty p { margin: 0; }
.se-shapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.se-shape { display: grid; gap: 2px; justify-items: start; text-align: left; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  color: var(--ink); font: inherit; cursor: pointer; }
.se-shape:hover { border-color: var(--accent); }
.se-shape b { font-size: 13.5px; margin-top: 6px; }
.se-shape span { font-size: 12px; color: var(--muted); }
.se-mini { width: 100%; height: 34px; display: block; }
/* desktop: the planner fills the screen; the step list scrolls inside its column */
@media (min-width: 961px) {
  .modal.sf.sf-wide { width: min(1320px, calc(calc(100vw / var(--vz, 1)) - 48px)); height: calc(calc(100dvh / var(--vz, 1)) - 48px); max-height: none; overflow: hidden; display: flex; flex-direction: column; padding: 22px 24px; }
  .sf-wide .sf-body { flex: 1; min-height: 0; grid-template-columns: 236px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-content: stretch; gap: 18px; }
  .sf-wide .sf-meta { overflow-y: auto; padding-right: 4px; }

  .sf-wide .sf-meta { gap: 10px; }

  .sf-wide .sf-meta .fld input, .sf-wide .sf-meta .fld textarea { padding: 6px 8px; font-size: 13.5px; }

  .sf-wide .sf-work { min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 0 18px 18px; }
  .sf-wide .se-top { position: sticky; top: 0; z-index: 2; padding: 14px 0 10px; background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); border-bottom: 1px solid transparent; }
  .sf-wide .sf-work.se-locked { grid-template-rows: none; }
  .sf-wide .se-empty { overflow-y: auto; }
  .sf-wide .sf-work { align-self: stretch; }
  .sf-wide .se-prof .chart { min-height: 210px; }
  .sf-wide .sf-hd h3 { font-size: 22px; }
}
@media (max-width: 760px) {
  .modal.sf.sf-build { max-height: calc(var(--vvh, calc(100dvh / var(--vz, 1))) - 24px); padding: 16px; }
  .se { padding: 8px; }
  .se-sum { gap: 12px; } .se-sum b { font-size: 17px; }
  .se-row { grid-template-columns: 14px minmax(0, 1fr) 76px auto; grid-template-areas: "grip cls dur acts" "grip name name name" "grip zone zone zone" "grip tgt tgt eq"; row-gap: 2px; padding: 6px 4px; }
  .se-row > .se-grip { grid-area: grip; align-self: stretch; display: grid; place-items: center; }
  .se-row .se-where, .se-colh { display: none; }
  .se-cls { grid-area: cls; } .se-name { grid-area: name; } .se-dur { grid-area: dur; } .se-zone { grid-area: zone; } .se-tgt { grid-area: tgt; } .se-eq { grid-area: eq; text-align: right; } .se-row > .se-acts { grid-area: acts; opacity: 1; }
  .se-block { grid-template-areas: "grip cls dur acts"; } .se-rep { grid-area: cls; } .se-btime { grid-area: dur; } .se-bsum { display: none; }
  .se-addin { grid-template-areas: none; display: block; } .se-row.in-b .se-name { margin-left: 0; width: 100%; }
  .se-row input, .se-row select { border-color: var(--border); background: var(--bg); }
  .se-acts button { width: 30px; height: 30px; }

  .sf-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Build it, step one: the sport, as large tiles; the planner then names it with a way back */
.sf-pick { display: grid; gap: 12px; padding: 6px 0 4px; }
.sf-pick-q { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink); }
.sf-tiles.big { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sf-tiles.big button { padding: 16px 6px 13px; font-size: 13.5px; gap: 7px; }
.sf-tiles.big button .s-ico { width: 28px; height: 28px; }
.sf-tiles.big button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* the planner's chart */
.se-chart { position: relative; min-height: 170px; touch-action: pan-y; }
.se-svg { display: block; width: 100%; user-select: none; -webkit-user-select: none; overflow: visible; }
.se-svg text { font-family: var(--f-body); }
.se-svg .sc-zl { font-size: 10.5px; }
.se-svg .sc-zn { font-weight: 700; }
.se-svg .sc-zr, .se-svg .sc-t { font-size: 10px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.se-svg .sc-zl.on .sc-zr { fill: var(--ink); }
.se-svg .sc-edgeline { stroke: var(--axis); stroke-dasharray: 2 4; opacity: .55; }
.se-svg .sc-grid { stroke: var(--grid); opacity: .6; }
.se-svg .sc-base { stroke: var(--axis); }
.se-svg .sc-brk { fill: none; stroke: var(--muted); stroke-width: 1; opacity: .45; }
.se-svg .sc-brk-t { font-size: 10.5px; font-weight: 600; fill: var(--muted); }
.se-svg .sc-bar { transition: opacity .15s; }
.se-svg .sc-bar.dim { opacity: .32; }

.se-svg .sc-cap { opacity: .34; transition: opacity .15s; }
.se-svg .sc-ceil { fill: none; stroke-width: 1.5; stroke-linecap: round; }
.se-svg .sc-bar:hover .sc-cap, .se-svg .sc-bar.picked .sc-cap { opacity: .55; }
.se-svg .sc-bar.picked .sc-ceil { stroke-width: 2.5; }
.se-svg .sc-tz { font-size: 10.5px; font-weight: 600; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.se-svg .sc-tz.on { fill: var(--ink); }
.se-svg .sc-tzp { font-weight: 500; fill: var(--muted); }
.se-svg .sc-hit, .se-svg .sc-edge { fill: transparent; }
.se-svg .sc-grip { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1; pointer-events: none; }
.se-svg .sc-lab { pointer-events: none; }
.se-svg .sc-lab rect { fill: var(--ink); opacity: .94; filter: drop-shadow(0 4px 10px rgb(0 0 0 / .18)); }
.se-svg .sc-lab text { fill: var(--surface); font-variant-numeric: tabular-nums; }
.se-svg .sc-lab-n { font-size: 12px; font-weight: 700; }
.se-svg .sc-lab-z { font-size: 11px; font-weight: 500; opacity: .7; }
.se-svg .sc-lab-v { font-size: 11.5px; font-weight: 500; opacity: .92; }
@media (min-width: 961px) { .sf-wide .se-chart { min-height: 220px; } }
.se-hint { margin: 0; font-size: 11.5px; color: var(--muted); }

.se-hist button { display: grid; place-items: center; }
.se-hist svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.se-hint .finger { display: none; }
@media (max-width: 760px) { .se-hint .mouse { display: none; } .se-hint .finger { display: inline; } }

/* the zone a step falls in, when targets are exact values or ranges */
.se-zone.ro { display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 8px; border-left: 4px solid var(--zc); border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; }
.se-zone.ro span { font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.se-colh small { font-weight: 500; }

/* the session column: sport and its kind, when, totals, planned effort, tags, description */

.sf-rpe-w { font-weight: 600; color: var(--ink); text-transform: none; letter-spacing: 0; }

@media (min-width: 961px) { .sf-wide .sf-meta { padding: 3px 6px 6px 3px; margin: -3px -6px 0 -3px; } }

/* the session column as a quiet document: title, a property list, totals, notes; hairlines rather than boxes */
.sfm { gap: 0 !important; }
.sfm-sport { display: flex; align-items: center; gap: 8px; padding: 2px 0 8px; }
.sfm-sport .s-ico { width: 20px; height: 20px; }
.sfm-sport b { font-size: 15px; }
.sfm-sport .se-link { margin-left: auto; }
.sfm-sub { display: flex; flex-wrap: wrap; gap: 2px 12px; padding-bottom: 10px; }
.sfm-sub button { padding: 2px 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; }
.sfm-sub button:hover { color: var(--ink); }
.sfm-sub button[aria-pressed="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.sfm-title { width: 100%; box-sizing: border-box; margin: 2px 0 10px; padding: 6px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent;
  font: inherit; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.sfm-title::placeholder { color: var(--muted); font-weight: 600; }
.sfm-title:hover { background: var(--wash); }
.sfm-title:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.sfm-props { border-top: 1px solid var(--grid); }
.sfm-row { display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: center; min-height: 36px; border-bottom: 1px solid var(--grid); font-size: 13px; }
.sfm-row > span { color: var(--muted); font-size: 12.5px; padding-left: 8px; }
.sfm-row input { width: 100%; min-width: 0; box-sizing: border-box; padding: 6px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent;
  font: inherit; font-size: 13.5px; color: var(--ink); }
.sfm-row input:hover { background: var(--wash); }
.sfm-row input:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.sfm-row input::placeholder { color: var(--muted); }
.sfm-row input:disabled { background: transparent; color: var(--ink-2); }
.sfm-eff { grid-template-columns: 62px minmax(0, 1fr); grid-template-rows: auto auto; row-gap: 6px; padding: 8px 0 10px; }
.sfm-eff .sf-rpe-w { justify-self: end; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.sfm-rpe { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 2px; padding: 0 8px; }
.sfm-rpe button { height: 18px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; align-items: center; }
.sfm-rpe button i { display: block; height: 6px; border-radius: 3px; background: var(--grid); transition: background .12s, height .12s; }
.sfm-rpe button:hover i { background: color-mix(in srgb, var(--rc) 45%, var(--grid)); height: 8px; }
.sfm-rpe button.on i { background: var(--rc); }
.sfm-rpe button[aria-pressed="true"] i { height: 10px; }
.sfm-rpe button:first-child i { border-radius: 4px 2px 2px 4px; }
.sfm-rpe button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }
.sfm-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px 0; border-bottom: 1px solid var(--grid); }
.sfm-totals label { display: grid; padding: 0 8px; min-width: 0; }
.sfm-totals label + label { border-left: 1px solid var(--grid); }
.sfm-totals input { width: 100%; min-width: 0; box-sizing: border-box; padding: 2px 4px; margin-left: -4px; border: 1px solid transparent; border-radius: 6px; background: transparent;
  font: inherit; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.sfm-totals input:not(:disabled):hover { background: var(--wash); }
.sfm-totals input:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.sfm-totals input:disabled { color: var(--ink); cursor: default; }
.sfm-totals span { font-size: 11px; color: var(--muted); padding-left: 1px; }
.sfm-desc { display: grid; gap: 4px; padding-top: 10px; }
.sfm-desc-h { display: flex; justify-content: space-between; align-items: baseline; padding: 0 8px; font-size: 12.5px; color: var(--muted); }
.sfm-desc textarea { width: 100%; box-sizing: border-box; min-height: 120px; padding: 8px; border: 1px solid transparent; border-radius: 8px; background: var(--wash);
  font: inherit; font-size: 13.5px; line-height: 1.5; color: var(--ink); resize: vertical; }
.sfm-desc textarea:focus { outline: none; border-color: var(--accent); background: var(--bg); }

.sfm-totals input::placeholder { color: var(--muted); opacity: .55; font-weight: 600; }

/* phones: the planner as a full-height sheet; sport and title, then the steps, then the details; steps as one line until tapped */
.se-sumline, .se-done, .se-tools .sm { display: none; }
@media (max-width: 760px) {
  .modal-back:has(> .sf-build) { padding: 0; place-items: end stretch; }
  .modal.sf.sf-build { width: 100%; max-height: none; height: calc(var(--vvh, calc(100dvh / var(--vz, 1))) - 8px); box-sizing: border-box; border-radius: 16px 16px 0 0;
    padding: 14px 14px 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; overscroll-behavior: contain; }
  .sf-build .sf-hd { align-items: center; }
  .sf-build .sf-hd h3 { font-size: 19px; }
  .sf-build .sf-kind button { padding: 5px 10px; font-size: 13px; }
  .sf-build .modal-actions { position: sticky; bottom: 0; z-index: 4; margin: auto -14px 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); }
  .sf-build .modal-actions .btn.primary { flex: 1; }
  .sf-build .sf-tools { margin: 0 -2px; }
  .sf-build .sf-body { display: flex; flex-direction: column; gap: 0; }
  .sf-build .sfm { display: contents; }
  .sf-build .sfm-sport, .sf-build .sfm-sub, .sf-build .sfm-title { order: 1; }
  .sf-build .sf-work { order: 2; margin: 2px -6px 14px; }
  .sf-build .sfm-props, .sf-build .sfm-totals, .sf-build .sfm-desc { order: 3; }
  .sf-build .sfm-title { margin-bottom: 8px; }
  .sf-build .sfm-desc textarea { min-height: 84px; }
  /* the planner's head: totals, then the two switches and undo on one line */
  .se-top { gap: 8px; }
  .se-sum { width: 100%; }
  .se-tools { width: 100%; justify-content: space-between; gap: 6px; }
  .se-tools .seg { flex-wrap: nowrap; }
  .se-tools .seg button { white-space: nowrap; }
  .se-tools .lg { display: none; } .se-tools .sm { display: inline; }
  .se-chart { min-height: 0; }
  .se-tools .seg button { padding: 4px 8px; font-size: 12px; }
  .se-hist button { width: 28px; height: 26px; }
  .se-adds { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -8px; padding: 0 8px 2px; }
  .se-adds::-webkit-scrollbar { display: none; }
  .se-adds > * { flex: none; }

  /* a step: one line (name, time, zone and target); tapped, its editors */
  .se-row.se-step { display: block; padding: 0; border-left: 3px solid var(--zc); }
  .se-row.se-step.in-b { border-left-color: color-mix(in srgb, var(--accent) 55%, transparent); }
  .se-row.se-step:not(.open) > *:not(.se-sumline) { display: none !important; }
  .se-row .se-sumline { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n t" "z z"; gap: 2px 10px; width: 100%; padding: 9px 10px; border: 0; background: none;
    text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
  .se-row.in-b .se-sumline { padding-left: 18px; }
  .se-sumline b { grid-area: n; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .se-sumline .t { grid-area: t; font-weight: 700; font-variant-numeric: tabular-nums; }
  .se-sumline .z { grid-area: z; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .se-sumline .z i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
  .se-row.se-step.open { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "name name" "cls dur" "zone zone" "tgt eq" "acts acts";
    gap: 6px; padding: 10px; box-shadow: inset 0 0 0 1.5px var(--accent); border-radius: 8px; background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
  .se-row.se-step.open > .se-sumline, .se-row.se-step.open > .se-grip, .se-row.se-step.open > .se-where { display: none !important; }
  .se-row.se-step.open .se-name { margin-left: 0; width: 100%; font-weight: 600; }
  .se-row.se-step.open .se-zone { grid-area: zone; }
  .se-row.se-step.open .se-tgt { grid-area: tgt; }
  .se-row.se-step.open .se-eq { grid-area: eq; align-self: center; text-align: right; }
  .se-row.se-step.open > .se-acts { grid-area: acts; display: flex; justify-content: flex-start; gap: 4px; opacity: 1; }
  .se-row.se-step.open .se-acts button { width: 36px; height: 34px; border: 1px solid var(--border); background: var(--bg); }
  .se-row.se-step.open .se-done { display: inline-block; width: auto !important; margin-left: auto; padding: 0 16px; background: var(--accent) !important; color: #fff !important; border-color: var(--accent) !important; font-weight: 600; }
  .se-row.se-step.picked:not(.open) { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
  .se-block { min-height: 40px; }
  .se-block .se-acts button { width: 28px; }
  .se-addin { padding: 2px 0 6px; }
}

/* a repeat block folds to one line */
.se-fold { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 2px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--ink-2); cursor: pointer; }
.se-fold:hover { background: var(--wash); color: var(--ink); }
.se-fold svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.se-fold[aria-expanded="true"] svg { transform: rotate(90deg); }
.se-row.se-block .se-bsum { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* phones: the step picked on the chart, set in a small panel under it */
.se-insp { position: relative; display: grid; gap: 12px; padding: 12px 12px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  box-shadow: 0 6px 18px rgb(0 0 0 / .06); overflow: hidden; }
.se-insp::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--zc); }
.se-insp[hidden] { display: none; }
.si-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.si-head > i { width: 10px; height: 10px; border-radius: 3px; background: var(--zc); }
.si-head > div { display: grid; min-width: 0; line-height: 1.25; }
.si-head b { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-head small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-tag { padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--zc) 15%, var(--surface)); color: var(--ink); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.si-zones { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 3px; gap: 3px; border-radius: 12px; background: var(--wash); }
.si-zones button { height: 36px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; position: relative; }
.si-zones button::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 5px; height: 3px; border-radius: 2px; background: var(--c); opacity: .7; }
.si-zones button[aria-pressed="true"] { background: var(--c); color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--c) 40%, transparent); }
.si-zones button[aria-pressed="true"]::after { display: none; }
.si-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.si-f { display: grid; gap: 4px; min-width: 0; align-content: start; }
.si-f.wide { grid-column: 1 / -1; }
.si-l { font-size: 11.5px; font-weight: 600; color: var(--muted); padding-left: 2px; }
.si-st { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: stretch; height: 46px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); overflow: hidden; }
.si-st > button { border: 0; background: none; color: var(--ink); font-size: 20px; font-weight: 500; cursor: pointer; }
.si-st > button:first-child { border-right: 1px solid var(--grid); }
.si-st > button:last-child { border-left: 1px solid var(--grid); }
.si-st > button:active { background: var(--wash); }
.si-st:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.si-v { display: flex; align-items: center; justify-content: center; gap: 3px; min-width: 0; padding: 0 4px; }
.si-v em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--muted); }
.si-dash { color: var(--muted); }
.si-in { width: 100%; max-width: 92px; min-width: 0; padding: 0; border: 0; background: none; font: inherit; font-size: 18px; font-weight: 700; color: var(--ink); text-align: center; font-variant-numeric: tabular-nums; }
.si-in:focus { outline: none; }
.si-f.wide .si-in { max-width: 70px; }
.si-cap { font-size: 11.5px; color: var(--muted); padding-left: 2px; font-variant-numeric: tabular-nums; }

/* phones: the planner without its box: totals on the page, the chart the full width */
@media (max-width: 760px) {
  .sf-build .sf-work.se { margin: 4px 0 14px; padding: 0; border: 0; border-radius: 0; background: none; gap: 12px; }
  .sf-build .se-top { gap: 10px; }
  .sf-build .se-sum { justify-content: space-between; padding: 12px 2px; border-top: 1px solid var(--grid); border-bottom: 1px solid var(--grid); }
  .sf-build .se-sum > span { padding: 0; border: 0; flex-direction: column; align-items: flex-start; gap: 0; }
  .sf-build .se-sum b { font-size: 21px; }
  .sf-build .se-sum small { font-size: 11.5px; }
  .sf-build .se-list { margin: 0 -2px; }
}

.se-sum .ph-only { display: none; }
@media (max-width: 760px) { .sf-build .se-sum .ph-only { display: inline; } }

/* phones: the details fold to one line under the title (what's set, at a glance); open, they sit there, above the planner */
.sfm-fold { display: none; }
@media (max-width: 760px) {
  .sf-build .sfm-fold { order: 1; display: grid; grid-template-columns: auto minmax(0, 1fr) 18px; align-items: center; gap: 10px; width: 100%; margin: 0 0 6px; padding: 11px 12px;
    border: 1px solid var(--border); border-radius: 12px; background: var(--bg); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
  .sfm-fold-l { font-size: 13px; font-weight: 700; }
  .sfm-fold-s { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
  .sfm-fold svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
  .sf-build.det-open .sfm-fold { border-radius: 12px 12px 0 0; margin-bottom: 0; }
  .sf-build.det-open .sfm-fold svg { transform: rotate(180deg); }
  .sf-build:not(.det-open) .sfm-props, .sf-build:not(.det-open) .sfm-totals, .sf-build:not(.det-open) .sfm-desc { display: none; }
  .sf-build.det-open .sfm-props, .sf-build.det-open .sfm-totals, .sf-build.det-open .sfm-desc { order: 1; }
  .sf-build.det-open .sfm-props { border-top: 0; }
  .sf-build.det-open .sfm-desc { padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--grid); }
}

/* the target in exact / range mode: the value large, where it sits on your zones, each end its own stepper */
.si-tgt { display: grid; gap: 6px; }
.si-big { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.si-big b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.si-big small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.si-rib { position: relative; height: 10px; border-radius: 5px; background: var(--grid); overflow: hidden; }
.si-rib i { position: absolute; top: 0; bottom: 0; opacity: .28; }
.si-rib b { position: absolute; top: 0; bottom: 0; min-width: 4px; margin-left: -2px; border-radius: 5px; background: var(--zc); box-shadow: 0 0 0 2px var(--surface); }

.si-empty { margin: 0; padding: 6px 2px; font-size: 13px; color: var(--muted); text-align: center; }
@media (max-width: 760px) { .se-hint { display: none; } }

/* phones: a bar held still lifts and follows the finger */
.se-svg { -webkit-touch-callout: none; }
.se-svg.grab .sc-bar:not(.dim) { filter: drop-shadow(0 4px 8px rgb(0 0 0 / .22)); }
.se-svg.grab-y { cursor: ns-resize; } .se-svg.grab-x { cursor: ew-resize; }

/* leaving with changes: asked in place of the buttons */
.sf-leave { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sf-leave span { margin-right: auto; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.btn.danger-solid { background: var(--crit); border-color: var(--crit); color: #fff; }
.btn.danger-solid:hover { filter: brightness(1.05); }
@media (max-width: 760px) {
  .sf-build .sf-leave { position: sticky; bottom: 0; z-index: 4; margin: auto -14px 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); }
  .sf-leave span { flex-basis: 100%; }
  .sf-leave .btn { flex: 1; }
}
.modal-actions[hidden] { display: none !important; }

/* the shapes, one tap away above the chart (they replace the steps; undo brings them back) */
.se-shapebar { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.se-shapebar::-webkit-scrollbar { display: none; }
.se-shapebar > span { flex: none; font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.se-sh { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg);
  color: var(--ink); font: inherit; font-size: 12.5px; cursor: pointer; }
.se-sh:hover { border-color: var(--accent); }
.se-sh .se-mini { width: 34px; height: 14px; flex: none; }
.se-sh b { font-weight: 600; }
@media (max-width: 760px) { .se-shapebar { margin: 0 -8px; padding: 0 8px 2px; } .se-sh { padding: 6px 12px 6px 8px; font-size: 13px; } }

/* lighter: shapes and add buttons as plain text with their mark; the empty panel a quiet hint */
.se-shapebar { gap: 2px; }
.se-sh { padding: 5px 8px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-size: 12.5px; }
.se-sh b { font-weight: 500; }
.se-sh .se-mini { width: 26px; height: 11px; opacity: .85; }
.se-sh:hover, .se-sh:focus-visible { background: var(--wash); color: var(--ink); }
.se-adds { gap: 2px; }
.se-addb { padding: 5px 8px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-size: 12.5px; }
.se-addb::before { width: 7px; height: 7px; }
.se-addb:hover, .se-addb:focus-visible { background: var(--wash); color: var(--ink); }
.se-insp:has(.si-empty) { padding: 8px 10px; border-style: dashed; border-color: var(--grid); box-shadow: none; background: none; }
.se-insp:has(.si-empty)::before { display: none; }
.si-empty { padding: 0; font-size: 12.5px; }
@media (max-width: 760px) {
  .se-sh { padding: 7px 9px; font-size: 13px; }
  .se-addb { padding: 7px 9px; font-size: 13px; }
}

/* moving a step along the session: the line where it will land */
.se-svg .sc-ins { stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
.se-svg .sc-ins-dot { fill: var(--accent); }

/* phones: what dragging the picked bar changes, chosen in the panel and shown on the bar */

.se-svg .sc-mh circle { fill: var(--surface); stroke: var(--accent); stroke-width: 2; filter: drop-shadow(0 2px 4px rgb(0 0 0 / .18)); }
.se-svg .sc-mh text { font-size: 15px; font-weight: 700; fill: var(--accent); pointer-events: none; }
.se-svg .sc-mh { pointer-events: none; }

/* the drag choice, floating in the chart's top corner while a step is picked (phones) */
.se-prof { position: relative; }
.se-dm { position: absolute; top: 0; right: 0; z-index: 2; }
.se-dm[hidden] { display: none; }
.se-dm .seg { display: flex; padding: 3px; gap: 2px; border: 1px solid var(--border); border-radius: 999px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(6px); box-shadow: 0 2px 8px rgb(0 0 0 / .08); }
.se-dm .seg button { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 9px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: inherit; font-size: 12px; cursor: pointer; }
.se-dm .seg button i { font-style: normal; font-size: 13px; }
.se-dm .seg button[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 600; }

/* phones: done with a step, in one tap (also: tap its bar again) */
.si-head { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.si-done { height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.se-dm .seg .se-dm-done { width: 28px; padding: 0; justify-content: center; margin-left: 2px; background: var(--ink); color: var(--surface); font-weight: 700; }

/* planned sessions: a finer, lighter dash, and the same lift as the others */
.cal .wcard.wc-planned { border: 1px dashed color-mix(in srgb, var(--ink) 16%, var(--surface));
  box-shadow: 0 1px 3px rgb(15 23 42 / .10), 0 4px 12px rgb(15 23 42 / .09); }
.cal .wcard.wc-planned:hover { border-color: color-mix(in srgb, var(--ink) 32%, var(--surface)); }

/* "when": a thin track, the step's moments as fine ticks, a repeat as one span */
.se-where { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 9%, var(--surface)); overflow: visible; }
.se-where i { top: -1px; bottom: -1px; min-width: 2px; border-radius: 1px; }
.se-block .se-where i { top: 0; bottom: 0; background: var(--accent); opacity: .55; border-radius: 2px; }
.se-shapebar, .se-adds, .se-top { min-height: max-content; flex-shrink: 0; }
@media (min-width: 961px) { .sf-wide .sf-work.se { grid-auto-rows: max-content; grid-template-rows: none; } }

/* adding and removing steps where they are: a "+" between rows on hover, "+ Add step" at the end, a small menu of kinds */
#se { position: relative; }
.se-gap { position: relative; height: 0; z-index: 1; list-style: none; }
.se-gap::before { content: ""; position: absolute; left: 0; right: 0; top: -7px; height: 14px; }
.se-gap::after { content: ""; position: absolute; left: 40px; right: 0; top: -1px; height: 2px; border-radius: 1px; background: var(--accent); opacity: 0; transition: opacity .12s; }
.se-insert { position: absolute; left: 14px; top: -11px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 15px; font-weight: 600; line-height: 22px; cursor: pointer; opacity: 0; transition: opacity .12s, transform .12s; transform: scale(.85); }
.se-gap:hover::after { opacity: .55; }
.se-gap:hover .se-insert, .se-insert:focus-visible { opacity: 1; transform: none; }
.se-row.se-addrow { display: flex !important; align-items: center; justify-content: space-between; min-height: 46px; border-bottom: 0; padding-left: 10px; }
.se-row.se-addrow:hover { background: none; }
.se-addstep { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--border)); border-radius: 8px;
  background: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.se-addstep:hover { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border-style: solid; }
.se-clear { color: var(--muted) !important; font-size: 12.5px !important; }
.se-clear:hover { color: var(--crit-text) !important; }
.se-menu { position: absolute; z-index: 6; display: grid; min-width: 180px; padding: 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  box-shadow: 0 10px 28px rgb(15 23 42 / .16); }
.se-menu button { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 0; border-radius: 7px; background: none; color: var(--ink); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.se-menu button:hover, .se-menu button:focus-visible { background: var(--wash); outline: none; }
.se-menu i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
@media (min-width: 761px) { .se-row .se-acts [data-a="up"], .se-row .se-acts [data-a="down"] { display: none; } }
@media (max-width: 760px) { .se-gap { display: none; } .se-row.se-addrow { padding: 10px 2px 4px; } .se-addstep { padding: 10px 16px; font-size: 14px; } }

.se-menu { min-width: 230px; }
.se-menu button { gap: 11px; padding: 7px 10px; }
.se-menu button svg { width: 26px; height: 14px; flex: none; }
.se-menu button span { display: grid; line-height: 1.25; }
.se-menu button b { font-weight: 600; font-size: 13.5px; }
.se-menu button small { font-size: 11.5px; color: var(--muted); }
.se-menu hr { margin: 3px 6px; border: 0; border-top: 1px solid var(--grid); }

/* a folded repeat: its steps as small chips in their zone colours */
.se-bsum { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.se-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--grid);
  font-size: 12px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.se-chip i { width: 7px; height: 7px; border-radius: 2px; }
.se-reps-t { display: none; }
@media (max-width: 760px) {
  .se-row > .se-grip, .se-bhead .se-grip { display: none !important; }
  .se-row.se-block { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "rep time" "sum sum" "acts acts"; gap: 4px 10px; padding: 10px 10px 10px 8px; cursor: pointer; }
  .se-row.se-block .se-rep { grid-area: rep; } .se-row.se-block .se-btime { grid-area: time; padding: 0; font-size: 15px; } .se-row.se-block .se-bsum { grid-area: sum; display: flex; padding-left: 28px; flex-wrap: wrap; }
  .se-row.se-block .se-x { display: none; }
  .se-row.se-block .se-rep input { display: none; }
  .se-row.se-block .se-reps-t { display: inline; }
  .se-row.se-block .se-rep { font-size: 15px; gap: 6px; }
  .se-row.se-block > .se-acts { grid-area: acts; display: none; justify-content: flex-start; }
  .se-row.se-block.picked > .se-acts { display: flex; opacity: 1; padding-left: 24px; }
  .se-row.se-block.picked > .se-acts button { width: 36px; height: 32px; border: 1px solid var(--border); background: var(--bg); }
  .se-row.se-block > span:empty { display: none; }
  .se-row.se-block .se-where { display: none; }
}

/* the strength player on a computer: the phone's vertical layout in a slim window, sized to fit the screen without a scroll */
@media (min-width: 761px) {
  .sxp { inset: 22px max(22px, calc(calc(50vw / var(--vz, 1)) - 230px)); }
  .sxp-head { padding: 12px 14px 10px; }
  .sxp-head .sxp-x, .sxp-hb button { width: 38px; height: 38px; }
  .sxp-body { padding: 12px 18px 14px; }
  .sxp-set2 { gap: 10px; }
  .sxp-cov { max-height: none; aspect-ratio: 16 / 9; border-radius: 16px; }  /* the clip's own shape: no strip cropping its top and bottom */
  .sxp-cov .sxp-ex { font-size: 22px; }
  .sxp-cov > div { padding: 26px 14px 10px; }
  .sxp-cov .sxp-play { width: 34px; height: 34px; }
  .sxp-target { min-height: 0; gap: 4px; }
  .sxp-target .sxp-bv output { font-size: 68px; }
  .sxp-target .sxp-big { grid-template-columns: 48px 1fr 48px; }
  .sxp-target .sxp-big button { height: 48px; font-size: 24px; }
  .sxp-target .sxp-bigs:has(> :nth-child(2)) .sxp-bv output { font-size: 44px; }
  .sxp-target .sxp-bv span { font-size: 13.5px; }
  .sxp-this li { padding: 7px 10px; font-size: 13.5px; }
  .sxp-this h3 { margin-bottom: 4px; }
  .sxp-foot { padding: 10px 14px 12px; }
  .sxp-go { min-height: 46px; font-size: 15.5px; }
  .sxp-sq { min-height: 46px; font-size: 22px; border-radius: 14px; }
}
@media (min-width: 761px) and (max-height: 820px) { .sxp-this li { padding-block: 4px; font-size: 13px; } .sxp-target .sxp-bv output { font-size: 50px; } .sxp-target .sxp-big button { height: 42px; } .sxp-target .sxp-big { grid-template-columns: 42px 1fr 42px; } .sxp-body { padding-block: 6px 8px; } .sxp-set2 { gap: 8px; } }
@media (min-width: 761px) { .sxp-row { grid-template-columns: 42px 1fr 42px; gap: 6px; } .sxp-row .sxp-go, .sxp .sxp-done { min-height: 42px; font-size: 15px; border-radius: 12px; } .sxp-row .sxp-sq { min-height: 42px; font-size: 18px; border-radius: 12px; } .sxp-foot { padding: 8px 14px 10px; } }
@media (min-width: 761px) and (max-height: 820px) { .sxp { inset: 16px max(16px, calc(calc(50vw / var(--vz, 1)) - 200px)); } }

/* the player's menus on a computer: a small menu under the button that opened it; the confirmation a small card */
@media (min-width: 761px) {
  .sxp-sheet { background: rgb(10 14 30 / .18); align-items: start; }
  .sxp-sheet-in { width: 240px; gap: 1px; padding: 5px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 32px rgb(10 14 30 / .2); margin-top: 58px; }
  .sxp-sheet-menu .sxp-sheet-in { justify-self: start; margin-left: 14px; }
  .sxp-sheet-opts .sxp-sheet-in { justify-self: end; margin-right: 14px; }
  .sxp-sheet-in button { min-height: 0; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font: 500 13.5px var(--f-body); }
  .sxp-sheet-in button:hover { background: var(--wash); }
  .sxp-sheet-in .sxp-sheet-x { display: none; }
  .sxp-sheet-confirm { align-items: center; background: rgb(10 14 30 / .35); }
  .sxp-sheet-confirm .sxp-sheet-in { justify-self: center; width: min(320px, 86%); margin: 0; padding: 16px; gap: 10px; grid-template-columns: 1fr 1fr; }
  .sxp-sheet-confirm .sxp-sheet-t { grid-column: 1 / -1; margin: 0; } .sxp-sheet-confirm .sxp-sheet-t b { font-size: 15px; } .sxp-sheet-confirm .sxp-sheet-t span { font-size: 13px; }
  .sxp-sheet-confirm .form-err { grid-column: 1 / -1; }
  .sxp-sheet-confirm .sxp-sheet-in button { min-height: 36px; padding: 0 12px; text-align: center; border: 1px solid var(--border); border-radius: 9px; font-weight: 600; }
  .sxp-sheet-confirm .sxp-sheet-in .sxp-sheet-x { display: block; order: 1; color: var(--ink); background: var(--bg); }
  .sxp-sheet-confirm .sxp-sheet-in button.danger { order: 2; }
}

/* a new conversation: heading, ideas and the message box as one group in the middle, a readable width */
@media (min-width: 761px) {
  .c-empty .c-scroll { flex: 0 1 auto; margin-top: auto; }
  .c-empty .composer { margin-bottom: auto; padding-bottom: 6vh; }
  .c-empty .c-inner { max-width: 820px; }
  .c-empty .c-welcome { padding: 0 0 18px; }
  .c-empty .suggest-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .c-empty .composer { border-top: 0; background: none; }
  .c-empty .c-hint { text-align: center; }
}

/* the message box: a calm card; focus a light tint, not a ring; send greyed until there's text */
.c-box { align-items: flex-end; border-color: color-mix(in srgb, var(--ink) 12%, var(--surface)); border-radius: 16px; background: var(--surface);
  padding: 10px 10px 10px 16px; box-shadow: 0 1px 2px rgb(15 23 42 / .04), 0 6px 20px rgb(15 23 42 / .06); transition: border-color .15s, box-shadow .15s; }
.c-box:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent), 0 6px 20px rgb(15 23 42 / .06); }
.c-box textarea { font-size: 15px; line-height: 1.45; padding: 4px 0; }
.c-box textarea::placeholder { color: var(--muted); }
.c-send { width: 36px; height: 36px; transition: background .15s, opacity .15s; }
.c-box:has(textarea:placeholder-shown) .c-send:not(:disabled) { background: color-mix(in srgb, var(--ink) 14%, var(--surface)); color: var(--surface); }
.c-hint { opacity: .8; }
@media (min-width: 761px) { .c-empty .c-box textarea { min-height: 48px; } .c-empty .c-box { padding: 12px 12px 12px 18px; } }

/* a new conversation, sized to the page: wider, larger heading, ideas and box */
@media (min-width: 761px) {
  .c-empty .c-inner { max-width: clamp(760px, 62%, 1040px); }
  .c-empty .c-welcome { gap: 10px; padding-bottom: 26px; }
  .c-empty .c-welcome h3 { font-size: clamp(28px, 2.3vw, 38px); letter-spacing: -.02em; }
  .c-empty .c-welcome p { font-size: clamp(14px, 1vw, 16px); }
  .c-empty .suggest-grid { gap: 12px; }
  .c-empty .suggest-grid button { font-size: clamp(14px, 1vw, 15.5px); padding: 18px 20px; border-radius: 14px; min-height: 72px; }
  .c-empty .composer { padding-top: 22px; }
  .c-empty .c-box { padding: 16px 16px 16px 22px; border-radius: 18px; }
  .c-empty .c-box textarea { font-size: clamp(15px, 1.1vw, 17px); min-height: 72px; }
  .c-empty .c-send { width: 42px; height: 42px; font-size: 19px; }
  .c-empty .c-hint { font-size: 12px; margin-top: 8px; }
}

/* a planned session not on the watch yet (session page) */
.sd-watch { display: flex; gap: 10px; align-items: baseline; margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.sd-watch i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--s1); transform: translateY(-1px); }
.sd-watch.bad { color: var(--ink); } .sd-watch.bad i { background: var(--warn); }
.sd-watch.later i { background: none; box-shadow: inset 0 0 0 1.5px var(--axis); }
.sd-watch .sd-watch-go { margin-left: 6px; padding: 4px 10px; font-size: 13px; vertical-align: baseline; }
/* the admin's view of someone's refused changes */
.adm-q { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.adm-q li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; }
.adm-q-acts { display: flex; gap: 6px; } .adm-q-acts .btn { padding: 4px 10px; font-size: 13px; }

/* ---------------- the admin page (#/admin): what needs the admin, then each athlete's data line, then the system */
.adl { display: grid; gap: 28px; max-width: 1180px; }
.adl-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; padding-left: 16px; border-left: 4px solid var(--good); }
.adl-head.warn { border-left-color: var(--warn); } .adl-head.bad { border-left-color: var(--crit); }
.adl-kicker { margin: 0 0 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.adl-head h1 { font-size: 30px; letter-spacing: -0.02em; }
.adl-sub { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); max-width: 70ch; }

.adl-link { all: unset; cursor: pointer; color: var(--accent-text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.adl-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.adl-sec { display: grid; gap: 10px; min-width: 0; }
.adl-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.adl-sec-h h2 { font-size: 18px; letter-spacing: -0.01em; }
.adl-how { margin: 0; font-size: 13px; color: var(--muted); max-width: 90ch; line-height: 1.5; }

/* each athlete: who, then the line of stations their data goes through */

.adl-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.adl-who > span { display: grid; min-width: 0; }
.adl-who b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adl-who small { font-size: 12.5px; color: var(--muted); }

/* the line: stations on a rail; solid while the data gets through, dashed after the first station where it stops */
.adl-line { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.adl-st { --c: var(--good); position: relative; display: grid; justify-items: center; text-align: center; gap: 2px; padding-top: 18px; min-width: 0; }
.adl-st::before { content: ""; position: absolute; top: 6px; left: -50%; right: 50%; border-top: 2px solid var(--axis); }
.adl-st:first-child::before { display: none; }
.adl-st.after::before { border-top-style: dashed; }
.adl-st:not(.after)::before { border-top-color: color-mix(in srgb, var(--good) 55%, var(--axis)); }
.adl-st i { position: absolute; top: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--surface); z-index: 1; }
.adl-st.warn { --c: var(--warn); } .adl-st.bad { --c: var(--crit); } .adl-st.run { --c: var(--s1); }
.adl-st.off i { background: var(--surface); box-shadow: 0 0 0 3px var(--surface), inset 0 0 0 2px var(--axis); }
.adl-st b { font-size: 12px; font-weight: 600; color: var(--muted); }
.adl-st span { font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.adl-st.warn span { color: var(--warn-text); } .adl-st.bad span { color: var(--crit-text); } .adl-st.off span { color: var(--muted); font-weight: 500; }
@media (prefers-reduced-motion: no-preference) {
  .adl-st.run i { animation: adl-pulse 1.6s ease-in-out infinite; }
  @keyframes adl-pulse { 50% { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px color-mix(in srgb, var(--s1) 30%, transparent); } }
}
/* opened: what each station says, then what to act on */

.adl-says { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 24px; }
.adl-says > div { display: grid; gap: 2px; }
.adl-says dt { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.adl-says dt i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.adl-says .warn dt i { background: var(--warn); } .adl-says .bad dt i { background: var(--crit); } .adl-says .run dt i { background: var(--s1); }
.adl-says .off dt i { background: none; box-shadow: inset 0 0 0 1.5px var(--axis); }
.adl-says dd { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }

.adl-facts { margin: 0; font-size: 12.5px; color: var(--muted); }
.adl-acts { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 900px) {

  .adl-line { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 560px) {
  .adl-head h1 { font-size: 24px; }
  .adl-line { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .adl-st:nth-child(4)::before { display: none; }

}
.adl h1, .adl h2 { text-transform: none; }

.adl-says > div { align-content: start; }

/* admin page: tabs, the overview's lines, the issues' follow-up, the data table */
.adl-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-top: -10px; overflow-x: auto; scrollbar-width: none; }
.adl-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.adl-tabs a:hover { color: var(--ink); }
.adl-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.adl-tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
.adl-n { min-width: 20px; padding: 1px 6px; border-radius: 999px; font-size: 11.5px; font-weight: 700; text-align: center; background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn-text); }
.adl-body { display: grid; gap: 28px; min-width: 0; }

/* the issues' follow-up */

.adl-bulk { position: sticky; top: calc(var(--banner-h) + 8px); z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--accent); box-shadow: var(--shadow); }
.adl-bulk[hidden] { display: none; }
.adl-bulk > span { margin-right: auto; font-size: 13.5px; }
.adl-dform { display: grid; gap: 8px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.adl-dform[hidden] { display: none; }
.adl-dform input { font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; width: 100%; }
.adl-dform-acts { display: flex; gap: 8px; }

.adl-empty { margin: 0; padding: 22px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); font-size: 14px; }
/* what's kept for each athlete */
.adl-tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.adl-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adl-table th, .adl-table td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.adl-table thead th { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); }
.adl-table tbody tr:last-child > * { border-bottom: none; }
.adl-table td.num { font-variant-numeric: tabular-nums; }
.ad-visits { margin-top: 12px; } .ad-visits tr.dim th, .ad-visits tr.dim td { color: var(--muted); }
.adl-table small { color: var(--muted); } .adl-table .bad { color: var(--crit-text); }

.adl-table th, .adl-table thead th { text-transform: none; letter-spacing: normal; }
.adl-table tbody th { font-size: 13px; font-weight: 600; color: var(--ink); }
.spill.run { color: var(--accent-text); background: var(--accent-tint); }
.spill.warn { color: var(--warn-text); background: color-mix(in srgb, var(--warn) 14%, transparent); }

/* ---- admin operations: severity dots, lists, tools, tables at scale, the athlete and issue pages, events, history */
.sev { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.sev.ok { background: var(--good); } .sev.warn { background: var(--warn); } .sev.bad { background: var(--crit); }
.adl-n.bad { background: color-mix(in srgb, var(--crit) 16%, transparent); color: var(--crit-text); }
.adl-more { font-size: 13px; font-weight: 600; color: var(--accent-text); text-decoration: none; white-space: nowrap; }
.adl-more:hover { text-decoration: underline; }
.adl-tag { display: inline-block; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--warn-text); background: color-mix(in srgb, var(--warn) 16%, transparent); vertical-align: 1px; }
.adl-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.adl-list li + li { border-top: 1px solid var(--border); }
.adl-list a { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto auto; align-items: center; gap: 4px 12px; padding: 11px 16px; color: inherit; text-decoration: none; }
.adl-list a:hover b { color: var(--accent-text); }
.adl-list a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--radius); }
.adl-list b { font-size: 14px; font-weight: 600; min-width: 0; } .adl-list span { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.adl-line1 { margin: 0; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: 13.5px; color: var(--ink-2); }
/* the overview's live issues, by kind: a heading with the figures, the list under it */
.adl-groups { display: grid; gap: 18px; }
.adl-group { display: grid; gap: 8px; }
.adl-group h3 { display: flex; align-items: baseline; gap: 10px; margin: 0; font-size: 14px; font-weight: 700; color: var(--ink-2); text-transform: none; letter-spacing: normal; }
.adl-group-n { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.adl-group > .adl-more { justify-self: start; }
/* an athlete's past issues, folded */
.adl-past { display: grid; gap: 10px; }
.adl-past > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 6px; }
.adl-past > summary::-webkit-details-marker { display: none; }
.adl-past > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s; }
.adl-past[open] > summary::before { transform: rotate(45deg); }
.adl-past > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
/* the totals line on the overview: the same stations, counted */
.adl-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 16px 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.adl-flow .adl-st small { font-size: 12px; color: var(--muted); line-height: 1.4; }
.adl-flow .adl-st small a { color: var(--accent-text); }
/* compact lines in table rows: dots only, the values in their titles */
.adl-line.sm { grid-template-columns: repeat(5, 18px); gap: 0 10px; width: max-content; }
.adl-line.sm .adl-st { padding-top: 0; height: 12px; }
.adl-line.sm .adl-st b, .adl-line.sm .adl-st span { display: none; }
.adl-line.sm .adl-st::before { top: 5px; left: -14px; right: 50%; }
.adl-line.sm .adl-st i { top: 0; width: 11px; height: 11px; }
.adl-line.sm .adl-st.none i { background: none; box-shadow: none; }
.adl-line.sm .adl-st.none::before { display: none; }
/* tools: search, selects, chips, pages */
.adl-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.adl-tools input[type=search] { flex: 1 1 260px; min-width: 0; font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.adl-tools select { font: inherit; font-size: 13.5px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; }
.adl-tools input:focus-visible, .adl-tools select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.adl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.adl-chips a { padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; border: 1px solid var(--border); background: var(--surface); }
.adl-chips a span { font-weight: 500; font-variant-numeric: tabular-nums; margin-left: 3px; }
.adl-chips a[aria-current] { color: var(--accent-text); border-color: var(--accent); background: var(--accent-tint); }
.adl-chips a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.adl-pages { display: flex; align-items: center; gap: 8px; justify-content: flex-end; font-size: 13px; color: var(--muted); }
.adl-pages > span { margin-right: auto; font-variant-numeric: tabular-nums; }
.adl-table.adl-click tbody tr { cursor: pointer; }
.adl-table.adl-click tbody tr:hover { background: var(--wash); }
.adl-table tbody th a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.adl-table tbody th a:hover b { color: var(--accent-text); }
.adl-table tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; white-space: normal; max-width: 52ch; }
.adl-table td small { display: block; color: var(--muted); font-size: 12px; white-space: normal; }
.adl-table td small i { font-style: normal; color: var(--muted); }
.adl-table th.num, .adl-table td.num { text-align: right; }
.adl-table .pick { width: 34px; } .adl-table .pick input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.adl-table td { white-space: normal; } .adl-table td:nth-last-child(-n+2) { white-space: nowrap; }
.adl-cnt { display: inline-block; min-width: 24px; padding: 1px 8px; border-radius: 999px; font-weight: 700; text-decoration: none; text-align: center; }
.adl-cnt.warn { color: var(--warn-text); background: color-mix(in srgb, var(--warn) 16%, transparent); }

/* an athlete's or an issue's own page */
.adl-back { font-size: 13.5px; font-weight: 600; color: var(--accent-text); text-decoration: none; margin-top: -10px; }
.adl-person1 { gap: 16px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.adl-person1 .adl-who b { font-size: 18px; }
.adl-issue1 { gap: 10px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.adl-issue1 h2 { display: flex; align-items: center; gap: 10px; }
.adl-why { margin: 0; font-size: 13.5px; color: var(--good-text); }
.adl-rule { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.adl-rule[hidden] { display: none; }
.adl-rule input { width: 16px; height: 16px; accent-color: var(--accent); }
.adl-dacts .btn { padding: 5px 12px; font-size: 13px; }
.adl-bulk .btn { padding: 5px 12px; font-size: 13px; }
.adl-timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); display: grid; gap: 10px; }
.adl-timeline li { display: grid; gap: 1px; font-size: 13px; position: relative; }
.adl-timeline li::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--axis); }
.adl-timeline li.status::before { box-shadow: inset 0 0 0 2px var(--accent); }
.adl-timeline time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* the event log */
.adl-events { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.adl-events li.adl-day { display: block; padding: 7px 14px; font-size: 12.5px; color: var(--muted); background: var(--surface-2); }
.adl-events li.adl-day b { font-weight: 700; color: var(--ink-2); }
.adl-events li { display: grid; grid-template-columns: 48px 9px 86px minmax(0, 1fr) auto; align-items: baseline; gap: 4px 12px; padding: 8px 14px; font-size: 13px; }
.adl-events li + li { border-top: 1px solid var(--grid); }
.adl-events li.bad { background: color-mix(in srgb, var(--crit) 5%, transparent); }
.adl-events time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.adl-events .sev { align-self: center; }
.adl-ev-k { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.adl-ev-s { min-width: 0; overflow-wrap: anywhere; } .adl-ev-s a { color: var(--accent-text); text-decoration: none; font-weight: 600; } .adl-ev-s small { color: var(--muted); }
.adl-ev summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.adl-ev pre { grid-column: 1 / -1; margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 11.5px; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 60ch; }
.adl-events li:has(.adl-ev[open]) { grid-template-columns: 48px 9px 86px minmax(0, 1fr); }
.adl-events li:has(.adl-ev[open]) .adl-ev { grid-column: 1 / -1; }
/* 30 days: small multiples */
.api-table tr.api-total > * { font-weight: 700; background: var(--surface-2); }
.api-table tr.api-sub th { padding-left: 28px; font-weight: 500; color: var(--muted); } .api-table tr.api-sub td { color: var(--muted); }
.api-facts { font-size: 13.5px; color: var(--ink-2); } .api-facts b { color: var(--crit-text); }
.api-budget { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13px; color: var(--muted); }
.api-budget label { display: inline-flex; align-items: center; gap: 8px; }
.api-budget input { width: 96px; font: inherit; font-size: 13.5px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font-variant-numeric: tabular-nums; }
.api-budget input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.api-cap { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; color: var(--muted); }
.api-cap .btn { font-size: 12.5px; padding: 4px 10px; }
.adl-bad { color: var(--crit-text); font-weight: 600; }
.api-table tbody th a { color: inherit; text-decoration: none; }
.api-people tbody tr[aria-current] > * { background: var(--accent-tint); }
.api-people tbody tr[aria-current] th { box-shadow: inset 3px 0 0 var(--accent); }
.adl-multi { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.adl-mini { margin: 0; display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.adl-mini figcaption { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.adl-mini figcaption span { color: var(--muted); font-variant-numeric: tabular-nums; }
.adl-bars { display: flex; align-items: flex-end; gap: 2px; height: 54px; border-bottom: 1px solid var(--axis); }
.adl-bars i { flex: 1 1 0; min-width: 2px; background: var(--s1); border-radius: 2px 2px 0 0; opacity: 0.85; }
.adl-bars i:last-child { opacity: 1; background: var(--accent); }
@media (max-width: 760px) {
  .adl-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .adl-flow .adl-st::before { display: none; }
  .adl-list a { grid-template-columns: 9px minmax(0, 1fr) auto; } .adl-list a > span:not(.spill) { grid-column: 2; grid-row: 2; }
  .adl-events li { grid-template-columns: 9px minmax(0, 1fr); } .adl-events time { grid-column: 2; } .adl-events .sev { grid-row: 1 / 3; }
  .adl-events .adl-ev-k { display: none; }
  .adl-pages { flex-wrap: wrap; }
}
.spill:not(.ok):not(.bad).warn { color: var(--warn-text); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.spill:not(.ok):not(.bad).run { color: var(--accent-text); background: var(--accent-tint); }
.adl-bars { justify-content: flex-end; } .adl-bars i { flex: 0 1 10px; max-width: 10px; }
/* the admin header: verdict and its action on one line, the tabs below with room */
.adl-head { align-items: center; padding: 2px 0 2px 16px; }
.adl-head h1 { font-size: 26px; }
.adl-head .adl-sub { margin-top: 4px; font-size: 13px; color: var(--muted); }
.adl-tabs { margin-top: 0; }
.adl-tabs a { padding: 10px 16px 11px; font-size: 14.5px; }
/* athletes table: a column per station */
.adl-table .adl-sth { font-size: 12px; text-align: left; padding-left: 10px; padding-right: 10px; }
.adl-stc { padding-left: 10px !important; padding-right: 10px !important; white-space: nowrap !important; font-size: 13px; font-variant-numeric: tabular-nums; }
.adl-stc i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: var(--good); }
.adl-stc.warn i { background: var(--warn); } .adl-stc.bad i { background: var(--crit); } .adl-stc.run i { background: var(--s1); }
.adl-stc.off i { background: none; box-shadow: inset 0 0 0 1.5px var(--axis); }
.adl-stc.warn span { color: var(--warn-text); font-weight: 600; } .adl-stc.bad span { color: var(--crit-text); font-weight: 600; }
.adl-stc.off span, .adl-stc.none span { color: var(--muted); }
.adl-seen { white-space: nowrap; color: var(--ink-2); }
.adl-table tbody th { min-width: 180px; }
.adl-table tbody tr { border-left: 3px solid transparent; }
.adl-table tbody tr:has(.adl-stc.bad) th { box-shadow: inset 3px 0 0 var(--crit); }
.adl-table tbody tr:has(.adl-stc.warn):not(:has(.adl-stc.bad)) th { box-shadow: inset 3px 0 0 var(--warn); }
.adl-chips { gap: 6px 6px; }
.adl-chips a { padding: 4px 11px; font-size: 12.5px; }
.adl-top { display: grid; gap: 14px; }

/* session editor: the strength builder (a new strength session's exercises), in the step editor's work area:
   the session's shape on top (the calendar's own drawing of it), the exercises below on one set of columns */
.sb .sb-top { display: grid; gap: 6px; padding: 14px 0 10px; border-bottom: 1px solid var(--border); }
.sb-shape { display: grid; gap: 10px; padding-left: 8px; }
.sb-sum { margin: 0; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sb-empty p { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; max-width: 52ch; }
.sb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sb-row { display: grid; grid-template-columns: 28px minmax(120px, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 8px;
  border: 1px solid var(--border); border-left: 3px solid var(--str-2); border-radius: 10px; background: var(--surface); }
.sb-row .sx-node { width: 28px; height: 28px; font-size: 12.5px; }
.sb-row.in-c { margin-left: 22px; border-left-color: var(--str-3); }
.sb-name { font: 650 14px var(--f-body); color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.sb-vals { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: flex-end; }
.sb-step { display: inline-flex; align-items: center; gap: 3px; }
.sb-step button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1; cursor: pointer; }
.sb-step button:disabled { opacity: .4; cursor: default; }
.sb-step input { width: 46px; padding: 4px 2px; text-align: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  color: var(--ink); font: 700 14px var(--f-body); font-variant-numeric: tabular-nums; }
.sb-step small { color: var(--muted); font-size: 12px; min-width: 2.5em; }
.sb-acts { display: inline-flex; gap: 2px; }
.sb-acts button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.sb-acts button:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.sb-acts button:disabled { opacity: .3; cursor: default; }
.sb-circ { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 6px; padding: 8px 10px; border-radius: 10px;
  background: color-mix(in srgb, var(--str-3) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--str-3) 35%, var(--border)); }
.sb-ctitle { flex: 1 1 140px; min-width: 0; padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font: 700 14px var(--f-body); }
.sb-addin { border-style: dashed; background: none; grid-template-columns: 1fr; }
.sb-add { display: flex; flex-wrap: wrap; gap: 8px; }
.sb-rest { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.sb-rest > span { font: 650 13px var(--f-body); color: var(--ink); }
.sb-rest small { color: var(--muted); font-size: 12px; }
.sb-rest .sxp-segc button { min-height: 32px; font-size: 13px; }
@media (max-width: 760px) {
  .sb-row { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .sb-vals { grid-column: 2 / -1; grid-row: 2; justify-content: flex-start; }
  .sb-row.in-c { margin-left: 10px; }
  .sb-step button, .sb-acts button { width: 36px; height: 36px; }  /* a finger, not a cursor */
  .sb-step input { width: 52px; padding: 7px 2px; }
}

/* the TD logo (13 Oct 2026, Mathis's image): the mark on its navy tile in the dark bar and as the app's icons; on the
   sign-in and welcome pages the light version in the light theme, the tile in the dark one */
img.brand-mark.brand-img { width: 40px !important; height: auto !important; max-width: none; flex: none; background: none; stroke: none; display: block; }
.si-mark { display: block; height: 30px; width: auto; }
html[data-theme="light"] .si-mark-dark, html:not([data-theme="light"]) .si-mark-light { display: none; }  /* dark: no data-theme */
/* the phone's top bar is light in the light theme (the computer's rail is always navy): the light version there */
img.brand-img-light { display: none; width: 40px !important; height: auto !important; max-width: none; flex: none; background: none; stroke: none; }
@media (min-width: 761px) { .telemetry .brand { gap: 8px; } .telemetry .brand img.brand-mark { width: 50px !important; } }  /* the computer's rail: the mark a size up beside the name (Mathis, 21 Oct) */
@media (max-width: 760px) {
  html[data-theme="light"] .telemetry .brand img.brand-img { display: none; }
  html[data-theme="light"] .telemetry .brand img.brand-img-light { display: block; }
}

/* the website's demo (16-boot.js demoBar): a header over the whole app, above the top bar (Mathis, 13 Oct: "a clean
   header on top of the navbar", after a corner sash too easy to miss): the sidebar's navy, so it reads as part of the
   frame, with an amber DEMO tag (the app's warning colour) and the way out. Its height joins --banner-h, which every
   sticky part already sits under, and the top bar moves down by it */
:root[data-demo="1"] { --demo-h: 34px; --banner-h: 98px; }
.td-demo { position: sticky; top: 0; z-index: 31; height: var(--demo-h); display: flex; align-items: center; gap: 12px;
  padding: 0 16px 0 18px; color: rgb(255 255 255 / .86); font-size: 13px; white-space: nowrap;
  background: var(--rail); border-bottom: 1px solid rgb(255 255 255 / .12); }  /* the app's own navy (Mathis, 13 Oct) */
.td-demo b { flex: none; padding: 2px 8px 2px 9px; border-radius: 4px; background: var(--warn); color: #241a00;
  font: 800 11px/1.4 var(--f-body); letter-spacing: .16em; animation: td-demo-pulse 2.4s ease-in-out infinite; }
/* the tag breathes: a soft amber glow swelling and fading, the one thing moving on the page (Mathis, 13 Oct) */
@keyframes td-demo-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--warn) 55%, transparent); }
  50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--warn) 0%, transparent), 0 0 12px 2px color-mix(in srgb, var(--warn) 45%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .td-demo b { animation: none; } }
.td-demo > span { flex: 1; min-width: 0; }  /* the space between the tag and the buttons */
.td-demo .btn { flex: none; padding: 3px 12px; font-size: 12.5px; text-decoration: none; border-radius: 999px; }
.td-demo .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.td-demo .btn.ghost { background: transparent; color: rgb(255 255 255 / .82); border-color: rgb(255 255 255 / .28); }
.td-demo .btn.ghost:hover { color: #fff; border-color: rgb(255 255 255 / .6); }
/* the demo's tag after each page title: whose data this is (16-boot demoPageChip), in the strip's pill idiom */
/* the admin's Visitors tab (10-admin adminVisitors, redone 25 Oct 2026): the stages a visit passes through share one
   colour each (website grey = context; demo, app, account = the app's series hues); the filters, the checkpoint
   silhouette, the day line, each visit's split strip, the time-per-place dots */
:root { --vz-site: #9aa3b8; --vz-build: var(--s1); --vz-app: var(--s3); --vz-welcome: var(--s4); }
html:not([data-theme="light"]) { --vz-site: #6f7a99; }
.vz-filters { display: grid; gap: 8px; }
.vz-chips a { padding: 4px 11px; font-size: 12.5px; }
.vz-line { margin: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: 15px; color: var(--ink-2); }
.vz-line b { color: var(--ink); font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; margin-right: 1px; }
.vz-legend { display: inline-flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.vz-sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: -6px; }
.vz-sw-visits { background: var(--ink); } .vz-sw-built { background: var(--accent); }
.vz-site { background: var(--vz-site); } .vz-build { background: var(--vz-build); } .vz-app { background: var(--vz-app); } .vz-welcome { background: var(--vz-welcome); }
/* checkpoints: the silhouette over the step cells, in the same columns */
.vz-funnel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 14px 14px 10px; overflow-x: auto; }
.vz-funnel svg { display: block; width: 100%; height: 120px; min-width: 760px; }
.vz-sil { fill: var(--accent-tint); stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.vz-cut { stroke: var(--grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.vz-steps { display: grid; min-width: 760px; margin-top: 8px; }
.vz-step { display: grid; gap: 2px; padding: 0 8px 0 10px; border-left: 1px solid var(--grid); min-width: 0; }
.vz-step:first-child { border-left: 0; padding-left: 2px; }
.vz-step b { font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.vz-step small { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vz-step span { font-size: 12px; line-height: 1.3; color: var(--ink-2); }
.vz-step em { font-style: normal; font-size: 11.5px; color: var(--warn-text); }
.vz-step.none b, .vz-step.none span { color: var(--muted); }
/* the days */
.vz-days { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 12px 14px 6px; }
.vz-days svg { display: block; width: 100%; height: 150px; }
.vz-axis { stroke: var(--grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.vz-visits { fill: none; stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.vz-built { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 3 3; }
.vz-dot { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.vz-tick, .vz-ymax { font: 500 10px var(--f-body); fill: var(--muted); }
/* each visit as a strip */
.vz-visits th[scope=row] { white-space: nowrap; font-weight: 500; }
.vz-cell { width: 42%; min-width: 220px; }
.vz-strip { display: flex; gap: 2px; height: 14px; min-width: 6px; border-radius: 4px; overflow: hidden; }
.vz-strip i { display: block; min-width: 2px; height: 100%; }
.vz-strip i:first-child { border-radius: 4px 0 0 4px; } .vz-strip i:last-child { border-radius: 0 4px 4px 0; }
/* where the time goes: one dot per place on a shared scale */
.vz-places { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.vz-place { display: grid; grid-template-columns: minmax(140px, 28%) 1fr 52px 36px; align-items: center; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--grid); font-size: 13px; }
.vz-place:last-child { border-bottom: 0; }
.vz-pl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.vz-track { position: relative; height: 14px; border-bottom: 1px solid var(--grid); }
.vz-track i { position: absolute; top: 1px; width: 11px; height: 11px; border-radius: 50%; transform: translateX(-50%); box-shadow: 0 0 0 2px var(--surface); }
.vz-pv, .vz-pn { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .vz-place { grid-template-columns: minmax(96px, 38%) 1fr 48px 30px; gap: 8px; }
  .vz-line b { font-size: 17px; }
}
.demo-tag { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; padding: 3px 9px; border-radius: 999px; vertical-align: middle;
  font: 600 12px/1.3 var(--f-body, inherit); letter-spacing: 0; text-transform: none; white-space: nowrap; }
.demo-tag i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.demo-tag.sample { background: color-mix(in srgb, var(--warn, #d08a00) 16%, var(--surface)); color: color-mix(in srgb, var(--warn, #d08a00) 60%, var(--ink)); }
.demo-tag.yours { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
/* the demo's veil over Training and My Dashboard for every visitor (16-boot demoVeil): the sample runner's numbers
   blurred beneath, the title and tabs readable, a card saying what their own sessions will show */
.demo-veiled { position: relative; min-height: 72vh; }
.demo-veiled > *:not(.page-head):not(.subtabs):not(.demo-veil) { filter: blur(7px) saturate(.85); pointer-events: none; user-select: none; }
.demo-veil { position: absolute; left: 0; right: 0; top: 150px; z-index: 5; display: flex; justify-content: center; padding: 0 16px; }
.demo-veil .card { width: min(460px, 100%); text-align: center; padding: 26px 26px 24px; gap: 10px; box-shadow: var(--shadow); }
.demo-veil h2 { margin: 0; font-size: 20px; letter-spacing: -.015em; text-transform: none; }
.demo-veil p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 14.5px; }
.demo-veil .actions { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.demo-veil .actions a.btn { text-decoration: none; }
@media (max-width: 760px) { .demo-veil { top: 120px; } }
:root[data-demo="1"] .telemetry { top: var(--demo-h); height: calc(var(--banner-h) - var(--demo-h)); }
@media (max-width: 820px) { .td-demo { position: static; } }  /* where the top bar scrolls away, it does too */
@media (max-width: 760px) {
  :root[data-demo="1"] { --banner-h: 90px; }
  .td-demo { position: sticky; padding: 0 8px 0 12px; gap: 10px; font-size: 12.5px; }
  .td-demo .btn.ghost { display: none; }
  :root[data-demo="1"] .telemetry { height: calc(var(--banner-h) - var(--demo-h) + env(safe-area-inset-top)); }
}

/* the demo's "build your plan" first screen (16-boot demoBuild): a full-screen STAGE, after a planner Mathis admired. One
   deep plane, a little lighter at the top; the year's silhouette (a thin bar per week, 52 of them, the race week in red,
   the off-season low) standing on a horizon at the foot; the question card a plain off-white sheet near the top — no
   shadow, no frame — so the card and the skyline never fight. A fixed light scheme inside the card, whatever the theme. */
.db-stage { --db-stage: #163664; --db-sil: #2c4c7a; --db-race: #e34948; --db-horizon: rgba(255,255,255,.18); --db-card: #fbfbfc;
  position: fixed; inset: 0; z-index: 400; overflow-y: auto; overflow-x: hidden; padding: clamp(56px, 10vh, 84px) 16px clamp(72px, 12vh, 120px);  /* over the sticky page heads */
  background: linear-gradient(to bottom, color-mix(in srgb, var(--db-stage) 86%, #fff) 0, var(--db-stage) 320px); animation: db-stage-in .3s ease both; }
@keyframes db-stage-in { from { opacity: 0; } to { opacity: 1; } }
.db-stage .db-brand { position: fixed; top: 18px; left: 22px; z-index: 1; color: rgba(255,255,255,.78); font-size: 13px; font-weight: 650; letter-spacing: -.01em; }
/* the year taking shape: pinned at the foot of the viewport, the card scrolls over it */
.db-stage .db-sil { position: fixed; left: 0; right: 0; bottom: 40px; width: 100%; height: min(32vh, 280px); fill: var(--db-sil); pointer-events: none; }
.db-stage .db-sil rect { transform-origin: bottom; transform-box: fill-box; transition: y .32s cubic-bezier(.2,.8,.2,1), height .32s cubic-bezier(.2,.8,.2,1);
  animation: db-breathe 7s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -0.13s); }
@keyframes db-breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.08); } }
.db-stage .db-sil rect.race { fill: var(--db-race); }
.db-stage .db-sil rect.off { opacity: .5; }
.db-stage .db-sil.rising rect { transform-origin: bottom; transform-box: fill-box; animation: db-bar-rise .9s cubic-bezier(.2,.8,.2,1) both; transition: none; }
@keyframes db-bar-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.db-stage .db-horizon { position: fixed; left: 0; right: 0; bottom: 40px; height: 1px; background: var(--db-horizon); pointer-events: none; }
.db-stage .db-months { position: fixed; left: 0; right: 0; bottom: 33px; height: 6px; pointer-events: none;
  background: repeating-linear-gradient(to right, var(--db-horizon) 0 1px, transparent 1px calc(100% / 12)); }
/* the card: a plain sheet near the top */
.db-stage .db-focus { position: relative; z-index: 1; color-scheme: light; --ink: #0f172a; --ink2: #334155; --muted: #5b6478; --border: #e3e8f1; --surface: #fbfbfc; --surface-2: #f1f4fa; --accent: #3b5bfd; --accent-ink: #fff;
  width: min(720px, 100%); margin: 0 auto; padding: 36px 40px 28px; border-radius: 20px; border: 1px solid transparent; background: var(--db-card); color: var(--ink);
  box-shadow: none; display: flex; flex-direction: column; }
.db-stage .db-focus[hidden] { display: none; }
.db-stage .db-eyebrow-in { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
/* "Last step" over the final question's title (Mathis, 25 Oct 2026: say it is the last one) */
.db-stage .db-q .db-eyebrow-in { display: block; font-size: 13px; letter-spacing: 0; color: var(--accent); margin-bottom: 8px; }
/* the rail: a segment per question, the current one wider, the count in mono */
.db-stage .db-rail { display: flex; align-items: center; gap: 4px; height: 20px; margin-bottom: 20px; }
.db-stage .db-rail button { position: relative; width: 22px; height: 20px; padding: 0; border: 0; background: transparent; cursor: pointer; transition: width .18s cubic-bezier(.2,.8,.2,1); }
.db-stage .db-rail button::after { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 2px; border-radius: 1px; background: var(--border); transition: background .18s ease; }
.db-stage .db-rail button.done::after, .db-stage .db-rail button.now::after { background: var(--accent); }
.db-stage .db-rail button.now { width: 34px; }
.db-stage .db-rail button:disabled { cursor: default; }
.db-stage .db-rail-n { margin-left: 8px; font: 500 12.5px/1 ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; color: var(--muted); }
/* the first card's badge (25 Oct 2026): "Early access", a live dot, at the right of the rail — be part of it */
.db-stage .db-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); font-size: 12px; font-weight: 650; letter-spacing: -.005em; white-space: nowrap; }
.db-stage .db-badge[hidden] { display: none; }
.db-stage .db-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: db-live 2.4s ease-in-out infinite; }
@keyframes db-live { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 60% { box-shadow: 0 0 0 6px transparent; } }
/* one orchestrated moment per question: the question, the hint and the body rise in turn */
.db-stage .db-swap.in > * { animation: db-rise .22s cubic-bezier(.2,.8,.2,1) both; }
.db-stage .db-swap.in > .db-hint { animation-delay: .04s; }
.db-stage .db-swap.in > .db-body { animation-delay: .08s; animation-duration: .24s; }
@keyframes db-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.db-stage .db-q { margin: 0; font-size: clamp(26px, 3.2vw, 30px); font-weight: 650; letter-spacing: -.022em; line-height: 1.12; color: var(--ink); outline: none; text-transform: none; }
.db-stage .db-hint { margin: 8px 0 24px; font-size: 15px; line-height: 1.5; color: var(--ink2); max-width: 46ch; }
.db-stage .db-body { display: flex; flex-direction: column; gap: 18px; min-height: 220px; }
.db-stage .db-lbl { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.db-stage .db-lbl-2 { margin-top: 4px; }
.db-stage .db-opt { font-weight: 450; opacity: .8; }
.db-stage .db-req { color: var(--crit); font-style: normal; font-weight: 700; margin-left: 2px; }  /* required */
/* option tiles: a border means "you can pick this"; the check exists only on the chosen one */
.db-stage .db-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.db-stage .db-cards-sm { grid-template-columns: 1fr 1fr 1fr; }
.db-stage .db-card { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 60px; padding: 12px 36px 12px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .12s ease, background .12s ease, box-shadow .12s ease; }
.db-stage .db-card b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.db-stage .db-card span { font-size: 12.5px; font-weight: 450; color: var(--muted); line-height: 1.35; }
.db-stage .db-card:hover { border-color: var(--muted); }
.db-stage .db-card.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.db-stage .db-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.db-stage .db-mark { position: absolute; top: 10px; right: 10px; display: none; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 8px; background: var(--accent); color: #fff; }
.db-stage .db-card.on .db-mark { display: inline-flex; }
/* the goal tiles (25 Oct 2026): a pictogram and a name, nothing to read — three across, the figure or the line drawing in
   ink, in the accent once chosen */
.db-stage .db-body-close { margin-top: 22px; }
.db-stage .db-goals { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.db-stage .db-pict { align-items: center; justify-content: flex-end; gap: 10px; min-height: 112px; padding: 16px 12px 14px; text-align: center; }
.db-stage .db-pict b { font-size: 14.5px; }
.db-stage .db-glyph { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--ink2); transition: color .12s ease; }
.db-stage .db-glyph svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.db-stage .db-pict.on .db-glyph { color: var(--accent); }
.db-stage .db-cards-2 { grid-template-columns: 1fr 1fr; }
.db-stage .db-fld-half { max-width: 320px; }
/* fields */
.db-stage .db-fld { display: flex; flex-direction: column; gap: 6px; }
.db-stage .db-fld-note { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.db-stage .db-fld + .db-fld { margin-top: 2px; }
.db-stage .db-datechip input { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; }
.db-stage .db-datechip input:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); outline: none; }
.db-stage .db-datechip input:disabled { opacity: .5; background: var(--surface-2); }
.db-stage .db-days { display: flex; gap: 6px; }
.db-stage .db-days-2 { max-width: 140px; }
/* the week strip (25 Oct 2026): seven day tiles; a run day carries a bar like the skyline's, the long run the tallest,
   a rest day a dot. The bar grows when tapped. */
.db-stage .db-dayrow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.db-stage .db-dayt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px 10px; border: 1px solid var(--border); border-radius: 12px;
  background: transparent; color: var(--muted); cursor: pointer; font: inherit; transition: border-color .12s, background .12s, color .12s, box-shadow .12s; }
.db-stage .db-dayt b { font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
.db-stage .db-dayt-slot { display: flex; align-items: flex-end; justify-content: center; height: 36px; }
.db-stage .db-dayt i { display: block; width: 6px; height: 6px; border-radius: 3px; background: var(--border); transition: width .18s cubic-bezier(.2,.8,.2,1), height .18s cubic-bezier(.2,.8,.2,1), background .12s; }
.db-stage .db-dayt-what { font-size: 11px; font-weight: 500; color: var(--muted); }
.db-stage .db-dayt:hover { border-color: var(--muted); }
.db-stage .db-dayt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.db-stage .db-dayt.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); color: var(--ink); }
.db-stage .db-dayt.on i { width: 14px; height: 22px; border-radius: 4px; background: var(--accent); }
.db-stage .db-dayt.long i { height: 36px; }
.db-stage .db-dayt.on .db-dayt-what { color: var(--ink2); font-weight: 600; }
.db-stage .db-str { display: flex; flex-direction: column; gap: 14px; }
.db-stage .db-str[hidden] { display: none; }
.db-stage .db-datechip input[type="text"] { font-size: 14px; }
.db-stage .db-day { flex: 1; min-width: 0; padding: 8px 0; border: 1px solid var(--border); border-radius: 9px; background: transparent; cursor: pointer; font: inherit; font-weight: 600; font-size: 13px; color: var(--muted); transition: border-color .12s, background .12s, color .12s, box-shadow .12s; }
.db-stage .db-day:hover { border-color: var(--muted); }
.db-stage .db-day.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); color: var(--ink); }
.db-stage .db-say { margin: 0; font-size: 13px; color: var(--ink2); min-height: 1.3em; line-height: 1.45; }
/* buttons: the reference's quiet shapes */
.db-stage .db-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 22px; }
.db-stage .btn { border-radius: 7px; padding: 7px 13px; font-size: 13px; font-weight: 550; line-height: 1.3; }
.db-stage .btn.primary { background: var(--accent); color: #fff; border: 0; }
.db-stage .btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.db-stage .btn.ghost { background: transparent; color: var(--ink2); border: 1px solid var(--border); }
.db-stage .btn.ghost:hover { border-color: var(--muted); color: var(--ink); }
.db-stage a.btn { text-decoration: none; }
.db-stage .form-err { margin: 10px 0 0; color: var(--db-race); font-size: 13px; }
/* the first card's context line (25 Oct 2026): who made it and that the plan is real — quiet, under the buttons */
.db-stage .db-proof { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12.5px; line-height: 1.5; color: var(--muted); max-width: 60ch; }
.db-stage .db-proof[hidden] { display: none; }
/* building: the stage stays, the card goes; the bars rise one after another, the steps tick off beneath a slow ring */
.db-stage.building { overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding-bottom: calc(min(32vh, 280px) + 48px); }
.db-stage .db-building { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 0 0 24px; color: #fff; text-align: center; }
.db-stage .db-ring { width: 56px; height: 56px; border-radius: 50%; border: 3px solid rgba(255,255,255,.18); border-top-color: #fff; animation: db-spin 1.1s linear infinite; }
@keyframes db-spin { to { transform: rotate(360deg); } }
.db-stage .db-building-title { margin: 0; font-size: clamp(22px, 3vw, 28px); font-weight: 650; letter-spacing: -.02em; text-transform: none; color: #fff; }
.db-stage .db-building-steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.db-stage .db-building-steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: rgba(255,255,255,.5); transition: color .2s ease; }
.db-stage .db-building-steps li.now { color: #fff; }
.db-stage .db-building-steps li.done { color: rgba(255,255,255,.82); }
.db-stage .db-building-mark { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.35); color: var(--db-stage); flex: none; transition: background .2s ease, border-color .2s ease; }
.db-stage .db-building-mark svg { display: none; }
.db-stage .db-building-steps li.now .db-building-mark { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.15); }
.db-stage .db-building-steps li.done .db-building-mark { background: #fff; border-color: #fff; }
.db-stage .db-building-steps li.done .db-building-mark svg { display: block; }
/* "Skip to a quick demo plan": a small sheet over the stage saying whose plan the sample is, before it opens */
.db-stage .db-skip { position: fixed; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(14, 22, 48, .55); animation: db-stage-in .18s ease both; }
.db-stage .db-skip-card { color-scheme: light; --ink: #0f172a; --ink2: #334155; --muted: #5b6478; --border: #e3e8f1; --accent: #3b5bfd;
  width: min(440px, 100%); padding: 24px 26px 20px; border-radius: 16px; background: var(--db-card); color: var(--ink); animation: db-rise .22s cubic-bezier(.2,.8,.2,1) both; }
.db-stage .db-skip-card h2 { margin: 0 0 8px; font-size: 19px; font-weight: 650; letter-spacing: -.015em; line-height: 1.2; text-transform: none; color: var(--ink); }
.db-stage .db-skip-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink2); }
.db-stage .db-skip-card .db-nav { margin-top: 18px; }
/* the result, on the same sheet */
.db-stage .db-chart { margin-top: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 12px 10px; background: var(--surface-2); }
.db-stage .db-chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.db-stage .db-chart-inner { min-height: 150px; }
.db-stage .db-wk-h { margin: 18px 0 8px; font-size: 14px; font-weight: 650; }
.db-stage .db-week { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.db-stage .db-sess { width: 100%; display: grid; grid-template-columns: 46px 1fr auto 16px; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: inherit; transition: border-color .12s, box-shadow .12s; }
.db-stage .db-sess:hover { border-color: var(--muted); }
.db-stage .db-sess.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.db-stage .db-dow { font-weight: 650; text-transform: uppercase; font-size: 10.5px; letter-spacing: .06em; color: var(--muted); }
.db-stage .db-st { font-weight: 600; }
.db-stage .db-sd { color: var(--muted); font-variant-numeric: tabular-nums; }
.db-stage .db-chev { color: var(--muted); }
.db-stage .db-sess-detail { margin-top: 8px; border: 1px solid var(--accent); border-radius: 10px; padding: 12px 14px; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.db-stage .db-sess-detail .db-sd-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.db-stage .db-sess-detail p { margin: 0; }
.db-stage .db-wall { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 18px; }
.db-stage .db-wall p { margin: 0 0 12px; color: var(--ink); }
@media (max-width: 640px) {
  .db-stage { padding: 44px 12px 100px; }
  .db-stage .db-brand { top: 12px; left: 14px; }
  .db-stage .db-focus { padding: 24px 20px 20px; }
  .db-stage .db-cards, .db-stage .db-cards-sm { grid-template-columns: 1fr; }
  .db-stage .db-goals { grid-template-columns: 1fr 1fr; gap: 8px; }
  .db-stage .db-dayrow { gap: 4px; }
  .db-stage .db-dayt { padding: 10px 2px 8px; gap: 6px; border-radius: 10px; }
  .db-stage .db-dayt b { font-size: 11.5px; }
  .db-stage .db-dayt-what { font-size: 0; }  /* the short word instead: "Long", not "Long run", in a 34px tile */
  .db-stage .db-dayt-what::after { content: attr(data-short); font-size: 10px; }
  .db-stage .db-cards-sm:has(> .db-pict) { grid-template-columns: repeat(3, 1fr); gap: 6px; }  /* the strength kinds: three across, small */
  .db-stage .db-pict { min-height: 96px; padding: 12px 6px 10px; gap: 8px; }
  .db-stage .db-pict b { font-size: 12.5px; }
  .db-stage .db-fld-half { max-width: none; }
  .db-stage .db-sil { height: min(22vh, 160px); bottom: 28px; } .db-stage .db-horizon { bottom: 28px; } .db-stage .db-months { bottom: 21px; }
  .db-stage .db-sess { grid-template-columns: 40px 1fr auto 14px; }
}
@media (prefers-reduced-motion: reduce) { .db-stage, .db-stage .db-swap.in > *, .db-stage .db-sil rect, .db-stage .db-sil.rising rect, .db-stage .db-badge i { animation: none; } .db-stage .db-sil rect { transition: none; } .db-stage .db-ring { animation-duration: 3s; } }

/* the logo and the name centred over the sidebar on a computer (Mathis, 13 Oct: "should be more centered"); the folded
   sidebar and phones keep theirs */
@media (min-width: 761px) { html:not(.rail-collapsed) .telemetry .brand { justify-content: center; padding: 0 12px; } }


/* ---------------------------------------------------------------- session page, cleaner (15 Oct, Mathis: "a lot of text,
   tables and raw figures"): the answer first, the steps drawn against the plan, one figure grid, tables on demand */
#d-says:empty { display: none; }
/* the secondary figures: one quiet grid, label over value (the explanations are tooltips) */
.sd-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.sd-fig { display: grid; gap: 1px; align-content: start; min-width: 0; }
.sd-fig[title] { cursor: help; }
.sd-fig em { font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.sd-fig b { font: 650 15px/1.25 var(--f-body); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sd-fig b small { font-size: 12px; font-weight: 500; color: var(--muted); }
/* the plan's text: its first line, the rest on demand */
.sd-desc { display: grid; gap: 2px; }
.sd-desc > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; cursor: pointer; list-style: none; }
.sd-desc > summary::-webkit-details-marker { display: none; }
.sd-desc > summary::after { content: "More"; margin-left: auto; font-size: 12px; font-weight: 600; color: var(--accent-text, var(--accent)); }
.sd-desc[open] > summary::after { content: "Less"; }
.sd-desc .micro { flex-basis: 100%; }
.sd-desc-1 { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.sd-desc .prose { margin: 4px 0 0; white-space: pre-line; }
/* what it says: one row of short takeaways under the summary */
.sd-says.card ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 24px; }
.sd-says .sd-say { border-top: 0; padding: 0; }
.sd-says .sd-say:first-child { padding-top: 0; }
.sd-says .sd-say[title] { cursor: help; }
.sd-says .sd-say b { font-size: 18px; line-height: 1.2; }
.sd-says .sd-say small { color: var(--muted); }
/* the steps drawn against the plan: one scale for all, the plan as a band, the average a dot, past the band a bar */
.sd-steps { display: grid; }
.st-row, .st-axis { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 3fr) 96px; align-items: center; gap: 18px; }
.st-row { padding: 12px 0; border-top: 1px solid var(--grid); }
.st-row:first-child { border-top: 0; padding-top: 4px; }
.st-name { display: grid; gap: 2px; min-width: 0; }
.st-name b { font-size: 13.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-name small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.st-track { position: relative; height: 26px; }
.st-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--grid); }
.st-band { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; background: color-mix(in srgb, var(--good) 15%, transparent);
  border: 1.5px dashed color-mix(in srgb, var(--good) 75%, transparent); border-top: 0; border-bottom: 0; }
.st-band.cap { border-left: 0; border-radius: 0 4px 4px 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--good) 15%, transparent) 30%); }
.st-past { position: absolute; top: 50%; height: 4px; transform: translateY(-50%); border-radius: 2px; background: color-mix(in srgb, var(--warn) 60%, transparent); }
.st-peak { position: absolute; top: 6px; bottom: 6px; width: 2px; margin-left: -1px; border-radius: 1px; background: color-mix(in srgb, var(--ink) 30%, transparent); }
.st-dot { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--muted); box-shadow: 0 0 0 2px var(--surface); }
.st-row.in .st-dot { background: var(--good); } .st-row.out .st-dot { background: var(--warn); }
.st-val { display: grid; justify-items: end; gap: 1px; font-variant-numeric: tabular-nums; }
.st-val b { font: 700 15px var(--f-body); color: var(--ink); white-space: nowrap; }
.st-val b small, .st-val > small { font-size: 12px; font-weight: 500; color: var(--muted); }
.st-axis { padding-top: 2px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.st-axis > div { position: relative; height: 14px; }
.st-axis > div span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.st-axis > span:last-child { justify-self: end; }
/* zones next to the laps: the rows say it all (no second, stacked bar) */
.sd-row.sd-row-zl { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.sd-row-zl .zrows { margin-top: 2px; }
/* tables on demand */
.sd-more { margin-top: 12px; }
.sd-more > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; font-size: 12.5px; font-weight: 600; color: var(--accent-text, var(--accent)); }
.sd-more > summary::-webkit-details-marker { display: none; }
.sd-more > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.sd-more[open] > summary::before { transform: rotate(45deg); }
.sd-more > .tbl { margin-top: 8px; }
/* records: tiles by kind; a best ever stands out */
.pr-g + .pr-g { margin-top: 14px; }
.pr-g h4 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pr-tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-t { display: grid; gap: 1px; min-width: 92px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
.pr-t span { font-size: 11.5px; color: var(--muted); }
.pr-t b { font: 700 16px var(--f-body); color: var(--ink); font-variant-numeric: tabular-nums; }
.pr-t b small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.pr-t em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.pr-t.best { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent); }
.pr-t.best em { color: var(--accent-text, var(--accent)); font-weight: 600; }
@media (max-width: 1000px) { .sd-row.sd-row-zl { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .sd-figs { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  .sd-says.card ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
  .sd-says .sd-say b { font-size: 16px; }
  .st-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name val" "track track"; gap: 6px 12px; }
  .st-name { grid-area: name; } .st-val { grid-area: val; } .st-track { grid-area: track; }
  .st-axis { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .st-axis > span:first-child { display: none; }
}
/* the summary's big numbers: done against planned as a slim meter (the plan a mark; green on plan, amber off it) */
.sd-meter { position: relative; display: block; height: 5px; max-width: 220px; margin: 7px 0 1px; border-radius: 3px; background: var(--surface-2); }
.sd-meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--good); }
.sd-meter.off i { background: var(--warn); }
.sd-meter em { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink-2); }
.sd-k > small b { font: 700 12px var(--f-body); letter-spacing: 0; color: var(--ink-2); }
/* the figures sit in the big numbers' columns (8 = two under each), the plan's text reads as one line with its More */
@media (min-width: 1001px) { .sd-figs { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px 20px; } }
@media (min-width: 761px) and (max-width: 1000px) { .sd-figs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 20px; } }
.sd-sum .sd-desc { background: none; padding: 12px 0 0; border-radius: 0; border-top: 1px solid var(--border); }
.sd-desc > summary::after { margin-left: 2px; }
.sd-desc .prose { padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
/* the session in three tabs: Overview, Charts, Stats; a section shows on its own tab only */
.sd-tabs { margin: 0 0 4px; }
[data-sd-tab="overview"] [data-pane]:not([data-pane="overview"]),
[data-sd-tab="charts"] [data-pane]:not([data-pane="charts"]),
[data-sd-tab="stats"] [data-pane]:not([data-pane="stats"]) { display: none !important; }
.sd-figcard .sd-figs { padding-top: 0; border-top: 0; }
/* where the recording comes from, with its buttons (15 Oct, Mathis: "a better UI like button") */
.sd-rec { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0; font-size: 13px; color: var(--muted); }
.sd-rec-src { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.sd-rec-src > svg { flex: none; width: 18px; height: 18px; padding: 6px; box-sizing: content-box; border-radius: 9px; background: var(--surface-2); color: var(--ink-2); }
.sd-rec svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sd-rec-acts { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.sd-rec-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 12.5px; }
.sd-rec-btn svg { width: 15px; height: 15px; }
/* what it says + training effect, one card (15 Oct, Mathis: "merge this 2 cards"): the effect on the left, big; the
   takeaways two by two on the right, a hairline between */
.sd-verdict { display: flex; align-items: stretch; gap: 0; padding: 0; overflow: hidden; }
.sd-verdict[hidden] { display: none; }
.vd-te { flex: 0 0 min(42%, 520px); min-width: 300px; display: grid; align-content: start; gap: 8px; padding: 18px 22px; border-right: 1px solid var(--border); }
.vd-te:empty { display: none; }
.vd-says { flex: 1; min-width: 0; list-style: none; margin: 0; padding: 20px 26px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; align-content: center; }
.vd-says:empty { display: none; }
.vd-says .sd-say { border-top: 0; padding: 0; }
.vd-says .sd-say[title] { cursor: help; }
.vd-says .sd-say b { font-size: 17px; line-height: 1.2; }
.vd-says .sd-say small { color: var(--muted); }
.te-main { display: flex; align-items: baseline; gap: 10px; }
.te-main > b { font: 800 34px/1 var(--f-body); letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.te-main > span { display: grid; font-size: 14px; font-weight: 650; color: var(--ink); line-height: 1.2; }
.te-main em { font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.te-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.te-bar i { position: relative; height: 8px; border-radius: 3px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); overflow: hidden; }
.te-bar s { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c); }
.te-scale { display: flex; justify-content: space-between; margin-top: -4px; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.te-word { display: inline-flex; align-items: center; gap: 6px; }
.te-word i, .te-ben i, .te-legend i { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.te-ben { display: inline-flex; align-items: center; gap: 5px; }
.te-legend { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 3px 11px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.te-legend li { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.te-legend li.now { color: var(--ink); font-weight: 650; }
.te-an { display: grid; gap: 5px; margin-top: 4px; }
.te-an > span { font-size: 12px; color: var(--muted); }
.te-an b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.te-an .te-bar i { height: 5px; }
.te-foot { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.te-foot b { color: var(--ink); font-weight: 650; }
.te-src { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
@media (max-width: 760px) {
  .sd-verdict { flex-direction: column; }
  .vd-te { flex: none; border-right: 0; border-bottom: 1px solid var(--border); padding: 16px; }
  .vd-says { padding: 16px; gap: 14px 16px; }
  .vd-says .sd-say b { font-size: 15.5px; }
}
/* the training effect's steps: greys for no effect and minor, then the zone colours (Mathis, 15 Oct) (validated as an ordinal ramp in both themes); amber is only
   for overreaching, always with its word */
:root { --te-0: color-mix(in srgb, var(--ink) 22%, var(--surface)); --te-1: color-mix(in srgb, var(--ink) 50%, var(--surface)); }
:root[data-theme="light"] { --te-0: color-mix(in srgb, var(--ink) 18%, var(--surface)); --te-1: color-mix(in srgb, var(--ink) 52%, var(--surface)); }
/* the effect's first line: the figure and its word, the primary benefit on the right */
.te-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.te-benefit { display: grid; justify-items: end; gap: 1px; font-size: 14px; }
.te-benefit em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.te-benefit b { color: var(--ink); font-weight: 650; }
@media (max-width: 760px) { .vd-te { min-width: 0; } .te-benefit { justify-items: start; } }
/* the summary's meters on one scale: the plan's mark two thirds along, the same place under every figure; past 1.5x the
   plan the fill fades out at the end */
.sd-meter em { left: 66.667%; }
.sd-meter.past i { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
/* the steps' legend in one row (Mathis, 15 Oct), spread across the panel; it wraps only on narrow screens */
.te-legend { flex-wrap: nowrap; justify-content: space-between; gap: 3px 8px; font-size: 10.5px; }
.te-legend li { gap: 4px; }
@media (max-width: 1100px) { .te-legend { flex-wrap: wrap; justify-content: flex-start; gap: 3px 10px; } }
/* the effect's first line, aligned (15 Oct, Mathis: "better in terms of display"): title and source on top; the figure
   with "/5 aerobic", its step and the benefit as soft pills, all centred on one line */
.te-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.te-head .te-src { font-size: 11.5px; color: var(--muted); }
.te-top { align-items: center; }
.te-main { align-items: center; gap: 10px; }
.te-main > small { font-size: 11px; line-height: 1.25; color: var(--muted); }
.te-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px 0 10px; border-radius: 14px; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 14%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent);
  font: 650 13.5px var(--f-body); color: var(--ink); }
.te-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.te-benefit { display: inline-flex; align-items: center; gap: 8px; justify-items: initial; }
.te-benefit em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.te-main > .te-pill { display: inline-flex; font-size: 13.5px; font-weight: 650; line-height: 1; }
/* the figure with its scale on the same baseline (15 Oct, Mathis: "enhance this") */
.te-main > b { display: inline-flex; align-items: baseline; gap: 3px; font-size: 38px; }
.te-main > b small { font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.te-main { gap: 14px; }
/* the score as a sentence: the label in text size, the figure bold and bigger, then its step (Mathis, 15 Oct) */
.te-lbl { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.te-main { flex-wrap: wrap; gap: 6px 10px; }
.te-main > b { font: 800 26px/1 var(--f-body); letter-spacing: -0.01em; }
.te-main > b small { font-size: 13px; }
.te-main > .te-lbl { display: inline; font-size: 14px; font-weight: 500; color: var(--ink-2); line-height: 1.2; }
/* the panel, lighter (15 Oct, Mathis: "Enhance"): one pill on the score line; the benefit as text with its zone dot,
   on the footer line with the source, under a hairline */
.te-pill { height: 26px; padding: 0 11px 0 9px; font-size: 13px; }
.te-main > .te-pill { font-size: 13px; }
.te-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 0; padding-top: 10px; border-top: 1px solid var(--grid); font-size: 12.5px; color: var(--muted); }
.te-foot .te-benefit { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.te-foot .te-benefit b { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; color: var(--ink); }
.te-foot .te-benefit i { width: 8px; height: 8px; border-radius: 50%; }
.te-foot .te-src { font-size: 12px; }
/* the takeaways as figures with a slim bar each (15 Oct, Mathis: "Enhance"): the share (or the scale, its limit marked)
   in a colour that means something; no bullet dots */
.vd-says .sd-say { grid-template-columns: 1fr; }
.vd-says .sd-say > i { display: none; }
.vd-says .sd-say b small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.say-bar { position: relative; display: block; height: 6px; margin: 6px 0 4px; max-width: 240px; border-radius: 3px; background: var(--surface-2); }
.say-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.say-bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink-2); }
.vd-says.many { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 22px; }
@media (max-width: 1200px) { .vd-says.many { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* the session's timeline (15 Oct, Mathis: "Enhance charts graphics"): a header line above each panel (its name, its
   figures), the plan's steps named inside the strip */
#streams svg .pn-name { font: 650 12.5px var(--f-body); fill: var(--ink); }
#streams svg .pn-stat { font: 500 12px var(--f-body); fill: var(--muted); font-variant-numeric: tabular-nums; }
#streams svg .rb-l { font: 600 10.5px var(--f-body); fill: var(--ink-2); pointer-events: none; }
#streams svg .rb-l.on { fill: #fff; }
/* the takeaways: a small ring for a share of the time, the text beside it (the rows stay aligned without one) */
.vd-says .sd-say { grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 12px; }
.vd-says .sd-say > .kpi-viz { width: 42px; height: 42px; }
.say-sp { width: 42px; }
.say-bar { display: none; }
@media (max-width: 760px) { .vd-says, .vd-says.many { grid-template-columns: 1fr; gap: 12px; } .vd-says .sd-say > .kpi-viz { width: 36px; height: 36px; } .vd-says .sd-say { grid-template-columns: 36px minmax(0, 1fr); } .say-sp { width: 36px; } }
/* time in zones: every row on the same columns (15 Oct, Mathis: "why are they not aligned?" — each row sized its own
   name column, so a long zone name pushed its bar right): the rows share the list's columns, sized by the longest name */
.zrows { grid-template-columns: 10px max-content max-content minmax(60px, 1fr) 56px 44px; column-gap: 12px; }
.zrow { grid-column: 1 / -1; grid-template-columns: subgrid; column-gap: 12px; padding-left: 4px; padding-right: 4px; }
@media (max-width: 760px) {
  .zrows { grid-template-columns: 10px max-content minmax(40px, 1fr) 48px 36px; column-gap: 8px; }
  .zrow { column-gap: 8px; }
  .zrow .zr-range { display: none; }
}
/* the Stats tab (15 Oct, Mathis: "improve the stats tab"): the figures as four groups of label and value; the splits'
   pace with a bar as long as the speed; laps and records side by side */
.fs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 0; }
.fs-g { display: grid; align-content: start; gap: 0; padding: 0 22px; border-left: 1px solid var(--grid); }
.fs-g:first-child { padding-left: 0; border-left: 0; }
.fs-g h4 { margin: 0 0 6px; font-size: 12px; font-weight: 650; color: var(--muted); }
.fs-r { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid color-mix(in srgb, var(--grid) 70%, transparent); font-size: 13px; color: var(--ink-2); }
.fs-g h4 + .fs-r { border-top: 0; }
.fs-r[title] span { text-decoration: underline dotted color-mix(in srgb, var(--muted) 60%, transparent); text-underline-offset: 3px; cursor: help; }
.fs-r b { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fs-r b small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.lp-spd { position: relative; display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 112px; }
.lp-tr { flex: none; width: 56px; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.lp-tr i { display: block; height: 100%; border-radius: 3px; background: color-mix(in srgb, var(--s1) 55%, var(--surface)); }
.lp-spd.best { font-weight: 700; color: var(--ink); }
.lp-spd.best .lp-tr i { background: var(--s1); }
.sd-statrow { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 1100px) { .sd-statrow { grid-template-columns: 1fr; } .fs-g { padding: 0; border-left: 0; } }
/* records beside the laps: an even grid of smaller tiles */
.sd-statrow .pr-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.sd-statrow .pr-t { min-width: 0; padding: 7px 9px; }
.sd-statrow .pr-t b { font-size: 15px; }

/* accounts waiting for the admin's yes (Overview, Athletes) */
.adl-wait { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 12px 14px; }
.adl-wait div { display: grid; gap: 2px; min-width: 0; }
.adl-wait div span, .adl-wait small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.adl-wait small { color: var(--ink-2); }
.adl-wait-do { display: flex; gap: 8px; }
.adl-wait-do .btn { min-height: 34px; padding: 0 12px; }
@media (max-width: 760px) { .adl-wait { grid-template-columns: 1fr; } }

/* the create-account form: first and last name side by side (one column on a narrow phone) */
.si-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.si-row > .fld { min-width: 0; margin: 0; } .si-row input { width: 100%; box-sizing: border-box; }
@media (max-width: 380px) { .si-row { grid-template-columns: 1fr; } }

/* the first copy of a TrainingPeaks history: a thin line over the page while it runs (16-boot.js pollCopy) */
.td-copy { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 8px 14px; border-radius: 10px;
  background: var(--accent-tint); color: var(--accent-text); font-size: 13.5px; font-weight: 600; }
.td-copy .dim { font-weight: 400; color: var(--ink-2); }
@media (max-width: 760px) { .td-copy { margin: 0 0 10px; font-size: 12.5px; } .td-copy .dim { display: none; } }

/* the Sessions step: two checks, each a mark, its line and its action (the watch connected to TrainingPeaks; the
   sessions already there) */
.ob-checks { list-style: none; margin: 14px 0 6px; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ob-checks li { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; }
.ob-checks li + li { border-top: 1px solid var(--border); }
/* the first week (the last step): day, session, minutes in a column, like the checks above */
.ob-week { list-style: none; margin: 14px 0 6px; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ob-week li { display: grid; grid-template-columns: 64px 1fr auto; align-items: baseline; gap: 12px; padding: 10px 14px; font-size: 14px; }
.ob-week li + li { border-top: 1px solid var(--border); }
.ob-week b { color: var(--ink); font-weight: 600; }
.ob-week-day { color: var(--muted); font-size: 13px; }
.ob-week-min { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.ob-checks b { display: block; font-size: 14px; color: var(--ink); }
.ob-checks div span { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.ob-mark { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 800 12px/1 var(--f-body); }
.ob-mark.ok { background: var(--good); color: #fff; } .ob-mark.ok::before { content: "✓"; }
.ob-mark.todo { background: var(--warn); color: #fff; } .ob-mark.todo::before { content: "!"; }
.ob-mark.later { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); } .ob-mark.later::before { content: "…"; }
.ob-mark.unknown { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); } .ob-mark.unknown::before { content: "?"; }
.ob-mark.wait { border: 2px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .ob-mark.wait { animation: none; } }
.ob-checks .ob-opt-go, .ob-checks .ob-drop.ob-drop-sm { width: 132px; box-sizing: border-box; display: inline-flex; justify-content: center; white-space: nowrap;
  font: 600 13px/1 var(--f-body); padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--ink); text-decoration: none; }
.ob-checks .ob-drop.ob-drop-sm b { font: inherit; color: inherit; } .ob-checks .ob-drop.ob-drop-sm span { display: none; }
.ob-checks .ob-opt-go:hover, .ob-checks .ob-drop.ob-drop-sm:hover, .ob-checks .ob-drop.ob-drop-sm.over { border-color: var(--accent); color: var(--accent-text, var(--accent)); }
@media (max-width: 420px) { .ob-checks li { grid-template-columns: 22px 1fr; } .ob-checks .ob-act { grid-column: 2; } }
/* the connect guide's three steps as the goal screen's parts (Mathis, 21 Oct): stops on one route, no box, no numbers;
   a line joins the marks, drawn in the accent past the steps done */
.ob-checks.tpg { margin: 10px 0 6px; padding: 4px 0 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: none; }
.ob-checks.tpg li { position: relative; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; padding: 12px 2px; }
.ob-checks.tpg li + li { border-top: 0; }
.ob-checks.tpg li::before { content: ""; position: absolute; left: 11px; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--border); }
.ob-checks.tpg li:first-child::before { top: 22px; }
.ob-checks.tpg li:last-child::before { bottom: calc(100% - 22px); }
.ob-checks.tpg li:has(.ob-mark.ok)::before { background: var(--accent); }
.ob-checks.tpg li:has(.ob-mark.ok) + li:not(:has(.ob-mark.ok))::before { background: linear-gradient(var(--accent) 22px, var(--border) 22px); }
.ob-checks.tpg li:has(.ob-mark.ok) + li:last-child::before { background: var(--accent); }
.ob-checks.tpg > li > div > b { font-size: 14.5px; }
.ob-checks .ob-line b { display: inline; font-size: inherit; }  /* an email in the line stays in the sentence */
.ob-checks.tpg .ob-mark { position: relative; z-index: 1; width: 18px; height: 18px; box-sizing: border-box; margin-top: 1px; border: 0; }
.ob-checks.tpg .ob-mark::before { content: none; }
.ob-checks.tpg .ob-mark.num { background: var(--border); box-shadow: inset 0 0 0 4px var(--surface); }  /* to come: a small dot on the line */
.ob-checks.tpg .ob-mark.now { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-tint); }
.ob-checks.tpg .ob-mark.ok { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
  box-shadow: 0 0 0 3px var(--surface); }
.ob-checks.tpg .ob-mark.wait { background: var(--surface); border: 2px solid var(--border); border-top-color: var(--accent); }


/* the welcome flow's goal screen (step B, 15 Oct): goal chips, the optional race, the week's time, level, the coach's voice */
.ob-goal { display: grid; gap: 16px; }
.ob-goal [hidden] { display: none !important; }
.ob-goal fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ob-goal legend { padding: 0; margin-bottom: 7px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.ob-goal legend .dim { font-weight: 500; margin-left: 4px; }
.ob-goal .fld > span:first-child { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.ob-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ob-chip { position: relative; display: block; cursor: pointer; }
.ob-chip input, .ob-seg input, .ob-voice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.ob-chip span { display: flex; align-items: center; min-height: 46px; box-sizing: border-box; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.25; transition: border-color .15s, background .15s; }
@media (hover: hover) { .ob-chip:hover span { border-color: var(--muted); } }  /* a tap leaves no hover on a phone */
.ob-chip span { justify-content: space-between; gap: 8px; }
.ob-chip input:checked + span::after { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
/* the goal screen's parts: one open, the answered ones folded to a line (Mathis, 16 Oct) */
.ob-goal:has(.ob-part) { gap: 0; padding-top: 6px; border-top: 1px solid var(--border); }
/* the four parts as stops on one route: a line joins their marks, drawn in the accent over the parts answered */
.ob-part { position: relative; min-width: 0; }
.ob-part::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--border); }
.ob-part:first-of-type::before { top: 24px; }
.ob-part:last-of-type::before { bottom: calc(100% - 24px); }
.ob-part.done::before { background: var(--accent); }
.ob-part.done + .ob-part:not(.done)::before { background: linear-gradient(var(--accent) 24px, var(--border) 24px); }
.ob-part.done + .ob-part:last-of-type::before { background: var(--accent); }
.ob-part-h { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 10px 2px; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.ob-part-h:disabled { cursor: default; }
.ob-part-h b { font-size: 14.5px; font-weight: 700; white-space: nowrap; }
.ob-part:not(.open):not(.done) .ob-part-h b { color: var(--muted); font-weight: 600; }
.ob-part-mark { position: relative; z-index: 1; flex: none; width: 18px; height: 18px; box-sizing: border-box; border-radius: 50%;
  background: var(--border); box-shadow: inset 0 0 0 4px var(--surface); }  /* a stop to come: a small dot on the line */
.ob-part.open .ob-part-mark { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-tint); }
.ob-part.done .ob-part-mark { box-shadow: 0 0 0 3px var(--surface); }
.ob-part.done .ob-part-mark { border: 0; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.ob-part-sum { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--ink-2); }
.ob-part-edit { display: none; font-size: 13px; font-weight: 600; color: var(--accent-text, var(--accent)); }
.ob-part.done .ob-part-edit { display: inline; }
.ob-part.done .ob-part-h:hover .ob-part-sum { color: var(--ink); }
.ob-part-body { display: grid; gap: 14px; padding: 2px 0 22px 30px; }
.ob-part-body > .fine { margin: -6px 0 0; }
.ob-part-next { justify-self: start; }
@media (max-width: 760px) {
  .ob-part-body { padding-left: 28px; }  /* clear of the route's line */
  .ob-chip span { padding: 10px 12px; font-size: 13.5px; }
  .ob-chip input:checked + span::after { display: none; }  /* the tint says it: the width goes to the words */
  .ob-part-h { flex-wrap: wrap; row-gap: 2px; }
  .ob-part-edit { margin-left: auto; }
  .ob-part-sum { order: 3; flex-basis: 100%; padding-left: 28px; white-space: normal; }
  .ob-part-sum:empty { display: none; }
}
.ob-seg-level { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ob-seg-level label { display: flex; } .ob-seg-level span { flex: 1; display: flex; align-items: center; justify-content: center; }
.ob-voices-row { display: flex; align-items: center; gap: 18px; }
.ob-voice-say { flex: 1; min-width: 0; margin: 0 0 18px; padding: 10px 14px; border-radius: 12px 12px 12px 4px; background: var(--wash); color: var(--ink-2);
  font-size: 13.5px; line-height: 1.45; font-style: italic; }
.ob-voice-say:empty { display: none; }
.ob-chip input:checked + span { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent); }
.ob-chip input:focus-visible + span, .ob-seg input:focus-visible + span, .ob-voice input:focus-visible ~ img { outline: 2px solid var(--accent); outline-offset: 2px; }
.ob-race-in { padding: 12px 14px 14px !important; border-radius: 12px; background: var(--wash); }
.ob-race-in legend { float: left; width: 100%; }
.ob-fields { clear: both; display: grid; grid-template-columns: 150px minmax(0, 1fr) 110px 120px; gap: 10px; }
.ob-fields:not(:has(.ob-f-climb:not([hidden]))) { grid-template-columns: 150px minmax(0, 1fr) 110px; }
.ob-fields .fld > span:first-child { font-size: 12px; font-weight: 600; color: var(--muted); }
.ob-fields input { width: 100%; box-sizing: border-box; min-width: 0; }
.ob-unit-w input { padding-right: 52px; }
.ob-time { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; }
.ob-range { display: flex; align-items: center; gap: 12px; min-height: 40px; }
/* the hours: a track coloured up to the thumb (--fill, set as it moves); the ring only from the keyboard */
.ob-range input { flex: 1; min-width: 0; height: 22px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
.si-card .ob-range input:focus { outline: none; }
.ob-range input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--accent) var(--fill, 16%), var(--border) var(--fill, 16%)); }
.ob-range input::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--accent) var(--fill, 16%), var(--border) var(--fill, 16%)); }
.ob-range input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; box-sizing: border-box;
  background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 1px 3px rgb(0 0 0 / .18); transition: box-shadow .15s; }
.ob-range input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; box-sizing: border-box; background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 1px 3px rgb(0 0 0 / .18); }
.ob-range input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px var(--accent-tint); }
.ob-range input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 5px var(--accent-tint); }
.ob-range output { min-width: 52px; text-align: right; font: 700 16px var(--f-mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.ob-seg { display: inline-flex; justify-self: start; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.ob-seg label { position: relative; cursor: pointer; }
.ob-seg label + label span { border-left: 1px solid var(--border); }
.ob-seg span { display: block; min-width: 38px; padding: 9px 12px; box-sizing: border-box; text-align: center; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
@media (hover: hover) { .ob-seg label:hover span { background: var(--wash); color: var(--ink); } }
.ob-seg input:checked + span { background: var(--accent); color: var(--accent-ink); }
.ob-voices { display: flex; gap: 14px; flex-wrap: wrap; min-height: 76px; }
.ob-voice { position: relative; display: grid; justify-items: center; gap: 5px; cursor: pointer; width: 68px; }
.ob-voice img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; box-shadow: 0 0 0 1px var(--border); transition: box-shadow .15s, filter .15s; filter: saturate(.7); }
.ob-voice span { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; line-height: 1.2; }
.ob-voice:hover img { filter: none; }
.ob-voice input:checked ~ img { filter: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.ob-voice input:checked ~ span { color: var(--ink); }
/* the plan step: the weekly target ("Follow my running") */
.ob-target { margin: 4px 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; font-size: 15px; }
.ob-target b { font: 700 34px/1 var(--f-mono); font-variant-numeric: tabular-nums; }
.ob-target .dim { flex-basis: 100%; font-size: 13.5px; }
@media (max-width: 760px) {
  .ob-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ob-fields, .ob-fields:not(:has(.ob-f-climb:not([hidden]))) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ob-fields .ob-f-name { grid-column: 1 / -1; order: -1; }
  .ob-fields input[type="date"] { padding-left: 8px; padding-right: 6px; font-size: 13.5px; }
  .ob-time { grid-template-columns: minmax(0, 1fr); }
  .ob-seg { display: flex; justify-self: stretch; } .ob-seg label { flex: 1; }
  .ob-seg span { min-width: 0; padding: 9px 6px; }
  .ob-voices { justify-content: space-between; gap: 6px; }
  .ob-voices-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .ob-voice-say { margin: 0; }
}
.ob-goal:has(.ob-part) > .si-go { margin-top: 18px; }
.ob-goal:has(.ob-part) > .form-err { margin: 12px 0 0; }

/* ---- the admin page, revamped (21 Oct 2026, Mathis: "messy and confusing… clear info"): Today, People, Problems,
   Log; Server and API as they were. Figures and short lines, the app's own tokens; the signature is the Use table's
   30-day bars (one hue, today the darkest) */
.ad-head { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; }
.ad-head h1 { margin: 0; font-size: 26px; letter-spacing: -0.02em; text-transform: none; }
.ad-asof { margin-right: auto; font-size: 13px; color: var(--muted); display: inline-flex; gap: 8px; align-items: baseline; }
.ad-count { font-size: 15px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.dim { color: var(--muted); }
/* what needs the admin: who · what, then what to do; the buttons at the end */
.ad-needs { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.ad-needs li { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; padding: 12px 16px; }
.ad-needs li + li { border-top: 1px solid var(--grid); }
.ad-need-t { min-width: 0; font-size: 14px; line-height: 1.4; }
.ad-need-t a { color: inherit; text-decoration: none; } .ad-need-t a:hover { color: var(--accent-text); }
.ad-need-who a { font-weight: 600; color: var(--accent-text); }
.ad-need-t small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.ad-need-do { display: flex; gap: 8px; } .ad-need-do .btn { min-height: 32px; padding: 0 12px; font-size: 13px; }
/* the Use table: four weeks of figures, the last 7 days at the end (bolder) */
.ad-use th[scope=row] { font-weight: 600; } .ad-use th[scope=row] small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.ad-use td.num { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ad-use .ad-now { font-weight: 700; color: var(--ink); } .ad-use td.ad-now { font-size: 15px; }
.ad-use thead th.num { white-space: nowrap; }
/* a status: a dot and its word */
.ad-st { white-space: nowrap; } .ad-st i { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; vertical-align: 1px; background: var(--good); }
.ad-st.warn i { background: var(--warn); } .ad-st.warn { color: var(--warn-text); }
.ad-st.bad i { background: var(--crit); } .ad-st.bad { color: var(--crit-text); font-weight: 600; }
.ad-st.off i { background: none; box-shadow: inset 0 0 0 1.5px var(--muted); } .ad-st.off { color: var(--muted); }
.ad-warn { color: var(--warn-text); }
.ad-people td { white-space: nowrap; }
/* one person: who, the buttons, four blocks */
.ad-person { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.ad-person .adl-who b { font-size: 20px; }
.ad-blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ad-block { display: grid; align-content: start; gap: 10px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.ad-block h2 { margin: 0; font-size: 15px; letter-spacing: -0.005em; text-transform: none; }
.ad-dl { margin: 0; display: grid; gap: 6px; }
.ad-dl > div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; font-size: 13.5px; }
.ad-dl dt { color: var(--muted); } .ad-dl dd { margin: 0; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.adl-past > .ad-dl, .adl-past > .adl-list, .adl-past > .adl-events { margin-top: 4px; }
/* one problem: what to do, then who */
.ad-do { margin: 0; font-size: 14px; color: var(--ink); }
.ad-do:empty { display: none; }
.ad-who-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 16px; font-size: 13.5px; }
.ad-wl a { font-weight: 600; color: var(--accent-text); text-decoration: none; }
@media (max-width: 760px) {
  .ad-blocks { grid-template-columns: minmax(0, 1fr); }
  .ad-needs li { grid-template-columns: 9px minmax(0, 1fr); } .ad-need-do { grid-column: 2; }
  .ad-use th:nth-child(2), .ad-use td:nth-child(2), .ad-use th:nth-child(3), .ad-use td:nth-child(3) { display: none; }  /* phones: the last two weeks
  .ad-dl > div { grid-template-columns: 112px minmax(0, 1fr); }
  /* the people's table: a block per person, its figures labelled */
  .ad-people thead { display: none; }
  .ad-people, .ad-people tbody, .ad-people tr { display: block; }
  .ad-people tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--grid); }
  .ad-people th, .ad-people td { padding: 0 !important; border: 0 !important; text-align: left !important; white-space: normal; }
  .ad-people th { grid-column: 1 / -1; min-width: 0 !important; }
  .ad-people td::before { content: attr(data-l); display: block; font-size: 11.5px; color: var(--muted); }
}
/* the coach's budget and caps: a track, the spend in the accent (amber near the limit, red past it) */
.ad-meter { position: relative; display: inline-block; vertical-align: middle; width: 100%; max-width: 220px; height: 8px; border-radius: 999px; background: var(--grid); }
.ad-meter i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--accent); }
.ad-meter.warn i { background: var(--warn); } .ad-meter.bad i { background: var(--crit); }
.ad-meter.lg { max-width: none; height: 12px; }
.ad-meter.sm { display: block; height: 4px; max-width: 120px; margin: 5px 0 0 auto; }
.ad-budget { display: grid; gap: 12px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.ad-bud-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.ad-bud-top > b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ad-bud-top > span { font-size: 13.5px; color: var(--muted); } .ad-bud-top .spill { margin-left: auto; }
.ad-caps-h { margin: 4px 0 -4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ad-caps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ad-caps li { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr) auto; align-items: center; gap: 14px; font-size: 13.5px; }
.ad-caps li a { font-weight: 600; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-caps li a:hover { color: var(--accent-text); }
.ad-caps .ad-meter { max-width: none; }
.ad-caps .num { font-variant-numeric: tabular-nums; text-align: right; min-width: 64px; }
.ad-dl .ad-meter { width: 140px; }
@media (max-width: 760px) { .ad-caps li { grid-template-columns: minmax(0, 1fr) 90px auto; gap: 10px; } .ad-people .ad-meter.sm { margin-left: 0; } }
/* Settings → Coach: this month's use against the allowance */
.cs-use { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 14px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.cs-use-h { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.cs-use .ad-meter { max-width: none; }
.cs-use-t { grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-2); }
/* the welcome flow's "no race date" note: above the flow's own layer */
.modal-back.ob-nodate { z-index: 300; }
.ob-nodate h3 { margin: 0; font-size: 18px; text-transform: none; letter-spacing: -0.01em; }
.ob-nodate p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.ob-nodate .modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* admin, Visitors on a phone: the tables fit the screen (row names wrap, tighter cells, a column less) */
@media (max-width: 560px) {
  .adl[data-tab="visitors"] .adl-table th, .adl[data-tab="visitors"] .adl-table td { padding: 8px; }
  .adl[data-tab="visitors"] .adl-table tbody th { white-space: normal; overflow-wrap: anywhere; }
  .adl[data-tab="visitors"] .adl-table thead th { white-space: normal; }
  .adl[data-tab="visitors"] .ad-wide { display: none; }
}
