/* Formation Manda · the learner's screens: a rail on the left with the tree of the track, a top bar
   with the breadcrumbs, pages laid out on the canvas, a white reader for the chapters, a quiz that
   takes the whole window. Loaded after application.css, which holds the tokens and the shell. */

/* ---------- Shell: rail, top bar, bare pages ---------- */

.app-shell-learner .app-sidebar { width: 272px; }
.app-shell-learner .app-topbar { height: 60px; gap: 16px; }
.app-shell-learner .app-topbar .nav-search { width: 300px; }
.app-topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; min-width: 0; }
.topbar-tools { display: flex; gap: 6px; }
.icon-button {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 6px;
  border: 1px solid var(--color-border-strong); background: var(--color-surface); color: var(--color-muted); text-decoration: none;
}
.icon-button:hover { color: var(--color-brand-text); border-color: var(--color-brand); }
.icon-button.is-off { opacity: .35; }
.icon-button-form { display: contents; }
button.icon-button { padding: 0; font: inherit; cursor: pointer; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 0.85rem; color: var(--color-muted); white-space: nowrap; }
.crumbs > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { color: var(--color-muted); text-decoration: none; }
.crumbs a:hover { color: var(--color-brand-text); }
.crumbs b { color: var(--color-ink); font-weight: 600; }
.crumbs .icon { width: 14px; height: 14px; flex: none; }
.app-content-bare { padding: 0; }
.app-content-bare > .flash { margin: 20px 40px 0; }

/* The rail: the tree of the track being followed, or the dashboard, the tracks and the resources. */
.rail-back { display: flex; align-items: center; gap: 6px; padding: 4px 8px 10px; font-size: 0.8125rem; color: var(--color-muted); text-decoration: none; }
.rail-back:hover { color: var(--color-brand-text); }
.rail-track { padding: 6px 10px 12px; }
.rail-track h2 { margin: 0; font-size: 0.95rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--color-ink); }
.rail-track h2 a { color: inherit; text-decoration: none; }
.rail-track p { margin: 2px 0 0; }
.rail-track .bar { margin-top: 8px; }
.side-nav .rail-module { gap: 10px; min-height: 38px; padding: 7px 10px; color: var(--color-text); font-size: 0.8125rem; }
.side-nav .rail-module b {
  display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--color-border-strong); font-size: 0.7rem; font-weight: 700; color: var(--color-muted);
}
.side-nav .rail-module b .icon { width: 12px; height: 12px; color: inherit; opacity: 1; }
.side-nav .rail-module.is-done b { background: var(--color-brand); border-color: var(--color-brand); color: var(--color-on-brand); }
.side-nav .rail-module.is-active { background: var(--color-brand-soft); color: var(--color-brand-text); font-weight: 600; }
.side-nav .rail-module.is-active b { border-color: var(--color-brand); color: var(--color-brand-text); }
.side-nav .rail-module.is-active.is-done b { color: var(--color-on-brand); }
.side-nav .rail-module.is-empty { color: var(--color-muted); }
.side-nav .rail-module .progress-ring { font-size: 0.6rem; }
.side-nav .rail-lesson { gap: 8px; min-height: 32px; padding: 5px 10px 5px 40px; font-size: 0.8rem; color: var(--color-muted); }
.side-nav .rail-lesson i { width: 13px; height: 13px; flex: none; border-radius: 50%; border: 1.5px solid var(--color-border-strong); }
.side-nav .rail-lesson.is-read i { background: var(--color-success); border-color: var(--color-success); }
.side-nav .rail-lesson.is-active { background: var(--color-surface-soft); color: var(--color-ink); font-weight: 600; }
.side-nav .rail-lesson.is-active i { border-color: var(--color-brand); }
.side-nav .rail-extra { font-style: italic; }
.side-nav .rail-exam { margin-top: 4px; }
.side-nav .rail-exam b .icon { width: 11px; height: 11px; }

/* ---------- Common pieces ---------- */

