/* Shared UI components: buttons, cards, chips, inputs, toggles, progress, avatars. */

/* ---- Buttons — THE press recipe (SINTEZA §5.1, round 2: the press is SEEN) ---------------------
   One recipe for every button in the app, in three shapes:
     · a filled CTA with a clay LIP (.btn--teal / --dark / --danger): a rounded rect
       (--r-control) standing on a darker lip drawn as box-shadow + the same margin-bottom.
       Pressed, it sinks by --lip-press (1px) and the lip shrinks by as much, so the bottom
       edge stays put — nothing below moves (border-bottom lips moved the page 1px per press) —
       AND it squeezes to --press-scale (.97);
     · a pill WITHOUT a lip (outline / cream / ghost) and a round icon button (.btn-icon):
       pressed = --press-scale + 6% ink over its fill;
     · any other pressable SURFACE (a card, a list row, a cell): .rz-press, below.
   Timing: the press goes in on --rz-press-in (100ms, fast but seen: the scale has to be watched
   going in) and comes back on --rz-press-out (280ms, long and soft) — a transition is read off
   the state you are going TO, so the :active rule carries the press-in timing. Colours change on
   --rz-instant. `translate` / `scale` are the individual properties, so the press composes with
   any transform a screen puts on a button. Scales go through --motion-distance (Reduce Motion
   keeps the tint and the 1px sink, loses the squeeze).
   Hover exists only where a hover exists — (hover: hover) and (pointer: fine) — so a tap on a
   phone never leaves a button stuck in its hover colour.
   Disabled has its own colours, never opacity. Busy: RZ.busy(btn, promise) in app.js. */
:root {
  --rz-press-s: calc(1 - (1 - var(--press-scale)) * var(--motion-distance));
  --rz-press-s-card: calc(1 - (1 - var(--press-scale-card)) * var(--motion-distance));
}
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-hover: var(--btn-bg);
  --btn-lip: transparent;
  --btn-lip-h: 0px;
  --btn-shade: var(--ink);          /* what a press darkens the fill with */
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: max(40px, var(--hit-min));    /* 40px under a mouse, 44px on touch */
  padding: 0 20px;
  border-radius: var(--r-control);    /* every button, filled or not: one squircle (Ștefan, 2026-10-24) */
  background-color: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 var(--btn-lip-h) 0 var(--btn-lip);
  margin-bottom: var(--btn-lip-h);
  transition:
    background-color var(--rz-instant-dur) var(--rz-instant),
    color var(--rz-instant-dur) var(--rz-instant),
    border-color var(--rz-instant-dur) var(--rz-instant),
    box-shadow var(--rz-press-out-dur) var(--rz-press-out),
    translate var(--rz-press-out-dur) var(--rz-press-out),
    scale var(--rz-press-out-dur) var(--rz-press-out);
}
.btn[hidden] { display: none; }   /* its display beats the UA [hidden] */

