/* Hero · the working Today card (today.js).
   Everything here waits for today.js to mark the card .is-live (or adds
   elements only today.js creates), so no-JS and the animation itself see
   the hero exactly as before. Colour roles are Clear's: selection is ink,
   never a hue; the one primary action is the tinted brand green; success is
   that green with a ✓ and words; danger red only for a wrong answer; each
   lane's colour only on its own lane. */

.today .ts-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ts-tex-stage { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; font-size: 16px; }
.ts-tex mjx-container { display: inline-block; }

/* ── Week strip ───────────────────────────────────────────────────
   Clear's two channels: TODAY is the cell's fill (kept from the hero),
   SELECTION is the ink edge. At rest today is both, exactly the finished
   frame's cell. Neither changes the cell's size (border-box). */
.today.is-live .day.is-today { border: 1px solid var(--border); }
/* The selection: one ink ring over the chosen cell that glides between
   cells (page today.js places it). Live only, so the finished frame and
   no-JS keep today's own ink edge. */
.today.is-live .week { position: relative; }
.week__sel { position: absolute; left: 0; top: 0; z-index: 1; box-sizing: border-box; border: 1.5px solid var(--ink); border-radius: 12px; pointer-events: none; opacity: 0; transition: transform 300ms var(--ease-signature), opacity 150ms ease; }
.week__sel.is-instant { transition: none; }
.today.is-live .week__sel { opacity: 1; }
.day__hit { position: absolute; inset: -1px; z-index: 2; margin: 0; padding: 0; border: 0; border-radius: 12px; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.day__hit:disabled { cursor: default; }
.day__hit:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
/* Hover is a deeper step of the cell's own colour, never a fade. Only
   where there is a real pointer: a tapped iPad would keep it stuck on. */
@media (hover: hover) {
  .today.is-live .day:not(.is-today):has(> .day__hit:hover) { background: color-mix(in srgb, var(--ink) 5%, var(--paper)); }
  .today.is-live .day.is-today:has(> .day__hit:hover) { background: color-mix(in srgb, var(--ink) 6%, var(--cell-today)); }
}
/* Today, all done: its dots give way to the same ✓ yesterday wears. */
.day__check--today { display: none; }
.day.is-complete .dot { display: none; }
.day.is-complete .day__check--today { display: block; }

/* ── Beside the title: the way back, or today's done badge ── */
/* A zero-height line box: the link or badge centres on the title's
   x-height and never makes the title's line taller. */
.today__aside { display: inline-flex; align-items: center; height: 0; vertical-align: middle; margin-left: 10px; overflow: visible; }
.today__aside [hidden] { display: none !important; }
.today__badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--success) 50%, transparent); background: var(--paper); color: var(--card-foreground); font: 600 12px/1 var(--font-sans); white-space: nowrap; }
.today__badge svg { width: 13px; height: 13px; fill: none; stroke: var(--success); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* Another day's minutes, in its date line on phones only (the chrome's
   total is hidden there). */

