/* Vocabulary, formula practice and the drill they share (js/drill.js).
   Tokens come from site-refresh.css, so both appearances follow the site.
   The one loud thing here is a right answer: its bar fills with the logo's
   lime from left to right. Everything around it stays quiet. */

:root {
  --drill-right: var(--lime);
  --drill-right-ink: var(--navy-deep);
  --drill-flame: var(--streak-flame, #e8891c);
  /* Right answers in a row within a round: not the flame, which counts days. */
  --drill-bolt: var(--positive, #1a7f4b);
}

/* ── Page shell ─────────────────────────────────────────────────────── */
html:root body .learn-section { padding-top: clamp(1.75rem, 4vw, 3rem); }
html:root body .learn-shell { max-width: 62rem; min-height: 24rem; }
html:root body .learn-status { color: var(--muted); font-size: 1.05rem; }
html:root body .learn-more { padding-top: 0; }
html:root body .learn-more-inner { max-width: 62rem; }
html:root body .learn-more-inner p { margin: 0; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); }
html:root body .learn-more-inner a { color: var(--brand); text-decoration: underline; text-underline-offset: .2em; }

html:root body .learn-top { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-bottom: 1.75rem; }
html:root body .learn-totals { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }

html:root body .learn-review { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; margin-bottom: 2.25rem; padding: 1.1rem 1.25rem; background: var(--accent-soft); border-left: 6px solid var(--lime); }
html:root body .learn-review p { margin: 0; color: var(--ink); font-size: 1.125rem; font-weight: 700; }

html:root body .learn-group + .learn-group { margin-top: 3rem; }
html:root body .learn-group__title { margin: 0 0 .35rem; padding-top: .8rem; border-top: 4px solid var(--brand); font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
html:root body .learn-group__note { margin: 0 0 1.25rem; color: var(--muted); }

html:root body .learn-decks { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: .875rem; margin: 0; padding: 0; list-style: none; }
html:root body .learn-deck { display: grid; grid-template-rows: auto 1fr auto auto; gap: .35rem; height: 100%; padding: 1.1rem 1.15rem 1rem; background: var(--paper); border: 1px solid var(--line); color: var(--ink-soft); text-decoration: none; transition: border-color .16s var(--ease), transform .16s var(--ease); }
html:root:root:root:root body .learn-deck, html:root:root:root:root body .learn-start, html:root:root:root:root body .learn-review, html:root:root:root:root body .drill-after, html:root:root:root:root body .drill-missed { border-radius: var(--r-card) !important; }
@media (hover: hover) { html:root body .learn-deck:hover { border-color: var(--brand); } }
html:root body .learn-deck:active { transform: translateY(1px); }
html:root body .learn-deck__title { color: var(--ink); font-size: 1.125rem; font-stretch: 88%; line-height: 1.25; }
html:root body .learn-deck__note { font-size: .9375rem; line-height: 1.45; }
html:root body .learn-deck__count { align-self: end; margin-top: .5rem; color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }

html:root body .learn-meter { display: block; height: .375rem; overflow: hidden; background: var(--mist); }
html:root body .learn-meter__fill { display: block; height: 100%; background: var(--lime); transform-origin: left; transition: transform .5s var(--ease); }

html:root body .learn-crumbs { display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin-bottom: 1rem; color: var(--muted); font-size: .9375rem; }
html:root body .learn-crumbs a { color: var(--brand); text-decoration: underline; text-underline-offset: .2em; }
html:root body .learn-title { margin: 0 0 .5rem; font-size: clamp(1.75rem, 4vw, 2.5rem); }
html:root body .learn-lead { max-width: 44rem; margin: 0 0 1.75rem; font-size: 1.0625rem; line-height: 1.6; }
html:root body .learn-subtitle { margin: 2.5rem 0 .5rem; padding-top: .8rem; border-top: 4px solid var(--brand); font-size: 1.25rem; }

html:root body .learn-units { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
html:root body .learn-unit { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) 7rem; gap: 1rem; align-items: center; padding: 1rem .25rem; border-bottom: 1px solid var(--line); color: var(--ink-soft); text-decoration: none; }
@media (hover: hover) { html:root body .learn-unit:hover { background: var(--mist); } }
html:root body .learn-unit__number { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; background: var(--brand); color: var(--on-brand); font-weight: 750; font-variant-numeric: tabular-nums; }
html:root body .learn-unit__text { display: grid; gap: .15rem; min-width: 0; }
html:root body .learn-unit__text strong { color: var(--ink); font-size: 1.0625rem; }
html:root body .learn-unit__text span { color: var(--muted); font-size: .9375rem; line-height: 1.45; }
html:root body .learn-unit__state { display: grid; gap: .35rem; }
html:root body .learn-unit__figure { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; text-align: right; }

html:root body .learn-start { display: grid; gap: 1rem; padding: 1.25rem; background: var(--mist); }
html:root body .learn-start__facts { margin: 0; color: var(--ink-soft); }
html:root body .learn-start__actions { display: flex; flex-wrap: wrap; gap: .625rem; }
html:root body .learn-sizes { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
html:root body .learn-sizes__label { margin-right: .25rem; color: var(--ink); font-weight: 700; }
html:root body .learn-size { min-width: 3rem; min-height: 2.5rem; padding: .35rem .8rem; background: var(--paper); border: 1.5px solid var(--line-strong); color: var(--ink); font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
html:root body .learn-size small { color: var(--muted); font-size: .8125rem; font-weight: 400; }
html:root body .learn-size[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
html:root body .learn-size[aria-pressed="true"] small { color: inherit; opacity: .8; }

/* ── Buttons the drill and the start panels use ─────────────────────── */
html:root body :is(.drill-next, .drill-secondary) { display: inline-flex; align-items: center; justify-content: center; min-height: 2.875rem; padding: .6rem 1.35rem; border: 1.5px solid var(--brand); font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .16s var(--ease), transform .12s var(--ease); }
html:root body .drill-next { background: var(--brand); color: var(--on-brand); }
@media (hover: hover) { html:root body .drill-next:hover { background: var(--brand-strong); border-color: var(--brand-strong); } }
html:root body .drill-secondary { background: var(--paper); color: var(--brand); }
@media (hover: hover) { html:root body .drill-secondary:hover { background: var(--brand-soft); } }
html:root body :is(.drill-next, .drill-secondary):active { transform: translateY(1px); }
html:root:root:root body :is(a.drill-next, a.drill-secondary) { border-radius: var(--r-ctl) !important; }
html:root body .drill-link { padding: .5rem .25rem; background: none; border: 0; color: var(--muted); font: inherit; font-size: .9375rem; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
@media (hover: hover) { html:root body .drill-link:hover { color: var(--ink); } }
html:root body :is(.drill-next, .drill-secondary, .drill-link)[hidden] { display: none; }
/* Taking back a wrong choice that was a slip of the finger. */
html:root body .drill-slip { min-height: 2.75rem; padding: .5rem .25rem; background: none; border: 0; color: var(--muted); font: inherit; font-size: .9375rem; text-align: left; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
html:root body .drill-slip:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) { html:root body .drill-slip:hover { color: var(--ink); } }
/* Stepping back to a card already answered. */
html:root body .drill-previous { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.75rem; padding: .5rem .5rem .5rem .1rem; background: none; border: 0; color: var(--muted); font: inherit; font-size: .9375rem; cursor: pointer; }
html:root body .drill-previous svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html:root body .drill-previous:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) { html:root body .drill-previous:hover { color: var(--ink); } }
html:root body .drill-lookback__note { display: inline-block; margin: 0 0 .9rem; padding: .3rem .7rem; border: 1px dashed var(--line-strong); border-radius: var(--r-ctl); background: var(--mist); color: var(--muted); font-size: .875rem; font-weight: 650; }
html:root body .drill-lookback .drill-actions, html:root body .drill-lookback .drill-feedback:empty { display: none; }
html:root body .drill-lookback__nav { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1.25rem; }
html:root body .drill-lookback__nav .drill-next { margin-left: auto; }
html:root body .drill-lookback__nav .drill-secondary:disabled { opacity: .45; cursor: default; }

/* ── Vocabulary ─────────────────────────────────────────────────────── */
html:root body .learn-say { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; margin-left: .35rem; padding: 0; background: none; border: 1.5px solid var(--line-strong); color: var(--brand); vertical-align: middle; cursor: pointer; }
@media (hover: hover) { html:root body .learn-say:hover { background: var(--brand-soft); } }
html:root body .learn-say[hidden] { display: none; }
html:root body :is(.learn-say, .sound-toggle, .drill-exit) svg { width: 1.25rem; height: 1.25rem; }
html:root body :is(.learn-say, .sound-toggle, .drill-exit, .drill-option__mark) svg path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html:root body :is(.learn-say, .sound-toggle) svg path:first-child { fill: currentColor; stroke-width: 1; }

html:root body .vocab-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
html:root body .vocab-list li { display: grid; grid-template-columns: minmax(9rem, 16rem) minmax(0, 1fr) auto; gap: .35rem 1.25rem; align-items: center; padding: .7rem .25rem; border-bottom: 1px solid var(--line); }
html:root body .vocab-list__term { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .4rem; }
html:root body .vocab-list__term strong { color: var(--ink); font-size: 1.0625rem; }
html:root body .vocab-list__term em { color: var(--muted); font-size: .875rem; }
html:root body .vocab-list__term .learn-say { width: 1.75rem; height: 1.75rem; margin-left: 0; border: 0; }
html:root body .vocab-list__meaning { color: var(--ink-soft); line-height: 1.45; }
html:root body .vocab-list li.is-learned .vocab-list__term strong { box-shadow: inset 0 -.4em var(--accent-soft); }
html:root body .vocab-list__tally { display: flex; gap: .35rem; font-size: .875rem; font-variant-numeric: tabular-nums; }
html:root body .vocab-list__tally span { min-width: 1.75rem; padding: .1rem .35rem; text-align: center; }
html:root body .vocab-list__right { background: var(--accent-soft); color: var(--positive); }
html:root body .vocab-list__wrong { background: var(--mist); color: var(--muted); }
html:root body .vocab-list__wrong.is-some { background: var(--danger-soft); color: var(--danger); font-weight: 700; }

html:root body .vocab-term { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; }
html:root body .vocab-term__word { color: var(--ink); font-size: clamp(2.25rem, 9vw, 4.25rem); font-weight: 800; font-stretch: 75%; line-height: 1; letter-spacing: -.02em; overflow-wrap: anywhere; }
html:root body .vocab-term__meta { display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin: .6rem 0 0; color: var(--muted); font-size: 1.0625rem; }
html:root body .vocab-term__pos { font-style: italic; }
html:root body .vocab-example { margin: 0; color: var(--ink-soft); font-size: 1.0625rem; line-height: 1.55; }
html:root body .vocab-example strong { color: var(--ink); box-shadow: inset 0 -.4em var(--accent-soft); }
html:root body .vocab-detail { display: grid; gap: .5rem; }
html:root body .vocab-detail p { margin: 0; }
html:root body .vocab-detail__head { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; }
html:root body .vocab-detail__term { color: var(--ink); font-size: 1.375rem; font-stretch: 85%; }
html:root body .vocab-detail__say, html:root body .vocab-detail__pos { color: var(--muted); }
html:root body .vocab-detail__pos { font-style: italic; }
html:root body .vocab-detail__meaning { color: var(--ink); font-size: 1.125rem; font-weight: 700; }
html:root body .vocab-detail__english { color: var(--ink-soft); }
/* A set asked from the definition (AP Biology): the definition is the question,
   and after a wrong choice the answer and the chosen term are set side by side. */
html:root body .vocab-definition { max-width: 42rem; margin: 0; color: var(--ink); font-size: clamp(1.25rem, 3.6vw, 1.75rem); font-weight: 650; line-height: 1.4; }
html:root body .vocab-detail--term { align-content: start; padding-left: .9rem; border-left: 3px solid var(--positive); }
html:root body .vocab-detail--term + .vocab-detail--term { border-left-color: var(--danger); }
html:root body .vocab-detail__label { color: var(--positive); font-size: .8125rem; font-weight: 700; }
html:root body .vocab-detail--term + .vocab-detail--term .vocab-detail__label { color: var(--danger); }
html:root body .vocab-detail__name { color: var(--muted); }
html:root body .vocab-detail__definition { color: var(--ink); font-size: 1.0625rem; line-height: 1.55; }
html:root body .vocab-detail--term .vocab-example { font-size: 1rem; }
html:root body .vocab-example__label { color: var(--muted); font-size: .8125rem; font-weight: 700; }
html:root body .drill-after--pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
@media (min-width: 760px) { html:root body .drill-after--pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; } }

/* ── Formulas ───────────────────────────────────────────────────────── */
html:root body .formula-sheet { margin: 0 0 2rem; padding: 0; list-style: none; border-top: 1px solid var(--line); }
html:root body .formula-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: .25rem 1.5rem; align-items: center; padding: .9rem .25rem; border-bottom: 1px solid var(--line); }
html:root body .formula-row__name { color: var(--ink); font-size: 1.0625rem; }
html:root body .formula-row__math { grid-row: span 2; color: var(--ink); font-size: 1.2rem; overflow-x: auto; overflow-y: hidden; padding: .2rem 0; }
html:root body .formula-row__use { color: var(--muted); font-size: .9375rem; line-height: 1.45; }
html:root body .formula-sheet--small { margin: .75rem 0 0; }
html:root body .formula-sheet--small .formula-row { padding: .6rem 0; }
html:root body .formula-prompt { margin: 0; color: var(--ink); font-size: clamp(1.15rem, 2.6vw, 1.4rem); font-weight: 600; line-height: 1.5; }
html:root body .formula-option { display: block; overflow-x: auto; overflow-y: hidden; }
html:root body .formula-after__why { margin: 0; color: var(--ink-soft); line-height: 1.6; }
html:root body .level-chip { display: inline-block; padding: .1rem .5rem; font-size: .8125rem; font-weight: 700; }
html:root body .level-chip--easy { background: var(--accent-soft); color: var(--positive); }
html:root body .level-chip--medium { background: var(--warning-soft); color: var(--warning); }
html:root body .level-chip--hard { background: var(--danger-soft); color: var(--danger); }

/* ── The drill ──────────────────────────────────────────────────────── */
html:root body .drill { max-width: 42rem; margin: 0 auto; scroll-margin-top: calc(var(--nav-height) + 1rem); }
html:root body .drill-bar { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem; }
html:root body :is(.drill-exit, .sound-toggle) { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; padding: 0; background: none; border: 1.5px solid var(--line-strong); color: var(--ink-soft); cursor: pointer; }
@media (hover: hover) { html:root body :is(.drill-exit, .sound-toggle):hover { background: var(--mist); color: var(--ink); } }
html:root body .sound-toggle[aria-pressed="false"] { color: var(--muted); }
html:root body .drill-progress { flex: 1; height: .625rem; overflow: hidden; background: var(--mist); }
html:root body .drill-progress__fill { display: block; height: 100%; background: var(--lime); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
html:root body .drill-count { color: var(--muted); font-size: .9375rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
html:root body .drill-combo { display: inline-flex; align-items: center; gap: .2rem; padding: .2rem .5rem; background: var(--accent-soft); color: var(--ink); font-variant-numeric: tabular-nums; }
html:root body .drill-combo[hidden] { display: none; }
html:root body .drill-combo svg { width: 1rem; height: 1rem; color: var(--drill-bolt); }
html:root body .drill-combo__label { margin-left: .15rem; color: var(--muted); font-size: .8125rem; font-weight: 400; }
@media (max-width: 420px) { html:root body .drill-combo__label { display: none; } }
html:root body :is(.drill-combo, .drill-streak) svg path { fill: currentColor; }
html:root body .drill-combo.is-pop { animation: drill-pop .32s cubic-bezier(.2, 1.6, .4, 1); }
html:root:root:root:root body .drill-combo { border-radius: var(--r-xs) !important; }

html:root body .drill-card { animation: drill-in .26s var(--ease); }
html:root body .drill-tag { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0 0 .9rem; color: var(--muted); font-size: .9375rem; font-weight: 600; }
html:root body .drill-prompt { margin-bottom: 1.75rem; }
html:root body .drill-hint { margin: -.75rem 0 1.5rem; padding: .8rem 1rem; background: var(--mist); border-left: 4px solid var(--line-strong); }
html:root body .drill-hint[hidden] { display: none; }

html:root body .drill-options { display: grid; gap: .625rem; margin: 0; padding: 0; list-style: none; }
html:root body .drill-option { position: relative; display: grid; grid-template-columns: 2rem minmax(0, 1fr) 1.5rem; gap: .85rem; align-items: center; width: 100%; min-height: 3.5rem; padding: .75rem 1rem; overflow: hidden; background: var(--paper); border: 1.5px solid var(--line-strong); color: var(--ink); font: inherit; font-size: 1.0625rem; line-height: 1.4; text-align: left; cursor: pointer; transition: border-color .14s var(--ease), background-color .14s var(--ease), transform .12s var(--ease); }
html:root body .drill-option::before { content: ""; position: absolute; inset: 0; background: var(--drill-right); transform: scaleX(0); transform-origin: left; transition: transform .42s cubic-bezier(.3, .8, .3, 1); }
html:root body .drill-option > * { position: relative; }
@media (hover: hover) { html:root body .drill-option:not(:disabled):hover { border-color: var(--brand); background: var(--brand-soft); } }
html:root body .drill-option:not(:disabled):active { transform: scale(.992); }
html:root body .drill-option:disabled { cursor: default; opacity: 1; }
html:root body .drill-option:disabled:not(.is-right, .is-wrong) { color: var(--muted); border-color: var(--line); }
html:root body .drill-option__key { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1.5px solid var(--line-strong); color: var(--muted); font-size: .9375rem; font-weight: 700; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
html:root body .drill-option__mark { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; }
html:root body .drill-option__mark svg { width: 1.5rem; height: 1.5rem; }
html:root body .drill-option__mark svg path { stroke-width: 2.6; stroke-dasharray: 30; stroke-dashoffset: 30; animation: drill-draw .3s .22s var(--ease) forwards; }

/* Right: the bar fills from the left, then the tick is drawn. */
html:root body .drill-option.is-right { border-color: var(--drill-right); color: var(--drill-right-ink); font-weight: 700; }
html:root body .drill-option.is-right::before { transform: scaleX(1); }
html:root body .drill-option.is-right .drill-option__key { background: var(--drill-right-ink); border-color: var(--drill-right-ink); color: #fff; }
/* The right answer shown after a miss fills more slowly, so the eye follows it. */
html:root body .drill-option.is-shown::before { transition-duration: .7s; transition-delay: .18s; }
html:root body .drill-option.is-wrong { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); animation: drill-shake .34s var(--ease); }
html:root body .drill-option.is-wrong .drill-option__key { border-color: var(--danger); color: var(--danger); }

html:root body .drill-feedback { min-height: 1.6rem; margin: 1rem 0 0; font-weight: 700; }
html:root body .drill-feedback.is-right { color: var(--positive); }
html:root body .drill-feedback.is-wrong { color: var(--danger); }
html:root body .drill-after { margin-top: 1rem; padding: 1rem 1.15rem; background: var(--mist); animation: drill-in .26s var(--ease); }
html:root body .drill-after[hidden] { display: none; }
html:root body .drill-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; margin-top: 1.25rem; min-height: 2.875rem; }
html:root body .drill-actions .drill-next { margin-left: auto; min-width: 9rem; }

/* The end of a round: the steps of the logo light up to the score. */
html:root body .drill-done { text-align: center; animation: drill-in .3s var(--ease); }
html:root body .drill-score { display: flex; align-items: flex-end; justify-content: center; gap: 1.25rem; margin-bottom: 1.25rem; }
html:root body .drill-steps { display: flex; align-items: flex-end; gap: .3rem; height: 5.5rem; }
html:root body .drill-steps span { width: 1.15rem; background: var(--mist); transition: background-color .3s var(--ease); }
html:root body .drill-steps span:nth-child(1) { height: 28%; }
html:root body .drill-steps span:nth-child(2) { height: 46%; }
html:root body .drill-steps span:nth-child(3) { height: 64%; }
html:root body .drill-steps span:nth-child(4) { height: 82%; }
html:root body .drill-steps span:nth-child(5) { height: 100%; }
html:root body .drill-steps span.is-on { background: var(--lime); }
html:root body .drill-steps span.is-on:nth-child(2) { transition-delay: .12s; }
html:root body .drill-steps span.is-on:nth-child(3) { transition-delay: .24s; }
html:root body .drill-steps span.is-on:nth-child(4) { transition-delay: .36s; }
html:root body .drill-steps span.is-on:nth-child(5) { transition-delay: .48s; }
html:root body .drill-score__number { color: var(--ink); font-size: clamp(3.5rem, 13vw, 5.5rem); font-weight: 800; font-stretch: 75%; line-height: .85; font-variant-numeric: tabular-nums; }
html:root body .drill-done__title { margin: 0 0 .4rem; font-size: clamp(1.5rem, 4vw, 2.1rem); outline: none; }
html:root body .drill-done__line { margin: 0 0 1.5rem; color: var(--ink-soft); font-size: 1.0625rem; }
html:root body .drill-stats { display: flex; justify-content: center; gap: clamp(1.25rem, 6vw, 3rem); margin: 0 0 1.5rem; }
html:root body .drill-stats div { display: grid; gap: .1rem; }
html:root body .drill-stats dd { margin: 0; color: var(--ink); font-size: 1.75rem; font-weight: 750; font-stretch: 85%; font-variant-numeric: tabular-nums; }
html:root body .drill-stats dt { color: var(--muted); font-size: .9375rem; font-weight: 400; }
html:root body .drill-streak { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 1.75rem; padding: .5rem .9rem; background: var(--accent-soft); color: var(--ink); font-weight: 700; }
html:root body .drill-streak svg { width: 1.2rem; height: 1.2rem; flex: none; color: var(--drill-flame); }
html:root:root:root body .drill-streak { border-radius: var(--r-ctl) !important; }
html:root body .drill-missed { margin: 0 auto 1.75rem; padding: 1rem 1.15rem; max-width: 34rem; background: var(--mist); text-align: left; }
html:root body .drill-missed h3 { margin: 0 0 .5rem; font-size: 1.0625rem; }
html:root body .drill-missed ul { margin: 0; padding: 0; list-style: none; }
html:root body .drill-missed li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .15rem 1rem; padding: .5rem 0; border-top: 1px solid var(--line); }
html:root body .drill-missed__label { min-width: 0; color: var(--ink-soft); }
html:root body .drill-missed__label strong { color: var(--ink); }
html:root body .drill-missed__count { color: var(--danger); font-size: .875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
html:root body .drill-done__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .625rem; }

html:root body .fx-canvas { position: fixed; inset: 0; z-index: 2000; width: 100%; height: 100%; pointer-events: none; }

@keyframes drill-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes drill-pop { from { transform: scale(1.35); } to { transform: scale(1); } }
@keyframes drill-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } }
@keyframes drill-draw { to { stroke-dashoffset: 0; } }

@media (max-width: 40rem) {
  html:root body .learn-unit { grid-template-columns: 2rem minmax(0, 1fr); }
  html:root body .learn-unit__number { width: 2rem; height: 2rem; }
  html:root body .learn-unit__state { grid-column: 2; grid-template-columns: auto 1fr; align-items: center; gap: .6rem; }
  html:root body .vocab-list li { grid-template-columns: minmax(0, 1fr) auto; }
  html:root body .vocab-list__meaning { grid-column: 1 / -1; grid-row: 2; }
  html:root body .formula-row { grid-template-columns: minmax(0, 1fr); }
  html:root body .formula-row__math { grid-row: auto; }
  html:root body .drill-bar { gap: .5rem; }
  html:root body .drill-option { padding: .7rem .8rem; gap: .65rem; }
  html:root body .drill-actions .drill-next { flex: 1 1 100%; order: -1; margin-left: 0; }
  html:root body .drill-lookback__nav .drill-next { flex: 1 1 100%; order: -1; margin-left: 0; }
  html:root body .drill-lookback__nav .drill-secondary { flex: 1 1 0; }
  /* The way back stays in reach under a long card. */
  html:root body .drill-lookback__nav { position: sticky; bottom: 0; z-index: 2; margin-inline: -.25rem; padding: .6rem .25rem max(.6rem, env(safe-area-inset-bottom)); background: var(--canvas, var(--paper)); border-top: 1px solid var(--line); }
  html:root body :is(.learn-start__actions, .drill-done__actions) > * { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html:root body .drill-option__mark svg path { stroke-dashoffset: 0; }
}

/* ── Question bank: unit → knowledge points → round ─────────────────── */
html:root:root body[data-page="practice"] .flow-step { margin-top: 1.75rem; }
html:root:root body[data-page="practice"] .flow-step[hidden] { display: none; }
html:root:root body[data-page="practice"] .flow-step:first-of-type { margin-top: .25rem; }
html:root:root body[data-page="practice"] .flow-step__title { display: flex; align-items: center; gap: .65rem; margin: 0 0 .9rem; color: var(--ink); font-size: 1.1875rem; line-height: 1.25; }
html:root:root body[data-page="practice"] .flow-step__n { display: grid; place-items: center; flex: none; width: 1.75rem; height: 1.75rem; background: var(--brand); color: var(--on-brand); font-size: .9375rem; font-weight: 750; font-stretch: 100%; font-variant-numeric: tabular-nums; }
html:root:root body[data-page="practice"] .flow-hint { margin: .75rem 0 0; color: var(--muted); font-size: .9375rem; }
html:root:root body[data-page="practice"] .flow-hint[hidden] { display: none; }
html:root:root body[data-page="practice"] .flow-estimate { margin: .6rem 0 0; color: var(--muted); font-size: .9375rem; font-variant-numeric: tabular-nums; }
html:root:root body[data-page="practice"] .flow-estimate:empty { display: none; }

html:root:root body[data-page="practice"] .unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .5rem; margin-bottom: 0; }
html:root:root body[data-page="practice"] .unit-choice { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: .1rem .7rem; align-items: center; padding: .7rem .85rem; text-align: left; line-height: 1.3; }
html:root:root body[data-page="practice"] .unit-choice__n { grid-row: 1 / 3; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; background: var(--mist); color: var(--ink); font-weight: 750; font-variant-numeric: tabular-nums; }
html:root:root body[data-page="practice"] .unit-choice__name { font-weight: 700; }
html:root:root body[data-page="practice"] .unit-choice__count { grid-column: 2; color: var(--muted); font-size: .875rem; font-weight: 400; font-variant-numeric: tabular-nums; }
html:root:root body[data-page="practice"] .unit-choice--all { grid-template-columns: minmax(0, 1fr); border-style: dashed; }
html:root:root body[data-page="practice"] .unit-choice--all .unit-choice__count { grid-column: 1; }
html:root:root body[data-page="practice"] .unit-choice.selected .unit-choice__n { background: var(--lime); color: var(--navy-deep); }
html:root:root body[data-page="practice"] .unit-choice.selected .unit-choice__count { color: inherit; opacity: .8; }

html:root:root body[data-page="practice"] .unit-about { margin-bottom: 1.1rem; padding: 1rem 1.15rem; background: var(--mist); border-left: 6px solid var(--lime); animation: drill-in .26s var(--ease); }
html:root:root body[data-page="practice"] .unit-about p { margin: 0; }
html:root:root body[data-page="practice"] .unit-about__name { color: var(--ink); font-size: 1.125rem; font-weight: 750; font-stretch: 88%; }
html:root:root body[data-page="practice"] .unit-about__summary { margin-top: .35rem; color: var(--ink-soft); line-height: 1.6; }
html:root:root body[data-page="practice"] .unit-about__links { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; margin-top: .75rem; font-size: .9375rem; }
html:root:root body[data-page="practice"] .unit-about__links a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
html:root:root body[data-page="practice"] .unit-formulas { margin-top: .75rem; }
html:root:root body[data-page="practice"] .unit-formulas summary { color: var(--brand); font-weight: 600; cursor: pointer; }
html:root:root body[data-page="practice"] .unit-formulas ul { display: grid; gap: .5rem; margin: .75rem 0 0; padding: 0; list-style: none; }
html:root:root body[data-page="practice"] .unit-formulas li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: .25rem 1rem; align-items: center; padding-top: .5rem; border-top: 1px solid var(--line); }
html:root:root body[data-page="practice"] .unit-formulas__name { color: var(--ink); font-weight: 600; }
html:root:root body[data-page="practice"] .unit-formulas__math { overflow-x: auto; overflow-y: hidden; color: var(--ink); }

html:root:root body[data-page="practice"] .point-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin-bottom: .6rem; }
html:root:root body[data-page="practice"] .point-tools__count { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
html:root:root body[data-page="practice"] .point-list { display: grid; gap: .375rem; margin: 0; padding: 0; list-style: none; }
html:root:root body[data-page="practice"] .point-row { display: grid; grid-template-columns: 1.5rem auto minmax(0, 1fr) auto; gap: .75rem; align-items: start; width: 100%; padding: .65rem .8rem; background: var(--paper); border: 1.5px solid var(--line); color: var(--muted); font: inherit; text-align: left; cursor: pointer; transition: border-color .14s var(--ease), background-color .14s var(--ease); }
@media (hover: hover) { html:root:root body[data-page="practice"] .point-row:hover { border-color: var(--brand); } }
html:root:root body[data-page="practice"] .point-row__check { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border: 1.5px solid var(--line-strong); background: var(--paper); }
html:root:root body[data-page="practice"] .point-row__check svg { width: 1.1rem; height: 1.1rem; opacity: 0; }
html:root:root body[data-page="practice"] .point-row__check svg path { fill: none; stroke: var(--navy-deep); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
html:root:root body[data-page="practice"] .point-row__id { min-width: 2.1rem; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.5rem; }
html:root:root body[data-page="practice"] .point-row__text { display: grid; gap: .1rem; min-width: 0; }
html:root:root body[data-page="practice"] .point-row__text strong { font-weight: 600; line-height: 1.5rem; }
html:root:root body[data-page="practice"] .point-row__summary { color: var(--muted); font-size: .9375rem; line-height: 1.45; }
html:root:root body[data-page="practice"] .point-row__count { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; line-height: 1.5rem; }
html:root:root body[data-page="practice"] .point-row:not(.selected) .point-row__id { grid-column: 2; }
html:root:root body[data-page="practice"] .point-row.selected { border-color: var(--line-strong); color: var(--ink); }
html:root:root body[data-page="practice"] .point-row.selected .point-row__check { background: var(--lime); border-color: var(--lime); }
html:root:root body[data-page="practice"] .point-row.selected .point-row__check svg { opacity: 1; }
html:root:root body[data-page="practice"] .point-row.selected .point-row__id { color: var(--ink); }
html:root:root body[data-page="practice"] .topic-filter .point-tools { margin-top: .75rem; }
html:root:root body[data-page="practice"] .topic-filter .topic-group { margin-top: 1rem; }

html:root:root body[data-page="practice"] .config-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0 1.5rem; }
html:root:root body[data-page="practice"] .mode-selector--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html:root:root body[data-page="practice"] #start-practice-btn { margin-top: 1.5rem !important; }

/* ── Question bank: the round ───────────────────────────────────────── */
html:root:root body[data-page="practice"] .progress-fill { transition: width .45s cubic-bezier(.2, .7, .2, 1); }
html:root:root body[data-page="practice"] .combo-item { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
html:root:root body[data-page="practice"] .combo-item[hidden], html:root:root body[data-page="practice"] .timer-item[hidden] { display: none; }
html:root:root body[data-page="practice"] .combo-item svg { color: var(--drill-bolt); }
html:root:root body[data-page="practice"] .combo-item.is-pop { animation: drill-pop .32s cubic-bezier(.2, 1.6, .4, 1); }
html:root:root body[data-page="practice"] .timer-item { font-variant-numeric: tabular-nums; }
html:root:root body[data-page="practice"] .timer-item.is-low { color: var(--warning); font-weight: 700; }
html:root:root body[data-page="practice"] .timer-item.is-over { color: var(--danger); font-weight: 700; }
html:root:root body[data-page="practice"] .timer-item.is-paused #practice-timer { opacity: .55; }
html:root:root body[data-page="practice"] .timer-pause { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; margin-left: .15rem; padding: 0; background: none; border: 1.5px solid var(--line-strong); color: var(--ink-soft); cursor: pointer; }
@media (hover: hover) { html:root:root body[data-page="practice"] .timer-pause:hover { background: var(--mist); color: var(--ink); } }
html:root:root body[data-page="practice"] .timer-pause__play, html:root:root body[data-page="practice"] .timer-pause[aria-pressed="true"] .timer-pause__bars { display: none; }
html:root:root body[data-page="practice"] .timer-pause[aria-pressed="true"] .timer-pause__play { display: inline; }
html:root:root body[data-page="practice"] .practice-topbar .sound-toggle { width: 2rem; height: 2rem; }
html:root:root body[data-page="practice"] .practice-topbar .sound-toggle svg { width: 1.1rem; height: 1.1rem; }
html:root:root body[data-page="practice"] .pause-cover { max-width: 30rem; margin: 4rem auto; padding: 0 1.5rem; text-align: center; }
html:root:root body[data-page="practice"] .pause-cover[hidden] { display: none; }
html:root:root body[data-page="practice"] .pause-cover p { margin: 0 0 1.25rem; color: var(--ink); font-size: 1.125rem; font-weight: 600; }
html:root:root body[data-page="practice"] .practice-main.is-paused { display: none; }

html:root:root body[data-page="practice"] .question-card.is-entering { animation: drill-in .26s var(--ease); }
html:root:root body[data-page="practice"] .question-text { font-stretch: 100%; font-weight: 600; font-size: clamp(1.0625rem, 2.2vw, 1.25rem); line-height: 1.6; letter-spacing: 0; }
html:root:root body[data-page="practice"] .option-btn { position: relative; }
html:root:root body[data-page="practice"] .option-btn .option-text-wrap { flex: 1; min-width: 0; }
html:root:root body[data-page="practice"] .option-btn .option-tick { order: 3; flex: none; width: 1.5rem; height: 1.5rem; align-self: center; }
html:root:root body[data-page="practice"] .option-btn .option-tick path { fill: none; stroke: var(--drill-right-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
/* The right answer is the logo's lime. When it has just been chosen the
   colour sweeps in from the left and the tick is drawn after it. */
html:root:root body[data-page="practice"] .option-btn.state-correct { border-color: var(--drill-right); background: linear-gradient(var(--drill-right), var(--drill-right)) left / 100% 100% no-repeat var(--paper); color: var(--drill-right-ink); }
html:root:root body[data-page="practice"] .option-btn.state-correct :is(.option-text, .option-sub-explanation) { color: var(--drill-right-ink); }
html:root:root body[data-page="practice"] .option-btn.state-correct .option-text { font-weight: 700; }
html:root:root body[data-page="practice"] .option-btn.state-correct .option-label { background: var(--drill-right-ink); color: #fff; }
html:root:root body[data-page="practice"] .option-btn.just-right { animation: option-sweep .44s cubic-bezier(.3, .8, .3, 1) both; }
html:root:root body[data-page="practice"] .option-btn.just-right .option-tick path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: drill-draw .3s .24s var(--ease) forwards; }
html:root:root body[data-page="practice"] .option-btn.just-wrong { animation: drill-shake .34s var(--ease); }
@keyframes option-sweep { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }

/* The results, with the same staircase score as the drills. */
html:root:root body[data-page="practice"] .completion-wrapper { max-width: 44rem; }
html:root:root body[data-page="practice"] .completion-stats { display: block; margin-bottom: 1.75rem; }
html:root:root body[data-page="practice"] .completion-stats .drill-score { margin-top: 1.5rem; }
html:root:root body[data-page="practice"] .completion-stats .drill-stats { flex-wrap: wrap; gap: 1rem clamp(1.25rem, 4vw, 2.5rem); }
html:root:root body[data-page="practice"] .point-result { margin: 0 auto; max-width: 36rem; padding: 1rem 1.15rem; background: var(--mist); text-align: left; }
html:root:root:root:root body[data-page="practice"] :is(.point-result, .unit-about) { border-radius: var(--r-card) !important; }
html:root:root:root:root body[data-page="practice"] .unit-about { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
html:root:root body[data-page="practice"] .point-result h3 { margin: 0 0 .5rem; font-size: 1.0625rem; }
html:root:root body[data-page="practice"] .point-result ul { margin: 0; padding: 0; list-style: none; }
html:root:root body[data-page="practice"] .point-result li { display: grid; grid-template-columns: minmax(0, 1fr) 6rem auto; gap: .75rem; align-items: center; padding: .5rem 0; border-top: 1px solid var(--line); }
html:root:root body[data-page="practice"] .point-result__name { min-width: 0; color: var(--ink-soft); line-height: 1.4; }
html:root:root body[data-page="practice"] .point-result__name .point-row__id { color: var(--muted); font-weight: 700; }
html:root:root body[data-page="practice"] .point-result__bar { display: block; height: .5rem; overflow: hidden; background: var(--paper); }
html:root:root body[data-page="practice"] .point-result__bar span { display: block; height: 100%; background: var(--lime); transform-origin: left; }
html:root:root body[data-page="practice"] .point-result__score { min-width: 3rem; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
html:root:root body[data-page="practice"] .point-result li.is-weak .point-result__bar span { background: var(--danger); }
html:root:root body[data-page="practice"] .point-result li.is-weak .point-result__score { color: var(--danger); }

@media (max-width: 40rem) {
  html:root:root body[data-page="practice"] .unit-grid { grid-template-columns: minmax(0, 1fr); }
  html:root:root body[data-page="practice"] .point-row { grid-template-columns: 1.5rem minmax(0, 1fr) auto; }
  html:root:root body[data-page="practice"] .point-row__id { display: none; }
  html:root:root body[data-page="practice"] .unit-formulas li { grid-template-columns: minmax(0, 1fr); }
  html:root:root body[data-page="practice"] .point-result li { grid-template-columns: minmax(0, 1fr) auto; }
  html:root:root body[data-page="practice"] .point-result__bar { grid-column: 1 / -1; grid-row: 2; }
  /* "Next" stays within reach under a long explanation. */
  html:root:root body[data-page="practice"] .practice-action-row { position: sticky; bottom: 0; z-index: 5; margin-inline: calc(-1 * var(--gutter)); padding: .75rem var(--gutter) calc(.75rem + env(safe-area-inset-bottom)); background: var(--canvas); border-top: 1px solid var(--line); }
}
html:root:root body[data-page="practice"] .completion-wrapper { padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1rem, 4vw, 2.5rem); text-align: center; }
html:root:root body[data-page="practice"] .ref-sheet-link { background: var(--paper); color: var(--brand); }
html:root:root body[data-page="practice"] .point-row:disabled { cursor: default; }
@media (hover: hover) { html:root:root body[data-page="practice"] .point-row:disabled:hover { border-color: var(--line-strong); } }
/* The line above a question (course, unit, knowledge point) wraps as one sentence. */
html:root:root body[data-page="practice"] .question-breadcrumb { display: block; line-height: 1.6; }
html:root:root body[data-page="practice"] .question-breadcrumb .diff-badge { display: inline-block; margin-left: .25rem; vertical-align: baseline; }
@media (max-width: 40rem) {
  /* Long formulas as choices: a little smaller, and they scroll sideways rather than being cut. */
  html:root body .formula-option { font-size: .9375rem; -webkit-overflow-scrolling: touch; }
  html:root body .drill-option { grid-template-columns: 1.75rem minmax(0, 1fr) 1.25rem; }
  html:root body .drill-option__key { width: 1.75rem; height: 1.75rem; }
}

/* ── Readable word lists and formula lists (/vocabulary/<set>, /formulas/<subject>) ── */
html:root body .learn-page-lead { max-width: 44rem; margin: 0 0 1.25rem; font-size: 1.0625rem; line-height: 1.6; }
html:root body .learn-page-actions { margin: 0 0 2rem; }
html:root body .learn-page-toc { margin-bottom: 2.5rem; padding: 1rem 1.15rem; background: var(--mist); }
html:root body .learn-page-toc ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .35rem 1.5rem; margin: 0; padding: 0; list-style: none; }
html:root body .learn-page-toc a { color: var(--brand); text-decoration: underline; text-underline-offset: .2em; }
html:root body .learn-page-unit { margin-top: 3rem; scroll-margin-top: calc(var(--nav-height) + 1rem); }
html:root body .learn-page-unit h2 { margin: 0 0 .5rem; padding-top: .8rem; border-top: 4px solid var(--brand); font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
html:root body .learn-page-unit__n { color: var(--muted); font-size: .7em; font-weight: 600; font-stretch: 100%; margin-right: .35rem; }
html:root body .learn-page-unit__intro { max-width: 44rem; margin: 0 0 1.1rem; color: var(--ink-soft); line-height: 1.6; }
html:root body .learn-page-unit__go { margin: 1rem 0 0; }
html:root body .learn-page-unit .formula-sheet { margin-bottom: 0; }
html:root body .word-table-wrap { overflow-x: auto; }
html:root body .word-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
html:root body .word-table :is(th, td) { padding: .65rem .75rem .65rem .25rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.5; }
html:root body .word-table thead th { color: var(--muted); font-size: .875rem; font-weight: 600; border-bottom-color: var(--line-strong); }
html:root body .word-table tbody th { width: 24%; min-width: 9rem; font-weight: 400; }
html:root body .word-table tbody td:first-of-type { width: 30%; color: var(--ink); }
html:root body .word-table tbody td:last-child { color: var(--ink-soft); }
html:root body .word-table__term { color: var(--ink); font-weight: 700; }
html:root body .word-table__pos { color: var(--muted); font-size: .875rem; font-style: italic; }
/* A term's name in the reader's language, under the term. The English page has the term already. */
html:root body .word-table__name { display: block; color: var(--muted); font-size: .875rem; }
html[data-page-lang="en"]:root body .word-table__name { display: none; }
html:root body .learn-page-related { margin-top: 3.5rem; }
html:root body .learn-page-related h2, html:root body .learn-directory h2 { margin: 0 0 .75rem; padding-top: .8rem; border-top: 4px solid var(--brand); font-size: 1.25rem; }
html:root body .learn-page-related ul, html:root body .learn-directory__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .4rem 1.5rem; margin: 0; padding: 0; list-style: none; }
html:root body :is(.learn-page-related, .learn-directory) a { color: var(--brand); text-decoration: underline; text-underline-offset: .2em; }
html:root body .learn-directory { padding-top: 0; }
html:root body .learn-directory .learn-shell { min-height: 0; }
html:root body .learn-directory p { margin: 0 0 1rem; color: var(--muted); }
html:root body .learn-directory__count { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 40rem) {
  html:root body .word-table, html:root body .word-table tbody, html:root body .word-table tr, html:root body .word-table :is(th, td) { display: block; width: auto; }
  html:root body .word-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  html:root body .word-table tr { padding: .7rem 0; border-bottom: 1px solid var(--line); }
  html:root body .word-table :is(th, td) { padding: .1rem 0; border: 0; }
  html:root body .word-table tbody th, html:root body .word-table tbody td:first-of-type { width: auto; }
}

/* ── Practice: courses grouped by field ── */
html:root:root body[data-page="practice"] .field-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin: 0 0 1.25rem; }
html:root:root body[data-page="practice"] .field-back { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: .5rem .9rem .5rem .6rem; background: var(--paper); border: 1.5px solid var(--line-strong); color: var(--ink); font: inherit; font-size: .9375rem; font-weight: 600; cursor: pointer; }
@media (hover: hover) { html:root:root body[data-page="practice"] .field-back:hover { border-color: var(--brand); background: var(--mist); } }
html:root:root body[data-page="practice"] .field-title { margin: 0; color: var(--ink); font-size: 1.375rem; line-height: 1.3; }
html:root:root body[data-page="practice"] .field-title:focus { outline: none; }
html:root:root body[data-page="practice"] .field-hint { margin: 0; color: var(--muted); font-size: 1rem; }
html:root:root body[data-page="practice"] .subject-card--field .subject-meta .diff-badge { color: var(--ink); }

/* ── Vocabulary: several units in one round, and reset ── */
html:root body .learn-pick { display: flex; align-items: center; margin: 0 0 .25rem; }
html:root body .learn-pick-dock { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .75rem 0; background: var(--paper); border-top: 1px solid var(--line-strong); }
html:root body .learn-pick-dock[hidden] { display: none; }
html:root body .learn-pick__tally { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
html:root body .learn-unit-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: stretch; border-bottom: 1px solid var(--line); }
html:root body .learn-unit-row .learn-unit { border-bottom: 0; }
html:root body .learn-unit__pick { display: grid; place-items: center; min-width: 2.75rem; cursor: pointer; }
html:root body .learn-unit__pick input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--brand); cursor: pointer; }
html:root body .learn-reset { margin-top: 2rem; }
html:root body .learn-reset__sure { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; color: var(--ink); }
html:root body .learn-reset__sure[hidden] { display: none; }
html:root body .learn-reset__yes { min-height: 2.5rem; padding: .4rem 1rem; background: var(--paper); border: 1.5px solid var(--danger); color: var(--danger); font: inherit; font-weight: 700; cursor: pointer; }
@media (hover: hover) { html:root body .learn-reset__yes:hover { background: var(--danger); color: var(--paper); } }
html:root:root:root body .learn-reset__yes { border-radius: var(--r-ctl) !important; }
html:root body .learn-fold { border-bottom: 1px solid var(--line); }
html:root body .learn-fold > summary { padding: .9rem .25rem; cursor: pointer; }
html:root body .learn-fold > summary .learn-subtitle { display: inline; margin: 0; padding: 0; border: 0; font-size: 1.0625rem; }
html:root body .learn-fold > .vocab-list { margin-bottom: 1rem; }
@media (max-width: 40rem) {
  html:root body .learn-pick-dock .drill-next { flex: 1 1 auto; }
}
