/* PrepBuddy shared: Practice module (practice, the Practice tab). The test card (lists), the countdown tile (Coming up: Today and Practice home), the daily
   challenge card, the result row and score ring, the practice-test pill on the shared content card, and the attempt chrome (timer, question, options, navigator,
   summary stats), the leaderboard rows and podium, the month calendar. Tokens only; classes prefixed pr-. The hub tiles and the continue card are prepare.css
   (.pp-hub, .pp-cont): the same components on Prepare home and Practice home, never copied. Flutter: TestCard, CountdownTile, ChallengeCard, ResultRow, ScoreRing,
   AttemptTimer, QuestionCard, OptionTile, QuestionNavigator, StatTiles, RankRow, Podium, MonthCalendar. */

/* ---------- tablet and web (2026-10-09): the pattern of Prepare's course details. Below 1024 dp one column: the two wrappers vanish (display: contents) and a child's order (.o1 .o2 .o3) says
   where it sits. From 1024 dp (body.page-wide gives the 1160 dp frame) two columns: the work on the start, a 360 dp side column on the end. Tablet (600-1023) keeps the one column ---------- */
.o1 { order: 1; } .o2 { order: 2; } .o3 { order: 3; }
.pr-lay { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.pr-lay > .pr-main, .pr-lay > .pr-side { display: contents; }
@media (min-width: 1024px) {
  .pr-lay { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0 48px; align-items: start; padding-top: 8px; flex: none; }
  .pr-lay:has(> .pr-side:empty) { grid-template-columns: minmax(0, 1fr); }
  .pr-lay > .pr-main { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .pr-lay > .pr-side { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 16px; min-width: 0; position: sticky; top: 72px; }
  .pr-lay > .pr-side:empty { display: none; }
  .pr-lay > .pr-main > :first-child, .pr-lay > .pr-side > :first-child { margin-top: 0; }   /* both columns start on the same line */
  .pr-lay > .pr-side.free { position: static; }   /* a side column taller than the window scrolls with the page */
  .pr-side .pr-rules { grid-template-columns: minmax(0, 1fr); }   /* the facts grid is one column in 360 dp */
  .pr-side :is(.pt-bar, .pc-bar) { position: static; margin: 0; padding: 16px; background: var(--surface); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--edge); }   /* the sticky bottom bar becomes a card in the side column */
  body:has(.pr-side :is(.pt-bar, .pc-bar)) .toast { bottom: 24px; }
  .pr-side .pr-tools { position: static; padding: 12px; background: var(--surface); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--edge); }
  .pr-side .pr-stats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pr-lay.one > .pr-main { width: 100%; max-width: 680px; margin-inline: auto; }
  /* a skeleton, an error or a blocked card on a wide page stays in the 680 dp reading column; a list page (.pr-fluid) uses the whole frame and lays its cards two across */
  body.page-wide:not(.pr-chat) .page-col > :not(.pr-lay):not(.pr-ws) { width: 100%; max-width: 680px; margin-inline: auto; }   /* never the workspace shell of 04 and 14 (2026-10-20: PR 15 rule had collapsed 14-code’s editor) */
  body.pr-fluid .page-col > :not(.pr-lay):not(.pr-ws) { max-width: none; margin-inline: 0; }
  body.pr-fluid .pr-list, body.pr-fluid .pr-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
}
/* the system permission prompt and Settings, as the prototype draws them (the real ones are the OS's) */
.pr-sysp { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.pr-sysp .ic { width: 56px; height: 56px; border-radius: 20px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); } .pr-sysp .ic .mi { font-size: 28px; }
.pr-sysp h2 { margin: 0; font-size: calc(18px * var(--font-scale)); font-weight: 700; } .pr-sysp p { margin: 0; font-size: calc(14px * var(--font-scale)); line-height: 1.5; color: var(--text-secondary); } .pr-sysp small { font-size: calc(11px * var(--font-scale)); color: var(--text-secondary); }
.pr-sysp-acts { display: flex; gap: 8px; width: 100%; margin-top: 8px; } .pr-sysp-acts .btn { flex: 1; }
.pr-sysp-row { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 0; font-size: calc(15px * var(--font-scale)); font-weight: 600; }
/* the microphone row's action: Grant Microphone Access, full width under the row */
.pc-micact { padding: 4px 0 8px; } .pc-micact .btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; } .pc-micact .mi { font-size: 20px; }
/* every Practice screen keeps its column in the same place whether or not it scrolls (a short screen and a long one no longer differ by the scrollbar's width) */
html:has(.page-wrap) { scrollbar-gutter: stable; }

