/*
 * IQ Facets — the "Industry" look from design/iqfacets: square corners, hairlines, one accent,
 * Barlow Condensed over Barlow. Every colour, font and shadow is a token set in brands/iqfacets/brand.php;
 * nothing here names a colour. Phone first (375), one 680px column on wider screens.
 */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(fonts/barlow-400.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(fonts/barlow-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(fonts/barlow-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url(fonts/barlow-condensed-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(fonts/barlow-condensed-600.woff2) format("woff2"); }

:root {
    --muted: color-mix(in srgb, var(--color-text) 76%, transparent);
    --hair: var(--color-divider);
    --side: 24px;
}
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.1; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
p { margin: 0 0 14px; text-wrap: pretty; }
a { color: var(--color-accent-700); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
button { font: inherit; color: inherit; }
svg { display: block; }
.muted { color: var(--muted); }
.wrap { max-width: var(--column); padding: 0 var(--side); }
main.wrap { padding-bottom: 8px; }
.draft { background: var(--color-accent-100); color: var(--color-text); border-bottom: 1px solid var(--hair); }

/* ---- blueprint frame: a hairline box with four registration marks ---- */
.bp { position: relative; border: 1px solid var(--hair); }
.c { position: absolute; width: 11px; height: 11px; color: color-mix(in srgb, var(--color-text) 55%, transparent); pointer-events: none; }
.c::before, .c::after { content: ""; position: absolute; background: currentColor; }
.c::before { left: 5px; top: 0; width: 1px; height: 100%; }
.c::after { top: 5px; left: 0; width: 100%; height: 1px; }
.c.tl { top: -6px; left: -6px; } .c.tr { top: -6px; right: -6px; } .c.bl { bottom: -6px; left: -6px; } .c.br { bottom: -6px; right: -6px; }

/* ---- header, footer ---- */
.iq-top { border-bottom: 1px solid var(--hair); }
.iq-top > div { max-width: var(--column); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 4px var(--side); }
.iq-logo { display: flex; align-items: center; gap: 8px; min-height: 48px; font-family: var(--font-heading); font-weight: 600; font-size: 21px; color: inherit; text-decoration: none; }
.iq-logo svg { stroke: var(--color-accent); }
.iq-top-link { font-family: var(--font-heading); font-weight: 600; font-size: 17px; text-decoration: none; padding: 12px 0; min-height: 48px; display: inline-flex; align-items: center; }
.iq-foot { margin-top: 72px; border-top: 1px solid var(--hair); padding: 28px var(--side) 40px; }
.iq-foot > div { max-width: var(--column); margin: 0 auto; }
.iq-foot nav { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 12px; }
.iq-foot nav a { color: inherit; text-decoration: none; padding: 12px 0; min-height: 48px; display: inline-flex; align-items: center; }
.iq-foot nav a:hover { color: var(--color-accent-700); }
.iq-foot small { display: block; font-size: 15px; margin-top: 12px; color: var(--muted); }

/* ---- buttons ---- */
.iq-btn, .ab-btn {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px;
    padding: 10px 18px; border: 1px solid var(--hair); background: transparent; color: var(--color-text); cursor: pointer;
    font-family: var(--font-heading); font-weight: 600; font-size: 19px; line-height: 1.2; text-decoration: none; text-align: center; border-radius: 0;
    -webkit-tap-highlight-color: transparent;
}
.iq-btn-primary, .ab-btn-primary { min-height: 58px; font-size: 21px; background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-text); }
@media (hover: hover) { .iq-btn-primary:hover, .ab-btn-primary:hover { background: var(--color-accent-600); } }
.iq-btn-primary:active, .ab-btn-primary:active { background: var(--color-accent-700); }
.iq-btn-secondary:hover, .ab-btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.iq-btn-ghost, .ab-btn-ghost { border-color: transparent; color: var(--color-accent-700); font-size: 18px; }
.iq-btn-ghost:hover, .ab-btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.iq-btn:disabled, .ab-btn:disabled { opacity: .45; cursor: not-allowed; }
.iq-btn-inline { width: auto; display: inline-flex; min-height: 48px; padding: 8px 16px; font-size: 18px; }
.iq-under, .ab-under { font-size: 15px; text-align: center; margin: 10px 0 0; color: var(--muted); }
.iq-link { display: inline-flex; min-height: 48px; align-items: center; font-weight: 500; }

/* ---- shared type ---- */
.iq-kicker, .ab-kicker { font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--color-accent-700); font-weight: 500; margin: 0; }
.iq-h1, .ab-h1 { font-size: 46px; line-height: 1.02; margin: 12px 0 16px; }
.iq-h2 { font-size: 32px; margin: 72px 0 16px; }
.iq-h2 + .iq-sub { margin-top: -10px; color: var(--muted); }
.iq-lede, .ab-lede { margin: 0 0 22px; }
.iq-page { padding-top: 32px; }
.iq-facts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--hair); border-left: 1px solid var(--hair); margin: 0 0 24px; padding: 0; list-style: none; }
.iq-facts li { padding: 10px 12px; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.iq-facts b { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 23px; line-height: 1.1; }
.iq-facts span { font-size: 14px; color: var(--muted); }

/* ---- home ---- */
.iq-steps { border-top: 1px solid var(--hair); margin: 0; padding: 0; list-style: none; }
.iq-steps li { display: grid; grid-template-columns: 48px 1fr; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.iq-steps li > span { font-family: var(--font-heading); font-size: 22px; color: var(--color-accent-700); }
.iq-steps b { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 22px; line-height: 1.2; }
.iq-steps p { margin: 0; color: var(--muted); }
.iq-preview { padding: 18px 16px 14px; margin-top: 14px; }
.iq-preview-top { display: flex; align-items: flex-end; gap: 14px; }
.iq-preview-score { font-family: var(--font-heading); font-weight: 600; font-size: 68px; line-height: .85; }
.iq-preview-top p { font-size: 15px; line-height: 1.35; margin: 0; }
.iq-mini { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hair); }
.iq-mini > div { display: grid; grid-template-columns: 86px 1fr 34px; gap: 10px; align-items: center; font-size: 15px; }
.iq-mini i { position: relative; display: block; height: 4px; background: var(--color-neutral-300); }
.iq-mini i::before { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: var(--w); background: var(--color-accent); }
.iq-mini i::after { content: ""; position: absolute; left: 50%; top: -4px; width: 1px; height: 12px; background: var(--color-text); }
.iq-mini b { font-family: var(--font-heading); font-weight: 600; text-align: right; }
.iq-rows { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.iq-rows a { display: grid; grid-template-columns: 40px 1fr 24px; align-items: center; padding: 12px 14px; border: 1px solid var(--hair); color: inherit; text-decoration: none; min-height: 64px; }
.iq-rows a:hover { border-color: var(--color-accent); }
.iq-rows a > span { font-family: var(--font-heading); font-size: 18px; color: var(--color-accent-700); }
.iq-rows b { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 22px; line-height: 1.15; }
.iq-rows small { display: block; font-size: 16px; color: var(--muted); }
.iq-rows svg, .iq-faq summary svg, .iq-icon { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.iq-faq { border-top: 1px solid var(--hair); }
.iq-faq details { border-bottom: 1px solid var(--hair); }
.iq-faq summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; font-weight: 500; cursor: pointer; list-style: none; }
.iq-faq summary::-webkit-details-marker { display: none; }
.iq-faq summary svg { flex: none; }
.iq-faq details[open] summary .v { display: none; }
.iq-faq details > p, .iq-faq details > div { margin: 0; padding: 0 0 16px; color: color-mix(in srgb, var(--color-text) 82%, transparent); }

/* ---- the bell curve ---- */
.iq-curve { padding: 14px 12px 6px; }
.iq-curve svg { width: 100%; overflow: visible; }
.iq-curve .area { fill: color-mix(in srgb, var(--color-accent) 24%, transparent); }
.iq-curve .band { fill: var(--color-accent-200); }
.iq-curve .line { fill: none; stroke: currentColor; stroke-width: 1.25; }
.iq-curve .base { stroke: currentColor; stroke-opacity: .3; }
.iq-curve .you { stroke: var(--color-accent); stroke-width: 1.5; }
.iq-curve text { font-family: var(--font-body); font-size: 11px; fill: var(--muted); }
.iq-curve .you-label { font-family: var(--font-heading); font-weight: 600; font-size: 13px; fill: var(--color-accent-700); }
.iq-caption { font-size: 14px; color: var(--muted); margin: 8px 0 0; }

/* ---- puzzle figures (drawn by tests/iq/build) ---- */
.fig { width: 100%; height: auto; color: var(--color-text); }
.fig .f-ink { fill: currentColor; }
.fig .f-paper { fill: var(--color-bg); }
.fig .f-tint { fill: var(--color-figure-tint); }
.fig .f-shade { fill: var(--color-figure-shade); }
.fig .f-cell { stroke: var(--hair); }
.fig .f-ask { stroke: var(--color-accent); stroke-width: 1.4; }
.fig .f-q { fill: var(--color-accent-700); font-family: var(--font-heading); font-weight: 600; font-size: 34px; }
.fig .f-arrow { stroke: var(--color-accent-700); stroke-width: 2; }

/* ---- the test ---- */
.iq-test main.wrap { max-width: none; padding: 0; }
.ab { min-height: 100dvh; display: flex; flex-direction: column; }
.ab-page { width: 100%; max-width: var(--column); margin: 0 auto; padding: 36px var(--side) 28px; flex: 1; display: flex; flex-direction: column; }
.ab-h1 { font-size: 40px; line-height: 1.05; }
.ab-note { padding: 10px 12px; background: var(--color-accent-100); border: 1px solid color-mix(in srgb, var(--color-accent) 40%, transparent); font-size: 15px; line-height: 1.45; }
.ab-alert { padding: 10px 12px; border: 1px solid var(--color-text); font-size: 15px; }
.ab-parts { list-style: none; margin: 6px 0 22px; padding: 0; border-top: 1px solid var(--hair); }
.ab-parts li { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; min-height: 52px; border-bottom: 1px solid var(--hair); }
.ab-parts-n { font-family: var(--font-heading); font-size: 18px; color: var(--color-accent-700); }
.ab-parts-n svg { fill: none; stroke: var(--color-accent-700); stroke-width: 1.5; }
.ab-parts-name { font-family: var(--font-heading); font-weight: 600; font-size: 22px; }
.ab-parts-meta { font-size: 15px; color: var(--muted); text-align: right; }
.ab-parts li.done .ab-parts-name { color: var(--muted); font-weight: 500; }
.ab-parts li.next .ab-parts-meta { color: var(--color-accent-700); font-weight: 500; }
.ab-notes { margin: 0 0 22px; padding: 0 0 0 20px; color: var(--muted); font-size: 16px; }
.ab-notes li { margin-bottom: 4px; }
.ab-how { position: relative; border: 1px solid var(--hair); padding: 14px 16px 2px; margin: 0 0 22px; }
.ab-how-title { font-family: var(--font-heading); font-weight: 600; font-size: 18px; margin-bottom: 4px; }
.ab-actions { margin-top: auto; padding-top: 12px; display: grid; gap: 8px; }
.ab-check { display: flex; gap: 10px; align-items: center; min-height: 48px; font-size: 15px; color: var(--muted); cursor: pointer; justify-content: center; }
.ab-check input { width: 20px; height: 20px; accent-color: var(--color-accent); margin: 0; }

.ab-run { flex: 1; display: flex; flex-direction: column; min-height: 100dvh; overflow-x: hidden; }
.ab-top { border-bottom: 1px solid var(--hair); position: sticky; top: 0; z-index: 5; background: var(--color-bg); }
.ab-top > * { max-width: var(--column); margin: 0 auto; }
.ab-top-row { display: grid; grid-template-columns: 56px 1fr 72px; align-items: center; padding: 4px 20px 0 8px; }
.ab-back { width: 48px; height: 48px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; }
.ab-back svg, .ab-time svg, .ab-resumed svg, .ab-key-quiet svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ab-back:disabled { opacity: .25; cursor: default; }
.ab-top-part { text-align: center; font-size: 15px; font-weight: 500; }
.ab-top-count { text-align: right; font-family: var(--font-heading); font-weight: 600; font-size: 20px; }
.ab-segs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 6px var(--side) 0; }
.ab-segs > div { height: 3px; background: var(--color-neutral-300); }
.ab-segs > div > div { height: 3px; background: var(--color-accent); transition: width .25s ease-out; }
.ab-time { display: flex; align-items: center; gap: 6px; padding: 8px var(--side) 10px; font-size: 14px; color: var(--muted); }
.ab-offline { margin-left: auto; color: var(--color-accent-700); }
.ab-resumed { width: calc(100% - 32px); max-width: calc(var(--column) - 32px); margin: 12px auto 0; display: grid; grid-template-columns: 20px 1fr 40px; gap: 10px; align-items: start; padding: 10px 4px 10px 12px; background: var(--color-accent-100); border: 1px solid color-mix(in srgb, var(--color-accent) 40%, transparent); font-size: 15px; line-height: 1.45; }
.ab-resumed > svg { margin-top: 2px; stroke: var(--color-accent-700); }
.ab-resumed button { width: 40px; height: 40px; margin-top: -8px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; }

.ab-body { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 560px; margin: 0 auto; padding: 20px var(--side) 16px; transition: opacity .2s ease-out, transform .2s ease-out; }
.ab-body.leaving { opacity: .3; transform: translateX(-28px); }
.ab-body.entering { opacity: 0; transform: translateX(28px); transition: none; }
.ab-prompt { font-size: 27px; line-height: 1.15; margin: 0 0 18px; text-wrap: pretty; }
.ab-prompt strong { color: var(--color-accent-700); font-weight: 600; }
.ab-blank { display: inline-block; width: 56px; border-bottom: 2px solid var(--color-accent); margin: 0 4px; vertical-align: baseline; }
.ab-figure { position: relative; border: 1px solid var(--hair); margin: 0 auto; width: 100%; padding: 10px; }
.ab-figure-matrix { max-width: 300px; padding: 8px; }
.ab-figure-single { max-width: 170px; padding: 14px; }
.ab-figure-net { max-width: 190px; padding: 12px; }
.ab-figure-scales { max-width: 330px; padding: 10px 14px; }
.ab-figure-series, .ab-figure-steps { padding: 12px; }
.ab-series { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--hair); }
.ab-series span { height: 76px; display: grid; place-items: center; border-right: 1px solid var(--hair); font-family: var(--font-heading); font-weight: 600; font-size: 28px; }
.ab-series span:last-of-type { border-right: 0; }
.ab-series .ask { color: var(--color-accent-700); outline: 1px dashed var(--color-accent); outline-offset: -8px; }
.ab-options { margin-top: auto; padding-top: 20px; display: grid; gap: 10px; }
.ab-options-figures-3, .ab-options-numbers { grid-template-columns: repeat(3, 1fr); }
.ab-options-figures-2 { grid-template-columns: repeat(2, 1fr); }
.ab-option { position: relative; min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 6px 6px; background: transparent; border: 1px solid var(--hair); cursor: pointer; border-radius: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.ab-option .c { display: none; }
@media (hover: hover) { .ab-option:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); } }
.ab-option.picked { border: 1px solid var(--color-accent); box-shadow: inset 0 0 0 .5px var(--color-accent); background: var(--color-accent-100); }
.ab-option.picked .c { display: block; }
.ab-option-figure { display: block; width: 100%; max-width: 84px; }
.ab-options-figures-2 .ab-option-figure { max-width: 112px; }
.ab-option-letter { font-family: var(--font-heading); font-size: 15px; color: var(--muted); }
.ab-option.picked .ab-option-letter { color: var(--color-accent-700); font-weight: 600; }
.ab-option-text { font-family: var(--font-heading); font-weight: 600; font-size: 28px; }
.ab-options-words .ab-option { min-height: 58px; flex-direction: row; justify-content: flex-start; padding: 8px 16px; }
.ab-options-words .ab-option-text { font-size: 22px; text-align: left; }
.ab-skip { align-self: center; min-height: 48px; margin-top: 6px; padding: 0 16px; background: none; border: 0; color: var(--muted); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.ab-recall .ab-actions { margin-top: auto; }
.ab-digit { position: relative; border: 1px solid var(--hair); height: 190px; display: grid; place-items: center; margin-top: 8px; }
.ab-digit span { font-family: var(--font-heading); font-weight: 600; font-size: 120px; line-height: 1; }
.ab-slots { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 56px)); gap: 6px; justify-content: center; }
.ab-slots span { height: 68px; display: grid; place-items: center; border: 1px solid var(--hair); font-family: var(--font-heading); font-weight: 600; font-size: 34px; }
.ab-slots span.on { border-bottom: 2px solid var(--color-accent); }
.ab-slots span.full { background: var(--color-accent-100); }
.ab-keys { margin-top: auto; padding-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ab-keys button { height: 60px; display: grid; place-items: center; background: transparent; border: 1px solid var(--hair); font-family: var(--font-heading); font-weight: 600; font-size: 26px; cursor: pointer; border-radius: 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ab-keys button:active { background: var(--color-accent-100); }
.ab-keys .ab-key-done { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-text); font-size: 20px; }
.ab-keys .ab-key-done:disabled { opacity: .4; }

.ab-field { border: 0; padding: 0; margin: 0 0 18px; }
.ab-field legend { font-family: var(--font-heading); font-weight: 600; font-size: 20px; padding: 0; margin-bottom: 8px; }
.ab-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ab-chips label { position: relative; min-height: 48px; display: inline-flex; align-items: center; padding: 8px 14px; border: 1px solid var(--hair); cursor: pointer; font-size: 16px; }
.ab-chips input { position: absolute; opacity: 0; pointer-events: none; }
.ab-chips label.on { border-color: var(--color-accent); background: var(--color-accent-100); box-shadow: inset 0 0 0 .5px var(--color-accent); }
.ab-chips label:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.ab-calc { align-items: center; justify-content: center; text-align: center; }
.ab-calc .ab-h1 { font-size: 34px; }
.ab-calc-mark svg { width: 72px; height: 72px; stroke: var(--color-accent); fill: none; stroke-width: 1; animation: iq-turn 2.4s linear infinite; }
@keyframes iq-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ab-calc-mark svg { animation: none; } .ab-body, .ab-segs > div > div { transition: none; } html { scroll-behavior: auto; } }
.iq-noscript { max-width: var(--column); margin: 0 auto; padding: 36px var(--side); }

