/* training.css: the training portal (/training). Mobile first.
   THE LOOK IS site-theme.css's (the customer redesign, PR #183, approved by
   Tim 14 Oct 2026), loaded first: its tokens on body (--ink, --s1..--s3,
   --hair, --text, --text2, --text3, --brand for fills, --lilac for text,
   --ok, --bad, --tabbar-h), its tab bar and its account sheet. This file
   only lays out the portal's own pieces with those tokens. Purple is for
   fills only; text that would be purple is lilac (purple text on ink is
   under AA). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-size: 16px; line-height: 1.5; min-height: 100vh;
  --radius: 16px;
}
a { color: var(--lilac); }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 6px; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 18px; margin: 0 0 10px; font-weight: 700; }
h3 { font-size: 16px; margin: 0; font-weight: 700; }
p { margin: 0 0 10px; }
[hidden] { display: none !important; }
button, input { font: inherit; }

.tp-top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(7, 6, 10, 0.92);
  border-bottom: 1px solid var(--hair); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.tp-brand { color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: 0.12em; font-size: 15px; }
.tp-brand span { color: var(--lilac); font-weight: 600; letter-spacing: 0.02em; }
.tp-top-links { display: flex; gap: 14px; align-items: center; font-size: 14px; }
.tp-top-links a { text-decoration: none; }
.tp-link-btn { background: none; border: 0; color: var(--text2); padding: 8px 0; cursor: pointer; min-height: 44px; }

.tp-main { max-width: 640px; margin: 0 auto; padding: 16px 16px 150px; }
.tp-panel { background: var(--s2); border: 1px solid transparent; border-radius: var(--radius); padding: 18px 16px; margin-bottom: 14px; }
.tp-center { text-align: center; color: var(--text2); }
.tp-muted { color: var(--text2); }
.tp-small { font-size: 14px; }
.tp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

label { display: block; font-size: 14px; color: var(--text2); margin: 12px 0 6px; }
input[type=email], input[type=password] {
  width: 100%; font-size: 16px; color: var(--text); background: var(--ink); border: 1px solid var(--hair);
  border-radius: 10px; padding: 12px 14px; min-height: 48px;
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--lilac); outline-offset: 2px; }

.tp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px;
  border-radius: 999px; border: 2px solid transparent; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none;
}
.tp-btn:disabled { opacity: 0.55; cursor: default; }
.tp-btn-main { background: var(--brand); color: #fff; width: 100%; margin-top: 16px; }
.tp-btn-main:active { background: var(--brand-pressed); }
.tp-btn-quiet { background: transparent; color: var(--text); border-color: var(--hair); }
.tp-btn-small { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.tp-msg { margin: 10px 0 0; font-size: 14px; min-height: 1em; }
.tp-msg.bad { color: var(--bad); }
.tp-msg.good { color: var(--ok); }

.tp-chip { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; border: 1px solid; }
.tp-chip-coaching { color: var(--lilac); border-color: rgba(201, 160, 242, 0.45); background: var(--accent-wash); }
.tp-chip-paid { color: #fff; border-color: var(--brand); background: var(--brand); }
.tp-chip-free { color: var(--ok); border-color: var(--ok); background: var(--ok-wash); }
.tp-chip-status { color: var(--text2); border-color: var(--hair); }

/* home */
.tp-hello { margin: 4px 0 16px; }
.tp-banner { border-color: var(--brand); background: var(--accent-wash); }
.tp-program-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.tp-progress { height: 6px; background: var(--s3); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.tp-progress > span { display: block; height: 100%; background: var(--brand); }
.tp-days { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.tp-day {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left;
  background: var(--s3); border: 1px solid var(--hair); color: var(--text); border-radius: 12px; padding: 12px 14px; min-height: 56px; cursor: pointer; text-decoration: none;
}
.tp-day small { display: block; color: var(--text2); font-size: 13px; }
.tp-day .tp-tick { color: var(--ok); font-weight: 700; font-size: 14px; white-space: nowrap; }
.tp-day.tp-next { border-color: var(--brand); }
.tp-day.tp-day-plan { cursor: default; }
.tp-plan li { padding: 10px 0; }
.tp-plan-done { color: var(--ok); }
.tp-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; margin-top: 6px; }
.tp-week div { font-size: 12px; color: var(--text2); padding: 6px 0 8px; border-radius: 10px; background: var(--s3); border: 1px solid transparent; }
.tp-week b { display: block; font-size: 15px; color: var(--text); }
.tp-week .tp-today { border-color: var(--lilac); }
.tp-week .tp-done { background: var(--accent-wash); }
.tp-week i { display: block; width: 7px; height: 7px; margin: 4px auto 0; border-radius: 50%; background: transparent; }
.tp-week .tp-done i { background: var(--lilac); }
.tp-list { list-style: none; margin: 0; padding: 0; }
.tp-list li { padding: 10px 0; border-top: 1px solid var(--hair); }
.tp-list li:first-child { border-top: 0; }
.tp-notes { white-space: pre-wrap; color: var(--text2); font-size: 14px; }

/* session */
.tp-back { background: none; border: 0; color: var(--lilac); padding: 8px 0; min-height: 44px; cursor: pointer; font-weight: 600; }
.tp-ex { background: var(--s2); border: 1px solid transparent; border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.tp-ex-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tp-target { font-size: 14px; color: var(--lilac); margin-top: 2px; }
.tp-target.tp-setyour { color: var(--warn); }
.tp-hint { font-size: 14px; font-weight: 700; color: var(--lilac); margin-top: 4px; }
.tp-last { font-size: 13px; color: var(--text2); margin-top: 4px; }
.tp-moved { color: var(--ok); font-weight: 600; }
.tp-sets { width: 100%; border-collapse: separate; border-spacing: 0 6px; margin-top: 8px; }
.tp-sets th { font-size: 12px; color: var(--text2); font-weight: 600; text-align: left; padding: 0 4px; }
.tp-sets td { padding: 0 4px; vertical-align: middle; }
.tp-sets td:first-child { width: 34px; color: var(--text2); font-weight: 700; }
.tp-num {
  width: 100%; min-width: 0; font-size: 17px; text-align: center; color: var(--text); background: var(--ink); border: 1px solid var(--hair);
  border-radius: 10px; padding: 10px 6px; min-height: 46px;
}
.tp-num::placeholder { color: var(--text3); }
.tp-done-btn {
  width: 52px; min-height: 46px; border-radius: 10px; border: 2px solid var(--hair); background: var(--s3); color: var(--text2); cursor: pointer; font-weight: 800; font-size: 18px;
}
.tp-done-btn[aria-pressed=true] { background: var(--brand); border-color: var(--brand); color: #fff; }
.tp-ex-links { display: flex; gap: 14px; margin-top: 6px; font-size: 14px; }
.tp-ex-links button { background: none; border: 0; color: var(--lilac); padding: 6px 0; cursor: pointer; min-height: 40px; }
.tp-cue { font-size: 14px; color: var(--text2); margin-top: 6px; }
.tp-bar {
  position: fixed; left: 0; right: 0; bottom: var(--tabbar-h); z-index: 6; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(7, 6, 10, 0.96); border-top: 1px solid var(--hair); display: flex; gap: 10px; justify-content: center;
}
.tp-bar .tp-btn { flex: 1; max-width: 300px; margin: 0; }
.tp-savestate { font-size: 13px; color: var(--text2); text-align: center; margin: 4px 0 12px; }

.tp-toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + 84px + env(safe-area-inset-bottom)); z-index: 7; max-width: 520px; margin: 0 auto;
  background: var(--s3); color: var(--text); border: 1px solid var(--hair); border-radius: 12px; padding: 12px 14px; font-weight: 600; font-size: 15px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
@media (min-width: 700px) {
  .tp-main { padding-top: 24px; }
  h1 { font-size: 30px; }
}
.tp-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tp-timer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.tp-clock { font-variant-numeric: tabular-nums; font-size: 28px; font-weight: 800; min-width: 84px; }
.tp-timer button, .tp-rest button { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--hair); background: var(--s3); color: var(--text); font-weight: 700; cursor: pointer; }
.tp-timer button:first-of-type { background: var(--brand); border-color: var(--brand); color: #fff; }
.tp-timer button:disabled { opacity: 0.6; }
.tp-timer-note { flex-basis: 100%; font-size: 14px; color: var(--lilac); }
.tp-timer-done .tp-clock { color: var(--lilac); }
.tp-rest {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + 68px + env(safe-area-inset-bottom)); z-index: 6; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 16px; background: var(--s3); border-top: 1px solid var(--hair); font-size: 16px;
}
.tp-rest strong { font-variant-numeric: tabular-nums; font-size: 20px; color: var(--lilac); }
/* free-program.js's notice (website #188), in the portal's look */
.free-program-notice { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + 84px + env(safe-area-inset-bottom)); z-index: 8; max-width: 560px; margin: 0 auto;
  background: var(--s3); color: var(--text); border-left: 4px solid var(--brand); border-radius: 10px; padding: 14px 16px; font-size: 15px; line-height: 1.5; }