/* ── Rows that open: a real button over the row ─────────────────── */
.task__hit { position: absolute; inset: 0; z-index: 3; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 12px; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.task__hit:disabled { cursor: default; }
.task__hit:focus-visible { outline: 2px solid var(--ring); outline-offset: 0; }
/* Clear's "this opens" chevron (RowOpenChevron): in the row's right
   padding, shown on hover or keyboard focus. Visibility, never a fade. The
   minutes step aside for it. */
.task__go { position: absolute; right: 3px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; fill: none; stroke: var(--muted-foreground); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; pointer-events: none; }
.task .task__min { transition: transform 150ms ease; }
.today.is-live .task:has(> .task__hit:focus-visible) .task__go { visibility: visible; }
.today.is-live .task:has(> .task__hit:focus-visible) .task__min { transform: translateX(-9px); }
/* A light ink step over whatever the row sits on (the Next highlight too). */
@media (hover: hover) {
  .today.is-live .task:has(> .task__hit:hover:not(:disabled)) { background: color-mix(in srgb, var(--ink) 4.5%, transparent); }
  .today.is-live .task:has(> .task__hit:hover:not(:disabled)) .task__go { visibility: visible; }
  .today.is-live .task:has(> .task__hit:hover:not(:disabled)) .task__min { transform: translateX(-9px); }
}

/* On touch screens: one quiet line under Replay, arriving with it. */
.today-try { display: none; }
@media (hover: none) {
  .today-try { display: block; position: absolute; left: 0; right: 0; top: 100%; margin: 6px 0 0; text-align: center; font: 500 13px/18px var(--font-sans); color: var(--muted-foreground); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 300ms ease, visibility 0s linear 300ms; }
  .replay.is-on ~ .today-try { opacity: 1; visibility: visible; transition: opacity 500ms ease 1.2s, visibility 0s linear 1.2s; }
}

/* ── Another day: its plan laid over the list, same rows, same slots ── */
.tasks__day { display: none; position: absolute; inset: 0; padding: inherit; }
.today.is-other .tasks__day { display: block; }
.today.is-other .tasks__list, .today.is-other .today__hl { visibility: hidden !important; }
/* Switching days: the plan slides in from the side you moved toward
   (--dx, set by today.js) and the title, date line and total fade over.
   Mouse screens only: on iPhone and iPad, text animating inside the scaled
   card snapped up or down a pixel as each animation ended, so touch screens
   swap the plan at once and let the gliding ring carry the motion. */
@media (hover: hover) and (pointer: fine) {
  /* fill-mode backwards, never both: a finished animation must not pin the
     rows, highlight or date over the styles hero.js sets on Replay. */
  .tasks__day .task, .tasks__list.is-back .task { animation: ts-slide 260ms var(--ease-signature) backwards; }
  .tasks__list.is-back .task:nth-child(2) { animation-delay: 30ms; }
  .tasks__list.is-back .task:nth-child(3) { animation-delay: 60ms; }
  .today__hl.is-back { animation: ts-fade 260ms ease backwards; }
  .today__title.is-swap, .today__date.is-swap, .today__total.is-swap { animation: ts-fade 220ms ease backwards; }
}
@keyframes ts-slide { from { opacity: 0; transform: translateX(var(--dx, 18px)); } to { opacity: 1; transform: none; } }
@keyframes ts-fade { from { opacity: 0; } to { opacity: 1; } }
.tasks__day .task:nth-child(2) { animation-delay: 30ms; }
.tasks__day .task:nth-child(3) { animation-delay: 60ms; }
.tasks__day.is-still .task { animation: none; }
/* A future day cannot be worked yet: no box at all (a box reads as "tick
   me"), and its rows close up to the left, lane dot first. */
.tasks__day .task.is-future { grid-template-columns: 10px 1fr 56px; }
.tasks__day .task.is-future .task__check { display: none; }
@media (max-width: 760px) { .tasks__day .task.is-future { grid-template-columns: 8px 1fr; } }

/* ── The session panel ─────────────────────────────────────────────
   Laid over everything under the chrome. The Today body keeps its place
   underneath (hidden), so the card keeps its size; a phone may grow it
   (today.js sets min-height). A short, calm swap: the body goes in 150 ms,
   the session rises 6 px into place. Closed, it takes no clicks. */
.today__head, .tasks { transition: opacity 220ms ease 70ms; }
.today.is-session .today__head, .today.is-session .tasks { opacity: 0; visibility: hidden; transition: opacity 150ms ease, visibility 0s linear 150ms; }
.ts { position: absolute; left: 0; right: 0; bottom: 0; top: var(--ts-top, 46px); z-index: 3; display: flex; flex-direction: column; color: var(--card-foreground); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 150ms ease, transform 200ms ease, visibility 0s linear 200ms; }
.today:not(.is-session) .ts { pointer-events: none; }
.today.is-session .ts { opacity: 1; visibility: visible; transform: none; transition: opacity 220ms ease 70ms, transform 320ms var(--ease-signature) 70ms, visibility 0s; }
.today.ts-instant .ts, .today.ts-instant .today__head, .today.ts-instant .tasks { transition: none !important; }

/* Top bar: Clear's SessionTopBar anatomy. The way out (chevron + words,
   unboxed) on the left, the title or counter in the middle, tools on the
   right, an optional 2 px progress rail in the lane colour along the edge.
   The two sides share the room equally, so the title centres on the card
   whenever the way out is short enough (a phone shows its short word). */
.ts-bar { position: relative; display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(0, 1fr); align-items: center; gap: 12px; min-height: 44px; padding: 0 16px; border-bottom: 1px solid var(--rule); }
.ts-back { margin-left: -8px; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px 0 5px; border: 0; border-radius: 8px; background: none; color: var(--muted-foreground); font: 500 14px/20px var(--font-sans); white-space: nowrap; cursor: pointer; transition: background-color 150ms ease, color 150ms ease; }
.ts-back:focus-visible { outline: 2px solid var(--ring); outline-offset: 0; }
.ts-back svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ts-back__short, .ts-title__short { display: none; }
.ts-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font: 500 14px/20px var(--font-sans); letter-spacing: 0; color: var(--card-foreground); outline: none; }
.ts-rail { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--rule); }
.ts-rail[hidden] { display: none; }
.ts-rail i { display: block; height: 100%; width: 0; background: var(--tone); transition: width 300ms var(--ease-signature); }

