/* loopprep - palette and geometry taken from the step-ring logo:
 * violet accent, soft violet-tinted neutrals, rounded shapes.
 *
 * Layout follows conventions measured on LeetCode / CoderPad: floating cards on
 * a recessed page, sans-serif chrome, monospace reserved for code. */

:root {
  --app-bg: #edeaf4;
  --bg: #ffffff;
  --panel: #fbfafd;
  --panel-2: #f4f2f9;
  --border: #e3dfec;
  --text: #16141d;
  --muted: #6b6880;
  --accent: #6d28d9;
  --accent-soft: #f2ecff;
  --accent-text: #ffffff;
  --ok: #15803d;
  --ok-bg: #eaf7ef;
  --bad: #c0272d;
  --term-bg: #ffffff;
  --shadow: 0 1px 2px rgba(22, 20, 29, .05);
  --gold: #b0790a;
  --gold-text: #ffffff;
  --gold-soft: #fdf6e6;
  --gold-line: #e8d5a3;
  --scroll-thumb: #d3cde0;
  --scroll-thumb-hover: #a89fc2;
  /* The Monaco / VS Code stack: what LeetCode and CoderPad both ship. */
  --mono: Consolas, "SF Mono", SFMono-Regular, Menlo, Monaco, "Courier New", monospace;
  --code-size: 14px;
  --code-lh: 1.4;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --left-w: 34%;
  --out-h: 32%;
  --nav-w: 300px;
  --files-w: 180px;
  --gap: 8px;
  --radius: 10px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --app-bg: #08060c;
  --bg: #14111c;
  --panel: #1a1624;
  --panel-2: #221d2e;
  --border: #2b2438;
  --text: #e6e3ec;
  --muted: #8e88a0;
  --accent: #8b5cf6;
  --accent-soft: #251c3a;
  --accent-text: #ffffff;
  --ok: #4ade80;
  --ok-bg: #122a1c;
  --bad: #f87171;
  --term-bg: #100d17;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --gold: #fbbf24;
  --gold-text: #1b1405;
  --gold-soft: #1c1608;
  --gold-line: #4a3d20;
  --scroll-thumb: #332c46;
  --scroll-thumb-hover: #4c4269;
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* Class-level display rules outrank the UA style for [hidden], so pin it. */
[hidden] { display: none !important; }

/* Scrollbars: slim, palette-tinted, no chrome of their own. */
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track,
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
  background-clip: content-box;
}

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text);
  background: var(--app-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 46px;
  flex: 0 0 46px;
  background: var(--app-bg);
}

.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--accent); }
.mark { width: 22px; height: 22px; display: block; }
.wordmark { font-size: 16px; font-weight: 650; letter-spacing: -0.035em; color: var(--text); }
.wordmark span { color: var(--muted); font-weight: 550; }

.spacer { flex: 1; }
.divider { width: 1px; height: 20px; background: var(--border); flex: 0 0 1px; }

.navgroup { display: flex; align-items: center; gap: 1px; }
.navbtn {
  display: flex; align-items: center; gap: 7px;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--text); background: transparent;
  border: 1px solid transparent; border-radius: 7px;
  padding: 5px 9px; cursor: pointer;
}
.navbtn:hover { background: var(--panel-2); }
.navbtn .ico { fill: var(--muted); }

/* Held-down while the question panel is open. */
.navbtn.on {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--accent);
}
.navbtn.on .ico { fill: var(--accent); }
.navbtn.on:hover { background: var(--accent-soft); }
.ico { width: 15px; height: 15px; fill: currentColor; display: block; flex: 0 0 15px; }

/* ---------- controls ---------- */

.select {
  font: inherit; font-size: 12px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 6px;
  max-width: 130px;
}
.select-sm { font-size: 11.5px; padding: 2px 5px; }

.btn {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 11px;
  cursor: pointer;
  line-height: 1.4;
}
.btn:hover { background: var(--panel-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); border-color: var(--accent); color: var(--accent-text);
  padding: 5px 8px 5px 12px;
}
.btn-primary:hover { filter: brightness(1.1); background: var(--accent); }
.btn-primary kbd {
  font: inherit; font-size: 11px; font-weight: 500;
  line-height: 1; padding: 3px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .85);
}
.btn-primary:disabled kbd { background: rgba(255, 255, 255, .12); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--panel-2); }
.btn-sm { padding: 3px 8px; font-size: 12px; }