/* Filled, with a lip. */
.btn--teal { --btn-bg: var(--teal); --btn-fg: #FFFFFF; --btn-hover: var(--btn-teal-hover); --btn-lip: var(--teal-hover); }
.btn--dark { --btn-bg: var(--ink); --btn-fg: #FFFFFF; --btn-hover: var(--navy-2); --btn-lip: var(--k-sim-lip); --btn-shade: #000000; }
.btn--danger { --btn-bg: var(--error); --btn-fg: #FFFFFF; --btn-hover: color-mix(in srgb, var(--error) 92%, var(--ink)); --btn-lip: var(--late-deep); }
.btn--teal, .btn--dark, .btn--danger { --btn-lip-h: var(--lip-depth); border-radius: var(--r-control); }

/* No lip (same --r-control shape as the filled ones). */
.btn--outline { --btn-bg: var(--card); --btn-hover: var(--surface-3); border: 1px solid var(--border-2); }
.btn--cream { --btn-bg: var(--canvas); --btn-hover: #FFFFFF; }
.btn--ghost { --btn-hover: var(--surface-3); }
/* The outline on a dark surface (Evaluare's navy bar, beside a .btn--teal): a white hairline and
   label on the bar's own colour; hover and press lay a light veil over it. */
.btn--outline-dark { --btn-fg: #FFFFFF; --btn-hover: rgba(255, 255, 255, .1); --btn-shade: #FFFFFF; border: 1px solid rgba(255, 255, 255, .36); }
.btn--outline-dark:focus-visible { outline: var(--focus-ring-on-dark); }

.btn--lg { height: 52px; padding: 0 30px; font-size: 16px; }
.btn--xl { height: 54px; padding: 0 34px; font-size: 16.5px; }
/* Small: 34px to the eye (36px on touch), with a 44px invisible target (.hit, below). */
.btn--sm { height: 34px; padding: 0 15px; font-size: 13px; }
@media (pointer: coarse) { .btn--sm { height: 36px; } }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background-color: var(--btn-hover); color: var(--btn-fg); }
}

/* Pressed: in on --rz-press-in (every property, the colour included). */
.btn:active {
  transition-duration: var(--rz-press-in-dur);
  transition-timing-function: var(--rz-press-in);
  scale: var(--rz-press-s);
  background-color: color-mix(in srgb, var(--btn-bg) 94%, var(--btn-shade));
}
.btn--teal:active, .btn--dark:active, .btn--danger:active {
  translate: 0 var(--lip-press);
  box-shadow: 0 calc(var(--btn-lip-h) - var(--lip-press)) 0 var(--btn-lip);
  background-color: color-mix(in srgb, var(--btn-bg) 88%, var(--btn-shade));
}

/* Disabled: its own colours — the button reads as "not now", not as a faded copy of itself. */
.btn:disabled, .btn[aria-disabled="true"] {
  cursor: not-allowed;
  --btn-fg: var(--disabled-ink);
  --btn-hover: var(--btn-bg);
  translate: none;
  scale: none;
}
.btn--teal:is(:disabled, [aria-disabled="true"]),
.btn--dark:is(:disabled, [aria-disabled="true"]),
.btn--danger:is(:disabled, [aria-disabled="true"]) {
  --btn-bg: var(--disabled-fill);
  --btn-lip: var(--disabled-lip);
  box-shadow: 0 var(--btn-lip-h) 0 var(--btn-lip);
}
.btn--outline:is(:disabled, [aria-disabled="true"]) { border-color: var(--disabled-fill); }
.btn--outline-dark:is(:disabled, [aria-disabled="true"]) { --btn-fg: rgba(255, 255, 255, .45); border-color: rgba(255, 255, 255, .18); }
.btn:disabled:active, .btn[aria-disabled="true"]:active { background-color: var(--btn-bg); translate: none; scale: none; }

/* Busy (RZ.busy): no clicks from the first frame; after 300ms the label steps back and a
   spinner takes its place, the button keeping its width. */
.btn.is-pending { pointer-events: none; cursor: progress; }
.btn[aria-busy="true"] { color: transparent; }
.btn[aria-busy="true"]::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid var(--btn-fg);
  border-right-color: transparent;
  border-radius: var(--r-round); corner-shape: round;
  animation: rz-spin var(--rz-spin-dur) linear infinite;
}
@keyframes rz-spin { to { transform: rotate(1turn); } }

/* Windows High Contrast drops box-shadows, and with them the lip: draw an edge instead. */
@media (forced-colors: active) {
  .btn { border: 1px solid ButtonText; }
}

/* Round icon buttons: the same squeeze + tint. */
.btn-icon {
  transition:
    scale var(--rz-press-out-dur) var(--rz-press-out),
    background-color var(--rz-instant-dur) var(--rz-instant),
    color var(--rz-instant-dur) var(--rz-instant);
}
.btn-icon:active {
  transition-duration: var(--rz-press-in-dur);
  transition-timing-function: var(--rz-press-in);
  scale: var(--rz-press-s);
  background-image: linear-gradient(var(--press-tint), var(--press-tint));
}

/* .rz-x — THE close button of every window, sheet, panel, popover and card in the app (Ștefan,
   2026-10-24): the knowledge panel's square sand chip, 28px on --r-chip (a squircle where
   corner-shape exists), a 12px X. Markup: `<button type="button" class="rz-x hit"
   aria-label="Închide">` + the 24-viewBox X (`M18 6 6 18M6 6l12 12`); `.hit` gives the 44px
   target on touch. Never a round X, never a screen's own close recipe. */
.rz-x {
  --rz-x-bg: var(--sand);
  --rz-x-bg-on: #E7E0CE;
  --rz-x-ink: #6F6C66;
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: var(--r-chip);
  background: var(--rz-x-bg);
  color: var(--rz-x-ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--rz-instant-dur) var(--rz-instant), background-color var(--rz-instant-dur) var(--rz-instant), scale var(--rz-press-out-dur) var(--rz-press-out);
}
.rz-x svg { width: 12px; height: 12px; stroke-width: 2.5; flex: none; }
.rz-x[hidden] { display: none; }   /* its display beats the UA [hidden] (static/CLAUDE.md, CSS traps) */
@media (hover: hover) and (pointer: fine) { .rz-x:hover { background: var(--rz-x-bg-on); color: var(--ink); } }
.rz-x:active {
  transition-duration: var(--rz-press-in-dur);
  transition-timing-function: var(--rz-press-in);
  scale: var(--rz-press-s);
  background: var(--rz-x-bg-on);
  color: var(--ink);
}
.rz-x:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }
/* On a dark or teal head (the flashcard's teal head, the lightbox) the chip is a light veil. */
.rz-x--on-dark { --rz-x-bg: rgba(255, 255, 255, .18); --rz-x-bg-on: rgba(255, 255, 255, .34); --rz-x-ink: #FFFFFF; }
@media (hover: hover) and (pointer: fine) { .rz-x--on-dark:hover { color: #FFFFFF; } }
.rz-x--on-dark:active { color: #FFFFFF; }
.rz-x--on-dark:focus-visible { outline: var(--focus-ring-on-dark); }

/* .rz-press — THE press for any pressable surface that is not a .btn: cards, list rows, answer
   options, grid cells (scale(--press-scale-card) .98 + the 6% ink tint), and .rz-press--sm for
   chips and small controls (--press-scale .97). Add the class in the markup; no CSS needed.
   It animates `scale` (the individual property) and lays the tint as a background-IMAGE over the
   element's own fill, so it composes with the element's transform and colours. ⚠️ A screen rule
   that sets its own `transition` on the same element replaces this one: list
   `scale var(--rz-press-out-dur) var(--rz-press-out)` in it too, or the press snaps. */
.rz-press {
  -webkit-tap-highlight-color: transparent;
  transition: scale var(--rz-press-out-dur) var(--rz-press-out), background-color var(--rz-instant-dur) var(--rz-instant);
}
.rz-press:active {
  scale: var(--rz-press-s-card);
  background-image: linear-gradient(var(--press-tint), var(--press-tint));
  transition-duration: var(--rz-press-in-dur);
  transition-timing-function: var(--rz-press-in);
}
.rz-press--sm:active { scale: var(--rz-press-s); }
.rz-press:is(:disabled, [aria-disabled="true"], .is-locked):active { scale: none; background-image: none; }

/* The shared vocabularies' own buttons wear the same press (a scale + the tint laid OVER whatever
   fill they have): menu rows and cells as surfaces, the small ones as controls. */
.map-sel-go, .app-logout, .rail-item, .rail-toggle,
.sim-nav-page, .sim-cell, .sim-finish, .rp-kind, .seg-btn {
  transition: scale var(--rz-press-out-dur) var(--rz-press-out), background-color var(--rz-instant-dur) var(--rz-instant),
    border-color var(--rz-instant-dur) var(--rz-instant), color var(--rz-instant-dur) var(--rz-instant);
}
.map-sel-go:active, .app-logout:active, .rail-item:active,
.rail-toggle:active,
.sim-nav-page:active, .sim-cell:active, .sim-finish:active, .rp-kind:active, .seg-btn:active {
  scale: var(--rz-press-s);
  background-image: linear-gradient(var(--press-tint), var(--press-tint));
  transition-duration: var(--rz-press-in-dur);
  transition-timing-function: var(--rz-press-in);
}
.rail-item:active, .sim-cell:active, .sim-finish:active { scale: var(--rz-press-s-card); }
.sim-nav-page:disabled:active, .sim-finish:is(:disabled, .is-locked):active { scale: none; background-image: none; }

/* A target bigger than the drawing: 44px of invisible hit area on touch around a small control
   (40px under a mouse). Uses ::after; the busy spinner uses ::before. */
.hit, .btn--sm { position: relative; }
.hit::after, .btn--sm::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: max(100%, var(--hit-min));
  height: max(100%, var(--hit-min));
  transform: translate(-50%, -50%);
}

/* ---- Cards ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}

.card--lg { border-radius: var(--r-lg); }

/* ---- Chips / badges ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--r-pill); corner-shape: round;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
}

.chip--tint { background: var(--teal-tint); border-color: var(--teal-border); color: var(--teal-ink); }

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-pill); corner-shape: round;
  font-size: 11.5px;
  font-weight: 600;
}

.tag-pill--teal { background: var(--teal-tint); color: var(--teal-ink); }
.tag-pill--coral { background: #FCEAE4; color: var(--trap); }
.tag-pill--gold { background: #F9E9C8; color: var(--warn-ink); }
.tag-pill--navy { background: var(--ink); color: #FFFFFF; }

/* ---- Form fields ---- */
.field { display: flex; flex-direction: column; gap: 6px; }

.field-label { font-size: 12.5px; font-weight: 600; color: var(--slate); }

.input, .textarea {
  border-radius: var(--r-xs);
  border: 1px solid var(--border-2);
  padding: 0 13px;
  font-size: 14px;
  background: var(--card);
  outline: none;
  width: 100%;
}

.input { height: 42px; }

.textarea { min-height: 120px; resize: vertical; padding: 11px 13px; line-height: 1.55; }

.input:focus, .textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14, 124, 123, .12);
  outline: none;
}

/* ---- Segmented control ---- */
.seg {
  display: inline-flex;
  background: var(--sand);
  border-radius: var(--r-xs);
  padding: 3px;
  gap: 2px;
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: calc(var(--r-tile) - 3px);   /* concentric: .seg's radius minus its 3px inset */
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

@media (hover: hover) and (pointer: fine) { .seg-btn:hover { color: var(--ink); } }

.seg-btn.is-active { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(28, 27, 25, .08); }

/* ---- Toggle switch ---- */
.switch { position: relative; display: inline-flex; width: 40px; height: 23px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch-track {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: var(--r-pill); corner-shape: round;
  transition: background-color var(--rz-instant-dur) var(--rz-instant);
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 2.5px; left: 2.5px;
  width: 18px; height: 18px;
  border-radius: var(--r-round); corner-shape: round;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(28, 27, 25, .18);
  transition: transform var(--rz-instant-dur) var(--rz-instant);
}
.switch input:checked + .switch-track { background: var(--teal); }
.switch input:checked + .switch-track::after { transform: translateX(17px); }

/* ---- Progress bars ---- */
.pbar { height: 4px; background: var(--cream-line); border-radius: var(--r-pill); corner-shape: round; overflow: hidden; }
.pbar-fill { height: 100%; background: var(--teal); border-radius: var(--r-pill); corner-shape: round; }

/* ---- Avatars ---- */
.avatar {
  width: 34px; height: 34px;
  border-radius: var(--r-pill); corner-shape: round;
  overflow: hidden;
  background: var(--surface);
  border: 2px solid var(--canvas);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar svg { width: 100%; height: 100%; display: block; }

.avatar--initials {
  background: var(--ink);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-serif); font-variant-numeric: tabular-nums;
}

.avatar-stack { display: flex; }
.avatar-stack > * + * { margin-left: -9px; }

/* ---- Empty state ---- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}

/* ---- ReziDay logo lockup --------------------------------------------------
   Design «Logo ReziDay beta» (Ștefan, 2026-10-05), markup partials/brand_lockup.html.
   ONE definition for the whole app (components.css is loaded by base.html, so it
   reaches every page, the landing included).

   Everything is derived from ONE number, --brand-word-size (the wordmark's font size
   F), with the design's own proportions — it is drawn at F = 110px: the mark is 160px
   (1.4545F), the gap 26px (.2364F), the word sits 2px (.0182F) off the shared bottom
   edge, and "beta v2.0" is 18px (.1636F), 5px (.0455F) in, 2px under the word.
   Alignment is the design's too: mark and word share their BOTTOM edge
   (align-items: flex-end), the mark drawn in a plain 0..52 box — so the saucer hangs a
   touch below the baseline, the bowl sitting on it.

   A screen sizes its lockup by re-declaring --brand-word-size ONLY. Resizing one half
   (a font-size on .brand-word, a width on the svg) is what used to drift. */
.brand-lockup {
  --brand-word-size: 20.6px;   /* the chrome size: a 30px mark */
  position: relative;
  display: inline-flex; align-items: flex-end;
  gap: calc(var(--brand-word-size) * .2364);
  color: var(--ink);
}
@media (hover: hover) and (pointer: fine) { .brand-lockup:hover { color: var(--ink); } }
.brand-lockup svg {
  flex: none; display: block; overflow: visible;
  width: calc(var(--brand-word-size) * 1.4545);
  height: calc(var(--brand-word-size) * 1.4545);
}
.brand-text {
  position: relative; display: block;
  margin-bottom: calc(var(--brand-word-size) * .0182);
}
.brand-word {
  display: block;
  font-family: var(--font-logo);
  font-size: var(--brand-word-size, 20.6px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  color: var(--ink);
}
.brand-word span { color: var(--teal); }
/* Hangs under the word, out of flow (as drawn) — a lockup reserves no room for it; a
   screen that stacks things under the lockup adds .brand-lockup--room. At chrome sizes
   the design's .1636F would be ~3px, so it never drops under 9px. */
.brand-beta {
  position: absolute; left: calc(var(--brand-word-size) * .0455); top: 100%;
  margin-top: calc(var(--brand-word-size) * .0182);
  font-family: var(--font-logo);
  font-size: max(9px, calc(var(--brand-word-size) * .1636));
  font-weight: 700; letter-spacing: .01em; line-height: 1.15;
  white-space: nowrap;
  color: var(--muted);
}
.brand-beta span { color: var(--coral); }
.brand-lockup--room {
  padding-bottom: calc(max(9px, var(--brand-word-size) * .1636) * 1.15 + var(--brand-word-size) * .0182);
}

/* ---- Knowledge-map preview header (partials/map_preview.html) -------------
   Shared by the dashboard map and the lessons-index "Hartă", so it lives here
   rather than in either page's stylesheet. Hidden until a cell is clicked. */
.map-sel {
  display: flex;
  align-items: center;
  gap: 16px 22px;
  flex-wrap: wrap;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 18px;
  margin-bottom: 20px;
}
.map-sel[hidden] { display: none; }
.map-sel-swatch {
  width: 15px; height: 15px;
  border-radius: calc(5px * var(--rk));
  box-shadow: inset 0 0 0 1px rgba(15, 34, 48, .12);
  flex: none;
}
.map-sel-main { flex: 1; min-width: 170px; }
.map-sel-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.2;
}
.map-sel-meta { margin-top: 3px; font-size: 12px; color: var(--muted-2); }

.map-sel-stats { display: flex; gap: 22px; flex: none; }
.map-sel-stats[hidden] { display: none; }
.map-sel-stat-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.map-sel-stat-val {
  margin-top: 2px;
  /* a small figure: Inter, tabular (static/CLAUDE.md, the number rule) */
  font-family: var(--font-figure-ui);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

.map-sel-go {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--r-tile);
}
@media (hover: hover) and (pointer: fine) { .map-sel-go:hover { background: var(--btn-teal-hover); color: #FFFFFF; } }

@media (max-width: 767px) {
  /* The two stat tiles are the first thing to go when the row wraps. */
  .map-sel-stats { display: none; }
  .map-sel-go { flex: 1; justify-content: center; }
}

/* ---- Daily-target slider (from the Planner handoff) -----------------------
   /plan/'s "Obiective de studiu" (templates/plan.html, driven by planner.js). It
   came here when the onboarding wizard wore it too (that step was removed
   2026-10-12). ⚠️ It keeps its `pl-` prefix on purpose: partials/icons/plan_mood.html
   hardcodes `.pl-mood`. */
.pl-target { flex: 1 1 100%; min-width: 300px; display: flex; flex-direction: column; gap: 4px; padding-top: 6px; }
.pl-target-top { display: flex; align-items: baseline; gap: 8px; }
/* The number rule travels with the component — it used to ride planner.css's figure group,
   which the wizard never loads, so the target would have printed in the body face there. */
.pl-target-val {
  font-family: var(--font-figure);
  font-variant-numeric: tabular-nums;
  font-size: 26px; line-height: 1.1; font-weight: 600; letter-spacing: -0.01em;
  color: var(--teal-ink);
}
.pl-target-unit { font-size: 12.5px; color: var(--muted-2); }

.pl-slider { position: relative; height: 50px; display: flex; align-items: center; }
.pl-slider-rail {
  position: absolute; left: 0; right: 0;
  height: 12px; border-radius: var(--r-pill); corner-shape: round;
  background: var(--surface);
  box-shadow: inset 0 1px 2px rgba(28, 27, 25, .07);
}
/* --pl-t is the 0…1 position, written by the driving script. The 23px/46px pair is the
   face's own radius/width: the fill has to stop under its centre, not at the track's end. */
.pl-slider-fill {
  position: absolute; left: 0;
  height: 12px; border-radius: var(--r-pill); corner-shape: round;
  background: var(--teal);
  border-bottom: 2px solid var(--teal-hover);
  box-sizing: border-box;
  width: calc(23px + (100% - 46px) * var(--pl-t, 0));
}
.pl-slider-face {
  position: absolute; top: 50%;
  left: calc(23px + (100% - 46px) * var(--pl-t, 0));
  transform: translate(-50%, -50%);
  width: 46px; height: 46px;
  border-radius: var(--r-pill); corner-shape: round;
  background: #FFFFFF;
  border: 1.6px solid var(--ink);
  box-shadow: 0 4px 10px rgba(15, 34, 48, .16);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.pl-mood { display: flex; }
.pl-mood[hidden] { display: none; }
.pl-slider-input {
  position: absolute; left: 0;
  width: 100%; height: 50px;
  margin: 0;
  opacity: 0;
  cursor: grab;
}
.pl-slider-ticks { display: flex; justify-content: space-between; font-size: 12px; font-weight: 500; color: var(--muted-3); }

@media (max-width: 767px) {
  /* The 300px floor is what keeps the rail readable beside its label on /plan/; on a phone
     it is the whole row and would otherwise force the card to scroll. */
  .pl-target { min-width: 0; }
}

/* ============================================================================
   PROFILE FOOT — the bottom of both sticky rails (app sidebar + lesson rail).
   Markup: partials/profile_foot.html. Lives here rather than in shell.css
   because the lesson page has its own shell and never loads that file; each
   shell supplies only its own collapsed overrides (they collapse at different
   widths — 1279px for the app sidebar, 1479px for the lesson rail).
   ========================================================================== */

/* No bottom padding of its own: the rail's own bottom inset is the whole gap
   under the row, so there is one number to reason about when placing it. */
.app-sidebar-foot { padding: 10px 0 0; border-top: 1px solid var(--divider); }

.app-prof-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: var(--r-tile);
  cursor: pointer;
  color: inherit;
}
@media (hover: hover) and (pointer: fine) { .app-prof-row:hover { background: var(--surface); color: inherit; } }
.app-prof-row.is-active { background: var(--teal-tint); }

.app-prof-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: inherit; }
@media (hover: hover) and (pointer: fine) { .app-prof-link:hover { color: inherit; } }

.app-prof-avatar { width: 34px; height: 34px; flex: none; border-radius: var(--r-pill); corner-shape: round; overflow: hidden; background: var(--surface); }
.app-prof-body { min-width: 0; flex: 1; }
/* Both line-heights are tight enough that the two-line text stack stays under
   the avatar's 34px — the avatar is what sets the row's height, so the row is
   as short as the block can be without cropping the glyph. */
.app-prof-name { font-size: 14px; line-height: 1.3; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-prof-sub { font-size: 11px; line-height: 1.3; color: var(--muted-2); }

.app-logout {
  flex: none;
  width: 28px; height: 28px;
  border-radius: var(--r-chip);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-2);
}
@media (hover: hover) and (pointer: fine) { .app-logout:hover { background: var(--surface); color: var(--slate); } }

/* ── The assistant's empty state (`.ksb-start`) ────────────────────────────────
   The three right columns: the lesson's (partials/ksb_empty.html), the study screen's
   (progress/revamp.html) and the app-wide dock's (partials/assistant_dock.html); each keeps its
   own hooks (#ksb-chat-empty, [data-asst-empty], [data-dock-empty]).
   Centred in the log, both ways: the live mark, a serif title, one line saying what this
   assistant is given, then a few small chips of what it does (`.ksb-chip`: 32px, 36px on touch
   with the 44px target of `.hit`; they wrap, centred). `margin-block: auto` centres it in the
   log's flex column and a log shorter than it (a phone's sheet at its medium detent) still
   scrolls from its top, which `justify-content: center` would cut. */
.ksb-start {
  margin-block: auto; box-sizing: border-box; width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 0 20px; text-align: center;
}
.ksb-start[hidden] { display: none; }
.ksb-start > .ksb-syn { flex: none; margin-bottom: 6px; }
.ksb-start-t { margin: 0; font-family: var(--font-serif); font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.ksb-start-p { margin: 0; max-width: 300px; font-size: 14px; line-height: 21px; color: var(--muted); text-wrap: balance; }
.ksb-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.ksb-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 12px 0 10px;
  border: 1px solid var(--border); border-radius: var(--r-chip);
  background: var(--card); color: var(--ink);
  font-family: var(--font-body); font-size: 13px; line-height: 18px; font-weight: 500; text-align: left; cursor: pointer;
  transition: border-color var(--rz-instant-dur) var(--rz-instant), background-color var(--rz-instant-dur) var(--rz-instant),
    color var(--rz-instant-dur) var(--rz-instant), scale var(--rz-press-out-dur) var(--rz-press-out);
}
.ksb-chip svg { flex: none; width: 14px; height: 14px; color: var(--teal); }
@media (hover: hover) and (pointer: fine) { .ksb-chip:not(:disabled):hover { border-color: var(--teal-border); background: var(--teal-tint-2); } }
.ksb-chip:not(:disabled):active { transition-duration: var(--rz-press-in-dur); transition-timing-function: var(--rz-press-in); background: var(--teal-tint-2); }
.ksb-chip:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }
.ksb-chip:disabled { color: var(--muted-4); cursor: not-allowed; }
.ksb-chip:disabled svg { color: inherit; }
@media (pointer: coarse) { .ksb-chip { min-height: 36px; font-size: 14px; } }

/* ── The assistant's message rows (partials/ksb_message.html) ──────────────────
   Here, not in lesson.css: the lesson column, the study screen's panel and the app-wide dock
   (partials/assistant_dock.html, on pages that never load lesson.css) wear them.
   Laid out as Acasă's chat (home.css «Conversation», Claude's): no names, no avatars, no
   rules between messages. The reader's message is a bubble on the right, on --border (a step
   darker than the canvas, so it reads at a glance); the reply is plain text on the left, in
   ink. Acasă's base size (15/23), its bubble (18px corners) and its air between turns, at a
   column's width. While the reply loads: the thinking mark and the «se gândește» dots
   (`.ksb-wait`, partials/ksb_wait.html); then it types itself out (RZ.typeOut, `.rz-word`). */
.ksb-msg { padding: 12px 0 8px; }
/* A live turn's rows rise in (`ksb-msg--live`, the <template> copies). A stored row does not: an
   animation restarts whenever an ancestor comes back from display:none (Panou → Asistent, the
   list, the dock reopened), and a whole transcript would rise again each time. */
.ksb-msg--live { animation: ksb-msg-rise var(--rz-snappy-dur) var(--rz-snappy) both; }
@keyframes ksb-msg-rise {
  from { opacity: 0; transform: translateY(calc(10px * var(--motion-distance))); }
  to { opacity: 1; transform: none; }
}
.ksb-msg-body {
  font-size: 15px; line-height: 23px; letter-spacing: -0.009em; font-weight: 450;
  color: var(--ink); overflow-wrap: break-word;
}
.ksb-msg--me { display: flex; flex-direction: column; align-items: flex-end; padding: 16px 0 4px; }
.ksb-msg--me .ksb-msg-body {
  max-width: 85%; box-sizing: border-box; padding: 8px 15px;
  border-radius: calc(18px * var(--rk));
  background: var(--border);
}
/* Air between turns: more above a question that follows a reply than from a question to its reply. */
.ksb-msg--ai + .ksb-msg--me { padding-top: 22px; }
.ksb-msg-body > p { margin: 0 0 12px; }
.ksb-msg-body :is(ul, ol) { margin: 0 0 12px; padding-left: 22px; }
/* The line that introduces a list (a group's bold label, a sentence ending in a colon) sits closer
   to the list than the list does to what follows. */
.ksb-msg-body > p:has(+ :is(ul, ol)) { margin-bottom: 6px; }
.ksb-msg-body > :last-child { margin-bottom: 0; }
.ksb-msg-body li + li { margin-top: 6px; }
.ksb-msg-body li > p { margin: 0 0 6px; }
.ksb-msg-body li > p:last-child { margin-bottom: 0; }
.ksb-msg-body li > :is(ul, ol) { margin: 6px 0 0; padding-left: 18px; }
.ksb-msg-body li::marker { color: var(--muted-2); }
.ksb-msg-body strong { color: var(--ink); font-weight: 650; }
.ksb-msg-body :is(h3, h4) { margin: 0 0 8px; font-size: 15px; line-height: 23px; font-weight: 650; }
/* A refusal (tier, throttle, dead grading service) reads as the assistant's own
   line rather than as a browser error — same posture as the grile session's hint. */
.ksb-msg-err { color: #9E4436; }
/* While the reply loads: the glyph thinking (quickened) beside the dots (Acasă's `.hm-wait`). */
.ksb-wait { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; vertical-align: middle; }
.ksb-wait .ksb-syn { width: 22px; height: 22px; flex: none; }
.ksb-wait .ksb-typing-label { margin-left: 0; }
/* A reply types itself out word by word: each word fades in as it lands (RZ.typeOut, rz-ask.js;
   Acasă's chat and the columns alike). */
.rz-word { animation: rz-word-in var(--rz-snappy-dur) var(--rz-snappy) both; }
@keyframes rz-word-in { from { opacity: 0; } to { opacity: 1; } }

/* ── "Se gândește…": the AI's waiting indicator ────────────────────────────
   Three teal dots + a shimmering label, worn next to the Sinapsa glyph below. It is the
   app's ONE way of saying a model is working, so it is the same object wherever that
   happens: the assistant's transcript, and the simulator's two waits (one AI call per
   written subject — the per-subject "Verifică răspunsul", and the finish overlay).
   ⚠️ Here, not in lesson.css, for the same reason as the glyph: /grile/sesiune/ never
   loads lesson.css. */
.ksb-typing { display: inline-flex; align-items: center; gap: 4px; padding: 3px 0; vertical-align: middle; }
.ksb-typing i { width: 5px; height: 5px; border-radius: var(--r-round); corner-shape: round; background: var(--teal-2); animation: ksb-dot var(--rz-wait-dot-dur) var(--rz-wait-ease) infinite; }
.ksb-typing i:nth-child(2) { animation-delay: var(--rz-wait-dot-step); }
.ksb-typing i:nth-child(3) { animation-delay: calc(var(--rz-wait-dot-step) * 2); }
@keyframes ksb-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.ksb-typing-label {
    margin-left: 9px; font-size: 11.5px; font-weight: 600; vertical-align: middle;
    background: linear-gradient(90deg, var(--faint) 30%, var(--teal-2) 50%, var(--faint) 70%);
    background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: ksb-shimmer var(--rz-wait-shimmer-dur) linear infinite;
}
@keyframes ksb-shimmer { from { background-position: 120% 0; } to { background-position: -80% 0; } }
@media (prefers-reduced-motion: reduce) {
    .ksb-typing i, .ksb-typing-label { animation: none; }
    .ksb-typing-label { background: none; color: var(--faint); -webkit-text-fill-color: currentColor; }
}

/* ── Sinapsa: the AI mark, and its three motion states ─────────────────────
   Drawn by templates/partials/icons/ksb_sinapsa.html. Ported from the "Sinapsa variante"
   sheet, the card marked `original` — and it is the one variant on that sheet whose motion
   is pure CSS: 1a / 1d / 2a drive theirs with SMIL `<animateMotion>`, which a stylesheet
   can neither pause nor re-time. That is precisely what lets ONE drawing sit still, run at
   rest, or run quicker while the model is working, instead of needing three drawings.

   The sheet animates every copy, always. Here motion is a **STATE**: the element carries
   only its own timing (`--dur` per link, `--d` per node, the sheet's numbers), and the
   stylesheet decides whether it runs.

   ⚠️ It lives in components.css — loaded by base.html on every page — because it is worn by
   two screens that load different stylesheets: the lesson assistant (lesson.css) and the
   simulator's grading overlay (grile.css). It was in lesson.css until the second one
   needed it. Do not move it back. */
.ksb-syn-node { transform-box: fill-box; transform-origin: center; }
/* Still by default — at 15px in the mode switch, and beside a message that has already been
   answered, four flowing dashed links are noise sitting next to text. */
.ksb-syn .ksb-syn-link, .ksb-syn .ksb-syn-node { animation: none; }
/* Alive at rest (`is-live`, the chat's empty state) at the sheet's own speeds: the
   desynchronised 1.1/1.3/1.5/1.7s and the 0.55s node cascade are the sheet's, not ours —
   they are what keep it from reading as a marching band. */
.ksb-syn.is-live .ksb-syn-link,
.ksb-syn.is-thinking .ksb-syn-link,
.ksb-msg.is-typing .ksb-syn .ksb-syn-link { animation: ksb-syn-flow var(--dur, var(--rz-wait-flow-dur)) linear infinite; }
.ksb-syn.is-live .ksb-syn-node,
.ksb-syn.is-thinking .ksb-syn-node,
.ksb-msg.is-typing .ksb-syn .ksb-syn-node { animation: ksb-syn-node var(--rz-wait-pulse-dur) var(--rz-wait-ease) var(--d, 0s) infinite; }
/* …and quicker while it thinks. That difference IS the thinking state — one glyph at two
   speeds, which is what the sheet's single always-on speed cannot express. Keep the node
   cascade proportional so the four still fire in order rather than together.
   ⚠️ `.ksb-syn.is-thinking` is the PORTABLE form and `.ksb-msg.is-typing .ksb-syn` is the
   chat's own alias for it, kept so the assistant's markup did not have to change. Anything
   outside the chat — the simulator's overlay — must use `is-thinking`: the alias only fires
   under a `.ksb-msg` ancestor, so a glyph that borrowed it elsewhere would silently sit at
   the resting speed, which is the difference between "working" and "idle". */
.ksb-syn.is-thinking .ksb-syn-link,
.ksb-msg.is-typing .ksb-syn .ksb-syn-link { animation-duration: calc(var(--dur, var(--rz-wait-flow-dur)) * .45); }
.ksb-syn.is-thinking .ksb-syn-node,
.ksb-msg.is-typing .ksb-syn .ksb-syn-node {
    animation-duration: var(--rz-wait-pulse-fast-dur);
    animation-delay: calc(var(--d, 0s) * .45);
}
@keyframes ksb-syn-flow { to { stroke-dashoffset: -8; } }
@keyframes ksb-syn-node { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }
/* All of it is decoration on a waiting state — the copy already says what is happening, so
   nothing is lost by standing still.
   ⚠️ These have to REPEAT the live selectors, not shorten to `.ksb-syn-link`. A media query
   adds no specificity, so a bare class here loses to `.ksb-syn.is-live .ksb-syn-link` and the
   icon keeps animating for exactly the people who asked it not to. That shipped broken once;
   it is invisible in a screenshot and was caught by reading `animationName` back out of the
   browser under the emulated setting. */
@media (prefers-reduced-motion: reduce) {
    .ksb-syn.is-live .ksb-syn-link,
    .ksb-syn.is-live .ksb-syn-node,
    .ksb-syn.is-thinking .ksb-syn-link,
    .ksb-syn.is-thinking .ksb-syn-node,
    .ksb-msg.is-typing .ksb-syn .ksb-syn-link,
    .ksb-msg.is-typing .ksb-syn .ksb-syn-node { animation: none; }
}

/* ==================================================== «PLANUL DE AZI» ===== */

/* The launcher card (docs/fsrs/fsrs_v1_plan.md §6.6; handoff «Planul de azi» 3c,
   2026-09-28). Shared by Home and the Plan tab through partials/today_plan.html — one
   component, two homes, so it lives in the global sheet, not a per-screen one.
   The card wears the handoff's ink frame and warm offset shadow; every activity is a
   bordered card of its own inside it. On Home the rows page in fours on a scroll-snapped
   track (app.js → initTodayCarousel); on /plan/ they are one static list — the page
   scrolls, never the card (Ștefan, 2026-09-28). */
.tp-card {
  display: flex; flex-direction: column; gap: 10.5px;
  padding: 21px;
  background: var(--card);
  border: 1.5px solid var(--frame);
  border-radius: var(--r-card);
  box-shadow: -3px 3px 0 var(--peach);
}
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tp-h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 27px; font-weight: 600; letter-spacing: -0.015em; line-height: 1;
  color: var(--ink);
}
.tp-pill {
  flex: none;
  padding: 4.5px 12px;
  border-radius: var(--r-xs);
  background: var(--teal-tint);
  font-size: 15px; font-weight: 600; color: var(--teal-ink);
  white-space: nowrap;
}
.tp-sub { margin-top: -6px; font-size: 11.5px; color: var(--text-3); }
.tp-progress { font-weight: 600; color: var(--teal-ink); }
.tp-fig { font-family: var(--font-figure-ui); font-variant-numeric: tabular-nums; }
/* A section head link — worn by Home's «Restanțe din plan» card, which shares this vocabulary. */
.tp-headlink { flex: none; font-size: 13px; font-weight: 500; color: var(--teal); }
@media (hover: hover) and (pointer: fine) { .tp-headlink:hover { color: var(--teal-hover); } }

/* ── One activity ─────────────────────────────────────────────────────────── */
.tp-rows, .tp-page { display: flex; flex-direction: column; gap: 10.5px; }
.tp-row {
  display: flex; flex-direction: column; gap: 9px;
  padding: 12px 13.5px 13.5px;
  background: var(--card);
  border: 1.5px solid var(--border-2); border-bottom-width: 3px;
  border-radius: var(--r-control);
  /* `.rz-press` rows (the ones with a door) list the squeeze here too: this rule replaces the utility's transition. */
  transition: border-color var(--rz-instant-dur) var(--rz-instant), background-color var(--rz-instant-dur) var(--rz-instant),
    scale var(--rz-press-out-dur) var(--rz-press-out);
}
@media (hover: hover) and (pointer: fine) { .tp-row:hover { border-color: var(--ink); } .tp-row.rz-press:hover { background-color: var(--surface-2); } }
/* A row with a door is ONE target: the title's link is stretched over the whole card, so the
   squeeze (.rz-press) is never shown for a press that goes nowhere. */
.tp-row.rz-press { position: relative; cursor: pointer; }
.tp-row.rz-press .tp-row-body[href]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; corner-shape: inherit; }
.tp-row-top { display: flex; align-items: center; gap: 10.5px; }

/* The tile cycles the handoff's three tints down the list. */
.tp-ico {
  flex: none;
  width: 39px; height: 39px;
  border-radius: var(--r-tile);
  background: var(--teal-tint);
  display: grid; place-items: center;
}
.tp-row:nth-child(3n+2) .tp-ico { background: var(--peach-2); }
.tp-row:nth-child(3n) .tp-ico { background: var(--miss-tint); }
.tp-row.is-done .tp-ico { background: var(--teal); color: #FFFFFF; }

.tp-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tp-row-title {
  font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2;
  color: var(--ink);
}
@media (hover: hover) and (pointer: fine) { a.tp-row-body:hover .tp-row-title { color: var(--teal-ink); } }
.tp-row-body--dead { cursor: default; opacity: .72; }
.tp-row-meta { font-size: 12px; font-weight: 600; color: var(--slate); }
.tp-row-meta b { font-weight: 700; }
/* The pass is written in its own colour (handoff 3c): deeper teal for earlier passes. */
.tp-pass--1 { color: var(--teal-ink); }
.tp-pass--2 { color: var(--teal); }
.tp-pass--3 { color: var(--teal-3); }
.tp-pass--4 { color: var(--success-ink); }
.tp-pass--5, .tp-pass--sprint { color: var(--miss-ink); }
.tp-pass--mixed { color: var(--k-grile); }
.tp-pass--sinteza { color: var(--ink); }

.tp-late {
  display: flex; align-items: center; gap: 4.5px;
  margin-bottom: 2px;
  font-size: 11.5px; font-weight: 500; color: var(--text-2);
}
.tp-late svg { flex: none; color: var(--miss); }

.tp-min {
  flex: none;
  font-size: 19.5px; font-weight: 600; line-height: 1; color: var(--ink);
  white-space: nowrap;
}
.tp-min .tp-fig { font-family: var(--font-figure); font-weight: 600; }   /* ~20px: a big figure */
.tp-min-u { font-size: 12px; color: var(--text-3); }

/* The carousel's arrows: rounded squares, ink ring and offset shadow (they float over the card edges). */
.tp-nav {
  flex: none;
  width: 33px; height: 33px; padding: 0;
  border-radius: var(--r-tile);
  border: 1.5px solid var(--border-2); background: var(--card);
  display: grid; place-items: center;
  color: var(--slate); cursor: pointer;
  transition: color var(--rz-instant-dur) var(--rz-instant), border-color var(--rz-instant-dur) var(--rz-instant), background-color var(--rz-instant-dur) var(--rz-instant),
    scale var(--rz-press-out-dur) var(--rz-press-out);
}
@media (hover: hover) and (pointer: fine) { .tp-nav:hover { color: var(--ink); border-color: var(--ink); background: var(--surface); } }
.tp-row.is-done { border-bottom-width: 1.5px; }
.tp-row.is-done .tp-row-title { color: var(--text-3); text-decoration: line-through; }
.tp-row.is-done .tp-min { color: var(--text-3); }
.tp-row.is-done .tp-steps { opacity: .45; }

/* ── The steps band: one segment per step, as wide as its minutes (never narrower than
   its label), coloured by the step — reading teal, verification honey, fixing slate. */
.tp-steps { display: flex; gap: 9px; }
/* A row with no steps band (Ștefan, 2026-09-29) is still one size with the others: it takes
   the band's height — the row gap + the band — as padding, half above and half below, so
   its content sits centred rather than over an empty strip. `--tp-band` is the band's own
   height: bar 9 + gap 4.5 + a 14px label line (pinned on .tp-step-lb for this). */
.tp-row { --tp-band: 27.5px; }
.tp-row--bare {
  padding-top: calc(12px + (9px + var(--tp-band)) / 2);
  padding-bottom: calc(13.5px + (9px + var(--tp-band)) / 2);
}
.tp-step { --c: var(--slate); min-width: max-content; display: flex; flex-direction: column; gap: 4.5px; }
.tp-step-bar {
  display: block; height: 9px;
  border-radius: var(--r-pill); corner-shape: round;
  border: 1.5px solid var(--ink);
  background: var(--c);
}
.tp-step-lb { font-size: 11.5px; line-height: 14px; font-weight: 600; color: var(--body-c); white-space: nowrap; }
.tp-step-short { display: none; }
.tp-steps--short .tp-step-long { display: none; }
.tp-steps--short .tp-step-short { display: inline; }
.tp-step--citire, .tp-step--recitire { --c: var(--teal); }
.tp-step--verificare, .tp-step--sondare { --c: var(--gold); }
.tp-step--fixare { --c: var(--slate); }
.tp-step--remediere, .tp-step--grile, .tp-step--vulnerabilitati { --c: var(--coral); }
.tp-step--flashcards { --c: var(--teal-2); }
.tp-step--subiecte { --c: var(--navy-2); }
/* A pass under way: closed steps stay full, the current one fills as far as it has gone,
   the rest are empty — the same three states as the pass band (partials/pass_steps.html). */
.tp-step.is-done .tp-step-lb { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--muted-3); }
/* The fill is a full-width layer shifted left by what is still empty (`--fill` is a percentage,
   and a translate percentage is of the layer's own width), so it moves on the compositor: the
   first Home of the day draws it in (`tp-fill`, dashboard.css) instead of printing it. */
.tp-step-bar { position: relative; overflow: hidden; }
.tp-step.is-current .tp-step-bar { background: var(--card); }
.tp-step.is-current .tp-step-bar::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit; corner-shape: inherit; background: var(--c);
  translate: calc(var(--fill, 0%) - 100%) 0;
  transition: translate var(--rz-smooth-dur) var(--rz-smooth);
}
@keyframes tp-fill { from { translate: -100% 0; } }   /* the first Home of the day draws the bar in (dashboard.css) */
.tp-step.is-current .tp-step-lb { color: var(--ink); font-weight: 700; }
.tp-step.is-todo .tp-step-bar { background: var(--card); }

/* ── Home: the carousel ───────────────────────────────────────────────────── */
.tp-carousel { position: relative; }
/* Pages are spaced apart (`gap`) so a swipe never shows two pages glued edge to edge, and
   the track takes the height of the page on screen, not of the tallest one — app.js
   (bindTodayCarousel) writes it, since a scroll container is always as tall as its tallest
   child. Without that a short page (rows wrap differently on a phone) left a hole above the
   pager (Ștefan, 2026-09-29). No CSS transition on it: the JS follows the scroll frame by
   frame, so the slide's own easing is the animation, the same both ways. */
.tp-track {
  display: flex; align-items: flex-start; gap: 24px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.tp-track::-webkit-scrollbar { display: none; }
.tp-page { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
/* The arrows straddle the card's edges (the handoff hangs them 30px out; 17px here keeps
   them inside Home's column gap). A phone swipes — no arrows below 768px. */
.tp-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  border-color: var(--frame); color: var(--ink);
  box-shadow: -3px 3px 0 var(--peach);
}
/* An icon button: pressed = the shared squeeze (.btn-icon). `scale` is its own property, so it
   composes with the centring `transform` above. */
.tp-nav:active {
  transition-duration: var(--rz-press-in-dur);
  transition-timing-function: var(--rz-press-in);
  scale: var(--rz-press-s);
  background-image: linear-gradient(var(--press-tint), var(--press-tint));
}
.tp-nav[hidden] { display: none; }
.tp-nav--prev { left: -38px; }
.tp-nav--next { right: -38px; }
.tp-pager { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 2px 0; }
.tp-pg {
  width: 7.5px; height: 7.5px; padding: 0;
  border: none; border-radius: var(--r-pill); corner-shape: round;
  background: var(--border-2); cursor: pointer;
  /* The width step is not animated: a width transition re-lays out the pager every frame. */
  transition: background-color var(--rz-snappy-dur) var(--rz-snappy);
}
.tp-pg.is-on { width: 19.5px; background: var(--teal); }

/* ── Foot ─────────────────────────────────────────────────────────────────── */
.tp-foot { display: flex; gap: 9px; margin-top: 4.5px; }
/* Both wear the app's one press recipe (.btn's lip, above): the lip is a box-shadow plus the
   same margin, 44px of face + 4px of lip = the 48px the handoff draws. */
.tp-cta, .tp-allbtn {
  min-height: 44px;
  border-radius: var(--r-control);
  box-shadow: 0 var(--lip-depth) 0 var(--tp-lip);
  margin-bottom: var(--lip-depth);
  transition: background-color var(--rz-instant-dur) var(--rz-instant), box-shadow var(--rz-press-out-dur) var(--rz-press-out),
    translate var(--rz-press-out-dur) var(--rz-press-out), scale var(--rz-press-out-dur) var(--rz-press-out);
}
/* The .btn press (above): in on --rz-press-in, sunk 1px with the lip 4 -> 3, squeezed to .97. */
.tp-cta:active, .tp-allbtn:active {
  transition-duration: var(--rz-press-in-dur);
  transition-timing-function: var(--rz-press-in);
  translate: 0 var(--lip-press);
  scale: var(--rz-press-s);
  box-shadow: 0 calc(var(--lip-depth) - var(--lip-press)) 0 var(--tp-lip);
}
.tp-cta {
  --tp-lip: var(--teal-hover);
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 0 15px;
  background: var(--teal); color: var(--canvas);
  font-size: 17px; font-weight: 600;
}
.tp-cta:active { background: var(--btn-teal-press); }
.tp-allbtn {
  --tp-lip: var(--teal-border);
  flex: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; padding: 0 18px 0 16.5px;
  border: 1.5px solid var(--teal-border); border-bottom: 0;
  background: var(--card); color: var(--teal-ink);
  font-family: inherit; font-size: 16px; font-weight: 600; white-space: nowrap;
  cursor: pointer;
}
.tp-allbtn:active { background: color-mix(in srgb, var(--card) 94%, var(--ink)); }
/* The outline twin of the CTA («Recuperează»): the plan's «Începe / Continuă» is the one
   filled button on Home (P6), so any other door is this — the same shape and lip as
   .tp-allbtn, only a paper face. */
.tp-cta.tp-cta--quiet {
  --tp-lip: var(--teal-border);
  border: 1.5px solid var(--teal-border); border-bottom: 0;
  background: var(--card); color: var(--teal-ink);
}
.tp-cta.tp-cta--quiet:active { background: color-mix(in srgb, var(--card) 94%, var(--ink)); }
@media (hover: hover) and (pointer: fine) {
  .tp-cta:hover { background: var(--btn-teal-hover); color: var(--canvas); }
  .tp-cta.tp-cta--quiet:hover { background: var(--teal-tint); color: var(--teal-ink); }
  .tp-allbtn:hover { background: var(--teal-tint); color: var(--teal-ink); }
}

.tp-done-line { padding-top: 3px; font-size: 13px; color: var(--body-c); }
.tp-empty-title, .tp-rest-title {
  font-family: var(--font-serif);
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.tp-empty-sub { margin: 3px 0 10.5px; font-size: 12.5px; line-height: 1.55; color: var(--text-2); }
.tp-rest { text-align: center; border: 1.5px dashed var(--border-2); border-radius: var(--r-control); padding: 13.5px; }
.tp-rest-sub { margin-top: 2px; font-size: 11.5px; color: var(--text-3); }
.tp-restlink { display: inline-block; margin-top: 7.5px; font-size: 12px; font-weight: 500; color: var(--teal); }
.tp-sugg-note { font-size: 12.5px; color: var(--text-2); }
.tp-sugg-note a { font-weight: 600; color: var(--teal); }
@media (hover: hover) and (pointer: fine) { .tp-sugg-note a:hover { color: var(--teal-hover); } }

/* The landing spot of «Tot planul» — clear of the phone's fixed header. */
#planul-de-azi { scroll-margin-top: 20px; }

@media (max-width: 767px) {
  #planul-de-azi { scroll-margin-top: 76px; }
  .tp-card { padding: 18px 14px; }
  .tp-row { padding: 12px 12px 13px; }
  .tp-row--bare {
    padding-top: calc(12px + (9px + var(--tp-band)) / 2);
    padding-bottom: calc(13px + (9px + var(--tp-band)) / 2);
  }
  .tp-row-top { align-items: flex-start; }
  /* Four labels under minute-sized segments do not fit a phone: one word each, and a
     segment may shrink below it and ellipsise rather than push the row wide. */
  .tp-steps { gap: 6px; }
  .tp-step { min-width: 0; }
  .tp-step-lb { overflow: hidden; text-overflow: ellipsis; }
  .tp-step-long { display: none; }
  .tp-step-short { display: inline; }
  .tp-nav { display: none; }
  .tp-foot { gap: 8px; }
  .tp-allbtn { padding: 0 14px; }
}

/* ---- Plan notes (from the Planner handoff) --------------------------------
   The verdict is a figure; the note is what it means. /plan/'s band under the
   target slider (painted by planner.js `pictNote`); here, like the slider above,
   since the onboarding wizard wore it too. */
.pl-notes { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.pl-notes:empty { display: none; }

/* A note wears the frame every card in the app wears — 1.5px border, 14px radius, paper
   ground — instead of a tinted box with a typographic sign in a coloured circle (Ștefan,
   2026-09-11, reziday-v3 handoff): in a dialog where the exam date and the objectives are
   already white cards, the notes were the only coloured rectangles and read as another
   app's banner. Severity is carried by the drawn mark alone (icons/plan_note.html). */
.pl-note {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  box-sizing: border-box;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-control);
}
.pl-note-sig { flex: none; display: flex; margin-top: -1px; }
.pl-note-body { min-width: 0; }
.pl-note-h {
  font-family: var(--font-serif);
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25;
  color: var(--ink);
}
.pl-note-t { margin: 3px 0 0; font-size: 13px; line-height: 1.55; color: var(--body-c); }
.pl-note-t strong { font-weight: 600; color: var(--ink); }


/* ── The pass band (partials/lesson_pass_band.html) — «Planul de azi»'s step bars at a
   larger size, above the lesson title and above the Verificare / Fixare / Remediere card.
   The step you are on keeps its full colour; every other step — closed or still ahead —
   steps back to 45% (Ștefan, 2026-09-30), and a closed one is also struck through
   (.tp-step.is-done above). No `is-current` class on purpose: that one fills the bar by
   `--fill`, which this band does not do. Remediere is teal-2 here, as the handoff draws it
   (coral in «Planul de azi»). Lives here because grile.css pages never load lesson.css. */
.pass-band { list-style: none; margin: 0; padding: 0; gap: 12px; }
.pass-band .tp-step { gap: 6px; transition: opacity var(--rz-snappy-dur) var(--rz-snappy); }
.pass-band .tp-step-bar { height: 12px; }
.pass-band .tp-step-lb { font-size: 14.5px; line-height: 1.3; }
.pass-band .tp-step--remediere { --c: var(--teal-2); }
.pass-band .tp-step:not([aria-current]) { opacity: .45; }
.pass-band .tp-step[aria-current] .tp-step-lb { color: var(--ink); font-weight: 700; }
@media (max-width: 767px) {
  /* The labels are only «N min», short enough to keep whole — «Planul de azi»'s phone
     rule lets a step shrink below its label and ellipsise it, which cut «8 min» to «8 …». */
  .pass-band { gap: 8px; }
  .pass-band .tp-step { min-width: max-content; }
  .pass-band .tp-step-lb { font-size: 13px; overflow: visible; }
}

/* ── The pass progress band (partials/pass_steps.html) — handoff «Bandă de pași» ──────
   Where you are in a lesson pass: Verificare → Recitire → Fixare → Remediere. One segment
   per step, as wide as its minutes (the same numbers as «Planul de azi»). Closed = teal,
   current = ink outline filled as far as the step has gone (`--fill`), not yet = cream.
   Informative only. Lives here because its screens load either grile.css or lesson.css. */
.ps { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ps-head { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.ps-name { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.ps-count { font-size: 14px; color: var(--muted); }
.ps-count b { font-family: var(--font-figure-ui); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.ps-count--short { display: none; }
.ps-left { margin-left: auto; font-size: 14px; color: var(--muted); white-space: nowrap; }
.ps-fig { font-family: var(--font-figure-ui); font-variant-numeric: tabular-nums; }
.ps.is-complete .ps-name { color: var(--teal-ink); }
.ps-bar { list-style: none; margin: 0; padding: 0; display: flex; gap: 5px; }
.ps-seg { min-width: max-content; display: flex; flex-direction: column; gap: 9px; }
.ps-track { display: block; height: 7px; border-radius: calc(4px * var(--rk)); background: var(--cream-line); box-sizing: border-box; }
.ps-seg.is-done .ps-track { background: var(--teal); }
.ps-seg.is-current .ps-track {
  background: linear-gradient(90deg, var(--ink) var(--fill, 0%), var(--card) var(--fill, 0%));
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.ps-lb { font-size: 13px; font-weight: 500; line-height: 1.2; color: var(--muted); white-space: nowrap; }
.ps-seg.is-current .ps-lb { color: var(--ink); font-weight: 700; }
/* Phone: «Remediere 4/4 … ~12 min», and the band alone — four labels under segments sized
   by minutes do not fit a 360px column, and the head already names the step. */
@media (max-width: 560px) {
  .ps-name { font-size: 15px; }
  .ps-count--long, .ps-left-word, .ps-lb { display: none; }
  .ps-count--short { display: inline; }
  .ps-seg { min-width: 0; }
}

/* ── The 7-day sprint notice (partials/sprint_soon.html) — the «Banner sprint» handoff ──
   Home and /plan/ both wear it, so it lives here (/plan/'s planner.css never reaches Home).
   The banner announces and carries one button; the choice is made in the pop-up below, on
   the shared `.pl-slider` above. A grid, not a flex row, so the phone can drop the button
   to its own full-width line under the text (handoff 1d) without a second markup. */
.sprint-soon {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  margin: 0 0 18px; padding: 16px 18px 16px 16px;
  /* The Acasă frame (.tp-card): a very light edge and the warm offset shadow. */
  background: var(--card); border: 1.5px solid var(--frame); border-radius: var(--r-card);
  box-shadow: -3px 3px 0 var(--peach);
}
.sprint-soon-ico {
  width: 44px; height: 44px; border-radius: var(--r-pill); corner-shape: round; background: var(--teal-tint);
  display: flex; align-items: center; justify-content: center;
}
.sprint-soon-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sprint-soon-title {
  font-family: var(--font-serif); font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.sprint-soon-when { font-weight: 500; color: var(--muted); }
.sprint-soon-sub { font-size: 13.5px; line-height: 1.5; color: var(--body-c); text-wrap: pretty; }
.sprint-soon-lead { display: none; }
.sprint-soon-fig { font-family: var(--font-figure-ui); font-weight: 600; font-variant-numeric: tabular-nums; }
.sprint-soon-fig--chosen { color: var(--teal-ink); }
/* The button is `.btn.btn--outline.btn--sm` (partials/sprint_soon.html): outline always, so on
   Acasă the one filled button of the viewport stays «Începe». */
.sprint-soon-btn { flex: none; }
/* The host and the slot only group; they take no box of their own in the page's column. */
.sprint-soon-host, .sprint-soon-slot { display: contents; }

@media (max-width: 767px) {
  .sprint-soon { grid-template-columns: 40px minmax(0, 1fr); align-items: start; gap: 12px; padding: 16px; }
  .sprint-soon-ico { width: 40px; height: 40px; }
  .sprint-soon-ico svg { width: 24px; height: 24px; }
  .sprint-soon-title { font-size: 16px; letter-spacing: 0; }
  .sprint-soon-when { display: none; }
  .sprint-soon-lead { display: inline; }
  .sprint-soon-sub { font-size: 13px; }
  .sprint-soon-btn { grid-column: 1 / -1; height: max(40px, var(--hit-min)); font-size: 14px; }
}

/* The pop-up is a `<dialog class="rz-dialog spr-dialog">` (RZ.dialog: scrim, Esc / back, focus
   return, the sheet from the bottom on a phone). Its own classes because plan_dialog.css,
   where `.pl-dlg` lives, is not loaded on Acasă. */
.spr-dialog { --rz-dialog-w: 480px; text-align: left; }
.spr-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.spr-dialog:focus, .spr-dialog:focus-visible { outline: none; }
.spr-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 22px 14px; border-bottom: 1px solid var(--divider); }
.spr-head-ico {
  flex: none; width: 34px; height: 34px; border-radius: var(--r-pill); corner-shape: round; background: var(--teal-tint);
  display: flex; align-items: center; justify-content: center;
}
.spr-head-titles { flex: 1; min-width: 0; }
.spr-h3 { margin: 0; font-family: var(--font-serif); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.spr-sub { margin-top: 3px; font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.spr-body { padding: 20px 22px 22px; }
.spr-body .pl-target { min-width: 0; padding-top: 0; }
/* The normal target, marked on the rail — same geometry as the face (23px / 46px). */
.spr-now {
  position: absolute; top: 50%;
  left: calc(23px + (100% - 46px) * var(--spr-now, 0));
  transform: translate(-50%, -50%);
  width: 3px; height: 20px; border-radius: calc(var(--r-mark) / 3);
  background: #FFFFFF; box-shadow: 0 0 0 1.4px rgba(15, 34, 48, .5);
  pointer-events: none;
}
.spr-body .pl-slider-ticks { position: relative; gap: 10px; align-items: flex-start; }
.spr-body .pl-slider-ticks > span { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Under its mark, not centred in the row — kept clear of the two end labels. */
.spr-tick-now {
  position: absolute; top: 0; transform: translateX(-50%);
  left: clamp(120px, calc(23px + (100% - 46px) * var(--spr-now, 0)), calc(100% - 120px));
  color: var(--teal-ink); font-weight: 600;
}
.spr-foot { display: flex; align-items: flex-start; gap: 10px; padding: 14px 22px 10px; border-top: 1px solid var(--divider); }
.spr-foot-gap { flex: 1; }
.spr-reset {
  padding: 9px 4px; border: none; background: none;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .spr-reset:hover { color: var(--ink); } }
@media (max-width: 480px) {
  .spr-foot { flex-wrap: wrap; }
  .spr-reset { flex: 1 1 100%; text-align: left; }
}

/* ---- Map cells: the flashcard band (v2 §11) ----
   Minimal on purpose; Ștefan restyles. A cell is a hard-stop fill of its grile
   (current-R bands + bej); the flashcard band is a thin strip along its foot. */
.lx-cell, .dash-cell { position: relative; overflow: hidden; }
.map-cell-fc {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 4px;
  border-top: 1px solid var(--surface);
}

/* ---- Contact cards + form (/contact/, public and in-app — hence here, not public.css) ---- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.contact-cards { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 899px) { .contact-layout { grid-template-columns: 1fr; } }

.contact-card {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact-card-title { font-size: 16px; font-weight: 600; margin-top: 2px; }
.contact-card-body { font-size: 13.5px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.contact-card a { font-size: 14px; font-weight: 600; }

.contact-form {
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  padding: clamp(22px, 4vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-form-title { font-family: var(--font-serif); font-size: 23px; font-weight: 600; }
.contact-form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.contact-form-row .field { flex: 1 1 220px; }
.contact-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.contact-form-status { font-size: 13.5px; font-weight: 600; color: var(--late); }
.contact-form-status.is-ok { color: var(--teal-ink); }
.contact-form-status[hidden] { display: none; }
/* The honeypot: off screen rather than display:none, which some bots skip. */
.contact-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
/* The form is as tall as the card column beside it; the message box takes the slack. */
.contact-msg { flex: 1; display: flex; flex-direction: column; }
.contact-msg .textarea { flex: 1; min-height: 160px; }
/* Squared like the app's other action buttons. */
#contact-send { height: 46px; padding: 0 24px; font-size: 14.5px; border-radius: var(--r-xs); margin-left: auto; }   /* right-aligned */
/* Disabled until the message has text (and while a send is in flight). */
#contact-send:disabled { opacity: .45; cursor: not-allowed; }

/* ---- Legal pages (/termeni/, /confidentialitate/ — public and in-app, hence here) ---- */
.legal-summary { padding: 18px 20px; display: flex; gap: 15px; align-items: flex-start; }
.legal-summary svg { flex: none; margin-top: 2px; }
.legal-summary-title { font-size: 14.5px; font-weight: 600; color: var(--ink-warm); }
.legal-summary-body { margin-top: 4px; font-size: 13.5px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }

.legal-sections { display: flex; flex-direction: column; gap: 28px; }
.legal-sections section { display: flex; flex-direction: column; gap: 8px; }
.legal-sections h2 { font-size: 21px; }
.legal-sections p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--muted); text-wrap: pretty; }
.legal-sections a { font-weight: 600; }


/* ============================================================================
   The navigator — ONE component for every session (Ștefan, 2026-10-04): the grile and
   sinteză sessions (built by grile-sesiune.js), Evaluare's flashcard deck and the lesson's
   Flashcards tab (partials/flashcard_navigator.html, painted by flashcard_carousel.js).
   It lives here, not in grile.css, because the lesson page never loads that sheet.
   The column it sits in (.sim-aside), the FAB and the sheet stay in grile.css.
   ========================================================================== */
/* Answered / «știută» = the teal fill, omitted / «văzută, nemarcată» = the amber tint,
   «de revăzut» = coral, the current one a 2px ink ring. */
.sim-nav {
    background: var(--card);
    border: 1.5px solid var(--cream-line);
    border-radius: var(--r-card);
    box-shadow: var(--e1);
    padding: 18px 16px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.sim-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 13px;
}
.sim-nav-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted-2);
}
.sim-nav-count {
    font-family: var(--font-figure-ui);
    font-variant-numeric: tabular-nums;
    font-size: 11.5px;
    color: var(--muted-2);
}
/* Five cells per row, filling whatever height the card has: the grid is sized
   by the flex leftover (basis 0, so its own content never stretches the card),
   and grile-sesiune.js measures that box and renders exactly the whole rows
   that fit — the rest goes on the next page of the pager below. A 500-question
   session therefore pages instead of scrolling, and never pushes the navigator
   past the quiz column. */
.sim-nav {
    --nav-cell: 44px;
    --nav-gap: 8px;
}
.sim-nav-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-rows: var(--nav-cell);
    gap: var(--nav-gap);
    margin-bottom: 12px;
    /* takes the slack so the legend + "Finalizează" stay pinned to the bottom of
       the card, which itself stretches to the height of the quiz column */
    flex: 1 1 0;
    min-height: 0;
    align-content: start;
    overflow: hidden;
}

/* ---- Navigator pager ---- */
.sim-nav-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
}
.sim-nav-page {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: var(--r-chip);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border: 1px solid #E3D9C4;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
}
@media (hover: hover) and (pointer: fine) { .sim-nav-page:hover:not(:disabled) { background: var(--surface-3); color: var(--ink); } }
.sim-nav-page:disabled { color: var(--disabled-ink); border-color: var(--disabled-fill); cursor: default; }
.sim-nav-range {
    font-family: var(--font-figure-ui);
    font-variant-numeric: tabular-nums;
    font-size: 11.5px;
    color: var(--muted-2);
}
.sim-cell {
    position: relative;
    height: var(--nav-cell);
    border-radius: var(--r-row);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-figure-ui);
    font-variant-numeric: tabular-nums;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    box-sizing: border-box;
    background: var(--card);
    border: 1.5px solid var(--cream-line);
    color: var(--faint);
    padding: 0;
    transition: scale var(--rz-press-out-dur) var(--rz-press-out), background-color var(--rz-instant-dur) var(--rz-instant), border-color var(--rz-instant-dur) var(--rz-instant);
}
@media (hover: hover) and (pointer: fine) { .sim-cell:hover { border-color: var(--teal-3); } }
.sim-cell--answered {
    background: var(--teal);
    border-color: var(--teal);
    color: #FFFFFF;
}
.sim-cell--skipped {
    background: var(--miss-tint);
    border-color: var(--miss-border);
    color: var(--miss-ink);
}
.sim-cell.is-current {
    border: 2px solid var(--ink);
    color: var(--ink);
    font-weight: 700;
}
@media (hover: hover) and (pointer: fine) { .sim-cell.is-current:hover { border-color: var(--ink); } }
.sim-cell--answered.is-current {
    background: var(--teal);
    color: #FFFFFF;
}
.sim-legend {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--cream-line);
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}
.sim-legend span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}
.sim-legend-sw {
    position: relative;
    flex: none;
    width: 14px;
    height: 14px;
    border-radius: calc(4px * var(--rk));
    box-sizing: border-box;
}
.sim-legend-sw--answered { background: var(--teal); }
.sim-legend-sw--skipped {
    background: var(--miss-tint);
    border: 1.5px solid var(--miss-border);
}
.sim-legend-sw--unvisited {
    background: var(--card);
    border: 1.5px solid var(--cream-line);
}
.sim-legend-sw--current {
    background: var(--card);
    border: 2px solid var(--ink);
}
.sim-finish {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border: 1px solid var(--teal-border);
    color: var(--teal-ink);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    padding: 11px 14px;
    border-radius: var(--r-row);
    cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .sim-finish:hover { background: var(--teal-tint); } }
.sim-finish:disabled { color: var(--disabled-ink); border-color: var(--disabled-fill); cursor: progress; }
.sim-finish.is-locked { color: var(--disabled-ink); border-color: var(--disabled-fill); cursor: not-allowed; background: var(--card); }
/* Wrong (a session with the verdict after each answer) / «Neștiută» (a deck): the deck's coral. */
.sim-cell--nu {
    background: #BF5B49;
    border-color: #BF5B49;
    color: #FFFFFF;
}
.sim-cell--nu.is-current { background: #BF5B49; color: #FFFFFF; }
.sim-legend-sw--nu { background: #BF5B49; }
/* A deck's grid scrolls inside itself instead of paging (the longest is ~60 cards). */
.sim-nav--scroll .sim-nav-grid { flex: 0 1 auto; overflow-y: auto; overscroll-behavior: contain; margin: 0 -4px 12px; padding: 2px 4px; scrollbar-width: thin; }
.sim-nav--scroll .sim-legend { margin-top: 0; }

/* ---- «Te deconectezi?» (partials/logout_dialog.html) ----
   The reference .rz-dialog (Overlays section at the end of this file): scrim, card, motion and
   the phone sheet come from there; .lo-* only lays out the content. */
.lo-dialog { --rz-dialog-w: 412px; text-align: left; }
.lo-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 24px 0; }
.lo-ico {
  flex: none; width: 42px; height: 42px; border-radius: var(--r-sm);
  display: grid; place-items: center; background: var(--error-tint);
}
.lo-titles { flex: 1; min-width: 0; }
.lo-title { margin: 0; font-family: var(--font-serif); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.lo-sub { margin: 5px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.lo-foot {
  margin-top: 22px; padding: 16px 24px 22px;
  display: flex; justify-content: space-between; gap: 10px;
  border-top: 1px solid var(--divider);
}

/* ── The app's menu (partials/app_rail.html) — «Lectie rail v2», 2026-10-05 ──────────────
   ONE component on every screen that has a menu: the app shell and the lesson page.
   216px open, 72px collapsed, and NOTHING jumps in between. Every row has a fixed height
   and a width of --rail-item-w (192 → 48px), clipped by its own overflow; every icon sits
   at the same x inside its row, so they all stay on one column centred at x=36 (menu inset
   12 + row inset 14 + half a 20px icon) — the middle of the 72px folded menu, so every icon
   is centred in its 48px highlight (it was 34, 2px left of it: Ștefan, 2026-10-25): logo,
   nav, the avatar — and on the lesson page the pass bars. Collapsing changes widths only; labels are never display:none'd.

   --rail-k is 1 open and 0 collapsed, and it is the ONLY thing that animates: registered as
   a number, so it can transition, and everything computed from it — the menu's width, every
   row's, the lesson's grid column and text edge, --sidebar-w (the Evaluare start bar) —
   recomputes each frame and so moves on the same curve. It does NOT transition on <body>
   (round 2): an inherited value animated there re-cascaded the style of every element on the
   page, every frame (5–7ms a frame on a lesson, measured at 120 Hz). <body> holds the target
   value; only the boxes that draw it run the transition (.rail, the lesson grid, the start
   bar), each redeclaring the widths so they resolve against its own animated --rail-k.
   Collapsed = `rail-mini` (the reader's choice, ≥1280px, kept for the whole app) or
   `rail-narrow` (<1280px), both set before first paint by partials/rail_state.html. Without
   @property (an old Firefox) it simply jumps; nothing breaks. */
@property --rail-k { syntax: "<number>"; inherits: true; initial-value: 1; }
/* --rail-pin-k: the same target as --rail-k, but the hover peek never overrides it — it is
   the room the PAGE gives the menu (see the peek, below). */
@property --rail-pin-k { syntax: "<number>"; inherits: true; initial-value: 1; }
body, .rail, .gr-startbar {
  --rail-w: calc(72px + 144px * var(--rail-k));        /* 216 → 72 */
  --rail-item-w: calc(48px + 144px * var(--rail-k));   /* each row: 192 → 48 */
  --sidebar-w: var(--rail-w);
}
body { --rail-k: 1; --rail-pin-k: 1; }
body.rail-mini,
body.rail-narrow { --rail-k: 0; --rail-pin-k: 0; }
.rail, .gr-startbar { transition: --rail-k var(--rz-smooth-dur) var(--rz-smooth), --rail-pin-k var(--rz-smooth-dur) var(--rz-smooth); }
/* The lesson page runs its own non-inherited copy (--lesson-k, lesson.css), not this one. */
/* The page's first two frames (partials/rail_state.html): the stored state lands at once. */
body.rail-boot :is(.rail, .gr-startbar) { transition: none; }
@media (prefers-reduced-motion: reduce) { .rail, .gr-startbar { transition: none; } }

.rail {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
    border-right: 1px solid var(--border);
    background: var(--card);
    padding: 12px 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* A label in the rail. Collapsing, it fades out FIRST, on the press-in curve (100ms, 30% gone
   after one frame), so no word is ever seen being clipped by the closing row — the row now
   starts at full speed too (--rz-smooth, round 2); expanding, it waits for the row to make
   room (the row is ~3/4 open after 100ms) and only then slides in. The two timings live on
   the two states — a transition is read off the state you are going TO. */
.rail .rail-lb {
    opacity: 1;
    transform: none;
    transition: opacity var(--rz-snappy-dur) var(--rz-snappy) var(--rz-press-in-dur), transform var(--rz-snappy-dur) var(--rz-snappy) var(--rz-press-in-dur);
}
body.rail-mini .rail .rail-lb,
body.rail-narrow .rail .rail-lb {
    opacity: 0;
    transform: translateX(calc(-8px * var(--motion-distance)));
    transition: opacity var(--rz-press-in-dur) var(--rz-press-in), transform var(--rz-press-in-dur) var(--rz-press-in);
}

/* The mark at x=21 (12 + 9): centred on the icon column, and it never moves — only the
   text half fades (.rail-lb). Content-box, as drawn: the box runs 14px past the rail's
   inner edge, which the rail's own overflow clips. The 18px foot is where "beta v2.0"
   hangs (the lockup reserves no room for it). */
.rail-brand {
    --brand-word-size: 20.6px;
    display: flex;
    width: var(--rail-item-w);
    height: 30px;
    padding: 4px 7px 18px 9px;
    box-sizing: content-box;
    justify-content: flex-start;
    white-space: nowrap;
    overflow: hidden;
    /* Optical centring: in logo.html's 0..52 box the cup and saucer are centred at x=23 and
       only the handle reaches right, so a centred BOX leaves the cup 3/52 of the mark left of
       the icon column. Shifted by that (1.73px at 30px) plus .5px more by eye (Ștefan,
       2026-10-22), open or folded; the word moves with it. */
    transform: translateX(calc(var(--brand-word-size) * 1.4545 * 3 / 52 + .5px));
}

.rail-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}
.rail-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: var(--rail-item-w);
    height: 40px;
    padding: 0 12px 0 14px;
    box-sizing: border-box;
    border-radius: var(--r-tile);
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
}
.rail-item svg { flex: none; }
.rail-item .rail-lb { flex: none; }
@media (hover: hover) and (pointer: fine) { .rail-item:hover { background: var(--surface); color: var(--ink); } }
.rail-item.is-active { background: var(--teal-tint); color: var(--teal-ink); }

.rail-divider {
    width: var(--rail-item-w);
    height: 1px;
    margin: 14px 0;
    background: var(--divider);
    border: none;
}

/* Restrânge / extinde meniul — a 28px square in its own row above the logo, on the icon
   column (x=22..50, centred at 36), so it never moves. The double chevron turns round
   with the rail: « open, » folded. Its size, the rail's 12px top and the 5px under it put
   the wordmark's baseline on the screen title's (.screen-title, 45px down the main column). */
.rail-toggle {
    flex: none;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin: 0 0 5px 10px;
    /* Centred on the mark, which the brand shifts right optically (.rail-brand). */
    translate: calc(20.6px * 1.4545 * 3 / 52 + .5px) 0;
    padding: 0;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: var(--r-chip);
    background: var(--card);
    color: var(--muted);
    cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .rail-toggle:hover { color: var(--ink); background: var(--surface); } }
.rail-toggle-chev { transition: transform var(--rz-smooth-dur) var(--rz-smooth); }
body.rail-mini .rail-toggle-chev { transform: rotate(180deg); }
/* Below 1280px the menu is collapsed by the width, not by choice — nothing to toggle. */
body.rail-narrow .rail-toggle { display: none; }

/* The peek: folded (by choice or by the width), hovering the menu opens it to 216px OVER the
   page, and leaving folds it again, on the same curve both ways. Only the rail's own
   --rail-k goes to 1; --rail-pin-k (the page's share) stays 0, and the margin gives the
   difference back, so the page does not move: the flex row (app shell) sees a slot of
   72 + 144 * pin-k, and in the lesson's grid the box overhangs its track. The same margin
   is what makes pressing the toggle WHILE peeking smooth: the rail is already 216 and only
   pin-k runs 0 → 1, so the page opens up on the usual curve under it. The rail sits above
   everything all the time (not only on :hover), so on the way out it is never cut by the
   page while it is still wide; its shadow is drawn only by the overhang. A short delay on
   the way in, so a pointer crossing to the browser's edge does not flash it open.
   `.rail-nopeek` (app_rail.html) holds it off right after the toggle folds the menu, until
   the pointer leaves. */
.rail {
    width: var(--rail-w);
    margin-right: calc(144px * (var(--rail-pin-k) - var(--rail-k)));
    z-index: calc(var(--z-overlay) - 1);
    box-shadow: 0 12px 32px rgba(15, 34, 48, calc(.14 * (var(--rail-k) - var(--rail-pin-k))));
}
@media (hover: hover) and (pointer: fine) {
    body:is(.rail-mini, .rail-narrow) .rail:not(.rail-nopeek):hover {
        --rail-k: 1;
        transition-delay: var(--rz-peek-delay), 0ms;   /* --rail-k waits; --rail-pin-k (a press while peeking) does not */
    }
    body:is(.rail-mini, .rail-narrow) .rail:not(.rail-nopeek):hover :is(.rail-lb, .app-prof-body, .app-logout) {
        opacity: 1;
        transform: none;
        transition: opacity var(--rz-snappy-dur) var(--rz-snappy) calc(var(--rz-press-in-dur) + var(--rz-peek-delay)), transform var(--rz-snappy-dur) var(--rz-snappy) calc(var(--rz-press-in-dur) + var(--rz-peek-delay));
    }
    body:is(.rail-mini, .rail-narrow) .rail:not(.rail-nopeek):hover .app-logout { pointer-events: auto; }
}


/* Profile + logout (partials/profile_foot.html, shared with the app sidebar), on the icon
   column too: the avatar starts at 12 + 7 and is 34px wide, so its centre is the column's
   (36) and, folded, it has 7px of highlight on either side.
   The name and the logout chip fade like every other label (and come back with the hover
   peek); the logout chip takes no clicks while invisible. */
.rail .app-sidebar-foot { margin-top: auto; flex: none; width: var(--rail-item-w); }
.rail .app-prof-row {
    justify-content: flex-start;
    padding: 6px 6px 6px 7px;
    height: 46px;
    box-sizing: border-box;
    overflow: hidden;
}
.rail .app-prof-link { flex: 1 1 auto; justify-content: flex-start; min-width: 0; white-space: nowrap; }
.rail .app-prof-body,
.rail .app-logout {
    transition: opacity var(--rz-snappy-dur) var(--rz-snappy) var(--rz-press-in-dur), transform var(--rz-snappy-dur) var(--rz-snappy) var(--rz-press-in-dur),
        scale var(--rz-press-out-dur) var(--rz-press-out);
}
.rail .app-prof-body { display: block; white-space: nowrap; }
body.rail-mini .rail .app-prof-body,
body.rail-narrow .rail .app-prof-body {
    opacity: 0;
    transform: translateX(calc(-8px * var(--motion-distance)));
    transition: opacity var(--rz-press-in-dur) var(--rz-press-in), transform var(--rz-press-in-dur) var(--rz-press-in);
}
body.rail-mini .rail .app-logout,
body.rail-narrow .rail .app-logout {
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--rz-press-in-dur) var(--rz-press-in);
}

/* Nothing between the divider and the foot (every screen but a lesson): the foot stays on
   the bottom edge. */
.rail-spacer { flex: 1 1 auto; }

/* =========================================================================
   Feedback — like / dislike + «Semnalează o problemă»
   Handoff «Durerea articulară — raport și feedback» (Ștefan, 2026-10-05).
   Markup: partials/feedback_vote.html + partials/report_dialog.html; behaviour:
   static/js/feedback.js. Here because two worlds wear it — the lesson page
   (the title row's pair; inline grilă and flashcards carry only the flag) and Evaluare
   (session + deck).
   ========================================================================= */
.fb { display: flex; align-items: center; gap: 8px; flex: none; }
/* 12px between 👍 and 👎: opposite actions, so a fat thumb must not hit the wrong one (P11). */
.fb-pair { display: flex; gap: 12px; }
/* Icons only — no disc, no border (Ștefan, 2026-10-05). A vote is said by the GLYPH:
   it takes the vote's colour and fills, so it reads by shape as well as by colour. */
.fb-btn {
    position: relative;
    flex: none;
    width: 30px; height: 30px; box-sizing: border-box;
    display: grid; place-items: center;
    padding: 0;
    border: none; border-radius: var(--r-tile);
    background: none; color: var(--muted);
    cursor: pointer;
    transition: color var(--rz-instant-dur) var(--rz-instant), scale var(--rz-press-out-dur) var(--rz-press-out);
}
/* Round 2: a visible squeeze (.88, small glyphs need more than the .97 of a button), in on
   press-in, back on press-out; the vote that lands then pops (below). */
.fb-btn:active {
    transition-duration: var(--rz-press-in-dur);
    transition-timing-function: var(--rz-press-in);
    scale: calc(1 - .12 * var(--motion-distance));
}
/* The target is bigger than the drawing: 40px under a mouse, 44px on touch (--hit-min), so the
   glyph stays small and the finger still lands. 32px buttons + the 12px gap = a 44px pitch. */
.fb-btn::after {
    content: ""; position: absolute; top: 50%; left: 50%;
    width: max(100%, var(--hit-min)); height: max(100%, var(--hit-min));
    transform: translate(-50%, -50%);
}
@media (pointer: coarse) { .fb .fb-btn.fb-btn { width: 32px; height: 32px; } .fb--lesson .fb-btn.fb-btn { width: 36px; height: 36px; } }
.fb-btn svg { display: block; width: 17px; height: 17px; transition: fill var(--rz-instant-dur) var(--rz-instant); }
@media (hover: hover) and (pointer: fine) { .fb-btn:hover { color: var(--ink); } }
.fb-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.fb-btn--up.is-on { color: var(--teal); }
.fb-btn--down.is-on { color: var(--late); }
.fb-btn.is-on svg { fill: currentColor; fill-opacity: .22; }
/* The flag reports, so it says «problem» before it is pressed: the app's alarm red. */
.fb-btn--flag { color: var(--late); }
@media (hover: hover) and (pointer: fine) { .fb-btn--flag:hover { color: var(--late-hover); } }
/* A vote is a medium-frequency action (not a frequent path): the chosen glyph pops — from
   .8 past 1.12 back to 1 in `snappy`'s 260ms, each leg starting at speed. */
.fb-btn.is-pop { animation: fb-pop var(--rz-snappy-dur) var(--rz-snappy); }
@keyframes fb-pop {
    0% { transform: scale(calc(1 - .2 * var(--motion-distance))); }
    45% { transform: scale(calc(1 + .12 * var(--motion-distance))); }
    100% { transform: scale(1); }
}

/* On a teal card head (inline grilă, flashcard, session card): three bare white glyphs,
   the same box and the same gap apart — no disc, the flag included (Ștefan, 2026-10-05).
   A vote fills its glyph solid white: teal or coral would not reach 3:1 on the teal bar,
   so there the fill carries the vote and the glyph's shape says which one. */
.fb--head { gap: 4px; }
.fb--head .fb-btn { width: 28px; height: 28px; color: rgba(255, 255, 255, .78); }
.fb--head .fb-btn svg { width: 16px; height: 16px; }
.fb--head .fb-btn.is-on { color: #FFFFFF; }
@media (hover: hover) and (pointer: fine) { .fb--head .fb-btn:hover { color: #FFFFFF; } }
.fb--head .fb-btn.is-on svg { fill-opacity: 1; }
.fb--head .fb-btn:focus-visible { outline-color: #FFFFFF; }

/* The lesson's own pair, in its title row (Ștefan, 2026-10-10): two discs the size of the
   flag beside them. A vote fills its disc — green for Utilă, red for Neutilă — with the
   glyph white and solid, and it stays filled while the vote stands. Pressing pops it (`fb-pop`). */
.fb--lesson .fb-pair { gap: 8px; }
.fb--lesson .fb-btn {
    --fb-on: var(--success-ink);
    position: relative;
    width: 36px; height: 36px;
    border: 1px solid var(--border); background: var(--card);
    transition: color var(--rz-instant-dur) var(--rz-instant), background-color var(--rz-instant-dur) var(--rz-instant), border-color var(--rz-instant-dur) var(--rz-instant), scale var(--rz-press-out-dur) var(--rz-press-out);
}
.fb--lesson .fb-btn--down { --fb-on: var(--late); }
@media (hover: hover) and (pointer: fine) { .fb--lesson .fb-btn:hover { border-color: var(--fb-on); color: var(--fb-on); } }
.fb--lesson .fb-btn.is-on { background: var(--fb-on); border-color: var(--fb-on); color: #FFFFFF; }
@media (hover: hover) and (pointer: fine) { .fb--lesson .fb-btn.is-on:hover { background: var(--fb-on); border-color: var(--fb-on); color: #FFFFFF; } }
.fb--lesson .fb-btn.is-on svg { fill-opacity: 1; }
/* Pressing a vote is the one `fb-pop` above (.8 → 1.12 → 1, no rotation): the old expanding
   ring is gone — a vote is a tap, not an event. */

/* ---- The report dialog's form (the shell is `.rz-dialog.pl-dlg.rp-dialog`, plan_dialog.css) ---- */
html.rp-lock { overflow: hidden; }
/* A refused vote says why: RZ.toast (feedback.js). */
.rp-dialog { --rz-dialog-w: 540px; }
@media (max-width: 520px) {
    .rp-kinds { grid-template-columns: 1fr; }
    .rp-kind { min-height: 44px; }
}
.rp-form { display: flex; flex-direction: column; min-height: 0; }
.rp-form[hidden], .rp-done[hidden] { display: none; }
.rp-ico { background: var(--exam-panel); color: var(--late); }
.rp-dialog .pl-sheet-head { align-items: center; }
.rp-body { padding: 16px 22px 18px; display: flex; flex-direction: column; gap: 16px; }
.rp-field { display: flex; flex-direction: column; gap: 8px; }
.rp-label {
    font-family: var(--font-eyebrow);
    font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--muted-2);
}
/* Three rectangles sharing the row (stacked on a phone). */
.rp-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rp-kind {
    min-height: 52px; padding: 8px 10px; box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-2); border-radius: var(--r-xs);
    background: var(--card); color: var(--slate);
    font: inherit; font-size: 13px; font-weight: 600; line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--rz-instant-dur) var(--rz-instant), background-color var(--rz-instant-dur) var(--rz-instant),
        scale var(--rz-press-out-dur) var(--rz-press-out);
}
@media (hover: hover) and (pointer: fine) { .rp-kind:hover { border-color: var(--border-2); } }
.rp-kind.is-on { border-color: var(--teal); background: var(--teal-tint); color: var(--teal-ink); }
.rp-text {
    width: 100%; box-sizing: border-box;
    min-height: 104px; resize: vertical;
    padding: 10px 12px;
    border: 1px solid var(--border-2); border-radius: var(--r-xs);
    background: var(--card); color: var(--ink);
    font-family: var(--font-body); font-size: 14px; line-height: 1.5;
}
/* iOS zooms into a field under 16px; the report is typed on a phone. */
@media (pointer: coarse) { .rp-text { font-size: 16px; } }
.rp-text:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-tint); }
.rp-note { font-size: 12px; color: var(--muted-2); }
.rp-err { font-size: 12.5px; font-weight: 600; color: var(--late); }
.rp-err[hidden] { display: none; }
.rp-done {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 30px 26px 24px;
    text-align: center;
}
.rp-done-ico { width: 44px; height: 44px; color: var(--teal-ink); }
.rp-done-sub { margin: 0 0 8px; max-width: 340px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }

/* ===== The phone's menu: a drawer (partials/menu_burger.html, menu_scrim.html; app.js → initDrawer) =====
   Here, not in shell.css, because the lesson page wears it too and never loads that sheet.
   ≤767px only; above it nothing here applies and the menu is the docked rail above.
   There is no bottom bar: on a phone the menu is the SAME .rail as the desktop's (#rz-menu),
   as an off-canvas drawer behind the hamburger, holding what the desktop menu holds on that
   screen (logo, the four rows, the screen's `rail_extras`, the profile foot). Open, it is
   the open menu at touch size: every label shown whatever `rail-mini` / `rail-narrow` say,
   no fold toggle, 48px rows and 16px labels.
   - The app shell: the page slides right by --m-drawer-w, as in the reference app, leaving a
     56px strip of it (main, the header and the hamburger) under the scrim with a rounded
     corner; the drawer is uncovered under it (z-index -1: the page's own canvas covers it)
     with a short parallax. Open on `smooth`, closed on `smooth` × --rz-exit.
   - The lesson page, and every screen under Reduce Motion: nothing under it moves; the drawer
     comes in OVER the page and its scrim (the lesson slides it in from the edge; Reduce Motion
     fades it). The lesson never moves because its layout is not the shell's: its fixed parts
     (the Asistent FAB, «Sus», the flashcard bar) would re-anchor to a moved ancestor, and its
     assistant's sheet keeps its own inert bookkeeping (docs/screens/lesson-page.md).
   - The hamburger is a 44px rounded square fixed in the header's left slot (the header's
     padding leaves it room), so it is the same on a screen that hides the header (Acasă). On
     the lesson it leads the topbar's tab bar, as tall as its track (`.m-burger--bar`).
   Open, the drawer is a modal dialog (app.js): the rest of the page is inert, the page does not
   scroll, focus goes in and comes back to the hamburger; the scrim, a swipe left and Esc close
   it. */
.m-burger, .m-scrim { display: none; }
@media (max-width: 767px) {
  body {
    --m-drawer-w: min(calc(100vw - 56px), 400px);
    --m-drawer-shift: calc(var(--m-drawer-w) * var(--motion-distance));
  }
  html:has(> body.m-drawer-open) { overflow: hidden; }

  .m-burger {
    display: grid;
    place-items: center;
    position: fixed;
    z-index: calc(var(--z-chrome) + 1);
    top: calc(env(safe-area-inset-top, 0px) + 5px);
    left: max(10px, env(safe-area-inset-left, 0px));
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--r-tile);
    background: var(--card);
    color: var(--ink);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform calc(var(--rz-smooth-dur) * var(--rz-exit)) var(--rz-smooth),
      scale var(--rz-press-out-dur) var(--rz-press-out), background-color var(--rz-instant-dur) var(--rz-instant);
  }
  .m-burger:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }
  /* The lesson's: at the left of its topbar's tab bar, as tall as the track (the 31px tab + the
     track's 3px padding, lesson.css), with the 44px target lent by ::after. */
  .m-burger.m-burger--bar { position: relative; z-index: auto; top: auto; left: auto; flex: none; width: calc(var(--lesson-tab-h, 31px) + 6px); height: calc(var(--lesson-tab-h, 31px) + 6px); }
  .m-burger--bar::after { content: ""; position: absolute; inset: calc((var(--lesson-tab-h, 31px) + 6px - var(--hit-min, 44px)) / 2); }
  .m-burger--bar svg { width: 18px; height: 18px; }

  .m-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-chrome) + 2);
    padding: 0;
    border: 0;
    background: var(--scrim);
    opacity: 0;
    pointer-events: none;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity calc(var(--rz-smooth-dur) * var(--rz-exit)) var(--rz-smooth),
      transform calc(var(--rz-smooth-dur) * var(--rz-exit)) var(--rz-smooth);
  }
  body.m-drawer-open .m-scrim {
    opacity: .6;
    pointer-events: auto;
    transition: opacity var(--rz-smooth-dur) var(--rz-smooth), transform var(--rz-smooth-dur) var(--rz-smooth);
  }

  /* The drawer: the menu, open, at touch size. */
  #rz-menu {
    --rail-item-w: calc(var(--m-drawer-w) - 28px);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--m-drawer-w);
    height: 100dvh;
    margin: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 14px calc(env(safe-area-inset-bottom, 0px) + 12px) max(14px, env(safe-area-inset-left, 0px));
    border-right: 0;
    box-shadow: none;
    background: var(--card);
    /* Taller than a short screen (a lesson's pass bars): the drawer scrolls, never cuts. */
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    visibility: hidden;
  }
  body.m-drawer-open #rz-menu { visibility: visible; }
  #rz-menu .rail-toggle { display: none; }
  /* The logo keeps its height whatever the rest asks for (a long list once squeezed it). */
  #rz-menu > .rail-brand { flex: none; }
  #rz-menu :is(.rail-lb, .app-prof-body, .app-logout) { opacity: 1; transform: none; transition: none; }
  #rz-menu .app-logout { pointer-events: auto; }
  #rz-menu .rail-item { flex: none; height: 48px; padding: 0 12px; gap: 14px; font-size: 16px; }
  #rz-menu .rail-item svg { width: 22px; height: 22px; }
  #rz-menu .rail-divider { flex: none; margin: 10px 0; }
  #rz-menu .app-sidebar-foot { padding-top: 8px; }
  #rz-menu .app-prof-row { height: 52px; }

  /* -- The app shell: the page slides, the drawer is under it (shell.css gives the page its
     canvas and takes the shell's off) -- */
  .app-shell > :is(.app-main, .m-header) {
    transition: transform calc(var(--rz-smooth-dur) * var(--rz-exit)) var(--rz-smooth),
      border-radius calc(var(--rz-smooth-dur) * var(--rz-exit)) var(--rz-smooth);
  }
  body.m-drawer-open .app-shell > :is(.app-main, .m-header, .m-scrim) {
    transform: translateX(var(--m-drawer-shift));
    transition: transform var(--rz-smooth-dur) var(--rz-smooth), border-radius var(--rz-smooth-dur) var(--rz-smooth),
      opacity var(--rz-smooth-dur) var(--rz-smooth);
  }
  body.m-drawer-open .app-shell > .m-burger {
    transform: translateX(var(--m-drawer-shift));
    transition: transform var(--rz-smooth-dur) var(--rz-smooth), scale var(--rz-press-out-dur) var(--rz-press-out),
      background-color var(--rz-instant-dur) var(--rz-instant);
  }
  /* The strip keeps a rounded corner and a shadow on its edge, a card laid over the menu. */
  body.m-drawer-open .app-shell > .app-main {
    border-top-left-radius: calc(22px * var(--rk));
    border-bottom-left-radius: calc(22px * var(--rk));
    box-shadow: -10px 0 30px rgba(15, 34, 48, .16);
  }
  /* What the page fixes to the screen (a start bar, a flashcard bar) would re-anchor to the
     moved page and jump: app.js marks it and it steps aside until the page is back. */
  .app-main [data-m-aside] { visibility: hidden; }
  /* ⚠️ The shell is the drawer's stacking context. Without one, z-index -1 files the drawer in
     the root's, UNDER the shell's own box: that box is transparent here, so the drawer was seen
     through it while every tap on it landed on the shell. Inside the shell's own context the
     order is its box, the drawer, then the page. Pinned by core/tests_menu_drawer.py. */
  .app-shell { isolation: isolate; }
  .app-shell > #rz-menu {
    z-index: -1;
    transform: translateX(calc(-40px * var(--motion-distance)));
    transition: transform calc(var(--rz-smooth-dur) * var(--rz-exit)) var(--rz-smooth),
      visibility calc(var(--rz-smooth-dur) * var(--rz-exit)) var(--rz-smooth);
  }
  /* Visible at once on the way in (no visibility transition), so focus can go into it at once. */
  body.m-drawer-open .app-shell > #rz-menu {
    transform: none;
    transition: transform var(--rz-smooth-dur) var(--rz-smooth);
  }

  /* -- The lesson page: the drawer comes in over the page and the scrim -- */
  .lesson > #rz-menu {
    z-index: calc(var(--z-chrome) + 3);
    box-shadow: var(--e5);
    transform: translateX(-100%);
    transition: transform calc(var(--rz-smooth-dur) * var(--rz-exit)) var(--rz-smooth),
      visibility calc(var(--rz-smooth-dur) * var(--rz-exit)) var(--rz-smooth);
  }
  body.m-drawer-open .lesson > #rz-menu {
    transform: none;
    transition: transform var(--rz-smooth-dur) var(--rz-smooth);
  }
}
/* Reduce Motion: nothing slides anywhere; the drawer fades in over the page (the same selectors). */
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .app-shell > #rz-menu,
  .lesson > #rz-menu {
    z-index: calc(var(--z-chrome) + 3);
    opacity: 0;
    transform: none;
    box-shadow: var(--e5);
    transition: opacity var(--rz-fade-dur) var(--rz-fade), visibility var(--rz-fade-dur) var(--rz-fade);
  }
  body.m-drawer-open .app-shell > #rz-menu,
  body.m-drawer-open .lesson > #rz-menu {
    opacity: 1;
    transform: none;
    transition: opacity var(--rz-fade-dur) var(--rz-fade);
  }
  body.m-drawer-open .app-shell > .app-main { border-radius: 0; box-shadow: none; }
}

