/* ─────────────────────────────────────────────────────────────────────────
   ui-quiz.css: the practice test pages (core, type-1, type-2, type-3,
   universal). Loads after /ui.css and only uses its tokens.

   Page shape:  .u-hero (breadcrumb, H1, intro, jump row)
                .q-stage (tinted band holding the .pq-bank quiz)
                .q-body.u-wrap > article.u-prose (760px column: content + FAQ)
   All three share the left edge of the 1180px wrap.

   Quiz markup contract (the inline script depends on it): .pq-bank,
   .pq-item[data-multi], .pq-opt[data-correct], .pq-sel / .pq-correct /
   .pq-wrong / .pq-locked, .pq-answer (created on first answer), .pq-progress*,
   .pq-controls, .pq-nav, .pq-result. Option markers are .pq-opt::before.
   Options sit either in a .pq-opts wrapper or straight in the .pq-item
   (universal drops the wrapper to keep its DOM small); both look the same.
   Universal adds .pq-tabs (section switcher in .pq-nav) and .pq-secs (per
   section scores in .pq-result); its script builds both.

   Token rules: small text is 14px or more; orange is never text under 24px;
   orange buttons carry navy text; labels use --ink2 (light) or --nt2 (navy).
   Breakpoints: 480 / 640 / 960.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Hero ── */
.q-hero-in { display: grid; gap: 40px; align-items: start; }
.q-hero-in--data { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); }
.q-hero .breadcrumb { margin-bottom: 22px; }
.q-hero h1 { margin-bottom: 18px; }
.q-hero .q-lede { max-width: 720px; font-size: clamp(1.02rem, .98rem + .25vw, 1.14rem); }
.q-hero .q-lede strong { color: var(--ntext); }

.q-jump {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px;
  margin-top: 28px; max-width: 760px;
}
.q-jump .u-btn { flex-shrink: 0; }
.q-jump-links {
  flex: 1 1 320px; min-width: 0; font-size: 15px; line-height: 2; color: var(--nt2);
}
.q-jump-k {
  font-family: var(--f-mono); font-size: 14px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--nt2); margin-right: 6px;
}
.u-hero .q-jump-links a {
  color: var(--ntext); text-decoration: underline; text-decoration-color: var(--nline2);
  text-decoration-thickness: 1px; text-underline-offset: 4px; white-space: nowrap;
}
.u-hero .q-jump-links a:hover { color: #fff; text-decoration-color: var(--or); text-decoration-thickness: 2px; }
.q-sep { color: var(--nt2); margin: 0 4px; }

/* first-party data panel (in the hero on core, in the prose on type 1 / 3) */
.appdata {
  border: 1px solid var(--line); border-left: 4px solid var(--or); border-radius: 0 var(--r2) var(--r2) 0;
  background: var(--bg2); padding: 20px 22px; margin: 32px 0;
}
.appdata-label {
  font-family: var(--f-mono); font-size: 14px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink2); margin-bottom: 10px; line-height: 1.5;
}
.appdata p { font-size: 15.5px; line-height: 1.65; }
.q-hero .q-data p { font-size: 15px; line-height: 1.6; }
.appdata p + p { margin-top: 10px; }
.u-prose .appdata p + p { margin-top: 10px; }
.appdata .appdata-note { font-size: 14px; color: var(--ink2); }
.q-hero .q-data {
  background: var(--nv3); border: 1px solid var(--nline2); border-top: 3px solid var(--or);
  border-radius: var(--r2); margin: 6px 0 0; padding: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.q-hero .q-data .appdata-label { color: var(--nt2); }
.q-hero .q-data p { color: var(--nt2); }
.q-hero .q-data p strong { color: var(--ntext); }
.q-hero .q-data .appdata-note { color: var(--nt2); padding-top: 12px; border-top: 1px solid var(--nline2); margin-top: 14px; }

/* ── Quiz band ── */
.q-stage {
  background: var(--bg2); border-bottom: 1px solid var(--line);
  padding: clamp(40px, 5vw, 64px) 0 clamp(48px, 6vw, 80px);
}
.pq-bank { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); scroll-margin-top: 84px; }
.pq-bank > * { max-width: 820px; }
.pq-bank .pq-h2 {
  font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.25rem); font-weight: 700; line-height: 1.14;
  color: var(--ink); margin: 0 0 12px;
}
.pq-sub { color: var(--ink2); font-size: 16.5px; line-height: 1.6; margin: 0 0 24px; max-width: 680px; }
.pq-h2 + .pq-progress { margin-top: 20px; }

