/* sprint: playful, chunky, friendly. One file, no build step. */

@font-face {
  font-family: "Nunito";
  src: url("/static/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F4F1FF;
  --surface: #FFFFFF;
  --ink: #231942;
  --muted: #554B7A;
  --todo: #6B6391;
  --line: #E6DFFB;
  --line-strong: #D9D0F5;
  --tint: #F7F3FF;

  --violet: #6D28D9;
  --violet-dark: #4C1D95;
  --violet-soft: #EFE7FF;
  --yellow: #FFD23F;
  --yellow-dark: #C99700;
  --yellow-soft: #FFF4C7;
  --yellow-ink: #6B4E00;
  --coral: #FF7A66;
  --coral-dark: #D4533F;
  --coral-soft: #FFF1EE;
  --coral-ink: #9A2B19;
  --mint: #36C9A6;
  --mint-dark: #1F9C7F;
  --mint-soft: #E3F8F2;
  --mint-ink: #145C4B;

  --radius-card: 28px;
  --radius-btn: 16px;
  --gap: 20px;
  --pad: 40px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 600;
  min-height: 100vh;
  min-height: 100dvh;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--violet); }
a:hover { color: var(--violet-dark); }
strong { font-weight: 900; }
small { font-size: 0.45em; font-weight: 800; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 8px; }
.hero :focus-visible, .vs-new :focus-visible { outline-color: #FFFFFF; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: #FFFFFF; font-weight: 800; }
.skip:focus { top: 12px; color: #FFFFFF; }
.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; }

/* ---- type ---- */
.h-xl { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2rem); font-weight: 900; line-height: 1.15; }
.h-lg { font-size: 1.25rem; font-weight: 900; line-height: 1.2; }
.h-md { font-size: 1.125rem; font-weight: 900; line-height: 1.25; }
.h-sm { font-size: 0.875rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.h-hero { font-size: clamp(1.5rem, 1.1rem + 2vw, 2.125rem); font-weight: 900; line-height: 1.12; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
.eyebrow { font-weight: 800; color: var(--muted); }
.eyebrow.light { color: #E9DDFF; }
.link { font-weight: 800; }
.link.strong { font-weight: 900; color: var(--ink); text-decoration: none; }
.link.strong:hover { color: var(--violet); text-decoration: underline; }
.break { overflow-wrap: anywhere; }
.center { align-items: center; text-align: center; }

/* ---- layout ---- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  padding: 12px var(--pad);
  background: var(--surface); border-bottom: 2px solid var(--line);
}
.nav, .top-right, .tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.top-right { gap: 10px; }
.wordmark { display: inline-flex; align-items: center; gap: 6px; font-weight: 900; font-size: 1.375rem; color: var(--violet); text-decoration: none; margin-right: 12px; letter-spacing: -0.01em; }
.wordmark:hover { color: var(--violet-dark); }
.wordmark.light img { width: 48px; height: 48px; }
.mascot { align-self: flex-start; }
.page-head > .greet-fox { flex-shrink: 0; }
.page-head > .greet-fox + div { flex: 1 1 200px; }
.wordmark.light { color: #FFFFFF; font-size: 1.625rem; }
.tab {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  color: var(--muted); font-weight: 800; text-decoration: none;
}
.tab:hover { background: var(--violet-soft); color: var(--violet-dark); }
.tab[aria-current="page"] { background: var(--violet); color: #FFFFFF; }

.page { max-width: 1120px; margin: 0 auto; padding: 28px var(--pad) 56px; display: flex; flex-direction: column; gap: var(--gap); }
.page.wide { max-width: 1320px; }
.page.narrow { max-width: 560px; padding-top: 80px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.page-head > div:first-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 320px; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { align-items: flex-end; }
.grow { flex: 1 1 160px; }
/* Never more than two columns at the page's full width, so cards keep room to read. */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: var(--gap); }
.grid-2.start { align-items: start; }
form.card.stack > .btn { align-self: flex-start; }

.card { padding: 24px 28px; border-radius: var(--radius-card); background: var(--surface); border: 2px solid var(--line); }

/* ---- chips, badges, pills ---- */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; font-weight: 800; white-space: nowrap; }
.chip.streak { background: var(--coral-soft); color: var(--coral-ink); }
.chip.xp { background: var(--yellow-soft); color: var(--yellow-ink); }
.chip.exam { background: var(--violet-soft); color: var(--violet-dark); white-space: normal; padding: 6px 16px; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 10px; font-weight: 800; font-size: 0.875rem; white-space: nowrap; }
.badge.dark { background: var(--ink); color: #FFFFFF; }
.badge.violet { background: var(--violet-soft); color: var(--violet-dark); }
.badge.mint { background: var(--mint-soft); color: var(--mint-ink); }
.badge.yellow { background: var(--yellow-soft); color: var(--yellow-ink); }
.badge.grey { background: #F0EFF5; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 2px solid var(--line-strong); background: var(--surface); color: var(--muted); font-weight: 800; text-decoration: none;
}
.pill:hover { border-color: var(--violet); color: var(--violet-dark); }
.pill[aria-current="true"] { border-color: var(--violet); background: var(--violet-soft); color: var(--violet-dark); }
.avatar {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--mint); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 900; text-decoration: none; font-size: 0.9375rem;
}
.avatar:hover { color: var(--ink); box-shadow: 0 0 0 3px var(--violet-soft); }
.avatar[aria-current="page"] { outline: 3px solid var(--violet); outline-offset: 2px; }
.avatar.large { width: 52px; height: 52px; font-size: 1.25rem; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius-btn); border: 0;
  font: inherit; font-weight: 900; text-decoration: none; cursor: pointer; text-align: center;
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.btn:active { transform: translateY(3px); }
.btn.primary { background: var(--violet); color: #FFFFFF; box-shadow: 0 4px 0 var(--violet-dark); }
.btn.primary:hover { background: #7C3AED; color: #FFFFFF; }
.btn.primary:active { box-shadow: 0 1px 0 var(--violet-dark); }
.btn.yellow { background: var(--yellow); color: var(--ink); box-shadow: 0 4px 0 var(--yellow-dark); }
.btn.yellow:hover { background: #FFDB63; color: var(--ink); }
.btn.yellow:active { box-shadow: 0 1px 0 var(--yellow-dark); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 2px solid var(--line-strong); box-shadow: 0 4px 0 var(--line-strong); font-weight: 800; }
.btn.ghost:hover { border-color: var(--violet); color: var(--violet-dark); }
.btn.ghost:active { box-shadow: 0 1px 0 var(--line-strong); }
.btn.danger { background: var(--surface); color: var(--coral-ink); border: 2px solid #F5C7BF; box-shadow: 0 4px 0 #F5C7BF; font-weight: 800; }
.btn.danger:hover { background: var(--coral-soft); }
.btn.danger:active { box-shadow: 0 1px 0 #F5C7BF; }
.btn.big { min-height: 56px; padding: 0 32px; border-radius: 18px; font-size: 1.125rem; }
.btn.full { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* ---- forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
label { font-weight: 800; }
.input {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 700;
}
.input:hover { border-color: #B9A9EC; }
.input:focus-visible { outline-offset: 0; border-color: var(--violet); border-radius: 14px; }
.input[readonly] { background: var(--tint); color: var(--muted); }
.input.big { min-height: 54px; border-radius: 16px; padding: 0 16px; font-size: 1.0625rem; }
.input.code { font-size: 1.75rem; font-weight: 900; letter-spacing: 0.3em; text-align: center; min-height: 64px; }
.input.area { padding: 12px 14px; line-height: 1.6; font-weight: 600; resize: vertical; min-height: 180px; }
select.input { appearance: auto; }
.help { color: var(--muted); font-size: 0.8125rem; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--violet); flex-shrink: 0; }
.count-live { color: var(--mint-ink); font-weight: 800; }

.notice { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; font-weight: 700; }
.notice.ok { background: var(--mint-soft); color: var(--mint-ink); }
.notice.warn { background: var(--yellow-soft); color: var(--yellow-ink); }
.notice.bad { background: var(--coral-soft); color: var(--coral-ink); }

details.danger { border-top: 2px solid var(--line); padding-top: 12px; }
details.danger summary { min-height: 44px; display: flex; align-items: center; color: var(--coral-ink); font-weight: 800; cursor: pointer; }
details.danger[open] summary { margin-bottom: 8px; }

/* ---- tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.tile { padding: 18px 20px; border-radius: 22px; color: var(--ink); }
.tile-label { font-weight: 800; }
.tile-value { font-size: 2.25rem; font-weight: 900; line-height: 1.1; }
.tile-value small { font-size: 0.875rem; }
.tile-note { margin-top: 4px; font-weight: 700; font-size: 0.9375rem; }
.tile.violet { background: var(--violet); color: #FFFFFF; box-shadow: 0 5px 0 var(--violet-dark); }
.tile.violet .tile-label { color: #E9DDFF; }
.tile.violet .tile-note { color: #F1E9FF; }
.tile.mint { background: var(--mint); box-shadow: 0 5px 0 var(--mint-dark); }
.tile.coral { background: var(--coral); box-shadow: 0 5px 0 var(--coral-dark); }
.tile.yellow { background: var(--yellow); box-shadow: 0 5px 0 var(--yellow-dark); }
.tile.plain { background: var(--surface); border: 2px solid var(--line); box-shadow: 0 5px 0 var(--line); }
.tile.plain .tile-label, .tile.plain .tile-note { color: var(--muted); }
.tiles.small .tile-value { font-size: 1.75rem; }

/* ---- hero ---- */
.hero {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding: 28px 32px; border-radius: var(--radius-card); background: var(--violet); color: #FFFFFF; box-shadow: 0 6px 0 var(--violet-dark);
}
.hero .stack { gap: 6px; flex: 1 1 280px; min-width: 0; }
.hero-meta { color: #F1E9FF; font-weight: 700; }
.xp-burst { padding: 10px 18px; border-radius: 16px; background: var(--yellow); color: var(--ink); font-weight: 900; font-size: 1.125rem; box-shadow: 0 4px 0 var(--yellow-dark); }

/* ---- week strip, lists ---- */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; font-size: 0.8125rem; font-weight: 800; color: var(--muted); }
.week li { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.week .dot { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line-strong); display: flex; align-items: center; justify-content: center; }
.week .on .dot { background: var(--mint); border-color: var(--mint-dark); color: var(--ink); }
.week .on { color: var(--mint-ink); }

.results { display: flex; flex-direction: column; gap: 8px; }
.results a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 14px;
  border-radius: 16px; background: var(--tint); color: var(--ink); text-decoration: none;
}
.results a:hover { background: var(--violet-soft); }
.results li > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 14px; border-radius: 16px; background: var(--tint); }

/* ---- terms and policies ---- */
.page.legal { max-width: 860px; }
.legal-part { gap: 10px; }
.legal-part p { margin: 0; }
.legal-part .bullets { gap: 8px; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: 0.875rem; }
.legal-links a { color: var(--muted); font-weight: 700; }
.legal-links a:hover { color: var(--violet-dark); }
.land-foot .legal-links { justify-content: flex-start; margin-bottom: 8px; }
.app-foot { padding-top: 8px; }
.page.narrow > .legal-links { margin-top: 16px; }

/* ---- passes ---- */
.pass-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 18px; border-radius: 18px; background: var(--yellow-soft); border: 2px solid var(--yellow-dark); }
.pass-banner p { margin: 0; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: var(--gap); align-items: stretch; }
.plan-card { gap: 8px; }
.plan-card form { margin-top: auto; }
.plan-card p { margin: 0; }
.plan-days strong { font-size: 2.25rem; font-weight: 900; line-height: 1; color: var(--violet); }
.plan-price { font-size: 1.5rem; }
.plan-price s { font-size: 1rem; }
.plan-saving { align-self: flex-start; }
.pass-now { font-size: 1.125rem; }
.btn.full { width: 100%; }

/* ---- exam experiences ---- */
.story { gap: 12px; scroll-margin-top: 90px; }
.story p { margin: 0; }
.story-scores { display: flex; flex-wrap: wrap; gap: 8px; }
.story-scores li { display: flex; flex-direction: column; align-items: center; min-width: 76px; padding: 8px 12px; border-radius: 14px; background: var(--violet-soft); }
.story-scores strong { font-size: 1.375rem; font-weight: 900; color: var(--violet-dark); line-height: 1.2; }
.story-part { display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.story-foot { align-items: center; }
.story-react { gap: 8px; margin: 0; }
.react { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.react:hover { border-color: var(--violet); }
.react[aria-pressed="true"] { border-color: var(--violet); background: var(--violet-soft); color: var(--violet-dark); }
.react-n { color: var(--muted); font-weight: 900; }
.link-btn { border: 0; background: none; padding: 8px 0; color: var(--muted); font: inherit; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--coral-ink); }
.score-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; }
.filters.card .field { min-width: 150px; flex: 1; }
.filters.card { align-items: end; }
.results-title { display: flex; flex-direction: column; font-weight: 800; min-width: 0; }
.results-num { white-space: nowrap; }

.mistakes { display: flex; flex-direction: column; gap: 8px; }
.mistakes li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 6px 14px; border-radius: 14px; background: var(--coral-soft); overflow-wrap: anywhere; }
.mistakes s { color: var(--coral-ink); }
.mistakes .count { color: var(--coral-ink); font-weight: 800; white-space: nowrap; }

.devices { display: flex; flex-direction: column; gap: 8px; }
.devices li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-radius: 16px; background: var(--tint); }
.devices li > span:first-child { display: flex; flex-direction: column; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.facts div { padding: 10px 12px; border-radius: 14px; background: var(--tint); }
.facts dt { color: var(--muted); font-size: 0.8125rem; font-weight: 800; }
.facts dd { font-size: 1.25rem; font-weight: 900; }
.person { display: flex; align-items: center; gap: 14px; min-width: 0; }

/* ---- passages ---- */
.passage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--gap); }
.passage { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px; }
.passage .row.end { margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.best { font-size: 0.9375rem; }
a.back { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-weight: 800; text-decoration: none; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; border-radius: 18px; border: 2px solid var(--line); }
.table-wrap.card-table { border-radius: 24px; background: var(--surface); }
.table { width: 100%; min-width: 560px; border-collapse: collapse; text-align: left; }
.table th { padding: 14px 14px; color: var(--muted); font-size: 0.8125rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.table td { padding: 12px 14px; border-top: 2px solid #F0ECFB; vertical-align: middle; }
.table .num { text-align: right; white-space: nowrap; }
.table tr.selected td { background: var(--tint); }
.table .sub { display: block; color: var(--muted); font-size: 0.8125rem; overflow-wrap: anywhere; }

/* ---- charts ---- */
.chart { width: 100%; height: auto; max-height: 240px; }
.bar { fill: var(--violet); }
.bar.slow { fill: var(--coral); }
.bar-num { font: 800 17px "Nunito", sans-serif; fill: var(--muted); }
.bar-num.slow { fill: var(--coral-ink); }
.bar-label { font: 700 14px "Nunito", sans-serif; fill: var(--muted); }
.goal-line { stroke: var(--yellow-dark); stroke-width: 2; stroke-dasharray: 6 6; }
.speed-line { stroke: var(--violet); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.speed-dot { fill: var(--surface); stroke: var(--violet); stroke-width: 3; }

progress.bar { appearance: none; -webkit-appearance: none; width: 100%; height: 12px; border: 0; border-radius: 999px; background: var(--line); overflow: hidden; display: block; }
progress.bar::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
progress.bar::-webkit-progress-value { background: var(--mint); border-radius: 999px; }
progress.bar::-moz-progress-bar { background: var(--mint); border-radius: 999px; }
progress.bar.tall { height: 18px; }

/* ---- typing ---- */
.typing { display: flex; flex-direction: column; gap: 14px; }
.type-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; padding: 12px 16px; border-radius: 20px; min-width: 0; }
.stat-label { font-weight: 800; font-size: 0.875rem; }
.stat-value { font-size: 1.75rem; font-weight: 900; line-height: 1.15; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 0.8125rem; }
.stat.violet { background: var(--violet); color: #FFFFFF; }
.stat.violet .stat-label { color: #E9DDFF; }
.stat.mint { background: var(--mint); }
.stat.coral { background: var(--coral); }
.stat.yellow { background: var(--yellow); }
.stat.plain { background: var(--surface); border: 2px solid var(--line); }
.stat.plain .stat-label { color: var(--muted); }

.type-box {
  position: relative; padding: 24px 28px; border-radius: var(--radius-card); background: var(--surface);
  border: 2px solid var(--line-strong); cursor: text; max-height: min(56vh, 520px); overflow-y: auto; scroll-behavior: smooth;
}
.type-box.focused { border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft); }
.type-hint { margin-bottom: 14px; padding: 10px 14px; border-radius: 14px; background: var(--yellow-soft); color: var(--yellow-ink); font-weight: 800; }
.type-text { font-size: 1.3125rem; line-height: 1.9; font-weight: 700; color: var(--todo); letter-spacing: 0.01em; overflow-wrap: break-word; }
.type-text p { margin: 0 0 0.9em; }
.type-text p:last-child { margin-bottom: 0; }
.type-text .w { display: inline-block; white-space: pre; }
.type-text .c { border-radius: 5px; padding: 1px 0; }
.type-text .c.ok { color: var(--ink); }
.type-text .c.bad { color: var(--coral-ink); background: #FFD9D2; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.type-text .c.now { background: var(--yellow); color: var(--ink); box-shadow: 0 3px 0 var(--yellow-dark); }
.type-text .c.nl { color: var(--line-strong); font-weight: 900; padding: 1px 4px; }
.type-text .c.nl.now { color: var(--ink); }
.type-text .c.nl.ok { color: var(--mint-dark); }
/* The real input sits invisibly over the text so phones raise their keyboard. */
.type-input {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; margin: 0; resize: none;
  font-size: 16px; color: transparent; background: transparent; caret-color: transparent; cursor: text;
}
.done:focus { outline: none; }

/* ---- admin ---- */
.admin-cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.admin-main { flex: 999 1 520px; min-width: 0; gap: 18px; }
.admin-side { flex: 1 1 360px; min-width: 0; position: sticky; top: 88px; }

/* ---- sign in ---- */
.step { width: 36px; height: 36px; flex-shrink: 0; border-radius: 12px; color: var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 900; }
.step.yellow { background: var(--yellow); }
.step.mint { background: var(--mint); }
.step.coral { background: var(--coral); }

/* ---- phone tab bar ---- */
.tabbar { display: none; }

@media (max-width: 760px) {
  :root { --pad: 16px; --gap: 16px; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  body.land, body.admin { padding-bottom: 0; }
  .top { padding: 10px var(--pad); }
  .tabs:not(.always) { display: none; }
  .tabs.always { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); width: calc(100% + var(--pad) * 2); }
  .tabs.always .tab { white-space: nowrap; padding: 0 14px; }
  .admin-link, .chip-label { display: none; }
  .top-right { gap: 6px; }
  .top-right .avatar { width: 36px; height: 36px; font-size: 0.8125rem; }
  body.admin .top-right .link { display: inline; }
  .chip { min-height: 36px; padding: 0 12px; }
  .page { padding-top: 20px; padding-bottom: 32px; }
  .card { padding: 20px; border-radius: 24px; }
  .hero { padding: 22px 20px; }
  .hero .btn { width: 100%; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 14px 16px; }
  .tile-value { font-size: 1.75rem; }
      .admin-side { position: static; order: -1; }
  .admin-cols { gap: 16px; }

  .type-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; position: sticky; top: 61px; z-index: 5; background: var(--bg); padding: 6px 0; }
  .stat { padding: 8px 6px; border-radius: 14px; align-items: center; text-align: center; }
  .stat-label { font-size: 0.6875rem; }
  .stat-value { font-size: 1.125rem; }
  .stat-value small { font-size: 0.625rem; }
  .type-box { padding: 16px; border-radius: 22px; max-height: 44vh; max-height: 44dvh; }
  .type-text { font-size: 1.125rem; line-height: 1.8; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 2px solid var(--line);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 56px; border-radius: 16px; color: var(--muted); font-size: 0.75rem; font-weight: 800; text-decoration: none;
  }
  .tabbar a { min-width: 0; font-size: 0.6875rem; }
  .tabbar .icon { width: 24px; height: 24px; }
  .tabbar a[aria-current="page"] { background: var(--violet-soft); color: var(--violet-dark); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---- learn: cards, library, review ---- */
.badge.coral { background: var(--coral-soft); color: var(--coral-ink); }
.btn.small { min-height: 44px; padding: 0 16px; align-self: flex-start; box-shadow: 0 3px 0 var(--line-strong); }
.input.narrow { width: auto; flex: 0 1 150px; }
.input.area.short { min-height: 0; }
.center-text { text-align: center; }
.warn-text { color: var(--coral-ink); }

.plan { display: flex; flex-direction: column; gap: 14px; }
.plan-step { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 24px; }
.plan-step .stack { gap: 2px; flex: 1 1 240px; min-width: 0; }
.plan-step .eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; }
.plan-step.done { background: var(--mint-soft); border-color: #BFEBDF; }
.plan-step.done .eyebrow { color: var(--mint-ink); }

.deck { display: flex; flex-direction: column; gap: 16px; max-width: 720px; width: 100%; margin: 0 auto; }
.deck-top { display: flex; align-items: center; gap: 12px; }
.deck-top progress { flex: 1; }
.deck-count { font-weight: 800; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.flash {
  padding: 28px 30px; border-radius: var(--radius-card); background: var(--surface); border: 2px solid var(--line-strong);
  box-shadow: 0 6px 0 var(--line-strong); min-height: 300px; display: flex; flex-direction: column; gap: 16px;
  touch-action: pan-y; transition: transform 160ms ease, opacity 160ms ease; will-change: transform;
}
.flash.dragging { transition: none; }
.flash.lean-right { border-color: var(--mint-dark); box-shadow: 0 6px 0 var(--mint-dark); }
.flash.lean-left { border-color: var(--coral-dark); box-shadow: 0 6px 0 var(--coral-dark); }
.flash-face { display: flex; flex-direction: column; gap: 10px; }
.flash-face.back { border-top: 2px dashed var(--line-strong); padding-top: 16px; }
.flash-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.flash-hint { color: var(--muted); font-weight: 700; }
.flash-front { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.625rem); font-weight: 800; line-height: 1.3; }
.flash-front.struck { color: var(--coral-ink); text-decoration: line-through; text-decoration-thickness: 2px; }
.flash-back { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.625rem); font-weight: 900; line-height: 1.3; color: var(--violet); }
.example { padding: 10px 14px; border-radius: 14px; background: var(--tint); font-style: italic; }
.stress { font-size: 1.125rem; letter-spacing: 0.04em; }
.alts { display: flex; flex-direction: column; gap: 8px; }
.alts li { padding: 10px 14px; border-radius: 14px; background: var(--tint); display: flex; flex-direction: column; gap: 4px; }
.alts .example { padding: 0; background: none; color: var(--muted); }
.deck-actions { display: flex; flex-direction: column; gap: 12px; }
.grade-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.btn.grade { min-height: 60px; flex-direction: column; gap: 0; padding: 4px 8px; font-size: 1.0625rem; color: var(--ink); }
.btn.grade small { font-size: 0.6875rem; opacity: 0.7; }
.btn.grade.missed { background: var(--coral); box-shadow: 0 4px 0 var(--coral-dark); }
.btn.grade.almost { background: var(--yellow); box-shadow: 0 4px 0 var(--yellow-dark); }
.btn.grade.got { background: var(--mint); box-shadow: 0 4px 0 var(--mint-dark); }
.btn.grade:active { box-shadow: none; }
.outcomes { display: flex; flex-direction: column; gap: 6px; }
.outcomes li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 6px 14px; border-radius: 14px; background: var(--tint); overflow-wrap: anywhere; }
.outcomes li.g0 { background: var(--coral-soft); }
.outcomes li.g2 { background: var(--mint-soft); }
.outcomes .tag { font-weight: 800; white-space: nowrap; font-size: 0.875rem; }
.outcomes .g0 .tag { color: var(--coral-ink); }
.outcomes .g1 .tag { color: var(--yellow-ink); }
.outcomes .g2 .tag { color: var(--mint-ink); }

.library { display: flex; flex-direction: column; gap: 8px; }
.library.two { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.library .h-sm { margin-top: 14px; }
.lib-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 10px 16px;
  border-radius: 16px; background: var(--surface); border: 2px solid var(--line); color: var(--ink); text-decoration: none;
}
.lib-row:hover { border-color: var(--violet); color: var(--ink); }
.lib-row.missed { background: var(--coral-soft); border-color: #F5C7BF; }
.card .lib-row { background: var(--tint); border-color: transparent; }
.card .lib-row:hover { border-color: var(--violet); }
.card .lib-row.missed { background: var(--coral-soft); }
.lib-text { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }

.steps { display: flex; flex-direction: column; gap: 10px; }
.steps li { padding: 12px 14px; border-radius: 16px; background: var(--tint); display: flex; flex-direction: column; gap: 6px; }
.steps .example { background: var(--surface); }
.bullets { list-style: disc; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.timeline { display: flex; flex-direction: column; gap: 14px; }
.timeline > li { display: flex; flex-direction: column; gap: 6px; }

@media (max-width: 760px) {
  .flash { padding: 20px; min-height: 260px; }
  .tabbar a { font-size: 0.6875rem; min-width: 0; }
  .plan-step { padding: 16px 18px; }
  .plan-step .btn { width: 100%; }
}

/* ---- exercises: reorder lists, grammar choices, match ---- */
.deck.wide { max-width: 860px; }
.flash.quiz { min-height: 0; }
.small-front { font-size: 1.125rem; }
.sortable { display: flex; flex-direction: column; gap: 8px; }
.sortable li {
  display: flex; align-items: center; gap: 6px; min-height: 56px; padding: 6px 8px 6px 2px; border-radius: 16px;
  background: var(--surface); border: 2px solid var(--line-strong); box-shadow: 0 3px 0 var(--line-strong);
  cursor: grab; user-select: none; -webkit-user-select: none; position: relative;
}
.sortable li.dragging { z-index: 5; border-color: var(--violet); box-shadow: 0 10px 24px rgba(35, 25, 66, 0.2); cursor: grabbing; }
.sortable li.right { background: var(--mint-soft); border-color: var(--mint-dark); box-shadow: 0 3px 0 var(--mint-dark); }
.sortable li.wrong { background: var(--coral-soft); border-color: var(--coral-dark); box-shadow: 0 3px 0 var(--coral-dark); }
.grip { display: flex; align-items: center; justify-content: center; width: 40px; align-self: stretch; min-height: 44px; color: var(--muted); touch-action: none; flex-shrink: 0; }
.sort-text { flex: 1; min-width: 0; font-weight: 800; overflow-wrap: anywhere; }
.sort-moves { display: flex; gap: 4px; flex-shrink: 0; }
.sort-moves button {
  width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink);
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.sort-moves button:hover { border-color: var(--violet); color: var(--violet-dark); }
.sortable[data-locked] li { cursor: default; }
.sortable[data-locked] .sort-moves, .sortable[data-locked] .grip { visibility: hidden; }

.segments { display: flex; flex-wrap: wrap; gap: 8px; }
.options { display: flex; flex-direction: column; gap: 8px; }
.seg, .option {
  font: inherit; font-weight: 800; text-align: left; padding: 10px 14px; min-height: 48px; border-radius: 14px;
  border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); box-shadow: 0 3px 0 var(--line-strong); cursor: pointer;
}
.option { width: 100%; }
.seg:hover:not([disabled]), .option:hover:not([disabled]) { border-color: var(--violet); }
.seg[disabled], .option[disabled] { cursor: default; color: var(--ink); opacity: 1; }
.seg.right, .option.right { background: var(--mint-soft); border-color: var(--mint-dark); box-shadow: 0 3px 0 var(--mint-dark); }
.seg.wrong, .option.wrong { background: var(--coral-soft); border-color: var(--coral-dark); box-shadow: 0 3px 0 var(--coral-dark); }
.feedback { display: flex; flex-direction: column; gap: 8px; border-top: 2px dashed var(--line-strong); padding-top: 14px; }
.verdict { font-weight: 900; font-size: 1.125rem; }
.verdict:empty { display: none; }
.verdict.good { color: var(--mint-ink); }
.verdict.bad { color: var(--coral-ink); }

/* Cues and answers share one grid, so each answer row lines up with its cue whatever the text length. */
.match-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px 10px; align-items: stretch; }
.match-grid .match-left, .match-grid .sortable { display: contents; }
.match-left li { display: flex; align-items: center; padding: 8px 14px; border-radius: 16px; background: var(--violet-soft); color: var(--violet-dark); font-weight: 800; overflow-wrap: anywhere; grid-column: 1; }
.match-grid .sortable li { grid-column: 2; }
.match-left li:nth-child(1), .match-grid .sortable li:nth-child(1) { grid-row: 1; }
.match-left li:nth-child(2), .match-grid .sortable li:nth-child(2) { grid-row: 2; }
.match-left li:nth-child(3), .match-grid .sortable li:nth-child(3) { grid-row: 3; }
.match-left li:nth-child(4), .match-grid .sortable li:nth-child(4) { grid-row: 4; }

@media (max-width: 760px) {
  /* On a phone each cue sits directly above its answer. */
  .match-grid { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .match-left li, .match-grid .sortable li { grid-column: 1; }
  .match-left li { border-radius: 14px 14px 4px 4px; padding: 6px 14px; font-size: 0.9375rem; margin-top: 8px; }
  .match-grid .sortable li { border-radius: 4px 4px 14px 14px; }
  .match-left li:nth-child(1) { grid-row: 1; } .match-grid .sortable li:nth-child(1) { grid-row: 2; }
  .match-left li:nth-child(2) { grid-row: 3; } .match-grid .sortable li:nth-child(2) { grid-row: 4; }
  .match-left li:nth-child(3) { grid-row: 5; } .match-grid .sortable li:nth-child(3) { grid-row: 6; }
  .match-left li:nth-child(4) { grid-row: 7; } .match-grid .sortable li:nth-child(4) { grid-row: 8; }
  .sort-moves button { width: 36px; height: 36px; }
}

/* ---- timed tasks ---- */
.task-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--gap); align-items: start; }
.task-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 12px; }
.prompt, .answer-text { display: flex; flex-direction: column; gap: 10px; line-height: 1.6; }
.prompt .bullets { font-weight: 700; }
.chip.clock { background: var(--ink); color: #FFFFFF; font-variant-numeric: tabular-nums; font-size: 1.0625rem; }
.chip.clock.urgent { background: var(--coral); color: var(--ink); }
.chip.count { background: var(--line); color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.count.good { background: var(--mint-soft); color: var(--mint-ink); }
.chip.count.high { background: var(--coral-soft); color: var(--coral-ink); }
.input.area.answer { min-height: 340px; font-size: 1.0625rem; }
.input[disabled] { background: var(--tint); }
.speak { min-height: 300px; }
.big-clock { font-size: clamp(3.5rem, 2.5rem + 6vw, 5.5rem); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; color: var(--violet); }
.eyebrow.rec { display: inline-flex; align-items: center; gap: 8px; color: var(--coral-ink); }
.rec-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--coral-dark); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
audio { width: 100%; }
.checklist { display: flex; flex-direction: column; gap: 4px; }
.checklist .check { align-items: flex-start; padding: 6px 0; }
.checklist .check input { margin-top: 2px; }
@media (max-width: 900px) { .task-cols { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }

/* ---- item pages: a wide reading column, practice beside it ---- */
.item-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); gap: var(--gap); align-items: start; }
.item-layout.solo { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.item-main, .item-side { gap: var(--gap); min-width: 0; }
.lead { font-size: 1.125rem; font-weight: 700; line-height: 1.55; }
.steps.wide { gap: 12px; }
.steps.wide li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 20px; align-items: start; padding: 16px 18px; }
.steps.wide li > div { display: flex; flex-direction: column; gap: 6px; }
.step-name { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.0625rem; }
.step-no { width: 30px; height: 30px; flex-shrink: 0; border-radius: 10px; background: var(--violet); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; font-size: 0.9375rem; }
.item-side .sortable li { min-height: 52px; }
@media (max-width: 980px) {
  .item-layout { grid-template-columns: minmax(0, 1fr); }
  .steps.wide li { grid-template-columns: minmax(0, 1fr); }
}

/* ---- pronunciation lab ---- */
.lab-controls { display: flex; flex-wrap: wrap; gap: 10px; }
.lab-controls .btn { flex: 1 1 180px; }
.btn.recording { background: var(--coral); color: var(--ink); box-shadow: 0 4px 0 var(--coral-dark); }
.btn.grade[disabled] { opacity: 0.45; cursor: default; }
.options.two { flex-direction: row; }
.option.word { text-align: center; font-size: 1.375rem; font-weight: 900; min-height: 72px; }
.option[disabled]:not(.right):not(.wrong) { opacity: 0.6; }

/* ---- badges ---- */
.medals { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.medal { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 22px; background: var(--surface); border: 2px solid var(--line); }
.medal-disc { width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; background: var(--line); color: var(--todo); display: flex; align-items: center; justify-content: center; }
.medal-disc .icon { width: 26px; height: 26px; }
.medal-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.medal.earned { border-color: var(--yellow-dark); background: var(--yellow-soft); box-shadow: 0 4px 0 var(--yellow-dark); }
.medal.earned .medal-disc { background: var(--yellow); color: var(--ink); box-shadow: 0 3px 0 var(--yellow-dark); }
.medal-date { font-weight: 800; color: var(--yellow-ink); font-size: 0.875rem; }
.notice.award { background: var(--yellow-soft); color: var(--yellow-ink); }

/* ---- small buttons, pager, filters ---- */
.btn.small { min-height: 40px; padding: 0 14px; border-radius: 12px; font-size: 0.9375rem; box-shadow: 0 3px 0 var(--line-strong); }
.btn.off { opacity: 0.45; cursor: default; box-shadow: none; }
.btn.off:hover { border-color: var(--line-strong); color: var(--ink); }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; padding-top: 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 14px 28px; padding: 16px 20px; border-radius: 22px; background: var(--surface); border: 2px solid var(--line); }
.filter { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.filter-label { font-size: 0.8125rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.filters .pill { min-height: 40px; padding: 0 14px; }
.filter .input { min-height: 40px; }
.filter .btn { min-height: 40px; padding: 0 14px; box-shadow: 0 3px 0 var(--line-strong); }
.filter[role="search"] { flex: 1 1 240px; }
.input.select { width: auto; max-width: min(100%, 280px); }
.count-line { margin-bottom: -6px; }
.task-head .small { margin-left: 10px; text-transform: none; letter-spacing: 0; }
.table.figures { min-width: 0; }
.table.figures caption { caption-side: top; text-align: left; padding: 12px 14px 4px; font-weight: 900; }
.table.figures th[scope="row"] { text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--ink); border-top: 2px solid #F0ECFB; }

/* ---- the test switcher and help link in the header ---- */
.switcher { position: relative; }
.switcher summary {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px 0 14px; border-radius: 999px;
  background: var(--violet-soft); color: var(--violet-dark); font-weight: 900; cursor: pointer; list-style: none; white-space: nowrap;
  border: 2px solid transparent;
}
.switcher summary::-webkit-details-marker { display: none; }
.switcher summary:hover, .switcher[open] summary { border-color: var(--violet); }
.switcher[open] summary .icon { transform: rotate(180deg); }
.switcher-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(290px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 20px;
  background: var(--surface); border: 2px solid var(--line-strong); box-shadow: 0 10px 0 rgba(35, 25, 66, 0.08);
}
.switcher-title { font-size: 0.8125rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.switcher-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; text-align: left;
}
.switcher-menu button:hover { border-color: var(--violet); color: var(--violet-dark); }
.switcher-menu button[aria-current="true"] { background: var(--violet-soft); border-color: var(--violet); color: var(--violet-dark); }
.help-link {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--line-strong); color: var(--muted); font-weight: 900; font-size: 1.125rem; text-decoration: none; background: var(--surface);
}
.help-link:hover { border-color: var(--violet); color: var(--violet-dark); }

/* ---- ticks ---- */
.ticks { display: flex; flex-direction: column; gap: 10px; }
.ticks li { display: flex; align-items: flex-start; gap: 10px; font-weight: 700; }
.ticks .icon { margin-top: 3px; padding: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--mint); color: var(--ink); }

/* ---- landing and sign in ---- */
body.land { padding-bottom: 0; }
.land-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1120px; margin: 0 auto; padding: 16px var(--pad); }
.land-top .wordmark { font-size: 1.5rem; }
.land-hero { max-width: 1120px; margin: 0 auto; padding: 24px var(--pad) 48px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 400px); gap: 40px; align-items: center; }
.land-copy { display: flex; flex-direction: column; gap: 18px; }
.land-title { font-size: clamp(2.25rem, 1.4rem + 4vw, 4rem); font-weight: 1000; line-height: 1.02; letter-spacing: -0.02em; color: var(--ink); }
.land-sub { font-size: 1.1875rem; font-weight: 700; line-height: 1.5; color: var(--muted); max-width: 34em; }
.land-card { position: relative; padding: 26px 26px 24px; border-radius: var(--radius-card); background: var(--surface); border: 2px solid var(--line-strong); box-shadow: 0 8px 0 var(--line-strong); scroll-margin-top: 20px; }
.land-card .stack { gap: 12px; }
.land-card .btn.big { width: 100%; }
.land-fox { position: absolute; right: 18px; top: -56px; width: 84px; height: 84px; }
.land-band { max-width: 1120px; margin: 0 auto; padding: 36px var(--pad); display: flex; flex-direction: column; gap: 22px; }
.land-h2 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.125rem); font-weight: 900; line-height: 1.15; max-width: 22em; }
.land-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--gap); }
.land-grid .card { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px; }
.land-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--gap); }
.land-steps li { display: flex; gap: 14px; align-items: flex-start; padding: 20px 22px; border-radius: 22px; background: var(--surface); border: 2px solid var(--line); }
.land-steps .step { width: 44px; height: 44px; border-radius: 14px; font-size: 1.25rem; }
.land-vs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--gap); }
.land-vs .card { display: flex; flex-direction: column; gap: 14px; }
.vs-old { background: #F0EFF5; border-color: #E2E0EC; color: var(--muted); }
.vs-old .bullets li { text-decoration: line-through; text-decoration-color: #B8B3CC; }
.vs-new { background: var(--violet); border-color: var(--violet-dark); color: #FFFFFF; box-shadow: 0 6px 0 var(--violet-dark); }
.vs-new .ticks .icon { background: var(--yellow); }
.land-foot { max-width: 1120px; margin: 0 auto; padding: 24px var(--pad) 40px; color: var(--muted); font-size: 0.875rem; }

/* ---- sign-up steps ---- */
.page.wizard { max-width: 760px; padding-top: 12px; }
.page.wizard > .card { gap: 18px; padding: 26px 30px 30px; }
.wizard-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wizard-head { display: flex; align-items: flex-end; gap: 14px; }
.wizard-head img { flex-shrink: 0; }
.wizard-head > div { position: relative; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 16px 20px; border-radius: 22px 22px 22px 6px; background: var(--tint); border: 2px solid var(--line); }
.choices { display: grid; gap: 10px; }
.choices.compact { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.choice { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; border: 2px solid var(--line-strong); background: var(--surface); cursor: pointer; box-shadow: 0 4px 0 var(--line-strong); transition: transform 80ms ease, box-shadow 80ms ease; }
.choice:hover { border-color: var(--violet); }
.choice input { width: 22px; height: 22px; flex-shrink: 0; accent-color: var(--violet); margin: 0; }
.choice:has(input:checked) { border-color: var(--violet); background: var(--violet-soft); box-shadow: 0 4px 0 var(--violet); }
.choice:has(input:focus-visible) { outline: 3px solid var(--violet); outline-offset: 3px; }
.choice.slim { padding: 12px 14px; border-radius: 16px; }
.choice-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.choice-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 900; font-size: 1.0625rem; }
.choice.slim .choice-title { font-size: 1rem; }
.choice-about { color: var(--muted); font-weight: 700; font-size: 0.9375rem; }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { font-weight: 800; padding: 0; margin-bottom: 8px; }
.typing.mini .type-box { max-height: none; }
.typing.mini .type-text { font-size: 1.375rem; }

/* ---- the tour ---- */
.tour { display: flex; flex-direction: column; gap: 20px; padding: 26px 30px 30px; }
.tour-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tour-body { display: flex; gap: 22px; align-items: flex-start; min-height: 250px; }
.tour-icon { width: 76px; height: 76px; flex-shrink: 0; border-radius: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.tour-icon .icon { width: 38px; height: 38px; }
.tour-icon.small { width: 48px; height: 48px; border-radius: 16px; }
.tour-icon.small .icon { width: 24px; height: 24px; }
.tour-icon.violet { background: var(--violet); color: #FFFFFF; box-shadow: 0 5px 0 var(--violet-dark); }
.tour-icon.yellow { background: var(--yellow); box-shadow: 0 5px 0 var(--yellow-dark); }
.tour-icon.mint { background: var(--mint); box-shadow: 0 5px 0 var(--mint-dark); }
.tour-icon.coral { background: var(--coral); box-shadow: 0 5px 0 var(--coral-dark); }
.tour-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.tour-nav > :last-child { justify-self: end; }
.tour-nav > :first-child { justify-self: start; }
.dots { display: flex; gap: 6px; }
.dots li { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.dots li.on { background: var(--violet); width: 24px; border-radius: 6px; }

/* ---- nudges and the day-one comparison ---- */
.nudge { background: var(--yellow-soft); border-color: #F3E3A0; }
.notice.since { align-items: flex-start; }
.notice.since .icon { margin-top: 2px; }
.since-line { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--tint); font-weight: 700; }
.since-line .icon { color: var(--violet); }
.up { color: var(--mint-ink); }
.day-one { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; border-color: var(--violet); box-shadow: 0 6px 0 var(--violet-soft); }
.day-one .stack { gap: 8px; }

@media (max-width: 900px) {
  .land-hero { grid-template-columns: minmax(0, 1fr); gap: 64px; padding-top: 8px; }
  .land-card { max-width: 480px; width: 100%; }
}
@media (max-width: 760px) {
  .filters { padding: 14px; gap: 12px; }
  .filter { width: 100%; }
  .filters .pills { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 0 14px 2px; }
  .filters .pill { white-space: nowrap; }
  .top-right .chip.xp, .top-right .help-link { display: none; }
  .wordmark { margin-right: 0; }
  .switcher summary { min-height: 36px; }
  .land-band { padding: 26px var(--pad); }
  .page.wizard > .card, .tour { padding: 20px; }
  .wizard-head img { width: 52px; height: 52px; }
  .wizard-head > div { padding: 12px 14px; }
  .tour-body { flex-direction: column; min-height: 0; gap: 14px; }
  .tour-icon { width: 60px; height: 60px; border-radius: 20px; }
  .tour-nav .btn { padding: 0 16px; }
  .day-one img { display: none; }
  .pager { gap: 8px; }
  .pager .btn { padding: 0 14px; }
}

/* ---- header: keep it on one row ---- */
@media (max-width: 1400px) { .top .chip-label { display: none; } }
@media (max-width: 1180px) { .top { padding-left: 20px; padding-right: 20px; } .tab { padding: 0 13px; } .wordmark { margin-right: 4px; } }
@media (max-width: 760px) {
  .top { flex-wrap: nowrap; }
  .top .wordmark span { display: none; }
  .top .nav { flex: 0 0 auto; }
  .top-right { flex-wrap: nowrap; min-width: 0; }
  .switcher summary { max-width: 46vw; }
  .switcher-now { overflow: hidden; text-overflow: ellipsis; }
  .switcher-menu { right: auto; left: 0; }
  body.admin .top { flex-wrap: wrap; }
  body.admin .top .wordmark span { display: inline; }
  .table.figures th, .table.figures td { padding: 10px 8px; white-space: normal; }
  .table.figures thead th { font-size: 0.6875rem; }
  .table.figures th[scope="row"] { font-size: 0.9375rem; }
  .table.figures caption { padding: 10px 8px 2px; }
}

/* ---- charts and diagrams in report tasks ---- */
.figure { margin: 0; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); }
.figure figcaption { font-weight: 900; }
.figure-scroll { overflow-x: auto; }
.plot { width: 100%; min-width: 440px; height: auto; display: block; }
.plot .axis { font-size: 14px; font-weight: 700; fill: var(--muted); }
.plot .grid-line { stroke: var(--line); stroke-width: 1.5; }
.plot .axis-line { stroke: var(--todo); stroke-width: 2; }
.plot-line { stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.plot-dot { stroke: var(--surface); stroke-width: 2; }
.plot-line.s0 { stroke: #6D28D9; } .plot-dot.s0, .plot-bar.s0 { fill: #6D28D9; }
.plot-line.s1 { stroke: #D4533F; stroke-dasharray: 9 5; } .plot-dot.s1, .plot-bar.s1 { fill: #D4533F; }
.plot-line.s2 { stroke: #1F9C7F; stroke-dasharray: 2 6; } .plot-dot.s2, .plot-bar.s2 { fill: #1F9C7F; }
.plot-line.s3 { stroke: #B58900; stroke-dasharray: 12 4 2 4; } .plot-dot.s3, .plot-bar.s3 { fill: #B58900; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-weight: 800; font-size: 0.9375rem; }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 22px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.swatch.s0 { background: #6D28D9; border-color: #6D28D9; }
.swatch.s1 { background: #D4533F; border-color: #D4533F; }
.swatch.s2 { background: #1F9C7F; border-color: #1F9C7F; }
.swatch.s3 { background: #B58900; border-color: #B58900; }
.swatch.line { height: 0; border-radius: 0; border-top: 4px solid; background: none; }
.swatch.line.s1 { border-top-style: dashed; }
.swatch.line.s2 { border-top-style: dotted; }
.swatch.line.s3 { border-top-style: double; border-top-width: 6px; }
.figure-data summary { cursor: pointer; font-weight: 800; color: var(--violet); min-height: 36px; display: inline-flex; align-items: center; }
.figure-data[open] summary { margin-bottom: 6px; }
.flow { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.flow li { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--tint); border: 2px solid var(--line); font-weight: 700; font-size: 0.9375rem; line-height: 1.35; }
.flow-no { width: 28px; height: 28px; border-radius: 9px; background: var(--violet); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 0.875rem; }

/* ---- wide screens: use the room ---- */
@media (min-width: 1280px) {
  .page { max-width: 1360px; }
  .page.wide { max-width: 1560px; }
  .page.narrow { max-width: 560px; }
  .page.wizard { max-width: 760px; }
  .top { padding-left: max(var(--pad), calc((100% - 1360px) / 2 + var(--pad))); padding-right: max(var(--pad), calc((100% - 1360px) / 2 + var(--pad))); }
  body.admin .top { padding-left: max(var(--pad), calc((100% - 1560px) / 2 + var(--pad))); padding-right: max(var(--pad), calc((100% - 1560px) / 2 + var(--pad))); }
  .land-top, .land-hero, .land-band, .land-foot { max-width: 1280px; }
  .item-layout { grid-template-columns: minmax(0, 2.1fr) minmax(320px, 1fr); }
}

/* ---- reading: lessons, passages and marked answers ---- */
.quote { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 14px; background: var(--tint); border-left: 5px solid var(--violet); line-height: 1.65; font-weight: 600; }
.how { display: flex; flex-direction: column; gap: 10px; }
.how li { display: flex; align-items: flex-start; gap: 12px; font-weight: 700; line-height: 1.5; }
.how .step-no, .lib-row .step-no { margin-top: 1px; }
.worked summary { cursor: pointer; font-weight: 900; color: var(--violet); min-height: 44px; display: inline-flex; align-items: center; }
.worked[open] { display: flex; flex-direction: column; gap: 8px; padding: 4px 16px 14px; border-radius: 14px; background: var(--mint-soft); }
.worked[open] summary { color: var(--mint-ink); }
.remember { background: var(--yellow-soft); border-color: #F3E3A0; }
.q { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.q + .q, .q-group + .q, .q + .q-group { margin-top: 10px; padding-top: 16px; border-top: 2px solid var(--line); }
.q-group + .q { border-top: 0; padding-top: 0; }
.q legend, .review-q { display: flex; align-items: flex-start; gap: 10px; padding: 0; font-weight: 800; font-size: 1.0625rem; line-height: 1.45; }
.q-no { min-width: 30px; height: 30px; padding: 0 6px; flex-shrink: 0; border-radius: 10px; background: var(--ink); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: 900; }
.q.right .q-no, .review .right .q-no { background: var(--mint-dark); }
.q.wrong .q-no, .review .wrong .q-no { background: var(--coral-dark); }
.q-group { display: flex; flex-direction: column; gap: 8px; }
.q .choices.compact { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.input.gap { max-width: 320px; }
.why { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 14px; background: var(--tint); }
.q.right .why { background: var(--mint-soft); }
.q.wrong .why { background: var(--coral-soft); }
.why-verdict { font-weight: 900; font-size: 1.0625rem; }
.evidence { margin: 0; padding: 8px 14px; border-left: 4px solid var(--yellow-dark); background: var(--yellow-soft); border-radius: 0 12px 12px 0; font-style: italic; font-weight: 700; }
.evidence::before { content: "In the text: "; font-style: normal; font-weight: 900; color: var(--yellow-ink); }
a.choice.link-choice { text-decoration: none; color: var(--ink); }
a.choice.link-choice:hover { color: var(--ink); }
.read-cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.passage-pane { position: sticky; top: 88px; max-height: calc(100vh - 108px); max-height: calc(100dvh - 108px); overflow-y: auto; }
.passage-text { display: flex; flex-direction: column; gap: 12px; line-height: 1.75; font-size: 1.0625rem; font-weight: 600; }
.review { display: flex; flex-direction: column; gap: 14px; }
.review li { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 16px; background: var(--tint); border-left: 5px solid var(--line-strong); }
.review li.right { border-left-color: var(--mint-dark); }
.review li.wrong { border-left-color: var(--coral-dark); }
.page-head .chip.clock { font-size: 1.25rem; min-height: 48px; padding: 0 18px; position: sticky; top: 76px; }
@media (max-width: 980px) {
  .read-cols { grid-template-columns: minmax(0, 1fr); }
  .passage-pane { position: static; max-height: 46vh; max-height: 46dvh; }
  .read-cols.marked .passage-pane { max-height: none; }
}
.input.pick { min-width: 120px; align-self: flex-start; }
.q:has(.pick) { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.q:has(.pick) legend { float: left; flex: 1 1 260px; }
.table.gapped { min-width: 0; }
.table.gapped th, .table.gapped td { white-space: normal; vertical-align: top; text-transform: none; letter-spacing: 0; font-size: 0.9375rem; }
.table.gapped thead th { color: var(--muted); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- the three stages, and numbered sections inside each ---- */
.path ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.path a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); color: var(--muted); text-decoration: none; height: 100%; }
.path a:hover { border-color: var(--violet); color: var(--violet-dark); }
.path a[aria-current="step"] { border-color: var(--violet); background: var(--violet-soft); color: var(--violet-dark); box-shadow: 0 4px 0 var(--violet); }
.path-no, .section-no { width: 34px; height: 34px; flex-shrink: 0; border-radius: 12px; background: var(--line); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-weight: 900; }
.path a[aria-current="step"] .path-no, .section-no { background: var(--violet); color: #FFFFFF; }
.path-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.path-text strong { color: var(--ink); font-size: 1.0625rem; }
.path-text span { font-size: 0.875rem; font-weight: 700; }
.section-head { display: flex; align-items: flex-start; gap: 12px; margin-top: 8px; }
.section-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plan-step.card progress { max-width: 420px; }
@media (max-width: 760px) {
  .path ol { gap: 6px; }
  .path a { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; }
  .path-text span { display: none; }
  .path-no { width: 28px; height: 28px; border-radius: 10px; font-size: 0.875rem; }
}
.text-head { font-weight: 900; letter-spacing: 0.02em; }
.passage-text .table-wrap { font-size: 0.9375rem; line-height: 1.45; }
.passage-text .table.gapped td, .passage-text .table.gapped th { padding: 10px; }

/* ---- blanks answered inside the sentence ---- */
.blank { display: inline-block; max-width: 100%; vertical-align: middle; margin: 3px 2px; }
.input.inline { width: auto; max-width: 100%; min-height: 38px; padding: 0 10px; border-radius: 10px; border-color: var(--violet); background: var(--surface); font-weight: 800; }
select.input.inline { padding-right: 6px; }
input.input.inline { width: 9.5em; }
input.input.inline::placeholder { color: var(--violet); font-weight: 900; opacity: 1; }
.q-group .quote p:has(.blank) { line-height: 2.5; }
.table.gapped .blank { margin: 2px 0; }
.review li.context { border-left-color: var(--violet); background: var(--surface); padding: 0; }
.review li.context .quote { border-left: 0; }
@media (max-width: 760px) { select.input.inline { max-width: 78vw; } }

/* ---- a full reading test ---- */
.full-test { display: flex; flex-direction: column; gap: var(--gap); }
.full-bar { position: sticky; top: 70px; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 18px; border-radius: 20px; background: var(--surface); border: 2px solid var(--line-strong); box-shadow: 0 6px 0 rgba(35, 25, 66, 0.06); }
.full-bar .eyebrow { font-size: 0.8125rem; }
.full-label { font-weight: 900; font-size: 1.0625rem; }
.full-bar .chip.clock { font-size: 1.25rem; min-height: 46px; padding: 0 18px; }
.full-bar button.pill { font: inherit; font-weight: 800; cursor: pointer; }
.full-part { display: flex; flex-direction: column; gap: 14px; }
.full-part .passage-pane { top: 150px; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); }
.full-actions { justify-content: flex-end; }
.tile-text { font-size: 1.375rem; line-height: 1.2; display: inline-block; }
@media (max-width: 760px) {
  .full-bar { top: 58px; padding: 10px 12px; }
  .full-bar .pills { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .full-bar .pill { white-space: nowrap; min-height: 38px; }
}

/* ---- guides ---- */
.guide { display: flex; flex-direction: column; gap: var(--gap); }
.guide-block { scroll-margin-top: 90px; }
.guide-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-nav .pill { min-height: 38px; padding: 0 14px; font-size: 0.9375rem; }
.prose { display: flex; flex-direction: column; gap: 10px; line-height: 1.6; max-width: 70ch; }
.facts.wide { display: grid; gap: 0; }
.facts.wide > div { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr); gap: 6px 20px; padding: 12px 0; border-top: 2px solid var(--line); }
.facts.wide > div:first-child { border-top: 0; padding-top: 0; }
.facts.wide dt { font-weight: 900; }
.facts.wide dd { color: var(--ink); font-weight: 600; line-height: 1.5; }
.criteria { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px; }
.criterion { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: 18px; background: var(--tint); }
.criterion .h-md { display: flex; align-items: center; gap: 10px; }
.criterion .ticks { gap: 8px; font-size: 0.9375rem; }
.guide-table { min-width: 640px; }
.guide-table th, .guide-table td { white-space: normal; vertical-align: top; text-transform: none; letter-spacing: 0; font-size: 0.9375rem; line-height: 1.45; }
.guide-table thead th { color: var(--muted); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; }
.guide-table tbody th { font-weight: 900; color: var(--ink); min-width: 150px; border-top: 2px solid #F0ECFB; }
.frames { display: flex; flex-direction: column; }
.frames li { display: grid; grid-template-columns: 30px minmax(110px, 170px) minmax(0, 1fr); gap: 6px 14px; align-items: start; padding: 12px 0; border-top: 2px solid var(--line); line-height: 1.7; }
.frames li:first-child { border-top: 0; }
.frame-label { font-weight: 900; color: var(--coral-ink); }
.slot { padding: 2px 7px; border-radius: 7px; background: var(--yellow-soft); border-bottom: 2px solid var(--yellow-dark); color: var(--yellow-ink); font-weight: 800; }
.frame-example { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--yellow-soft); line-height: 1.6; }
.switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 800; cursor: pointer; }
.switch input { appearance: none; width: 46px; height: 26px; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; flex-shrink: 0; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF; transition: left 120ms ease; }
.switch input:checked { background: var(--violet); }
.switch input:checked::after { left: 23px; }
.anno { display: flex; flex-direction: column; }
.anno-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 8px 24px; padding: 12px 0; border-top: 2px solid var(--line); }
.anno-row:first-child { border-top: 0; }
.anno-text { font-size: 1.0625rem; line-height: 1.8; }
.anno-no { color: var(--coral-ink); font-weight: 900; font-size: 0.75rem; margin-left: 2px; }
.anno-labels { display: flex; flex-direction: column; gap: 6px; padding-left: 26px; list-style: decimal; color: var(--muted); font-size: 0.9375rem; line-height: 1.45; border-left: 2px solid var(--line); margin-left: 0; }
.anno-labels li { padding-left: 2px; }
.anno-labels li::marker { color: var(--coral-ink); font-weight: 900; }
.annotated:has(.show-labels:not(:checked)) .anno-labels, .annotated:has(.show-labels:not(:checked)) .anno-no { display: none; }
.annotated:has(.show-labels:not(:checked)) .anno-row { grid-template-columns: minmax(0, 1fr); }
.levels { display: flex; flex-wrap: wrap; gap: 8px; }
.level-tab { display: inline-flex; flex-direction: column; gap: 0; padding: 8px 18px; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--surface); cursor: pointer; line-height: 1.25; }
.level-tab span { font-size: 0.8125rem; color: var(--muted); font-weight: 700; }
.levels input:checked + .level-tab { border-color: var(--violet); background: var(--violet-soft); box-shadow: 0 3px 0 var(--violet); }
.levels input:focus-visible + .level-tab { outline: 3px solid var(--violet); outline-offset: 3px; }
.level-panes { flex-basis: 100%; }
.level-pane { display: none; flex-direction: column; gap: 14px; padding: 18px 20px; border-radius: 18px; border: 2px solid var(--line); margin-top: 6px; }
.levels input:nth-of-type(1):checked ~ .level-panes .level-pane:nth-child(1),
.levels input:nth-of-type(2):checked ~ .level-panes .level-pane:nth-child(2),
.levels input:nth-of-type(3):checked ~ .level-panes .level-pane:nth-child(3),
.levels input:nth-of-type(4):checked ~ .level-panes .level-pane:nth-child(4) { display: flex; }
.level-why { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 14px; background: var(--tint); }
.chip-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px 24px; }
.chip-group { display: flex; flex-direction: column; gap: 8px; }
.worked-list { display: flex; flex-direction: column; gap: 14px; }
.worked-list > li { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 2px solid var(--line); border-radius: 16px; }
.worked-list .worked p { margin: 0; }
.guide-link { border: 2px dashed var(--line); border-radius: 14px; }
.word-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.word-chips li { padding: 4px 11px; border-radius: 9px; background: #F0EFF5; font-weight: 700; font-size: 0.9375rem; }
.word-chips li.best, .word-key { background: var(--yellow-soft); border: 2px solid #F0C36B; color: var(--yellow-ink); font-weight: 900; }
.word-key { display: inline-block; width: 16px; height: 16px; border-radius: 5px; vertical-align: -3px; }
@media (max-width: 760px) {
  .facts.wide > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .frames li { grid-template-columns: 30px minmax(0, 1fr); }
  .frames .frame-text { grid-column: 2; }
  .anno-row { grid-template-columns: minmax(0, 1fr); }
  .anno-labels { border-left: 0; padding: 10px 12px 10px 34px; border-radius: 12px; background: var(--tint); }
  .level-pane { padding: 14px; }
}
.facts.wide { grid-template-columns: minmax(0, 1fr); }
.facts.wide > div { background: none; border-radius: 0; padding-left: 0; padding-right: 0; }
.facts.wide dt { color: var(--ink); font-size: 1rem; text-transform: none; letter-spacing: 0; }
.facts.wide dd { font-size: 1rem; }

/* ---- Foxy: the coach bubble, the voice switch, and the count before recording ---- */
.coach { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 18px; background: var(--yellow-soft); border: 2px solid #F0C36B; }
.coach[hidden] { display: none; }
.coach-face { flex: none; width: 40px; height: 40px; }
.coach-text { flex: 1; margin: 0; font-weight: 800; line-height: 1.4; color: var(--ink); }
.coach-play { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 18px; background: #fff; color: var(--violet); font: inherit; font-weight: 900; font-size: 0.875rem; cursor: pointer; }
.coach-play[hidden] { display: none; }
.coach-play svg { width: 16px; height: 16px; }
.coach.pop { animation: coach-pop 0.28s ease-out; }
@keyframes coach-pop { from { transform: translateY(4px) scale(0.98); opacity: 0.4; } to { transform: none; opacity: 1; } }
.deck > .coach, [data-lesson] > .coach, [data-writing] > .coach, [data-speaking] > .coach { margin-bottom: 4px; }
.wizard .coach { margin-top: -4px; }
.pulse { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(109, 40, 217, 0.45); } 50% { box-shadow: 0 0 0 10px rgba(109, 40, 217, 0); } }
.voice-toggle.round { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 2px solid var(--line-strong); border-radius: 50%; background: #fff; color: var(--violet); cursor: pointer; position: relative; }
.voice-toggle[hidden] { display: none; }
.voice-toggle svg { width: 18px; height: 18px; }
.voice-toggle[aria-pressed="false"] { color: #8A85A0; }
.voice-toggle.round[aria-pressed="false"]::after { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; background: currentColor; transform: rotate(-45deg); border-radius: 2px; }
.try-it { display: block; }
.try-it[hidden] { display: none; }
.try-it input { width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid var(--line-strong); border-radius: 14px; font: inherit; font-weight: 700; background: #fff; }
.try-it input:focus { outline: 3px solid rgba(109, 40, 217, 0.35); border-color: var(--violet); }
.yours { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0; padding: 8px 12px; border-radius: 12px; background: #F0EFF5; font-weight: 700; }
.yours[hidden] { display: none; }
.yours-label { font-size: 0.8125rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.yours.g2 { background: var(--mint-soft); }
.yours.g1 { background: var(--yellow-soft); }
.yours.g0 { background: var(--coral-soft, #FDE8E4); }
.btn.grade.suggested { outline: 3px solid var(--violet); outline-offset: 2px; }
.count-in { font-size: 5rem; line-height: 1; color: var(--violet); }
.btn.counting { background: var(--yellow-soft); color: var(--yellow-ink); border-color: #F0C36B; }
@media (prefers-reduced-motion: reduce) { .coach.pop, .pulse { animation: none; } .pulse { outline: 3px solid var(--violet); } }
.voice-toggle.round.small { width: 32px; height: 32px; border-color: #F0C36B; }
@media (max-width: 760px) { header.top .voice-toggle, .land-top .voice-toggle { display: none; } .coach { gap: 8px; padding: 8px 10px; } .coach-face { width: 32px; height: 32px; } }
.coach.quiet .coach-play, .coach.quiet .voice-toggle { display: none; }

/* ---- grammar games ---- */
.gstep .eyebrow { margin: 0; }
.gsentence { margin: 0; font-size: 1.375rem; font-weight: 800; line-height: 1.7; overflow-wrap: anywhere; }
.gblank { display: inline-block; width: 64px; height: 1.1em; margin: 0 4px; border-bottom: 4px solid var(--violet); vertical-align: text-bottom; }
.gwrong { padding: 0 6px; border-radius: 8px; background: var(--coral-soft); color: var(--coral-ink); text-decoration: underline wavy; text-underline-offset: 4px; }
.gword { margin: 0 -2px; padding: 2px 4px; border: 0; border-bottom: 3px solid transparent; border-radius: 8px; background: none; font: inherit; color: inherit; cursor: pointer; }
.tappable .gword:hover:not(:disabled), .tappable .gword:focus-visible { background: #fff; border-bottom-color: var(--violet); outline: none; }
.gword:disabled { cursor: default; }
.gword.miss { background: var(--coral-soft); color: var(--coral-ink); }
.gword.found { background: var(--mint-soft); }
.gword.shown { background: var(--yellow-soft); }
.gword s { opacity: 0.55; }
.gword strong { color: var(--mint-ink); }
.gword.shown strong { color: var(--yellow-ink); }
.gopts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.gopts.stacked { grid-template-columns: 1fr; }
.gopt { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px; border: 2px solid var(--line-strong); border-bottom-width: 4px; border-radius: 16px; background: #fff; font: inherit; font-weight: 800; color: var(--ink); text-align: left; cursor: pointer; }
.gopt:hover:not(:disabled) { border-color: var(--violet); }
.gopt:disabled { cursor: default; }
.gopt.right { background: var(--mint-soft); border-color: var(--mint-dark); }
.gopt.wrong { background: var(--coral-soft); border-color: var(--coral-dark); }
.gkey { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 8px; background: var(--tint); color: var(--muted); font-size: 0.75rem; font-weight: 900; }
.gwhy { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--tint); }
.gwhy[hidden] { display: none; }
.gwhy p { margin: 0; }
.gright { font-weight: 800; }
.gmail { padding: 16px; border-radius: 14px; background: var(--tint); font-size: 1.125rem; line-height: 2; }
.gmail p { margin: 0 0 6px; }
.gfound { margin: 0; font-weight: 700; }
.gmisses { margin-left: 12px; color: var(--coral-ink); }
.gwhys { display: flex; flex-direction: column; gap: 6px; }
.gwhys li { padding: 8px 12px; border-radius: 12px; background: var(--mint-soft); }
.gwhys li.shown { background: var(--yellow-soft); }
.chip.combo { background: var(--coral-soft); color: var(--coral-ink); }
.chip.combo[hidden] { display: none; }
.stars { display: inline-flex; gap: 2px; }
.star { display: inline-flex; color: #D9D0F5; }
.star svg { width: 22px; height: 22px; }
.star.on { color: #F5B301; }
.gstars { display: flex; justify-content: center; gap: 10px; }
.gstars .star svg { width: 60px; height: 60px; }
.gstars .star.on { animation: star-pop 0.45s ease-out both; }
.gstars .star.on:nth-child(2) { animation-delay: 0.15s; }
.gstars .star.on:nth-child(3) { animation-delay: 0.3s; }
@keyframes star-pop { from { transform: scale(0.3) rotate(-30deg); opacity: 0; } 70% { transform: scale(1.2); } to { transform: none; opacity: 1; } }
.level-no { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; background: var(--violet); color: #fff; font-weight: 900; }
.glevel-card .muted svg { width: 14px; height: 14px; vertical-align: -2px; }
.grade-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.flash-right .gstep { border-color: var(--mint-dark); }
.flash-wrong .gstep { border-color: var(--coral-dark); }
@media (max-width: 760px) { .gsentence { font-size: 1.1875rem; } .gmail { padding: 12px; font-size: 1.0625rem; } }
@media (prefers-reduced-motion: reduce) { .gstars .star.on { animation: none; } }

/* ---- Reading school: practice rounds under a lesson ---- */
.lesson-cell { display: flex; flex-direction: column; gap: 6px; }
.rounds { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 12px 4px; }
.round { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 10px; border: 2px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--ink); font-weight: 800; font-size: 0.875rem; text-decoration: none; white-space: nowrap; }
.round:hover { border-color: var(--violet); }
.round.done { background: var(--mint-soft); border-color: var(--mint-dark); }
.round-score { font-weight: 700; color: var(--muted); }
@media (max-width: 760px) { .rounds { padding-left: 12px; } }

/* ---- hubs: a few tiles, one job each ---- */
.hub-tile { justify-content: space-between; }
.hub-tile .row.end { margin-top: auto; }
.view-switch { margin: -4px 0 4px; }

/* ---- completing things, and Progress by category ---- */
.done-form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.done-form .btn svg, .done-form .badge svg { width: 16px; height: 16px; }
.done-form .badge { display: inline-flex; align-items: center; gap: 4px; }
.overall-pct { display: flex; flex-direction: column; align-items: flex-end; }
.overall-pct strong { font-size: 2.25rem; line-height: 1; color: var(--violet); }
.catalogue { gap: 10px; }
.cat-group { padding: 0; }
.cat-group summary { display: flex; align-items: center; gap: 16px; padding: 16px 20px; cursor: pointer; list-style: none; }
.cat-group summary::-webkit-details-marker { display: none; }
.cat-group summary progress { flex: 1; min-width: 60px; }
.cat-name { display: flex; flex-direction: column; min-width: 190px; }
.cat-pct { min-width: 48px; text-align: right; font-weight: 900; color: var(--violet); }
.cat-rows { display: flex; flex-direction: column; gap: 6px; padding: 0 16px 16px; }
.cat-rows li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 12px; border-radius: 14px; background: var(--tint); }
.cat-rows li.done { background: var(--mint-soft); }
.cat-rows .lib-text { display: flex; flex-direction: column; }
.send-off { align-items: center; text-align: center; background: var(--yellow-soft); border: 2px solid #F0C36B; }
.send-off .lead { max-width: 56ch; margin: 0; }
@media (max-width: 760px) { .cat-group summary { flex-wrap: wrap; gap: 8px; padding: 14px; } .cat-name { min-width: 0; flex: 1 1 100%; } .cat-rows li { flex-wrap: wrap; } }

/* ---- AI feedback on a written answer ---- */
.ai-level { margin: 0; font-size: 1.5rem; font-weight: 800; }
.ai-level strong { font-size: 2.5rem; line-height: 1; color: var(--violet); }
.ai-criteria { display: flex; flex-direction: column; gap: 8px; }
.ai-criteria li { display: grid; grid-template-columns: minmax(150px, 220px) 44px 1fr; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--tint); }
.ai-name { font-weight: 800; }
.ai-mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--violet); color: #fff; font-weight: 900; }
.ai-speech { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ai-speech li { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 14px; background: var(--violet-soft); }
.ai-speech strong { font-size: 1.25rem; font-weight: 900; color: var(--violet-dark); }
.ai-criteria li.unmarked .ai-mark { background: #D9D6E5; color: var(--muted); }
.ai-criteria li.unmarked .ai-name, .ai-criteria li.unmarked .ai-comment { color: var(--muted); }
@media (max-width: 760px) { .ai-speech { grid-template-columns: 1fr; } }
.ai-block { gap: 10px; padding-top: 6px; }
.ai-block > .muted { margin: 0; }
.ai-plan .frame-label { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; line-height: 1.35; }
.ai-part { display: flex; flex-direction: column; gap: 6px; }
.ai-part p, .ai-fixes p { margin: 0; }
.ai-wants { line-height: 2; }
.ai-found { color: var(--muted); }
.ai-found q { font-style: italic; }
.ai-plan li.good .ai-found { color: var(--ink); }
.ai-marked { padding: 14px 16px; border-radius: 14px; background: var(--tint); line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-spot { padding: 2px 4px; border-radius: 6px; background: var(--coral-soft); border-bottom: 2px solid var(--coral); color: inherit; }
.ai-spot sup { margin-left: 3px; padding: 0 5px; border-radius: 8px; background: var(--coral-ink); color: #fff; font-size: 0.6875rem; font-weight: 900; line-height: 1.5; vertical-align: super; }
.ai-fixes { display: flex; flex-direction: column; gap: 10px; }
.ai-fixes li { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); }
.ai-fix-head { gap: 8px; align-items: center; }
.ai-quote q { font-style: italic; background: var(--coral-soft); padding: 0 4px; border-radius: 6px; }
.ai-better { padding: 6px 10px; border-radius: 10px; background: var(--mint-soft); }
.ai-next p { margin: 0; }
.ai form { margin: 0; }
.ai-thinking { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.ai-thinking-head { margin: 0; font-weight: 900; font-size: 1.125rem; }
.ai-steps { display: flex; flex-direction: column; gap: 8px; }
.ai-steps li { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--muted); animation: coach-pop 0.25s ease-out; }
.ai-steps li::before { content: ""; width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; border: 3px solid var(--violet-soft); border-top-color: var(--violet); animation: ai-spin 0.8s linear infinite; }
.ai-steps li.done { color: var(--ink); }
.ai-steps li.done::before { content: "\2713"; display: inline-flex; align-items: center; justify-content: center; border: 0; background: var(--mint-soft); color: var(--mint-ink); font-size: 0.75rem; font-weight: 900; animation: none; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ai-steps li, .ai-steps li::before { animation: none; } }
@media (max-width: 760px) { .ai-criteria li { grid-template-columns: 1fr 44px; } .ai-comment { grid-column: 1 / -1; } .ai-plan .frame-label { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; } }