/* ---------- what is inside a test: one chip per question type beyond single choice (MCQ · Media · Descriptive · Voice · Coding · SQL) ---------- */
.pr-tchips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.pr-tchip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--text-secondary) 12%, transparent); color: var(--text-secondary); font-size: calc(11px * var(--font-scale)); font-weight: 600; line-height: 1.5; white-space: nowrap; }
.pr-tchip .mi { font-size: 13px; }
/* ---------- the two modes in one line: a scheduled assessment and an anytime practice test never read the same ---------- */
.pr-note { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: calc(12px * var(--font-scale)); line-height: 1.45; color: var(--text-secondary); }
.pr-note .mi { font-size: 16px; flex-shrink: 0; margin-top: 1px; color: var(--primary); } .pr-note.practice .mi { color: var(--success); }
/* ---------- kind: a Test counts once (filled pill, primary strip); a Practice test is free to repeat (soft green pill and strip). Same on 01, 02, 04, 06, 07 ---------- */
.pr-kind { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 3px 10px; box-sizing: border-box; border-radius: 999px; font-size: calc(12px * var(--font-scale)); font-weight: 700; line-height: 1.4; white-space: nowrap; }
.pr-kind .mi { font-size: 14px; }
.pr-kind.test { background: var(--primary); color: var(--on-primary); }
.pr-kind.practice { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success-text); }
.pr-mode { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--primary) 10%, transparent); }
.pr-mode.practice { background: color-mix(in srgb, var(--success) 10%, transparent); }
.pr-mode > .mi { font-size: 20px; flex-shrink: 0; color: var(--primary); } .pr-mode.practice > .mi { color: var(--success); }
.pr-mode .tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); line-height: 1.35; }
.pr-tot { margin-inline-start: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; font-size: calc(12px * var(--font-scale)); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-secondary); } .pr-tot .mi { font-size: 16px; } .pr-tot b { color: var(--text-primary); }
.pr-mode .tx b { font-size: calc(13px * var(--font-scale)); font-weight: 700; color: var(--text-primary); }
/* practice: the tries as small bars, the best one filled */
.pr-hist { display: flex; align-items: flex-end; gap: 10px; min-height: 76px; }
.pr-hist .b { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; font-size: calc(11px * var(--font-scale)); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.pr-hist .b i { display: block; width: 100%; max-width: 40px; border-radius: 8px 8px 4px 4px; background: color-mix(in srgb, var(--primary) 28%, transparent); }
.pr-hist .b.best i { background: var(--primary); } .pr-hist .b b { font-size: calc(12px * var(--font-scale)); font-weight: 700; color: var(--text-primary); }

/* ---------- icon tile (44 dp, the list-item tile of tokens §7 with the test's category accent) ---------- */
/* the icon tile is the shared .ic-tile (components.css; was .pr-ic until 2026-10-19) */

/* ---------- status pill: one recipe for every test state (Live now, Starting soon, Today 7:00 PM, Missed, Passed, Pending, Best 76 %, App only) ---------- */
.pr-st { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; max-width: 100%; padding: 3px 10px; box-sizing: border-box; border-radius: 999px; font-size: calc(12px * var(--font-scale)); font-weight: 700; line-height: 1.3; background: color-mix(in srgb, var(--accent, var(--text-secondary)) 14%, transparent); color: var(--accent-text, var(--accent, var(--text-secondary))); }   /* wraps inside its container instead of being cut off (longer words in Tamil and Hindi, large text) */
.pr-st .mi { font-size: 14px; }
.pr-st.plain { background: transparent; padding: 0; color: var(--text-secondary); font-weight: 600; }   /* a quiet fact: "2 attempts left", "App only" */
.pr-sts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- test card: a tappable top row (icon tile, title, meta) with a trailing round button that is never nested in it, then the status row ---------- */
.pr-test { display: flex; flex-direction: column; gap: 12px; padding: 16px; }   /* 2026-10-27: the card's 16 dp (one padding for every card on a canvas) */
.pr-test .top { display: flex; align-items: center; gap: 4px; margin-inline-end: -8px; }
.pr-test .open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: start; color: var(--text-primary); border-radius: 12px; padding: 2px 0; }

.pr-test .tx b { font-size: calc(15px * var(--font-scale)); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pr-test .tx span { font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); line-height: 1.4; overflow-wrap: anywhere; }
.pr-test .trail { flex-shrink: 0; display: inline-flex; align-items: center; }
.pr-list { display: flex; flex-direction: column; gap: 12px; }
/* practice tests two across (three from 600 dp) is Profile's .pf-grid (profile.css, 2026-10-19 dedupe); the row card sized by the grid */
.pf-grid .sug { width: auto; min-width: 0; } .pf-grid .sug b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pr-best { display: inline-flex; align-items: center; align-self: center; padding: 3px 10px; border-radius: 999px; line-height: 1.4; font-size: calc(12px * var(--font-scale)); font-weight: 700; background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success-text); white-space: nowrap; }   /* "Best 76 %" on a practice-test card; .weak = a topic your results say to work on */
.card.sug[data-pb="PbPracticeTestCard"] .body b { overflow-wrap: anywhere; }   /* a long word ("Interpretation") at 1.43 breaks inside the two-column card instead of touching its edge */
.card.sug .body .meta { flex-wrap: wrap; justify-content: flex-start; row-gap: 4px; }   /* 2026-10-18: the "Best 76 %" pill drops under the facts when the two-column card is narrow (Tamil, 1.43) instead of being cut off */
.pr-best.weak { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning-text); }
.pr-best.new { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary-text); }

/* ---------- countdown tile (Coming up): panel with the accent bar, when, title, the countdown, Join when it is about to start ---------- */
.pr-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pr-tile { display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 16px; min-width: 0; }   /* the accent underline is the shared .tab-tile (components.css, 2026-10-19) */
.pr-tile .open { display: flex; flex-direction: column; gap: 8px; text-align: start; color: var(--text-primary); min-width: 0; }
.pr-tile .when { display: flex; align-items: flex-start; gap: 8px; font-size: calc(12px * var(--font-scale)); font-weight: 600; color: var(--text-secondary); min-width: 0; overflow-wrap: anywhere; }   /* wraps at large text: never cut off */
.pr-tile .when .mi { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.pr-tile b { font-size: calc(14px * var(--font-scale)); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; overflow-wrap: anywhere; }
.pr-cd { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pr-cd small { font-size: calc(12px * var(--font-scale)); font-weight: 600; color: var(--text-secondary); }
.pr-count { font-variant-numeric: tabular-nums; font-weight: 800; font-size: calc(24px * var(--font-scale)); letter-spacing: -0.02em; color: var(--accent-text, var(--accent)); line-height: 1.2; }
.pr-tile .act { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }

/* ---------- daily challenge card: icon tile, title with the XP tag, the facts, Play; done = check tile, score, rank, the leaderboard button ---------- */
.pr-chal { display: flex; align-items: center; gap: 12px; padding: 16px; }
.pr-chal .open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: start; color: var(--text-primary); border-radius: 12px; }
.pr-chal .tx { gap: 4px; }
.pr-chal .tx b { font-size: calc(16px * var(--font-scale)); font-weight: 700; line-height: 1.3; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pr-chal .tx span { font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); line-height: 1.4; }
.pr-chal .tx .streak { display: inline-flex; align-items: center; gap: 4px; color: var(--reward-ink); font-weight: 600; }
.pr-chal .tx .streak .mi { font-size: 14px; color: var(--reward); }
/* the return line of a Review row (practice 15) and the review-session line on 07 (rewards.md section 5b, 2026-10-27) */
.sq-ret, .rs-review { display: inline-flex; align-items: center; gap: 6px; font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); font-weight: 600; }
.sq-ret .mi, .rs-review .mi { font-size: 16px; }
.sq-ret.due { color: var(--cat-cyan-text); } .sq-ret.ok { color: var(--success-text); }
.sq-ret { margin-top: 8px; }
.rs-review { margin-top: 6px; color: var(--text-primary); }
.rs-review a { color: var(--primary-text); text-decoration: none; min-height: 48px; display: inline-flex; align-items: center; }
.pr-xp { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0; white-space: nowrap; background: var(--reward-container); color: var(--reward-ink); }
.pr-chal .trail .tbtn { flex-shrink: 0; }