/* ===== Card frame · «Ramă» (Ștefan, 2026-10-24; Evaluare 2026-10-25) =====
   Every card with a teal header bar is a teal frame holding a rounded white sheet: 5px of teal
   on the sides and the bottom, and the first block after the header rises one --card-seam over
   the bar with its top corners rounded, so the teal curves into the white instead of meeting
   it at 90°. The bar keeps its visible height (it grows by the same --card-seam the sheet
   covers). Worn by the lesson's cards (table, comparison, list, calculator, grilă), the
   session's card (.sim-card: grilă / subiect, here and in the lesson's Grile tab) and the
   flashcard (.fcc-card, lesson and Evaluare). CSS only, except flashcard_carousel.js →
   chromeH, which counts the sheet's negative margin in a card's height.
   ⚠️ This sheet loads before every screen's: each selector carries at least two classes so it
   beats the card's own border and head padding. A head's own bottom padding comes in through
   --frame-head-pb (default --cardhead-pad-y). */
:is(.quiz, .lb-tbl, .lb-cmp, .lb-list, .lb-calc, .sim-card, .fcc-card) { --card-seam: calc(14px * var(--rk)); }
:is(.quiz, .lb-tbl, .lb-cmp, .lb-list, .lb-calc):not(.lb-calc--soon):has(> :is(.quiz-head, .lb-tbl-head, .lb-cmp-head, .lb-list-head, .lb-calc-head)),
.sim-card.sim-card,
.fcc-card.fcc-card {
  border-style: solid;
  border-color: var(--teal-3);
  border-width: 1.5px 5px 5px;
  /* A teal band under the header's corners: the head is clipped to the frame's inner curve,
     and the card's white showed through that antialiased edge as a hairline. 36px stays
     inside every header (the shortest, a chat-size head, is ~50px with its seam). */
  background-image: linear-gradient(var(--teal-3), var(--teal-3));
  background-size: 100% 36px;
  background-repeat: no-repeat;
}
:is(.quiz, .lb-tbl, .lb-cmp, .lb-list, .lb-calc, .sim-card, .fcc-card) > :is(.quiz-head, .lb-tbl-head, .lb-cmp-head, .lb-list-head, .lb-calc-head, .sim-card-head, .fcc-card-head):not(.x) {
  padding-bottom: calc(var(--frame-head-pb, var(--cardhead-pad-y)) + var(--card-seam));
}
:is(.quiz, .lb-tbl, .lb-cmp, .lb-list, .lb-calc, .sim-card, .fcc-card) > :is(.quiz-head, .lb-tbl-head, .lb-cmp-head, .lb-list-head, .lb-calc-head, .sim-card-head, .fcc-card-head) + * {
  position: relative;
  z-index: 1;
  margin-top: calc(-1 * var(--card-seam));
  border-radius: var(--card-seam) var(--card-seam) 0 0;
  background-color: var(--card);
}