.page-title { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; line-height: 1.2; color: var(--color-ink); margin: 4px 0 6px; }
.page-lead { color: var(--color-muted); font-size: 1rem; margin: 0 0 22px; }
.section-title { font-size: 1.15rem; margin: 30px 0 12px; }
.bar { height: 6px; border-radius: 999px; background: var(--color-border); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; background: var(--color-brand); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; margin: 0; }
.pill .icon { width: 14px; height: 14px; }
.pill-ok { background: var(--color-success-soft); color: var(--color-success-text); }
.pill-now { background: var(--color-brand-soft); color: var(--color-brand-text); }
.pill-todo { background: var(--color-surface-soft); color: var(--color-muted); border: 1px solid var(--color-border); }
.pill-warn { background: var(--color-warning-soft); color: var(--color-warning-text); }
.is-ok { color: var(--color-success-text); }
.is-ko { color: var(--color-danger-text); }
.progress-ring-tiny { --size: 36px; font-size: 0.6rem; }
.progress-ring-tiny::before { inset: 4px; }
.inner { padding: 28px 40px 56px; max-width: 1100px; margin: 0 auto; }
.inner-narrow { max-width: 820px; }
.inner > .page-title:first-child { margin-top: 0; }

/* A page in two parts: the content, and a context panel on the right. */
.body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 100%; }
.center { padding: 32px 48px 80px; min-width: 0; }
.ctx { display: flex; flex-direction: column; gap: 24px; padding: 28px 22px 40px; border-left: 1px solid var(--color-border); background: var(--color-surface); font-size: 0.875rem; }
.ctx h2 { margin: 0 0 10px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--color-muted); }
.ctx p { margin: 0 0 8px; }
.ctx-kpi { display: flex; align-items: center; gap: 14px; }
.ctx-kpi b { display: block; font-family: var(--font-display); font-size: 1.25rem; color: var(--color-ink); }
.ctx-kpi p { margin: 2px 0 0; }
.ctx-strong { font-weight: 600; color: var(--color-ink); margin: 0 0 2px; }
.ctx .button { margin-top: 4px; }
.ctx-link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; padding: 8px 10px;
  border: 1px solid var(--color-border); border-radius: 6px; color: var(--color-ink); font-weight: 500; text-decoration: none;
}
.ctx-link:hover { border-color: var(--color-brand); color: var(--color-brand-text); }
.ctx-link .icon { width: 14px; height: 14px; color: var(--color-muted); }
.ctx .track-about { margin: 0; border: 0; padding: 0; }
.ctx .track-about summary { min-height: 32px; font-size: 0.875rem; }
.ctx .track-about .prose { font-size: 0.85rem; }
.ctx .track-about table { font-size: 0.8rem; }
@media (max-width: 1100px) {
  .body { grid-template-columns: 1fr; }
  .ctx { border-left: 0; border-top: 1px solid var(--color-border); }
}

/* A plan: the modules of a track, the steps of a module. */
.plan { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.plan-step {
  position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface);
}
.plan-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--color-surface-soft); color: var(--color-muted); font-size: 0.85rem; font-weight: 700; }
.plan-num .icon { width: 17px; height: 17px; }
.plan-step.is-done .plan-num { background: var(--color-success-soft); color: var(--color-success-text); }
.plan-step.is-now { border-color: var(--color-brand); box-shadow: 0 0 0 3px var(--color-brand-ring); }
.plan-step.is-now .plan-num { background: var(--color-brand); color: var(--color-on-brand); }
.plan-body { min-width: 0; }
.plan-title { margin: 0; font-weight: 600; color: var(--color-ink); }
.plan-title a { color: inherit; text-decoration: none; }
.plan-title a::after { content: ""; position: absolute; inset: 0; border-radius: 10px; } /* the whole row opens the step */
.plan-step:hover .plan-title a { color: var(--color-brand-text); }
.plan-meta { margin: 2px 0 0; font-size: 0.8125rem; color: var(--color-muted); }
.plan-step > .button, .plan-step > .pill { position: relative; z-index: 1; }
.plan-exam { background: var(--color-warning-soft); border-color: color-mix(in srgb, var(--color-warning) 30%, transparent); }
.plan-exam .plan-num { background: var(--color-surface); color: var(--color-warning-text); }
.plan-exam.is-done .plan-num { background: var(--color-warning); color: var(--color-on-brand); }
@media (max-width: 600px) {
  .plan-step { grid-template-columns: 36px minmax(0, 1fr); }
  .plan-step > .button, .plan-step > .pill { grid-column: 2; justify-self: start; }
}

