/* ==========================================================================
   AyeTech quizzes: the self-checks under /quiz/ (linked from Resources).
   Loaded only by those pages, with /quiz.js.

   - The questions are plain radio groups in the page, so they read and work
     without the script: every question shows, and a "no" or "not sure"
     reveals what to do about it (:has()).
   - Each page adds class "quiz-js" to <html> in the head. That turns the list
     into a one-question-at-a-time stepper before first paint, so nothing
     shifts when /quiz.js arrives. If the script fails to load, its onerror
     takes the class off again and the plain list comes back.
   - All questions share one grid cell, so the card keeps the height of the
     tallest question and the page below it never moves between steps.
   - Nothing moves until the visitor answers something: every animation sits
     behind .is-live (first answer) or .is-in (result shown), and behind
     prefers-reduced-motion. Lighthouse never answers, so it never sees one.
   - Colours by answer, used the same way in the options, the track, the
     ring, the key and the gap cards: yes is green, no is deep coral, not
     sure is a hatch (a pattern, so it doesn't lean on colour alone).
   ========================================================================== */

.quiz {
  --q-yes-tint: #E8F2EA;
  --q-no-tint: #FDEBE6;
  --q-no-ink: #A33318;
  --q-on-green: #fff;
  --q-hatch-ink: rgba(92, 84, 74, 0.6);
  --q-hatch: repeating-linear-gradient(135deg, var(--q-hatch-ink) 0 2px, transparent 2px 4.5px);
  --q-ok-bg: rgba(30, 127, 79, 0.07);
  --q-track: var(--paper-2);
  --q-shadow: 0 12px 32px rgba(23, 19, 14, 0.08);
  --q-ease: cubic-bezier(0.2, 0.75, 0.25, 1);
}

.quiz-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
/* The result is much taller than a question, so the cards follow it down. */
.quiz-layout > .quiz-aside { padding-top: 12px; position: sticky; top: calc(var(--header-h) + 24px); }

.quiz {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 24px;
  padding: 36px; box-shadow: var(--q-shadow);
}
/* The script shows and hides parts with the hidden attribute; the display
   rules below must not win over it. */
.quiz [hidden], .quiz-sent[hidden] { display: none !important; }

/* Hero facts row */
.quiz-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px; font-size: 0.9375rem; color: var(--ink-2); }
.quiz-facts li { display: inline-flex; align-items: center; gap: 8px; }
.quiz-facts svg { stroke: var(--coral-deep); flex-shrink: 0; }

/* ---------- Progress: one segment per question ---------- */
.quiz-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.quiz-progress { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.quiz-bar { flex: 0 1 280px; display: flex; gap: 5px; height: 8px; }
.quiz-bar i { position: relative; flex: 1; border-radius: 999px; background: var(--q-track); }
.quiz-bar i.yes { background: var(--green); }
.quiz-bar i.no { background: var(--coral-deep); }
.quiz-bar i.unsure { background: var(--q-hatch), var(--q-track); }
.quiz-bar i.is-current { box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--ink); }
.quiz-bar i.can-go { cursor: pointer; }
/* A taller hit area than the 8px bar. */
.quiz-bar i.can-go::before { content: ""; position: absolute; inset: -10px -2px; }
@media (hover: hover) {
  .quiz-bar i.can-go:hover { translate: 0 -1px; box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--line); }
}

/* ---------- Questions ---------- */
.quiz-qs { list-style: none; }
.quiz-q + .quiz-q { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--line); }
.quiz-q fieldset { border: 0; min-width: 0; }
.quiz-topic {
  display: flex; align-items: center; gap: 9px; margin-bottom: 12px;
  font-size: 0.875rem; font-weight: 600; line-height: 1.4; color: var(--coral-deep);
}
.quiz-topic::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.quiz-q legend {
  padding: 0; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem); letter-spacing: -0.015em; line-height: 1.25;
  text-wrap: balance;
}
.quiz-hint { margin-top: 10px; max-width: 44em; font-size: 0.9375rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }

