/* Exam prep pages (hub, Pennsylvania and national landing pages, study guide, math, commercial license, and the
   runner). Loaded after site.css; uses its tokens, so light and dark themes follow the site. Prefix xp-. */

.xp-narrow { width: min(100% - 2 * var(--gutter), 860px); margin-inline: auto; }
.xp-intro { max-width: 68ch; margin: 10px 0 0; font-size: 1.0625rem; line-height: 1.6; color: var(--ink-2); }
.xp-source-note { font-size: 0.875rem; line-height: 1.55; color: var(--ink-3); max-width: 76ch; overflow-wrap: anywhere; }

/* Draft-preview banner (local QA builds only). */
.xp-preview-banner { background: var(--ink); color: var(--paper); font-size: 0.9375rem; line-height: 1.45; padding: 10px 0; }

/* ---------- Hero ---------- */
.xp-hero { padding-block: clamp(28px, 5vw, 64px) clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--rule); }
.xp-hero__grid { display: grid; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (min-width: 1000px) { .xp-hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); } }
.xp-hero__title { font-family: var(--font-serif); font-size: var(--step-4); line-height: 1.04; letter-spacing: -0.025em; margin: 10px 0 0; max-width: 16ch; }
.xp-hero--hub .xp-hero__title { max-width: none; }
.xp-hero__lede { margin-top: 16px; max-width: 46ch; }
.xp-hero--hub .xp-hero__lede { max-width: 62ch; }
.xp-hero__actions { margin-top: 24px; }
.xp-hero__split { margin: 16px 0 0; max-width: 60ch; font-size: 0.9375rem; line-height: 1.55; color: var(--ink-2); }
.xp-hero__fact { margin: 8px 0 0; font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.xp-hero__aside { display: grid; gap: 18px; }
.xp-facts-list { list-style: none; margin: 0; padding: 18px 20px; display: grid; gap: 10px; border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--paper-2); }
.xp-facts-list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; line-height: 1.45; }
.xp-facts-list .icon { color: var(--accent); margin-top: 2px; }
/* The first sample sits in the hero on wide screens and leads the samples section below that (start button first). */
@media (max-width: 999px) { .xp-hero__sample { display: none; } }
@media (min-width: 1000px) { .xp-sample-item--narrow { display: none; } }
.xp-hero + .container .xp-disclaimer-box, .xp-page > .container > .xp-disclaimer-box { margin-top: 28px; }

/* Page switcher */
.xp-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 26px; font-size: 0.9375rem; }
.xp-switch__label { font-weight: 600; color: var(--ink-3); }
.xp-switch ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.xp-switch a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--rule-strong); border-radius: 999px; color: var(--ink-2); text-decoration: none; }
.xp-switch a:hover { border-color: var(--ink); color: var(--ink); }
.xp-switch a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Disclaimer */
.xp-disclaimer-box { border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 14px 18px; background: var(--paper-2); }
.xp-disclaimer-box p { margin: 0; font-family: var(--font-sans); font-size: 0.9375rem; line-height: 1.55; color: var(--ink-2); }

/* ---------- Mode cards / paths ---------- */
.xp-mode-cards, .xp-paths { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.xp-mode-card, .xp-path { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--surface); }
.xp-mode-card h3, .xp-path h3 { margin: 0; font-family: var(--font-sans); font-size: 1.1875rem; font-weight: 650; letter-spacing: -0.01em; }
.xp-path h3 a { color: var(--ink); text-decoration: none; }
.xp-path h3 a:hover { color: var(--accent); }
.xp-path h3 a::after { content: ""; position: absolute; inset: 0; }
.xp-path { position: relative; transition: border-color 0.18s var(--ease); }
.xp-path:hover { border-color: var(--rule-strong); }
.xp-path:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.xp-path .eyebrow { margin: 0; }
.xp-mode-card p, .xp-path p { margin: 0; line-height: 1.55; color: var(--ink-2); }
.xp-mode-card .text-link { margin-top: auto; padding-top: 8px; }

