.quest-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(200px, 1fr); gap: 2rem; align-items: start; }
.quest-panel { padding: clamp(1rem, 3vw, 2.5rem); background: #f5f1e5; border: 1px solid #c8c5b6; border-radius: 12px; min-width: 0; }
.quest-panel h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
.quest-panel label, .quest-panel legend { display: block; font-weight: 600; margin: .7rem 0; }
.quest-panel select, #quest-answer { width: 100%; padding: .8rem; min-height: 48px; background: white; color: #15251f; border: 1px solid #657367; border-radius: 4px; font: inherit; }
.quest-panel fieldset { min-width: 0; border: 1px solid #c8c5b6; }
.quest-panel fieldset label { display: flex; align-items: center; gap: .7rem; padding: .6rem; min-height: 48px; cursor: pointer; overflow-wrap: anywhere; }
.quest-panel input[type=radio] { width: 22px; height: 22px; flex-shrink: 0; }
.quest-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.quest-panel .button { min-height: 48px; white-space: normal; }
#quest-feedback { min-height: 3em; padding: .75rem 0; }
#quest-question { font-size: 1.15rem; }
.quest-layout pre, .quest-reference pre { padding: 1rem; background: #15251f; color: #f5f1e5; border-radius: 6px; overflow: auto; max-width: 100%; font-size: .9rem; }
.quest-reference details { border-bottom: 1px solid #c8c5b6; padding: 1rem 0; }
.quest-reference summary { cursor: pointer; padding: .75rem 0; font-weight: 600; }
.quest-notes { border-top: 3px solid #ad7145; padding-top: 1rem; }
.quest-notes h2 { font-size: 1.65rem; }
@media (max-width: 800px) { .quest-layout { grid-template-columns: 1fr; } }

/* Chapter changes should keep keyboard focus predictable, without long smooth scrolls. */
html:has([data-quest]) { scroll-behavior: auto; }
#quest-title { scroll-margin-top: 6rem; }
.quest-lesson-disclosure { border-block: 1px solid #c8c5b6; padding: .6rem 0; }
.quest-lesson-disclosure summary { cursor: pointer; padding: .6rem 0; }
.quest-panel [hidden] { display: none !important; }
