/* Everyday French — Series player + hub styles.
   Reuses the --ef-* brand palette defined in podcast.css (enqueued as a dep). */

/* ---- Landing (on the /serie/<slug> page) --------------------------------- */
.ef-series-landing {
  max-width: 640px;
  margin: 1.5rem auto;
  padding: 2rem;
  background: var(--ef-bg-soft, #FFFBF9);
  border: 1px solid var(--ef-border-light, #F0E4E0);
  border-radius: 18px;
  text-align: center;
}
.ef-series-landing__level {
  display: inline-block;
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ef-primary, #733428);
  background: var(--ef-secondary, #FFF0EE);
  border: 1px solid var(--ef-tint, #F6DED7);
  padding: .25rem .7rem;
  border-radius: 999px;
  margin-bottom: .8rem;
}
.ef-series-landing__title { margin: .2rem 0 .6rem; color: var(--ef-primary-dark, #4a2119); }
.ef-series-landing__intro { color: var(--ef-text, #4a3b35); line-height: 1.6; margin: 0 auto 1rem; max-width: 48ch; }
.ef-series-landing__count { color: var(--ef-text-muted, #8a7a73); font-size: .9rem; margin: 0 0 1.2rem; }
.ef-series-teacher {
  margin: 0 auto 1.2rem;
  max-width: 420px;
  padding: .7rem .9rem;
  border: 1px dashed var(--ef-tint, #F6DED7);
  border-radius: 12px;
  font-size: .88rem;
  color: var(--ef-text, #4a3b35);
}
.ef-series-teacher__private { margin: 0 0 .5rem; }
.ef-series-teacher__private:last-child { margin: 0; }
.ef-series-teacher__with { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center; }
.ef-series-teacher__with select { max-width: 100%; }
.ef-series-landing__start,
.ef-pl__btn {
  appearance: none;
  border: none;
  background: var(--ef-primary, #733428);
  color: var(--on-fill, #fff);
  font-size: 1.02rem;
  font-weight: 600;
  padding: .85rem 1.8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity .15s, transform .05s;
}
.ef-series-landing__start:hover, .ef-pl__btn:hover { opacity: .92; }
.ef-pl__btn:active { transform: translateY(1px); }
.ef-pl__btn:disabled { opacity: .4; cursor: default; }
.ef-pl__btn--ghost { background: transparent; color: var(--ef-primary, #733428); border: 1.5px solid var(--ef-tint-strong, #EFC9BE); }

/* Back-link to the episode a series came from */
.ef-series-landing__from { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--ef-border-light, #F0E4E0); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center; }
.ef-series-landing__from-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ef-text-muted, #8a7a73); }
.ef-series-landing__ep {
  font-size: .85rem; text-decoration: none; color: var(--ef-primary, #733428);
  background: var(--ef-secondary, #FFF0EE); border: 1px solid var(--ef-tint, #F6DED7);
  padding: .25rem .8rem; border-radius: 999px; transition: background .12s;
}
.ef-series-landing__ep:hover { background: var(--ef-tint, #F6DED7); }

/* ---- "Now practise" — appended to an episode post ------------------------- */
.ef-next {
  margin: 2.5rem 0 1rem; padding: 1.5rem; border-radius: 18px;
  background: var(--ef-bg-soft, #FFFBF9); border: 1px solid var(--ef-border-light, #F0E4E0);
}
.ef-next__kicker { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ef-primary, #733428); font-weight: 700; margin: 0 0 .3rem; }
.ef-next__lede { color: var(--ef-text-subtle, #6b5b54); margin: 0 0 1.1rem; font-size: .98rem; }
.ef-next__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .7rem; }
.ef-next__card {
  display: flex; align-items: center; gap: .8rem; text-decoration: none;
  padding: .9rem 1rem; border-radius: 13px; background: var(--surface, #fff);
  border: 1px solid var(--ef-border-light, #F0E4E0); color: var(--ef-text, #4a3b35);
  transition: border-color .15s, transform .06s, box-shadow .15s;
}
.ef-next__card:hover { border-color: var(--ef-tint-strong, #EFC9BE); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(115,52,40,.08); }
.ef-next__card--flashcards { background: var(--ef-secondary, #FFF0EE); }
.ef-next__ic { font-size: 1.4rem; flex: 0 0 auto; }
.ef-next__body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.ef-next__title { font-weight: 600; color: var(--ef-primary-dark, #4a2119); line-height: 1.25; }
.ef-next__meta { font-size: .8rem; color: var(--ef-text-muted, #8a7a73); display: flex; align-items: center; gap: .4rem; }
/* --on-deep, not --on-fill: the level modifiers below override the background
   with fixed dark colours, so this label must stay light in both themes. */
.ef-next__lv { font-size: .68rem; font-weight: 700; color: var(--on-deep, #fff); background: var(--ef-primary, #733428); padding: .1rem .45rem; border-radius: 999px; }
.ef-next__lv--A0, .ef-next__lv--A1 { background: #1d7a4c; }
.ef-next__lv--A2 { background: #4f6f24; }
.ef-next__lv--B1 { background: #8a6414; }
.ef-next__lv--B2 { background: #b03a09; }
.ef-next__lv--C1 { background: #8f3826; }

/* ---- Inline host (all questions visible in an article) -------------------
   Reuses the ef-pl__ control styles (options, chips, blanks, match…); only the
   card/feedback layout is new. */
.ef-exercises { margin: 1.5rem 0; }
.ef-ex__list { display: flex; flex-direction: column; gap: 1rem; }
.ef-ex__q {
  background: var(--ef-bg-soft, #FFFBF9); border: 1px solid var(--ef-border-light, #F0E4E0);
  border-radius: 16px; padding: 1.2rem 1.3rem;
  display: flex; flex-direction: column; gap: .8rem;
  transition: border-color .15s;
}
.ef-ex__q.is-ok { border-color: var(--ef-correct-border, #16a34a); }
.ef-ex__q.is-no { border-color: var(--ef-wrong-border, #ef4444); }
.ef-ex__q-head { display: flex; align-items: baseline; gap: .6rem; }
.ef-ex__q-num {
  flex: 0 0 auto; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--ef-secondary, #FFF0EE); color: var(--ef-primary, #733428);
  font-size: .8rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}
.ef-ex__q-instr { font-weight: 600; color: var(--ef-primary-dark, #4a2119); }
.ef-ex__q-gloss { color: var(--ef-text-muted, #8a7a73); font-size: .92rem; margin: 0; }
.ef-ex__fb { font-size: .92rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline; padding: .5rem .7rem; border-radius: 10px; }
.ef-ex__fb.is-ok { background: var(--ef-correct-bg, #dcfce7); color: var(--ef-correct-text, #15803d); }
.ef-ex__fb.is-no { background: var(--ef-wrong-bg, #fee2e2); color: var(--ef-wrong-text, #b91c1c); }
.ef-ex__fb-ans { font-weight: 600; }
.ef-ex__fb-exp { opacity: .9; }
.ef-ex__foot { display: flex; align-items: center; gap: 1rem; margin-top: 1.2rem; flex-wrap: wrap; }
.ef-ex__submit, .ef-ex__retry {
  appearance: none; border: none; cursor: pointer; font: inherit; font-weight: 600;
  background: var(--ef-primary, #733428); color: var(--on-fill, #fff); padding: .8rem 1.8rem; border-radius: 999px;
}
.ef-ex__retry { background: transparent; color: var(--ef-primary, #733428); border: 1.5px solid var(--ef-tint-strong, #EFC9BE); }
.ef-ex__submit:hover, .ef-ex__retry:hover { opacity: .92; }
.ef-ex__score { font-family: var(--serif, Georgia, serif); font-size: 1.3rem; font-weight: 600; color: var(--ef-primary-dark, #4a2119); }
/* "Show 5 more questions" — outlined, so it reads as the quieter of the two
   next steps beside a solid Check, and never competes with it for the eye. */
.ef-ex__more {
  appearance: none; cursor: pointer; font: inherit; font-weight: 600;
  background: transparent; color: var(--ef-primary, #733428);
  border: 1.5px dashed var(--ef-tint-strong, #EFC9BE);
  padding: .8rem 1.8rem; border-radius: 999px;
}
.ef-ex__more:hover { border-style: solid; opacity: .92; }
.ef-ex__alldone { margin: 0; font-size: .95rem; color: var(--ink-2, #7a5f54); font-style: italic; }

/* ---- Full-screen player overlay ------------------------------------------ */
.ef-pl {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; flex-direction: column;
  background: var(--surface, #fff);
  font-family: inherit;
  color: var(--ef-text, #4a3b35);
  /* Same values as .ef-hub below — the recap's closing page reuses the hub's
     .ef-hub__level badge outside the hub itself, so it needs these in scope. */
  --a0: #1d7a4c; --a1: #1d7a4c; --a2: #4f6f24; --b1: #8a6414; --b2: #b03a09; --c1: #8f3826;
}
.ef-pl__top { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; max-width: 720px; width: 100%; margin: 0 auto; box-sizing: border-box; }
/* Hidden for the whole recap — none of this (close button, progress rail)
   still means anything once the quiz is over; see the recap section below. */
.ef-pl__top[hidden] { display: none; }
.ef-pl__close {
  appearance: none; border: none; background: none; font-size: 1.4rem; line-height: 1;
  color: var(--ef-text-muted, #8a7a73); cursor: pointer; padding: .2rem .4rem; border-radius: 8px;
}
.ef-pl__close:hover { background: var(--ef-secondary, #FFF0EE); color: var(--ef-primary, #733428); }
.ef-pl__progress { flex: 1; height: 12px; background: var(--ef-secondary, #FFF0EE); border-radius: 999px; overflow: hidden; }
.ef-pl__progress-bar { display: block; height: 100%; width: 0; background: var(--ef-correct-border, #16a34a); border-radius: 999px; transition: width .3s ease; }
.ef-pl__score-live { flex: 0 0 auto; font-weight: 700; font-size: .95rem; color: var(--ef-correct-text, #15803d); font-variant-numeric: tabular-nums; min-width: 3.5em; text-align: right; }

/* The stage is [optional document] + [questions]. On a phone they stack, the
   document on top and foldable; from 900px they sit side by side so the text
   stays in view while the student answers — see the media query at the end. */
.ef-pl__stage {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  width: 100%; max-width: 720px; margin: 0 auto; box-sizing: border-box;
}
.ef-pl__body {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  width: 100%; min-width: 0; box-sizing: border-box;
  padding: 1rem 1.2rem 2rem;
  display: flex; flex-direction: column; gap: 1rem;
}

/* ---- the document a page is built around --------------------------------- */
.ef-pl__media {
  flex: 0 0 auto; min-height: 0; box-sizing: border-box;
  display: flex; flex-direction: column;
  background: var(--surface, #fff);
  border-bottom: 1px solid var(--ef-border-light, #F0E4E0);
}
.ef-pl__media[hidden] { display: none; }
/* Phone only: fold the document down to its title so the questions get the
   screen, and bring it back without losing a single answer. */
.ef-pl__media-toggle {
  appearance: none; border: none; background: none; font: inherit; text-align: left;
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  padding: .6rem 1.2rem; cursor: pointer;
  font-size: .9rem; font-weight: 700; color: var(--ef-primary, #733428);
}
.ef-pl__media-peek { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ef-pl__media-act { flex: 0 0 auto; font-weight: 600; text-decoration: underline; }
.ef-pl__media-inner { overflow-y: auto; max-height: 38vh; padding: 0 1.2rem .9rem; }
.ef-pl__media.is-collapsed .ef-pl__media-inner { display: none; }
.ef-pl__media-title { margin: 0 0 .5rem; font-size: 1rem; font-weight: 700; color: var(--ef-primary-dark, #4a2119); }
/* Redundant on a phone — the fold button already carries the title. */
.ef-pl__media:not(.ef-pl__media--strip) .ef-pl__media-title { display: none; }
/* A clip or an episode: a transport bar, not a document. Full width above the
   questions, no fold, no column of its own. */
.ef-pl__media--strip .ef-pl__media-inner { max-height: none; overflow: visible; padding: .7rem 1.2rem; }
.ef-pl__media-text { white-space: pre-wrap; line-height: 1.75; font-size: 1.05rem; }
.ef-pl__media-img { display: block; max-width: 100%; height: auto; border-radius: 12px; }
.ef-pl__media-frame { display: block; border: 0; border-radius: 10px; }
.ef-pl__media-audio { display: flex; }
.ef-pl__media-frame--video { width: 100%; height: auto; aspect-ratio: 16 / 9; }
/* A page can show the exercise's document and the question's own. */
.ef-pl__media-inner > * + * { margin-top: .9rem; }
/* On a phone the picture must fit the folded-open pane whole, not scroll in it. */
@media (max-width: 899px) {
  .ef-pl__media-img { max-height: 32vh; width: auto; margin: 0 auto; }
}

/* ---- one question inside a page ------------------------------------------ */
.ef-pl__q { display: flex; flex-direction: column; gap: .7rem; }
/* A rule between neighbours: on a page of several, the eye needs to know where
   one question stops and the next begins. */
.ef-pl__q--multi + .ef-pl__q--multi { border-top: 1px solid var(--ef-border-light, #F0E4E0); padding-top: 1.1rem; }
.ef-pl__q-head { display: flex; align-items: baseline; gap: .6rem; }
.ef-pl__q-head .ef-pl__instr { margin: 0; }
/* Sharing the page means sharing the room: the instruction stops being the
   headline of the screen and becomes the label of one exercise on it. */
.ef-pl__q--multi .ef-pl__instr { font-size: 1.08rem; }
.ef-pl__q-n {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.8em; height: 1.8em; border-radius: 999px;
  background: var(--ef-secondary, #FFF0EE); color: var(--ef-primary, #733428);
  font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums;
}
.ef-pl__instr { font-size: 1.35rem; font-weight: 600; color: var(--ef-primary-dark, #4a2119); margin: .5rem 0 0; line-height: 1.35; }
.ef-pl__gloss { color: var(--ef-text-muted, #8a7a73); font-size: .95rem; margin: 0; }
.ef-pl__sentence { font-size: 1.25rem; line-height: 1.9; margin: .5rem 0; }

/* option buttons (mcq / true-false) */
.ef-pl__opts { display: flex; flex-direction: column; gap: .7rem; }
.ef-pl__opts--tf { flex-direction: row; }
.ef-pl__opts--tf .ef-pl__opt { flex: 1; text-align: center; }
.ef-pl__opt {
  appearance: none; text-align: left;
  border: 2px solid var(--ef-border, #E5D4CE); background: var(--surface, #fff);
  color: var(--ef-text, #4a3b35); font-size: 1.05rem;
  padding: .85rem 1.1rem; border-radius: 14px; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.ef-pl__opt:hover:not(:disabled) { border-color: var(--ef-tint-strong, #EFC9BE); }
/* Pin the text colour on the selected state: the host theme styles bare
   <button>, and without this the label could inherit white onto our light
   tint. Same reason for .ef-pl__chip / .ef-pl__match-item below. */
.ef-pl__opt.is-sel { border-color: var(--ef-primary, #733428); background: var(--ef-secondary, #FFF0EE); color: var(--ef-primary-dark, #4a2119); font-weight: 600; }
.ef-pl__opt.is-correct { border-color: var(--ef-correct-border, #16a34a); background: var(--ef-correct-bg, #dcfce7); color: var(--ef-correct-text, #15803d); }
.ef-pl__opt.is-wrong { border-color: var(--ef-wrong-border, #ef4444); background: var(--ef-wrong-bg, #fee2e2); color: var(--ef-wrong-text, #b91c1c); }

/* blank + chips (fillblank / reorder) */
.ef-pl__blank {
  display: inline-block; min-width: 3.2em; padding: 0 .35em;
  border-bottom: 2px dashed var(--ef-tint-strong, #EFC9BE);
  text-align: center; font-weight: 600; color: var(--ef-primary, #733428);
}
.ef-pl__blank.is-filled { border-bottom-style: solid; }
.ef-pl__blank.is-correct { color: var(--ef-correct-text, #15803d); border-color: var(--ef-correct-border, #16a34a); }
.ef-pl__blank.is-wrong { color: var(--ef-wrong-text, #b91c1c); border-color: var(--ef-wrong-border, #ef4444); }
.ef-pl__bank, .ef-pl__slot { display: flex; flex-wrap: wrap; gap: .55rem; }
.ef-pl__slot { min-height: 3rem; padding: .5rem; border: 2px dashed var(--ef-border, #E5D4CE); border-radius: 12px; }
.ef-pl__chip {
  appearance: none; border: 2px solid var(--ef-border, #E5D4CE); background: var(--surface, #fff);
  color: var(--ef-text, #4a3b35); font-size: 1.02rem; padding: .55rem .9rem;
  border-radius: 12px; cursor: pointer;
}
.ef-pl__chip:hover:not(:disabled) { border-color: var(--ef-tint-strong, #EFC9BE); }
.ef-pl__chip.is-sel { border-color: var(--ef-primary, #733428); background: var(--ef-secondary, #FFF0EE); color: var(--ef-primary-dark, #4a2119); font-weight: 600; }
.ef-pl__chip.is-correct { border-color: var(--ef-correct-border, #16a34a); background: var(--ef-correct-bg, #dcfce7); }
.ef-pl__chip.is-wrong { border-color: var(--ef-wrong-border, #ef4444); background: var(--ef-wrong-bg, #fee2e2); }
.ef-pl__answer { color: var(--ef-correct-text, #15803d); font-weight: 600; margin: .3rem 0 0; }

/* classify — the worksheet as a table: the word on the left, one tick in the
   column it belongs to. The word column is pinned so four columns stay usable
   on a phone by scrolling sideways instead of squeezing every word to two
   letters per line. */
.ef-pl__classify { display: flex; flex-direction: column; gap: .7rem; }
.ef-pl__tip { color: var(--ef-text-muted, #8a7a73); font-size: .93rem; margin: 0; }
/* Scrolls in BOTH directions, and that is deliberate: `overflow-x: auto` alone
   makes this box the containing block for the sticky header, which then has no
   vertical scroll to stick against and simply leaves with the page. Owning the
   vertical scroll too is what keeps the column titles on screen next to the
   row you are ticking. */
.ef-pl__classify-scroll { max-height: 62vh; overflow: auto; -webkit-overflow-scrolling: touch; }
.ef-pl__classify-table {
  /* `auto`, not `fixed`: what goes in the first column is sometimes a word
     ("un lapin") and sometimes a whole sentence ("Vous n'auriez pas la même
     veste en noir ?"). Auto layout sizes it to its content between the min and
     max below, instead of wrapping every sentence into a 9.5rem ribbon. */
  table-layout: auto;
  border-collapse: separate; border-spacing: 0; width: 100%;
  /* the pinned word column + at least a thumb's width per choice */
  min-width: calc(9.5rem + var(--ef-cols, 2) * 5.5rem);
}
/* The header stays put while the page scrolls: on a phone, four columns mean
   scrolling sideways mid-table, and a tick is meaningless if you can no longer
   see which column you are ticking. */
.ef-pl__classify-th, .ef-pl__classify-corner {
  position: sticky; top: 0; z-index: 2;
  font-size: .85rem; font-weight: 600; text-align: center; padding: .35rem .5rem;
  color: var(--ef-primary-dark, #4a2119);
  background: var(--surface, #fff);
  border-bottom: 2px solid var(--ef-border, #E5D4CE);
}
.ef-pl__classify-corner {
  text-align: left; font-weight: 500; font-size: .78rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ef-text-muted, #8a7a73);
}
/* Pinned first column. The background is opaque so the words don't show
   through the cells scrolling under them. */
.ef-pl__classify-corner, .ef-pl__classify-item {
  position: sticky; left: 0; z-index: 1;
  min-width: 9.5rem; max-width: 24rem;
  background: var(--surface, #fff);
  /* the edge the cells slide under, so the pinned column reads as pinned */
  box-shadow: 1px 0 0 var(--ef-border, #E5D4CE);
}
/* the corner is pinned in both directions, so it has to win over both */
.ef-pl__classify-corner { z-index: 3; }
.ef-pl__classify-item {
  text-align: left; font-weight: 500; font-size: 1rem; padding: .45rem .6rem .45rem 0;
  color: var(--ef-text, #4a3b35);
  white-space: normal; overflow-wrap: anywhere; /* a long word wraps, it doesn't widen the column */
  border-bottom: 1px solid var(--ef-border, #E5D4CE);
}
.ef-pl__classify-cell { padding: .2rem .25rem; border-bottom: 1px solid var(--ef-border, #E5D4CE); }
/* The whole cell is the hit area (a thumb, not a 20px circle), but what the
   student SEES is an ordinary radio — or a checkbox when several columns can
   be right. */
.ef-pl__classify-tick {
  appearance: none; width: 100%; min-height: 2.6rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid transparent; border-radius: 10px; background: none;
  transition: background .15s, border-color .15s, transform .08s;
}
.ef-pl__classify-tick:hover:not(:disabled) { background: var(--ef-bg-soft, #FFFBF9); }
.ef-pl__classify-tick:active:not(:disabled) { transform: scale(.94); }
.ef-pl__classify-tick:focus-visible { outline: 2px solid var(--ef-primary, #733428); outline-offset: 2px; }
.ef-pl__classify-tick:disabled { cursor: default; }

.ef-pl__radio {
  position: relative; width: 1.45rem; height: 1.45rem; border-radius: 50%;
  border: 2px solid var(--ef-tint-strong, #EFC9BE); background: var(--surface, #fff);
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s, background .15s;
}
.ef-pl__radio--check { border-radius: 7px; }
/* The fill: springs in from nothing when picked, shrinks away when un-picked —
   which is also the feedback that tapping again really did clear the row. */
.ef-pl__radio::after {
  content: ''; position: absolute; inset: .22rem; border-radius: 50%;
  background: var(--ef-primary, #733428);
  transform: scale(0); transition: transform .18s cubic-bezier(.34, 1.4, .64, 1);
}
.ef-pl__radio--check::after { border-radius: 3px; }
.ef-pl__classify-tick.is-on .ef-pl__radio { border-color: var(--ef-primary, #733428); }
.ef-pl__classify-tick.is-on .ef-pl__radio::after { transform: scale(1); }
.ef-pl__classify-tick:hover:not(:disabled) .ef-pl__radio { border-color: var(--ef-primary, #733428); }

/* After grading the fill gives way to a ✓ / ✕, so a corrected table is
   readable at a glance rather than a field of identical dots. */
.ef-pl__radio-mark { font-size: .95rem; font-weight: 700; line-height: 1; z-index: 1; }
.ef-pl__classify-tick.is-correct .ef-pl__radio {
  border-color: var(--ef-correct-border, #16a34a); background: var(--ef-correct-bg, #dcfce7);
  color: var(--ef-correct-text, #15803d);
}
.ef-pl__classify-tick.is-wrong .ef-pl__radio {
  border-color: var(--ef-wrong-border, #ef4444); background: var(--ef-wrong-bg, #fee2e2);
  color: var(--ef-wrong-text, #b91c1c);
}
.ef-pl__classify-tick.is-correct .ef-pl__radio::after,
.ef-pl__classify-tick.is-wrong .ef-pl__radio::after { transform: scale(0); }

@media (prefers-reduced-motion: reduce) {
  .ef-pl__radio::after, .ef-pl__classify-tick { transition: none; }
}
/* Mark the row too: on a wide table the tick alone is easy to lose track of. */
.ef-pl__classify-row.is-wrong .ef-pl__classify-item { color: var(--ef-wrong-text, #b91c1c); }

/* type-it input */
.ef-pl__input {
  font-size: 1.2rem; padding: .3rem .5rem; border: none; border-bottom: 2px solid var(--ef-tint-strong, #EFC9BE);
  background: var(--ef-bg-soft, #FFFBF9); color: var(--ef-primary-dark, #4a2119); text-align: center; min-width: 4em;
}
.ef-pl__input:focus { outline: none; border-bottom-color: var(--ef-primary, #733428); }
.ef-pl__input.is-correct { color: var(--ef-correct-text, #15803d); border-color: var(--ef-correct-border, #16a34a); }
.ef-pl__input.is-wrong { color: var(--ef-wrong-text, #b91c1c); border-color: var(--ef-wrong-border, #ef4444); }
.ef-pl__hint { color: var(--ef-text-muted, #8a7a73); font-style: italic; }

/* cloze — one passage, several inline blanks. pre-wrap keeps the author's own
   line breaks so a numbered worksheet still reads like one. */
.ef-pl__cloze-text {
  white-space: pre-wrap; font-size: 1.1rem; line-height: 2.4;
  color: var(--ef-primary-dark, #4a2119); text-align: left;
}
.ef-pl__cloze-input { font-size: 1.05rem; padding: .15rem .4rem; min-width: 3.5em; }
.ef-pl__cloze-hint { color: var(--ef-text-muted, #8a7a73); font-style: italic; font-size: .95em; }
.ef-pl__cloze-corr {
  color: var(--ef-correct-text, #15803d); font-weight: 600; font-size: .9em;
  margin-left: .3rem; white-space: nowrap;
}

/* match */
.ef-pl__matchbox { display: flex; flex-direction: column; gap: .8rem; align-items: flex-start; }
.ef-pl__match { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; width: 100%; }
.ef-pl__match-col { display: flex; flex-direction: column; gap: .55rem; }
/* The give-up button. Deliberately quiet — it's the way out of a grid that
   can't otherwise be left, not an equal alternative to finding the pairs. */
.ef-pl__match-reveal {
  appearance: none; background: none; border: none; cursor: pointer;
  font: inherit; font-size: .88rem; font-weight: 600; padding: .25rem .4rem;
  margin-left: -.4rem; border-radius: 8px;
  color: var(--ef-text-muted, #8a7a73); text-decoration: underline;
}
.ef-pl__match-reveal:hover { color: var(--ef-primary, #733428); background: var(--ef-secondary, #FFF0EE); }
.ef-pl__match-item {
  appearance: none; border: 2px solid var(--ef-border, #E5D4CE); background: var(--surface, #fff);
  color: var(--ef-text, #4a3b35); font-size: 1.02rem; padding: .7rem .9rem; border-radius: 12px; cursor: pointer;
}
.ef-pl__match-item:hover:not(:disabled) { border-color: var(--ef-tint-strong, #EFC9BE); }
.ef-pl__match-item.is-sel { border-color: var(--ef-primary, #733428); background: var(--ef-secondary, #FFF0EE); color: var(--ef-primary-dark, #4a2119); font-weight: 600; }
.ef-pl__match-item.is-wrong { border-color: var(--ef-wrong-border, #ef4444); background: var(--ef-wrong-bg, #fee2e2); }
.ef-pl__match-item.is-done { border-color: var(--ef-correct-border, #16a34a); background: var(--ef-correct-bg, #dcfce7); color: var(--ef-correct-text, #15803d); opacity: .85; }
/* Shown, not earned — a dashed, neutral pairing so it can't be mistaken at a
   glance for one the student actually found. */
.ef-pl__match-item.is-revealed {
  border-style: dashed; border-color: var(--ef-tint-strong, #EFC9BE);
  background: var(--ef-secondary, #FFF0EE); color: var(--ef-primary-dark, #4a2119); opacity: .9;
}

/* Per-string "hear it" control. Lives inside option buttons, so it's a span
   with role=button (see speaker() in ef-series.js). */
.ef-pl__say {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.7em; height: 1.7em; margin-left: .5em; flex: 0 0 auto;
  border-radius: 50%; cursor: pointer; font-size: .82em; line-height: 1;
  background: var(--ef-secondary, #FFF0EE); border: 1px solid var(--ef-tint, #F6DED7);
  transition: transform .1s, background .12s;
  -webkit-user-select: none; user-select: none;
}
.ef-pl__say:hover { background: var(--ef-tint, #F6DED7); transform: scale(1.08); }
.ef-pl__say:focus-visible { outline: 2px solid var(--ef-primary, #733428); outline-offset: 2px; }
.ef-pl__say.is-playing { background: var(--ef-tint-strong, #EFC9BE); }
/* Options carry text + speaker; keep the text taking the slack. */
.ef-pl__opt, .ef-pl__chip, .ef-pl__match-item { display: inline-flex; align-items: center; }
.ef-pl__opt { justify-content: space-between; }
.ef-pl__opt-txt { min-width: 0; }
.ef-pl__opts--tf .ef-pl__opt { justify-content: center; }

/* Per-slot display mode — Aurélie can show a prompt/statement/option/pair as
   text (default), audio-instead-of-text, or both. A container-level slot
   (prompt/statement) gets the full waveform player; an option/chip/match-item
   stays a plain button (nesting EFAudio.player's own button inside it would
   be invalid HTML), so it just shows a bigger speaker icon and plays on
   click — the same click that selects it. */
.ef-pl__sentence--audio, .ef-pl__sentence--both { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.ef-pl__opt--audio, .ef-pl__chip--audio, .ef-pl__match-item--audio { justify-content: center; }
.ef-pl__opt--both, .ef-pl__chip--both, .ef-pl__match-item--both { justify-content: space-between; }
.ef-pl__opt-audio-ic { font-size: 1.4rem; line-height: 1; }

/* listen-and-pick: the clip is the question, so it gets the weight */
.ef-pl__listen { display: flex; flex-direction: column; gap: 1rem; }
.ef-pl__hear {
  appearance: none; align-self: flex-start; cursor: pointer;
  display: inline-flex; align-items: center; gap: .7rem;
  border: 2px solid var(--ef-tint, #F6DED7); background: var(--ef-secondary, #FFF0EE);
  color: var(--ef-primary, #733428); font-size: 1.05rem; font-weight: 600;
  padding: .8rem 1.6rem; border-radius: 999px; transition: transform .08s, background .12s;
}
.ef-pl__hear:hover { background: var(--ef-tint, #F6DED7); }
.ef-pl__hear:active { transform: translateY(1px); }
.ef-pl__hear-ic { font-size: 1.3rem; }
.ef-pl__hear.is-playing { background: var(--ef-tint-strong, #EFC9BE); }
@media (prefers-reduced-motion: no-preference) {
  .ef-pl__hear.is-playing .ef-pl__hear-ic { animation: ef-pulse .6s ease-in-out infinite; }
}
@keyframes ef-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }

/* dictée: the whole sentence is the blank, so its input is a full-width box,
   not the inline typeit underline (a single word doesn't need that much room). */
/* Centred: the clip and the answer box are the whole question, and left-
   aligning them under a wide card left the player stranded in the corner. */
.ef-pl__dictee { display: flex; flex-direction: column; gap: .9rem; align-items: center; text-align: center; }
.ef-pl__dictee .ef-pl__plays { margin: 0; }
/* waveform player (EFAudio.player) */
.ef-pl__wave { display: inline-flex; align-items: center; gap: .6rem; }
.ef-pl__wave.is-spent { opacity: .45; pointer-events: none; }
.ef-pl__input--wide {
  width: 100%; min-width: 100%; text-align: left; border: 2px solid var(--ef-tint-strong, #EFC9BE);
  border-bottom: 2px solid var(--ef-tint-strong, #EFC9BE); border-radius: 10px; padding: .7rem .9rem;
}
/* multiline answer: three rows by default, grows to fit, still draggable */
.ef-pl__input--multi {
  font: inherit; line-height: 1.5; resize: vertical; min-height: 5.2em; max-height: 220px;
  background: var(--surface, #fff); color: var(--ink, #4a3b35);
}
.ef-pl__input--multi::placeholder { color: var(--ink-3, #8a7a73); opacity: .8; }
.ef-pl__input--wide:focus { border-color: var(--ef-primary, #733428); }
.ef-pl__input--wide.is-correct { border-color: var(--ef-correct-border, #16a34a); }
.ef-pl__input--wide.is-wrong { border-color: var(--ef-wrong-border, #ef4444); }
/* highlight: the passage is the question — clickable words inline in prose.
   Words keep their natural inline flow (no chip look) so the passage still
   reads as a text; only the hover/selected states show they're tappable. */
.ef-pl__hl { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
/* pre-wrap so an authored line break survives, exactly like the cloze passage:
   a numbered worksheet ("1. … 2. …") has to stay a numbered worksheet, not run
   together into one paragraph. */
.ef-pl__hl-text { font-size: 1.12rem; line-height: 2.1; color: var(--ef-primary-dark, #4a2119); margin: 0; white-space: pre-wrap; }
.ef-pl__hl-w {
  appearance: none; border: none; background: transparent; cursor: pointer;
  font: inherit; color: inherit; padding: .12em .18em; margin: 0;
  border-radius: 6px; border-bottom: 2px dotted var(--ef-tint-strong, #EFC9BE);
  transition: background .12s, border-color .12s;
}
.ef-pl__hl-w:hover:not(:disabled) { background: var(--ef-secondary, #FFF0EE); }
.ef-pl__hl-w.is-on { background: var(--ef-tint, #F6DED7); border-bottom-color: var(--ef-primary, #733428); font-weight: 600; }
.ef-pl__hl-w:disabled { cursor: default; }
/* after Check */
.ef-pl__hl-w.is-right  { background: var(--ef-correct-bg, #dcfce7); border-bottom-color: var(--ef-correct-border, #16a34a); color: var(--ef-correct-text, #15803d); font-weight: 600; }
.ef-pl__hl-w.is-wrong  { background: var(--ef-wrong-bg, #fee2e2); border-bottom-color: var(--ef-wrong-border, #ef4444); color: var(--ef-wrong-text, #b91c1c); text-decoration: line-through; }
.ef-pl__hl-w.is-missed { background: transparent; border-bottom: 2px solid var(--ef-correct-border, #16a34a); color: var(--ef-correct-text, #15803d); font-weight: 600; }
/* The exact target letters, revealed inside the word once locked. The chip
   itself is the site-wide `mark` rule in ef-tokens.css; only the tighter
   padding is particular to sitting inside a clickable word. */
.ef-pl__hl-w mark { padding: 0 .05em; }

/* audio */
.ef-pl__audio { display: flex; align-items: center; }
.ef-pl__audio-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  border: 2px solid var(--ef-tint, #F6DED7); background: var(--ef-secondary, #FFF0EE);
  color: var(--ef-primary, #733428); padding: .5rem 1rem; border-radius: 999px; cursor: pointer; font-size: 1rem;
}
.ef-pl__audio-wave { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.ef-pl__audio-wave i { width: 3px; height: 5px; background: var(--ef-primary, #733428); border-radius: 2px; }
.ef-pl__audio.is-playing .ef-pl__audio-wave i { animation: ef-wave .7s ease-in-out infinite; }
.ef-pl__audio.is-playing .ef-pl__audio-wave i:nth-child(2) { animation-delay: .1s; }
.ef-pl__audio.is-playing .ef-pl__audio-wave i:nth-child(3) { animation-delay: .2s; }
.ef-pl__audio.is-playing .ef-pl__audio-wave i:nth-child(4) { animation-delay: .3s; }
.ef-pl__audio.is-playing .ef-pl__audio-wave i:nth-child(5) { animation-delay: .15s; }
@keyframes ef-wave { 0%,100% { height: 5px; } 50% { height: 16px; } }
@media (prefers-reduced-motion: reduce) { .ef-pl__audio.is-playing .ef-pl__audio-wave i { animation: none; } }

/* The verdict for ONE question, printed under that question — including its
   explanation, which is where the doubt is when several answers were possible.
   A page of five questions can't put five verdicts in one banner at the foot. */
.ef-pl__qfb { border-radius: 12px; padding: .7rem .9rem; display: flex; flex-direction: column; gap: .25rem; }
.ef-pl__qfb[hidden] { display: none; }
.ef-pl__qfb--ok { background: var(--ef-correct-bg, #dcfce7); color: var(--ef-correct-text, #15803d); }
.ef-pl__qfb--no { background: var(--ef-wrong-bg, #fee2e2); color: var(--ef-wrong-text, #b91c1c); }
.ef-pl__qfb-head { font-size: 1.02rem; }
.ef-pl__qfb-ans { font-weight: 600; }
.ef-pl__qfb-exp { font-size: .92rem; opacity: .9; }

/* footer: check/continue + how the page went */
.ef-pl__foot {
  border-top: 1px solid var(--ef-border-light, #F0E4E0);
  padding: 1rem 1.2rem; width: 100%; max-width: 720px; margin: 0 auto; box-sizing: border-box;
  display: flex; flex-direction: column; gap: .8rem; align-items: stretch;
}
.ef-pl__foot .ef-pl__btn { align-self: flex-end; }
/* Pages 1 and 3 keep their own CTA inside the scrollable content instead of
   this bar (see the recap section below) — an empty footer would otherwise
   still show its top border and padding as a stray line under nothing. */
.ef-pl__foot:empty { display: none; }
.ef-pl__pagescore { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ef-text-subtle, #6b5b54); }

/* recap — ONE page: a compact header, the marked answers, a sticky bar.
   .ef-pl__body is already `flex:1; overflow-y:auto` for the question flow,
   and the recap reuses it rather than imposing its own scroll box. */
.ef-pl__recap2 { display: flex; flex-direction: column; }
/* The old full-screen score reveal, reduced to a centred header: the
   exercise's name over the tally. */
.ef-pl__recap-head {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: .35rem; margin: 0 0 1.2rem;
}
.ef-pl__recap-head-title { margin: 0; color: var(--ef-primary-dark, #4a2119); font-size: 1.4rem; overflow-wrap: break-word; }
.ef-pl__recap-tally { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: .4rem; font-size: .95rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ef-pl__recap-tally-ok { color: var(--ef-correct-text, #15803d); }
.ef-pl__recap-tally-no { color: var(--ef-wrong-text, #b91c1c); }
.ef-pl__recap-tally-sep { color: var(--ef-text-muted, #8a7a73); font-weight: 400; }
.ef-pl__recap-media {
  margin: 0 0 1rem; padding: .9rem 1rem; border-radius: 12px;
  background: var(--ef-bg-soft, #FFFBF9); border: 1px solid var(--ef-border-light, #F0E4E0);
  max-width: 640px;
}
.ef-pl__recap-media-title { margin: 0 0 .4rem; font-size: .95rem; font-weight: 700; color: var(--ef-primary-dark, #4a2119); }
/* Capped so a picture (or a long passage) can't dominate the review page —
   it's here as a reminder of what the questions were about, not to be
   re-read in full; the question detail below it is the point of this page. */
.ef-pl__recap-media .ef-pl__media-text { max-height: 280px; overflow-y: auto; white-space: pre-wrap; line-height: 1.7; }
.ef-pl__recap-media .ef-pl__media-img { display: block; max-width: 100%; max-height: 280px; width: auto; height: auto; margin: 0 auto; border-radius: 10px; }
.ef-pl__recap-media .ef-pl__media-frame { display: block; border: 0; border-radius: 10px; max-height: 280px; }
/* Wider than the old answer-key list: each entry now replays the whole
   question, corrected, so it needs room to breathe. */
.ef-pl__recap-list { text-align: left; max-width: 640px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.ef-pl__recap-item { padding: 0; border-radius: 12px; border: 1px solid var(--ef-border-light, #F0E4E0); overflow: hidden; }
/* The site's neutral surface is a warm cream (and a warm brown in dark mode),
   which read as a soft RED next to the wrong rows — a correct answer looked
   like a mild failure. Both states now carry their own verdict colour, so
   green means right and red means wrong with nothing in between to misread. */
.ef-pl__recap-item.is-ok { background: var(--ef-correct-bg, #dcfce7); border-color: var(--ef-correct-border, #16a34a); }
.ef-pl__recap-item.is-no { background: var(--ef-wrong-bg, #fee2e2); border-color: var(--ef-wrong-border, #ef4444); }
.ef-pl__recap-det { width: 100%; }
.ef-pl__recap-sum {
  display: flex; gap: .6rem; align-items: baseline; padding: .6rem .8rem;
  cursor: pointer; list-style: none; user-select: none;
}
.ef-pl__recap-sum::-webkit-details-marker { display: none; }
.ef-pl__recap-sum:hover { filter: brightness(.97); }
.ef-pl__recap-mark { font-weight: 700; flex: 0 0 auto; }
.ef-pl__recap-item.is-ok .ef-pl__recap-mark { color: var(--ef-correct-text, #15803d); }
.ef-pl__recap-item.is-no .ef-pl__recap-mark { color: var(--ef-wrong-text, #b91c1c); }
.ef-pl__recap-num { flex: 0 0 auto; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ef-text-muted, #8a7a73); font-size: .9rem; }
/* A glimpse of the question, one line — enough to recognise which one this
   is, not the whole passage (the body below replays that in full). */
.ef-pl__recap-text {
  color: var(--ef-text-subtle, #6b5b54); font-size: .95rem; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ef-pl__recap-note { margin: 0; font-size: .9rem; font-weight: 600; color: var(--ef-text-subtle, #6b5b54); }
.ef-pl__recap-body {
  padding: .2rem .9rem .9rem; display: flex; flex-direction: column; gap: .6rem;
  border-top: 1px solid var(--ef-border-light, #F0E4E0);
}
.ef-pl__recap-instr { margin: .6rem 0 0; font-size: .9rem; color: var(--ef-text-muted, #8a7a73); }
.ef-pl__recap-ans { color: var(--ef-correct-text, #15803d); font-size: .86rem; font-weight: 600; margin: 0; }
.ef-pl__recap-exp { margin: 0; font-size: .9rem; color: var(--ef-text, #4a3b35); background: var(--ef-tint, #FBEDE9); padding: .5rem .7rem; border-radius: 8px; }
.ef-pl__recap-gloss { margin: 0; font-size: .85rem; color: var(--ef-text-muted, #8a7a73); font-style: italic; }
/* The replayed question is read-only here — kill the affordances that would
   invite a click it can no longer answer. */
.ef-pl__recap-body .ef-pl__opt, .ef-pl__recap-body .ef-pl__chip,
.ef-pl__recap-body .ef-pl__hl-w, .ef-pl__recap-body button { pointer-events: none; }

/* The sticky bar — the three ways out, on one line at the foot of the recap.
   "Try next" leads (the only one that keeps the learner going) and carries the
   suggested exercise's name so it isn't a blind jump; Restart and Close follow
   as compact buttons. One line of height, not a screen of its own. */
.ef-pl__recap-bar { display: flex; align-items: stretch; gap: .5rem; width: 100%; }
/* The suggestion and the two exit buttons are different kinds of thing —
   "go somewhere new" vs "deal with this one" — so they get a real gap
   between them rather than reading as one row of three equals. */
.ef-pl__recap-bar-next { margin-right: 1.4rem; }
.ef-pl__recap-bar-next {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; justify-content: center; gap: .1rem;
  padding: .5rem .9rem; border-radius: 999px; text-decoration: none; color: inherit;
  background: var(--ef-secondary, #FFF0EE); border: 1.5px solid var(--ef-tint-strong, #EFC9BE);
  transition: background .12s, border-color .12s;
}
.ef-pl__recap-bar-next:hover { background: var(--ef-tint, #FBEDE9); border-color: var(--ef-primary, #733428); }
.ef-pl__recap-bar-next-label { font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ef-primary, #733428); }
.ef-pl__recap-bar-next-row { display: flex; align-items: center; gap: .4rem; min-width: 0; }
/* One line, ellipsised: the bar must not grow a second row because a series
   has a long title. */
.ef-pl__recap-bar-next-title {
  min-width: 0; font-weight: 600; font-size: .92rem; color: var(--ef-primary-dark, #4a2119);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Same height as the suggestion beside them. The specificity has to beat
   `.ef-pl__foot .ef-pl__btn { align-self: flex-end }`, which otherwise
   shrink-wraps these to their text and leaves them floating short. */
.ef-pl__foot .ef-pl__recap-bar-btn { flex: 0 0 auto; align-self: stretch; padding: .5rem 1.1rem; font-size: .95rem; }
.ef-pl__btn--soft { background: var(--ef-secondary, #FFF0EE); color: var(--ef-primary, #733428); }
.ef-pl__btn--soft:hover { background: var(--ef-tint-strong, #EFC9BE); }

/* ---- Hub — editorial, grouped by level, filterable ------------------------ */
.ef-hub {
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  /* Level colours always carry white text (badges + active filter chips), so
     each one is dark enough to clear 4.5:1 against #fff. The old gold/olive
     pair sat at 3.0–3.7:1 and read as white-on-light. */
  --a0: #1d7a4c; --a1: #1d7a4c; --a2: #4f6f24; --b1: #8a6414; --b2: #b03a09; --c1: #8f3826;
}
.ef-hub__head { margin: 0 0 1.4rem; }
.ef-hub__kicker { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ef-primary, #733428); font-weight: 700; margin: 0 0 .4rem; }
.ef-hub__lede { color: var(--ef-text-subtle, #6b5b54); font-size: 1.02rem; line-height: 1.6; max-width: 60ch; margin: 0; }

/* The Verb Conjugation Trainer banner. It sits above the series list and is
   deliberately unlike the cards below it — a warm filled panel, a serif title
   and a little conjugation table standing in for a thumbnail — because it is
   not one more series but a different kind of thing: a generator, not a list.
   The "mark" is real conjugated French rather than an icon; it says what the
   tool does faster than any label. */
.ef-hub__tool {
  display: flex; align-items: center; gap: 1.4rem; margin: 0 0 1.8rem;
  padding: 1.2rem 1.4rem; border-radius: 18px; text-decoration: none;
  background: linear-gradient(135deg, var(--ef-secondary, #FFF0EE), var(--ef-bg-soft, #FFFBF9) 62%);
  border: 1px solid var(--ef-tint, #F6DED7); color: var(--ef-text, #4a3b35);
  transition: box-shadow .18s, transform .06s, border-color .18s;
}
.ef-hub__tool:hover { border-color: var(--ef-tint-strong, #EFC9BE); box-shadow: 0 12px 30px rgba(115, 52, 40, .13); transform: translateY(-2px); }
.ef-hub__tool-mark {
  flex: 0 0 auto; display: flex; flex-direction: column; gap: .1rem; padding: .8rem 1rem;
  border-radius: 14px; background: var(--surface, #fff); border: 1px solid var(--ef-border-light, #F0E4E0);
  font-size: .78rem; line-height: 1.45; color: var(--ef-text-muted, #8a7a73);
}
.ef-hub__tool-mark-inf {
  font-family: var(--serif); font-size: 1.05rem; font-style: italic; line-height: 1.2;
  color: var(--ef-primary-dark, #4a2119); margin-bottom: .25rem;
  padding-bottom: .25rem; border-bottom: 1px solid var(--ef-border-light, #F0E4E0);
}
.ef-hub__tool-mark-form:last-child { color: var(--ef-primary, #733428); }
/* The word-games card's mark is a little crossword instead of a conjugation
   table — same block, different contents, so the two cards sit as a pair. */
.ef-hub__tool-mark--grid { display: grid; grid-template-columns: repeat(4, 1.35rem); gap: 3px; padding: .8rem; }
.ef-hub__tool-mark-sq {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 3px; font-family: var(--ef-mono, ui-monospace, Menlo, monospace);
  font-size: .7rem; font-weight: 700; color: var(--ef-primary-dark, #4a2119);
  background: var(--ef-bg-soft, #FFFBF9); border: 1px solid var(--ef-border-light, #F0E4E0);
}
.ef-hub__tool-mark-sq:nth-child(4n) { color: var(--ef-primary, #733428); background: var(--ef-secondary, #FFF0EE); }
/* The daily card's mark is four days of the rotation in a 2×2 — the promise
   the card is making ("a different game every day") said as a picture. */
.ef-hub__tool-mark--defi { display: grid; grid-template-columns: repeat(2, 1.7rem); gap: 4px; padding: .8rem; }
.ef-hub__tool-mark-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 6px; font-size: .95rem; line-height: 1;
  font-family: var(--serif); color: var(--ef-primary-dark, #4a2119);
  background: var(--ef-bg-soft, #FFFBF9); border: 1px solid var(--ef-border-light, #F0E4E0);
}
.ef-hub__tool-mark-day:first-child { background: var(--ef-secondary, #FFF0EE); border-color: var(--ef-tint-strong, #EFC9BE); }
.ef-hub__tool-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.ef-hub__tool-kicker { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--ef-primary, #733428); }
.ef-hub__tool-title { font-family: var(--serif); font-size: 1.32rem; font-weight: 600; color: var(--ef-primary-dark, #4a2119); line-height: 1.2; }
.ef-hub__tool-lede { font-size: .92rem; line-height: 1.55; color: var(--ef-text-subtle, #6b5b54); max-width: 52ch; }
.ef-hub__tool-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
.ef-hub__tool-tag {
  font-size: .72rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px;
  background: var(--surface, #fff); border: 1px solid var(--ef-border-light, #F0E4E0); color: var(--ef-text-muted, #8a7a73);
}
.ef-hub__tool-cta {
  flex: 0 0 auto; align-self: center; font-size: .88rem; font-weight: 700; white-space: nowrap;
  padding: .6rem 1.1rem; border-radius: 999px;
  background: var(--ef-primary, #733428); color: var(--on-fill, #fff);
}
.ef-hub__tool:hover .ef-hub__tool-cta { background: var(--ef-primary-dark, #4a2119); }
/* Stacked on a phone: the mark and the CTA go full width under the copy rather
   than squeezing the lede into a two-word column. */
@media (max-width: 640px) {
  .ef-hub__tool { flex-wrap: wrap; gap: 1rem; }
  .ef-hub__tool-mark { order: 2; }
  .ef-hub__tool-body { order: 1; flex-basis: 100%; }
  .ef-hub__tool-cta { order: 3; margin-left: auto; }
}

.ef-hub [hidden] { display: none !important; }
.ef-hub__nav { display: flex; flex-direction: column; gap: .7rem; margin: 0 0 1.4rem; }
.ef-hub__chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.ef-hub__chip {
  appearance: none; border: 1.5px solid var(--ef-border, #E5D4CE); background: var(--surface, #fff);
  color: var(--ef-text-subtle, #6b5b54); padding: .38rem 1rem; border-radius: 999px; cursor: pointer;
  font-size: .88rem; font-weight: 600; transition: .15s;
}
.ef-hub__chip:hover { border-color: var(--ef-tint-strong, #EFC9BE); }
.ef-hub__chip.is-active { background: var(--ef-primary, #733428); color: var(--on-fill, #fff); border-color: var(--ef-primary, #733428); }
.ef-hub__chip--A0.is-active, .ef-hub__chip--A1.is-active { background: var(--a1); border-color: var(--a1); }
.ef-hub__chip--A2.is-active { background: var(--a2); border-color: var(--a2); }
.ef-hub__chip--B1.is-active { background: var(--b1); border-color: var(--b1); }
.ef-hub__chip--B2.is-active { background: var(--b2); border-color: var(--b2); }
.ef-hub__chip--C1.is-active { background: var(--c1); border-color: var(--c1); }
.ef-hub__search {
  width: 100%; box-sizing: border-box; font-size: 1rem; padding: .7rem 1rem; border: 1.5px solid var(--ef-border, #E5D4CE);
  border-radius: 12px; background: var(--surface, #fff); color: var(--ef-text, #4a3b35); font-family: inherit;
}
.ef-hub__search:focus { outline: none; border-color: var(--ef-primary, #733428); }
.ef-hub__bar { display: flex; gap: .5rem; align-items: stretch; }
.ef-hub__bar .ef-hub__search { flex: 1; min-width: 0; }
.ef-hub__view { position: relative; }
.ef-hub__view-btn {
  list-style: none; display: flex; align-items: center; justify-content: center; height: 100%; box-sizing: border-box;
  padding: 0 .85rem; border: 1.5px solid var(--ef-border, #E5D4CE); border-radius: 12px; cursor: pointer;
  background: var(--surface, #fff); color: var(--ef-primary, #733428);
}
.ef-hub__view-btn::-webkit-details-marker { display: none; }
.ef-hub__view-btn:hover, .ef-hub__view[open] .ef-hub__view-btn { border-color: var(--ef-primary, #733428); }
.ef-hub__view-menu {
  position: absolute; right: 0; top: calc(100% + .4rem); z-index: 20; min-width: 13rem;
  display: flex; flex-direction: column; gap: .8rem; padding: .9rem 1rem; border-radius: 14px;
  border: 1px solid var(--ef-border, #E5D4CE); background: var(--surface, #fff); box-shadow: 0 12px 28px rgba(115, 52, 40, .14);
}
.ef-hub__view-set { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: .3rem; }
.ef-hub__view-set legend { padding: 0 0 .2rem; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ef-text-muted, #8a7a73); }
.ef-hub__view-set label { display: flex; align-items: center; gap: .5rem; font-size: .92rem; color: var(--ef-text, #4a3b35); cursor: pointer; }
.ef-hub__view-set input { accent-color: var(--ef-primary, #733428); margin: 0; }

/* Layer 1: one tile per grammar category. */
.ef-hub__cats-h, .ef-hub__panel-h { margin: 0 0 1rem; font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--ef-primary-dark, #4a2119); }
.ef-hub__tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; }
.ef-hub__tile {
  display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.2rem; border-radius: 14px;
  border: 1.5px solid var(--ef-tint, #F6DED7); background: var(--surface, #fff); text-decoration: none; color: var(--ef-text, #4a3b35);
  transition: box-shadow .15s, transform .05s, border-color .15s;
}
.ef-hub__tile:hover { box-shadow: 0 8px 22px rgba(115, 52, 40, .1); border-color: var(--ef-tint-strong, #EFC9BE); transform: translateY(-2px); }
.ef-hub__tile-name { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--ef-primary-dark, #4a2119); line-height: 1.25; }
.ef-hub__tile-sample { font-size: .84rem; color: var(--ef-text-subtle, #6b5b54); line-height: 1.4; }
.ef-hub__tile-n { margin-top: auto; padding-top: .3rem; font-size: .8rem; font-weight: 600; color: var(--ef-primary, #733428); }

/* Layer 2: a category's exercises, grouped by point. */
.ef-hub__panel-head { margin: 0 0 .6rem; }
.ef-hub__back { display: inline-block; margin: 0 0 .6rem; font-size: .9rem; color: var(--ef-primary, #733428); text-decoration: none; }
.ef-hub__back:hover { text-decoration: underline; }
.ef-hub__group { margin: 0 0 1.8rem; }
.ef-hub__group-h { display: flex; align-items: center; gap: .6rem; margin: 0 0 .8rem; font-family: var(--serif); font-weight: 600; font-size: 1.08rem; color: var(--ef-primary-dark, #4a2119); }
.ef-hub__section-n { margin-left: auto; font-family: system-ui, sans-serif; font-size: .8rem; font-weight: 600; color: var(--ef-text-muted, #8a7a73); background: var(--ef-secondary, #FFF0EE); border-radius: 999px; padding: .1rem .6rem; }
.ef-hub__card-levels { display: flex; flex-wrap: wrap; gap: .3rem; }
.ef-hub__results.is-by-point .ef-hub__card-tag { display: none; }

.ef-hub__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem; }
.ef-hub__card {
  display: flex; flex-direction: column; gap: .4rem;
  padding: 1.1rem 1.2rem; border: 1px solid var(--ef-border-light, #F0E4E0); border-radius: 14px;
  background: var(--ef-bg-soft, #FFFBF9); text-decoration: none; color: var(--ef-text, #4a3b35);
  transition: box-shadow .15s, transform .05s, border-color .15s;
}
.ef-hub__card:hover { box-shadow: 0 8px 22px rgba(115, 52, 40, .1); border-color: var(--ef-tint-strong, #EFC9BE); transform: translateY(-2px); }
/* --on-deep, not --on-fill: the level modifiers below override the background
   with fixed dark colours, so this label must stay light in both themes. */
.ef-hub__level {
  align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  padding: .18rem .6rem; border-radius: 999px; color: var(--on-deep, #fff); background: var(--ef-primary, #733428);
}
.ef-hub__level--A0, .ef-hub__level--A1 { background: var(--a1); }
.ef-hub__level--A2 { background: var(--a2); }
.ef-hub__level--B1 { background: var(--b1); }
.ef-hub__level--B2 { background: var(--b2); }
.ef-hub__level--C1 { background: var(--c1); }
.ef-hub__card-title { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; color: var(--ef-primary-dark, #4a2119); line-height: 1.25; }
/* Clamped so a long intro can't make one card tower over its neighbours in the
   grid — the point is a hint of what's inside, not the whole intro. */
.ef-hub__card-lede {
  color: var(--ef-text, #4a3b35); font-size: .86rem; line-height: 1.45; opacity: .85;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ef-hub__card-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; padding-top: .25rem; }
.ef-hub__card-meta { color: var(--ef-text-muted, #8a7a73); font-size: .82rem; }
.ef-hub__card-tag {
  font-size: .72rem; padding: .12rem .5rem; border-radius: 999px;
  background: var(--ef-tint, #FBEDE9); color: var(--ef-primary, #733428); white-space: nowrap;
}
.ef-hub__empty { color: var(--ef-text-muted, #8a7a73); font-style: italic; }

@media (max-width: 520px) {
  .ef-series-landing { padding: 1.4rem; }
  .ef-pl__instr { font-size: 1.15rem; }
  .ef-pl__match { grid-template-columns: 1fr 1fr; gap: .5rem; }

  /* Recap on a phone: less width to spend, so the header shrinks and the
     boxes give some of their inset padding back. */
  .ef-pl__recap-head-title { font-size: 1.2rem; }
  .ef-pl__recap-head { gap: .3rem; margin-bottom: .9rem; }
  .ef-pl__recap-media { padding: .7rem .8rem; }
  .ef-pl__recap-sum { padding: .55rem .7rem; }
  /* The bar keeps all three on one row at 320px by dropping the suggestion's
     NAME rather than squeezing it: at this width the title ellipsised down to
     a letter and a half ("L…"), which named nothing. The kicker alone —
     "Try next" — is honest about where the button goes, and the destination
     is one tap away anyway. */
  .ef-pl__recap-bar { gap: .4rem; }
  .ef-pl__recap-bar-next {
    margin-right: .5rem; padding: .45rem .8rem;
    align-items: center; justify-content: center;
  }
  .ef-pl__recap-bar-next-row { display: none; }
  .ef-pl__recap-bar-next-label {
    font-size: .9rem; font-weight: 600; letter-spacing: 0; text-transform: none;
    white-space: nowrap;
  }
  .ef-pl__recap-bar-btn { padding: .5rem .8rem; font-size: .9rem; }
}

/* ── Podcast-linked series: re-listen while you answer ──────────────────── */
/* Landing: full player under the intro. */
.ef-series-landing__pod {
  margin: 0 auto 1.2rem; max-width: 48ch; text-align: left;
  background: var(--ef-secondary, #FFF0EE);
  border: 1px solid var(--ef-tint, #F6DED7);
  border-radius: 14px; padding: .8rem .9rem;
}
.ef-series-landing__pod-label {
  display: block; font-size: .78rem; font-weight: 600; margin: 0 0 .55rem;
  color: var(--ef-primary, #733428);
}
.ef-series-landing__pod .ef-spotify-embed__frame { display: block; }

/* Two columns once there is room for them: the document on the left, scrolling
   on its own so it can be long, and the questions on the right. Neither one
   pushes the other off screen, which is the whole point of putting several
   questions on a page in the first place. Only applied when a document exists —
   a plain drill keeps its single centred column. */
@media (min-width: 900px) {
  .ef-pl.has-media .ef-pl__top,
  .ef-pl.has-media .ef-pl__stage,
  .ef-pl.has-media .ef-pl__foot { max-width: 1180px; }
  .ef-pl.has-media .ef-pl__stage { flex-direction: row; align-items: stretch; gap: 1.6rem; padding: 0 1.2rem; }
  .ef-pl.has-media .ef-pl__media {
    flex: 0 0 40%; max-width: 460px; overflow-y: auto; padding-top: 1rem;
    border-bottom: none; border-right: 1px solid var(--ef-border-light, #F0E4E0);
  }
  .ef-pl.has-media .ef-pl__body { padding-left: 0; }
  /* The fold is a small-screen affordance; with both columns visible there is
     nothing to fold, so a page folded on a phone must not stay folded here. */
  .ef-pl__media-toggle { display: none; }
  .ef-pl.has-media .ef-pl__media-inner,
  .ef-pl.has-media .ef-pl__media.is-collapsed .ef-pl__media-inner { display: block; max-height: none; overflow: visible; padding: 0 1.2rem .9rem 0; }
  .ef-pl__media:not(.ef-pl__media--strip) .ef-pl__media-title { display: block; }
}

/* dictée correction: a word-by-word diff rather than a bare right/wrong.
   Each slip shows what was typed struck through with the expected form under
   it, so the student sees exactly which word (or which accent) went wrong. */
.ef-pl__diff { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .15rem .1rem; margin: .9rem 0 0; line-height: 1.35; }
.ef-pl__d { display: inline-flex; flex-direction: column; align-items: center; padding: .1em .25em; border-radius: 6px; }
.ef-pl__d-got  { text-decoration: line-through; opacity: .75; font-size: .92em; }
.ef-pl__d-want { font-weight: 600; }
.ef-pl__d--ok      { color: var(--ef-correct-text, #15803d); }
.ef-pl__d--accent  { background: #fef9c3; color: #854d0e; }
.ef-pl__d--wrong   { background: var(--ef-wrong-bg, #fee2e2); color: var(--ef-wrong-text, #b91c1c); }
.ef-pl__d--missing { background: var(--ef-correct-bg, #dcfce7); color: var(--ef-correct-text, #15803d); border: 1px dashed var(--ef-correct-border, #16a34a); }
.ef-pl__d--extra   { background: var(--ef-wrong-bg, #fee2e2); color: var(--ef-wrong-text, #b91c1c); opacity: .8; }
/* how many listens are left / whether pausing is allowed */
.ef-pl__plays { margin: -.4rem 0 0; font-size: .86rem; }
.ef-pl__plays[hidden] { display: none; }

/* Sound chip inside an instruction: "…le son [[é]]" → a playable pill sitting
   in the sentence, not a detached button above it. */
.ef-pl__sound, .ef-ex__q-instr .ef-pl__sound {
  display: inline-flex; align-items: center; gap: .3em;
  padding: .1em .55em .1em .5em; margin: 0 .15em; border-radius: 999px;
  font-weight: 700; font-style: normal; cursor: pointer; line-height: 1.5;
  background: var(--ef-secondary, #FFF0EE); border: 1px solid var(--ef-tint, #F6DED7);
  color: var(--ef-primary, #733428);
  -webkit-user-select: none; user-select: none; vertical-align: baseline;
}
.ef-pl__sound::before { content: '🔊'; font-size: .85em; }
.ef-pl__sound:hover { background: var(--ef-tint, #F6DED7); }
.ef-pl__sound:focus-visible { outline: 2px solid var(--ef-primary, #733428); outline-offset: 2px; }
.ef-pl__sound.is-playing { background: var(--ef-tint-strong, #EFC9BE); }
/* Not recorded yet: still shows the sound, but reads as text, not a control. */
.ef-pl__sound.is-mute { cursor: default; opacity: .75; }
.ef-pl__sound.is-mute::before { content: none; }

/* A blank answered from a word bank inside a multi-blank passage: a dropdown
   in place, not a chip in a pile at the bottom. See ctrlFill. */
.ef-pl__pick { font: inherit; font-size: .95em; border: 1.5px solid var(--ef-line, #d8c9bb); border-radius: 8px;
  padding: 2px 6px; background: #fff; color: inherit; margin: 0 2px; max-width: 12em; }
.ef-pl__pick.is-correct { border-color: #157a4a; color: #10603a; }
.ef-pl__pick.is-wrong { border-color: #b03a09; color: #8a2c17; }

/* A dictated blank sitting INSIDE a sentence: the player has to read as a word,
   not as a panel. The full-size version stays for a dictation, where the blank
   is the whole exercise. See fillPlayer() in ef-exercises-core.js. */
/* flex-direction is reset explicitly: the full-size .ef-pl__dictee stacks the
   player over its counter, which is right for a dictation and wrong for a word
   inside a sentence. */
.ef-pl__dictee--inline { display: inline-flex; flex-direction: row; align-items: center; gap: .25em;
  vertical-align: middle; margin: 0 .15em; flex-wrap: nowrap; white-space: nowrap; }
/* The mount IS the .ef-au-play element, and both stylesheets have an opinion
   about it — so say it plainly here, with the specificity to win. */
.ef-pl__dictee--inline .ef-pl__wave.ef-au-play,
.ef-pl__dictee--inline .ef-pl__wave {
  margin: 0; display: inline-flex; align-items: center; gap: .2em;
  width: auto; min-width: 0; max-width: none; flex: 0 0 auto; padding: 0; background: none;
}
.ef-pl__dictee--inline .ef-au-play__wave { display: block; }
.ef-pl__dictee--inline .ef-pl__plays--inline { display: inline; margin: 0; padding: 0; }
.ef-pl__dictee--inline .ef-au-play { gap: .2em; }
.ef-pl__dictee--inline .ef-au-play__btn { width: 1.5em; height: 1.5em; font-size: .8em; }
.ef-pl__plays--inline { font-size: .72em; opacity: .7; font-variant-numeric: tabular-nums; }

/* One blank is ONE thing: the player that says it, the field that answers it
   and the hint that helps, in a single frame. Laid out as loose neighbours,
   nothing told the student which sound belonged to which box. */
.ef-pl__blankgroup { display: inline-flex; align-items: center; gap: .3em; vertical-align: middle; }
.ef-pl__blankgroup--audio { border: 1.5px solid var(--ef-tint2, #e0cfc6); border-radius: 999px;
  padding: .1em .5em .1em .25em; background: rgba(255,255,255,.06); }
.ef-pl__blankgroup--audio .ef-pl__input { border-radius: 999px; }

/* A dictation: the recording on top, the box you write it all into underneath.
   Inline, the same group reads left-to-right like a word. */
.ef-pl__blankgroup--solo { display: flex; flex-direction: column; align-items: stretch;
  gap: .5em; width: 100%; border: 0; padding: 0; background: none; }
/* Overrides the pill radius above: a full-width, multi-line box that round
   isn't a pill any more, it's a rectangle with its corners cutting into the
   text once it's tall enough. */
.ef-pl__blankgroup--solo .ef-pl__input { width: 100%; border-radius: 10px; }
/* Whatever the answer's length, a field never outgrows the box it sits in. */
.ef-pl__cloze-text .ef-pl__input { max-width: 100%; box-sizing: border-box; }
.ef-pl__blankgroup { max-width: 100%; flex-wrap: wrap; }