/* ---- result ---- */
.r-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 18px; }
.r-head b { font-family: var(--font-heading); font-weight: 600; font-size: 24px; }
.r-head a { font-size: 15px; min-height: 48px; display: inline-flex; align-items: center; }
.r-score { font-family: var(--font-heading); font-weight: 600; font-size: 120px; line-height: .9; letter-spacing: -.02em; margin: 0 0 12px; }
.r-score.long { font-size: 64px; line-height: 1; }
.r-range { font-size: 19px; margin: 0 0 6px; }
.r-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; padding: 3px 10px; background: var(--color-accent-100); color: var(--color-accent-700); margin: 4px 0 16px; text-decoration: none; }
.r-flag { padding: 10px 12px; margin: 0 0 16px; background: var(--color-accent-100); border: 1px solid color-mix(in srgb, var(--color-accent) 40%, transparent); font-size: 15px; line-height: 1.45; }
.r-shape { font-size: 30px; margin: 26px 0 16px; }
.r-h2 { font-size: 30px; margin: 56px 0 8px; }
.r-h3 { font-size: 24px; margin: 28px 0 8px; }
.r-facets { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 18px; }
.r-facet-top { display: flex; justify-content: space-between; align-items: baseline; }
.r-facet-top a { font-family: var(--font-heading); font-weight: 600; font-size: 22px; color: inherit; text-decoration: none; }
.r-facet-top b { font-family: var(--font-heading); font-weight: 600; font-size: 24px; }
.r-bar { position: relative; height: 14px; margin: 6px 7px 6px; }
.r-bar::before { content: ""; position: absolute; left: -7px; right: -7px; top: 6px; height: 2px; background: var(--color-neutral-300); }
.r-bar i { position: absolute; left: -7px; top: 6px; height: 2px; width: calc(var(--w) + 7px); background: var(--color-accent); }
.r-bar s { position: absolute; left: 50%; top: 0; width: 1px; height: 14px; background: var(--color-text); }
.r-bar u { position: absolute; left: var(--w); top: 0; width: 14px; height: 14px; margin-left: -7px; background: var(--color-accent); border: 2px solid var(--color-bg); box-sizing: border-box; }
.r-facet p { font-size: 15px; color: var(--muted); margin: 0; }
.r-axis { display: grid; grid-template-columns: 1fr auto 1fr; font-size: 13px; color: var(--muted); margin: 14px 0 0; padding: 0 0 0 16.67%; padding-right: 16.67%; }
.r-axis span:nth-child(2) { text-align: center; } .r-axis span:last-child { text-align: right; }
.r-list { margin: 8px 0 0; padding: 0; list-style: none; }
.r-list li { position: relative; padding: 6px 0 6px 30px; }
.r-list li svg { position: absolute; left: 0; top: 9px; fill: none; stroke: var(--color-accent-700); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.r-notes { margin: 8px 0 0; padding: 0 0 0 20px; color: var(--muted); font-size: 16px; }
.r-notes li { margin-bottom: 6px; }

/* a solved puzzle: the figure, the options with the key marked, the rule */
.pz { position: relative; border: 1px solid var(--hair); padding: 16px 14px 6px; margin: 16px 0 0; }
.pz-kicker { font-family: var(--font-heading); font-size: 16px; color: var(--color-accent-700); margin: 0 0 4px; }
.pz-q { font-family: var(--font-heading); font-weight: 600; font-size: 22px; line-height: 1.2; margin: 0 0 12px; }
.pz-q strong { color: var(--color-accent-700); }
.pz-fig { margin: 0 auto 12px; max-width: 260px; }
.pz-fig.series, .pz-fig.steps { max-width: none; }
.pz-fig.single, .pz-fig.net { max-width: 150px; }
.pz-cells { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--hair); margin-bottom: 12px; }
.pz-cells span { height: 52px; display: grid; place-items: center; border-right: 1px solid var(--hair); font-family: var(--font-heading); font-weight: 600; font-size: 22px; }
.pz-cells span:last-child { border-right: 0; color: var(--color-accent-700); }
.pz-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.pz-answer { border: 1px solid var(--hair); padding: 8px 10px; }
.pz-answer.key { border-color: var(--color-accent); background: var(--color-accent-100); }
.pz-answer small { display: block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pz-answer.key small { color: var(--color-accent-700); }
.pz-answer .fig { max-width: 84px; margin: 4px auto 0; }
.pz-answer b { font-family: var(--font-heading); font-weight: 600; font-size: 22px; }
.pz dl { margin: 0; }
.pz dt { font-family: var(--font-heading); font-weight: 600; font-size: 18px; margin-top: 8px; }
.pz dd { margin: 0 0 10px; }
.pz-meta { font-size: 14px; color: var(--muted); }

/* a worked example: on facet pages and before each part of the test */
.ex { position: relative; border: 1px solid var(--hair); padding: 14px 14px 12px; margin: 0 0 24px; font-size: 16px; line-height: 1.5; }
.ex-kicker { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--color-accent-700); font-weight: 500; margin: 0 0 4px; }
.ex-q { font-family: var(--font-heading); font-weight: 600; font-size: 21px; line-height: 1.2; margin: 0 0 12px; }
.ex-fig { margin: 0 auto 12px; max-width: 190px; }
.ex-fig.single { max-width: 96px; }
.ex-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 10px; }
.ex-option { border: 1px solid var(--hair); padding: 8px 6px 4px; text-align: center; }
.ex-option.key { border-color: var(--color-accent); background: var(--color-accent-100); box-shadow: inset 0 0 0 .5px var(--color-accent); }
.ex-option .fig { max-width: 64px; margin: 0 auto; }
.ex-option b { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 22px; }
.ex-option small { display: block; font-family: var(--font-heading); font-size: 14px; color: var(--muted); }
.ex-option.key small { color: var(--color-accent-700); font-weight: 600; }
.ex-why { margin: 0; color: var(--muted); }
.ab-example .ex { margin-bottom: 22px; }