/* ---------- Sample question (static, enhanced by sample.js) ---------- */
.xp-samples { display: grid; gap: 22px; margin-top: 24px; }
.xp-sample { padding: 22px; border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--surface); }
.xp-sample__label { margin: 0; font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.xp-sample__label span { color: var(--ink-3); font-weight: 600; }
.xp-sample__stem { margin-top: 10px; font-family: var(--font-serif); font-size: 1.1875rem; line-height: 1.55; overflow-wrap: anywhere; }
.xp-sample__stem p { margin: 0; }
.xp-sample__stem p + p { margin-top: 0.7em; }
.xp-sample__actions { margin-top: 14px; }
.xp-sample__result:empty { display: none; }
.xp-sample__result { margin: 12px 0 0; font-weight: 650; }
.xp-sample__result:focus { outline: none; } /* focused only to keep keyboard position after Check */
.xp-sample__answer { margin-top: 14px; border-top: 1px solid var(--rule); padding-top: 12px; font-size: 1rem; line-height: 1.6; color: var(--ink-2); }
.xp-sample__answer summary { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; color: var(--link); cursor: pointer; }
.xp-sample__answer p, .xp-sample__answer ul { margin: 10px 0 0; }
.xp-sample__answer ul { padding-left: 1.1em; }
.xp-sample__answer li + li { margin-top: 6px; }
.xp-sample__key { color: var(--ink); }

/* Choices: shared look with the runner (radio hidden, the label is the target). */
.xp-choices { border: 0; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; min-width: 0; }
.xp-choice { position: relative; }
.xp-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.xp-choice label { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: start; gap: 4px 12px; min-height: 52px; padding: 12px 14px; border: 1.5px solid var(--rule-strong); border-radius: var(--radius-lg); background: var(--paper); color: var(--ink); font-size: 1.0625rem; line-height: 1.5; cursor: pointer; transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.xp-choice__key { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 1.5px solid var(--rule-strong); border-radius: 50%; font-family: var(--font-sans); font-size: 0.875rem; font-weight: 650; color: var(--ink-2); }
.xp-choice__text { padding-top: 3px; overflow-wrap: anywhere; }
.xp-choice__state { grid-column: 2; display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 650; }
.xp-choice label:hover { border-color: var(--ink-3); }
.xp-choice input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
/* "Selected" only until the answer is checked: after that, the key and a wrong pick take over. */
.xp-choice:not(.is-key):not(.is-wrong) input:checked + label { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.xp-choice:not(.is-key):not(.is-wrong) input:checked + label .xp-choice__key { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.xp-choice.is-key label { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 9%, var(--paper)); box-shadow: inset 0 0 0 1px var(--ok); }
.xp-choice.is-key .xp-choice__key { background: var(--ok); border-color: var(--ok); color: var(--paper); }
.xp-choice.is-key .xp-choice__state { color: var(--ok); }
.xp-choice.is-wrong label { border-color: var(--err); border-style: dashed; background: color-mix(in srgb, var(--err) 7%, var(--paper)); box-shadow: none; }
.xp-choice.is-wrong .xp-choice__key { background: transparent; border-color: var(--err); color: var(--err); }
.xp-choice.is-wrong .xp-choice__state { color: var(--err); }

/* ---------- Exam facts table ---------- */
.xp-table-wrap { margin-top: 1.2em; }
.xp-facts { width: 100%; border-collapse: collapse; font-family: var(--font-sans); font-size: 0.9375rem; }
.xp-facts caption { text-align: left; font-weight: 650; padding-bottom: 8px; color: var(--ink); }
.xp-facts th, .xp-facts td { padding: 10px 10px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.xp-facts thead th { font-size: 0.8125rem; color: var(--ink-3); font-weight: 600; }
.xp-facts td { font-variant-numeric: tabular-nums; }

/* ---------- Prose sections ---------- */
.xp-prose { max-width: 72ch; }
.prose--sans.xp-prose { font-size: 1.0625rem; line-height: 1.65; }
.xp-prose ul, .xp-prose ol { padding-left: 1.2em; }
.xp-prose li + li { margin-top: 0.45em; }
.xp-prose .xp-disclaimer-box { margin-top: 1.6em; }
.xp-prose .btn { text-decoration: none; }
.prose a.btn, .xp-prose a.btn { color: var(--btn-fg); } /* buttons placed in prose keep their own text colour */
.xp-prose table { width: 100%; border-collapse: collapse; font-family: var(--font-sans); font-size: 0.9375rem; line-height: 1.5; }
.xp-prose caption { text-align: left; font-weight: 650; padding-bottom: 8px; }
.xp-prose th, .xp-prose td { padding: 9px 10px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.xp-prose thead th { font-size: 0.8125rem; color: var(--ink-3); }
.xp-formula { font-family: var(--font-sans); font-size: 1rem; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--paper-2); border-radius: 0 var(--radius) var(--radius) 0; }
.xp-worked { padding: 18px 20px; border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--surface); font-family: var(--font-sans); font-size: 1rem; line-height: 1.6; }
.xp-worked > * + * { margin-top: 0.6em; }
.xp-worked h3, .xp-worked h4 { margin-top: 0; font-family: var(--font-sans); }
.xp-callout { padding: 14px 18px; border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft); font-family: var(--font-sans); font-size: 1rem; line-height: 1.6; }

/* Printable checklist */
.xp-checklist { list-style: none; padding: 0 !important; margin-top: 1em; font-family: var(--font-sans); font-size: 1rem; }
.xp-checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); margin: 0 !important; }
.xp-checklist li::before { content: ""; width: 16px; height: 16px; margin-top: 4px; border: 1.5px solid var(--ink-3); border-radius: 3px; }
.xp-print { margin-top: 1.2em; }