/* ===== Write-in answer box (Ștefan, 2026-10-25) =====
   Every place you write an answer to be graded wears this one box: the simulator's subject
   (.sim-answer), the written flashcard of a mixed review (.sim-flash-ta) and the deck's / the
   lesson's written flashcard (.fcc-write-ta). The screens set only its height.
   - The input vocabulary of the rest of the app: white, a 1.5px --border-2 edge, --r-control
     (a squircle where supported), 16px text (iOS zooms the page into anything smaller).
   - Focus: a teal edge and a 3px teal-tint ring, on --rz-instant — no outline on top of it.
   - Hover (a mouse only): the edge turns --teal-2, like an answer option's ring.
   - Graded / sent (:read-only, :disabled): a record, not an input — a dashed edge on sand. */
:is(.sim-answer, .sim-flash-ta, .fcc-write-ta) {
  box-sizing: border-box;
  width: 100%;
  padding: 14px 16px;
  resize: vertical;
  background: var(--card);
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-control);
  font: inherit;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  transition: border-color var(--rz-instant-dur) var(--rz-instant),
    box-shadow var(--rz-instant-dur) var(--rz-instant),
    background-color var(--rz-instant-dur) var(--rz-instant);
}
:is(.sim-answer, .sim-flash-ta, .fcc-write-ta)::placeholder { color: var(--muted-3); }
@media (hover: hover) and (pointer: fine) {
  :is(.sim-answer, .sim-flash-ta, .fcc-write-ta):hover:not(:focus, :read-only, :disabled) { border-color: var(--teal-2); }
}
:is(.sim-answer, .sim-flash-ta, .fcc-write-ta):focus,
:is(.sim-answer, .sim-flash-ta, .fcc-write-ta):focus-visible {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-tint-2);
}
:is(.sim-answer, .sim-flash-ta, .fcc-write-ta):is(:read-only, :disabled) {
  background: var(--surface-3);
  border-style: dashed;
  color: var(--slate);
  box-shadow: none;
}