/* the offer */
.r-offer { border-top: 1px solid var(--color-text); margin-top: 64px; padding-top: 22px; }
.r-offer h2 { font-size: 34px; margin: 8px 0 12px; }
.r-cover-wrap { display: flex; justify-content: center; margin: 26px 0 26px; }
.r-cover { position: relative; width: 210px; aspect-ratio: 3 / 4; border: 1px solid var(--hair); background: var(--color-bg); padding: 16px 14px; display: flex; flex-direction: column; }
.r-cover::before { content: ""; position: absolute; inset: 8px -9px -9px 8px; border: 1px solid var(--hair); background: var(--color-surface); z-index: -1; }
.r-cover-wrap { isolation: isolate; }
.r-cover .iq-logo { font-size: 16px; min-height: 0; gap: 6px; }
.r-cover small { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--color-accent-700); margin-top: 22px; }
.r-cover strong { font-family: var(--font-heading); font-weight: 600; font-size: 28px; line-height: 1.02; margin-top: 4px; }
.r-cover .iq-mini { margin-top: auto; border: 0; padding: 0; gap: 7px; }
.r-cover .iq-mini > div { grid-template-columns: 1fr; }
.r-cover .iq-mini i { height: 3px; } .r-cover .iq-mini i::before { height: 3px; } .r-cover .iq-mini i::after { top: -3px; height: 9px; }
.r-cover em { font-style: normal; font-size: 11px; color: var(--muted); margin-top: 12px; }
.r-chapters { list-style: none; margin: 0 0 22px; padding: 0; border-top: 1px solid var(--hair); }
.r-chapters li { display: grid; grid-template-columns: 36px 1fr 24px; align-items: center; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.r-chapters li > span { font-family: var(--font-heading); font-size: 18px; color: var(--color-accent-700); }
.r-chapters li svg { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.r-buy { display: grid; gap: 8px; }
.r-buy label, .r-save label { font-size: 14px; color: var(--muted); }
.iq-input { width: 100%; min-height: 52px; padding: 10px 12px; font: inherit; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--hair); border-radius: 0; caret-color: var(--color-accent); }
.iq-input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
.r-rate { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.r-rate button { height: 52px; background: transparent; border: 1px solid var(--hair); font-family: var(--font-heading); font-weight: 600; font-size: 22px; cursor: pointer; border-radius: 0; }
@media (hover: hover) { .r-rate button:hover { border-color: var(--color-accent); background: var(--color-accent-100); } }
.r-rate-ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 6px; }
.r-save { display: grid; gap: 8px; margin-top: 10px; }
.r-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--color-bg); border-top: 1px solid var(--hair); box-shadow: var(--shadow-md); padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); transform: translateY(110%); transition: transform .2s ease-out; }
.r-sticky.on { transform: none; }
.r-sticky > div { max-width: var(--column); margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.r-sticky b { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 19px; line-height: 1.15; }
.r-sticky small { display: block; font-size: 14px; color: var(--muted); }
.r-sticky .iq-btn { width: auto; min-height: 52px; font-size: 19px; padding: 8px 16px; white-space: nowrap; }
@media (min-width: 900px) { .r-sticky { display: none; } }
.r-cta { position: relative; border: 1px solid var(--hair); padding: 20px 18px; margin-top: 40px; }
.r-cta h2 { font-size: 30px; margin-bottom: 6px; }

/* ---- report ---- */
.rp-bar { position: sticky; top: 0; z-index: 10; background: var(--color-bg); border-bottom: 1px solid var(--hair); }
.rp-bar > div { max-width: var(--column); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 4px var(--side); }
.rp-toc { position: relative; }
.rp-toc summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; border: 1px solid var(--hair); font-family: var(--font-heading); font-weight: 600; font-size: 17px; }
.rp-toc summary::-webkit-details-marker { display: none; }
.rp-toc summary svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.rp-toc ol { position: absolute; right: 0; top: 52px; width: min(340px, calc(100vw - 32px)); margin: 0; padding: 6px 0; list-style: none; background: var(--color-bg); border: 1px solid var(--hair); box-shadow: var(--shadow-lg); }
.rp-toc ol a { display: grid; grid-template-columns: 34px 1fr; min-height: 48px; align-items: center; padding: 6px 14px; color: inherit; text-decoration: none; }
.rp-toc ol a span { font-family: var(--font-heading); color: var(--color-accent-700); }
.rp-toc ol a:hover { background: var(--color-accent-100); }
.rp-title { font-size: 44px; margin: 10px 0 8px; }
.rp-chapter { border-top: 1px solid var(--color-text); margin-top: 64px; padding-top: 18px; scroll-margin-top: 64px; }
.rp-chapter > header span { font-family: var(--font-heading); font-weight: 600; font-size: 17px; color: var(--color-accent-700); }
.rp-chapter > header h2 { font-size: 36px; margin: 4px 0 16px; }
.rp-read { font-size: 18px; line-height: 1.6; }
.rp-read h3 { font-size: 24px; margin: 30px 0 8px; }
.rp-read ul { padding-left: 22px; margin: 0 0 14px; }
.rp-read li { margin-bottom: 8px; }
.rp-quote { border-left: 1px solid var(--color-accent); padding: 2px 0 2px 16px; margin: 22px 0; font-family: var(--font-heading); font-weight: 600; font-size: 26px; line-height: 1.2; }
.rp-next { display: grid; grid-template-columns: 1fr 24px; align-items: center; border: 1px solid var(--hair); padding: 14px 16px; margin-top: 28px; color: inherit; text-decoration: none; }
.rp-next small { display: block; font-size: 14px; color: var(--color-accent-700); }
.rp-next b { font-family: var(--font-heading); font-weight: 600; font-size: 22px; }
.rp-next svg { fill: none; stroke: currentColor; stroke-width: 1.5; }
.iq-table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 14px 0 18px; }
.iq-table th { text-align: left; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; color: var(--muted); padding: 8px 8px 8px 0; border-bottom: 1px solid var(--hair); vertical-align: bottom; }
.iq-table td { padding: 9px 8px 9px 0; border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent); vertical-align: top; }
.iq-table td:first-child { font-weight: 500; }
.iq-table-wrap { overflow-x: auto; margin: 0 calc(var(--side) * -1); padding: 0 var(--side); }
.rp-one { position: relative; border: 1px solid var(--hair); padding: 18px 16px; margin-top: 16px; }
.rp-one-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--hair); border-left: 1px solid var(--hair); margin: 14px 0; }
.rp-one-grid div { padding: 8px 10px; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.rp-one-grid small { display: block; font-size: 13px; color: var(--muted); }
.rp-one-grid b { font-family: var(--font-heading); font-weight: 600; font-size: 20px; }

/* ---- certificate ---- */
.cert { position: relative; border: 1px solid var(--color-text); padding: 28px 22px; margin: 24px 0; background: var(--color-bg); }
.cert h1 { font-size: 40px; margin: 22px 0 18px; }
.cert-name { font-family: var(--font-heading); font-weight: 600; font-size: 34px; line-height: 1.1; border-bottom: 1px solid var(--hair); padding-bottom: 8px; margin: 4px 0 10px; overflow-wrap: anywhere; }
.cert-score { display: flex; align-items: flex-end; gap: 16px; margin: 22px 0 8px; }
.cert-score b { font-family: var(--font-heading); font-weight: 600; font-size: 84px; line-height: .85; }
.cert-score.long b { font-size: 44px; line-height: 1; }
.cert-score p { margin: 0; font-size: 16px; line-height: 1.4; }
.cert-small { font-size: 15px; line-height: 1.5; }
.cert-code { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--hair); margin-top: 18px; padding-top: 12px; font-size: 15px; }
.cert-code b { font-family: var(--font-heading); font-weight: 600; font-size: 20px; letter-spacing: .08em; }
@media print {
    @page { size: A4; margin: 14mm; }
    .iq-top, .iq-foot, .rp-bar, .r-sticky, .no-print, .draft { display: none !important; }
    body { background: #fff; color: #000; font-size: 12pt; }
    .wrap { max-width: none; padding: 0; }
    .rp-chapter { break-before: page; margin-top: 0; }
    .pz, .rp-one, .cert { break-inside: avoid; }
    .cert, .rp-one { background: #fff; }
    a { color: inherit; text-decoration: none; }
}

/* ---- articles (facet pages, guides, blog, legal) ---- */
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 4px; padding-top: 4px; }
.crumbs { line-height: 44px; }
.crumbs a { color: inherit; }
.crumbs span { margin: 0 6px; }
.art h1 { font-size: 46px; line-height: 1.02; margin: 8px 0 16px; }
.art { font-size: 18px; line-height: 1.6; }
.art .answer { font-size: 20px; line-height: 1.5; border: 0; padding: 0; margin: 0 0 24px; }
.art h2 { font-size: 32px; margin: 48px 0 12px; scroll-margin-top: 16px; }
.art h3 { font-size: 24px; margin: 30px 0 8px; }
.art ul, .art ol { padding-left: 22px; margin: 0 0 16px; }
.art li { margin-bottom: 8px; }
.art blockquote { border-left: 1px solid var(--color-accent); margin: 24px 0; padding: 2px 0 2px 16px; font-family: var(--font-heading); font-weight: 600; font-size: 26px; line-height: 1.2; }
.art blockquote footer { font-family: var(--font-body); font-weight: 400; font-size: 15px; color: var(--muted); margin-top: 6px; }
.art-facts { position: relative; border: 1px solid var(--hair); margin: 0 0 28px; }
.art-facts table { width: 100%; border-collapse: collapse; margin: 0; }
.art-facts th, .art-facts td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--hair); font-size: 16px; }
.art-facts tr:last-child th, .art-facts tr:last-child td { border-bottom: 0; }
.art-facts th { width: 38%; font-weight: 500; color: var(--muted); }
.art-toc { border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); margin: 0 0 8px; padding: 12px 0; }
.art-toc b { font-family: var(--font-heading); font-weight: 600; font-size: 18px; }
.art-toc ol { margin: 6px 0 0; padding-left: 22px; font-size: 16px; }
.art-toc li { margin: 0; }
.art-toc a { display: inline-flex; min-height: 36px; align-items: center; }
.art-cta { position: relative; border: 1px solid var(--hair); padding: 20px 18px; margin: 36px 0; }
.art-cta b { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 26px; line-height: 1.1; }
.art-cta p { font-size: 16px; color: var(--muted); margin: 4px 0 14px; }
.art-by { font-size: 15px; color: var(--muted); border-top: 1px solid var(--hair); margin-top: 48px; padding-top: 14px; }
.art figure { margin: 24px 0; }
.art figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.art img { max-width: 100%; height: auto; }

