/* The pages of DTT Practice. Colours come only from theme.css. */

body { margin: 0; background: var(--bg); min-height: 100vh; }
a { color: var(--brand); }
[hidden] { display: none !important; }
/* No text on the site can be selected to copy (typing boxes still can). */
html { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
/* The questions' pictures (simulations and signs): no dragging or printing, and blurred while a screenshot shortcut
   is held (protect.js). */
.protected img, .protected svg, .protected canvas { -webkit-user-drag: none; }
.screen-hidden .protected { filter: blur(24px); }
@media print {
  .protected { visibility: hidden !important; }
}

/* ---- Header ---------------------------------------------------------------------------------------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px max(16px, calc((100% - 920px) / 2 + 16px));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.wordmark img { display: block; width: 36px; height: 50px; }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 14px; }
.header-link { color: var(--text); font-size: 0.92rem; font-weight: 600; text-decoration: none; }
.header-link:hover { color: var(--accent); }
.plan-badge { padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: var(--tint); color: var(--tint-text); }
.theme-toggle, .header-pill, .pill, .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.theme-toggle, .header-pill { padding: 6px 12px; font-size: 0.85rem; } /* the pills in the header: Sign out, Light / Dark */
.pill, .back-link { padding: 8px 16px; font-size: 0.92rem; box-shadow: var(--shadow); }
:is(.theme-toggle, .header-pill, .pill, .back-link):hover { border-color: var(--accent); }
.pill .count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--tint); color: var(--tint-text); font-size: 0.78rem; }

/* Arrows in buttons and links nudge the way they point while pointed at. */
.arrow { display: inline-block; }
:is(a, button):is(:hover, :focus-visible) .arrow { animation: arrow-nudge 0.7s ease-in-out infinite; }
:is(a, button):is(:hover, :focus-visible) .arrow.back { animation-name: arrow-nudge-back; }
@keyframes arrow-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
@keyframes arrow-nudge-back { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-4px); } }