/* ===== The assistant's ask bar (partials/ask_bar.html; rz-ask.js) =====
   One bar wherever the assistant is: Acasă and the lesson's Asistent column.
   «+» (a menu) · the field · the mic · Trimite (enabled only with text). Dictation swaps
   the field and its two buttons for the waveform, the timer, ✕ (the «+», a quarter turn)
   and ✓. Everywhere the app draws it the bar stands in its box («The bar in its box», below):
   a rectangle with tile buttons. Bare, as these first rules draw it, it is a pill with round
   icon buttons (the one exception to «a button is never round», static/CLAUDE.md), worn only
   by the «Acasă v3.5» preview; `.rz-ask--multi` is its growing textarea in a smaller bar. */
.rz-ask {
  flex: none;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 8px 0 10px;
  box-sizing: border-box;
  border-radius: var(--r-pill);
  corner-shape: round;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--e1);
  transition: border-color var(--rz-instant-dur) var(--rz-instant),
              box-shadow var(--rz-instant-dur) var(--rz-instant);
}
.rz-ask:focus-within,
.rz-ask.is-listening { border-color: var(--teal-border); box-shadow: 0 0 0 3px var(--teal-tint), var(--e1); }

.rz-ask-ico {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  corner-shape: round;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background-color var(--rz-instant-dur) var(--rz-instant),
              color var(--rz-instant-dur) var(--rz-instant);
}
@media (hover: hover) and (pointer: fine) {
  .rz-ask-ico:hover { background: var(--surface); color: var(--ink); }
}