.icon-btn {
  font: inherit; font-size: 14px; line-height: 1;
  color: var(--muted); background: transparent;
  border: 1px solid transparent; border-radius: 7px;
  padding: 5px 7px; cursor: pointer;
  display: inline-flex; align-items: center;
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn.on { color: var(--accent); }

.badge {
  font-size: 10px; text-transform: uppercase; letter-spacing: .07em;
  font-weight: 500;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 5px; padding: 1px 5px;
}

/* ---------- cards & layout ---------- */

#main {
  position: relative;      /* containing block for the floating question rail */
  flex: 1;
  min-height: 0;
  display: flex;
  padding: 0 var(--gap) var(--gap);
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

/* The rail floats over the workspace instead of occupying a column, so opening
   it never reflows the editor. */
.questions {
  position: absolute;
  top: 0; bottom: var(--gap); left: var(--gap);
  width: var(--nav-w);
  z-index: 20;
  overflow: auto;
  padding: 12px 8px 20px;
  box-shadow: 0 12px 34px rgba(10, 8, 18, .18), var(--shadow);
  transition: transform .16s ease, opacity .16s ease;
}
html[data-theme="dark"] .questions { box-shadow: 0 12px 34px rgba(0, 0, 0, .5), var(--shadow); }

body.nav-collapsed .questions {
  transform: translateX(calc(-100% - var(--gap) - 8px));
  opacity: 0;
  visibility: hidden;
  transition: transform .16s ease, opacity .16s ease, visibility 0s linear .16s;
}

.scrim {
  position: absolute; inset: 0;
  z-index: 15;
  background: rgba(12, 9, 20, .3);
  transition: opacity .16s ease;
}
body.nav-collapsed .scrim {
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s ease, visibility 0s linear .16s;
}

#left { flex: 0 0 var(--left-w); }

.rightcol {
  flex: 1 1 auto;
  min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
}
.workspace-card { flex: 1 1 auto; }
.terminal-card { flex: 0 0 var(--out-h); }

/* The splitter is a flex item, so it *is* the whole gutter between two cards -
   #main must not add a gap on top of it, or the gutter triples. */
.splitter { flex: 0 0 var(--gap); background: transparent; border-radius: 3px; }
.splitter-v { cursor: col-resize; }
.splitter-h { cursor: row-resize; }
.splitter:hover { background: var(--accent); opacity: .25; }

/* ---------- question list ---------- */

.side-label {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  font-weight: 500; color: var(--muted); padding: 2px 6px 8px;
}

.question-list { list-style: none; margin: 0; padding: 0; }
.question-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px; border-radius: 7px; cursor: pointer;
}
.question-row:hover { background: var(--panel-2); }
.question-row.current { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.question-row.current .q-title { color: var(--text); font-weight: 550; }
.question-row .q-title { flex: 1; min-width: 0; font-size: 13px; line-height: 1.35; }

/* The loop fills as steps pass, then closes into a disc. Open and filled states
   occupy the same circle, so nothing shifts in the column. */
.question-row .tick {
  flex: 0 0 17px; width: 17px; height: 17px;
  display: flex; align-items: center; justify-content: center;
}
.state-ico { width: 17px; height: 17px; flex: 0 0 17px; display: block; }
.state-ico.is-gem {
  width: 22px; height: 22px; flex: 0 0 22px;
  margin: -3px;                 /* overflows the 17px slot, stays centred */
  filter: drop-shadow(0 1px 2px color-mix(in srgb, var(--gold) 45%, transparent));
}
.state-ico .lit { stroke: var(--accent); }
.state-ico .unlit { stroke: var(--muted); opacity: .4; }
.question-row.is-done .tick { color: var(--ok); }
.question-row.is-locked .tick { color: var(--gold); }

.q-progress {
  flex: 0 0 auto;
  font-size: 11.5px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.question-row.is-done .q-progress { color: var(--ok); }

/* ---------- premium block ---------- */

.premium-block { margin-top: 14px; }
.premium-divider { display: flex; align-items: center; gap: 8px; padding: 0 4px; margin-bottom: 4px; }
.premium-divider::before,
.premium-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.premium-divider span {
  font-size: 9.5px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold); white-space: nowrap;
}
.premium-more { padding: 3px 8px 0 34px; font-size: 11.5px; color: var(--muted); }
.premium-cta {
  display: block; width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--gold); border-color: var(--gold); color: var(--gold-text);
  font-size: 12.5px; font-weight: 600;
  border-radius: 8px;
}
.premium-cta:hover { background: var(--gold); filter: brightness(1.08); }
.question-row.is-locked.current { background: var(--panel-2); box-shadow: inset 2px 0 0 var(--gold); }