/* ---- small states: 404, payment, login ---- */
.st { padding-top: 48px; }
.st-code { position: relative; border: 1px solid var(--hair); height: 150px; display: grid; place-items: center; font-family: var(--font-heading); font-weight: 600; font-size: 84px; margin-bottom: 26px; }
.st h1 { font-size: 40px; margin: 0 0 12px; }
.st .iq-btn { margin-top: 10px; }
.st-icon { fill: none; stroke: var(--color-accent-700); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }

@media (min-width: 720px) {
    .iq-h1 { font-size: 56px; }
    .iq-facts { grid-template-columns: repeat(4, 1fr); }
    .ab-figure-matrix { max-width: 320px; }
    /* A wide screen is short: the options go in one row so the whole puzzle stays in view. */
    .ab-options-figures-3 { grid-template-columns: repeat(6, 1fr); }
    .ab-options-numbers { grid-template-columns: repeat(5, 1fr); }
    .ab-options-figures-2 { grid-template-columns: repeat(4, 1fr); }
    .ab-options-words { grid-template-columns: 1fr 1fr; }
    .ab-body { padding-top: 16px; }
    /* With room to spare the answers follow the puzzle instead of sitting at the bottom edge. */
    .ab-options, .ab-keys { margin-top: 28px; padding-top: 0; }
    .ab-skip { margin-top: 10px; }
    .r-score { font-size: 140px; }
}
@media (max-width: 359px) {
    :root { --side: 16px; }
    .iq-h1, .art h1 { font-size: 38px; }
    .r-score { font-size: 96px; }
    .ab-prompt { font-size: 23px; }
}

/* Between parts the page can be long (how the part works, an example): its button stays within thumb reach. */
.ab-intro .ab-actions { position: sticky; bottom: 0; background: var(--color-bg); padding: 12px 0 10px; margin: auto calc(var(--side) * -1) -28px; padding-left: var(--side); padding-right: var(--side); border-top: 1px solid var(--hair); gap: 2px; }
.ab-intro .ab-btn-ghost { min-height: 44px; font-size: 16px; }