/* ---------- Answer buttons ---------- */
.quiz-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.quiz-opt { position: relative; display: block; }
.quiz-opt input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; margin: 0; }
.quiz-opt > span {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 12px 14px 12px 12px;
  border: 1.5px solid var(--field-border); border-radius: 14px; background: var(--field);
  font-size: 1rem; font-weight: 600; line-height: 1.2; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
/* Hover only where there is a real pointer: on touch screens a tapped spot
   keeps :hover, and the next question's button in that spot would light up. */
@media (hover: hover) {
  .quiz-opt > span:hover { border-color: var(--ink); box-shadow: 0 6px 16px rgba(23, 19, 14, 0.08); }
}
.quiz-opt input:focus-visible + span { outline: 2px solid var(--coral-deep); outline-offset: 3px; }

/* The icon: a tinted disc with a glyph cut from a mask, coloured by answer. */
.quiz-ico {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--tint); color: var(--tone);
  transition: background 0.15s ease, color 0.15s ease;
}
.quiz-ico::before {
  content: ""; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: var(--glyph) center / contain no-repeat; mask: var(--glyph) center / contain no-repeat;
}
.quiz-opt input[value="yes"] + span {
  --tone: var(--green); --tint: var(--q-yes-tint); --solid: var(--green); --on-solid: var(--q-on-green);
  --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}
.quiz-opt input[value="no"] + span {
  --tone: var(--coral-deep); --tint: var(--q-no-tint); --solid: var(--coral); --on-solid: var(--on-coral);
  --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");
}
.quiz-opt input[value="unsure"] + span {
  --tone: var(--ink-2); --tint: var(--paper-2); --solid: var(--paper); --on-solid: var(--ink);
  --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.6 8.6a3.5 3.5 0 0 1 6.8 1.2c0 2.3-3.4 3.2-3.4 3.2'/%3E%3Cpath d='M12 18.2h.01'/%3E%3C/svg%3E");
}

/* Key hints, for mouse-and-keyboard screens only, and only with the script. */
.quiz-opt kbd {
  display: none; margin-left: auto; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 7px;
  place-items: center; border: 1px solid var(--line); background: var(--paper);
  font: 600 0.75rem/1 var(--font-body); color: var(--ink-2);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  html.quiz-js .quiz-opt kbd { display: inline-grid; }
}

.quiz-opt input:checked + span {
  background: var(--ink); border-color: var(--ink); color: var(--paper);
  box-shadow: 0 8px 20px rgba(23, 19, 14, 0.16);
}
.quiz-opt input:checked + span .quiz-ico { background: var(--solid); color: var(--on-solid); }
.quiz-opt input:checked + span kbd { background: transparent; border-color: rgba(250, 247, 242, 0.3); color: var(--paper); }

/* What to do about a "no" or "not sure". In the plain list it opens under the
   question; in the stepper it is held back for the result. The :has() rules
   are scoped to the plain list because their specificity would otherwise
   beat the stepper's hide rule. */
.quiz-fix { margin-top: 18px; padding: 16px 18px; border-radius: 14px; background: var(--paper-2); font-size: 0.9375rem; line-height: 1.65; color: var(--ink-2); }
.quiz-fix p + p { margin-top: 8px; }
.quiz-fix .quiz-src { font-size: 0.8125rem; }
.quiz-q .quiz-fix { display: none; }
html:not(.quiz-js) .quiz-q:has(input[value="no"]:checked) .quiz-fix,
html:not(.quiz-js) .quiz-q:has(input[value="unsure"]:checked) .quiz-fix { display: block; }

/* ---------- Back / Next ---------- */
.quiz-nav {
  display: none; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line-soft);
}
.quiz-back {
  display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 10px 4px;
  font-family: var(--font-body); font-size: 0.9375rem; font-weight: 600; color: var(--ink-2); cursor: pointer;
  transition: color 0.15s ease;
}
.quiz-back:hover { color: var(--ink); }
.quiz-back svg { transition: translate 0.2s ease; }
.quiz-back:hover svg { translate: -3px 0; }
.quiz-back:disabled { visibility: hidden; }
.quiz-link {
  background: none; border: 0; padding: 10px 4px; font-family: var(--font-body); font-size: 0.9375rem; font-weight: 600;
  color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px;
}
.quiz-link:hover { text-decoration-color: currentColor; }
.quiz-next { padding: 14px 26px; font-size: 1rem; }
.quiz-next svg { transition: translate 0.2s ease; }
.quiz-next:not(:disabled):hover svg { translate: 3px 0; }
.quiz-next:disabled { opacity: 0.35; cursor: not-allowed; translate: none; }