.tp-basics-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.tp-basics-row label { margin: 0; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tp-chipbtn { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--hair); background: var(--s3); color: var(--text); font-weight: 600; cursor: pointer; margin-top: 8px; }
.tp-chipbtn[aria-checked=true] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* On phones the tab bar (site-theme.css) sits under everything fixed and
   already covers the safe area, so the bars above it don't pad it again. */
@media (max-width: 768px) {
  .tp-bar { padding-bottom: 10px; }
  .tp-toast, .free-program-notice { bottom: calc(var(--tabbar-h) + 84px); }
  .tp-rest { bottom: calc(var(--tabbar-h) + 68px); }
}

/* PT sessions (14 Oct 2026): the SHARP app's booking, here. */
.tp-pt-tokens { list-style: none; padding: 0; margin: 4px 0 12px; display: grid; gap: 4px; }
.tp-pt-sub { margin: 14px 0 6px; }
.tp-pt-row { text-decoration: none; color: inherit; min-height: 44px; }
.tp-pt-status { font-size: 13px; font-weight: 700; }
.tp-pt-ok { color: var(--ok); }
.tp-pt-warn { color: var(--warn); }
.tp-pt-bad { color: var(--bad); }
.tp-pt-muted { color: var(--text2); }
.tp-pt-late { border-color: var(--warn); background: var(--warn-wash); }
.tp-pt-rules { margin-top: 14px; color: var(--text2); font-size: 14px; }
.tp-pt-rules summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--lilac); font-weight: 600; }
.tp-btn-danger { color: var(--bad); border-color: var(--bad); }
.tp-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; margin: 0 0 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tp-strip::-webkit-scrollbar { display: none; }
.tp-daybtn { flex: 0 0 auto; width: 56px; min-height: 64px; border-radius: 14px; border: 2px solid var(--hair); background: var(--s3); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; padding: 4px 0; }
.tp-daybtn small { font-size: 11px; color: var(--text2); line-height: 1.2; }
.tp-daybtn b { font-size: 18px; line-height: 1.2; }
.tp-daybtn.tp-off { opacity: 0.45; }
.tp-daybtn[aria-selected=true] { background: var(--brand); border-color: var(--brand); color: #fff; opacity: 1; }
.tp-daybtn[aria-selected=true] small { color: #fff; }

/* Earlier programs: collapsed under the current one (Tim's retest, 14 Oct). */
.tp-past > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.tp-past > summary::-webkit-details-marker { display: none; }
.tp-past > summary::after { content: "›"; color: var(--text3); font-size: 20px; transform: rotate(90deg); }
.tp-past[open] > summary::after { transform: rotate(-90deg); }
.tp-past > summary h2 { margin: 0; }
/* Book: a week with no session left still shows its free times (not bookable). */
.tp-daybtn.tp-nocredit { opacity: 0.7; border-style: dashed; }
.tp-chipbtn[disabled] { opacity: 0.5; cursor: not-allowed; }