/* ---------- score ring: conic progress with the percentage inside (44 dp in rows, 96 dp on a result) ---------- */
.pr-ring { --p: 0; width: 44px; height: 44px; border-radius: 999px; flex-shrink: 0; background: conic-gradient(var(--accent, var(--success)) calc(var(--p) * 1%), color-mix(in srgb, var(--text-secondary) 22%, transparent) 0); display: flex; align-items: center; justify-content: center; transition: --p 500ms ease; }
.pr-ring i { width: 34px; height: 34px; border-radius: 999px; background: var(--surface); display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.pr-ring.lg { width: 96px; height: 96px; } .pr-ring.lg i { width: 76px; height: 76px; font-size: calc(20px * var(--font-scale)); }

/* ---------- result row: flat rows with a hairline, the ring (or a tile while pending), title, one fact line, a caret ---------- */
.pr-results { display: flex; flex-direction: column; }
.pr-res { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 0; width: 100%; box-sizing: border-box; text-align: start; color: var(--text-primary); border-radius: 12px; }
.pr-res { position: relative; } .pr-res + .pr-res::before { content: ''; position: absolute; inset-inline: 0; top: 0; height: 1px; background: var(--border); }   /* a straight hairline: an inset shadow on a rounded row curves at its corners */

.pr-res .tx b { font-size: calc(15px * var(--font-scale)); font-weight: 600; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-res .tx span { font-size: calc(12px * var(--font-scale)); line-height: 1.4; color: var(--text-secondary); overflow-wrap: anywhere; }   /* the fact line wraps: never cut off (320 dp, Tamil) */
.pr-res .tx span.ok { color: var(--success-text); font-weight: 600; } .pr-res .tx span.bad { color: var(--warning-text); font-weight: 600; }
.pr-res > .mi { font-size: 20px; color: var(--text-secondary); flex-shrink: 0; }

/* ---------- attempt chrome ---------- */
.pr-timer { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 999px; font-size: calc(14px * var(--font-scale)); font-weight: 800; font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary-text); white-space: nowrap; }
.pr-timer .mi { font-size: 18px; }
.pr-timer.low { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning-text); }
.pr-timer.crit { background: color-mix(in srgb, var(--error) 14%, transparent); color: var(--error-text); animation: pr-blink 500ms ease-in-out infinite; }
@keyframes pr-blink { 50% { opacity: .55; } }
/* the question card (.pr-q) and the option rows (.pr-opts, .pr-opt) moved to ../../shared/components.css on 2026-10-13: the portal's Practice previews compose them; rules unchanged */
.pr-area { min-height: 140px; border-radius: 8px; border: 1px solid var(--outline); background: var(--field-bg); padding: 12px; font: inherit; font-size: calc(15px * var(--font-scale)); line-height: 1.5; color: var(--text-primary); width: 100%; box-sizing: border-box; resize: vertical; }
.pr-area:focus { outline: none; border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.pr-rec { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--edge); }
.pr-rec .tbtn { width: 64px; height: 64px; } .pr-rec .tbtn .mi { font-size: 28px; }
.pr-rec.live .tbtn { background: var(--error); color: var(--on-error); animation: pr-blink 500ms ease-in-out infinite; }
.pr-wave { display: flex; align-items: center; gap: 4px; height: 24px; } .pr-wave i { width: 3px; border-radius: 999px; background: var(--primary); height: 30%; }
/* navigator: a grid of 36 dp discs; done (answered), flagged, current, blank; in a result: ok / bad */
.pr-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 8px; }
.pr-nav button { width: 100%; aspect-ratio: 1; min-height: 36px; border-radius: 999px; font-size: calc(13px * var(--font-scale)); font-weight: 700; font-variant-numeric: tabular-nums; background: var(--surface); box-shadow: inset 0 0 0 1px var(--edge); color: var(--text-primary); display: inline-flex; align-items: center; justify-content: center; position: relative; }
.pr-nav button.done { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.pr-nav button.flag::after { content: ''; position: absolute; top: 2px; inset-inline-end: 2px; width: 10px; height: 10px; border-radius: 999px; background: var(--warning); box-shadow: 0 0 0 2px var(--surface); }
.pr-nav button.cur { box-shadow: inset 0 0 0 2px var(--primary); }
.pr-nav button.cur.done { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }
.pr-nav button.ok { background: var(--success); color: var(--on-primary); box-shadow: none; } .pr-nav button.bad { background: var(--error); color: var(--on-error); box-shadow: none; }
.pr-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); }
.pr-legend span { display: inline-flex; align-items: center; gap: 8px; }
.pr-legend i { width: 12px; height: 12px; border-radius: 999px; display: inline-block; background: var(--surface); box-shadow: inset 0 0 0 1px var(--edge); }
.pr-legend i.done { background: var(--primary); box-shadow: none; } .pr-legend i.flag { background: var(--warning); box-shadow: none; } .pr-legend i.ok { background: var(--success); box-shadow: none; } .pr-legend i.bad { background: var(--error); box-shadow: none; }
/* the attempt's bottom toolbar: Previous · Flag · navigator · Next (round icons); the primary Submit on the last question */
.pr-tools { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--bg); box-shadow: 0 -1px 0 var(--border); }
.pr-tools .mid { display: inline-flex; align-items: center; gap: 8px; }
.pr-tools .tbtn.on { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning-text); box-shadow: none; }
/* summary stats: small panels, number over label; three or four across */
.pr-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pr-stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } .pr-stats.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 599px) { .pr-stats.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } } .pr-stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 359px) { .pr-stats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pr-stat { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--edge); min-width: 0; }
.pr-stat b { font-size: calc(20px * var(--font-scale)); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--accent-text, var(--accent, var(--text-primary))); }
.pr-stat span { font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); white-space: normal; line-height: 1.3; overflow-wrap: anywhere; }   /* a label is never clipped */
/* the section bar is the shared .progress.lg.accent (components.css; was .pr-bar until 2026-10-19) */
.pr-sec { display: flex; align-items: center; gap: 12px; min-height: 48px; }   /* a section score line: name, bar, % */
.pr-sec .n { flex: 0 0 40%; min-width: 0; font-size: calc(14px * var(--font-scale)); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-sec .v { flex-shrink: 0; width: 44px; text-align: end; font-size: calc(13px * var(--font-scale)); font-weight: 700; font-variant-numeric: tabular-nums; }
/* check rows (pre-check): icon tile, two lines, a state at the end (check, a switch or a round button) */
.pr-checks { display: flex; flex-direction: column; }
.pr-check { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 0; }
.pr-check { position: relative; } .pr-check + .pr-check::before { content: ''; position: absolute; inset-inline: 0; top: 0; height: 1px; background: var(--border); }

.pr-check .tx b { font-size: calc(15px * var(--font-scale)); font-weight: 600; line-height: 1.35; }
.pr-check .tx span { font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); line-height: 1.4; }
.pr-check .state { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; }
.pr-check .state .ok { color: var(--success-text); font-size: 24px; } .pr-check .state .no { color: var(--warning-text); font-size: 24px; }
.pr-check.off .ic-tile { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning-text); }
/* rules list (details): icon + short fact */
.pr-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pr-rule { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pr-rule .mi { font-size: 20px; color: var(--accent, var(--primary)); flex-shrink: 0; }
.pr-rule .tx { flex: initial; gap: 0; } .pr-rule b { font-size: calc(14px * var(--font-scale)); font-weight: 700; line-height: 1.3; color: var(--text-primary); } .pr-rule .tx > span { font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); }   /* > span: the .tx wrapper is a span too, and must keep the primary colour for the title */
/* the big countdown on the waiting room: four tabular blocks */
.pr-clock { display: flex; justify-content: center; gap: 12px; }
.pr-clock div { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1 1 0; min-width: 0; max-width: 96px; padding: 12px 8px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--edge); }
.pr-clock b { font-size: calc(28px * var(--font-scale)); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.1; color: var(--primary-text); }
.pr-clock span { font-size: calc(11px * var(--font-scale)); color: var(--text-secondary); }