/* ---------- Dashboard ---------- */

.dash { padding: 32px 40px 56px; max-width: 1240px; margin: 0 auto; }
.dash-title { font-family: var(--font-display); font-size: 1.9rem; margin: 0; }
.dash-greet { margin: 4px 0 0; color: var(--color-muted); font-size: 0.95rem; }
.dash-h2 { font-size: 1.15rem; margin: 32px 0 12px; }
.dash-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; margin-top: 24px; }
.hero {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 26px 28px;
  border-radius: 12px; background: var(--color-brand); color: var(--color-on-brand);
}
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: color-mix(in srgb, var(--color-sheen) 8%, transparent); }
.hero > * { position: relative; }
.hero p { margin: 0; }
.hero .eyebrow { color: var(--color-on-brand); }
.hero-title { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.25; }
.hero .button { align-self: flex-start; margin-top: 6px; background: var(--color-on-brand); color: var(--color-brand-strong); } /* white on the violet, in both themes */
.hero .button:hover { color: var(--color-brand-strong); }
.dash-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dash-stats .stat { min-width: 0; border-radius: 12px; box-shadow: none; font-size: 0.8125rem; }
.dash-stats .stat strong { font-family: var(--font-display); font-size: 1.6rem; }
.dash-stats .stat small { font-size: 0.9rem; font-weight: 500; color: var(--color-muted); }
.track-dashboard {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 18px 22px; margin-bottom: 12px; border-radius: 12px; background: var(--color-surface); border: 1px solid var(--color-border);
}
.track-dashboard-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.track-dashboard h2 { margin: 0; font-size: 1.05rem; }
.track-dashboard h2 a { color: var(--color-ink); text-decoration: none; }
.track-dashboard h2 a:hover { color: var(--color-brand-text); }
.track-dashboard p { margin: 4px 0 0; }
.track-dashboard .bar { margin-top: 10px; max-width: 420px; }
.track-dashboard.is-coming { opacity: .7; }
.dash-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; margin-top: 28px; }
.panel-card { padding: 20px 22px; border-radius: 12px; background: var(--color-surface); border: 1px solid var(--color-border); }
.panel-card-title { margin: 0 0 10px; font-size: 1rem; }
.panel-card .eyebrow { margin: 12px 0 6px; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--color-border); font-size: 0.875rem; }
.activity li:first-child { border-top: 0; }
.activity .icon { width: 18px; height: 18px; margin-top: 2px; }
.activity b { color: var(--color-ink); font-weight: 600; }
.activity a { color: inherit; }
.activity time { margin-left: auto; color: var(--color-muted); white-space: nowrap; }
@media (max-width: 1000px) { .dash-hero, .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .track-dashboard { grid-template-columns: auto minmax(0, 1fr); }
  .track-dashboard > .button { grid-column: 1 / -1; justify-self: start; }
}

/* Badges: one per module, plus the exam. */
.badge-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badge { width: 76px; text-align: center; font-size: 0.72rem; line-height: 1.25; color: var(--color-muted); }
.badge-icon {
  display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 6px; border-radius: 50%;
  border: 2px solid var(--color-border-strong); background: var(--color-surface-soft); font-size: 0.95rem; font-weight: 700; color: var(--color-muted);
}
.badge-icon .icon { width: 18px; height: 18px; }
.badge-label { display: block; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.badge.is-earned { color: var(--color-ink); }
.badge.is-earned .badge-icon {
  border: 0; color: var(--color-on-brand);
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--color-brand) 60%, var(--color-sheen)), var(--color-brand));
  box-shadow: 0 3px 8px color-mix(in srgb, var(--color-brand) 45%, transparent);
}
.badge-exam.is-earned .badge-icon {
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--color-warning) 55%, var(--color-sheen)), var(--color-warning));
  box-shadow: 0 3px 8px color-mix(in srgb, var(--color-warning) 40%, transparent);
}
.badge-list-mini { gap: 6px; }
.badge-list-mini .badge { width: 52px; font-size: 0.65rem; }
.badge-list-mini .badge-icon { width: 36px; height: 36px; font-size: 0.8rem; margin-bottom: 4px; }
.badge-list-mini .badge-icon .icon { width: 14px; height: 14px; }

/* ---------- Module ---------- */

.module-hero { padding: 28px 32px; border-radius: 14px; background: var(--color-surface); border: 1px solid var(--color-border); }
.module-hero .pill { margin: 2px 0 8px; }
.module-intro { margin-top: 12px; font-size: 0.95rem; }
.module-intro h3 { font-size: 0.95rem; margin: 1.2em 0 .4em; }
.module-intro ul { padding-left: 20px; }
.module-hero .button-row { margin: 20px 0 0; }
.module-hero .next-step { padding: 0; background: none; border: 0; justify-content: flex-start; }
.next-step {
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
  margin: 28px 0; padding: 16px 20px; border-radius: var(--radius-lg);
  background: var(--color-brand-soft); border: 1px solid color-mix(in srgb, var(--color-brand) 20%, transparent);
}
.next-step p { margin: 0; }
.next-step .button-row { margin: 0; }

/* The bar of the pages of a module (sheet, templates, quiz), under the top bar. */
.module-bar {
  position: sticky; top: var(--header-height); z-index: 5; display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 8px 40px;
  background: var(--color-surface); border-bottom: 1px solid var(--color-border); font-size: 0.875rem;
}
.app-shell-learner { --header-height: 60px; }
.module-bar-back { display: inline-flex; align-items: center; gap: 6px; color: var(--color-muted); text-decoration: none; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.module-bar-back:hover { color: var(--color-brand-text); }
.module-bar-sep { color: var(--color-border-strong); }
.module-bar-title { font-weight: 600; color: var(--color-ink); white-space: nowrap; }
.module-bar-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.module-bar-actions form { margin: 0; }

/* ---------- Chapter: a white reader, the outline beside it, the actions in a sticky bar ---------- */

.reader-page { display: flex; flex-direction: column; min-height: 100%; background: var(--color-surface); }
.reader { flex: 1; display: grid; grid-template-columns: minmax(0, 740px) 220px; gap: 56px; justify-content: center; padding: 36px 40px 48px; }
.reader-article { min-width: 0; }
.reader-title { font-family: var(--font-display); font-size: 2rem; line-height: 1.2; margin: 6px 0 24px; }
.reader-prose { font-size: 1.03rem; line-height: 1.7; }
.reader-prose h2 { font-size: 1.35rem; margin: 1.8em 0 .6em; }
.reader-prose h3 { font-size: 1.2rem; margin: 1.8em 0 .5em; }
.reader-prose .callout { border-radius: 10px; }
.reader-toc { position: sticky; top: calc(var(--header-height) + 28px); align-self: start; font-size: 0.8125rem; }
.reader-toc h2 { margin: 0 0 8px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--color-muted); }
.reader-toc ol { list-style: none; margin: 0; padding: 0; }
.reader-toc a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--color-border); color: var(--color-muted); text-decoration: none; }
.reader-toc a:hover { color: var(--color-ink); }
.reader-toc a.is-active { border-left-color: var(--color-brand); color: var(--color-ink); font-weight: 600; }
.actionbar {
  position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 40px; background: color-mix(in srgb, var(--color-surface) 96%, transparent); border-top: 1px solid var(--color-border);
  backdrop-filter: blur(4px);
}
.actionbar form { margin: 0; }
@media (max-width: 1100px) { .reader { grid-template-columns: minmax(0, 1fr); } .reader-toc { display: none; } }
@media (max-width: 860px) {
  .reader { padding: 24px var(--gutter) 32px; }
  .actionbar { padding: 10px var(--gutter); }
  .reader-title { font-size: 1.6rem; }
}

/* ---------- Quiz: the start page, then one question at a time ---------- */

.quiz-start { padding: 26px 30px; border-radius: 14px; background: var(--color-surface); border: 1px solid var(--color-border); margin-bottom: 24px; }
.quiz-start .page-title { margin-bottom: 14px; }
.quiz-facts { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.quiz-facts li { background: var(--color-surface-soft); border: 1px solid var(--color-border); border-radius: 999px; padding: 4px 12px; font-size: 0.85rem; font-weight: 600; }
.quiz-start .button-row { margin-bottom: 0; }
.quiz-progress { margin-top: 12px; max-width: 520px; }
.quiz-progress .progress-bar { margin-bottom: 4px; }
.quiz-progress p { margin: 0; }
.history { margin-top: 32px; }

.focus-shell { display: flex; flex-direction: column; min-height: 100vh; background: var(--color-canvas); }
.focus-top { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 40px; background: var(--color-surface); border-bottom: 1px solid var(--color-border); font-size: 0.875rem; }
.focus-quit { display: inline-flex; align-items: center; gap: 6px; color: var(--color-muted); text-decoration: none; white-space: nowrap; }
.focus-quit:hover { color: var(--color-brand-text); }
.focus-sep { color: var(--color-border-strong); }
.focus-title { margin: 0; font-family: var(--font); font-size: 0.9rem; font-weight: 600; color: var(--color-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.focus-meta { margin-left: auto; white-space: nowrap; }
.focus-body { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 32px 24px 40px; }
.focus-body > * { width: 100%; max-width: 760px; }
.focus-progress { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; font-size: 0.85rem; color: var(--color-muted); }
.focus-progress b { color: var(--color-ink); }
.focus-progress b.is-ok { color: var(--color-success-text); }
.focus-progress b.is-ko { color: var(--color-danger-text); }
.focus-progress:empty { display: none; }
.dots { display: flex; gap: 6px; }
.dots i { width: 28px; height: 6px; border-radius: 3px; background: var(--color-border); }
.dots .is-ok { background: var(--color-success); }
.dots .is-ko { background: var(--color-danger); }
.dots .is-neutral { background: var(--color-border-strong); }
.dots .is-current { background: var(--color-brand); }
.focus-h2 { font-size: 1.05rem; margin: 8px 0 14px; }
.focus-body .question-list li { margin-bottom: 14px; }

.question { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 28px 32px; box-shadow: var(--shadow-md); }
.question-list .question { margin-bottom: 14px; }
.question-number { margin: 0 0 6px; font-size: 0.8125rem; color: var(--color-muted); }
.question-prompt { font-size: 1.25rem; font-weight: 600; line-height: 1.35; color: var(--color-ink); margin-bottom: 22px; }
.question-prompt .prose { color: inherit; }
.question-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.question-foot > :only-child { margin-left: auto; }
.question-foot form { margin: 0; }
.choice {
  position: relative; display: flex; gap: 14px; align-items: center; margin-bottom: 10px; padding: 14px 18px;
  border: 1.5px solid var(--color-border-strong); border-radius: 10px; font-size: 1rem; color: var(--color-ink); cursor: pointer;
}
.choice:hover { border-color: var(--color-brand); }
.choice-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.choice:has(.choice-input:checked) { border-color: var(--color-brand); background: var(--color-brand-soft); }
.choice:has(.choice-input:focus-visible) { outline: 3px solid var(--color-brand-ring); outline-offset: 2px; }
.choice-letter {
  display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 7px;
  background: var(--color-surface-soft); border: 1px solid var(--color-border-strong); font-size: 0.75rem; font-weight: 700; color: var(--color-muted);
}
.choice:has(.choice-input:checked) .choice-letter { background: var(--color-brand); border-color: var(--color-brand); color: var(--color-on-brand); }
.number-input input, .question textarea { background: var(--color-surface); }
.answer-list { list-style: none; padding: 0; margin: 0 0 8px; }
.answer-list li { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; padding: 12px 18px; border: 1.5px solid var(--color-border); border-radius: 10px; color: var(--color-muted); }
.answer-list .is-correct { border-color: color-mix(in srgb, var(--color-success) 50%, transparent); background: var(--color-success-soft); color: var(--color-success-text); font-weight: 600; }
.answer-list .is-correct .choice-letter { background: var(--color-success); border-color: var(--color-success); color: var(--color-on-brand); }
.answer-list .is-chosen-wrong { border-color: color-mix(in srgb, var(--color-danger) 50%, transparent); background: var(--color-danger-soft); color: var(--color-danger-text); }
.answer-list .is-chosen-wrong .choice-letter { background: var(--color-danger); border-color: var(--color-danger); color: var(--color-on-brand); }
.answer-tags { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.answer-tag { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.feedback { margin-top: 14px; padding: 12px 18px; border-radius: 10px; }
.result-banner:has(> .result-body) { display: flex; gap: 16px; align-items: flex-start; }
.result-body { min-width: 0; flex: 1; }
.result-body p { margin: 0; }
.result-banner .button-row { margin: 12px 0 0; }
.result-medal { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--color-success); color: var(--color-on-brand); }
.result-medal .icon { width: 22px; height: 22px; }
.focus-body .result-banner { padding: 16px 20px; margin-bottom: 16px; }
.focus-body .result-banner h2 { font-size: 1.1rem; margin: 0 0 4px; }
@media (max-width: 860px) {
  .focus-top { padding: 0 var(--gutter); }
  .focus-meta { display: none; }
  .focus-progress { flex-wrap: wrap; gap: 8px 16px; }
  .focus-progress .dots { order: 3; flex-basis: 100%; }
  .focus-progress .dots i { flex: 1; }
  .focus-body { padding: 24px var(--gutter) 32px; }
  .question { padding: 20px; border-radius: 12px; }
  .question-prompt { font-size: 1.1rem; }
}

/* ---------- Recap sheet: two columns, what to remember and what to watch out for ---------- */

.print-only { display: none; }
.recap-header { margin-bottom: 20px; }
.recap-header .page-lead { margin-bottom: 0; }
.recap-body > h3 { margin: 28px 0 12px; font-size: 1.1rem; }
.recap-body > h3:first-child { margin-top: 0; }
.recap-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: start; margin: 0 0 8px; }
.recap-cols-1 { grid-template-columns: minmax(0, 1fr); }
.recap-col-head { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid; font-size: 0.95rem; color: var(--color-ink); }
.recap-col-head .icon { width: 16px; height: 16px; }
.recap-col-retenir .recap-col-head { border-color: var(--color-success); }
.recap-col-retenir .recap-col-head .icon { color: var(--color-success-text); }
.recap-col-attention .recap-col-head { border-color: var(--color-warning); }
.recap-col-attention .recap-col-head .icon { color: var(--color-warning-text); }
.recap-col .callout { margin: 0 0 10px; padding: 14px 16px; border-radius: 8px; border-left-width: 1px; font-size: 0.95rem; }
.recap-col .callout > p:has(> .callout-title:only-child) { display: none; } /* the column head already says it */
.recap-col .callout > p:last-child { margin-bottom: 0; }
.recap-body > .callout { margin: 0 0 10px; border-radius: 8px; }
.module-number { margin: 0; font-size: 0.8125rem; color: var(--color-muted); }
@media (max-width: 700px) { .recap-cols { grid-template-columns: minmax(0, 1fr); gap: 0; } }

/* ---------- Phones ---------- */

@media (max-width: 860px) {
  .app-shell-learner .app-sidebar { width: auto; }
  .app-shell-learner .app-topbar { height: auto; flex-wrap: wrap; padding: 10px var(--gutter); }
  .crumbs { display: none; }
  .app-shell-learner .app-topbar .nav-search { width: 100%; }
  .app-content-bare > .flash { margin: 16px var(--gutter) 0; }
  .dash, .center, .inner { padding: 20px var(--gutter) 40px; }
  .ctx { padding: 20px var(--gutter) 32px; }
  .module-bar { position: static; padding: 8px var(--gutter); flex-wrap: wrap; gap: 4px 14px; }
  .module-bar-sep { display: none; }
  .module-bar-back { flex-basis: 100%; }
  .module-bar-actions { margin-left: auto; }
  .actionbar { position: static; }
  :is(.app-shell-learner, .focus-shell) .button { white-space: normal; text-align: center; }
}
