/* Private AI Challenge. Uses the site's tokens (styles.css); everything here is prefixed pq-. */
.pq-hero { background: #01261D; color: #eaf3ee; position: relative; overflow: hidden; padding: calc(var(--header-h, 80px) + 2rem) 0 3.25rem; }
.pq-hero .container { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 2.5rem; align-items: center; }
.pq-hero h1 { color: #fff; font-family: "Instrument Serif", serif; font-weight: 400; font-size: clamp(2.6rem, 5.4vw, 4.2rem); line-height: 1; letter-spacing: -0.01em; margin: 0 0 1.1rem; }
.pq-hero h1 em { font-style: italic; color: #AFE900; }
.pq-hero .pq-lede { font-size: 1.12rem; line-height: 1.6; color: #cfe3d8; max-width: 38rem; margin: 0 0 1.5rem; }
.pq-hero-art svg { width: 100%; height: auto; display: block; }
.pq-facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; list-style: none; padding: 0; margin: 0 0 1.75rem; font-size: 0.92rem; color: #cfe3d8; }
.pq-facts li { display: flex; align-items: center; gap: 0.45rem; }
.pq-facts li::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #AFE900; }
.pq-hero .breadcrumb { margin: 0 0 1.5rem; padding: 0; }
.pq-hero .breadcrumb, .pq-hero .breadcrumb li, .pq-hero .breadcrumb a { color: #9fc4b3; }
.pq-hero .breadcrumb li + li::before { color: #4f7f6b; }
.pq-hero-meta { font-size: 0.85rem; color: #9fc4b3; margin-top: 1rem; }
.pq-hero-meta a { color: #cfe3d8; }

.pq-btn { font: inherit; font-weight: 600; font-size: 1rem; border: 1.5px solid transparent; border-radius: 999px; padding: 0.85rem 1.5rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.5rem; transition: transform 0.15s var(--ease-out, ease), background 0.15s ease, box-shadow 0.15s ease; }
.pq-btn[hidden] { display: none; }
.pq-btn { white-space: nowrap; }
.pq-btn:focus-visible { outline: 3px solid #AFE900; outline-offset: 3px; }
.pq-btn-go { background: #AFE900; color: #01261D; }
.pq-btn-go:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(175, 233, 0, 0.9); }
.pq-btn-go:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.pq-btn-quiet { background: transparent; color: var(--sophisticated-green); border-color: var(--rule-strong); }
.pq-btn-quiet:hover { border-color: var(--sophisticated-green); }
.pq-hero .pq-btn-quiet { color: #eaf3ee; border-color: rgba(234, 243, 238, 0.35); }
.pq-start-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
a.pq-btn { text-decoration: none; }
a.pq-btn[hidden] { display: none; }

/* The certificate as the prize, beside the hero copy */
.pq-hero-cert { margin: 0; }
.pq-hero-cert .pq-cert-preview { margin: 0; transform: rotate(-2deg); box-shadow: 0 30px 70px -25px rgba(0, 0, 0, 0.75); }
.pq-hero-cert figcaption { margin-top: 1.1rem; font-size: 0.85rem; color: #9fc4b3; text-align: center; }

/* ---- Lessons (shared by the game screen and the Learn section) ---- */
.pq-lesson { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 2rem; align-items: start; }
.pq-lesson-art { background: #01261D; border-radius: 4px; overflow: hidden; position: relative; }
.pq-lesson-art svg { display: block; width: 100%; height: auto; }
.pq-lesson h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin: 0 0 0.75rem; line-height: 1.05; }
.pq-lesson h2, .pq-learn > .container > h2 { font-family: "Instrument Serif", serif; font-weight: 400; letter-spacing: -0.01em; color: var(--ink); }
.pq-lesson p { line-height: 1.6; }
.pq-points { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.85rem; counter-reset: pq; }
.pq-points li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: 0.6rem; line-height: 1.55; }
.pq-points li::before { content: counter(pq) ""; counter-increment: pq; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #eef4f1; color: var(--sophisticated-green); font-weight: 700; font-size: 0.8rem; display: grid; place-items: center; margin-top: 0.1rem; }
.pq-cite { font-size: 0.82rem; line-height: 1.55; color: var(--muted); margin: 1.5rem 0 0; }
.pq-cite a { color: var(--muted); }

/* ---- Game screen: one fixed frame (score bar, content, action bar); only the content inside changes ---- */
/* play/: the game alone, filling the window */
.pq-play-page { margin: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; background: #00140f; color: #dcebe3; overflow: hidden; --pq-gutter: clamp(0.75rem, 2.5vw, 1.5rem); }
.pq-topbar { flex: none; width: 100%; max-width: calc(1180px + 2 * var(--pq-gutter)); margin: 0 auto; box-sizing: border-box; display: flex; align-items: center; gap: 1rem; padding: 0.6rem var(--pq-gutter); }
.pq-topbar-title { flex: 1; margin: 0; text-align: center; font-family: "Instrument Serif", serif; font-size: 1.2rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pq-bar-btn { font: inherit; font-size: 0.86rem; font-weight: 600; color: #cfe3d8; background: transparent; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px; padding: 0.45rem 0.85rem; display: inline-flex; align-items: center; gap: 0.45rem; text-decoration: none; cursor: pointer; white-space: nowrap; transition: border-color 0.15s ease, color 0.15s ease; }
.pq-bar-btn:hover { color: #fff; border-color: #E6FF73; }
.pq-bar-btn[hidden] { visibility: hidden; display: inline-flex; }
.pq-play { flex: 1; min-height: 0; display: grid; padding: 0 var(--pq-gutter) var(--pq-gutter); overflow-anchor: none; }
.pq-play .pq-screen { width: 100%; max-width: 1180px; height: 100%; max-height: 900px; margin: auto; }
.pq-screen { --pq-pad: clamp(1rem, 2.6vw, 2rem); position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #01261D; color: #dcebe3; border-radius: 10px; overflow: hidden; box-shadow: 0 24px 60px -30px rgba(1, 38, 29, 0.7); }
.pq-screen a { color: #E6FF73; }
.pq-kicker { display: block; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #6FC23A; margin: 0 0 0.5rem; }

/* Score bar: every slot has a fixed size, so changing numbers never move anything */
.pq-hud { display: grid; grid-template-columns: auto minmax(3rem, 1fr) 6.5rem 6.5rem; align-items: center; gap: 1rem; padding: 0.8rem var(--pq-pad); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.pq-hud ol { display: flex; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.pq-hud li { width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center; font-size: 0.78rem; font-weight: 700; color: #7fa594; border: 1.5px solid rgba(255, 255, 255, 0.16); transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
.pq-hud li.is-now { color: #01261D; background: #E6FF73; border-color: #E6FF73; }
.pq-hud li.is-done { color: #01261D; background: #2FA36E; border-color: #2FA36E; }
.pq-track { height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 999px; overflow: hidden; }
.pq-track span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2FA36E, #AFE900); border-radius: 999px; transition: width 0.5s var(--ease-out, ease); }
.pq-streak { justify-self: end; font-size: 0.78rem; font-weight: 700; color: #01261D; background: #F28AD8; padding: 0.25rem 0.65rem; border-radius: 999px; white-space: nowrap; visibility: hidden; opacity: 0; transform: scale(0.8); transition: opacity 0.2s ease, transform 0.2s var(--ease-out, ease), visibility 0.2s; }
.pq-streak.is-on { visibility: visible; opacity: 1; transform: none; }
.pq-score { justify-self: end; display: flex; align-items: baseline; gap: 0.3rem; white-space: nowrap; color: #fff; }
.pq-score #pq-points { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3.4em; text-align: right; }
.pq-score small { font-size: 0.75rem; color: #7fa594; }

/* Content: scrolls inside the frame when it's taller than the screen */
.pq-body { overflow-y: auto; overscroll-behavior: contain; outline: none; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }
.pq-body-inner { min-height: 100%; padding: var(--pq-pad); box-sizing: border-box; display: flex; flex-direction: column; }
.pq-body-inner > * { width: 100%; }
/* questions and level results sit in the middle of the frame; margin auto keeps tall content scrollable from its top */
.pq-body.is-question .pq-body-inner > *, .pq-body.is-done .pq-body-inner > * { margin-block: auto; }

/* Action bar: a fixed height on larger screens, so the main button never moves */
.pq-dock { min-height: 6rem; display: flex; align-items: center; padding: 0.9rem var(--pq-pad); background: #001c15; border-top: 1px solid rgba(255, 255, 255, 0.08); box-sizing: border-box; }
.pq-dock-row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; }
.pq-dock-note { margin: 0; font-size: 0.92rem; line-height: 1.4; color: #b9d3c6; min-width: 0; }
.pq-dock-note .pq-kicker { margin-bottom: 0.15rem; }
.pq-dock-note-end { flex: 1; text-align: right; }
.pq-dock .pq-btn { flex: none; }
.pq-dock .pq-btn-go { min-width: 13rem; justify-content: center; }
.pq-feedback { flex: 1; min-width: 0; max-height: 100%; }
.pq-verdict { display: flex; align-items: center; gap: 0.6rem; margin: 0; font-size: 1.05rem; color: #fff; }
.pq-verdict-mark { width: 1.75rem; height: 1.75rem; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 0.9rem; font-weight: 700; color: #01261D; }
.pq-verdict.is-ok .pq-verdict-mark { background: #AFE900; }
.pq-verdict.is-no .pq-verdict-mark { background: #F28AD8; }
.pq-bonus { font-size: 0.8rem; font-weight: 700; color: #E6FF73; background: rgba(175, 233, 0, 0.14); padding: 0.15rem 0.6rem; border-radius: 999px; }
.pq-explain { margin: 0.4rem 0 0; font-size: 0.93rem; line-height: 1.5; color: #cfe3d8; }
.pq-source { font-size: 0.85rem; white-space: nowrap; }

/* Buttons inside the dark frame */
.pq-screen .pq-btn-quiet { color: #eaf3ee; border-color: rgba(234, 243, 238, 0.3); }
.pq-screen .pq-btn-quiet:hover { border-color: #E6FF73; }

/* Lesson */
.pq-body .pq-lesson { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
.pq-body .pq-lesson-art { position: sticky; top: 0; border-radius: 6px; background: #023326; border: 1px solid rgba(255, 255, 255, 0.08); }
.pq-body .pq-lesson h2 { color: #fff; font-size: clamp(1.6rem, 2.8vw, 2.25rem); }
.pq-body .pq-lesson p { color: #cfe3d8; }
.pq-body .pq-lesson strong { color: #fff; }
.pq-body .pq-points li::before { background: rgba(175, 233, 0, 0.14); color: #E6FF73; }
.pq-body .pq-cite, .pq-body .pq-cite a { color: #7fa594; }
.pq-body .pq-lesson-kicker { display: none; }

/* Question */
.pq-prompt { font-family: "Instrument Serif", serif; font-weight: 400; font-size: clamp(1.45rem, 2.5vw, 2rem); line-height: 1.15; margin: 0 0 1.25rem; color: #fff; max-width: 46rem; }
.pq-diff { font-weight: 700; padding: 0.1rem 0.5rem; border-radius: 999px; letter-spacing: 0.06em; margin-left: 0.35rem; }
.pq-diff-easy { background: rgba(47, 163, 110, 0.2); color: #8fe0b3; }
.pq-diff-medium { background: rgba(230, 255, 115, 0.16); color: #E6FF73; }
.pq-diff-hard { background: rgba(242, 138, 216, 0.18); color: #F28AD8; }
.pq-q-main { display: grid; gap: 1rem; }
.pq-q.has-visual .pq-q-main { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; }
.pq-q.has-visual .pq-choices { grid-template-columns: 1fr; }
.pq-visual { border-radius: 6px; overflow: hidden; background: #023326; border: 1px solid rgba(255, 255, 255, 0.08); }
.pq-visual svg { display: block; width: 100%; height: auto; }
.pq-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.pq-choice { font: inherit; font-size: 0.98rem; text-align: left; display: grid; grid-template-columns: 1.9rem minmax(0, 1fr); grid-template-areas: "key text"; gap: 0.6rem 0.75rem; align-items: center; min-height: 4rem; background: rgba(255, 255, 255, 0.05); border: 1.5px solid rgba(255, 255, 255, 0.12); border-radius: 8px; padding: 0.8rem 1rem; cursor: pointer; color: #eaf3ee; line-height: 1.4; transition: border-color 0.15s ease, background 0.15s ease, opacity 0.2s ease; }
.pq-choice:hover:not(:disabled) { border-color: #E6FF73; background: rgba(230, 255, 115, 0.07); }
.pq-choice:focus-visible { outline: 3px solid #AFE900; outline-offset: 2px; }
.pq-choice-key { grid-area: key; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.82rem; background: rgba(255, 255, 255, 0.1); color: #E6FF73; transition: background 0.15s ease, color 0.15s ease; }
.pq-choice-text { grid-area: text; }
/* only answers with a picture get a picture row; an empty row would add its gap above the text */
.pq-choice:has(> .pq-choice-art) { grid-template-areas: "art art" "key text"; }
.pq-choice-art { grid-area: art; border-radius: 5px; overflow: hidden; display: block; background: #023326; }
.pq-choice-art svg { display: block; width: 100%; height: auto; }
.pq-choice[aria-pressed="true"] { border-color: #E6FF73; background: rgba(230, 255, 115, 0.1); }
.pq-choice[aria-pressed="true"] .pq-choice-key { background: #E6FF73; color: #01261D; }
.pq-choice:disabled { cursor: default; }
.pq-choice.is-right { border-color: #AFE900; background: rgba(175, 233, 0, 0.13); }
.pq-choice.is-right .pq-choice-key { background: #AFE900; color: #01261D; }
.pq-choice.is-wrong { border-color: #F28AD8; background: rgba(242, 138, 216, 0.12); }
.pq-choice.is-wrong .pq-choice-key { background: #F28AD8; color: #01261D; }
.pq-choice:disabled:not(.is-right):not(.is-wrong) { opacity: 0.4; }

/* Level complete */
.pq-done { text-align: center; max-width: 36rem; margin: 0 auto; }
.pq-badge { width: clamp(84px, 14vh, 120px); aspect-ratio: 1; margin: 0 auto 1rem; }
.pq-badge svg { width: 100%; height: 100%; display: block; }
.pq-done h3, .pq-final h3 { font-family: "Instrument Serif", serif; font-weight: 400; letter-spacing: -0.01em; color: #fff; font-size: clamp(1.8rem, 3vw, 2.3rem); line-height: 1.05; margin: 0 0 0.4rem; }
.pq-done-score { margin: 0; color: #cfe3d8; }
.pq-done-score strong { color: #E6FF73; }
.pq-takeaway { margin: 1.25rem 0 0; padding: 1rem 1.25rem; text-align: left; line-height: 1.55; color: #eaf3ee; background: rgba(175, 233, 0, 0.08); border-left: 3px solid #AFE900; border-radius: 4px; }

/* Result */
.pq-final { max-width: 46rem; margin: 0 auto; }
.pq-final-top { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1.75rem; align-items: center; }
.pq-final-top p { margin: 0 0 0.4rem; line-height: 1.55; color: #cfe3d8; }
.pq-ring { width: 150px; height: 150px; display: block; }
.pq-ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 10; }
.pq-ring-fg { fill: none; stroke: #AFE900; stroke-width: 10; stroke-linecap: round; }
.pq-ring-num { font-family: "Instrument Serif", serif; font-size: 30px; fill: #fff; }
.pq-ring-sub { font-size: 10px; fill: #9fc4b3; }
.pq-final-top .pq-meta { color: #7fa594; font-size: 0.88rem; }
.pq-ladder { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; }
.pq-ladder li { display: grid; gap: 0.15rem; justify-items: center; text-align: center; padding: 0.55rem 0.4rem; border-radius: 6px; background: rgba(255, 255, 255, 0.04); border: 1.5px solid rgba(255, 255, 255, 0.08); color: #7fa594; }
.pq-ladder strong { font-size: 0.86rem; font-weight: 700; color: #b9d3c6; }
.pq-ladder span { font-size: 0.72rem; }
.pq-ladder li.is-you { background: rgba(175, 233, 0, 0.12); border-color: #AFE900; color: #E6FF73; }
.pq-ladder li.is-you strong { color: #fff; }
.pq-final-again { margin: 1.25rem 0 0; text-align: center; }
.pq-link { font: inherit; font-size: 0.9rem; color: #b9d3c6; background: none; border: 0; padding: 0.25rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pq-link:hover { color: #fff; }
.pq-cert-form, .pq-retry-box { margin-top: 1.5rem; padding: 1.25rem 1.4rem; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; }
.pq-cert-form h4, .pq-retry-box h4 { color: #fff; font-family: "Instrument Serif", serif; font-weight: 400; font-size: 1.5rem; margin: 0 0 0.35rem; }
.pq-cert-form p, .pq-retry-box p { margin: 0; color: #cfe3d8; line-height: 1.5; }
.pq-inline { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.9rem; }
.pq-inline[hidden] { display: none; }
.pq-inline input { flex: 1; min-width: 12rem; font: inherit; font-size: 1rem; padding: 0.8rem 1rem; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, 0.25); background: rgba(0, 0, 0, 0.2); color: #fff; }
.pq-inline input::placeholder { color: #7fa594; }
.pq-inline input:focus { outline: 3px solid #AFE900; outline-offset: 2px; }
.pq-check { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 0.9rem; font-size: 0.86rem; line-height: 1.5; color: #b9d3c6; cursor: pointer; }
.pq-check input { width: 1.1rem; height: 1.1rem; margin-top: 0.15rem; accent-color: #AFE900; flex: none; }
.pq-review { margin-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 1rem; }
.pq-review summary { cursor: pointer; font-weight: 600; color: #fff; }
.pq-review ol { margin: 1rem 0 0; padding-left: 1.25rem; display: grid; gap: 1rem; line-height: 1.5; }
.pq-review li strong { color: #fff; font-weight: 600; }
.pq-review li span { color: #b9d3c6; }

.pq-eyebrow { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #AFE900; margin: 0 0 0.75rem; }
.pq-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pq-toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: #01261D; color: #fff; padding: 0.7rem 1.2rem; border-radius: 999px; z-index: 100; font-size: 0.92rem; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.5); }
.pq-confetti { position: fixed; z-index: 90; pointer-events: none; }

/* ---- Certificate (screen preview and print) ---- */
.pq-cert-preview { margin-top: 1.5rem; container-type: inline-size; border-radius: 4px; overflow: hidden; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6); }
.pq-cert { position: relative; aspect-ratio: 297 / 210; background: #fffdf6; color: #01261D; border: 1px solid #d9d3bd; overflow: hidden; display: grid; grid-template-columns: 31% minmax(0, 1fr); font-size: 1.6cqw; }
.pq-cert-art { background: #01261D; position: relative; }
.pq-cert-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pq-cert-body { padding: 6% 8% 5% 7%; display: flex; flex-direction: column; }
.pq-cert-org { font-family: "Instrument Serif", serif; font-size: 1.6em; margin: 0; color: #014C3B; }
.pq-cert-kind { font-size: 0.8em; letter-spacing: 0.22em; text-transform: uppercase; color: #6b7672; margin: 0.4em 0 0; }
.pq-cert-title { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 3.1em; line-height: 1; margin: 0.25em 0 0.45em; color: #01261D; }
.pq-cert-pre { margin: 0; font-size: 0.95em; color: #4a5652; }
.pq-cert-name { font-family: "Instrument Serif", serif; font-style: italic; font-size: 2.9em; line-height: 1.1; margin: 0.12em 0 0.25em; padding-bottom: 0.2em; border-bottom: 1.5px solid #AFE900; }
.pq-cert-text { font-size: 0.95em; line-height: 1.55; color: #31403b; margin: 0.6em 0 0; max-width: 46em; }
.pq-cert-foot { margin-top: auto; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 3em; font-size: 0.85em; }
.pq-cert-foot div { display: grid; gap: 0.2em; }
.pq-cert-label { font-size: 0.75em; letter-spacing: 0.16em; text-transform: uppercase; color: #6b7672; }
.pq-cert-seal { position: absolute; right: 4%; top: 6%; width: 15%; aspect-ratio: 1; }
.pq-cert-seal svg { width: 100%; height: 100%; }
#pq-cert-print { display: none; }

@media print {
    @page { size: A4 landscape; margin: 0; }
    html, body { background: #fff !important; height: auto !important; overflow: visible !important; display: block !important; }
    body > *:not(#pq-cert-print) { display: none !important; }
    #pq-cert-print { display: block; width: 297mm; height: 210mm; container-type: inline-size; }
    #pq-cert-print .pq-cert { width: 297mm; height: 210mm; border: 0; font-size: 1.6cqw; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- Learn section (the lessons as an article, without JavaScript and after the game) ---- */
.pq-learn { padding: 3.5rem 0 2rem; }
.pq-learn > .container > h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin: 0 0 0.5rem; }
.pq-learn-intro { color: var(--ink-soft); max-width: 46rem; margin: 0 0 2rem; line-height: 1.6; }
.pq-learn .pq-lesson { padding: 2rem 0; border-top: 1px solid var(--rule); }
.pq-learn .pq-lesson-kicker { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #2FA36E; margin: 0 0 0.4rem; }

@media (max-width: 860px) {
    .pq-hero .container { grid-template-columns: 1fr; }
    .pq-hero-cert { max-width: 480px; }
    .pq-lesson { grid-template-columns: 1fr; gap: 1.25rem; }
    .pq-body .pq-lesson { grid-template-columns: 1fr; gap: 1.25rem; }
    .pq-body .pq-lesson-art { position: static; max-width: 440px; }
    .pq-q.has-visual .pq-q-main { grid-template-columns: 1fr; }
    .pq-q.has-visual .pq-visual { max-width: 440px; }
    .pq-q.has-visual .pq-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .pq-play { padding: 0; }
    .pq-play .pq-screen { border-radius: 0; box-shadow: none; }
    .pq-topbar { padding-top: 0.45rem; padding-bottom: 0.45rem; gap: 0.5rem; }
    .pq-topbar-title { font-size: 1.05rem; }
    .pq-wide { display: none; }
    .pq-bar-btn { padding: 0.4rem 0.7rem; }
    .pq-bar-btn span:not([aria-hidden]) { font-size: 0.82rem; }
    .pq-ladder { gap: 0.3rem; }
    .pq-ladder li { padding: 0.45rem 0.2rem; }
    .pq-ladder strong { font-size: 0.72rem; }
    .pq-ladder span { font-size: 0.66rem; }
    .pq-dock-row:has(> #pq-share.pq-btn-go) .pq-dock-note { display: none; }
    /* score bar: levels, streak and score on one row, progress as a thin line under it */
    .pq-hud { grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.5rem; padding-top: 0.65rem; padding-bottom: 0.65rem; position: relative; }
    .pq-hud li { width: 1.5rem; height: 1.5rem; font-size: 0.72rem; }
    .pq-hud ol { gap: 0.25rem; }
    .pq-track { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 0; }
    .pq-streak { font-size: 0.72rem; padding: 0.2rem 0.5rem; }
    .pq-score small { display: none; }
    .pq-score #pq-points { min-width: 2.8em; }
    /* action bar: the main button is full width at the bottom; feedback opens above it */
    .pq-dock { min-height: 0; padding: 0.75rem var(--pq-pad) calc(0.75rem + env(safe-area-inset-bottom)); }
    .pq-dock-row { flex-direction: column; align-items: stretch; gap: 0.6rem; }
    .pq-dock .pq-btn { justify-content: center; width: 100%; min-width: 0; padding: 0.8rem 1.25rem; }
    .pq-dock-row:has(> .pq-btn-quiet) { flex-direction: row; flex-wrap: wrap; }
    .pq-dock-row:has(> .pq-btn-quiet) .pq-btn { flex: 1 1 auto; width: auto; padding-left: 1rem; padding-right: 1rem; }
    .pq-dock-row:has(> .pq-btn-quiet) .pq-btn-quiet { flex-grow: 0; }
    .pq-dock-note { font-size: 0.85rem; }
    .pq-dock-note-end { order: -1; flex-basis: 100%; text-align: left; }
    .pq-keys, .pq-dock-note:has(> .pq-keys) { display: none; }
    /* the feedback panel takes room from the content, so questions stay top-aligned and never slide */
    .pq-body.is-question .pq-body-inner > * { margin-block: 0; }
    .pq-visual svg { max-height: 24svh; }
    .pq-feedback { max-height: 34svh; overflow-y: auto; }
    .pq-explain { font-size: 0.88rem; }
    .pq-prompt { font-size: 1.35rem; margin-bottom: 1rem; }
    .pq-choices, .pq-q.has-visual .pq-choices { grid-template-columns: 1fr; gap: 0.5rem; }
    .pq-choices.is-visual, .pq-choices.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pq-choices.is-visual .pq-choice { grid-template-columns: 1.6rem minmax(0, 1fr); padding: 0.6rem; font-size: 0.88rem; }
    .pq-choice { min-height: 3.25rem; padding: 0.65rem 0.8rem; font-size: 0.93rem; gap: 0.5rem 0.65rem; }
    .pq-choice-key { width: 1.6rem; height: 1.6rem; font-size: 0.75rem; }
    .pq-final-top { grid-template-columns: 96px minmax(0, 1fr); gap: 1rem; }
    .pq-ring { width: 96px; height: 96px; }
    .pq-cert-foot { grid-template-columns: 1fr 1fr; gap: 0.6em 2em; }
}
@media (min-width: 641px) {
    /* tall enough for the longest explanation, so the bar never changes height */
    .pq-dock { height: 7.5rem; }
    .pq-feedback { max-height: 100%; overflow-y: auto; }
}
@media (min-width: 641px) and (max-width: 960px) { .pq-dock { height: 8.75rem; } }
@media (prefers-reduced-motion: reduce) {
    .pq-btn, .pq-choice, .pq-track span, .pq-streak, .pq-hud li { transition: none; }
}