.ts-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; padding: clamp(10px, 1.7vh, 16px) 20px clamp(12px, 1.9vh, 18px); }
.ts-step { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: ts-rise 240ms var(--ease-signature) both; }
@keyframes ts-rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Buttons inside the card keep the card's focus style: a 2 px ring. */
.ts .btn:focus-visible { box-shadow: none; outline: 2px solid var(--ring); outline-offset: 2px; }
.ts-foot { margin-top: auto; display: flex; align-items: center; gap: 14px; min-height: 40px; }
.ts-foot .btn { min-height: 40px; }

/* ── Lesson: the player beside its details ──────────────────────── */
.ts-lesson { flex-direction: row; align-items: stretch; gap: 18px; }
.ts-vid { position: relative; flex: none; display: block; height: auto; aspect-ratio: 16 / 9; margin: 0; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--vid-bg); color: inherit; font: inherit; text-align: left; cursor: pointer; container-type: inline-size; }
.ts-vid:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.ts-vid .chalk { left: 7%; top: 13%; font-size: 22px; font-size: clamp(18px, 7cqw, 30px); }
.ts-vid .chalk__note { margin-top: 6px; font-size: clamp(16px, 5.4cqw, 23px); }
.ts-vid .play { right: 7%; width: 48px; height: 48px; margin-top: -30px; transition: transform 200ms var(--ease-signature); }
.ts-vid .play::after { left: 19px; top: 15px; }
/* Playing: the triangle becomes two bars. */
.ts-vid.is-playing .play::after { left: 17px; top: 16px; width: 14px; height: 16px; border-style: solid; border-width: 0 4.5px; border-color: transparent var(--vid-play-fg); }
.ts-vid .vid__bar i { width: 0; }
.ts-lesson__info { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; padding-top: 2px; }
.ts-lesson__title { font: 650 18px/23px var(--font-sans); letter-spacing: -0.012em; color: var(--ink); }
.ts-lesson__meta { margin-top: 3px; font-size: 13.5px; line-height: 18px; color: var(--muted-foreground); }
/* Mark as complete: the Learn lane's subtle tint, a pill (Clear's
   LESSON_COMPLETE_CTA), with Clear's lesson box that ticks. On a past day
   it is a plain statement in the same shape, not a control. */
.ts-complete { margin-top: auto; display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 16px 0 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--learn) 28%, transparent); background: color-mix(in srgb, var(--learn) 12%, var(--paper)); color: var(--card-foreground); font: 600 14px/1 var(--font-sans); white-space: nowrap; cursor: pointer; transition: background-color 150ms ease; }
.ts-complete:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.ts-complete.is-static { min-height: 32px; padding: 0; border-color: transparent; background: none; font-weight: 500; color: var(--muted-foreground); cursor: default; }
.ts-complete__box { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 5px; border: 2px solid var(--input-border); background: var(--paper); }
.ts-complete__box svg { width: 11px; height: 11px; fill: none; stroke: var(--muted-foreground); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transform: scale(0); transition: transform 220ms var(--ease-signature); }
.ts-complete.is-on .ts-complete__box svg, .ts-complete.is-static .ts-complete__box svg { transform: none; }