.rz-ask-in {
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 16.5px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.rz-ask-in::placeholder { color: var(--text-4); }

.rz-ask-send {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  corner-shape: round;
  background: var(--teal);
  color: #FFFFFF;
  cursor: pointer;
  transition: background-color var(--rz-instant-dur) var(--rz-instant),
              color var(--rz-instant-dur) var(--rz-instant),
              transform var(--rz-press-out-dur) var(--rz-press-out);
}
@media (hover: hover) and (pointer: fine) {
  .rz-ask-send:not(:disabled):hover { background: var(--teal-hover); }
}
.rz-ask-send:disabled { background: var(--surface); color: var(--muted-3); cursor: default; }
.rz-ask-send:not(:disabled):active {
  transform: scale(calc(1 - .1 * var(--motion-distance)));
  transition-duration: var(--rz-press-in-dur);
  transition-timing-function: var(--rz-press-in);
}

/* The bare bar with a textarea: it grows to 120px (Enter sends, Shift+Enter is a new line),
   the buttons on the last line. Every textarea bar the app draws is in a box, whose rules
   (below) replace these sizes. */
.rz-ask--multi {
  height: auto;
  min-height: 52px;
  align-items: flex-end;
  gap: 4px;
  padding: 6px 6px 6px 6px;
  border-radius: 26px;
}
.rz-ask--multi .rz-ask-ico { width: 38px; height: 38px; }
.rz-ask--multi .rz-ask-send { width: 38px; height: 38px; }
.rz-ask--multi .rz-ask-in {
  height: auto;
  align-self: center;
  min-height: 22px;
  max-height: 120px;
  padding: 2px 2px;
  resize: none;
  font-size: 14px;
  line-height: 1.5;
}
.rz-ask--multi .rz-ask-wave { height: 38px; }
@media (pointer: coarse) {
  /* Under 16px iOS zooms the page on focus; the buttons keep the 44px touch target. */
  .rz-ask--multi .rz-ask-in { font-size: 16px; }
  .rz-ask--multi :is(.rz-ask-ico, .rz-ask-send) { width: var(--hit-min); height: var(--hit-min); }
  .rz-ask--multi .rz-ask-wave { height: var(--hit-min); }
}

/* ---- Dictation (rz-ask.js) ---- */
.rz-ask-wave, .rz-ask-ok { display: none; }
.rz-ask.is-listening .rz-ask-in,
.rz-ask.is-listening .rz-ask-mic,
.rz-ask.is-listening [data-ask-send] { display: none; }
.rz-ask.is-listening .rz-ask-wave {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 4px;
  animation: rz-ask-fade var(--rz-instant-dur) var(--rz-instant) both;
}
.rz-ask.is-listening .rz-ask-ok { display: grid; }
.rz-ask-wave-cv { flex: 1; min-width: 0; height: 32px; display: block; }
.rz-ask-wave-t { flex: none; font-size: 13px; color: var(--text-2); }
/* While the browser finishes the last words after ✓. */
.rz-ask.is-finishing .rz-ask-ok { background: var(--teal-hover); }
@keyframes rz-ask-fade { from { opacity: 0; } to { opacity: 1; } }

/* «+» turns into ✕ while listening: the same cross, a quarter turn. */
.rz-ask-add svg { transition: rotate var(--rz-snappy-dur) var(--rz-snappy); }
.rz-ask.is-listening .rz-ask-add svg { rotate: 45deg; }
.rz-ask.is-listening .rz-ask-add { color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .rz-ask-add svg { transition: none; }
}

/* ✓ breathes with the voice: a halo scaled by --lvl (0..1), written every frame by
   rz-ask.js on this button only (never on an ancestor). */
.rz-ask-ok { position: relative; isolation: isolate; }
.rz-ask-ok::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  corner-shape: round;
  background: var(--teal);
  opacity: calc(.12 + var(--lvl, 0) * .22);
  transform: scale(calc(1 + var(--lvl, 0) * .55 * var(--motion-distance)));
}
.rz-ask-mic.is-on { color: var(--teal); }

/* ---- The bar in its box (.rz-askbox): Acasă and the three right columns ----
   The house rectangle (a squircle at --r-control) around the bar and what is attached under it,
   a tray (`.rz-ask-tray`: Acasă's «Ce înveți»; in a lesson's column and on the study screen the
   line naming the lesson, `.rz-ask-ctx`). Inside it the bar is a rectangle too and its
   buttons are tiles (--r-tile), as every other icon button. The field grows with its text up
   to --ask-max, then scrolls; past one line the bar turns tall (`.is-tall`, rz-ask.js): the
   field takes its width and the buttons a row of their own under it.
   The bar lies 1px over the box's edge on every side, so with no tray shown the two outlines
   are one. Focus (and dictation) lights the box, the tray with it: the ring is the box's, the
   bar keeps only its teal edge. Sizes are the box's custom properties (a column's by default;
   Acasă sets its own in home.css).
   ⚠️ The children's rules carry three classes on purpose: home.css repeats the plain bar's
   rules after this sheet, and `.rz-ask--multi …` (two classes) would win a tie there. */
.rz-askbox {
  --ask-h: 52px; --ask-btn: 38px; --ask-send: 38px; --ask-pad: 6px; --ask-gap: 4px;
  --ask-fs: 14px; --ask-lh: 22px; --ask-max: min(32dvh, 200px);
  position: relative; flex: none; width: 100%; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: var(--r-control); corner-shape: squircle;
  background: var(--card);
  transition: border-color var(--rz-instant-dur) var(--rz-instant),
              box-shadow var(--rz-instant-dur) var(--rz-instant);
}
.rz-askbox:has(> .rz-ask:focus-within),
.rz-askbox:has(> .rz-ask.is-listening) { border-color: var(--teal-border); box-shadow: 0 0 0 3px var(--teal-tint); }
@media (pointer: coarse) {
  /* Under 16px iOS zooms the page on focus; the buttons keep the 44px touch target. */
  .rz-askbox { --ask-fs: 16px; --ask-lh: 24px; --ask-btn: var(--hit-min); --ask-send: var(--hit-min); }
}
.rz-askbox > .rz-ask {
  position: relative; z-index: 1;
  width: auto; margin: -1px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "add in mic send";
  align-items: center; gap: 6px var(--ask-gap);
  height: auto; min-height: var(--ask-h); padding: var(--ask-pad);
  border-radius: var(--r-control); corner-shape: squircle;
}
.rz-askbox > .rz-ask:focus-within,
.rz-askbox > .rz-ask.is-listening { box-shadow: var(--e1); }
.rz-askbox .rz-ask .rz-ask-add { grid-area: add; }
.rz-askbox .rz-ask .rz-ask-mic { grid-area: mic; }
.rz-askbox .rz-ask .rz-ask-ico { width: var(--ask-btn); height: var(--ask-btn); border-radius: var(--r-tile); corner-shape: squircle; }
.rz-askbox .rz-ask .rz-ask-send { grid-area: send; width: var(--ask-send); height: var(--ask-send); border-radius: var(--r-tile); corner-shape: squircle; }
.rz-askbox .rz-ask .rz-ask-ok::before { border-radius: inherit; corner-shape: inherit; }
.rz-askbox .rz-ask .rz-ask-wave { grid-area: 1 / 2 / 2 / 4; height: var(--ask-btn); }
.rz-askbox .rz-ask .rz-ask-in {
  grid-area: in; align-self: center;
  height: auto; min-height: var(--ask-lh); max-height: var(--ask-max);
  padding: 0 2px; resize: none; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--border-2) transparent;
  font-size: var(--ask-fs); line-height: var(--ask-lh);
}
/* ⚠️ The placeholder stays on one line: a wrapped one counts in the field's scrollHeight
   (Chrome), and an empty bar would stand two lines tall wherever its words do not fit. */
.rz-askbox .rz-ask .rz-ask-in::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* More than a line: the field over the buttons' row. Dictation hides the field, so it keeps the one row. */
.rz-askbox > .rz-ask.is-tall:not(.is-listening) { grid-template-areas: "in in in in" "add . mic send"; padding-top: 14px; }
.rz-askbox > .rz-ask.is-tall:not(.is-listening) .rz-ask-in { padding: 0 6px 0 8px; }
/* The tray: one row under the bar, on the box's own fill. */
.rz-ask-tray { position: relative; box-sizing: border-box; display: flex; align-items: center; min-width: 0; }
/* A tray of one line (partials/ask_ctx.html): what the assistant is given with the question —
   the lesson, in its column and on the study screen. Drawn only where that is true: the
   app-wide dock is told no page, so it has no line. A status, not a control (the lesson's
   column once had a label here dressed as a mention token and lost it for looking clickable):
   no fill of its own, no hover, no press. 30px with its air: the eye in teal, the kind in ink,
   the name after it, cut with an ellipsis. */
