/* Track (track.js, track-workout.js, track-calendar.js, stepper.js): light theme, page by page (briefs/TRACK-PLAN-2026-11-05.md section 4).
   From previews/track-variations-11.html. Everything is prefixed tk-. The sidebar stays dark; the page area turns light while Track is on screen. */
.tk, .tk-sheet { --tk-blue: #1f4fe0; --tk-ink: #0b0f17; --tk-mut: #6b7280; --tk-line: #e6e8ec; --tk-bg: #fff; --tk-ok: #16803c; --tk-okbg: #e8f6ec; --tk-warn: #b45309;
  color: var(--tk-ink); font-family: -apple-system, "SF Pro Text", Inter, system-ui, sans-serif; font-size: 15px; line-height: 1.4; }

.tk { max-width: 560px; display: flex; flex-direction: column; gap: 10px; }
.tk-full { min-height: calc(100vh - 140px); }
.tk-flex { flex: 1; }
.tk-log { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.tk-hdr { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 34px; }
.tk-hdr h1, .tk .tk-h2 { margin: 0; font: 800 28px/1.1 -apple-system, system-ui, sans-serif; letter-spacing: -.02em; color: var(--tk-ink); text-transform: none; }

.tk .tk-h2 { font-size: 24px; }
.tk-back { color: var(--tk-ink); font-weight: 700; text-decoration: none; font-size: 16px; }
.tk-add { display: inline-flex; align-items: center; gap: 3px; color: var(--tk-blue); font: inherit; font-weight: 700; background: none; border: 0; cursor: pointer; text-decoration: none; padding: 6px 0; }
.tk-add .ic { width: 18px; height: 18px; }
.tk-note { font-size: 12.5px; color: var(--tk-mut); font-weight: 500; text-decoration: none; }
.tk-fine { margin: 0; font-size: 12px; color: var(--tk-mut); } .tk-fine a { color: var(--tk-blue); }
.tk-hint { margin: 0; text-align: center; font-size: 12.5px; color: var(--tk-mut); }
.tk-err { margin: 0; color: #b42318; font-size: 13.5px; min-height: 1px; }
.tk-err:empty { display: none; }
.tk-lbl { display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--tk-mut); margin-bottom: 6px; }
.tk-sec { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 800; font-size: 15.5px; }

.tk-card { display: block; border: 1px solid var(--tk-line); border-radius: 16px; padding: 10px 12px; background: #fff; color: inherit; text-decoration: none; }
.tk-card p { margin: 0; }
.tk-sport { display: flex; gap: 6px; }
.tk-sport button { flex: 1; padding: 6px 4px; border-radius: 999px; border: 1px solid var(--tk-line); background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: var(--tk-mut); cursor: pointer; }
.tk-sport button.on { background: var(--tk-ink); color: #fff; border-color: var(--tk-ink); }
.tk-next { display: flex; gap: 12px; align-items: center; background: var(--tk-ink); color: #fff; border-radius: 16px; padding: 10px 12px; text-decoration: none; }
.tk-next-d { text-align: center; background: #ffffff1a; border-radius: 10px; padding: 3px 8px; font-size: 11px; line-height: 1.1; }
.tk-next-d b { display: block; font-size: 17px; }
.tk-next small { display: block; color: #aab1bd; font-size: 12px; }
.tk-wo { display: flex; gap: 12px; align-items: center; }
.tk-wo > div { flex: 1; min-width: 0; } .tk-wo b { font-size: 16px; } .tk-wo small { display: block; color: var(--tk-mut); font-size: 12.5px; }
.tk-live { display: flex; justify-content: space-between; align-items: center; border-color: var(--tk-blue); }
.tk-live b { font-size: 17px; }
.tk-go { padding: 8px 14px; border-radius: 10px; background: var(--tk-blue); color: #fff; font: inherit; font-weight: 700; font-size: 13.5px; border: 0; cursor: pointer; text-decoration: none; flex: none; }
.tk-else { display: block; width: 100%; margin-top: 7px; padding-top: 7px; font-size: 12.5px !important; border: 0; border-top: 1px solid var(--tk-line); background: none; font: inherit; font-size: 13px; color: var(--tk-mut); text-align: left; cursor: pointer; }
.tk-else b { color: var(--tk-blue); }
.tk-done { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; color: var(--tk-ok); font-weight: 700; font-size: 13px; text-decoration: none; }
.tk-done .ic { width: 16px; height: 16px; }
.tk-row2 { display: flex; gap: 8px; margin-top: 10px; }
.tk-row2 > * { flex: 1; }
.tk-btn { display: block; width: 100%; text-align: center; padding: 13px; border-radius: 14px; background: var(--tk-blue); color: #fff; font: inherit; font-weight: 700; border: 0; cursor: pointer; text-decoration: none; }
.tk-btn:disabled { opacity: .45; cursor: default; }
.tk-btn.ghost { background: #fff; color: var(--tk-ink); border: 1px solid var(--tk-line); }
.tk-btn.sm { padding: 9px; font-size: 13.5px; border-radius: 11px; }
.tk-link { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--tk-blue); cursor: pointer; text-align: left; flex: none !important; }

/* scorecard */
.tk-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tk-tbl th { font-size: 10.5px; color: var(--tk-mut); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; text-align: right; padding: 2px 0 5px 8px; }
.tk-tbl th:first-child, .tk-tbl td:first-child { text-align: left; }
.tk-tbl td { padding: 7px 0 7px 8px; border-top: 1px solid var(--tk-line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tk-tbl td:first-child { font-weight: 600; white-space: normal; }
.tk-tbl td small { font-size: 11px; color: var(--tk-mut); font-weight: 500; margin-left: 3px; }
.tk-tbl td.b { font-weight: 800; } .tk-tbl td.g { color: var(--tk-ok); font-weight: 800; }
.tk-tbl tr[data-log] { cursor: pointer; }
.tk-tbl tr.tk-stat td { background: #f6f8ff; } .tk-tbl tr.tk-stat td:first-child { padding-left: 6px; border-radius: 8px 0 0 8px; } .tk-tbl tr.tk-stat td:last-child { padding-right: 6px; border-radius: 0 8px 8px 0; }
.tk-pr { font-size: 9.5px; font-weight: 800; color: var(--tk-ok); background: var(--tk-okbg); border-radius: 5px; padding: 1px 4px; margin-left: 4px; vertical-align: middle; }
.tk-self { color: var(--tk-warn); font-style: normal; font-weight: 800; margin-left: 2px; }

/* this week */
.tk-week { display: grid; gap: 6px; text-decoration: none; color: inherit; padding: 2px 0; }
.tk-chev { color: var(--tk-mut); margin-left: 4px; font-weight: 700; }
.tk-all { display: flex; justify-content: space-between; gap: 8px; padding-top: 7px; margin-top: 2px; border-top: 1px solid var(--tk-line); font-size: 12px; color: var(--tk-mut); text-decoration: none; }
.tk-all span:last-child { color: var(--tk-blue); font-weight: 700; white-space: nowrap; }
.tk-dots { display: flex; justify-content: space-between; }
.tk-dots span { width: 34px; text-align: center; font-size: 11px; color: var(--tk-mut); }
.tk-dots i { display: block; width: 24px; height: 24px; margin: 3px auto 0; border-radius: 50%; background: #f1f3f6; }
.tk-dots i.on { background: var(--tk-blue); } .tk-dots i.now { box-shadow: inset 0 0 0 2px var(--tk-blue); } .tk-dots i.on.now { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--tk-blue); }

/* sheets */
.tk-sheet { border: 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); margin: auto auto 0; width: min(560px, 100%); max-width: 100%; max-height: 86vh; border-radius: 22px 22px 0 0; background: #fff; }
.tk-sheet::backdrop { background: rgba(11, 15, 23, .45); }
.tk-grab { width: 40px; height: 5px; border-radius: 3px; background: #d7dbe1; margin: 2px auto 10px; }
.tk-opt { display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid var(--tk-line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.tk-opt:first-child { border-top: 0; }
.tk-opt > span:nth-child(2) { flex: 1; } .tk-opt small { display: block; color: var(--tk-mut); font-size: 12.5px; }
.tk-oi { width: 38px; height: 38px; border-radius: 11px; background: #f1f3f6; display: grid; place-items: center; flex: none; color: var(--tk-ink); }
.tk-oi .ic { width: 20px; height: 20px; }
.tk-later { font-size: 10.5px; font-weight: 700; color: var(--tk-warn); background: #fff4e0; padding: 2px 7px; border-radius: 999px; }
.tk-tpl { display: flex; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--tk-line); }
.tk-tpl b { flex: 1; }
.tk-search { width: 100%; padding: 11px 12px; border: 1px solid var(--tk-line); border-radius: 12px; font: inherit; margin-bottom: 8px; }
.tk-plist { max-height: 46vh; overflow-y: auto; }
.tk-pick { display: block; width: 100%; text-align: left; padding: 10px 2px; border: 0; border-top: 1px solid var(--tk-line); background: none; font: inherit; color: inherit; cursor: pointer; }
.tk-pick small { display: block; color: var(--tk-mut); font-size: 12px; }
.tk-pnew { padding-top: 10px; border-top: 1px solid var(--tk-line); }
.tk-kinds, .tk-chips, .tk-days { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tk-chip { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--tk-line); background: #fff; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--tk-mut); cursor: pointer; }
.tk-chip.on, .tk-chip:has(input:checked) { background: #eef2ff; color: var(--tk-blue); border-color: #c9d6ff; }
.tk-chip input { position: absolute; opacity: 0; pointer-events: none; }

/* forms */
.tk-form { display: flex; flex-direction: column; gap: 12px; }
.tk-fld { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--tk-mut); }
.tk-fld input, .tk-fld select, .tk-fld textarea { padding: 11px 12px; border: 1px solid var(--tk-line); border-radius: 12px; font: inherit; font-size: 16px; color: var(--tk-ink); background: #fff; font-weight: 500; }
.tk-tog { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; font-weight: 600; }
.tk-tog input { appearance: none; width: 44px; height: 26px; border-radius: 999px; background: #d7dbe1; position: relative; cursor: pointer; flex: none; transition: background .15s; }
.tk-tog input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.tk-tog input:checked { background: var(--tk-blue); } .tk-tog input:checked::after { left: 21px; }
.tk-togs { padding: 4px 13px; }
.tk-date { display: flex; justify-content: space-between; align-items: center; }
.tk-date input { border: 0; font: inherit; font-weight: 700; background: none; color: var(--tk-ink); text-align: right; }

/* stepper */
.tk-stp { display: flex; align-items: center; justify-content: space-between; gap: 0; background: #f2f3f5; border-radius: 11px; height: 42px; min-width: 0; user-select: none; -webkit-user-select: none; }
.tk-stp button[data-d] { width: 34px; height: 42px; border-radius: 11px; border: 0; background: transparent; font: 400 22px/1 system-ui; color: var(--tk-blue); cursor: pointer; flex: none; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.tk-stp button[data-d]:active { background: #e3e8fb; }
.tk-stp-v { flex: 1; min-width: 0; border: 0; background: none; font: inherit; color: inherit; cursor: text; text-align: center; padding: 0; }
.tk-stp-v b { font-size: 16px; font-weight: 800; } .tk-stp-v small { color: var(--tk-mut); font-size: 11px; margin-left: 2px; }
.tk-stp-in { flex: 1; min-width: 0; width: 100%; border: 1px solid var(--tk-blue); border-radius: 8px; padding: 6px; font: inherit; font-size: 16px; text-align: center; }
.tk-stp.big { height: auto; padding: 8px; border-radius: 22px; gap: 12px; }
.tk-stp.big button[data-d] { width: 64px; height: 64px; border-radius: 18px; font-size: 34px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tk-stp.big .tk-stp-v b { font-size: 56px; font-weight: 800; letter-spacing: -.02em; } .tk-stp.big .tk-stp-v small { display: block; font-size: 14px; }
.tk-stp.big .tk-stp-in { font-size: 40px; font-weight: 800; }

/* build */
.tk-ex { border: 1px solid var(--tk-line); border-radius: 16px; padding: 12px; background: #fff; }
.tk-exh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tk-exh b { font-size: 16px; } .tk-exh small { color: var(--tk-mut); font-size: 12.5px; text-align: right; }
.tk-exa button { width: 30px; height: 30px; border: 0; background: #f1f3f6; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; margin-left: 4px; }
.tk-exa button:disabled { opacity: .35; }
.tk-plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: 10px; }
.tk-plan label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; color: var(--tk-mut); text-transform: uppercase; letter-spacing: .04em; }

/* doing it */
.tk-dex { display: flex; flex-direction: column; gap: 6px; }
.tk-colh, .tk-srow { display: grid; grid-template-columns: 16px repeat(var(--n), minmax(0, 1fr)) 32px; gap: 7px; align-items: center; }
.tk-colh span { font-size: 10.5px; font-weight: 700; color: var(--tk-mut); text-transform: uppercase; text-align: center; letter-spacing: .04em; }
.tk-srow { padding: 4px 0; border-radius: 12px; }
.tk-srow.done { background: none; }
.tk-srow.done .tk-stp { background: var(--tk-okbg); } .tk-srow.done .tk-stp-v b { color: var(--tk-ok); }
.tk-n { text-align: center; font-weight: 700; color: var(--tk-mut); font-size: 13px; }
.tk-ck { width: 30px; height: 30px; justify-self: end; border-radius: 50%; border: 1.6px solid #c5c9d1; background: #fff; color: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; }
.tk-ck .ic { width: 17px; height: 17px; }
.tk-ck.on { background: var(--tk-ok); border-color: var(--tk-ok); color: #fff; }
.tk-rest { position: sticky; bottom: 76px; z-index: 2; display: flex; align-items: center; gap: 8px; background: var(--tk-ink); color: #fff; border-radius: 14px; padding: 10px 12px; }
.tk-rest b { flex: 1; font-size: 20px; font-variant-numeric: tabular-nums; }
.tk-rest button { border: 0; border-radius: 9px; padding: 7px 10px; background: #ffffff1f; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.tk-rest button.sk { background: var(--tk-blue); }
.tk-rest[hidden] { display: none; }
.tk-foot { position: sticky; bottom: 0; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--tk-bg) 30%); margin-top: auto; }
#tk-el { font-variant-numeric: tabular-nums; }

/* finish */
.tk-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tk-sum > div { background: #fff; border: 1px solid var(--tk-line); border-radius: 14px; padding: 11px; text-align: center; font-size: 12px; color: var(--tk-mut); }
.tk-sum b { display: block; font-size: 19px; color: var(--tk-ink); }
.tk-rpe { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.tk-rpe button { aspect-ratio: 1; border: 1px solid var(--tk-line); border-radius: 10px; background: #fff; font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.tk-rpe button.on { background: var(--tk-blue); color: #fff; border-color: var(--tk-blue); }
.tk-rpel { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--tk-mut); margin-top: -6px; }
.tk-load { margin: 0; padding: 10px 12px; background: #eef2ff; border-radius: 12px; color: var(--tk-blue); font-weight: 700; font-size: 14px; }

/* lists: tests, activity, calendar day */
.tk-tests { padding: 4px 13px; }
.tk-tests .tk-sec { padding: 9px 0 4px; }
.tk-trow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--tk-line); text-decoration: none; color: inherit; }
.tk-tests > .tk-trow:first-child, .tk-tests > .tk-sec + .tk-trow { border-top: 0; }
.tk-trow > span:first-of-type:not(.tk-oi) { flex: 1; min-width: 0; }
.tk-trow small { display: block; color: var(--tk-mut); font-size: 12.5px; }
.tk-tv { text-align: right; font-weight: 800; } .tk-tv small { font-weight: 500; }
.tk-tests > .tk-note { padding: 10px 0; margin: 0; }
.tk-lab { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #fff4e0; color: var(--tk-warn); white-space: nowrap; }
.tk-lab.c { background: var(--tk-okbg); color: var(--tk-ok); } .tk-lab.g { background: #eef2ff; color: var(--tk-blue); }
.tk-chart { position: relative; height: 200px; }   /* .tc (performance.css) fills its box: inset 0 */
.tk-reply { border-color: #c9d6ff; background: #f6f8ff; }
.tk-ci .tk-oi { width: 34px; height: 34px; }
.tk-ci > span:nth-of-type(2) { flex: 1; min-width: 0; }

/* calendar */
.tk-mhdr { display: flex; justify-content: space-between; align-items: center; }
.tk-mhdr a, .tk-mhdr button { color: var(--tk-ink); text-decoration: none; font: inherit; font-size: 22px; padding: 2px 12px; border: 0; background: none; cursor: pointer; }
.tk-mhdr button:disabled { color: #c5c9d1; cursor: default; }
.tk-mgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.tk-mgrid > i { font-style: normal; font-size: 11px; color: var(--tk-mut); font-weight: 600; }
.tk-mday { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-height: 48px; width: 100%; border: 0; background: none; font: inherit; border-radius: 12px; color: var(--tk-ink); text-decoration: none; font-weight: 600; font-size: 14px; cursor: pointer; padding: 0; }
.tk-mday:hover { background: #f4f5f7; }
.tk-mday.now { box-shadow: inset 0 0 0 2px var(--tk-blue); }
.tk-mday.pick { background: var(--tk-ink); color: #fff; }
.tk-mday .tk-dot { position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--tk-blue); }
.tk-dot.d { background: var(--tk-ok); } .tk-dot.t { background: var(--tk-warn); }
.tk-mday.pick .tk-dot { background: #fff; }

@media (max-width: 860px) {
  .tk { max-width: none; }
  .tk-full { min-height: calc(100dvh - 300px); }   /* header, athlete picker and the floating tab bar: the bottom button starts in view */
  .tk-foot { bottom: calc(80px + env(safe-area-inset-bottom)); padding-bottom: 10px; }
  .tk-rest { bottom: calc(150px + env(safe-area-inset-bottom)); }
}

/* The whole frame goes light while Track is on screen (previews/track-variations-12.html): white page, white top bar, white tab bar with labels and the
   active tab in blue, light athlete picker; on a computer the sidebar too. Every other athlete page keeps the dark look until it moves over, page by page. */
body.player-mode:has(.tk) { background: #fff; }
.pw:has(.tk) { --pw-bg: #fff; --pw-card: #fff; --pw-line: #e6e8ec; --pw-text: #0b0f17; --pw-muted: #6b7280; background: #fff; color: #0b0f17; }
.pw:has(.tk) .pw-logo { color: #0b0f17; } .pw:has(.tk) .pw-logo svg { stroke: #0b0f17; }
.pw:has(.tk) .pw-bell { color: #6b7280; } .pw:has(.tk) .pw-bell:hover { background: #f4f5f7; color: #0b0f17; }
.pw:has(.tk) .pw-side { background: #fff; border-right-color: #e6e8ec; }
.pw:has(.tk) .pw-item { color: #374151; } .pw:has(.tk) .pw-item:hover { background: #f4f5f7; color: #0b0f17; }
.pw:has(.tk) .pw-item.on { background: #eef2ff; color: #1f4fe0; } .pw:has(.tk) .pw-item.on .ic { color: #1f4fe0; }
.pw:has(.tk) .pw-me { background: #fff; border-color: #e6e8ec; } .pw:has(.tk) .pw-me b { color: #0b0f17; } .pw:has(.tk) .pw-me button:hover { color: #0b0f17; }
@media (max-width: 860px) {
  .pw:has(.tk) .pw-top { background: rgba(255,255,255,.96); border-bottom: 1px solid #eef0f3; }
  .pw:has(.tk) .pw-main { padding-top: 10px; }
  /* same floating bar, in white on the white pages */
  .pw:has(.tk) .pw-tabs { background: rgba(255,255,255,.92); border-color: #e6e8ec; box-shadow: 0 10px 30px rgba(11,15,23,.12); }
  .pw:has(.tk) .pw-tabs a { color: #0b0f17; }
  .pw:has(.tk) .pw-tabs a .ic { color: #0b0f17 !important; }
  .pw:has(.tk) .pw-tabs a.on[href="#/home"] .ic, .pw:has(.tk) .pw-tabs a.on[href="#/hub"] .ic { fill: #0b0f17; }
  .pw:has(.tk) .pw-tabs a.on[href="#/home"] .ic path { stroke: #0b0f17; }   /* the tab bar is the same dark floating bar as every other page (Daniel, 2026-11-05) */
}

/* Schedule (athlete-pages.js) is drawn inside .tk too: its booked-session cards and the Book step sit on the light page. */
.tk-sched .ph-card { background: #fff; border: 1px solid var(--tk-line); color: var(--tk-ink); }
.tk-sched .ap-tabs { margin: 2px 0; }