/* ── Practice: the problem, its four choices, Check answer ───────── */
.ts-mc__form { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: clamp(8px, 1.3vh, 12px); }
.ts-stem { font-family: var(--font-reading); font-size: 15.5px; line-height: 1.45; color: var(--ink); text-wrap: pretty; }
.ts-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ts-choice { position: relative; display: flex; align-items: center; gap: 10px; height: clamp(36px, 4.6vh, 42px); padding: 0 12px 0 8px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--paper); color: var(--card-foreground); font-family: var(--font-reading); font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease; }
.ts-choice input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.ts-choice:has(input:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }
.ts-letter { display: grid; place-items: center; flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--muted-foreground) 45%, transparent); font: 600 12px/1 var(--font-sans); color: var(--muted-foreground); }
.ts-mark { display: flex; margin-left: auto; }
.ts-mark svg, .ts-verdict svg, .ts-done__list svg { width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Chosen: ink, three ways at once (Clear #6325): the full ink edge, the
   ink-mixed fill, the solid ink letter disc. */
:root, .theme-light { --sel-fill: color-mix(in srgb, var(--ink) 16%, var(--paper)); }
.theme-dark { --sel-fill: color-mix(in srgb, var(--ink) 14%, var(--paper)); }
.ts-choice.is-picked { border-color: var(--ink); background: var(--sel-fill); }
.ts-choice.is-picked .ts-letter { background: var(--ink); box-shadow: none; color: var(--paper); }
/* Graded: green with ✓ for the answer, red with ✕ for a wrong pick, the
   rest quiet (muted words, never a fade). The letter takes the verdict's
   colour too, in a half-strength ring, as Clear's does. */
.ts-choice.is-correct, .ts-choice.is-wrong, .ts-choice.is-other { cursor: default; }
.ts-choice.is-correct { border-color: var(--success); background: color-mix(in srgb, var(--success) 15%, var(--paper)); }
.ts-choice.is-correct .ts-letter { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--success) 50%, transparent); color: var(--success); }
.ts-choice.is-correct .ts-mark { color: var(--success); }
.ts-choice.is-wrong { border-color: color-mix(in srgb, var(--danger) 60%, transparent); background: color-mix(in srgb, var(--danger) 10%, var(--paper)); }
.ts-choice.is-wrong .ts-letter { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); }
.ts-choice.is-wrong .ts-mark { color: var(--danger); }
.ts-choice.is-other { color: var(--muted-foreground); }
/* Check answer and Next are one button in one slot (Next replaces Check
   answer when the answer is graded), so the primary action never moves.
   The verdict takes the room beside it. */
.ts-result { flex: 1; min-width: 0; }
.ts-act { flex-shrink: 0; min-width: 148px; margin-left: auto; }
.ts-verdict { display: flex; align-items: center; gap: 6px; font: 600 14px/19px var(--font-sans); }
.ts-verdict.is-right { color: var(--success); }
.ts-verdict.is-wrong { color: var(--danger); }
.ts-why { margin-top: 1px; padding-left: 23px; font-size: 13.5px; line-height: 19px; color: var(--muted-foreground); }
.ts-why .ts-tex { color: var(--card-foreground); }

/* Results: Clear's are figure-first, correct over worked, labelled. */
.ts-done { align-items: center; justify-content: center; gap: 8px; text-align: center; }
.ts-done__eyebrow { font: 600 11px/14px var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-foreground); }
.ts-done__stat { display: flex; flex-direction: column; align-items: center; }
.ts-done__num { font: 700 28px/32px var(--font-sans); letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ts-done__label { margin-top: 1px; font-size: 13px; line-height: 17px; color: var(--muted-foreground); }
.ts-done__list { display: flex; gap: 16px; margin-top: 2px; }
.ts-done__list li { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--muted-foreground); }
.ts-done__list li.is-right svg { color: var(--success); }
.ts-done__list li.is-wrong svg { color: var(--danger); }
.ts-done .btn { margin-top: 6px; min-width: 160px; min-height: 40px; }

/* ── Flashcards: the card, then Again / Hard / Good / Easy ───────── */
.ts-fc { gap: clamp(8px, 1.3vh, 12px); }
.ts-card { flex: 1; min-height: 104px; display: flex; flex-direction: column; padding: 10px 14px 12px; border: 1px solid var(--hair); border-radius: var(--radius-xl); background: var(--paper); box-shadow: 0 1px 2px rgb(var(--shade) / calc(0.05 * var(--shade-k))), var(--sheen); cursor: pointer; }
.ts-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 22px; }
.ts-card__face { font: 600 11px/14px var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-foreground); }
.ts-card__hint { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--hair); font: 600 11px/1 var(--font-sans); letter-spacing: 0.04em; color: var(--muted-foreground); }
.ts-card__hint .ts-narrow { display: none; }
.ts-card__text { flex: 1; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 6px; padding: 6px 4px 2px; font-family: var(--font-reading); font-size: 18px; line-height: 1.5; text-align: center; color: var(--ink); outline: none; }
.ts-card.is-back .ts-card__text { font-size: 22px; }
.ts-rates { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ts-rate { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 44px; margin: 0; padding: 0 6px; border-radius: var(--radius-lg); border: 1px solid color-mix(in srgb, var(--rt) 32%, transparent); background: color-mix(in srgb, var(--rt) 10%, var(--paper)); color: var(--card-foreground); font: 600 14px/1 var(--font-sans); cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease; }
.ts-rate:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.ts-rate.is-picked { border-color: var(--rt); background: color-mix(in srgb, var(--rt) 24%, var(--paper)); }
.ts-rate__int { font-size: 12px; font-weight: 500; color: var(--on-tint-muted); font-variant-numeric: tabular-nums; }
.ts-rate__key { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--on-tint-muted); }
.ts-show { width: 100%; }

