/* Moved from app/views/training/show.html.erb in B2, scoped to .ctx-public. Rebuilt in its own phase. */
.ctx-public .tl-wrap { max-width: 720px; margin: 0 auto; padding: 0 var(--space-md) var(--space-xxl); }
.ctx-public .tl-style {
    text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--foreground-muted); margin: 8px 0 0;
  }
.ctx-public .tl-back {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--foreground-muted); text-decoration: none;
    font-size: 0.9rem; margin: var(--space-lg) 0 var(--space-md);
    min-height: 44px;
  }
.ctx-public .tl-back:hover { color: var(--foreground); }
.ctx-public .tl-session h1 {
    font-family: var(--font);
    font-size: 1.5rem; margin: 0;
  }
.ctx-public .tl-session .tl-tagline {
    color: var(--foreground-muted); margin: 2px 0 var(--space-md); font-size: 0.9rem;
  }
.ctx-public .tl-canvas-wrap {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    touch-action: none;
  }
.ctx-public .tl-canvas-wrap canvas { width: 100%; display: block; cursor: crosshair; }
.ctx-public .tl-fs-btn {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    width: 36px; height: 36px; border-radius: 50%;
    border: none; cursor: pointer; padding: 0;
    background: var(--surface-1); color: var(--ink);
    font-size: 16px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
  }
.ctx-public .tl-fs-btn:hover { background: var(--surface-1); }
.ctx-public .tl-fs-btn[hidden] { display: none; }
/* Full screen: the script moves the wrap into a body-level .tl-fs-host, above the app's
   header and tab bar. The ✕ is big enough to hit from across the table. */
.ctx-public .tl-canvas-wrap.tl-fullscreen {
    position: fixed; inset: 0; z-index: 10000;
    width: 100vw; height: 100vh; height: 100dvh;
    margin: 0; border-radius: 0; border: none; background: var(--surface-0);
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    display: flex; align-items: center; justify-content: center;
    overscroll-behavior: none;
  }
.ctx-public .tl-canvas-wrap.tl-fullscreen .tl-fs-exit {
    top: calc(env(safe-area-inset-top) + 8px);
    right: max(12px, env(safe-area-inset-right));
    width: 64px; height: 64px;
    font-size: 30px; font-weight: 800;
    background: var(--surface-2); color: var(--ink);
    border: 2px solid var(--line);
  }
.ctx-public .tl-canvas-wrap.tl-fullscreen .tl-fs-exit:hover { background: var(--line); }
html.tl-noscroll,
html.tl-noscroll body { overflow: hidden; }
.ctx-public .tl-prompt {
    text-align: center;
    color: var(--foreground-muted);
    margin: var(--space-md) 0;
    min-height: 1.4em;
  }
.ctx-public .tl-legend {
    display: flex; gap: 16px; justify-content: center;
    font-size: 12px; color: var(--foreground-muted); margin-top: 10px;
  }
.ctx-public .tl-legend i {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    margin-right: 6px;
  }
.ctx-public .tl-chiprow {
    display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
    margin-top: 12px;
  }
.ctx-public .tl-chip {
    border: none; cursor: pointer;
    padding: 10px 16px; min-height: 40px; border-radius: 999px;
    background: var(--secondary); color: var(--foreground);
    font-family: var(--font);
    font-weight: 700; font-size: 13px;
  }
.ctx-public .tl-chip.is-active { background: var(--primary); color: var(--on-ink); }
/* Call the look: one word, big enough to read from behind the rods. */
.ctx-public .tl-callout {
    text-align: center; margin: 12px 0 0;
    font-family: var(--font); font-weight: 800; color: var(--win);
    font-size: clamp(2.5rem, 10vw, 4rem); line-height: 1.1; letter-spacing: -0.01em;
    min-height: 1.1em;
  }
.ctx-public .tl-callout.is-cue { color: var(--ink); }
.ctx-public .tl-callout[hidden] { display: none; }
/* Sound: a big switch, off until the player turns it on. */
.ctx-public .tl-sound {
    display: inline-flex; align-items: center; gap: 10px;
    min-height: 56px; padding: 0 28px; border: none; border-radius: 999px; cursor: pointer;
    background: var(--secondary); color: var(--foreground);
    font-family: var(--font); font-weight: 800; font-size: 1.1rem;
  }
.ctx-public .tl-sound.is-on { background: var(--primary); color: var(--on-ink); }
.ctx-public .tl-sound[hidden] { display: none; }
.ctx-public .tl-sound .icon { width: 26px; height: 26px; }
.ctx-public [data-sound] .tl-sound__on,
.ctx-public [data-sound].is-on .tl-sound__off { display: none; }
.ctx-public [data-sound].is-on .tl-sound__on { display: inline-block; }
.ctx-public .tl-canvas-wrap:not(.tl-fullscreen) .tl-fs-sound { display: none; }
.ctx-public .tl-canvas-wrap.tl-fullscreen .tl-fs-sound {
    top: calc(env(safe-area-inset-top) + 8px);
    right: calc(max(12px, env(safe-area-inset-right)) + 76px);
    width: 64px; height: 64px;
    background: var(--surface-2); color: var(--ink);
    border: 2px solid var(--line);
  }