/* ---------- Stepper (script running) ---------- */
html.quiz-js .quiz-head { display: flex; }
html.quiz-js .quiz-nav { display: flex; }
html.quiz-js .quiz-qs { display: grid; }
html.quiz-js .quiz-q { grid-area: 1 / 1; margin: 0; padding: 0; border: 0; visibility: hidden; }
html.quiz-js .quiz-q.is-current { visibility: visible; }
html:not(.quiz-js) .quiz-head { display: none; }

/* ---------- Result ---------- */
.quiz-result:focus, .quiz-result h3:focus { outline: none; }
.quiz-stamp { display: none; }
.quiz-result h3 {
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--coral-deep); font-family: var(--font-body);
}

.quiz-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 36px; margin-top: 20px; }
.quiz-dial { position: relative; width: 176px; aspect-ratio: 1; }
.quiz-ring, .quiz-ring svg { display: block; width: 100%; height: 100%; }
.quiz-ring svg { rotate: -90deg; overflow: visible; color: var(--q-hatch-ink); }
.quiz-ring-base { fill: none; stroke: var(--q-track); stroke-width: 12; }
.quiz-arc { fill: none; stroke-width: 12; }
.quiz-arc.yes { stroke: var(--green); }
.quiz-arc.no { stroke: var(--coral-deep); }
.quiz-score {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; text-align: center;
}
.quiz-score b {
  font-family: var(--font-display); font-weight: 800; font-size: 3.5rem; letter-spacing: -0.03em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.quiz-score span { max-width: 7.5em; font-size: 0.8125rem; font-weight: 500; line-height: 1.3; color: var(--ink-2); }

.quiz-band { max-width: 36em; font-size: 1.1875rem; font-weight: 500; line-height: 1.55; text-wrap: pretty; }
.quiz-key { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; font-size: 0.875rem; color: var(--ink-2); }
.quiz-key > span { display: inline-flex; align-items: center; gap: 7px; }
.quiz-key b { color: var(--ink); font-weight: 700; }
.quiz-key i { width: 18px; height: 8px; border-radius: 999px; }
.quiz-key .yes { background: var(--green); }
.quiz-key .no { background: var(--coral-deep); }
.quiz-key .unsure { background: var(--q-hatch), var(--q-track); }

.quiz-sub { margin-top: 40px; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.015em; }

/* Gaps, numbered in the order to look at them. */
.quiz-gaps ol, .quiz-gaps ul { list-style: none; counter-reset: gap; display: grid; gap: 12px; margin-top: 16px; }
.quiz-gap {
  position: relative; counter-increment: gap; padding: 18px 20px 16px 66px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
}
.quiz-gap::before {
  content: counter(gap); position: absolute; left: 18px; top: 15px;
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  font: 700 0.9375rem/1 var(--font-display); font-variant-numeric: tabular-nums;
}
.quiz-gap.no::before { background: var(--q-no-tint); color: var(--q-no-ink); }
.quiz-gap.unsure::before { background: var(--paper-2); color: var(--ink); border: 1.5px dashed var(--field-border); }
.quiz-gap-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; }
.quiz-gap-top strong { font-size: 1.0625rem; font-weight: 600; line-height: 1.35; }
.quiz-gap .quiz-fix { margin-top: 6px; padding: 0; background: none; }
.quiz-change {
  display: inline-flex; margin-top: 10px; padding: 4px 0; background: none; border: 0; cursor: pointer;
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px;
}
.quiz-change:hover { text-decoration-color: currentColor; }

.quiz-pill { display: inline-flex; align-items: center; flex-shrink: 0; border-radius: 999px; padding: 3px 10px; font-size: 0.75rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.quiz-pill.no { background: var(--q-no-tint); color: var(--q-no-ink); }
.quiz-pill.unsure { background: var(--paper-2); color: var(--ink-2); border: 1px dashed var(--field-border); }

.quiz-ok ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 16px; }
.quiz-ok li { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--q-ok-bg); font-size: 0.9375rem; line-height: 1.4; }
.quiz-ok li svg { flex-shrink: 0; margin-top: 2px; stroke: var(--green); }