/* Hover: a colour step, only where there is a real pointer (a tapped iPad
   would keep it stuck on). Graded choices keep their edges. */
@media (hover: hover) {
    .ts-vid:hover .play { transform: scale(1.06); }
  button.ts-complete:hover { background: color-mix(in srgb, var(--learn) 20%, var(--paper)); }
  .ts-rate:hover { background: color-mix(in srgb, var(--rt) 20%, var(--paper)); }
  .ts-choice:not(.is-picked, .is-correct, .is-wrong, .is-other):hover { border-color: color-mix(in srgb, var(--ink) 45%, var(--border)); }
}

/* ── Tablet and short desktops: a touch tighter ── */
@media (max-height: 820px) and (min-width: 761px) {
  .ts-bar { min-height: 42px; }
  .ts-stem { font-size: 15px; line-height: 1.4; }
}

/* ── Below Clear's 768 px: the shorter counter and flip hint ── */
@media (max-width: 767px) {
  .ts-title__full, .ts-card__hint .ts-wide { display: none; }
  .ts-title__short, .ts-card__hint .ts-narrow { display: inline; }
}
/* ── Below Clear's sm (640 px): the way out shows its short word ── */
@media (max-width: 639px) {
  .ts-back__full { display: none; }
  .ts-back__short { display: inline; }
}

/* ── Phones: the card may grow ── */
@media (max-width: 760px) {
  .ts-bar { padding: 0 12px; }
  .ts-body { padding: 12px 14px 14px; }
  /* Check answer full width for the thumb; once graded, the verdict and
     its working sit above and Next takes the same full-width slot. */
  .ts-mc .ts-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .ts-mc .ts-result:empty { display: none; }
  .ts-mc .ts-act { width: 100%; margin-left: 0; }
  .ts-choice { height: 44px; }
  .ts-foot .btn { min-height: 44px; }
  .ts-rate { min-height: 48px; }
  .ts-rate__key { display: none; }
  .ts-done { padding: 8px 0; }
}
/* Below Clear's sm (640 px) the player sits above its details, no wider
   than a comfortable 400 px (so a wide phone or a narrow window does not
   double the card). From 640 px the wide layout (player beside its
   details) fits, with room for the lesson's name on one line. */
@media (max-width: 639px) {
  .ts-lesson { flex-direction: column; gap: 12px; width: 100%; max-width: 400px; margin: 0 auto; }
  .ts-vid { width: 100%; }
  .ts-lesson__info { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; padding-top: 0; }
  .ts-lesson__title, .ts-lesson__meta { grid-column: 1; }
  .ts-lesson__title { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 20px; }
  .ts-complete { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
}
/* The smallest phones: the pill goes under the details rather than
   squeezing the lesson's name. */
@media (max-width: 379px) {
  .ts-lesson__info { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .ts-complete { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 10px; }
}

/* Reduced motion: no transitions at all, on anything inside the card. The
   brand sheet's catch-all (a 0.01 ms transition on everything) would
   otherwise make visibility arrive a frame late at each level, and focus
   sent into a session (or back to its row) would be refused. */
@media (prefers-reduced-motion: reduce) {
  .ts, .today.is-session .ts, .today__head, .tasks, .today.is-session .today__head, .today.is-session .tasks,
  .today .ts *, .today .tasks *, .today .today__head * { transition: none !important; }
  .ts, .today.is-session .ts { transform: none; }
  .ts-step, .tasks__day .task, .tasks__list.is-back .task, .today__hl.is-back, .today__title.is-swap, .today__date.is-swap, .today__total.is-swap { animation: none !important; }
  .week__sel { transition: none; }
  .today-try, .replay.is-on ~ .today-try { transition: none !important; }
}