/* ---------- question pane: pinned head, scrolling body ---------- */

.qhead {
  flex: 0 0 auto;
  padding: 14px 16px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
/* Title and timers share a row while there is room, and stack when the pane
   gets narrow - the timers must never crowd a wrapping title. */
.qtitle-row { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; }
.qtitle-row h1 {
  flex: 1 1 190px; min-width: 0;
  font-size: 17px; font-weight: 650; margin: 0;
  letter-spacing: -0.02em; line-height: 1.3;
}
.qmeta { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: 0 0 auto; }

.timers { display: flex; gap: 12px; align-items: baseline; flex: 0 0 auto; }
.timer { display: flex; align-items: baseline; gap: 5px; }
.timer-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .09em;
  font-weight: 500; color: var(--muted);
}
.timer-value {
  font-size: 14.5px; font-weight: 550;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.chip {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 500; color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 8px;
  line-height: 1.25;
}
.chip.chip-accent { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

.step-list {
  list-style: none; margin: 12px 0 0; padding: 0 0 12px;
  max-height: 38vh; overflow: auto;
}
.step-row {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 9px; cursor: pointer; border-radius: 7px;
}
.step-row:hover { background: var(--panel-2); }
.step-row.selected { background: var(--accent-soft); }
.step-row.is-step-locked { cursor: default; color: var(--muted); }
.step-row.is-step-locked:hover { background: transparent; }
.step-row.is-step-locked .step-mark { color: var(--muted); opacity: .75; }
.step-row.is-step-locked .step-mark .ico { width: 13px; height: 13px; flex: 0 0 13px; }
.step-row.is-step-locked .step-time { font-size: 11px; }
.step-mark { width: 15px; text-align: center; font-size: 12.5px; flex: 0 0 15px; }
.step-mark.passed { color: var(--ok); }
.step-mark.active { color: var(--accent); }
.step-name { flex: 1; font-size: 12.5px; }
.step-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.qbody { flex: 1 1 auto; overflow: auto; padding: 16px 16px 48px; }
.blurb { color: var(--muted); margin: 0 0 16px; line-height: 1.55; }

/* ---------- premium preview and offer ---------- */

/* Timers and Reset mean nothing on a question you cannot open. */
body.is-locked .qmeta { display: none; }

.badge-quiet { color: var(--muted); background: var(--panel-2); }

.chip.chip-gold {
  gap: 5px;
  color: var(--gold); background: var(--gold-soft);
  border-color: var(--gold-line);
  font-weight: 650;
}
.chip.chip-gold .state-ico { width: 14px; height: 14px; flex: 0 0 14px; margin: 0; filter: none; }

.steps-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .1em;
  font-weight: 600; color: var(--muted);
  margin: 4px 0 8px;
}

/* Unlit rings make the scope legible without giving anything solvable away.
   Scoped tightly: this block renders inside .markdown, whose element rules
   (h2 margins, ul padding) would otherwise win on specificity. */
.step-list.step-preview { margin: 0 0 18px; padding: 0; max-height: none; overflow: visible; }
.step-list.step-preview .step-row { margin: 0; }   /* .markdown li adds 3px otherwise */
.step-row.is-preview { cursor: default; }
.step-row.is-preview:hover { background: transparent; }
.step-row.is-preview .step-name { color: var(--text); opacity: .82; }
.step-row.is-preview .state-ico { width: 15px; height: 15px; flex: 0 0 15px; }
.step-row.is-preview .step-time { color: var(--muted); opacity: .8; }

.offer-card {
  border: 1px solid var(--gold-line);
  background: var(--gold-soft);
  border-radius: 10px;
  padding: 14px 13px;
  text-align: center;
}
.offer-head {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-bottom: 11px;
}
.offer-card .offer-head h2 {
  margin: 0; font-size: 14.5px; font-weight: 650;
  letter-spacing: -0.015em; line-height: 1;
}
.offer-card .offer-head .state-ico {
  width: 19px; height: 19px; flex: 0 0 19px;
  margin: 0; color: var(--gold);
  align-self: center;
}

.offer-card .offer-features {
  list-style: none;
  display: inline-block;
  margin: 0 0 13px; padding: 0;
  text-align: left;
}
.offer-card .offer-features li {
  position: relative; padding-left: 18px; margin: 5px 0;
  font-size: 12.5px; color: var(--muted); line-height: 1.4;
}
.offer-card .offer-features li::before {
  content: '✓'; position: absolute; left: 2px; top: 0;
  color: var(--gold); font-size: 11px; font-weight: 700;
}

.offer-cta {
  display: block; width: 100%;
  padding: 8px 12px;
  background: var(--gold); border-color: var(--gold); color: var(--gold-text);
  font-size: 13px; font-weight: 650;
  border-radius: 8px;
}
.offer-cta:hover { background: var(--gold); filter: brightness(1.08); }
.offer-note { margin: 10px 0 0; font-size: 11px; color: var(--muted); line-height: 1.45; text-align: center; }

/* ---------- prose ---------- */

.markdown { line-height: 1.62; }
.markdown h1, .markdown h2 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; letter-spacing: -0.015em; }
.markdown h3 { font-size: 14px; font-weight: 600; margin: 4px 0 8px; }
.markdown p { margin: 0 0 10px; }
.markdown ul, .markdown ol { margin: 0 0 10px; padding-left: 22px; }
.markdown li { margin: 3px 0; }
.markdown strong { font-weight: 600; }
.markdown code {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 5px; padding: 1px 5px;
}
.markdown pre {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 9px; padding: 10px 12px; overflow-x: auto; margin: 0 0 12px;
}
.markdown pre code { background: none; padding: 0; font-size: 12.5px; line-height: 1.45; color: var(--text); }
.markdown table { border-collapse: collapse; margin: 0 0 12px; font-size: 13px; }
.markdown th, .markdown td { border: 1px solid var(--border); padding: 4px 9px; text-align: left; }
.markdown th { background: var(--panel-2); font-weight: 600; }
.markdown blockquote {
  margin: 0 0 12px; padding: 8px 12px;
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 7px 7px 0; color: var(--muted);
}
.markdown blockquote p:last-child { margin: 0; }