/* ---------- Methodology, FAQ, next cards ---------- */
.xp-method__steps { margin: 18px 0 0; padding-left: 1.3em; display: grid; gap: 12px; line-height: 1.6; color: var(--ink-2); max-width: 72ch; }
.xp-method__steps strong { color: var(--ink); }
.xp-method p { max-width: 72ch; line-height: 1.6; color: var(--ink-2); }
.xp-faq__list { margin-top: 20px; display: grid; gap: 0; }
.xp-faq__item { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.xp-faq__item h3 { margin: 0; font-family: var(--font-sans); font-size: 1.125rem; font-weight: 650; }
.xp-faq__a { margin-top: 8px; line-height: 1.6; color: var(--ink-2); max-width: 72ch; }
.xp-faq__a p { margin: 0; }
.xp-faq__a p + p { margin-top: 0.6em; }
.xp-next__list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.xp-next__card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px; border: 1px solid var(--rule); border-radius: var(--radius-lg); color: var(--ink); text-decoration: none; transition: border-color 0.18s var(--ease); }
.xp-next__card:hover { border-color: var(--ink-3); }
.xp-next__name { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.xp-next__text { color: var(--ink-2); line-height: 1.5; }
.xp-partners-sec ul { padding-left: 1.1em; line-height: 1.7; }

@media (prefers-reduced-motion: reduce) {
  .xp-page *, .xp-page *::before, .xp-page *::after { transition: none !important; }
}
@media print {
  .xp-preview-banner, .xp-switch, .xp-hero__actions, .xp-print, .xp-nextcards, .toc, .article-layout aside, .band-navy, .breadcrumbs { display: none !important; }
  .xp-page, .xp-prose, .prose { color: #000; }
  .xp-checklist li::before { border-color: #000; }
  .xp-sample__answer { display: block; }
  a { color: #000; }
  .section { padding-block: 16px; }
}