.pq-progress { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
.pq-progress-track { flex: 1; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.pq-progress-fill { display: block; height: 100%; width: 0; background: var(--or); border-radius: 99px; transition: width .35s ease; }
.pq-progress-txt {
  font-family: var(--f-mono); font-size: 14px; font-weight: 600; color: var(--ink2);
  white-space: nowrap; min-width: 15ch; text-align: right;
}

.pq-list { list-style: none; margin: 0; padding: 0; }
.pq-item {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r3);
  padding: clamp(20px, 3vw, 32px); margin: 0 0 14px;
  box-shadow: 0 1px 2px rgba(15,31,61,.04), 0 12px 32px rgba(15,31,61,.05);
  counter-reset: pq-opt;
}
.pq-q {
  font-family: var(--f-body); font-size: clamp(1.08rem, 1rem + .35vw, 1.25rem); font-weight: 700;
  line-height: 1.45; color: var(--ink); margin: 0 0 20px;
}
.pq-type {
  font-family: var(--f-mono); font-style: normal; font-size: max(14px, .72em); font-weight: 600;
  letter-spacing: .02em; color: var(--ink2); white-space: nowrap;
}

/* options: letter markers drawn by ::before */
.pq-opts { display: flex; flex-direction: column; gap: 10px; margin: 0; counter-reset: pq-opt; }
.pq-item > .pq-opt + .pq-opt { margin-top: 10px; }
.pq-opt {
  counter-increment: pq-opt;
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px;
  text-align: left; padding: 11px 16px 11px 12px;
  background: var(--bg); color: var(--ink); border: 1.5px solid var(--line2); border-radius: var(--r2);
  font-family: var(--f-body); font-size: 16px; font-weight: 500; line-height: 1.45;
  cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.pq-opt::before {
  content: counter(pq-opt, upper-alpha);
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: var(--r);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 14px; font-weight: 600; color: var(--ink2);
  background: var(--bg2); border: 1.5px solid var(--line2);
  background-position: center; background-repeat: no-repeat; background-size: 14px 14px;
  transition: background-color .15s, border-color .15s, color .15s;
}
.pq-opt:hover:not(:disabled) { border-color: var(--or); box-shadow: 0 4px 14px rgba(15,31,61,.06); }
.pq-opt:hover:not(:disabled)::before { border-color: var(--or); color: var(--ink); }
.pq-opt:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
.pq-opt.pq-sel { border-color: var(--or); background: var(--ordim); }
.pq-opt.pq-sel::before { background-color: var(--or); border-color: var(--or); color: var(--nv); }
.pq-opt.pq-locked { cursor: default; }
.pq-opt.pq-locked:not(.pq-correct):not(.pq-wrong) { color: var(--ink2); }
.pq-opt.pq-correct { border-color: var(--green); background: var(--gdim); color: var(--ink); }
.pq-opt.pq-correct::before {
  content: ""; border-color: var(--green); background-color: var(--green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.4 2.4 4.6-5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.pq-opt.pq-wrong { border-color: var(--red); background: var(--rdim); color: var(--ink); }
.pq-opt.pq-wrong::before {
  content: ""; border-color: var(--red); background-color: var(--red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3.5 3.5l5 5M8.5 3.5l-5 5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* explanation, injected by the script after the first answer */
.pq-answer {
  display: none; margin-top: 18px; padding: 16px 18px;
  background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid var(--green);
  border-radius: 0 var(--r2) var(--r2) 0;
}
.pq-a { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.55; }
.pq-a span {
  font-family: var(--f-mono); font-size: 14px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink); margin-right: 4px;
}
.pq-e { margin: 0; font-size: 15px; color: var(--ink2); line-height: 1.65; }

/* prev / counter / next */
.pq-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.pq-controls button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; min-width: 48px; padding: 10px 20px; border-radius: var(--r);
  font-family: var(--f-body); font-size: 16px; font-weight: 700; cursor: pointer;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line2);
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.pq-controls button:hover:not(:disabled) { border-color: var(--ink2); }
.pq-controls .pq-next { background: var(--or); color: var(--nv); border-color: var(--or); }
.pq-controls .pq-next:hover:not(:disabled) { background: var(--or2); border-color: var(--or2); box-shadow: 0 6px 20px var(--orglow); }
.pq-controls button:disabled { opacity: .45; cursor: default; }
.pq-counter { font-family: var(--f-mono); font-size: 14px; font-weight: 600; color: var(--ink2); white-space: nowrap; }

/* question number grid: even 44px+ cells that wrap into more rows on phones */
.pq-nav {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px;
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line);
}
.pq-nav[hidden] { display: none; }
.pq-nav button {
  min-width: 44px; height: 44px; padding: 0 4px; border-radius: var(--r);
  font-family: var(--f-mono); font-size: 14px; font-weight: 600; cursor: pointer;
  background: var(--bg); color: var(--ink2); border: 1px solid var(--line2);
  transition: background .15s, border-color .15s, color .15s;
}
.pq-nav button:hover { border-color: var(--ink2); color: var(--ink); }
.pq-nav button.done { background: var(--gdim); border-color: rgba(22,163,74,.45); color: var(--ink); }
.pq-nav button.active, .pq-nav button.done.active { background: var(--nv); border-color: var(--nv); color: #fff; }
/* universal: one tab per section above that section's numbers */
.pq-nav .pq-tabs {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px;
}
.pq-nav .pq-tabs button { font-family: var(--f-body); font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.pq-nav .pq-tabs button[aria-pressed="true"] { background: var(--nv); border-color: var(--nv); color: #fff; }

/* score card */
.pq-result {
  margin-top: 20px; padding: clamp(24px, 4vw, 36px);
  background: var(--bg); border: 1px solid var(--line); border-top: 4px solid var(--or); border-radius: var(--r3);
  box-shadow: 0 12px 32px rgba(15,31,61,.06);
}
.pq-result-h {
  font-family: var(--f-mono); font-size: 14px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink2); margin: 0 0 10px;
}
.pq-score { font-family: var(--f-head); font-size: clamp(3rem, 2.4rem + 3vw, 4.5rem); font-weight: 700; line-height: 1; margin: 0 0 12px; }
.pq-score.pq-pass { color: var(--green); }
.pq-score.pq-fail { color: var(--red); }
.pq-verdict { margin: 0 0 20px; max-width: 560px; color: var(--ink2); font-size: 16px; line-height: 1.55; }
.pq-retake {
  min-height: 48px; padding: 12px 22px; border-radius: var(--r); border: 1px solid var(--or); cursor: pointer;
  background: var(--or); color: var(--nv); font-family: var(--f-body); font-size: 16px; font-weight: 700;
}
.pq-retake:hover { background: var(--or2); border-color: var(--or2); box-shadow: 0 6px 20px var(--orglow); }

/* universal: per-section scores (each section is graded on its own at 18 of 25) */
.pq-secs { list-style: none; margin: 0 0 24px; padding: 0; max-width: 560px; display: grid; gap: 8px; }
.pq-sec {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 48px; padding: 10px 14px; border-radius: var(--r);
  border: 1px solid var(--line); border-left: 4px solid var(--red); background: var(--rdim);
  font-size: 16px; color: var(--ink);
}
.pq-sec.pq-sec--pass { border-left-color: var(--green); background: var(--gdim); }
.pq-sec-n { font-weight: 700; }
.pq-sec-s { font-family: var(--f-mono); font-size: 15px; font-weight: 600; white-space: nowrap; }

/* "Next step" block the script adds under the score */
.pq-step[hidden] { display: none; }
.pq-step { margin: 4px 0 24px; max-width: 560px; border-top: 1px solid var(--line); padding-top: 20px; }
.pq-step-h {
  font-family: var(--f-mono); font-size: 14px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink2); margin: 0 0 8px;
}
.pq-step-p { margin: 0 0 16px; color: var(--ink2); font-size: 16px; line-height: 1.55; }
.pq-step a {
  display: block; text-align: center; min-height: 48px; padding: 12px 18px; margin-bottom: 10px;
  border-radius: var(--r); font-family: var(--f-body); font-size: 16px; font-weight: 700; text-decoration: none;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.pq-step-main { background: var(--or); color: var(--nv); }
.pq-step-main:hover { background: var(--or2); box-shadow: 0 6px 20px var(--orglow); }
.pq-step-pro { background: var(--bg); color: var(--ink); border: 1px solid var(--line2); }
.pq-step-pro:hover { border-color: var(--ink2); }
.pq-step-pro small { display: block; font-weight: 500; color: var(--ink2); font-size: 14px; margin-top: 2px; }
/* once Next step shows, its link is the one orange action; Retake steps back */
.pq-step:not([hidden]) ~ .pq-retake { background: var(--bg); color: var(--ink); border: 1px solid var(--line2); }
.pq-step:not([hidden]) ~ .pq-retake:hover { background: var(--bg); border-color: var(--ink2); box-shadow: none; }

/* ── 10 sample questions with answers (.u-samples, after Next step) ──
   Markup: section.u-samples > h2 + ol > li > p.u-samples-q + ul.u-samples-opts
   + details (summary, p, p). Numbers come from the list counter, so the
   question text carries none. The summary is a 48px row; opening a
   <details> only grows its own card downward, so nothing above it moves. */
.u-samples > h2 { margin-bottom: 20px; }
.q-body .u-prose > .u-samples:first-child > h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.u-samples > ol { list-style: none; margin: 0; padding: 0; counter-reset: u-sample; display: grid; gap: 14px; }
.u-samples > ol > li {
  counter-increment: u-sample; margin: 0;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r2);
  padding: 20px 20px 4px;
}
.u-samples .u-samples-q { margin: 0 0 12px; font-size: 17px; font-weight: 700; line-height: 1.45; color: var(--ink); }
.u-samples .u-samples-q::before { content: counter(u-sample) ". "; }
/* options are plain lines, not boxes: they are not tappable here */
.u-samples .u-samples-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.u-samples .u-samples-opts li { margin: 0; padding: 0; color: var(--ink); font-size: 16px; line-height: 1.5; }
.u-samples details { margin-top: 12px; border-top: 1px solid var(--line); }
.u-samples summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; padding: 4px 0; font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--ink);
}
.u-samples summary::-webkit-details-marker { display: none; }
.u-samples summary::after { content: "+"; flex: none; font-family: var(--f-mono); font-size: 24px; line-height: 1; color: var(--or2); }
.u-samples details[open] summary::after { content: "\2212"; }
.u-samples summary:hover { text-decoration: underline; text-decoration-color: var(--or); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.u-samples details > p {
  margin: 0; padding: 0 0 8px 14px; border-left: 4px solid var(--green);
  color: #24385c; font-size: 16px; line-height: 1.6;
}
.u-samples details > summary + p { padding-top: 2px; }
.u-samples details > p:last-child { margin-bottom: 16px; padding-bottom: 2px; }
.u-samples details strong { color: var(--ink); }

/* ── Content column ── */
.q-body { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(64px, 8vw, 104px); }
.q-body .u-prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.q-body p > strong:first-child { color: var(--ink); }
.q-body sub, .q-body sup { font-size: 14px; }
.q-body .highlight-box {
  border-left: 4px solid var(--or); background: var(--ordim); border-radius: 0 var(--r2) var(--r2) 0;
  padding: 18px 20px; color: var(--ink); margin-top: 24px;
}
.q-body .highlight-box strong { color: var(--ink); }
.q-body .table-wrap + p, .q-body .highlight-box + p { margin-top: 24px; }
.q-body .table-wrap table { min-width: 560px; }
.q-body .table-wrap.fit table { min-width: 0; }
.q-body td:first-child { font-weight: 600; color: var(--ink); }

/* FAQ: question rows */
.q-faq { margin-top: 56px; }
.q-faq h2 { margin-top: 0; margin-bottom: 8px; }
.q-faq .faq-item { padding: 22px 0; }
.q-faq .faq-item:last-child { border-bottom: 0; }
.q-faq .faq-item h3 { font-family: var(--f-head); font-size: clamp(1.15rem, 1.08rem + .3vw, 1.3rem); margin: 0 0 8px; }
.q-faq .faq-item p { margin: 0; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .q-hero-in--data { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .q-hero .q-data { margin-top: 0; }
}
@media (max-width: 640px) {
  .q-jump { gap: 14px; margin-top: 22px; }
  .q-jump .u-btn { width: 100%; }
  .q-jump-links { flex-basis: 100%; }
  .pq-item { border-radius: var(--r2); }
  .pq-opt { gap: 12px; padding: 10px 12px 10px 10px; }
  .pq-controls { gap: 8px; }
  .pq-controls button { padding: 10px 14px; }
  .q-hero .q-data { padding: 20px; }
  .u-samples > ol > li { padding: 16px 16px 4px; }
}
@media (max-width: 480px) {
  .pq-nav { grid-template-columns: repeat(5, minmax(44px, 1fr)); }
  .pq-nav .pq-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