#summary { margin-top: 18px; }
.summary-card { border: 1px solid var(--ok); background: var(--ok-bg); border-radius: 9px; padding: 14px 16px; }
.summary-card h2 { margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--ok); }
.summary-card table { width: 100%; font-size: 13px; border-collapse: collapse; }
.summary-card td { padding: 2px 0; border: none; }
.summary-card td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Controls sitting in a tab strip share one height so they line up. */
.tabbar .btn,
.tabbar .select {
  height: 26px;
  align-self: center;
  border-radius: 6px;
  font-size: 12.5px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
}
.tabbar .btn-primary { padding: 0 7px 0 11px; gap: 7px; }
.tabbar .btn-primary kbd { padding: 2px 5px; font-size: 10.5px; }
.tabbar .select { padding: 0 4px; }

/* ---------- panel chrome: tab strips, sans-serif like every editor UI ---- */

.tabbar {
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: 36px;
  padding: 0 8px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  flex: 0 0 auto;
}
.tabbar > .icon-btn,
.tabbar > .btn,
.tabbar > .select,
.tabbar > .hint { align-self: center; }
.tabbar .icon-btn .ico { fill: var(--muted); }
.tabbar .icon-btn.on .ico { fill: var(--accent); }

.tab {
  display: flex; align-items: center; gap: 7px;
  min-width: 0;
  padding: 0 10px;
  font-size: 13px; font-weight: 500;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  margin-bottom: -1px;
  white-space: nowrap;
}
.tab > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.tab .badge { flex: 0 0 auto; }