/* ---------- celebration: a confetti spray from both bottom corners (pr-fx, made by PBPractice.celebrate) and stars that pop in turn. Reduced motion: nothing moves ---------- */
.pr-fx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 60; }
.pr-fx i { position: absolute; bottom: 0; width: var(--w); height: calc(var(--w) * 1.6); background: var(--c); border-radius: 0px; opacity: 0; animation: pr-spray var(--t) cubic-bezier(.2, .7, .4, 1) var(--d) both; }
.pr-fx i.l { inset-inline-start: 6%; } .pr-fx i.r { inset-inline-end: 6%; } .pr-fx i.dot { height: var(--w); border-radius: 999px; }
@keyframes pr-spray {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  45% { opacity: 1; transform: translate(calc(var(--dx) * .7), var(--dy)) rotate(calc(var(--rot) * .6)); }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 700px)) rotate(var(--rot)); }
}
@keyframes pr-star { 0% { transform: scale(0) rotate(-50deg); opacity: 0; } 70% { transform: scale(1.3) rotate(8deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes pr-twinkle { 0%, 100% { transform: scale(.4); opacity: 0; } 50% { transform: scale(1); opacity: 1; } }
@keyframes pr-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes pr-pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pr-fx { display: none; } }

/* ---------- leaderboard: podium and rank rows ---------- */
.pr-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; padding: 8px 0 0; }
.pr-pod { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; text-align: center; }
.pr-pod .av { position: relative; display: inline-flex; } .pr-pod .av .pb-avatar { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent, var(--primary)); }
.pr-pod .av .mi { position: absolute; top: -14px; inset-inline-start: 50%; transform: translateX(-50%); font-size: 20px; color: var(--reward); }
.pr-pod b { font-size: calc(13px * var(--font-scale)); font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-pod span { font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); }
.pr-pod .step { width: 100%; border-radius: 12px 12px 0 0; background: color-mix(in srgb, var(--accent, var(--primary)) 16%, transparent); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: calc(20px * var(--font-scale)); color: var(--accent-text, var(--primary-text)); }   /* 20: large text, so the place number passes contrast on its tint in dark (4.37 at 18, 2026-11-14) */
.pr-pod .step { transform-origin: bottom; animation: pr-rise 500ms cubic-bezier(.2, .8, .2, 1) both; } .pr-pod.p1 .step { animation-delay: 300ms; } .pr-pod.p2 .step { animation-delay: 150ms; } .pr-pod.p3 .step { animation-delay: .15s; }
.pr-pod .av { animation: pr-pop .5s ease-out both; } .pr-pod.p1 .av { animation-delay: 500ms; } .pr-pod.p2 .av { animation-delay: .3s; } .pr-pod.p3 .av { animation-delay: 300ms; }
@media (prefers-reduced-motion: reduce) { .pr-pod .step, .pr-pod .av { animation: none; } }
.pr-pod.p1 .step { height: 56px; } .pr-pod.p2 .step { height: 40px; } .pr-pod.p3 .step { height: 28px; }
.pr-ranks { display: flex; flex-direction: column; }
.pr-rank { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px; margin-inline: -8px; border-radius: 12px; width: calc(100% + 16px); box-sizing: border-box; text-align: start; color: var(--text-primary); }
.pr-rank { position: relative; } .pr-rank + .pr-rank::before { content: ''; position: absolute; inset-inline: 8px; top: 0; height: 1px; background: var(--border); }
.pr-rank .no { width: 28px; flex-shrink: 0; text-align: center; font-weight: 800; font-size: calc(14px * var(--font-scale)); font-variant-numeric: tabular-nums; color: var(--text-secondary); }