.ctx-public .tl-canvas-wrap.tl-fullscreen .tl-fs-sound.is-on { background: var(--primary); color: var(--on-ink); border-color: var(--primary); }
.ctx-public .tl-canvas-wrap.tl-fullscreen .tl-fs-sound .icon { width: 30px; height: 30px; }

/* The Tom Spear Drill: a cassette that plays. The reels turn while the tape runs, and the
   tape winds from the left reel to the right as the reps go by. */
.ctx-public .tl-tape { text-align: center; }
.ctx-public .tl-tape__art { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; }
.ctx-public .tl-tape__shell { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 2; }
.ctx-public .tl-tape__screw { fill: var(--line-strong); }
.ctx-public .tl-tape__label { fill: var(--surface-1); stroke: var(--line); stroke-width: 1.5; }
.ctx-public .tl-tape__title { fill: var(--ink); font-family: var(--font); font-weight: 800; font-size: 20px; letter-spacing: 0.06em; }
.ctx-public .tl-tape__side { fill: var(--ink); font-family: var(--font); font-weight: 800; font-size: 20px; }
.ctx-public .tl-tape__series { fill: var(--ink-2); font-family: var(--font); font-weight: 700; font-size: 11px; letter-spacing: 0.12em; }
.ctx-public .tl-tape__rule { stroke: var(--line-strong); stroke-width: 1; }
.ctx-public .tl-tape__window { fill: var(--surface-0); stroke: var(--line-strong); stroke-width: 1.5; }
.ctx-public .tl-tape__wound { fill: var(--ink-2); transition: r 0.6s ease; }
.ctx-public .tl-tape__foot { fill: var(--surface-1); stroke: var(--line-strong); stroke-width: 1.5; }
.ctx-public .tl-reel { transform-box: fill-box; transform-origin: center; }
.ctx-public .tl-reel circle { fill: var(--surface-1); stroke: var(--ink); stroke-width: 2; }
.ctx-public .tl-reel path { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.ctx-public .tl-tape.is-playing .tl-reel { animation: tl-reel-spin 2.4s linear infinite; }
@keyframes tl-reel-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ctx-public .tl-tape.is-playing .tl-reel { animation: none; }
}
.ctx-public .tl-tape__word {
    margin: var(--space-lg) 0 0; min-height: 1.2em;
    font-family: var(--font); font-weight: 800; line-height: 1.1;
    font-size: clamp(1.5rem, 6vw, 2rem); color: var(--ink-2);
  }
.ctx-public .tl-tape__word.is-call { font-size: clamp(2.5rem, 11vw, 4rem); color: var(--win); }
.ctx-public .tl-tape__meta { margin: 6px 0 var(--space-lg); color: var(--ink-2); font-size: var(--fs-meta); }
.ctx-public .tl-tape__clock { font-variant-numeric: tabular-nums; }
.ctx-public .tl-tape__play,
.ctx-public .tl-play {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 56px; min-width: 220px; padding: 0 28px; border: none; border-radius: 999px; cursor: pointer;
    background: var(--primary); color: var(--on-ink);
    font-family: var(--font); font-weight: 800; font-size: 1.1rem;
  }
.ctx-public .tl-tape__play .icon,
.ctx-public .tl-play .icon { width: 24px; height: 24px; }
/* Green Light, One Look, Off the Move: the goal, the word, the rep count, Start. */
.ctx-public .tl-reps { text-align: center; }
.ctx-public .tl-reps .tl-tape__meta { margin: 6px 0 var(--space-md); }
.ctx-public .tl-reps .tl-style { min-height: 1.4em; }
.ctx-public .tl-play__icon-pause,
.ctx-public .tl-session.is-playing .tl-play__icon-play { display: none; }
.ctx-public .tl-session.is-playing .tl-play__icon-pause { display: inline-block; }
.ctx-public .tl-tape__icon-pause,
.ctx-public .tl-tape.is-playing .tl-tape__icon-play { display: none; }
.ctx-public .tl-tape.is-playing .tl-tape__icon-pause { display: inline-block; }
.ctx-public .tl-tape__calls { margin: 12px 0 0; color: var(--ink-2); font-size: var(--fs-meta); }
.ctx-public .tl-tape__note { margin: 8px 0 0; color: var(--ink-2); font-size: var(--fs-meta); }
.ctx-public .tl-tape__note[hidden] { display: none; }
.ctx-public .tl-tape__quote { margin: var(--space-xl) auto 0; max-width: 520px; }
.ctx-public .tl-tape__quote blockquote {
    margin: 0; font-family: var(--font); font-weight: 700; font-size: 1.15rem; line-height: 1.4; color: var(--ink);
  }
.ctx-public .tl-tape__quote figcaption { margin-top: 8px; color: var(--ink-2); font-size: var(--fs-meta); }

/* Safari on an iPhone: the quiet line that opens the Home Screen guide. */
.ctx-public .tl-home-tip {
    display: block; width: 100%; min-height: 44px; margin: 0; padding: 4px 0;
    background: none; border: 0; cursor: pointer;
    font: inherit; font-size: var(--fs-meta); color: var(--ink-2); text-align: center;
  }
.ctx-public .tl-home-tip[hidden] { display: none; }
.ctx-public .tl-home-tip__how { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }