/* ui.css: the app's own screens (account, Continue, lesson shell, My workbook, Learners).
   Same world as the homepage and the lessons: paper ground, ink text, brick as accent only, Archivo Black for
   headings, Sora for everything else, square corners, and one shape: the slanted band (lean 0.45 = dx/dy).
   This is working UI: fixed type scale, quiet surfaces, the brand in the details. */

@font-face { font-family: "Archivo Black"; src: url("/assets/fonts/archivo-black.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/assets/fonts/sora-var.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --ink: #141310; --ink-soft: #2A2823; --paper: #F5EFE7; --paper-dim: #ECE5DA; --white: #FFFDFA;
  --brick: #CE5B32; --brick-deep: #A9441F; --brick-tint: #F8E3D9;
  --grey: #55534B; --grey-on-ink: #CFCBC2; --rule: rgba(20, 19, 16, 0.16); --field: #8B887E;
  --display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --text: "Sora", "Segoe UI", system-ui, sans-serif;
  --bar-h: 60px;
  --lean: 0.45;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
@media (max-width: 640px) { :root { --bar-h: 56px; } }

*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 12px); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper);
  color: var(--ink); font-family: var(--text); font-size: 1.0625rem; line-height: 1.55; -webkit-font-smoothing: antialiased;
  caret-color: var(--brick-deep); accent-color: var(--brick-deep); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2 { font-family: var(--display); font-weight: 400; text-wrap: balance; }
h1 { font-size: 2.5rem; line-height: 1.02; letter-spacing: -0.01em; }
h2 { font-size: 1.375rem; line-height: 1.15; }
h3 { font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
p { text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 0.09em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 3px solid var(--brick); outline-offset: 2px; }
@media (max-width: 640px) { h1 { font-size: 2rem; } }

/* ---------- page frame ---------- */
.main { flex: 1; padding: 3rem 0 5rem; }
.wrap { width: 100%; max-width: 44rem; margin: 0 auto; padding: 0 1.25rem; }
.wrap.wide { max-width: 68rem; }
.stack > * + * { margin-top: 1.25rem; }
.stack > h2 { margin-top: 2.75rem; }
.stack > h1 + * { margin-top: 1rem; }
.hint, .small { font-size: 0.9375rem; color: var(--grey); }
@media (max-width: 640px) { .main { padding: 2rem 0 4rem; } }

/* ---------- top bar: solid ink, so nothing scrolls through it ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; }
.bar-inner { max-width: 68rem; min-height: var(--bar-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { font-family: var(--display); font-size: 0.9375rem; line-height: 1.05; color: #fff; text-decoration: none; flex-shrink: 0; }
.wordmark small { display: block; margin-top: 3px; font-family: var(--text); font-weight: 700; font-size: 0.5625rem; letter-spacing: 0.28em;
  text-transform: uppercase; color: #E8845C; }
.bar-nav { display: flex; align-items: center; gap: 0.25rem 1.5rem; flex-wrap: wrap; justify-content: flex-end; }
.bar .link { color: #fff; font-size: 0.9375rem; font-weight: 600; text-decoration: none; padding: 0.4rem 0; border-bottom: 2px solid transparent; }
.bar .link:hover, .bar .link[aria-current="page"] { border-bottom-color: var(--brick); }
.bar .btn.ghost { min-height: 36px; padding: 0 0.875rem; font-size: 0.875rem; color: #fff; border-color: rgba(255, 255, 255, 0.55); background: transparent; }
.bar .btn.ghost:hover { background: var(--ink-soft); border-color: #fff; color: #fff; }
form.inline { display: inline; margin: 0; }
@media (max-width: 640px) {
  .bar-nav { gap: 0 1rem; }
  .bar .link { font-size: 0.875rem; }
  .bar form.inline { display: none; }            /* Log out lives on the Account page on a phone */
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 1.25rem; background: var(--ink);
  color: var(--paper); border: 2px solid var(--ink); font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 120ms var(--ease); }
.btn:hover { background: var(--brick-deep); border-color: var(--brick-deep); color: #fff; }
.btn:active { transform: scale(0.98); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn.brick { background: var(--brick); border-color: var(--brick); color: var(--ink); }
.btn.brick:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
/* The one primary action on a screen wears the band: the slanted shape from every lesson's title slide. */
.btn.cta { --sx: 24px; min-height: 54px; padding: 0 calc(var(--sx) + 1.25rem); border: 0; font-size: 1.0625rem;
  clip-path: polygon(var(--sx) 0, 100% 0, calc(100% - var(--sx)) 100%, 0 100%); }
.link { font-weight: 600; text-decoration: underline; text-decoration-color: var(--brick); }
.link:hover { color: var(--brick-deep); }

/* ---------- forms ---------- */
.form { display: grid; gap: 1.125rem; max-width: 28rem; }
.field { display: grid; gap: 0.375rem; }
.field label { font-weight: 600; font-size: 0.9375rem; }
.field input, .field textarea, .field select { width: 100%; min-height: 46px; padding: 0.625rem 0.75rem; background: var(--white);
  border: 1.5px solid var(--field); color: var(--ink); }
.field textarea { min-height: 8rem; line-height: 1.5; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline: 3px solid var(--brick); outline-offset: 1px; border-color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: #6B6860; }
.note, .error { padding: 0.875rem 1rem; font-size: 0.9375rem; }
.note { background: var(--paper-dim); }
.error { background: var(--brick-tint); color: #7A2A12; font-weight: 600; }
.card { padding: 1.5rem; background: var(--white); border: 1.5px solid var(--ink); }
.pill { display: inline-block; padding: 0.125rem 0.5rem; background: var(--ink); color: var(--paper); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; vertical-align: middle; }
.pill.plus { background: var(--brick); color: var(--ink); }
.pill.premium { background: var(--ink); color: #E8845C; }

/* ---------- tables (Learners) ---------- */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; padding: 0.75rem 0.875rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table th { font-weight: 700; font-size: 0.8125rem; color: var(--grey); border-bottom: 2px solid var(--ink); white-space: nowrap; }
.table tbody tr:hover { background: var(--paper-dim); }
.table a { font-weight: 600; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: var(--grey-on-ink); padding: 1.5rem 0; font-size: 0.875rem; }
.foot-inner { max-width: 68rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.foot .link { color: var(--paper); font-weight: 500; text-decoration-color: rgba(245, 239, 231, 0.4); }
.foot .link:hover { color: #fff; text-decoration-color: var(--brick); }

/* ================= Continue screen ================= */
.continue { display: grid; gap: 3.5rem; }
.continue .lead { display: grid; gap: 1.25rem; justify-items: start; }
.continue .hello { color: var(--grey); font-weight: 600; }
.continue h1 { font-size: 3.25rem; max-width: 16ch; }
.continue .cta { margin-top: 0.5rem; }
.progress { display: grid; gap: 0.625rem; width: 100%; margin-top: 0.75rem; }
.progress-line { font-weight: 700; font-variant-numeric: tabular-nums; }
/* Eighteen modules, eighteen segments, in their three sections. Each one leans like the band. */
.segments { display: flex; gap: 4px; width: 100%; max-width: 34rem; padding-left: 6px; }
.segments li { flex: 1; height: 14px; transform: skewX(-24.2deg); background: transparent; box-shadow: inset 0 0 0 1.5px rgba(20, 19, 16, 0.38); }
.segments li.done { background: var(--ink); box-shadow: none; }
.segments li.now { background: var(--brick); box-shadow: none; }
.segments li[data-sec="2"]:nth-child(7), .segments li[data-sec="3"]:nth-child(13) { margin-left: 12px; }
.continue .note a { font-weight: 700; }

.modules { display: grid; gap: 2.5rem; }
.modules h2 { padding-bottom: 0.75rem; border-bottom: 2px solid var(--ink); }
.mod-row { display: grid; grid-template-columns: 2.5rem 1fr auto auto; align-items: baseline; gap: 0 1rem; padding: 0.875rem 0.5rem;
  border-bottom: 1px solid var(--rule); text-decoration: none; transition: background-color 140ms ease; }
.mod-row:hover { background: var(--paper-dim); }
.mod-row .num { font-family: var(--display); font-size: 1.125rem; color: var(--grey); font-variant-numeric: tabular-nums; }
.mod-row .name { font-weight: 600; font-size: 1.0625rem; }
.mod-row .time { font-size: 0.875rem; color: var(--grey); white-space: nowrap; }
.mod-row .state { min-width: 5.5rem; text-align: right; font-size: 0.875rem; font-weight: 700; white-space: nowrap; }
.mod-row.is-now { background: var(--brick-tint); }
.mod-row.is-now .num { color: var(--brick-deep); }
.mod-row.is-now .state { color: var(--brick-deep); }
.mod-row.is-done .name { font-weight: 500; }
.mod-row.is-done .state { color: var(--grey); }
.mod-row.is-done .state::before { content: ""; display: inline-block; width: 0.9em; height: 0.9em; margin-right: 0.375em; vertical-align: -0.08em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='square'%3E%3Cpath d='M4 12.5l5.5 5.5L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='square'%3E%3Cpath d='M4 12.5l5.5 5.5L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.quick { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; padding-top: 1.5rem; border-top: 2px solid var(--ink); }
.quick a { font-weight: 600; text-decoration-color: var(--brick); }
.quick a:hover { color: var(--brick-deep); }
@media (max-width: 640px) {
  .continue { gap: 2.5rem; }
  .continue h1 { font-size: 2.25rem; }
  .btn.cta { width: 100%; }
  .mod-row { grid-template-columns: 2rem 1fr auto; padding: 0.875rem 0.25rem; }
  .mod-row .time { display: none; }
  .mod-row .state { min-width: 0; }
}

/* ================= Lesson shell (with /lesson-files/shared/lesson.css for the lesson's own content) ================= */
.lessonbar { gap: 14px; }
.lessonbar .back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 4px; color: #fff; font-weight: 700; font-size: 14px;
  text-decoration: none; flex-shrink: 0; }
.lessonbar .back::before { content: ""; width: 9px; height: 9px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); }
.lessonbar .back:hover { color: #E8845C; }
.lessonbar .mod { padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, 0.25); }
.lessonbar .ask { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; background: var(--paper); color: var(--ink); border: 0;
  font-weight: 700; font-size: 14px; cursor: pointer; flex-shrink: 0; transition: background-color 160ms ease; }
.lessonbar .ask::before { content: ""; width: 15px; height: 15px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linejoin='miter'%3E%3Cpath d='M3 4h18v13H10l-5 4v-4H3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linejoin='miter'%3E%3Cpath d='M3 4h18v13H10l-5 4v-4H3z'/%3E%3C/svg%3E") center / contain no-repeat; }
.lessonbar .ask:hover, .lessonbar .ask[aria-expanded="true"] { background: var(--brick); }
@media (max-width: 640px) {
  .lessonbar { gap: 8px; }
  .lessonbar .back { flex: 1; }
  .lessonbar .ask { padding: 0 10px; }
  .lessonbar .ask span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

.lesson { display: flex; align-items: stretch; flex: 1; min-height: calc(100dvh - var(--bar-h)); }
.lesson-main { flex: 1; min-width: 0; }
/* One scroll bar, always. Read and Do scroll the page. Slides fills the screen and nothing scrolls. */
html[data-view="slides"], html[data-view="slides"] body { height: 100%; overflow: hidden; }
html[data-view="slides"] .lesson { height: calc(100dvh - var(--bar-h)); min-height: 0; }
html[data-view="slides"] #view-slides { height: 100%; }

.finish { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 2px solid var(--ink); }
.finish .done-line { font-weight: 700; margin: 0; }
.finish .lead-form { display: flex; flex-wrap: wrap; gap: 0.5rem; width: 100%; max-width: 30rem; }
.finish .lead-form input { flex: 1; min-width: 12rem; min-height: 46px; padding: 0 0.75rem; background: var(--white); border: 1.5px solid var(--field); }
.done-band { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.75rem 1.5rem;
  padding: 1rem 1.25rem; background: var(--ink); color: #fff; font-weight: 600; animation: band-in 420ms var(--ease) both; }
.done-band .btn { background: var(--brick); border-color: var(--brick); color: var(--ink); }
.done-band .btn:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.done-band .close { background: none; border: 0; color: var(--grey-on-ink); font-weight: 600; text-decoration: underline; cursor: pointer; padding: 0.5rem; }
@keyframes band-in { from { transform: translateY(100%); } to { transform: none; } }

/* The assistant: a panel beside the lesson on a laptop, a full sheet on a phone. Never a pop-up over the page. */
.assistant { position: sticky; top: var(--bar-h); align-self: flex-start; display: flex; flex-direction: column; width: 24rem; flex-shrink: 0;
  height: calc(100dvh - var(--bar-h)); background: var(--white); border-left: 1.5px solid var(--ink); }
.assistant-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.875rem 1rem; border-bottom: 1px solid var(--rule); }
.assistant-head h2 { font-size: 1.125rem; }
.assistant-head .close { background: none; border: 0; padding: 0.375rem; font-weight: 700; font-size: 0.875rem; text-decoration: underline; cursor: pointer; }
.assistant-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.875rem; font-size: 0.9375rem; line-height: 1.5; overscroll-behavior: contain; }
.assistant-log .msg { max-width: 92%; padding: 0.625rem 0.75rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-log .msg.you { align-self: flex-end; background: var(--ink); color: var(--paper); }
.assistant-log .msg.it { align-self: flex-start; background: var(--paper-dim); }
.assistant-log .msg.wait { color: var(--grey); background: none; padding-left: 0; }
.assistant-log .empty { color: var(--grey); }
.assistant-log .empty button { display: block; width: 100%; margin-top: 0.5rem; padding: 0.625rem 0.75rem; background: var(--paper); border: 1.5px solid var(--rule);
  text-align: left; font-weight: 600; color: var(--ink); cursor: pointer; }
.assistant-log .empty button:hover { border-color: var(--ink); }
.assistant-form { display: grid; gap: 0.5rem; padding: 0.875rem 1rem 1rem; border-top: 1px solid var(--rule); }
.assistant-form textarea { width: 100%; min-height: 4.5rem; max-height: 12rem; padding: 0.625rem 0.75rem; background: var(--paper); border: 1.5px solid var(--field); resize: vertical; line-height: 1.45; }
.assistant-form textarea:focus-visible { outline: 3px solid var(--brick); outline-offset: 1px; border-color: var(--ink); }
.assistant-form .row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.assistant-form .fine { font-size: 0.75rem; color: var(--grey); line-height: 1.35; }
.assistant-form .btn { min-height: 40px; }
@media (max-width: 900px) {
  /* align-self must go back to auto: on a fixed box a start alignment shrinks it to its content. */
  .assistant { position: fixed; inset: var(--bar-h) 0 0 0; z-index: 30; align-self: auto; width: auto; height: auto; border-left: 0; }
  html:has(.assistant:not([hidden])) { overflow: hidden; }
}

/* ================= My workbook ================= */
.workbook .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.wb-module { margin-top: 3rem; }
.wb-module h2 { padding-bottom: 0.625rem; border-bottom: 2px solid var(--ink); }
.wb-module h3 { margin-top: 1.75rem; }
/* What you wrote, shown as a record, not as a field to type in. */
.wb-answer { margin-top: 0.5rem; padding: 0.875rem 1rem; background: var(--paper-dim); white-space: pre-wrap; overflow-wrap: anywhere; }
.wb-answer.is-empty { background: none; border: 1.5px dashed var(--rule); color: var(--grey); }
.wb-feedback { margin-top: 0.5rem; font-size: 0.9375rem; }
.wb-feedback summary { cursor: pointer; font-weight: 700; padding: 0.375rem 0; }
.wb-feedback > div { padding: 0.75rem 1rem; background: var(--paper-dim); white-space: pre-wrap; }
.wb-ticks { margin-top: 0.5rem; padding-left: 1.25rem; list-style: square; }
.wb-ticks li { margin: 0.25rem 0; }
.wb-edit { display: inline-block; margin-top: 0.625rem; font-size: 0.9375rem; font-weight: 600; text-decoration-color: var(--brick); }
.empty-state { padding: 2rem 1.5rem; background: var(--paper-dim); }
.empty-state p + p { margin-top: 0.75rem; }

@media print {
  .bar, .foot, .workbook .actions, .wb-edit, .done-band { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .main { padding: 0; }
  .wb-module { break-inside: avoid-page; }
  .wb-feedback[open] > div, .wb-answer { border: 1px solid #999; background: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- design pass, 21 Nov 2026 ---------- */
/* The lesson screen owns the whole window: no page padding around it. */
.lesson-page .main { padding: 0; display: flex; flex-direction: column; }

/* Continue: the action on the left, where you are on the right. */
.continue .lead-main { display: grid; gap: 1rem; justify-items: start; }
.continue .hello { font-size: 1.0625rem; }
.continue h1 { max-width: 14ch; }
@media (min-width: 900px) {
  .continue .lead { grid-template-columns: minmax(0, 1fr) 24rem; align-items: end; gap: 3rem; }
  .continue .progress { margin: 0 0 0.375rem; }
  .continue .segments { max-width: none; }
}

/* Phone: the three links sit on one line beside the wordmark. */
@media (max-width: 640px) {
  .bar-inner { gap: 0.5rem; padding: 0 1rem; }
  .bar-nav { flex-wrap: nowrap; gap: 0 0.875rem; }
  .bar .link { font-size: 0.8125rem; white-space: nowrap; }
  .wordmark { font-size: 0.8125rem; }
}

/* The free lesson's close. */
.free-close { display: grid; gap: 1rem; justify-items: start; }
.free-close > p { margin: 0; max-width: 34rem; font-weight: 600; color: var(--ink); }
.free-close .lead-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; width: 100%; max-width: 34rem; }
.free-close .lead-label { flex: 1; min-width: 14rem; display: grid; gap: 0.375rem; font-size: 0.9375rem; font-weight: 600; }
.free-close .lead-msg { margin: 0; }
.finish-error { width: 100%; margin: 0; color: #7A2A12; font-weight: 600; font-size: 0.9375rem; }

/* Learners (the owner's screen): a working table, so it gets the wide column and never wraps a cell. */
.admin .table th, .admin .table td { white-space: nowrap; }
.admin .table td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; }
.form.search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; max-width: none; }
.form.search .field { flex: 1; min-width: 14rem; max-width: 24rem; }
@media (max-width: 640px) {
  .continue h1 { font-size: 2rem; max-width: none; }
}

/* ---------- after the independent design review, 21 Nov 2026 ---------- */
/* The browser's own surfaces, from the palette. */
html { scrollbar-color: var(--ink) var(--paper-dim); }
.assistant-log { scrollbar-width: thin; scrollbar-color: var(--field) transparent; }
.assistant-form textarea::placeholder { color: #6B6860; }

/* Continue: the first viewport at the homepage's scale. */
.continue h1 { font-size: 3.25rem; max-width: 18ch; }
@media (min-width: 900px) { .continue h1 { font-size: 4rem; } }
@media (max-width: 640px) { .continue h1 { font-size: 1.875rem; max-width: none; } }
.segments li { box-shadow: inset 0 0 0 2px rgba(20, 19, 16, 0.55); }
.segments li.done, .segments li.now { box-shadow: none; }
.wordmark { font-size: 1.0625rem; }

/* Workbook: the same left edge as the bar and the Continue screen. */
.workbook { max-width: 44rem; }
.wb-feedback summary { list-style: none; display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; }
.wb-feedback summary::-webkit-details-marker { display: none; }
.wb-feedback summary::before { content: ""; width: 8px; height: 8px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg); transition: transform 160ms var(--ease); }
.wb-feedback[open] summary::before { transform: rotate(45deg); }
.wb-edit { display: inline-flex; align-items: center; min-height: 44px; margin-top: 0.25rem; }

/* One Next at a time: while the done band is up, the finish block's own link steps back. */
.has-done-band .finish .btn.ghost { display: none; }
.done-band .btn.cta { min-height: 46px; background: var(--brick); color: var(--ink); }
.done-band .btn.cta:hover { background: var(--paper); color: var(--ink); }
.finish .btn.cta { min-height: 50px; }

/* Touch: every control is at least 44 px on a phone, and the bar fits a 360 px screen. */
.bar .link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
.assistant-head .close, .done-band .close { min-height: 44px; min-width: 44px; padding: 0 0.5rem; }
@media (max-width: 640px) {
  .modes button { min-height: 44px; min-width: 44px; }
  .lessonbar .ask { min-height: 44px; min-width: 44px; justify-content: center; }
  .bar .admin-link { display: none; }                     /* Learners is on the Account page on a phone */
  .wordmark { font-size: 0.875rem; }
}
@media (max-width: 420px) {
  .bar-nav a[href="/learn"] { display: none; }            /* signed in, the wordmark goes to the course */
}

/* Continue on a laptop: the heading runs the full column; the action and the progress share the row under it. */
@media (min-width: 900px) {
  .continue .lead { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1.25rem 3rem; }
  .continue .lead-main { display: contents; }
  .continue .hello, .continue h1 { grid-column: 1 / -1; }
  .continue h1 { max-width: 22ch; }
  .continue .cta { margin-top: 0.75rem; }
  .continue .progress { justify-self: end; width: 24rem; margin: 0.75rem 0 0; }
}

/* The done band is fixed to the bottom: leave room so the last row can still scroll clear of it. */
.has-done-band .lesson-main { padding-bottom: 6rem; }

/* Learners: flags the owner must act on. */
.refund-due { display: inline-block; padding: 0.125rem 0.5rem; background: var(--brick-tint); color: #7A2A12; font-weight: 700; font-size: 0.8125rem; }
.enrolment-note { padding: 0.75rem 1rem; background: var(--paper-dim); font-size: 0.9375rem; overflow-wrap: anywhere; }