.quiz-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line-soft);
}
.quiz-actions .btn-ghost { background: none; font-family: var(--font-body); cursor: pointer; padding: 14px 24px; font-size: 1rem; }
.quiz-private { margin-top: 18px; }

/* ---------- Motion (only after an answer, never under reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .quiz.is-live .quiz-q.is-current { animation: quiz-in 0.34s var(--q-ease); }
  .quiz.is-live[data-dir="back"] .quiz-q.is-current { animation-name: quiz-back; }
  .quiz.is-live .quiz-opt input:checked + span .quiz-ico { animation: quiz-pick 0.34s cubic-bezier(0.3, 1.6, 0.5, 1); }
  .quiz.is-live .quiz-bar i { transition: background-color 0.25s ease, box-shadow 0.2s ease, translate 0.15s ease; }
  .quiz-result.is-in .quiz-summary,
  .quiz-result.is-in .quiz-gaps .quiz-sub,
  .quiz-result.is-in .quiz-gap,
  .quiz-result.is-in .quiz-ok,
  .quiz-result.is-in .quiz-actions { animation: quiz-rise 0.5s var(--q-ease) backwards; }
  .quiz-result.is-in .quiz-gaps .quiz-sub { animation-delay: 120ms; }
  .quiz-result.is-in .quiz-gap { animation-delay: calc(180ms + var(--n, 0) * 60ms); }
  .quiz-result.is-in .quiz-ok { animation-delay: 300ms; }
  .quiz-result.is-in .quiz-actions { animation-delay: 360ms; }
  .quiz-result.is-in .quiz-arc { animation: quiz-arc 0.55s cubic-bezier(0.3, 0.7, 0.3, 1) backwards; }
}
@keyframes quiz-in { from { opacity: 0; translate: 28px 0; } }
@keyframes quiz-back { from { opacity: 0; translate: -28px 0; } }
@keyframes quiz-pick { from { scale: 0.5; } }
@keyframes quiz-rise { from { opacity: 0; translate: 0 14px; } }
@keyframes quiz-arc { from { stroke-dasharray: 0 400; } }

/* ---------- Enquiry form: the answers that go with it ---------- */
.quiz-sent { border: 1px dashed var(--field-border); border-radius: 12px; padding: 12px 14px; font-size: 0.875rem; color: var(--ink-2); }
.quiz-sent summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.quiz-sent pre { margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-body); font-size: 0.875rem; line-height: 1.6; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .quiz-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .quiz-layout > .quiz-aside { max-width: 460px; padding-top: 0; position: static; }
}
@media (max-width: 768px) {
  .quiz { padding: 24px 20px; border-radius: 20px; }
  .quiz-head { margin-bottom: 22px; }
  .quiz-bar { flex-basis: 150px; gap: 4px; }
  .quiz-summary { gap: 24px; }
  .quiz-dial { width: 150px; }
  .quiz-score b { font-size: 3rem; }
  .quiz-actions .btn-coral, .quiz-actions .btn-ghost { width: 100%; justify-content: center; }
}
@media (max-width: 560px) {
  .quiz-opts { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 20px; }
  .quiz-opt > span { min-height: 56px; }
  .quiz-nav { margin-top: 22px; padding-top: 18px; }
  .quiz-summary { grid-template-columns: minmax(0, 1fr); }
  .quiz-dial { justify-self: center; }
  .quiz-band { font-size: 1.0625rem; }
  .quiz-gap { padding: 16px 16px 14px 58px; }
  .quiz-gap::before { left: 14px; top: 14px; width: 30px; height: 30px; }
  .quiz-gap-top { flex-wrap: wrap; gap: 6px 12px; }
}

/* ---------- Dark mode ---------- */
[data-theme="dark"] .quiz {
  --q-yes-tint: rgba(76, 175, 125, 0.16);
  --q-no-tint: rgba(240, 100, 73, 0.15);
  --q-no-ink: #FFA78F;
  --q-on-green: #14110C;
  --q-hatch-ink: rgba(181, 168, 150, 0.6);
  --q-ok-bg: rgba(76, 175, 125, 0.1);
  --q-track: rgba(242, 235, 225, 0.1);
  --q-shadow: none;
}
[data-theme="dark"] .quiz-opt > span,
[data-theme="dark"] .quiz-opt input:checked + span { box-shadow: none !important; }
[data-theme="dark"] .quiz-opt input:checked + span kbd { border-color: rgba(20, 17, 12, 0.3); }