/* ---- The bar under the header: title, progress or timer, the way back -------------------------------- */
.bar {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "title middle back";
  align-items: center;
  gap: 12px 24px;
  padding: 24px 16px 0;
  box-sizing: border-box;
}
.bar .title-group { grid-area: title; }
.bar-middle { grid-area: middle; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar > .back-link, .bar > .pill, .bar-actions { grid-area: back; justify-self: end; }
.bar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.bar h1 { margin: 0; font-size: 1.6rem; letter-spacing: -0.02em; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--brand);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); opacity: 0.85; }
.progress { color: var(--muted); font-size: 0.85rem; font-weight: 600; text-align: center; }
.run-bar { width: min(280px, 60vw); height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.run-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width 0.25s ease; }
.timer { font-size: 2rem; letter-spacing: -0.02em; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer.low { color: var(--wrong); }
@media (max-width: 700px) {
  .bar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title back" "middle middle"; padding: 14px 16px 0; }
  .bar h1 { font-size: 1.25rem; }
  .run-bar { width: 100%; }
  .bar-middle { width: 100%; }
}

/* ---- Cards and buttons ------------------------------------------------------------------------------- */
main { max-width: 920px; margin: 0 auto; padding: 24px 16px 48px; box-sizing: border-box; }
/* While questions are asked, the page can always scroll the site's header out of sight (QuestionView.fillScreen). */
body.in-run { min-height: calc(100vh + var(--header-h, 0px)); min-height: calc(100dvh + var(--header-h, 0px)); }
main.hero { max-width: none; padding: 0; }
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
.panel h2 { margin-top: 0; letter-spacing: -0.02em; }
.panel p { color: var(--muted); }
@media (max-width: 700px) { .panel { padding: 22px 16px; } }
/* A panel its page's script fills (aria-busy until then) stays out of sight while still empty, rather than showing an
   empty card while the loading spinner (spinner.css) turns. */
[aria-busy="true"]:empty { visibility: hidden; }
/* A signed-in page (data-loading on its body, js/account.js) shows nothing until its account and what it needs from the
   server are in, rather than its titles and panels without their words: coming from another page of the site, that page
   stays on the screen meanwhile, with the loading spinner. */
body[data-loading] > :is(.site-header, .bar, .hero, main, section, footer) { visibility: hidden; }
.btn {
  font: inherit;
  font-weight: 650;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 10px 20px;
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
  white-space: nowrap;
}
.btn:disabled { cursor: default; opacity: 0.6; }
a.btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn.danger { background: var(--danger-fill); color: #fff; border-color: var(--danger-fill); }
.btn.flag.on { border-color: var(--flag); color: var(--flag-text); }
.link-btn { background: none; border: none; color: var(--muted); font: inherit; font-size: 0.9rem; text-decoration: underline; cursor: pointer; padding: 0; }
kbd { border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; font-size: 0.85em; }
.hint { text-align: center; color: var(--muted); font-size: 0.9rem; margin: 18px 0 0; }
.allowance { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 14px; }
.allowance a { font-weight: 650; }

/* ---- A question -------------------------------------------------------------------------------------- */
.question-text { font-size: 1.2rem; font-weight: 650; line-height: 1.45; margin: 0 0 18px; color: var(--text) !important; }
/* the options, with Flag and Listen under them; Listen reads the question aloud and is pressed while it speaks */
.answers { display: grid; gap: 14px; min-width: 0; }
.question-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.question-tools .btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 0.85rem; }
.btn.listen[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
/* the picture above, the options under it two by two (owner, 2026-11-03); a question without a picture lists them */
.question-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.question-body > .figure { width: 100%; max-width: 260px; margin: 0 auto; }
.question-body:not(.text-only) .options:not(.signs) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.figure { background: #0f1114; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; justify-content: center; }
.figure svg { width: 100%; height: auto; display: block; }
.options { display: grid; gap: 10px; }
.options.signs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.options.signs .option { flex-wrap: wrap; }
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 550;
  line-height: 1.35;
  white-space: normal;
}
.option:not(:disabled, .correct, .wrong):hover { border-color: var(--accent); } /* a right or wrong mark keeps its colour */
.option:disabled { cursor: default; opacity: 1; }
.option .letter { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--tint); color: var(--tint-text); font-weight: 700; font-size: 0.9rem; }
.option .sign-option { width: 96px; height: 96px; }
.option .sign-option svg { width: 100%; height: 100%; }
/* A road marking or a hand signal: a wider picture; a traffic situation shows small road users: wider still. */
.question-body.scene > .figure { max-width: 420px; }
.question-body.situation > .figure { max-width: 560px; }
.options.scenes { grid-template-columns: repeat(2, minmax(0, 280px)); justify-content: center; }
.options.scenes .option { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px; }
.options.signs.scenes .option .mark { margin-left: 0; padding-left: 0; flex-basis: auto; }
.option .marking-option, .option .signal-option { display: block; overflow: hidden; border-radius: 10px; }
.option .marking-option svg, .option .signal-option svg { width: 100%; height: auto; display: block; }
.option.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.option.selected .letter { background: var(--accent); color: var(--accent-text); }
.option.correct { border-color: var(--correct); box-shadow: 0 0 0 1px var(--correct) inset; background: color-mix(in srgb, var(--correct) 12%, var(--surface)); }
.option.correct .letter { background: var(--ok-text); color: var(--surface); }
.option.wrong { border-color: var(--wrong); box-shadow: 0 0 0 1px var(--wrong) inset; background: color-mix(in srgb, var(--wrong) 12%, var(--surface)); }
.option.wrong .letter { background: var(--wrong); color: var(--surface); }
.option .mark { margin-left: auto; padding-left: 8px; font-weight: 700; font-size: 0.9rem; }
.option.correct .mark { color: var(--ok-text); }
.option.wrong .mark { color: var(--wrong); }
.explanation { margin-top: 20px; padding: 16px 18px; border-radius: 14px; background: var(--surface-2); border-left: 4px solid var(--accent); line-height: 1.55; }
.hint-row { margin-top: 16px; }
.explanation h3 + p + h3 { margin-top: 12px; }
.explanation h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 0.95rem; color: var(--text); }
.explanation h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.explanation p { margin: 0; color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 0.85rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.question-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.question-actions .btn.primary { margin-left: auto; }
@media (max-width: 700px) {
  .question-body:not(.text-only) .options:not(.signs) { grid-template-columns: minmax(0, 1fr); } /* too narrow for two */
  .option .sign-option { width: 72px; height: 72px; }
  .options.signs .option { gap: 8px; padding: 12px; }
  .options.signs .option .mark { margin-left: 0; padding-left: 0; flex-basis: 100%; }
}

/* ---- A simulation (sim-player.js): the scene full width above the options, the view switch over it, and after the
   answer, what happened with the answers to watch. The scene and its sat-nav keep their own colours. ---------- */
.question-body.sim > .figure { max-width: none; }
.figure.sim-figure { display: block; background: none; border: 0; border-radius: 0; overflow: visible; }
.sim-views { display: flex; width: max-content; margin: 0 0 10px auto; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.sim-views button { border: 0; background: none; color: var(--text); font: inherit; font-size: 0.85rem; font-weight: 600; padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.sim-views button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.sim-stage { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #0f1114; }
.sim-stage canvas { display: block; width: 100%; height: 100%; }
.sim-stage .satnav { position: absolute; top: 12px; left: 12px; display: flex; gap: 10px; align-items: center; padding: 8px 12px 8px 8px; border: 1px solid rgb(255 255 255 / 0.18); border-radius: 14px; background: rgb(16 24 32 / 0.82); color: #fff; }
.sim-stage .satnav[hidden] { display: none; }
.sim-stage .satnav svg { flex: none; width: 46px; height: 46px; } /* not the figure's full-width pictures */
.sim-stage .satnav :is(b, span) { white-space: nowrap; }
.sim-stage .satnav b { display: block; font-size: 1rem; }
.sim-stage .satnav span { font-size: 0.78rem; color: #c6d2dc; }
/* the green arrow nudges the way to go, like the arrows on the site's buttons */
.sim-stage .satnav .go { animation: satnav-nudge 0.7s ease-in-out infinite; }
@keyframes satnav-nudge { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(var(--dx), var(--dy)); } }
.sim-missing { padding: 16px; color: var(--muted); }
.sim-panel { display: block; width: 100%; height: auto; margin-top: 6px; } /* the instrument panel, under the scene on a phone */
@media (prefers-reduced-motion: reduce) { .sim-stage .satnav .go { animation: none; } }
@media (max-width: 700px) {
  .sim-stage .satnav { top: 8px; left: 8px; padding: 5px 9px 5px 5px; gap: 6px; border-radius: 10px; }
  .sim-stage .satnav svg { width: 30px; height: 30px; }
  .sim-stage .satnav b { font-size: 0.85rem; }
  .sim-stage .satnav span { display: none; }
}
/* A phone: the sat-nav shows only its arrow, so it hides little of the road. */
@media (max-width: 480px) {
  .sim-stage .satnav { padding: 4px; }
  .sim-stage .satnav svg { width: 26px; height: 26px; }
  .sim-stage .satnav div { display: none; }
}
/* A touch screen has no keyboard to answer with. */
@media (hover: none) and (pointer: coarse) {
  #keys-hint, #mock-hint { display: none !important; }
}

/* ---- Dialogs: the law behind an answer, the question grid on phones, confirmations --------------------- */
dialog.sheet {
  width: min(620px, calc(100% - 24px));
  box-sizing: border-box;
  margin-top: 70px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
dialog.sheet::backdrop { background: var(--backdrop); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet-head h2 { margin: 0; font-size: 1.25rem; }
.sheet p { color: var(--text); line-height: 1.6; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.sheet-actions .btn { max-width: 100%; white-space: normal; } /* a long label wraps on a narrow phone, not past the edge */
.law-refs { display: grid; margin: 0 0 14px; }
.law-refs div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.law-refs dt { color: var(--muted); font-weight: 650; font-size: 0.85rem; }
.law-refs dd { margin: 0; line-height: 1.45; }
.law-refs a { font-weight: 650; }
.law-refs span { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 3px; }
.law-note { color: var(--muted) !important; font-size: 0.85rem; }
.sheet textarea { width: 100%; box-sizing: border-box; min-height: 110px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; }
@media (max-width: 700px) { .law-refs div { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* ---- Mock test --------------------------------------------------------------------------------------- */
.mock-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 20px; align-items: start; }
.review { padding: 20px; }
.review h2 { font-size: 1rem; margin: 0 0 12px; }
.grid40 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.grid40 button { position: relative; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: none; font: inherit; font-size: 0.85rem; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; cursor: pointer; }
.grid40 .done { background: var(--tint); color: var(--tint-text); border-color: transparent; }
.grid40 .current { border: 2px solid var(--accent); color: var(--text); }
.grid40 .flagged::after { content: ""; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--flag); }
.grid40 .right { border-color: var(--correct); }
.grid40 .wrong { border-color: var(--wrong); }
.legend40 { display: grid; gap: 6px; margin: 14px 0 16px; font-size: 0.8rem; color: var(--muted); }
.legend40 i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; border: 1px solid var(--border); }
.legend40 .l-done { background: var(--tint); border-color: var(--tint-text); }
.legend40 .l-flag { background: var(--flag); border-color: transparent; border-radius: 50%; }
.grid-actions { display: grid; gap: 8px; }
.review .btn, dialog .grid-actions .btn { width: 100%; }
dialog .grid40 button { height: 40px; }
.nav-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.nav-tools { display: flex; gap: 8px; }
.nav-row .listen { display: inline-flex; align-items: center; gap: 6px; }
.phone-only { display: none !important; }
@media (max-width: 700px) {
  .phone-only { display: inline-flex !important; }
  .mock-layout { grid-template-columns: minmax(0, 1fr); }
  .mock-layout .review { display: none; }
  .nav-row { gap: 8px; }
  .nav-row .btn { padding: 10px 14px; }
  .nav-row .listen-label { display: none; } /* the icon alone, so Previous, Flag, Listen and Next fit one row */
}

/* ---- Results ----------------------------------------------------------------------------------------- */
.result-head { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; }
.big-score { font-size: 3.4rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.big-score small { font-size: 1.4rem; color: var(--muted); font-weight: 700; }
.badge { display: inline-block; padding: 6px 14px; border-radius: 999px; font-weight: 700; }
.badge.pass { background: var(--pass-bg); color: var(--pass-text); }
.badge.fail { background: var(--fail-bg); color: var(--fail-text); }
.verdict p { margin: 8px 0 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 24px 0 8px; text-align: center; }
.stats div { border: 1px solid var(--border); border-radius: 8px; padding: 14px 8px; }
.stats dt { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.stats dd { margin: 4px 0 0; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.section-label { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 650; color: var(--brand); margin: 24px 0 0; }
.section-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.categories { margin-top: 14px; display: grid; gap: 14px; }
.cat-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) 56px; gap: 14px; align-items: center; }
.cat-row .name { font-weight: 600; }
.cat-row .track { height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; }
.cat-row .fill { display: block; height: 100%; border-radius: inherit; background: var(--series-1); }
.cat-row .fill.weak { background: var(--flag); }
.cat-row .count { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.fact { margin: 22px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--fact-bg); color: var(--fact-text) !important; font-weight: 600; display: inline-block; }
.center { text-align: center; }
.result-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 20px 0 16px; }
.result-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 14px; text-align: left; line-height: 1.3; }
.review-list { display: grid; gap: 16px; margin-top: 24px; }
@media (max-width: 700px) {
  .cat-row { grid-template-columns: minmax(0, 1fr) 56px; }
  .cat-row .track { grid-column: 1 / -1; grid-row: 2; }
}

/* ---- All tests (the topics, their tests and the simulation) --------------------------------------------------------------------- */
.hub-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.hub-card h2 { margin: 4px 0 6px; font-size: 1.3rem; }
.hub-card p { margin: 0 0 6px; max-width: 60ch; }
.hub-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; flex: none; }
.hub-actions .pill { justify-content: center; box-shadow: none; }
.btn.locked { opacity: 0.55; }
/* The cards, as CST Practice's: one per row, the picture on the left (on top on a phone), Open at the foot. */
.test-card { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.test-card + .test-card { margin-top: 20px; }
.cards { margin-bottom: 20px; }
.card-preview { display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--card-picture-bg); min-height: 150px; }
.clock-preview { color: var(--text); font-weight: 800; font-size: 2.6rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.card-preview.fill { position: relative; padding: 0; min-height: 190px; } /* a drawing covers the picture */
.card-preview.fill > :is(svg, canvas) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* Road signs: three signs overlapping, each a little turned */
.sign-stack { position: relative; width: 190px; height: 130px; }
.sign-stack .preview-sign { position: absolute; width: 92px; height: 92px; filter: drop-shadow(0 6px 10px rgb(0 0 0 / 0.45)); }
.sign-stack .preview-sign:nth-child(1) { left: 0; top: 26px; transform: rotate(-12deg); }
.sign-stack .preview-sign:nth-child(2) { left: 50px; top: 0; transform: rotate(3deg); }
.sign-stack .preview-sign:nth-child(3) { left: 98px; top: 30px; transform: rotate(11deg); }
.card-body { display: flex; flex-direction: column; padding: 22px 24px 18px; }
.card-body h2 { margin: 0 0 4px; font-size: 1.35rem; letter-spacing: -0.02em; }
.card-tag { margin: 0 0 12px; font-size: 0.9rem; font-weight: 600; color: var(--brand); }
.card-text { margin: 0; color: var(--muted); line-height: 1.6; }
.card-last { margin: 10px 0 0; color: var(--muted); font-size: 0.9rem; }
/* a topic's share of the simulation of the test */
.card-share { margin: 10px 0 0; color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.card-meter { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; margin-top: 14px; }
.card-meter span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.card-stats { display: flex; justify-content: space-between; margin: 6px 0 0; color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.card-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; }
.card-modes { color: var(--muted); font-size: 0.85rem; }
@media (max-width: 640px) { .test-card { grid-template-columns: 1fr; } }
/* A topic's start page, as CST Practice's: the test's time in the bar, the panel centred. */
.durations { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
/* each choice's radio, invisible, covers it, so a tap lands on the radio itself (Safari on an iPhone does not pass a tap
   on the label to a radio that takes no pointer events) */
.durations label { position: relative; }
.durations input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.durations span { display: block; padding: 6px 14px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.durations input:checked + span { background: var(--accent); color: var(--accent-text); }
.durations input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -4px; }
.durations input:disabled + span { cursor: not-allowed; opacity: 0.5; }
.durations.locked input:disabled + span { cursor: pointer; } /* the free plan: a click leads to the plans */
.start-panel { padding: 32px; text-align: center; }
.start-panel h2 { margin-top: 0; font-size: 1.5rem; letter-spacing: -0.02em; }
.start-panel > p { color: var(--muted); max-width: 52ch; margin: 0 auto 12px; line-height: 1.55; }
.start-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 12px; }
.start-buttons .btn { margin-top: 0; min-width: 160px; justify-content: center; }
/* Under the start buttons, as CST Practice's: links on to the learner's own questions (My mistakes). */
.progress-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 14px 0 22px; }
.btn.progress-link { padding: 8px 18px; font-size: 0.95rem; color: var(--brand); }
.btn.progress-link:hover { border-color: var(--accent); }
.start-panel .mode-help { max-width: none; margin: 0 0 4px; font-size: 0.85rem; text-align: left; }
.start-panel .mode-help + .mode-help { margin-top: 10px; }
.start-panel .start-buttons + .mode-help { margin-top: 16px; }
.start-panel .locked-note { margin-top: 16px; }
.locked-note { font-size: 0.85rem; color: var(--muted); }
/* ---- A topic's Your progress and Where you struggle (topic.js, charts.js), as CST Practice's results pages ---- */
.panel.subpage p.eyebrow { margin: 20px 0 6px; }
.panel.subpage h2 { margin: 0 0 16px; }
.btn.back-button { padding: 6px 12px; font-size: 0.9rem; color: var(--muted); }
.btn.back-button:hover { color: var(--text); }
.report-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; }
.report-row .notice { margin: 0; }
.stats dd small { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.history-note { margin: 16px 0 0; color: var(--muted); font-size: 0.85rem; }
.charts { display: grid; gap: 20px; margin-top: 8px; }
.chart { margin: 0; }
.chart figcaption { margin-bottom: 4px; font-size: 0.95rem; font-weight: 600; }
.chart-empty { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; }
.plot { position: relative; }
.plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.plot .grid { stroke: var(--grid); stroke-width: 1; }
.plot .baseline { stroke: var(--baseline); stroke-width: 1; }
.plot .tick { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.plot .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.plot .dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.plot .end-label { fill: var(--text); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.plot .mark { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 5 4; }
.plot .mark-label { fill: var(--muted); font-size: 12px; }
.plot .crosshair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.tooltip { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; gap: 2px; min-width: 120px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: var(--tooltip-shadow); font-size: 0.8rem; pointer-events: none; white-space: nowrap; }
.tooltip[hidden] { display: none; }
.tooltip .muted { margin-bottom: 2px; color: var(--muted); }
.history-table { margin-top: 20px; }
.history-table summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.table-scroll { overflow-x: auto; margin-top: 8px; }
.history-table table { width: 100%; border-collapse: collapse; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.history-table th, .history-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
.history-table th:nth-child(2), .history-table td:nth-child(2) { text-align: left; }
.insights { margin-bottom: 8px; }
.insight .eyebrow { margin: 0 0 6px; }
.hardest { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--fail-bg); color: var(--fail-text); font-size: 0.75rem; font-weight: 700; }
@media (max-width: 700px) { .hub-card { flex-direction: column; align-items: stretch; } }

/* ---- Landing and sign-in ------------------------------------------------------------------------------- */
.hero { background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-to) 100%); border-bottom: 1px solid var(--border); }
.hero-inner { max-width: 920px; margin: 0 auto; padding: 56px 16px 52px; box-sizing: border-box; }
.hero h1 { max-width: 20ch; margin: 0 0 14px; font-size: clamp(1.9rem, 5vw, 2.6rem); letter-spacing: -0.03em; line-height: 1.12; }
.lead { max-width: 60ch; margin: 0 0 22px; color: var(--muted); font-size: 1.05rem; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
/* The hero of All tests: what is ready, and the way to the plans, as small pills (as on CST Practice). */
.status-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.status-chips[hidden] { display: none; }
.status-chip { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); color: var(--ok-text); font-weight: 600; font-size: 0.9rem; }
.status-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-chips .back-link { padding: 5px 13px; font-size: 0.9rem; }
/* A band asking for something under the page (All tests: feedback about the real test). */
.page.teaser-section { padding-top: 0; }
.page:has(+ .teaser-section) { padding-bottom: 16px; }
.teaser { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-to) 100%); }
.teaser h2 { margin: 0 0 8px; letter-spacing: -0.02em; }
/* A card in the hero's colours that leads on (as CST Practice's plans teaser): the plans, on the home page and the FAQ;
   feedback, under All tests. */
.teaser p:not(.eyebrow) { max-width: 52ch; margin: 0; color: var(--muted); line-height: 1.55; }
.card-start { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-weight: 650; text-decoration: none; }
.page { max-width: 920px; margin: 0 auto; padding: 40px 16px 64px; box-sizing: border-box; }
.landing-section { margin-bottom: 56px; }
.landing-section h2 { margin: 0 0 20px; font-size: clamp(1.4rem, 3.5vw, 1.8rem); letter-spacing: -0.02em; }
.landing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.mini-card { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.mini-preview { display: flex; align-items: center; justify-content: center; gap: 14px; height: 150px; margin: -20px -20px 16px; border-radius: var(--radius) var(--radius) 0 0; background: var(--preview-bg); overflow: hidden; }
.mini-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.mini-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.landing-footer { padding: 24px 16px 40px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; text-align: center; }
.landing-footer p { margin: 0; }
.landing-footer p + p { margin-top: 6px; }
.landing-footer a { color: inherit; }
.landing-footer a:hover { color: var(--accent); }
.notice { max-width: 60ch; margin: 0 0 18px; padding: 10px 14px; border-radius: 12px; background: var(--notice-bg); color: var(--notice-text); font-size: 0.95rem; line-height: 1.5; }
/* The home page's steps and its three cards about the account, as CST Practice's. */
.steps { display: grid; gap: 12px; margin: 0; padding-left: 22px; color: var(--muted); line-height: 1.55; }
.steps strong { color: var(--text); }
.landing-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .landing-grid, .landing-trio { grid-template-columns: 1fr; } .hero-inner { padding: 32px 16px 28px; } }
.auth-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.auth { display: grid; flex: 1; place-items: center; padding: 40px 16px; }
.auth-card { width: min(460px, 100%); box-sizing: border-box; padding: 32px 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.auth-card h1 { font-size: clamp(1.5rem, 5vw, 1.9rem); text-align: center; margin-top: 0; }
.auth-lead { margin: 0 0 20px; color: var(--muted); line-height: 1.55; }
.sign-in-stack { display: flex; flex-direction: column; gap: 12px; }
.sign-in-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 18px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.sign-in-button svg { width: 18px; height: 18px; }
.sign-in-button:hover:not(:disabled) { border-color: var(--accent); }
.auth-facts { display: grid; gap: 8px; margin: 24px 0 0; padding: 20px 0 0 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

/* ---- Messages ---------------------------------------------------------------------------------------- */
.error-snackbar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(560px, calc(100% - 32px));
  box-sizing: border-box;
  padding: 12px 14px 12px 18px;
  border-radius: 14px;
  background: var(--error-bg);
  color: var(--error-text);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.25);
}
.error-snackbar p { margin: 0; flex: 1; line-height: 1.45; }
.error-snackbar button { background: none; border: none; color: inherit; font-size: 1.4rem; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; padding: 12px 18px; border-radius: 14px; background: var(--snackbar-bg); color: var(--snackbar-text); font-weight: 600; box-shadow: var(--shadow); }

/* Landing previews. */
.preview-sign { width: 88px; height: 88px; }
.preview-sign svg { width: 100%; height: 100%; display: block; }
.scene-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.preview-why { max-width: 250px; margin: 0; font-size: 0.85rem; line-height: 1.45; color: var(--text); }
.preview-why span { display: block; color: var(--brand); font-weight: 650; }
.price { font-size: 1.3rem; font-weight: 750; color: var(--text) !important; margin: 4px 0 10px !important; }
.plan-list { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.7; }
/* The plans page, signed in: the account's plan marked, with its button on to the tests. */
.mini-card.plan { display: flex; flex-direction: column; }
.mini-card.plan.current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.plan-current { align-self: flex-start; margin: 0 0 8px !important; padding: 3px 10px; border-radius: 999px; background: var(--tint); color: var(--tint-text) !important; font-size: 0.78rem; font-weight: 700; }
.plan-go { margin-top: auto; box-sizing: border-box; width: 100%; justify-content: center; }
.mini-card.plan .plan-list { margin-bottom: 16px; }
.plans { margin-top: 20px; }
.hero-actions.centered { justify-content: center; }

/* A sign in a question stands on its post by the road: a dusk sky, a hedge and the road's edge, in CSS behind the
   drawn sign (signs.js draws the sign alone, so it can also be an answer option). */
.figure.sign-figure {
  position: relative;
  box-sizing: border-box;
  padding: 16px 34px 70px;
  background:
    linear-gradient(transparent calc(100% - 34px), #34373c calc(100% - 34px)),
    linear-gradient(#3e5366 0%, #7d8f9c 60%, #2f4a2a 60%, #1d2f1b 100%);
}
.figure.sign-figure::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  bottom: 22px;
  width: 9px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #5d646c, #c9ced3 45%, #4b5158);
}
.figure.sign-figure::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 15px;
  height: 3px;
  background: repeating-linear-gradient(90deg, #d8d8d0 0 18px, transparent 18px 32px);
  opacity: 0.8;
}
.figure.sign-figure svg { position: relative; }
.report-link { margin-top: 14px; }
.landing-grid.plans + .landing-section { margin-top: 48px; }
.price-note { margin: -4px 0 14px; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.account-zone { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; }
.account-zone p { margin: 0; color: var(--muted); }
.account-zone p strong { color: var(--text); }
.dialog-report { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 6px; }
.dialog-report .notice { margin: 0; }
.delete-confirm { margin: 14px 0 4px; }
.field input { font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.btn.danger:disabled { opacity: 0.45; cursor: not-allowed; }
.faq h3 { margin: 0 0 6px; font-size: 1.05rem; }
/* Forms (contact). */
.auth-card.wide { width: min(620px, 100%); }
.signing-in .auth-card { visibility: hidden; } /* back from Google or Microsoft, on the way to the plans */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.contact-form { max-width: 680px; margin: 0 auto; padding: 24px; }
.contact-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.contact-form fieldset:disabled { opacity: 0.6; }
.form-note { margin: 0 0 20px; color: var(--muted); line-height: 1.6; }
.field { display: grid; gap: 6px; margin-bottom: 16px; font-weight: 650; }
.field select, .field textarea { font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.field textarea { min-height: 160px; resize: vertical; }
.field em { color: var(--muted); font-style: normal; font-weight: 400; }
.field-count { justify-self: end; color: var(--muted); font-size: 0.82rem; font-weight: 400; }
.faq { display: grid; gap: 12px; margin-top: 20px; }
.faq > div { padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.faq h2 { margin: 0 0 6px; font-size: 1.05rem; }
.faq p { margin: 0; color: var(--muted); line-height: 1.6; }
.faq + .teaser { margin-top: 40px; }
/* Useful links: the official pages, in groups */
.links { margin-top: 32px; }
.links h2 { margin: 0 0 12px; font-size: 1.15rem; }
.links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.links li { padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.links a { font-weight: 650; }
.links p { margin: 4px 0 0; color: var(--muted); line-height: 1.5; }

/* ---- DTT Practice Studio (studio/): its home, the second step (studio.js), the Question Editor's list and question ---- */
.studio-page { height: 100vh; display: flex; flex-direction: column; } /* the list and the question scroll, not the page */
.studio-brand { font-size: 1.05rem; font-weight: 800; }
.studio-brand img { width: 26px; height: 36px; }
.btn.studio-back { padding: 6px 12px; font-size: 0.9rem; }
.studio-home { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px; }
.studio-big { display: flex; align-items: center; justify-content: center; gap: 12px; box-sizing: border-box; width: 340px; max-width: 100%; height: 76px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); font-size: 1.25rem; font-weight: 750; text-decoration: none; box-shadow: var(--shadow); }
.studio-big:hover { border-color: var(--accent); }
.studio-big.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.studio-big.off { opacity: 0.45; cursor: default; }
.studio-note { margin-top: -10px; color: var(--muted); font-size: 0.85rem; text-align: center; }
.studio-pill { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.studio-header { padding: 10px 20px; justify-content: flex-start; }
.studio-header .header-actions { margin-left: auto; }
.studio-retired { justify-self: start; padding: 2px 8px; border-radius: 999px; background: var(--notice-bg); color: var(--notice-text); font-size: 0.75rem; font-weight: 750; }

.studio-step { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
.studio-card { width: min(420px, 100%); padding: 28px 30px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.studio-card .eyebrow { justify-content: center; }
.studio-card h1 { margin: 6px 0; font-size: 1.35rem; }
.studio-card p { margin: 0 0 16px; color: var(--muted); line-height: 1.5; }
.studio-qr { display: block; margin: 0 auto 12px; padding: 10px; border-radius: 10px; background: #fff; }
.studio-secret code { font-size: 0.9rem; }
.studio-code { display: flex; justify-content: center; gap: 8px; margin-bottom: 14px; }
.studio-code input { width: 46px; height: 56px; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font: 700 1.5rem ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; }
.studio-code input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.studio-error { color: var(--wrong); font-size: 0.9rem; }
.studio-card .btn { width: 100%; }

.studio-editor { flex: 1; min-height: 0; display: grid; grid-template-columns: 440px 1fr; grid-template-rows: minmax(0, 1fr); }
.studio-side { display: grid; grid-template-rows: auto auto 1fr auto; gap: 12px; min-height: 0; padding: 16px; border-right: 1px solid var(--border); background: var(--surface); }
.studio-filters { display: grid; gap: 10px; }
.studio-status { display: inline-flex; width: max-content; padding: 3px; border: 1px solid var(--border); border-radius: 10px; }
.studio-status button { padding: 6px 14px; border: 0; border-radius: 7px; background: none; color: var(--muted); font: inherit; font-weight: 650; font-size: 0.88rem; cursor: pointer; }
.studio-status button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.studio-status .count { margin-left: 6px; font-size: 0.78rem; opacity: 0.8; }
.studio-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.studio-kinds .pill { padding: 4px 10px; font-size: 0.82rem; }
.studio-kinds .pill[aria-pressed="true"] { border-color: var(--accent); background: var(--tint); color: var(--tint-text); }
.studio-field { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.9rem; }
.studio-field select, .studio-field input { flex: 1; min-width: 0; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.studio-count { margin: 0; color: var(--muted); font-size: 0.85rem; }
.studio-list { list-style: none; margin: 0; padding: 0; overflow: auto; border-top: 1px solid var(--border); }
.studio-list li { display: grid; grid-template-columns: 30px 1fr; align-items: start; border-bottom: 1px solid var(--border); }
.studio-list button { width: 100%; display: grid; grid-template-columns: 6.5em 1fr; gap: 4px 10px; padding: 9px 10px 9px 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 0.88rem; text-align: left; cursor: pointer; }
.studio-list .on { background: var(--tint); box-shadow: inset 3px 0 0 var(--accent); }
.studio-list .on button { color: var(--tint-text); }
.studio-tick { justify-self: center; margin: 12px 0 0; accent-color: var(--accent); }
.studio-badges { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.studio-list [data-retired] .studio-id, .studio-list [data-retired] .studio-text { opacity: 0.55; text-decoration: line-through; }
.studio-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; overflow-wrap: anywhere; }
.studio-kind { justify-self: start; padding: 2px 8px; border-radius: 999px; background: var(--tint); color: var(--tint-text); font-size: 0.75rem; font-weight: 650; }
.studio-list .studio-text { grid-column: 2; grid-row: 1 / span 2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; max-height: 2.8em; }

.studio-main { overflow: auto; padding: 18px 28px 28px; }
.studio-main > * { max-width: 900px; margin-left: auto; margin-right: auto; }
.studio-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.studio-head h2 { margin: 0; font: 700 1.15rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.studio-pos { color: var(--muted); font-size: 0.88rem; }
.studio-spacer { flex: 1; }
.btn.studio-retire { border-color: var(--wrong); color: var(--wrong); }
.studio-banner { margin-bottom: 12px; padding: 12px 16px; border-radius: 12px; background: var(--notice-bg); color: var(--notice-text); }
.studio-main.retired .question { opacity: 0.6; }
.studio-meta, .studio-explanation { margin: 0 0 10px; color: var(--muted); font-size: 0.9rem; }
.studio-explanation { margin-top: 10px; }
.studio-empty { color: var(--muted); }
.studio-check { flex: 1; overflow: auto; width: min(960px, 100%); margin: 0 auto; padding: 18px 16px 32px; box-sizing: border-box; }
.studio-check-sum { margin: 0 0 14px; }
.studio-check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.studio-check-list > li { padding: 12px 16px; border: 1px solid var(--border); border-left: 4px solid var(--correct); border-radius: 12px; background: var(--surface); }
.studio-check-list > li.bad { border-left-color: var(--wrong); }
.studio-check-list > li.odd { border-left-color: var(--notice-text); }
.studio-check-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.studio-check-list ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 0.92rem; }
.studio-check-list li.error > b { color: var(--wrong); }
.studio-check-ok { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; }
.studio-snack { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-radius: 10px; background: var(--snackbar-bg); color: var(--snackbar-text); font-weight: 700; box-shadow: var(--shadow); }
.studio-snack[hidden] { display: none; }
.studio-snack button { border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
@media (max-width: 900px) {
  .studio-page { height: auto; }
  .studio-editor { grid-template-columns: 1fr; grid-template-rows: auto; }
  .studio-side { border-right: 0; border-bottom: 1px solid var(--border); }
  .studio-list { max-height: 40vh; }
  .studio-main { padding: 16px; }
}

/* ---- The Studio's files for Claude (stage 2): the ticks under the list, History, the diff, Imports ---- */
.studio-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 0.9rem; }
.studio-ask { font-weight: 650; }
.studio-history { margin-bottom: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.studio-history h3 { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.studio-history ol { list-style: none; margin: 0; padding: 0; }
.studio-history li { display: grid; grid-template-columns: 3em 11em 1fr auto; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.studio-history li:last-child { border-bottom: 0; }
.studio-v { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; }
.studio-when { color: var(--muted); }
.studio-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.studio-actions .btn, .studio-bar .btn { padding: 6px 14px; font-size: 0.88rem; }
.studio-diff { width: 100%; margin-bottom: 14px; border-collapse: collapse; font-size: 0.9rem; }
.studio-diff th, .studio-diff td { padding: 8px 10px; border: 1px solid var(--border); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.studio-diff thead th { background: var(--surface-2); }
.studio-diff tbody th { width: 9em; color: var(--muted); font-weight: 650; }
.studio-diff ins { padding: 0 2px; border-radius: 3px; background: color-mix(in srgb, var(--correct) 22%, transparent); text-decoration: none; }
.studio-diff del { padding: 0 2px; border-radius: 3px; background: color-mix(in srgb, var(--wrong) 20%, transparent); }
.studio-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.studio-main > .studio-pair, .studio-main > .studio-diff { max-width: none; }
.studio-pair .panel { font-size: 0.85em; }
.studio-pair .question-body:not(.text-only) .options:not(.signs) { grid-template-columns: minmax(0, 1fr); } /* half the width: too narrow for two */
.studio-sub { margin: 18px 0 8px; color: var(--muted); font-size: 0.95rem; }
.studio-ok { color: var(--correct); font-size: 0.9rem; font-weight: 650; }
.studio-problems { margin-bottom: 12px; padding: 12px 16px; border: 1px solid var(--wrong); border-radius: 12px; }
.studio-problems ul { margin: 8px 0; padding-left: 20px; color: var(--wrong); }
.studio-video { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; }
.studio-video li { padding: 4px 0; }
.studio-video .ok { color: var(--correct); }
.studio-video .no { color: var(--wrong); }
.studio-badge { justify-self: start; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 0.75rem; font-weight: 650; white-space: nowrap; }
.studio-badge.new { background: color-mix(in srgb, var(--correct) 18%, transparent); color: var(--correct); }
.studio-badge.warn { background: var(--notice-bg); color: var(--notice-text); }
.studio-badge.bad { background: color-mix(in srgb, var(--wrong) 16%, transparent); color: var(--wrong); }
.studio-kind { white-space: nowrap; }
.studio-warn { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--notice-bg); color: var(--notice-text); font-size: 0.85rem; line-height: 1.4; }
.studio-file { margin: 0; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; overflow-wrap: anywhere; }
.studio-imports { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.studio-imports > .studio-main { flex: 1; }
.studio-imports .studio-editor { flex: 1; }
.studio-title { margin: 0; font-size: 1.3rem; }
.studio-drop { display: grid; place-items: center; gap: 4px; padding: 26px; border: 2px dashed var(--border); border-radius: 14px; background: var(--surface); text-align: center; cursor: pointer; }
.studio-drop.over { border-color: var(--accent); }
.studio-drop span { color: var(--muted); font-size: 0.9rem; }
.studio-table { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.studio-table li { display: grid; grid-template-columns: 11em 15em 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.studio-table li:last-child { border-bottom: 0; }
.studio-table li[data-undone] { color: var(--muted); }
.studio-sum { display: flex; flex-wrap: wrap; gap: 6px; }
.studio-note-below { margin-top: 12px; }
@media (max-width: 900px) {
  .studio-pair { grid-template-columns: 1fr; }
  .studio-table li { grid-template-columns: 1fr; }
  .studio-history li { grid-template-columns: 3em 1fr; }
}