.pr-rank .tx b { font-size: calc(15px * var(--font-scale)); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-rank .tx span { font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-rank .pts { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.pr-rank .pts b { font-size: calc(15px * var(--font-scale)); font-weight: 800; font-variant-numeric: tabular-nums; } .pr-rank .pts span { font-size: calc(11px * var(--font-scale)); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.pr-rank.you { background: color-mix(in srgb, var(--primary) 8%, transparent); } .pr-rank.you .no { color: var(--primary-text); }
.pr-rank.you::before, .pr-rank.you + .pr-rank::before { display: none; }
.pr-move { display: inline-flex; align-items: center; gap: 2px; font-size: calc(11px * var(--font-scale)); font-weight: 700; } .pr-move.up { color: var(--success-text); } .pr-move.down { color: var(--error-text); } .pr-move .mi { font-size: 12px; }
.pr-sticky { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 5; }   /* your own rank row stays in view at the bottom of a long list */

/* ---------- month calendar: seven columns, 40 dp days, dots for tests, today ringed, the chosen day filled ---------- */
.pr-cal .d { min-height: 40px; }   /* audit 2026-10-10: at 320 dp inside the calendar card the cells fell to 35 dp */
.pr-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px 2px; }
.pr-cal .dow { text-align: center; font-size: calc(11px * var(--font-scale)); font-weight: 700; color: var(--text-secondary); padding: 4px 0; }
.pr-cal .d { position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; aspect-ratio: 1; max-height: 48px; border-radius: 999px; font-size: calc(14px * var(--font-scale)); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.pr-cal .d.out { color: var(--text-secondary); font-weight: 400; }
.pr-cal .d.today { box-shadow: inset 0 0 0 2px var(--primary); }
.pr-cal .d.sel { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.pr-cal .d .dots { display: flex; gap: 2px; height: 5px; } .pr-cal .d .dots i { width: 5px; height: 5px; border-radius: 999px; background: var(--accent, var(--primary)); }
.pr-cal .d.sel .dots i { background: var(--on-primary); }
.pr-cal .d:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); } .pr-cal .d.sel:hover { background: var(--primary); }
.pr-cal .d:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.pr-month { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pr-month h2 { margin: 0; font-size: calc(18px * var(--font-scale)); font-weight: 700; }

@media (prefers-reduced-motion: reduce) { .pr-timer.crit, .pr-rec.live .tbtn { animation: none; } }
/* ---------- modifiers asked for by the screen reviews (2026-10-03) ---------- */
@media (max-width: 359px) { .pr-rules { grid-template-columns: minmax(0, 1fr); } }   /* the facts grid is one column below 360 dp */

.pr-sec.weak .v { color: var(--warning-text); }                      /* the weakest section in a result */
/* .pr-opt.ok .mi and .pr-opt.bad .mi: with the option rows in ../../shared/components.css (2026-10-13) */
.pr-nav.view button { pointer-events: none; }                    /* a progress-only navigator (tests that do not allow going back) */
.pr-nav button[disabled]:not(.done) { opacity: .45; }

/* ---------- the code workspace (14 Code question, web; 2026-10-19): the problem pane, the editor with its tool row and status bar, the result drawer and the helper.
   Tokens only; classes pr-cw (workspace), code-* (the code frame, shared/code.css), pr-run (run result), pr-sql (tables and grids), pr-hp (helper). Flutter: none (the app shows a card);
   React: PbCodeWorkspace, PbCodeEditor, PbRunResult, PbSqlSchema. The portal's .ce frame (admin/shared/patterns.css) is the same recipe under another name; both should
   become one shared recipe (README of 14, Implementation notes). ---------- */
.pr-cw { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pr-cw-tabs { display: flex; gap: 8px; }
.pr-cw-tabs .fc { flex: 1 1 0; min-width: 0; justify-content: center; min-height: 44px; padding-inline: 8px; }   /* the three tabs share the row, also at 320 dp with 1.43x text */
.pr-cw-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.pr-cw-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pr-cw-pane { min-width: 0; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--edge); padding: 16px; }
.pr-cw-pane > h2 { margin: 0 0 8px; font-size: calc(15px * var(--font-scale)); font-weight: 700; }
.pr-cw-kick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.pr-cw-kick .n { margin-inline-start: auto; font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); }
.pr-cw-text { margin: 0 0 12px; font-size: calc(15px * var(--font-scale)); line-height: 1.55; color: var(--text-primary); }
.pr-cw-rule { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--primary) 8%, transparent); color: var(--text-secondary); font-size: calc(13px * var(--font-scale)); line-height: 1.45; }
.pr-cw-rule .mi { font-size: 18px; color: var(--primary-text); flex-shrink: 0; }
.pr-cw-tabbar { display: flex; gap: 8px; margin: 0 0 12px; }
.pr-cw-warn { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); }
.pr-cw-warn .mi { font-size: 16px; }
@media (min-width: 1024px) {
  .pr-cw-tabs { display: none; }
  .pr-cw-grid { grid-template-columns: 380px minmax(0, 1fr); }
  .pr-cw-grid.withhelper { grid-template-columns: 340px minmax(0, 1fr) 340px; }
  .pr-cw-grid.fold { grid-template-columns: 56px minmax(0, 1fr); }
}
@media (max-width: 1023px) {
  .pr-cw[data-tab="problem"] .pr-cw-main, .pr-cw[data-tab="problem"] .pr-cw-help { display: none; }
  .pr-cw[data-tab="code"] .pr-cw-prob, .pr-cw[data-tab="code"] .pr-cw-res, .pr-cw[data-tab="code"] .pr-cw-help { display: none; }
  .pr-cw[data-tab="results"] .pr-cw-prob, .pr-cw[data-tab="results"] .pr-cw-ed, .pr-cw[data-tab="results"] .pr-cw-help { display: none; }
}