.rz-ask-ctx {
  margin: 0; padding: 6px 14px 7px 12px; gap: 7px;
  font-size: 12.5px; line-height: 17px; color: var(--text-2);
  cursor: default; user-select: none;
}
.rz-ask-ctx[hidden] { display: none; }
.rz-ask-ctx > svg { flex: none; color: var(--teal); }
.rz-ask-ctx-k { flex: none; font-weight: 600; color: var(--ink); }
.rz-ask-ctx-t { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rz-ask-ctx-t::before { content: "·"; margin-right: 7px; color: var(--muted-3); }

/* ---- The «+» menu: the lesson's «⋮» menu (.ksb-menu, at the end of this file),
   a little wider and with a group label. rz-ask.js sets top/left and --rz-origin. ---- */
.ksb-menu.rz-ask-menu { width: 248px; padding: 6px; }
.rz-ask-menu .ksb-menu-item { font-size: 13.5px; padding: 9px 10px; gap: 11px; }
.rz-ask-menu .ksb-menu-item svg { width: 18px; height: 18px; flex: none; }
.rz-ask-menu-label {
  padding: 6px 10px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---- «Întreabă» over a selection, and the quote it leaves (partials/ask_sel.html,
   ask_quote.html, ask_quote_msg.html; RZ.askSel / RZ.askQuote in rz-ask.js) ----
   Acasă's chat and the lesson's Asistent column. The button is Claude's «Reply» in the app's
   words: ink, white, a control's radius, on a popover's elevation; it rises in (`present`) over
   the selection, fixed (the column clips its overflow). The quote sits over the bar until the
   next send, which carries it over the reader's message. Each screen sizes the row itself
   (Acasă: .hm-quote, home.css; the lesson: .ksb-quote, lesson.css). */
.rz-ask-sel {
  position: fixed;
  z-index: calc(var(--z-drawer) + 1);   /* over a modeless sheet the selection sits just above */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px 0 12px;
  border: 0;
  border-radius: var(--r-control);
  background: var(--ink);
  color: #FFFFFF;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow: var(--e3);
  cursor: pointer;
  pointer-events: auto;   /* inside a modeless sheet (pointer-events: none but its panel) */
  transition: background-color var(--rz-instant-dur) var(--rz-instant),
              opacity var(--rz-present-dur) var(--rz-present),
              translate var(--rz-present-dur) var(--rz-present),
              scale var(--rz-press-out-dur) var(--rz-press-out);
}
.rz-ask-sel[hidden] { display: none; }
@starting-style { .rz-ask-sel { opacity: 0; translate: 0 calc(4px * var(--motion-distance)); } }
@media (hover: hover) and (pointer: fine) { .rz-ask-sel:hover { background: var(--navy-2); } }
.rz-ask-sel:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }

.rz-quote {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 7px 7px 14px;
  border-radius: var(--r-row);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--e1);
  animation: rz-quote-in var(--rz-snappy-dur) var(--rz-snappy) both;
}
.rz-quote[hidden] { display: none; }
@keyframes rz-quote-in {
  from { opacity: 0; transform: translateY(calc(10px * var(--motion-distance))); }
  to { opacity: 1; transform: none; }
}
.rz-quote-ico { flex: none; display: grid; color: var(--teal); }
.rz-quote-t {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  line-height: 19px;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* In the sent message: over the question, quieter, three lines at most. */
.rz-msg-quote { max-width: 80%; display: flex; align-items: flex-start; gap: 7px; margin-bottom: 6px; font-size: 13px; line-height: 18px; color: var(--text-3); }
.rz-msg-quote .rz-quote-ico { margin-top: 2px; }
.rz-msg-quote-t { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
/* Over the bubble in the column's rows (the lesson, the dock, the study screen), as on Acasă. */
.ksb-msg .rz-msg-quote { max-width: 85%; }

/* ===== Overlays: rz-dialog · rz-sheet · rz-toast (owner: A2) =====
   Runtime and API: static/js/rz-motion.js; contract: static/CLAUDE.md "Overlays".
   Transitions, never keyframes, so a close mid-open reverses from where it is (P3). Round 2:
   entrances are SEEN and start at full speed — a dialog/popover rises --rz-dialog-y (14px) and
   scales from --rz-dialog-scale (.95) on --rz-present (320ms), and leaves on --rz-dismiss
   (200ms); a sheet comes from the screen's edge on --rz-smooth (440ms) and leaves at --rz-exit
   (.65) of that; a toast rises --rz-enter-y (12px) on --rz-snappy. The scrim is a plain tint,
   no blur (only its opacity animates). Reduce Motion:
   --motion-distance 0 removes every translate/scale, and the fades run on --rz-fade-dur
   (block at the end). */
:root:has(dialog.rz-dialog:modal, dialog.rz-sheet:modal) { overflow: hidden; }

/* -- rz-dialog: <dialog class="rz-dialog"> + RZ.dialog.open(). Keep padding 0 and pad the
   children: a click that lands on the dialog box itself is read as a click on the scrim. -- */
.rz-dialog {
  --rz-y: calc(var(--rz-dialog-y) * var(--motion-distance));
  --rz-s: calc(1 - (1 - var(--rz-dialog-scale)) * var(--motion-distance));
  box-sizing: border-box;
  width: min(var(--rz-dialog-w, 480px), calc(100vw - 32px));
  max-width: none; max-height: calc(100dvh - 48px);
  margin: auto; padding: 0;
  border: 1px solid var(--border); border-radius: var(--r-card);
  background: var(--card); color: var(--ink);
  box-shadow: var(--e4);
  overflow: auto; overscroll-behavior: contain;
  opacity: 1; scale: 1; translate: 0 0;
  transition:
    opacity var(--rz-instant-dur) var(--rz-instant),
    scale var(--rz-present-dur) var(--rz-present),
    translate var(--rz-present-dur) var(--rz-present);
}
.rz-dialog::backdrop {
  background: var(--scrim, rgba(15, 34, 48, .48));
  opacity: 1;
  transition: opacity var(--rz-present-dur) var(--rz-present);
}
.rz-dialog.is-closing {
  opacity: 0; scale: var(--rz-s); translate: 0 var(--rz-y);
  transition-duration: var(--rz-dismiss-dur);
  transition-timing-function: var(--rz-dismiss);
}
.rz-dialog.is-closing::backdrop {
  opacity: 0;
  transition-duration: var(--rz-dismiss-dur); transition-timing-function: var(--rz-dismiss);
}
/* @starting-style AFTER the open-state rules (Chrome 130+ needs the order). */
@starting-style {
  .rz-dialog[open] { opacity: 0; scale: var(--rz-s); translate: 0 var(--rz-y); }
  .rz-dialog[open]::backdrop { opacity: 0; }
}
/* Phone: the same dialog is a sheet from the bottom on `smooth`. The panel does not fade
   (opacity = --motion-distance: 1, or 0 under Reduce Motion, where it fades instead). */
@media (max-width: 767px) {
  .rz-dialog {
    --rz-y: calc(100% * var(--motion-distance));
    --rz-s: 1;
    width: 100%; max-height: calc(100dvh - 56px - env(safe-area-inset-top, 0px));
    margin: auto 0 0;
    border-width: 1px 0 0; border-radius: var(--r-feature) var(--r-feature) 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: var(--e5);
    transition:
      opacity var(--rz-fade-dur) var(--rz-instant),
      translate var(--rz-smooth-dur) var(--rz-smooth);
  }
  .rz-dialog::backdrop { transition-duration: var(--rz-smooth-dur); transition-timing-function: var(--rz-smooth); }
  .rz-dialog.is-closing {
    opacity: var(--motion-distance);
    transition-duration: calc(var(--rz-smooth-dur) * var(--rz-exit));
    transition-timing-function: var(--rz-smooth);
  }
  .rz-dialog.is-closing::backdrop {
    transition-duration: calc(var(--rz-smooth-dur) * var(--rz-exit));
    transition-timing-function: var(--rz-smooth);
  }
  @starting-style {
    .rz-dialog[open] { opacity: var(--motion-distance); translate: 0 var(--rz-y); }
  }
}

/* -- rz-sheet: transparent full-viewport <dialog> with its own scrim + panel; JS drives both
   (RZ.sheet). overflow: clip, NOT hidden: a hidden box is still a scroll container, and
   showModal()'s focus scrolls it to reveal the off-screen panel (460px, P4). -- */
.rz-sheet {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--ink);
  overflow: clip;
}
.rz-sheet::backdrop { background: transparent; }
.rz-sheet-scrim {
  position: absolute; inset: 0;
  background: var(--scrim, rgba(15, 34, 48, .48));
  opacity: 0;
}
.rz-sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  width: min(100%, var(--rz-sheet-w, 640px)); margin: 0 auto;
  display: flex; flex-direction: column;
  background: var(--canvas);
  border-radius: var(--r-feature) var(--r-feature) 0 0;
  box-shadow: var(--e5);
  transform: translate3d(0, 100%, 0);
}
/* The panel carries tabindex="-1" in the markup, so opening focuses IT, not the grabber:
   WebKit drew the grabber's ring on a tap-open (programmatic focus after a click on a button
   that took no focus counts as :focus-visible there). The grabber is the next Tab stop and
   keeps its ring; the panel itself shows none (it is the container, like the dialog). */
.rz-sheet-panel:focus { outline: none; }
/* Rubber-banding up must not open a gap under the panel. */
.rz-sheet-panel::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 100%;
  background: inherit;
}
.rz-sheet-grab {
  flex: none; align-self: center;
  width: 64px; height: 28px; margin: 0; padding: 0; border: 0;
  display: grid; place-items: center;
  background: none; cursor: grab; touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.rz-sheet-grab::before {
  content: ""; width: 36px; height: 5px;
  border-radius: var(--r-pill); corner-shape: round; background: var(--border-2);
}
.rz-sheet-grab:focus-visible { outline: var(--focus-ring); outline-offset: calc(-1 * var(--focus-offset)); border-radius: var(--r-chip); }
.rz-sheet-head { flex: none; touch-action: none; user-select: none; -webkit-user-select: none; }
.rz-sheet-body {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.rz-sheet.is-dragging, .rz-sheet.is-dragging * { cursor: grabbing; user-select: none; -webkit-user-select: none; }
/* data-modeless-below="medium": opened with show() (not in the top layer), no scrim and no
   inert while at or below the medium detent, so the page under it stays usable. */
.rz-sheet[data-modeless-below] { z-index: var(--z-drawer); pointer-events: none; }
.rz-sheet[data-modeless-below] .rz-sheet-panel { pointer-events: auto; }
.rz-sheet[data-modeless-below] .rz-sheet-scrim { pointer-events: none; }
.rz-sheet[data-modeless-below].is-modal .rz-sheet-scrim { pointer-events: auto; }
/* data-side="right" (>= 768px): a drawer from the right edge on the same runtime (translateX). */
@media (min-width: 768px) {
  .rz-sheet.is-side .rz-sheet-panel {
    top: 0; left: auto; width: min(var(--rz-drawer-w, 380px), 100%); margin: 0;
    border-radius: var(--r-feature) 0 0 var(--r-feature);
    padding-top: env(safe-area-inset-top, 0px);
    box-shadow: var(--e4);
    transform: translate3d(100%, 0, 0);
  }
  .rz-sheet.is-side .rz-sheet-panel::after { top: 0; left: 100%; width: 100%; height: 100%; }
  .rz-sheet.is-side .rz-sheet-grab { display: none; }
}
/* No backdrop-filter on the scrim (round 2, measured at 120 Hz): the blur under a fading scrim
   cost up to 3 dropped frames per open on a phone-sized lesson page, none without it. */
@media (prefers-reduced-transparency: reduce) {
  .rz-dialog::backdrop, .rz-sheet-scrim {
    background: var(--scrim-opaque, rgba(15, 34, 48, .64));
  }
}

/* -- rz-toast: one permanent role=status region (popover=manual: top layer), made by
   RZ.toast(). One toast at a time; the old one leaves under the new one (same grid cell). -- */
.rz-toaster {
  position: fixed; inset: auto 0 calc(var(--rz-toast-lift, 26px) + env(safe-area-inset-bottom, 0px));
  width: min(440px, calc(100vw - 32px)); margin: 0 auto; padding: 0; border: 0;
  background: transparent; overflow: visible;
  display: grid; pointer-events: none;
}
.rz-toaster:not(:popover-open) { display: none; }
.rz-toast {
  grid-area: 1 / 1; justify-self: center;
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 8px 20px;
  border-radius: var(--r-pill); corner-shape: round;
  background: var(--ink); color: #FFFFFF;
  font: 500 14px/1.35 var(--font-body);
  box-shadow: var(--e3);
  pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none;
  opacity: 1; translate: 0 var(--swipe, 0px);
  transition:
    opacity var(--rz-instant-dur) var(--rz-instant),
    translate var(--rz-snappy-dur) var(--rz-snappy);
}
@starting-style { .rz-toast { opacity: 0; translate: 0 calc(var(--rz-enter-y) * var(--motion-distance)); } }
.rz-toast.is-swiping { transition: none; }
.rz-toast.is-leaving {
  opacity: 0; translate: 0 calc(var(--swipe, 0px) + var(--rz-enter-y) * var(--motion-distance));
  transition-duration: var(--rz-dismiss-dur);
  transition-timing-function: var(--rz-dismiss);
  pointer-events: none;
}
.rz-toast-msg { min-width: 0; }
.rz-toast-act {
  flex: none; min-height: 36px; margin: -4px -12px -4px 0; padding: 0 14px;
  border: 0; border-radius: var(--r-control);
  background: transparent; color: var(--teal-2);
  font: inherit; font-weight: 600; cursor: pointer;
}
.rz-toast-act:focus-visible { outline: var(--focus-ring-on-dark); outline-offset: 0; }
@media (hover: hover) and (pointer: fine) {
  .rz-toast-act:hover { background: rgba(255, 255, 255, .08); }
}
@media (max-width: 767px) {
  .rz-toaster { bottom: calc(var(--rz-toast-lift, 26px) + env(safe-area-inset-bottom, 0px)); }
}
/* A screen with its own fixed bar at the foot lifts the toast clear of it (12px above its top
   edge) through --rz-toast-lift on :root, which the toaster inherits even in the top layer or
   inside a modal. CSS only: rz-motion.js has no bytes left. The numbers are the bars' own
   heights (grile.css, flashcard-carousel.css, onboarding.css); change them together. A phone
   has no bar of its own at the foot (the menu is a drawer), so its default is the desktop's. */
:root:has(.gr-startbar) { --rz-toast-lift: 110px; }                    /* 20 + the bar (77) + 12 */
:root:has(.ob-foot) { --rz-toast-lift: 140px; }                        /* CTA row + «Renunț» */
:root:has(.rv-bar:not([hidden])) { --rz-toast-lift: 92px; }            /* the study screen's bottom bar (80) + 12 */
@media (max-width: 767px) {
  :root:has(.gr-startbar) { --rz-toast-lift: 90px; }                   /* 12 + the bar 66 + 12 */
  :root:has(.rv-bar:not([hidden])) { --rz-toast-lift: 120px; }         /* the study screen's bar, its hint on a row of its own (107) + 12 */
  /* the lesson: over the Asistent FAB's row (lesson.css: 12 + 56 + 12); on its Flashcards tab over
     the bar floating 8px above that row (flashcard-carousel.css: 12 + 56 + 8 + 62 measured + 12) */
  :root:has(.lesson-ksb-fab) { --rz-toast-lift: 80px; }
  /* the app-wide «Asistent» button, the same corner and size (assistant-dock.css: 12 + 56 + 12);
     on /grile/ it sits over the start bar (12 + 66 + 12 + 56 + 12) */
  :root:has(.rz-dock-fab) { --rz-toast-lift: 80px; }
  :root:has(.gr-startbar):has(.rz-dock-fab) { --rz-toast-lift: 158px; }
  :root:has(.lesson-pane:not([hidden]) .fcc--bar) { --rz-toast-lift: 150px; }
  /* Evaluare's deck: its flashcard bar at the foot (56 + 12); a session's CTA row at the foot
     (grile.css: 56 + 2 × 8 + 12) */
  :root:has(body.fc-standalone .fcc--bar) { --rz-toast-lift: 68px; }
  :root:has(body.sim-page:not(.fc-standalone) .sim:not(.sim--embedded) .sim-ctarow) { --rz-toast-lift: 84px; }
}

/* -- rz-pop: [popover].rz-pop menus grow from their source. Set --rz-origin to the corner
   nearest the invoker (default top left). The exit animates where `overlay` exists (Chrome);
   elsewhere a closing popover leaves the top layer at once. -- */
.rz-pop {
  margin: 0; padding: 6px;
  border: 1px solid var(--border); border-radius: var(--r-card);
  background: var(--card); color: var(--ink);
  box-shadow: var(--e3);
  transform-origin: var(--rz-origin, top left);
  opacity: 1; scale: 1;
  transition-property: opacity, scale, display, overlay;
  transition-duration: var(--rz-instant-dur), var(--rz-present-dur), var(--rz-present-dur), var(--rz-present-dur);
  transition-timing-function: var(--rz-instant), var(--rz-present), var(--rz-present), var(--rz-present);
  transition-behavior: allow-discrete;
}
.rz-pop:not(:popover-open) {
  opacity: 0; scale: calc(1 - (1 - var(--rz-dialog-scale)) * var(--motion-distance));
  transition-duration: var(--rz-dismiss-dur);
  transition-timing-function: var(--rz-dismiss);
}
@starting-style { .rz-pop:popover-open { opacity: 0; scale: calc(1 - (1 - var(--rz-dialog-scale)) * var(--motion-distance)); } }

/* Reduce Motion: the live selectors again (a media query adds no specificity). */
@media (prefers-reduced-motion: reduce) {
  .rz-dialog, .rz-dialog::backdrop, .rz-toast, .rz-pop,
  .rz-dialog.is-closing, .rz-dialog.is-closing::backdrop, .rz-toast.is-leaving, .rz-pop:not(:popover-open) {
    transition-duration: var(--rz-fade-dur);
  }
}

/* ===== Navigation: cross-document View Transitions (F2-9; owner: D2) =====
   Opt-in only without Reduce Motion (Chrome/Edge 126+, Safari 18.2+; Firefox navigates
   normally). The chrome stays put: the rail, the phone header and the phone's hamburger are
   their own groups and never animate. The page itself: the old one fades out in --rz-nav-out-dur, the
   new one fades in and rises --rz-nav-rise on --rz-nav-in (Back: comes down from above).
   Kept cheap on purpose — every frame of it must be a plain compositor quad
   (static/CLAUDE.md "View Transitions & prefetch", measured on a 120 Hz M1 Pro):
   - no shared element (no morph): a group whose size changes animates width/height on the
     main thread, which is busiest exactly then (the new page is still loading);
   - no plus-lighter / isolation on the root pair (the UA crossfade): it is a blend no other
     frame draws, and the first time the GPU meets it Chrome compiles a shader (≈0.5 s frozen
     in a trace, intermittent with the shader cache);
   - the root group does not animate (same box on both pages). */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.rail { view-transition-name: rz-rail; }
.m-header { view-transition-name: rz-header; }
.app-shell > .m-burger { view-transition-name: rz-burger; }   /* the shell's, fixed; the lesson's moves with its topbar */
::view-transition-group(rz-rail), ::view-transition-group(rz-header), ::view-transition-group(rz-burger),
::view-transition-old(rz-rail), ::view-transition-old(rz-header), ::view-transition-old(rz-burger),
::view-transition-new(rz-rail), ::view-transition-new(rz-header), ::view-transition-new(rz-burger) { animation: none; }
::view-transition-old(rz-rail), ::view-transition-old(rz-header), ::view-transition-old(rz-burger) { display: none; }
::view-transition-group(root) { animation: none; }
::view-transition-image-pair(root) { isolation: auto; }
::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; }
::view-transition-old(root) { animation: var(--rz-nav-out-dur) var(--rz-nav-out) both rz-nav-out; }
::view-transition-new(root) { animation: var(--rz-nav-in-dur) var(--rz-nav-in) both rz-nav-in; }
/* Back (rz-vt.js adds the type on a traverse to an earlier entry). */
html:active-view-transition-type(rz-back)::view-transition-new(root) { animation-name: rz-nav-back; }
@keyframes rz-nav-out { to { opacity: 0; } }
@keyframes rz-nav-in { from { opacity: 0; transform: translateY(calc(var(--rz-nav-rise) * var(--motion-distance))); } }
@keyframes rz-nav-back { from { opacity: 0; transform: translateY(calc(var(--rz-nav-rise) * -.75 * var(--motion-distance))); } }
/* Clicks during the transition reach the new page, not the overlay. */
::view-transition { pointer-events: none; }

/* ===== Answer option (owner: B1) =====
   ONE answer row for every grilă: the /grile/ session (grile-sesiune.js clones it from a
   <template>) and the lesson's «Verifică-te» card (partials/quiz_card.html). Markup:
   partials/rz_opt.html. SINTEZA §5.7 — the states, in the order they can happen:
     rest     white, a 1px inset ring; ≥ 45px tall (52px on touch), radius --r-row
     hover    only under a mouse, never while locked or once picked
     pressed  round 2 (visible, iOS-like): the row squeezes to .98 (`scale`, the .rz-press
              recipe: in on --rz-press-in, back on --rz-press-out) and takes a tint; no translate
     on       picked (click/release, never pointerdown): teal tint + a 2px INSET ring on
              --rz-instant, so the row does not move by a pixel; the radio's dot grows in
              (.4 → 1), the checkbox's tick draws itself
     pending  the group is locked while the verdict travels; past 300ms the picked chip
              pulses (.is-pulsing, set by JS — the delay is the busy threshold, not a speed)
     graded   every row at once: colour on --rz-snappy and a ✓ / ✕ that grows .6 → 1 — but
              only on the frame the verdict lands (.is-fresh), not when you walk back to it
     locked   no hover, no press, and no faded opacity (it is a record, not a disabled control)
   Rings are box-shadows, never borders: a state change repaints and lays out nothing. */
.rz-opts {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.rz-opt {
  --opt-bg: var(--card);
  --opt-fg: var(--body-c);
  --opt-ring: var(--border);
  --opt-ring-w: 1px;
  --opt-chip-bg: #F6EFDF;
  --opt-chip-fg: var(--text-3);
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 45px;
  box-sizing: border-box;
  margin: 0;
  padding: 9px 13px;
  border: 0;
  border-radius: var(--r-row);
  background: var(--opt-bg);
  color: var(--opt-fg);
  box-shadow: inset 0 0 0 var(--opt-ring-w) var(--opt-ring);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    background-color var(--rz-instant-dur) var(--rz-instant),
    box-shadow var(--rz-instant-dur) var(--rz-instant),
    color var(--rz-instant-dur) var(--rz-instant),
    scale var(--rz-press-out-dur) var(--rz-press-out);
}
@media (pointer: coarse) {
  .rz-opts { gap: 8px; }
  .rz-opt { min-height: 52px; }
}
.rz-opt-chip {
  flex: none;
  width: 25px;
  height: 25px;
  border-radius: var(--r-chip);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-eyebrow);
  font-size: 12.5px;
  font-weight: 700;
  background: var(--opt-chip-bg);
  color: var(--opt-chip-fg);
  transition: background-color var(--rz-instant-dur) var(--rz-instant), color var(--rz-instant-dur) var(--rz-instant);
}
.rz-opt-text { flex: 1; min-width: 0; }
.rz-opt-text p { margin: 0; }

/* The radio (round) / checkbox (square) at the end of the row. Drawn with an inset ring and
   a fill, so picking it changes no border width. */
.rz-opt-ctl {
  flex: none;
  position: relative;
  width: 22px;
  height: 22px;
  margin-left: auto;
  display: grid;
  place-items: center;
  border-radius: var(--r-round); corner-shape: round;
  background: var(--card);
  box-shadow: inset 0 0 0 1.8px var(--muted-4);
  transition: background-color var(--rz-instant-dur) var(--rz-instant), box-shadow var(--rz-instant-dur) var(--rz-instant);
}
.rz-opt-ctl svg { width: 13px; height: 13px; opacity: 0; }
.rz-opt-ctl svg path { stroke-dasharray: 24; stroke-dashoffset: 24; }
.rz-opts--multi .rz-opt-ctl { border-radius: var(--r-mark); }
.rz-opt-ctl::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: var(--r-round); corner-shape: round;
  background: #FFFFFF;
  opacity: 0;
  transform: scale(calc(1 - .6 * var(--motion-distance)));
  transition: opacity var(--rz-instant-dur) var(--rz-instant), transform var(--rz-snappy-dur) var(--rz-snappy);
}
.rz-opts--multi .rz-opt-ctl::after { display: none; }
/* A radio is a dot, a checkbox a tick — never both. */
.rz-opts:not(.rz-opts--multi) .rz-opt-ctl svg { display: none; }

