/* One quiet row; the same family tokens as Listen and Watch. */
.teach-transport { --teach-bg: #f8faf7; --teach-ink: #141914; }
[data-theme="dark"] .teach-transport { --teach-bg: #111711; --teach-ink: #f4f7f1; }
.teach-transport .tp-row { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; align-items: center; gap: 8px; padding: 4px 12px; background: var(--teach-bg); color: var(--teach-ink); }
.teach-transport .tp-row > * { flex: 0 0 auto; }
.teach-transport .tp-row button, .teach-transport select, .course-play-key, .course-play-from { font: 600 15px/1.3 var(--ui); color: var(--teach-ink, var(--ink)); background: var(--teach-bg, var(--bg)); border: 1px solid currentColor; border-radius: 5px; min-height: 44px; padding: 8px 12px; white-space: nowrap; box-shadow: none; }
.teach-transport .tp-row .tp-now { min-width: 90px; max-width: 180px; }
.teach-transport .tp-row [hidden] { display: none !important; }
.teach-status, .course-play-position { font: 500 15px/1.4 var(--ui); white-space: nowrap; }
.course-play-position { max-width: 44ch; overflow: hidden; text-overflow: ellipsis; }
.course-play-key { display: inline-flex; align-items: center; gap: 8px; margin-block: 12px; cursor: pointer; }
.course-play-from { margin: 4px 8px; cursor: pointer; }
.course-play-ring { width: 24px; height: 24px; flex-shrink: 0; transform: rotate(-90deg); fill: none; stroke: currentColor; stroke-width: 3; }
.course-play-ring .ring-progress { stroke: var(--accent); stroke-dasharray: 63; stroke-dashoffset: 63; }
.teach-next { position: fixed; z-index: 15; bottom: 76px; inset-inline: 16px; margin-inline: auto; max-width: 600px; padding: 20px; background: var(--bg); color: var(--ink); border: 2px solid currentColor; font: 600 18px/1.5 var(--ui); }
.teach-next button { font: inherit; margin-inline-start: 16px; min-height: 44px; padding: 8px 14px; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 5px; cursor: pointer; }
.teach-next button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
/* In course play the Next card is the one offer at a lesson's end; the page's own Next lesson link returns on Stop. */
#transport[data-course-play="true"] ~ .cn-next, #unit-transport[data-course-play="true"] ~ .cn-next { display: none; }
.teach-transport button:focus-visible, .teach-transport select:focus-visible, .course-play-key:focus-visible, .course-play-from:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (forced-colors: active) { .course-play-ring .ring-progress { stroke: Highlight; } .teach-transport button { border-color: ButtonText; } }
@media (prefers-reduced-motion: reduce) { .course-play-ring, .teach-transport * { transition: none; animation: none; } }
.solving.teach-question .ex-entry { display: flex !important; flex-wrap: nowrap; overflow-x: auto; }
.solving.teach-question .ex-help { display: flex !important; }
.unit-lesson-head > .course-play-from { margin: 0 0 0 12px; vertical-align: middle; }

#transport.teach-transport:not(.listening-bar) .tp-row button { color: var(--teach-ink); background: var(--teach-bg); border-color: currentColor; font-size: 15px; }
#transport.teach-transport:not(.listening-bar) .tp-row .tp-play { color: var(--teach-bg); background: var(--teach-ink); border-color: var(--teach-ink); }
/* Inside the floating Listen bar its own keys, colours and accent stand; the teaching keys join its one row, which
   scrolls sideways with the edge fade when they do not fit. Its height grows with a scrollbar rather than clip a key. */
#transport.listening-bar.teach-transport .tp-row { overflow-x: auto; overflow-y: hidden; height: auto; min-height: 64px; background: var(--bar-paper); color: inherit; scrollbar-width: thin; }
#transport.listening-bar.teach-transport .tp-row .tp-play { border-color: var(--bar-accent); }
.teach-transport.tp-bar .tp-row .tp-now { flex: none; max-width: none; }
.teach-transport .tp-row .cue-name { max-width: 180px; color: inherit; }
.teach-transport .tp-row small { font-size: 15px; color: inherit; }
.teach-transport .tp-row.teach-more { mask-image: linear-gradient(to right, #000 calc(100% - 16px), transparent); }
@media (min-width: 430px) { .teach-transport.tp-bar .tp-row .tp-now { min-width: 200px; } }
@media (forced-colors: active) { .teach-transport .tp-row.teach-more { mask-image: none; } }

/* During the question, preserve the exercise's own visible input controls. */
.solving.teach-question .ex-answer > :not(.ex-record):not([hidden]) { display: revert !important; }
.solving.teach-question .ex-answer > .ex-row:not([hidden]) { display: flex !important; flex-wrap: nowrap; overflow-x: auto; }

/* The demonstration exposes each reason itself; reading disclosures return on Stop. */
.solving .reading-more { display: none !important; }
.solving .steps .r { display: block !important; }