/* the code frame: a bar (language, save state, the round icons, Run), the editor with line numbers, a status bar */
/* the code frame and its tool row, body, gutter, status bar: shared/code.css (.code-frame, .code-tools, .code-body, .code-ln, .code-src, .code-status), 2026-10-19 */

/* the result drawer: Cases and Result */
.pr-run-head { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: calc(14px * var(--font-scale)); font-weight: 700; }
.pr-run-head .sub { margin-inline-start: auto; font-size: calc(12px * var(--font-scale)); font-weight: 500; color: var(--text-secondary); }
.pr-run-empty { margin: 0; padding: 16px 4px; font-size: calc(14px * var(--font-scale)); line-height: 1.5; color: var(--text-secondary); }
.code-case-h .pr-st { white-space: nowrap; }   /* the code frame and the case rows are shared/code.css (2026-10-19); these two are the learner's status pill and error colour */
.code-case .err { color: var(--error-text); }
.pr-case-add { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--edge); margin-bottom: 8px; }
.pr-case-add .field { min-height: 44px; }
.pr-case-add textarea { width: 100%; box-sizing: border-box; min-height: 56px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--outline); background: var(--field-bg); font: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: calc(13px * var(--font-scale)); color: var(--text-primary); }

/* SQL: the table structure card and the result grid */
.pr-sql-t { margin: 0 0 12px; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--edge); background: var(--bg); }
.pr-sql-t > b { display: block; padding: 8px 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: calc(13px * var(--font-scale)); background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success-text); }
.pr-tbl { width: 100%; border-collapse: collapse; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: calc(12px * var(--font-scale)); }
.pr-tbl th { text-align: start; padding: 8px 12px; font-weight: 700; color: var(--text-secondary); background: color-mix(in srgb, var(--text-secondary) 8%, transparent); white-space: nowrap; }
.pr-tbl td { padding: 8px 12px; border-top: 1px solid var(--border); white-space: nowrap; }
.pr-tbl tr.diff td { background: color-mix(in srgb, var(--error) 10%, transparent); color: var(--error-text); }
.pr-tbl .nul { color: var(--text-secondary); font-style: italic; }
.pr-sql-w { overflow-x: auto; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--edge); background: var(--bg); margin: 0 0 8px; }
.pr-sql-lab { margin: 12px 0 4px; font-size: calc(12px * var(--font-scale)); font-weight: 700; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }

/* the helper (practice tests): the conversation, the AI note under each answer, the composer */
.pr-hp { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pr-hp-top { display: flex; align-items: center; gap: 8px; }
.pr-hp-top h2 { margin: 0; font-size: calc(15px * var(--font-scale)); font-weight: 700; flex: 1 1 auto; }
.pr-hp-top .left { font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.pr-hp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-hb { max-width: 92%; padding: 12px; border-radius: 16px; font-size: calc(14px * var(--font-scale)); line-height: 1.5; background: var(--bg); box-shadow: inset 0 0 0 1px var(--edge); }
.pr-hb.me { align-self: flex-end; background: color-mix(in srgb, var(--primary) 12%, transparent); box-shadow: none; }
.pr-hb p { margin: 0 0 8px; } .pr-hb p:last-child { margin: 0; }
.pr-hb code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: calc(13px * var(--font-scale)); background: var(--field-bg); padding: 0 4px; border-radius: 4px; }
.pr-hp-log { display: flex; flex-direction: column; gap: 8px; min-height: 120px; max-height: 360px; overflow: auto; }
.pr-hp-in { display: flex; align-items: flex-end; gap: 8px; }
.pr-hp-in textarea { flex: 1 1 auto; min-height: 56px; max-height: 120px; box-sizing: border-box; padding: 12px; border-radius: 8px; border: 1px solid var(--outline); background: var(--field-bg); font: inherit; font-size: calc(14px * var(--font-scale)); color: var(--text-primary); resize: none; }
.pr-hp-in textarea:disabled { opacity: .6; }
.pr-hp-note { margin: 0; font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); line-height: 1.4; }

/* the card the app shows instead of the editor (04), and the web-only card on 01 */
/* ---------- project labs (practice 14 ?kind=project; QuestionKind.PROJECT, 2026-11-03, row 87, proposed): the file tree in the problem pane (Files), the file tabs over the editor,
   the bottom panel Terminal · Tests · Preview, the lab's pinned bar (Submit), the phone's read-only files list under the brief. Tokens only; classes pr-pj. React: PbCodeWorkspace
   (project variant). Flutter: none (the app shows the Open on a bigger screen card). ---------- */