/* ---------- Long questionnaires (.quiz-long): a finer track, the section
   name over each question, a notice that the answers are self-reported, a
   name for the printed report and the full answer table. ---------- */
.quiz-long .quiz-head { flex-wrap: wrap; }
.quiz-long .quiz-bar { flex: 1 1 100%; gap: 1.5px; }
.quiz-long .quiz-bar i { border-radius: 2px; }
.quiz-notice { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: var(--paper-2); border: 1px solid var(--line); font-size: 0.9375rem; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.quiz-notice strong { color: var(--ink); }
.quiz-for { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; max-width: 420px; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.quiz-for input { font: inherit; font-weight: 400; font-size: 1rem; color: var(--ink); background: var(--field, var(--card)); border: 1px solid var(--field-border, var(--line)); border-radius: 10px; padding: 10px 12px; }
.quiz-pill.yes { background: var(--q-yes-tint); color: var(--green); }
.quiz-parts { margin: 14px 0 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px; font-size: 0.9375rem; color: var(--ink-2); }
.quiz-parts li::marker { color: var(--coral-deep); font-weight: 600; }
.quiz-sev { display: inline-flex; align-items: center; flex-shrink: 0; border-radius: 6px; padding: 2px 8px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; border: 1px solid currentColor; }
.quiz-sev.c { color: var(--q-no-ink, #A33318); }
.quiz-sev.h { color: var(--coral-deep); }
.quiz-sev.m { color: var(--ink-2); }
.quiz-brand { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 2px solid var(--coral-deep); }
.quiz-brand img { width: 75px; height: auto; }
.quiz-brand p { margin: 0; font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); text-align: right; }
.quiz-brand p b { color: var(--ink); }
.quiz-free { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px; background: var(--q-yes-tint); color: var(--green); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.quiz-stats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 14px; font-size: 0.9375rem; color: var(--ink-2); }
.quiz-stats b { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); margin-right: 4px; }
.quiz-parts-table { margin-top: 8px; }
.quiz-parts-table table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; margin-top: 16px; }
.quiz-parts-table th, .quiz-parts-table td { padding: 8px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; font-weight: 400; }
.quiz-parts-table th { width: 38%; padding-right: 12px; color: var(--ink); }
.quiz-part-bar { width: 34%; padding-right: 14px; }
.quiz-part-track { display: block; height: 8px; border-radius: 999px; background: var(--q-track); overflow: hidden; }
.quiz-part-track i { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.quiz-part-n { white-space: nowrap; color: var(--ink-2); padding-right: 12px; }
.quiz-part-c { white-space: nowrap; color: var(--q-no-ink, #A33318); font-weight: 600; text-align: right; }
.quiz-legal { margin-top: 36px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; font-size: 0.8125rem; line-height: 1.6; color: var(--ink-2); }
.quiz-legal p { margin: 0; }
.quiz-legal p + p { margin-top: 8px; }
.quiz-legal strong { color: var(--ink); }
@media (max-width: 560px) {
  .quiz-brand p { text-align: left; }
  .quiz-parts-table th { width: auto; }
  .quiz-part-bar { display: none; }
}
/* Two versions of one check (quick and full): a pair of cards under the hero,
   the current page's card marked, and the line that says answers came across. */
.quiz-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 28px; max-width: 760px; }
.quiz-mode { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 0.9375rem; line-height: 1.45; transition: border-color 0.15s ease; }
.quiz-mode b { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 600; color: var(--ink); }
.quiz-mode:hover { border-color: var(--ink); }
.quiz-mode:focus-visible { outline: 2px solid var(--coral-deep); outline-offset: 3px; }
.quiz-mode.is-current { border: 2px solid var(--coral-deep); padding: 17px 19px; }
.quiz-mode-tag { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.quiz-mode.is-current .quiz-mode-tag { color: var(--coral-deep); }
.quiz-modes-note { grid-column: 1 / -1; margin: 0; font-size: 0.9375rem; color: var(--ink-2); }
.quiz-carried { flex: 1 1 100%; margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--q-yes-tint); color: var(--ink); font-size: 0.9375rem; line-height: 1.5; }
@media (max-width: 560px) {
  .quiz-modes { grid-template-columns: minmax(0, 1fr); }
}
/* Under the hero and the quiz: the date the page was last updated, and the
   table of parts that answers "what do applications ask". */
.quiz-updated { margin-top: 14px; font-size: 0.875rem; color: var(--ink-2); }
.quiz-cover { margin-top: 32px; max-width: 920px; overflow-x: auto; }
.quiz-cover table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
.quiz-cover th, .quiz-cover td { padding: 12px 16px 12px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--ink-2); font-weight: 400; }
.quiz-cover thead th { border-top: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.quiz-cover tbody th, .quiz-cover tfoot th, .quiz-cover tfoot td { color: var(--ink); font-weight: 600; }
.quiz-cover tbody th { min-width: 11em; }
.quiz-cover td:nth-child(n+3), .quiz-cover thead th:nth-child(n+3) { text-align: right; padding-right: 0; padding-left: 12px; white-space: nowrap; }
.quiz-cover tfoot th, .quiz-cover tfoot td { border-top: 2px solid var(--line); }
.quiz-cover-more { margin-top: 24px; max-width: 46em; color: var(--ink-2); }
.quiz-report { margin-top: 8px; }
/* Darker green for small text on the pale tint (about 5:1 in the light theme). */
.quiz-free, .quiz-pill.yes { color: #17633C; }
[data-theme="dark"] .quiz-free, [data-theme="dark"] .quiz-pill.yes { color: var(--green); }
.quiz-printfoot { display: none; }
.quiz-report .tablewrap { overflow-x: auto; margin-top: 16px; }
.quiz-report table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.45; }
.quiz-report td { padding: 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
.quiz-report td:last-child { padding-left: 16px; text-align: right; width: 1%; }
.quiz-report td strong { display: block; font-weight: 600; color: var(--ink); }
.quiz-report td span { color: var(--ink-2); }
.quiz-report .quiz-report-sec th { padding: 22px 0 6px; text-align: left; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--coral-deep); }

/* ---------- Print: the result on its own, in light colours. After the dark
   rules so it wins over them. ---------- */
@media print {
  [data-theme="dark"] {
    --paper: #FAF7F2; --paper-2: #F3EDE4; --card: #fff; --field: #fff; --field-border: #857A6C;
    --ink: #17130E; --ink-2: #5C544A; --line: rgba(23, 19, 14, 0.12); --line-soft: rgba(23, 19, 14, 0.08);
    --coral-deep: #C8432B; --green: #1E7F4F;
  }
  [data-theme="dark"] .quiz {
    --q-yes-tint: #E8F2EA; --q-no-tint: #FDEBE6; --q-no-ink: #A33318; --q-on-green: #fff;
    --q-hatch-ink: rgba(92, 84, 74, 0.6); --q-ok-bg: rgba(30, 127, 79, 0.07); --q-track: #F3EDE4;
  }
  .site-header, .site-footer, .mobile-cta, .skip-link, .quiz-aside, .quiz-actions, .quiz-private,
  .quiz-change, .no-print { display: none !important; }
  body { padding: 0; background: #fff; }
  .quiz { border: 0; box-shadow: none; padding: 0; }
  .quiz-stamp { display: block; margin-bottom: 14px; font-size: 0.8125rem; color: var(--ink-2); }
  .quiz-result, .quiz-result * { -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none !important; }
  .quiz-gap, .quiz-summary { break-inside: avoid; }
  .quiz-report tr, .quiz-parts-table tr { break-inside: avoid; }
  .quiz-legal { break-inside: avoid; }
  /* Repeats on every printed page, so no page of the report reads as checked. */
  .quiz-printfoot { display: block; position: fixed; bottom: 0; left: 0; right: 0; margin: 0; padding: 6px 0; font-size: 0.75rem; color: #5C544A; text-align: center; background: #fff; border-top: 1px solid rgba(23, 19, 14, 0.12); }
  .quiz-result { padding-bottom: 40px; }
  .quiz-part-bar { display: table-cell !important; }
  .quiz-for:has(input:placeholder-shown) { display: none; }
  .quiz-for > span { display: none; }
  .quiz-for::before { content: "Prepared for"; font-weight: 400; }
  .quiz-for input { border: 0; padding: 0; font-weight: 600; background: transparent; }
}