.hint { font-size: 12px; color: var(--muted); }

/* ---------- workspace ---------- */

.workspace { display: flex; flex: 1 1 auto; min-height: 0; min-width: 0; }

.files {
  flex: 0 0 var(--files-w);
  min-width: 0;
  overflow: auto;
  border-right: 1px solid var(--border);
  background: var(--panel);
  padding: 12px 8px 24px;
}
body.files-collapsed .files { display: none; }

#editor { flex: 1 1 auto; min-height: 0; min-width: 0; overflow: hidden; }

/* File names use the UI font - the convention in VS Code and CoderPad. */
.file-tree { font-size: 13px; }
.tree-row {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 6px; border-radius: 6px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tree-row:hover { background: var(--panel-2); }
.tree-row.open { background: var(--accent-soft); color: var(--accent); }
.tree-row.open .tree-name { font-weight: 500; }
.tree-caret { flex: 0 0 10px; color: var(--muted); font-size: 9px; }
.tree-name { overflow: hidden; text-overflow: ellipsis; }
.tree-row.dir .tree-name { color: var(--muted); }
.tree-dot { flex: 0 0 6px; color: var(--accent); font-size: 14px; line-height: 0; }
.tree-children { margin-left: 10px; border-left: 1px solid var(--border); padding-left: 4px; }

/* ---------- terminal ---------- */

.terminal {
  flex: 1 1 auto; min-height: 0; overflow: auto;
  margin: 0; padding: 10px 12px;
  font-family: var(--mono); font-size: 13px; line-height: 1.45;
  background: var(--term-bg);
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 4;
}
.term-idle { color: var(--muted); }
.term-cmd { color: var(--accent); font-weight: 500; }
.term-pass { color: var(--ok); }
.term-fail { color: var(--bad); }
.term-err { color: var(--bad); }
.term-note { color: var(--muted); }

/* ---------- CodeMirror theming ---------- */

.CodeMirror {
  height: 100%;
  font-family: var(--mono);
  font-size: var(--code-size);
  line-height: var(--code-lh);
  background: var(--bg);
  color: var(--text);
}
.CodeMirror-gutters { background: var(--bg); border-right: 1px solid var(--border); }
.CodeMirror-linenumber { color: var(--muted); opacity: .55; }
.CodeMirror-cursor { border-left: 2px solid var(--accent); }
.CodeMirror-activeline-background { background: var(--panel); }
.CodeMirror-selected { background: var(--accent-soft) !important; }
.CodeMirror-matchingbracket { color: var(--accent) !important; font-weight: 700; }

.cm-keyword { color: #7c3aed; font-weight: 500; }
.cm-def     { color: #1d4ed8; }
.cm-builtin { color: #0e7490; }
.cm-string  { color: #157f4b; }
.cm-number  { color: #b45309; }
.cm-comment { color: var(--muted); font-style: italic; }
.cm-operator { color: var(--text); }
.cm-property { color: #0369a1; }
.cm-meta    { color: var(--muted); }

html[data-theme="dark"] .cm-keyword { color: #c4b5fd; }
html[data-theme="dark"] .cm-def     { color: #93b4fd; }
html[data-theme="dark"] .cm-builtin { color: #67e8f9; }
html[data-theme="dark"] .cm-string  { color: #86efac; }
html[data-theme="dark"] .cm-number  { color: #fbbf24; }
html[data-theme="dark"] .cm-property { color: #7dd3fc; }

/* ---------- small screens ---------- */

@media (max-width: 640px) {
  .questions { width: calc(100% - var(--gap) * 2); }
}

@media (prefers-reduced-motion: reduce) {
  .questions, .scrim { transition: none; }
}