.pr-pj-tree { display: flex; flex-direction: column; padding: 4px 0; }
.pr-pj-dir, .pr-pj-f { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px 0 calc(12px + var(--d, 0) * 16px); border-radius: 8px; font-size: calc(13px * var(--font-scale)); color: var(--text-primary); text-align: start; }
.pr-pj-dir { color: var(--text-secondary); font-weight: 600; }
.pr-pj-f .mi, .pr-pj-dir .mi { font-size: 16px; color: var(--text-secondary); }
.pr-pj-f .mi:last-child:not(:first-child) { margin-inline-start: auto; font-size: 14px; }
button.pr-pj-f.on { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary-text); font-weight: 600; }
button.pr-pj-f.on .mi { color: var(--primary-text); }
.pr-pj-tabs { flex: none; display: flex; align-items: stretch; gap: 2px; padding: 4px 8px 0; border-block-end: 1px solid var(--border); overflow-x: auto; background: color-mix(in srgb, var(--text-secondary) 6%, transparent); }
.pr-pj-tab { display: inline-flex; align-items: center; gap: 2px; padding-inline-end: 2px; border-radius: 8px 8px 0 0; }
.pr-pj-tab.on { background: var(--surface); box-shadow: inset 0 1px 0 var(--primary); }
.pr-pj-tabb { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; font-size: calc(12px * var(--font-scale)); font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.pr-pj-tab.on .pr-pj-tabb { color: var(--text-primary); }
.pr-pj-tabb .mi { font-size: 15px; }
.pr-pj-tab .tbtn.xs { width: 28px; height: 28px; min-width: 28px; min-height: 28px; }
.pr-pj-term { margin: 0; padding: 12px 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: calc(12px * var(--font-scale)); line-height: 1.55; white-space: pre-wrap; color: var(--text-primary); }
.pr-pj-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 16px; border-block-end: 1px solid var(--border); }
.pr-pj-row .n { flex: none; width: 24px; text-align: center; font-size: calc(12px * var(--font-scale)); font-weight: 700; color: var(--text-secondary); }
.pr-pj-row .tx { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pr-pj-row .tx b { font-size: calc(13px * var(--font-scale)); font-weight: 600; }
.pr-pj-row .tx span { font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.pr-pj-url { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-block-end: 1px solid var(--border); }
.pr-pj-url .u { flex: 1 1 auto; min-width: 0; min-height: 36px; display: flex; align-items: center; padding: 0 12px; border-radius: 999px; background: color-mix(in srgb, var(--text-secondary) 8%, transparent); font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-pj-prev { padding: 12px 16px; }
.pr-pj-prev pre { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: calc(12px * var(--font-scale)); line-height: 1.55; white-space: pre-wrap; }
.pr-pj-tools .mid { flex: 1 1 auto; display: flex; align-items: center; gap: 8px; font-size: calc(13px * var(--font-scale)); color: var(--text-secondary); }
.pr-pj-phone { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px; }
.pr-pj-phone .pr-cw-pane { padding: 16px; border-radius: 20px; }   /* a canvas card: 16 dp inside, radius 20 (it was 0 and the brief sat on the card's edge; 2026-11-14) */
.pr-pj-h { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: calc(15px * var(--font-scale)); font-weight: 700; }
.pr-pj-h .push { margin-inline-start: auto; font-size: calc(12px * var(--font-scale)); font-weight: 500; color: var(--text-secondary); }
.pr-webcard { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--edge); }
.pr-webcard .tx { flex: 1 1 auto; gap: 4px; }
.pr-webcard .tx b { font-size: calc(15px * var(--font-scale)); }
.pr-webcard .tx span { font-size: calc(13px * var(--font-scale)); line-height: 1.45; color: var(--text-secondary); }

/* ---------- the attempt workspace (04 and 14 on the web, 1024 dp and wider; 2026-10-19): the IDE shell every question kind shares, after learner-v1's practice page.
   The bar over it, then one row: a left pane (Problem · Tables · Questions) that folds to an icon rail (Ctrl+B), the main column (the editor over the console for code,
   the answer area for the other kinds), a right pane (Cases · Result · Helper; code only) that folds to its rail (Ctrl+Alt+B), then the bottom toolbar. Fills the viewport;
   only the panes scroll. Tokens only; classes pr-ws. React: PbCodeWorkspace. Flutter: none (the app keeps 04's card flow). ---------- */
@media (min-width: 1024px) {
  body.pr-wsb .page-wrap { height: 100vh; overflow: hidden; }
  body.pr-wsb .page-wrap > .page-bar { padding: 0 8px; box-shadow: 0 1px 0 var(--border); }   /* outranks page-wide's centred bar and column */
  body.pr-wsb .page-body { padding: 0; gap: 0; min-height: 0; }
  body.pr-wsb .page-body > .page-col { max-width: none; gap: 0; min-height: 0; }
  body.pr-wsb .pr-tools { position: static; margin: 0; padding: 8px 16px; }
}
/* the tablet's two panes (600 to 1023 dp, 14 only, 2026-10-19, proposed): the same shell with the problem pane beside the editor and the cases, result and helper in the console's tabs; 04 keeps its phone page below 1024 */
@media (min-width: 600px) and (max-width: 1023px) {
  body.pc.pr-wsb .page-wrap { height: 100vh; overflow: hidden; }
  body.pc.pr-wsb .page-wrap > .page-bar { padding: 0 8px; box-shadow: 0 1px 0 var(--border); }
  body.pc.pr-wsb .page-body { padding: 0; gap: 0; min-height: 0; }
  body.pc.pr-wsb .page-body > .page-col { max-width: none; gap: 0; min-height: 0; }
  body.pc.pr-wsb .pr-tools { position: static; margin: 0; padding: 8px 16px; }
  .pr-ws-pane.l { width: 272px; }
  body .pr-ws-head .pr-ws-tab, body .pr-ws-main .code-tools .lang, body .pr-ws-main .code-tools .btn { min-height: 44px; min-block-size: 44px; }   /* a tablet is touch: 44 dp targets, the dense 36 and 40 are for the pointer from 1024 dp */
  .pr-ws-head .tbtn, .pr-ws-rail .tbtn { width: 44px; height: 44px; }
  .pr-ws-head .pr-ws-tab:not(.on) { min-width: 44px; justify-content: center; }
  .pr-ws-head { overflow-x: auto; scrollbar-width: none; }
  .pr-ws-head::-webkit-scrollbar { display: none; }
}
@media (min-width: 600px) {
  .pr-ws { flex: 1 1 auto; min-height: 0; display: flex; align-items: stretch; }
  .pr-ws-rail { flex: none; width: 48px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; background: var(--surface); }
  .pr-ws-rail.l { border-inline-end: 1px solid var(--border); } .pr-ws-rail.r { border-inline-start: 1px solid var(--border); }
  .pr-ws-rail .tbtn { width: 40px; height: 40px; box-shadow: none; background: transparent; }
  .pr-ws-rail .tbtn.on { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary-text); }
  .pr-ws-pane { flex: none; width: 380px; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); }
  .pr-ws-pane.l { border-inline-end: 1px solid var(--border); } .pr-ws-pane.r { width: 360px; border-inline-start: 1px solid var(--border); }
  .pr-ws-head { flex: none; height: 52px; display: flex; align-items: center; gap: 2px; padding: 0 8px 0 8px; border-block-end: 1px solid var(--border); }
  .pr-ws-head .push { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 2px; }
  .pr-ws-head .tbtn { width: 40px; height: 40px; box-shadow: none; background: transparent; }
  .pr-ws-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 8px; font-size: calc(13px * var(--font-scale)); font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
  .pr-ws-tab .mi { font-size: 16px; }
  .pr-ws-tab:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); color: var(--text-primary); }
  .pr-ws-tab.on { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary-text); }
  .pr-ws-tab .pc-tcount, .pr-ws-tab .n { min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; box-sizing: border-box; background: var(--primary); color: var(--on-primary); font-size: calc(11px * var(--font-scale)); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
  .pr-ws-tab .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--primary); }   /* the helper has something to say */
  .pr-ws-lab { display: inline-flex; align-items: center; gap: 8px; font-size: calc(13px * var(--font-scale)); font-weight: 700; padding: 0 4px; }
  .pr-ws-lab .mi { font-size: 16px; color: var(--primary-text); }
  .pr-ws-head .sub { font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); padding: 0 8px; }
  .pr-ws-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 16px; }
  .pr-ws-body > h2 { margin: 0 0 8px; font-size: calc(17px * var(--font-scale)); font-weight: 700; line-height: 1.3; }
  .pr-ws-body .pr-cw-kick { margin-bottom: 12px; }
  .pr-ws-body .pr-hp { height: 100%; } .pr-ws-body .pr-hp-log { flex: 1 1 auto; max-height: none; }
  .pr-ws-main { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
  .pr-ws-main .pc-off, .pr-ws-main .pa-off { margin: 8px 12px 0; }
  /* the editor fills the column: the tool row, the file tab, the code, the status bar; VS Code's primary status strip */
  .pr-ws-main .code-frame { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; border-radius: 0; box-shadow: none; background: var(--surface); }
  .pr-ws-main .code-frame:focus-within { box-shadow: none; }
  .pr-ws-main .code-tools { flex: none; min-height: 48px; padding: 8px 12px; }
  .pr-ws-main .code-tools .lang { min-block-size: 40px; }
  .pr-ws-file { flex: none; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-block-end: 1px solid var(--border); font-size: calc(12px * var(--font-scale)); font-weight: 600; color: var(--text-primary); background: color-mix(in srgb, var(--text-secondary) 6%, transparent); }
  .pr-ws-file .mi { font-size: 16px; color: var(--primary-text); }
  .pr-ws-file .st { width: 8px; height: 8px; border-radius: 999px; background: var(--warning); margin-inline-start: 2px; }   /* unsaved changes */
  .pr-ws-file .st.ok { background: transparent; }
  .pr-ws-main .code-body { flex: 1 1 auto; min-block-size: 0; max-block-size: none; background: var(--field-bg); }
  .pr-ws-main .code-ln { min-inline-size: 3ch; padding-inline-start: 8px; } .pr-ws-main .code-ln li { padding-inline-start: 8px; }   /* room for the error mark beside a one-digit number */
  .pr-ws-main .code-src { min-block-size: 100%; }
  .pr-ws-main .code-status { flex: none; background: var(--primary); color: var(--on-primary); border: 0; padding: 4px 12px; font-size: calc(12px * var(--font-scale)); font-weight: 600; }
  /* the console under the editor (Ctrl+J): Console · Problems */
  .pr-ws-con { flex: none; height: 200px; display: flex; flex-direction: column; min-height: 0; border-block-start: 1px solid var(--border); background: var(--surface); }
  .pr-ws-con.fold { height: 52px; }
  .pr-ws-conb { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: calc(12px * var(--font-scale)); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
  .pr-ws-con.fold .pr-ws-conb { display: none; }
  .pr-ws-conb .muted { color: var(--text-secondary); }
  .pr-ws-conb .ok { color: var(--success-text); } .pr-ws-conb .bad { color: var(--error-text); } .pr-ws-conb .warn { color: var(--warning-text); }
  .pr-ws-prob { display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 8px; border-radius: 8px; text-align: start; font: inherit; color: inherit; font-family: var(--font-family); }
  .pr-ws-prob:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
  .pr-ws-prob .mi { font-size: 16px; color: var(--error-text); flex: none; }
  .pr-ws-prob b { white-space: nowrap; }
  .pr-ws-prob .link { margin-inline-start: auto; }
  /* the answer area (MCQ, descriptive, speaking): centred, the text area fills the height */
  .pr-ws-ans { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 24px; }
  .pr-ws-ans > * { width: 100%; max-width: 760px; margin-inline: auto; box-sizing: border-box; }
  .pr-ws-ans .pr-area { flex: 1 1 auto; min-height: 240px; max-width: none; resize: none; }
  .pr-ws-ans .pr-rec { margin-block-start: 16px; }
  .pr-ws-main .pa-hint { display: none; }
  .pr-ws-main .pr-webcard { margin: 24px; }
  .pr-ws-pane .code-case-h { flex-wrap: wrap; } .pr-ws-pane .code-case-h b { white-space: normal; flex-basis: 100%; }   /* in a 360 dp pane the title takes its own line over the status and the meta */
  .pr-ws-pane .code-case-h > .mi { margin-inline-start: auto; }
  .pr-ws-h { flex: none; inline-size: 8px; margin: 0 -4px; cursor: col-resize; z-index: 1; border-radius: 4px; }   /* drag to resize a pane (double-click resets); the console's is a row */
  .pr-ws-h:hover, .pr-ws-h.on { background: color-mix(in srgb, var(--primary) 30%, transparent); }
  .pr-ws-h.v { inline-size: auto; block-size: 8px; margin: -4px 0; cursor: row-resize; }
  .pr-ws-main .code-status .push { margin-inline-start: auto; }
  .pr-ws-nav { display: flex; flex-direction: column; gap: 12px; }
  .pr-ws-nav .pr-nav { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
}