/* The verdict glyph takes the control's place once graded. */
.rz-opt-glyph {
  flex: none;
  display: none;
  width: 22px;
  height: 22px;
  margin-left: auto;
  border-radius: var(--r-round); corner-shape: round;
  place-items: center;
  color: #FFFFFF;
}
.rz-opt-glyph svg { width: 13px; height: 13px; display: none; }

/* hover — a mouse only, and only on a row you can still pick */
@media (hover: hover) and (pointer: fine) {
  .rz-opts:not(.is-locked) .rz-opt:not(.is-on):hover {
    --opt-ring: var(--teal-2);
    --opt-bg: #FBF6E8;
  }
}
/* pressed — squeezes in on press-in (every property: a transition is read off the state you
   go TO) and comes back on the row's own press-out above */
.rz-opts:not(.is-locked) .rz-opt:active {
  scale: var(--rz-press-s-card);
  transition-duration: var(--rz-press-in-dur);
  transition-timing-function: var(--rz-press-in);
  --opt-bg: #F3EEE4;
  --opt-chip-bg: #E6E2D9;
}
.rz-opts:not(.is-locked) .rz-opt:active .rz-opt-chip {
  transition-duration: var(--rz-press-in-dur);
  transition-timing-function: var(--rz-press-in);
}
.rz-opt:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }

/* on — picked, before any verdict */
.rz-opt.is-on {
  --opt-bg: var(--teal-tint-2);
  --opt-fg: var(--ink);
  --opt-ring: var(--teal);
  --opt-ring-w: 2px;
  --opt-chip-bg: var(--teal);
  --opt-chip-fg: #FFFFFF;
}
.rz-opts:not(.is-locked) .rz-opt.is-on:active { --opt-bg: #DBECEB; --opt-chip-bg: var(--teal); }
.rz-opt.is-on .rz-opt-ctl { background: var(--teal); box-shadow: none; }
.rz-opt.is-on .rz-opt-ctl::after { opacity: 1; transform: none; }
.rz-opt.is-on .rz-opt-ctl svg { opacity: 1; }
.rz-opt.is-on .rz-opt-ctl svg path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--rz-instant-dur) var(--rz-instant);
}

/* pending / locked */
.rz-opts.is-locked .rz-opt { cursor: default; }
.rz-opt.is-pulsing .rz-opt-chip { animation: rz-opt-pulse var(--rz-wait-pulse-dur) var(--rz-wait-ease) infinite; }
@keyframes rz-opt-pulse { 50% { opacity: .55; } }

/* graded — the four states (SINTEZA §5.7):
     teal = correct and you picked it · gold = correct and you missed it ·
     red = wrong and you picked it · neutral = wrong and left alone.
   What YOU chose keeps the 2px teal ring (`is-picked`) on top of its verdict colour. */
.rz-opts.is-graded .rz-opt-ctl { visibility: hidden; }
.rz-opts.is-graded :is(.rz-opt.is-ok-picked, .rz-opt.is-ok, .rz-opt.is-wrong) .rz-opt-ctl { display: none; }
.rz-opt.is-ok-picked, .rz-opt.is-ok, .rz-opt.is-wrong { --opt-ring-w: 1.5px; }
.rz-opt.is-ok-picked { --opt-bg: var(--teal-tint-3); --opt-fg: var(--teal-ink); --opt-ring: var(--teal); --opt-chip-bg: var(--teal); --opt-chip-fg: #FFFFFF; }
.rz-opt.is-ok { --opt-bg: var(--miss-tint); --opt-fg: var(--miss-ink); --opt-ring: var(--miss); --opt-chip-bg: var(--miss); --opt-chip-fg: #FFFFFF; }
.rz-opt.is-wrong { --opt-bg: var(--error-tint); --opt-fg: #8A3A2C; --opt-ring: var(--error-2); --opt-chip-bg: var(--error); --opt-chip-fg: #FFFFFF; }
.rz-opt.is-picked { --opt-ring: var(--teal-2); --opt-ring-w: 2px; }
.rz-opt.is-ok-picked .rz-opt-glyph, .rz-opt.is-ok .rz-opt-glyph, .rz-opt.is-wrong .rz-opt-glyph { display: grid; }
.rz-opt.is-ok-picked .rz-opt-glyph { background: var(--teal); }
.rz-opt.is-ok .rz-opt-glyph { background: var(--miss); }
.rz-opt.is-wrong .rz-opt-glyph { background: var(--error); }
.rz-opt.is-ok-picked .rz-opt-glyph .g-ok, .rz-opt.is-ok .rz-opt-glyph .g-ok,
.rz-opt.is-wrong .rz-opt-glyph .g-no { display: block; }
/* The verdict's own frame: colours on snappy, the glyph grows in. Walking back to a graded
   grilă later paints it at once (no .is-fresh). */
.rz-opts.is-fresh .rz-opt,
.rz-opts.is-fresh .rz-opt-chip {
  transition-duration: var(--rz-snappy-dur);
  transition-timing-function: var(--rz-snappy);
}
.rz-opts.is-fresh .rz-opt-glyph { animation: rz-opt-glyph var(--rz-snappy-dur) var(--rz-snappy) both; }
@keyframes rz-opt-glyph {
  from { opacity: 0; transform: scale(calc(1 - .4 * var(--motion-distance))); }
}
/* A content swap (the next grilă renders into the same rows): no colour fade from the
   previous question's state. */
.rz-opts.is-swapping .rz-opt, .rz-opts.is-swapping .rz-opt-chip { transition: none; }

@media (forced-colors: active) {
  .rz-opt { border: 1px solid ButtonText; }
  .rz-opt.is-on, .rz-opt.is-picked { border: 2px solid Highlight; }
}
/* Free-reading additions, shared by the home dashboard and revamp. */
.reading-notices{padding:22px 24px;margin-bottom:24px;background:var(--teal-tint-2);border:1px solid var(--teal-border);border-radius:18px}
.reading-notices h2{font-family:var(--font-serif);font-size:23px;margin:0 0 16px}
.reading-notice{margin:12px 0 18px}.reading-notice p{font-size:14px;line-height:1.5;margin:5px 0;color:var(--body-c)}
.reading-notices>a{color:var(--teal-ink);font-weight:600}

/* ---- The assistant column's head and its overlays ---------------------------------------------
   Shared by the lesson's column (lessons/detail.html `.lesson-ksb-head`, lesson.css) and the
   app-wide dock (partials/assistant_dock.html `.rz-dock-head`, assistant-dock.css), which load
   different sheets: the Panou | Asistent switch (`.ksb-switch`, its solo form a caption), the head's
   small buttons (`.ksb-act`: «+», «⋮»; ✕ is the shared `.rz-x`), the «⋮» menu (`.ksb-menu`), the
   delete confirmation (`.ksb-confirm`) and «Conversații anterioare»'s chrome (`.ksb-threads-*`).
   Each head keeps its own layout (height, gap, which buttons show when). Here, at the end of the
   file, so they keep the place in the cascade they had in lesson.css (after the ask bar and
   `.rz-pop`). docs/screens/assistant.md. */
/* The switch: the same idiom as the lesson's Lecție/Farmacologie/… toggle — sand track, white
   active pill, muted inactive icons. */
.ksb-switch { flex: 1 1 auto; display: flex; align-items: stretch; gap: 3px; padding: 4px; background: #F0EEE9; border-radius: calc(13px * var(--rk)); }
.ksb-switch-btn {
    flex: 1 1 0; min-width: 0;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 30px; padding: 0 8px; border: none; border-radius: calc((13px - 4px) * var(--rk)); background: none;
    font-family: var(--font-body); font-size: 12.5px; font-weight: 600; white-space: nowrap;
    color: var(--muted); cursor: pointer;
    transition: color var(--rz-instant-dur) var(--rz-instant);
}
.ksb-switch-btn svg { flex: none; }
@media (hover: hover) and (pointer: fine) { .ksb-switch-btn:hover { color: var(--ink); } }
.ksb-switch-btn:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }
.ksb-switch-btn.is-on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(28, 27, 25, 0.08); }
/* Round 2: the pill is one element that slides (lesson.js → placeSwitchInd), as on the tab
   bar; until it is placed (or in the solo caption) the active button paints its own. */
.ksb-switch { position: relative; isolation: isolate; }
.ksb-switch-ind {
    position: absolute; left: 0; top: 0; z-index: -1;
    border-radius: calc((13px - 4px) * var(--rk));
    background: var(--card);
    box-shadow: 0 1px 2px rgba(28, 27, 25, 0.08);
    pointer-events: none;
    display: none;
    transition: transform var(--rz-snappy-dur) var(--rz-snappy);
}
.ksb-switch.has-ind .ksb-switch-ind { display: block; }
.ksb-switch-ind.is-instant { transition: none; }
.ksb-switch.has-ind .ksb-switch-btn.is-on { background: none; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .ksb-switch-ind { transition: none; } }
/* ---- Solo: the assistant on a pane that has no knowledge panel ----
   Flashcards never has one, Farmacologie/Biochimie on 7 of 160 —
   so this is the common state, not the edge case. With nothing to switch back TO, the
   control stops being a switch: the Panou half goes entirely and what is left reads as the
   column's caption. A greyed-out half is a dead control explaining itself, and it made the
   panel look broken on the tabs a resident spends most of their time on.
   ⚠️ `display: none`, not `[disabled]` — it also takes the button out of the a11y tree and
   out of tab order, which "a button you cannot press" does not. */
.ksb-switch.is-solo { background: none; padding: 0; }
.ksb-switch.is-solo .ksb-switch-btn[data-ksb-mode="panou"] { display: none; }
.ksb-switch.is-solo .ksb-switch-btn {
    flex: 1 1 auto;
    justify-content: flex-start;
    padding-left: 2px;
    background: none;
    box-shadow: none;
    color: var(--ink);
    cursor: default;
}

.ksb-act {
    flex: none;
    display: inline-flex; position: relative;
    width: 24px; height: 24px; padding: 0;
    align-items: center; justify-content: center;
    border: none; border-radius: calc(9px * var(--rk)); background: none;
    color: var(--muted-2); cursor: pointer;
    transition: background-color var(--rz-instant-dur) var(--rz-instant), color var(--rz-instant-dur) var(--rz-instant), scale var(--rz-press-out-dur) var(--rz-press-out);
}
.ksb-act:active { transition-duration: var(--rz-press-in-dur); transition-timing-function: var(--rz-press-in); background: var(--sand); color: var(--ink); }
@media (pointer: coarse) {
    .ksb-act::after { content: ""; position: absolute; inset: calc((24px - var(--hit-min)) / 2) -4px; }
}
@media (hover: hover) and (pointer: fine) { .ksb-act:hover { background: var(--sand); color: var(--ink); } }
.ksb-act[aria-expanded="true"] { background: var(--sand); color: var(--ink); }
/* ⚠️ The colour goes on the glyph too: a head that greys its glyphs (`.lesson-ksb-head svg`,
   `.rz-dock-head svg`) hands it back with `<head> .ksb-act svg { color: inherit }` — at equal
   specificity this rule, earlier in the cascade, would lose. */
.ksb-act svg { display: block; color: inherit; }

/* The «⋮» menu: a popover (.rz-pop) — the top layer, so no column, drawer or sheet clips it;
   it grows from the button's corner. Placed under the button by its script (lesson.js,
   assistant-dock.js). Also worn by the conversations' row menu (#cv-menu) and the ask bar's «+». */
.ksb-menu {
    --rz-origin: top right;
    position: fixed;
    inset: auto;
    width: 214px; padding: 5px;
    box-sizing: border-box;
    border-radius: calc(13px * var(--rk));
}
.ksb-menu[hidden] { display: none; }
.ksb-menu-item {
    display: flex; align-items: center; gap: 9px; width: 100%;
    padding: 8px 9px; border: none; border-radius: calc((13px - 5px) * var(--rk)); background: none;
    font-family: var(--font-body); font-size: 12.5px; font-weight: 550; text-align: left;
    color: var(--body-c); cursor: pointer;
}
@media (pointer: coarse) { .ksb-menu-item { min-height: var(--hit-min); } }
.ksb-menu-item:active { background: var(--teal-tint-2); }
/* ⚠️ An author `display` beats the UA's `[hidden] { display: none }`: without this, «Șterge
   conversația» would stay on screen with no conversation to delete. */
.ksb-menu-item[hidden] { display: none; }
.ksb-menu-item svg { flex: none; color: var(--muted-2); }
@media (hover: hover) and (pointer: fine) {
    .ksb-menu-item:hover { background: var(--teal-tint-2); color: var(--ink); }
    .ksb-menu-item:hover svg { color: var(--teal); }
    .ksb-menu-item.is-danger:hover { background: var(--error-tint); }
    .ksb-menu-item.is-danger:hover svg { color: var(--error); }
}
.ksb-menu-count { margin-left: auto; font-size: 12px; color: var(--muted-2); }
.ksb-menu-sep { height: 1px; margin: 5px 7px; background: var(--divider); }
/* Deleting is the one command that loses something: under a line, red, last. */
.ksb-menu-item.is-danger, .ksb-menu-item.is-danger svg { color: var(--error); }

/* «Conversații anterioare» in the column: «←» back, the list's scroller, the foot line (the
   list itself is conversations.css's; showing it in place of the log is each column's). */
.ksb-threads-back {
    flex: none;
    display: flex; align-items: center; gap: 7px;
    padding: 6px 2px 10px; border: none; background: none; cursor: pointer;
    font-family: var(--font-eyebrow); font-size: 10px; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
}
@media (hover: hover) and (pointer: fine) { .ksb-threads-back:hover { color: var(--ink); } }
.ksb-threads-body {
    flex: 1 1 auto; min-height: 0; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: var(--border-2) transparent;
}
.ksb-threads-foot {
    flex: none; margin: 10px 0 0; padding-top: 10px;
    border-top: 1px solid var(--divider);
    font-size: 10px; text-align: center; color: var(--muted-3);
}
.ksb-threads-foot[hidden] { display: none; }
.ksb-threads-empty { margin: 18px 2px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }

/* The delete confirmation: an rz-dialog (the one scrim, Esc / back, a bottom sheet on a phone);
   only its content here. It lives inside its column, so it travels with it into the drawer /
   sheet and stays usable while the sheet inerts the page. Also #cv-del-dialog. */
.ksb-confirm { --rz-dialog-w: 360px; }
.ksb-confirm-body { padding: 20px 20px 0; }
.ksb-dialog-title {
    margin: 0 0 7px;
    font-family: var(--font-serif); font-size: 18px; font-weight: 700; line-height: 1.3;
    color: var(--ink);
}
/* The thread's title goes into the text, cut short by the script; the line never leaves the dialog. */
.ksb-dialog-text { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); overflow-wrap: anywhere; }
.ksb-dialog-acts { display: flex; gap: 9px; padding: 18px 20px calc(16px + env(safe-area-inset-bottom, 0px)); }
.ksb-dialog-acts .btn { flex: 1 1 0; }
