/* Shared CSS for the exam engine (site/assets/js/quiz-engine.js): the app
   shell, the question card and the results screen. Shared by every exam page
   under site/<slug>/. Each page still keeps its own <style> block for the
   marketing/landing part (hero, buy card, FAQ...) and its own brand tokens
   (CSS variables), which this file relies on: --surface, --rule, --ink,
   --brand, --s1..--s5, --good, --bad, --mono, --sans, --display, --shadow. */

/* ============ app shell ============ */
.app{display:none;padding:0 0 90px}
.app.on{display:block}
.agrid{display:grid;grid-template-columns:238px 1fr;gap:16px 30px;align-items:start}
.rail{position:sticky;top:66px;display:flex;flex-direction:column;gap:16px}

/* The mode bar sits in the card's column, above the card; the side panels start
   at the bar's height, so every edge falls on a column (6 Nov 2026) */
.agrid.with-bar > .qstrip{grid-column:2;grid-row:1;padding:0}
.agrid.with-bar > .rail{grid-column:1;grid-row:1 / span 2}
.agrid.with-bar > #stage{grid-column:2;grid-row:2}
@media(max-width:980px){
  .agrid{grid-template-columns:1fr;gap:18px}
  /* one column: the bar first, then the panels and the card in their usual order */
  .agrid.with-bar > .qstrip,.agrid.with-bar > .rail,.agrid.with-bar > #stage{grid-column:auto;grid-row:auto}
  .agrid.with-bar > .qstrip{order:0}
  /* the rail stops being a box of its own so its panels can be ordered
     around the question instead of all sitting on top of it */
  .rail{display:contents}
  .panel-status{order:1}
  #stage{order:2}
  .panel-nav{order:3}
  .panel-actions{order:4}
  /* status is one compact row on a phone, not a stacked card.
     !important on the margin because the exam-mode row carries an inline
     margin-top that would reopen the gap this rule is closing. */
  .panel-status{display:flex;align-items:center;gap:6px 14px;flex-wrap:wrap;padding:11px 16px}
  .panel-status h3{margin:0;flex:none}
  .panel-status .timer{font-size:19px;flex:none}
  .panel-status .rstat{padding:0;margin:0 0 0 auto!important;gap:10px;flex:none}
}
.panel{background:var(--surface);border:1px solid var(--rule);border-radius:13px;padding:17px}
.panel h3{font-family:var(--mono);font-size:10.5px;font-weight:600;letter-spacing:.11em;text-transform:uppercase;color:var(--ink-3);margin-bottom:13px}
.timer{font-family:var(--mono);font-size:27px;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.timer.warn{color:var(--bad)}
.rstat{display:flex;justify-content:space-between;font-family:var(--mono);font-size:12px;color:var(--ink-2);padding:4px 0}
.rstat b{color:var(--ink);font-variant-numeric:tabular-nums}
.navg{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.ncell{aspect-ratio:1;min-height:36px;border:1px solid var(--rule);border-radius:6px;font-family:var(--mono);font-size:12px;color:var(--ink-3);display:flex;align-items:center;justify-content:center;position:relative;background:var(--paper);transition:border-color .14s,background .14s}
.ncell:hover{border-color:var(--brand)}
.ncell.cur{outline:2px solid var(--brand);outline-offset:1px;color:var(--ink);font-weight:600}
.ncell.ans{background:var(--surface-2);color:var(--ink)}
.ncell.ok{background:var(--good-soft);border-color:var(--good);color:var(--good)}
.ncell.no{background:var(--bad-soft);border-color:var(--bad);color:var(--bad)}
.ncell.flag::after{content:"";position:absolute;top:-2px;right:-2px;width:6px;height:6px;border-radius:50%;background:var(--accent)}
/* section stripe: sits under the answered/correct/wrong backgrounds rather
   than competing with them, so both readings survive at once */
.ncell::before{content:"";position:absolute;left:3px;right:3px;bottom:2px;height:2.5px;border-radius:2px;background:var(--sc,transparent)}
.ncell.s1{--sc:var(--s1)} .ncell.s2{--sc:var(--s2)} .ncell.s3{--sc:var(--s3)}
.ncell.s4{--sc:var(--s4)} .ncell.s5{--sc:var(--s5)}
.navkey{display:flex;flex-wrap:wrap;gap:8px;margin-top:11px}
.navkey span{display:flex;align-items:center;gap:4px;font-family:var(--mono);font-size:10px;color:var(--ink-3)}
.navkey i{width:9px;height:2.5px;border-radius:2px;display:block}

.qcard{background:var(--surface);border:1px solid var(--rule);border-radius:16px;box-shadow:var(--shadow);overflow:hidden}
/* Card head in two stable zones: what the question is (left, may wrap), where you
   are (right: counter and Flag, always together on the first line) (6 Nov 2026) */
.qhead{display:flex;align-items:center;justify-content:space-between;gap:10px 16px;padding:12px 16px 12px 26px;border-bottom:1px solid var(--rule);background:var(--sunk)}
.qhead-l{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0}
.qhead-r{display:flex;align-items:center;gap:8px;flex:none}
.qhead .fbtn{margin-left:0}
.qcount{font-variant-numeric:tabular-nums;white-space:nowrap}
.chip{font-family:var(--mono);font-size:10.5px;letter-spacing:.06em;padding:4px 9px;border-radius:6px;border:1px solid var(--rule-2);color:var(--ink-2);line-height:1.5}
.chip.dom{background:var(--trace-soft);border-color:transparent;color:var(--trace)}
.chip.H{background:var(--bad-soft);border-color:transparent;color:var(--bad)}
.chip.M{background:var(--brand-soft);border-color:transparent;color:var(--brand)}
.fbtn{margin-left:auto;min-height:44px;display:inline-flex;align-items:center;font-family:var(--mono);font-size:11px;letter-spacing:.07em;text-transform:uppercase;color:var(--ink-3);border:1px solid var(--rule);padding:0 14px;border-radius:7px;transition:.14s}
.fbtn[aria-pressed="true"]{color:var(--accent);border-color:var(--accent);background:var(--accent-soft)}
/* Concept Map link next to Flag: bonus color, opens the map of the question's domain */
.qbody{padding:26px 26px 10px}
.stem{font-size:17px;line-height:1.65;max-width:70ch;color:var(--ink)}
.opts{display:flex;flex-direction:column;gap:8px;margin:22px 0 0}
.opt{display:flex;gap:13px;align-items:flex-start;width:100%;text-align:left;padding:14px 16px;border:1px solid var(--rule);border-radius:11px;background:var(--paper);transition:border-color .15s,background .15s;will-change:transform}
.opt:hover:not(:disabled){border-color:var(--brand);background:var(--surface-2)}
.opt:disabled{cursor:default}
.okey{font-family:var(--mono);font-size:12px;font-weight:600;width:23px;height:23px;flex:none;border:1px solid var(--rule-2);border-radius:6px;display:flex;align-items:center;justify-content:center;color:var(--ink-2);margin-top:1px;transition:.15s}
.opt.sel{border-color:var(--brand);background:var(--brand-soft)}
.opt.sel .okey{background:var(--brand);border-color:var(--brand);color:var(--btn-ink)}
.opt.correct{border-color:var(--good);background:var(--good-soft)}
.opt.correct .okey{background:var(--good);border-color:var(--good);color:var(--paper)}
.opt.wrong{border-color:var(--bad);background:var(--bad-soft)}
.opt.wrong .okey{background:var(--bad);border-color:var(--bad);color:var(--paper)}
.otext{font-size:15.5px;line-height:1.6}

.explain{border-top:1px solid var(--rule);margin-top:24px;padding:22px 26px 28px;background:var(--paper)}
.verdict{display:flex;align-items:center;gap:10px;font-family:var(--display);font-size:24px;letter-spacing:-.01em;margin-bottom:16px}
.verdict.ok{color:var(--good)}
.verdict.no{color:var(--bad)}
.rat{display:flex;flex-direction:column;gap:9px;margin-bottom:18px}
.rat-i{display:grid;grid-template-columns:22px 1fr;gap:12px;font-size:15.5px;color:var(--ink-2);line-height:1.55}
.rat-i .m{font-family:var(--mono);font-size:11.5px;font-weight:600;line-height:1.7;color:var(--ink-3)}
.rat-i.g{color:var(--ink)}
.rat-i.g .m{color:var(--good)}
.reflink{font-family:var(--mono);font-size:11.5px;color:var(--ink-3);margin-top:14px;display:block}
.qfoot{display:flex;gap:10px;align-items:center;padding:17px 26px;border-top:1px solid var(--rule);background:var(--surface)}
.hint{font-family:var(--mono);font-size:10.5px;color:var(--ink-3);margin-left:auto}
@media(max-width:660px){.hint{display:none}.qbody,.explain,.qfoot,.qhead{padding-left:18px;padding-right:18px}
  /* phone, two lines: the section, then difficulty (left) with the counter and Flag (right) */
  .qhead{flex-wrap:wrap;gap:8px}.qhead-l{display:contents}.qhead .chip.dom{flex:1 1 100%}.qhead-r{margin-left:auto}}

/* results */
.res{max-width:880px;margin:0 auto}
.shero{display:grid;grid-template-columns:auto 1fr;gap:36px;align-items:center;background:var(--surface);border:1px solid var(--rule);border-radius:16px;padding:32px;box-shadow:var(--shadow)}
@media(max-width:640px){.shero{grid-template-columns:1fr;gap:20px}}
.snum{font-family:var(--display);font-size:78px;line-height:.9;font-variant-numeric:tabular-nums;letter-spacing:-.03em}
.pill{display:inline-block;font-family:var(--mono);font-size:10.5px;letter-spacing:.11em;text-transform:uppercase;padding:6px 12px;border-radius:999px;margin-top:14px}
.pill.ok{background:var(--good-soft);color:var(--good)}
.pill.no{background:var(--bad-soft);color:var(--bad)}
.bars{display:flex;flex-direction:column;gap:15px;margin-top:30px}
.btop{display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-size:14.5px}
.btop b{font-weight:600}
.btop span{font-family:var(--mono);font-size:12px;color:var(--ink-3);font-variant-numeric:tabular-nums}
.track{height:11px;background:var(--surface-2);border-radius:6px;position:relative;overflow:hidden;margin-top:7px}
.track i{display:block;height:100%;border-radius:6px;transform-origin:left center}
.thr{position:absolute;top:-4px;bottom:-4px;left:70%;width:1px;background:var(--ink-3)}


/* ============ quiz bar: modes, submit, unlock ============
   Built by the engine (drawBar) as the first thing of the quiz area, right
   under the page's top bar (which carries the study-tool tabs). Static: it
   scrolls away with the page. A phone shows the same bar, compact. */
/* one spacing step above and below the bar: exam title, bar, columns (6 Nov 2026) */
.qstrip{padding:16px 0}
.qstrip-in{position:relative}
.qbar{display:flex;align-items:center;gap:8px;min-width:0}
.qbar[hidden]{display:none}
.qseg{display:flex;gap:4px;padding:3px;background:var(--surface-2);border:1px solid var(--rule);border-radius:10px}
.qseg-b{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:0;min-height:44px;padding:3px 12px;cursor:pointer;
  background:transparent;border:1px solid transparent;border-radius:7px;color:var(--ink);font:inherit;text-align:left;transition:border-color .14s,background .14s}
.qseg-b:hover{border-color:var(--rule-2)}
.qseg-b:focus-visible,.mode-sec:focus-visible,.qcta:focus-visible,.qsubmit:focus-visible,.wall-back:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
.qseg-b.on{background:var(--paper);border-color:var(--brand);box-shadow:var(--shadow)}
.qn{font-size:13px;font-weight:700;line-height:1.25}
.qn .sm{display:none}
.qseg-b.on .qn{color:var(--brand)}
.qs{font-family:var(--mono);font-size:10px;color:var(--ink-3);line-height:1.25;white-space:nowrap}
.qsubmit{min-height:44px;padding:0 16px;border-radius:9px;background:var(--brand);color:var(--btn-ink);font-weight:700;font-size:13.5px;border:1px solid transparent;cursor:pointer;white-space:nowrap}
.qsubmit:hover{background:var(--brand-hi)}
.qcta{margin-left:auto;align-self:stretch;display:inline-flex;align-items:center;gap:7px;min-height:44px;padding:0 16px;border-radius:10px;cursor:pointer;white-space:nowrap;
  background:var(--brand-soft);color:var(--brand);border:1px solid color-mix(in srgb,var(--brand) 40%,transparent);font-size:13px;font-weight:700}
.qcta:hover{border-color:var(--brand)}
.qcta .sm{display:none}
.lk{flex:none}

/* popover under the bar: section list, "leave the mock?", "submit anyway?" */
.qpop{position:absolute;top:100%;left:28px;width:min(440px,calc(100vw - 24px));margin-top:6px;z-index:70;
  background:var(--surface);border:1px solid var(--rule-2);border-radius:13px;box-shadow:var(--shadow);padding:14px}
.qpop[hidden]{display:none}
.qpop p{font-size:14.5px;line-height:1.5;margin:0 0 11px}
.qpop-b{display:flex;gap:8px;flex-wrap:wrap}
.qpop-b .btn{min-height:44px;padding:0 16px;font-size:13.5px}
.qpop-secs{display:grid;gap:6px}
.mode-sec{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;text-align:left;min-height:44px;padding:6px 10px;
  background:var(--paper);border:1px solid var(--rule);border-radius:8px;color:var(--ink);font:inherit;font-size:13px;cursor:pointer}
.mode-sec:hover:not(:disabled){border-color:var(--brand)}
.mode-sec.on{border-color:var(--brand);background:var(--brand-soft)}
.mode-sec:disabled{opacity:.55;cursor:not-allowed}
.mode-sn{font-family:var(--mono);font-size:11px;font-weight:600;color:var(--brand)}
.mode-sname{min-width:0;font-weight:600;line-height:1.25}
.mode-sq{font-family:var(--mono);font-size:11px;color:var(--ink-3)}

/* section chips in the left column during a drill */
.panel-chips{padding:14px}
.panel-chips h3{margin-bottom:10px}
.mode-chips{display:flex;flex-wrap:wrap;gap:6px}
.mode-chip{display:inline-flex;align-items:center;gap:6px;min-height:44px;min-width:44px;padding:0 10px;justify-content:center;cursor:pointer;
  background:var(--paper);border:1px solid var(--rule);border-radius:8px;color:var(--ink);font-family:var(--mono);font-size:12px;font-weight:600}
.mode-chip i{width:9px;height:9px;border-radius:50%;background:var(--cc)}
.mode-chip:hover:not(:disabled){border-color:var(--cc)}
.mode-chip.on{border-color:var(--cc);box-shadow:inset 0 0 0 1px var(--cc);background:var(--surface-2)}
.mode-chip:disabled{opacity:.5;cursor:not-allowed}
.mode-chip:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
.rsec b{text-align:right;max-width:70%}

/* Submit exam inside the timer card (a desktop; the bar carries it on a phone) */
.rsubmit{width:100%;justify-content:center;margin-top:13px;min-height:44px}

@media(max-width:820px){
  /* top bar during a session: logo mark only, so Exit and Theme stay beside it */
  .topbar-in.in-quiz{gap:10px}
  .topbar-in.in-quiz .brand{font-size:0;gap:0}
  .topbar-in.in-quiz .tbtn{padding:0 12px}
}
@media(max-width:980px){
  /* the bar takes the full width */
  .qbar{width:100%}
  .qstrip{padding:10px 0 2px}
  .qseg{flex:1 1 0;min-width:0}
  .qseg-b{flex:1 1 0;min-width:0;align-items:center;text-align:center;padding:3px 4px}
  .qn .lg{display:none}
  .qn .sm{display:inline}
  .qs{display:none}
  .qsubmit,.qcta{flex:none;padding:0 12px}
  .qcta .lg{display:none}
  .qcta .sm{display:inline}
  .panel-chips{order:0;padding:10px 12px}
  .panel-chips h3{display:none}
  .rsubmit{display:none!important}
  .qpop{left:0;right:0;width:auto}
}
@media(min-width:981px){
  .qsubmit{display:none}
}

/* ============ navigator: locked cells (free visitors) ============ */
.ncell.lock{background:var(--surface-2);border-style:dashed;color:var(--ink-3);opacity:.8;cursor:pointer}
.ncell.lock:hover{opacity:1;border-color:var(--brand);color:var(--brand)}
.nmore{grid-column:1/-1;min-height:36px;border:1px dashed var(--rule-2);border-radius:6px;background:var(--surface-2);color:var(--ink-3);
  font-family:var(--mono);font-size:12px;cursor:pointer}
.nmore:hover{border-color:var(--brand);color:var(--brand)}

/* ============ unlock screen and the unlock block of the results ============ */
.wall-card{padding:0}
.wall{padding:34px 34px 30px;max-width:640px}
.wall-inline{margin-top:34px;background:var(--surface);border:1px solid var(--rule);border-radius:16px;box-shadow:var(--shadow)}
.wall-eyebrow{display:inline-flex;align-items:center;gap:8px;font-family:var(--mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--brand);
  background:var(--brand-soft);padding:6px 12px;border-radius:999px}
.wall-h{font-size:clamp(26px,4vw,34px);line-height:1.15;margin:18px 0 16px}
.wall-kit{margin:0 0 12px;font-size:16px;font-weight:600;color:var(--ink)}
.wall-list li b{font-weight:700;color:var(--ink)}
.wall-list{list-style:none;margin:0 0 18px;padding:0;display:grid;gap:9px}
.wall-list li{position:relative;padding-left:26px;font-size:15.5px;line-height:1.5;color:var(--ink)}
.wall-list li::before{content:"";position:absolute;left:3px;top:.42em;width:12px;height:7px;border-left:2.5px solid var(--good);border-bottom:2.5px solid var(--good);transform:rotate(-45deg)}
.wall-price{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:18px}
.wall-price b{font-family:var(--display);font-weight:400;font-size:40px;line-height:1;color:var(--brand);letter-spacing:-.02em}
.wall-price span{font-family:var(--mono);font-size:11.5px;color:var(--ink-3)}
.wall-cta{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px}
.wall-cta .btn{min-height:48px;justify-content:center;text-decoration:none}
.wall-cta .wall-buy{min-height:54px;padding:0 30px;font-size:16.5px}

/* The Study Kit tiles are drawn and styled by assets/js/study-kit.js (5 Nov 2026) */
.wall{max-width:760px}
.wall-tiles{min-height:40px}

/* "I already have a key": a quiet link, so the buy button is the one clear action */
.wall-keylink{min-height:44px;padding:0 4px;background:none;border:0;color:var(--ink-2);font:inherit;font-size:14.5px;cursor:pointer;
  text-decoration:underline;text-underline-offset:3px}
.wall-keylink:hover{color:var(--brand)}
.wall-keylink:focus-visible{outline:3px solid var(--brand);outline-offset:2px}

/* Phone: one tile per row, screenshot on the left, text on the right */
@media(max-width:660px){
  .wall-cta .wall-buy{flex:1 1 100%}
  .wall-keylink{margin:0 auto}
}
.wall-key{margin-top:16px;display:flex;flex-direction:column;gap:8px}
.wall-key label{font-family:var(--mono);font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--ink-3)}
.wall-key-row{display:flex;gap:8px;flex-wrap:wrap}
.wall-key input{flex:1 1 220px;min-width:0;font-family:var(--mono);font-size:14px;min-height:48px;padding:0 14px;color:var(--ink);background:var(--paper);border:1px solid var(--rule-2);border-radius:10px}
.wall-key input:focus{border-color:var(--brand);outline:none}
.wall-key input[aria-invalid="true"]{border-color:var(--bad)}
.wall-key .btn{min-height:48px;justify-content:center}
.wall-msg{margin:0;font-size:14.5px;line-height:1.5;min-height:1.5em}
.wall-msg.bad{color:var(--bad)}
.wall-back{display:inline-flex;align-items:center;min-height:44px;margin-top:14px;padding:0;background:none;border:0;color:var(--ink-2);font:inherit;font-size:14.5px;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.wall-back:hover{color:var(--brand)}
@media(max-width:660px){.wall{padding:24px 18px 22px}.wall-cta .btn{flex:1 1 100%}}

/* ============ exam identity tags (vendor, exam name, official code) ============
   One row, written into the pages by tools/build-content.js from the catalog
   (tagVendor, tagExam, examCode). Same rules in assets/css/trap-map.css. */
.exam-tags{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px}
.etag{font-family:var(--mono);font-size:10.5px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;line-height:1;color:var(--ink-2);background:var(--surface-2,var(--surface));border:1px solid var(--rule);padding:5px 9px;border-radius:999px;white-space:nowrap}
.etag-vendor{color:var(--brand);border-color:color-mix(in srgb,var(--brand) 40%,transparent)}
.etag-new{background:transparent;color:var(--brand);border-color:var(--brand)}
.etag-code{background:transparent;color:var(--ink);border-color:var(--ink-3,var(--rule))}
.app-tags{padding-top:20px;padding-bottom:0}
/* .wrap.app-tags beats the page's own .wrap padding: one 16 px step to the mode bar */
.wrap.app-tags{padding-bottom:16px}            /* exam title first in the quiz, the mode bar under it */
.app-tags .exam-pill{margin-bottom:0}
/* The exam pill, same look as the product page hero (also used at the top of the quiz) */
.exam-pill{display:inline-block;margin:0 0 14px;padding:8px 18px;border-radius:999px;background:var(--brand);color:var(--btn-ink,#fff);font-family:var(--sans);font-size:14.5px;font-weight:700;line-height:1.3}
.exam-pill .nowrap{white-space:nowrap}
@media(max-width:560px){.exam-pill{font-size:13px;padding:7px 14px}}
/* Theme button: a sun (light) or moon (dark) instead of the word */
.tbtn-icon{padding:0;width:44px;justify-content:center}
.tbtn-icon .ti{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ti-moon{display:none}
:root[data-theme="dark"] .ti-sun{display:none}
:root[data-theme="dark"] .ti-moon{display:block}
