:root{color-scheme:light;--paper:#fcfaff;--ink:#302044;--muted:#7a6b8e;--purple:#8e59c6;--line:#e9e0f0}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:18px/1.5 Nunito,'Segoe UI',sans-serif}button{font:inherit;cursor:pointer}button:disabled{cursor:default}a{color:inherit}button:focus-visible,a:focus-visible{outline:3px solid #8e59c6;outline-offset:4px}[hidden]{display:none!important}.skip{position:absolute;top:-100px}.skip:focus{top:10px;background:white;padding:12px;z-index:2}.top{max-width:1180px;margin:auto;padding:25px 30px}.brand{display:flex;gap:12px;align-items:center;text-decoration:none;font-size:21px;font-weight:800;line-height:1.25}.brand small{display:block;font-size:13px;font-weight:400;color:var(--muted);margin-top:5px}.learning-tools{max-width:1120px;margin:0 auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:0 10px}.learning-tools a{padding:20px 22px;text-decoration:none;border:1px solid #dfd0ec;border-radius:20px;background:#f1e9fb}.learning-tools a:nth-child(2){background:#f8edf3;border-color:#ead1df}.learning-tools a[aria-current]{background:#edf3ed;border-color:#d5e4d4}.learning-tools strong{display:block;font-size:20px}.learning-tools small{display:block;font-size:13px;margin-top:5px;color:var(--muted)}main{max-width:1000px;margin:45px auto;padding:0 25px}.intro{text-align:center;margin-bottom:32px}.eyebrow{font-size:12px;letter-spacing:.13em;color:var(--muted);font-weight:800}h1{font-size:clamp(30px,5vw,44px);letter-spacing:-.025em;margin:8px 0}h2{font-size:26px;margin:12px 0}p{margin:8px 0;color:var(--muted)}.tag{font-size:11px;font-weight:800;letter-spacing:.12em;color:#867097}.training-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.training-tile{text-align:left;padding:30px;border:1px solid var(--line);border-radius:25px;background:white;color:var(--ink);box-shadow:0 8px 30px #5a396008}.training-tile:hover{border-color:#b79acb}.training-tile p{font-size:16px}.tile-meta{display:block;margin:20px 0;font-size:14px;color:var(--muted)}.tile-action{display:inline-block;border-radius:13px;background:#f0e6f7;padding:10px 18px;font-size:15px;font-weight:800;color:#754b96}.deck{background:white;border:1px solid var(--line);border-radius:28px;padding:32px;margin-top:16px}.deck-heading h1{font-size:clamp(26px,4vw,34px)}.deck-heading p{font-size:16px}.summary{display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-size:14px;margin:22px 0}.summary>span{background:#eff4ed;padding:5px 11px;border-radius:10px}.summary>span:nth-child(2){background:#fff1e9}.text-button{border:0;background:none;text-decoration:underline;text-underline-offset:3px;color:#74508e;font-size:14px;padding:7px}.session-meta{display:flex;justify-content:space-between;gap:12px;font-size:13px;color:var(--muted)}progress{width:100%;height:7px;appearance:none;border:0;border-radius:9px;margin:10px 0 20px;background:#f0eaf6}progress::-webkit-progress-bar{background:#f0eaf6;border-radius:9px}progress::-webkit-progress-value{background:#b69acb;border-radius:9px}progress::-moz-progress-bar{background:#b69acb;border-radius:9px}.card{text-align:center;border-radius:22px;background:#f8f4fc;border:1px solid #eee5f6;padding:22px 18px;min-height:170px;display:flex;flex-direction:column;justify-content:center}.card-label{font-size:13px;color:var(--muted)}.prompt{font-size:clamp(24px,4vw,32px);font-weight:800;margin:16px 0;overflow-wrap:anywhere}.structure{display:block;width:100%;height:auto;object-fit:contain;max-width:660px;margin:auto}.prompt:has(.structure){margin:5px 0}.options{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:20px}.option{position:relative;background:white;border:1px solid #e0d3eb;border-radius:16px;min-height:70px;padding:18px;color:var(--ink);font-weight:700}.option:hover:not(:disabled){background:#faf6fe;border-color:#b798cb}.option.correct{background:#eef5ec;border:2px solid #81a879}.option.wrong{background:#fff0ea;border:2px solid #cc9d86}.option-number{position:absolute;top:9px;left:12px;font-size:12px;color:var(--muted)}.formula-options .option{padding:18px 8px 8px;min-height:140px}.answer{border:1px solid #dce7d8;border-radius:18px;background:#f6f9f3;padding:18px;text-align:center;margin-top:22px}.answer .structure{max-width:500px}.answer p{font-size:14px}.button{border:1px solid transparent;border-radius:14px;padding:13px 25px;min-height:48px;font-weight:800;font-size:16px}.primary{background:var(--purple);color:white}.soft{background:#f1e9f8;color:#694286}.actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}#feedback{font-size:16px;margin:16px 0}#next{display:block;margin:12px auto}.result{text-align:center;padding:45px 10px}.result .actions{margin-top:22px}.storage-note{font-size:12px;margin:24px 0 0;color:var(--muted)}footer{max-width:1000px;margin:40px auto;padding:20px 25px;display:flex;justify-content:space-between;border-top:1px solid var(--line);font-size:14px;color:var(--muted)}@media(max-width:650px){.top{padding:20px}.learning-tools{grid-template-columns:1fr;gap:9px;padding:0 15px}.learning-tools a{padding:13px 18px}.learning-tools strong{font-size:18px}.learning-tools small{font-size:12px}main{margin:28px auto;padding:0 14px}.training-list{grid-template-columns:1fr}.training-tile{padding:24px}.deck{padding:22px 14px;border-radius:22px}.options{gap:10px}.option{padding:15px 10px;font-size:15px}.formula-options{grid-template-columns:1fr}.formula-options .structure{max-width:500px}.formula-options .option{min-height:130px}.card{padding:20px 10px}.intro p{font-size:16px}}

/* Intrinsic proportions and fixed drawing geometry prevent stretched bonds. */
.structure{width:auto;max-width:100%;height:auto;max-height:210px}.prompt .structure{max-height:185px}.formula-options .structure{width:100%;height:155px;object-fit:contain}.answer .structure{max-height:150px}.discovery{display:grid;grid-template-columns:180px 1fr;gap:22px;align-items:center;margin:22px 0;padding:18px;background:#faf5ef;border:1px solid #eee3d7;border-radius:20px;text-align:left}.discovery img{width:100%;height:140px;object-fit:cover;border-radius:13px}.discovery p{font-size:16px;color:#51445d;line-height:1.65}.discovery .tag{font-size:10px}@media(max-width:550px){.discovery{grid-template-columns:1fr;gap:14px}.discovery img{height:180px}.formula-options .structure{height:145px}}

/* A quiet scrapbook: paper, washi tape and small chemistry stickers. */
body{background-color:#fbf8f3;background-image:radial-gradient(#d9cbd640 .8px,transparent .8px);background-size:19px 19px;--paper:#fbf8f3;--purple:#8764ac;--muted:#756782}
.top,.learning-tools,main,footer{position:relative}
.learning-tools a{background:#f1eaf5;border-color:#e2d7e9;box-shadow:0 3px 0 #e9dfee55;transition:transform .18s ease,box-shadow .18s ease}
.learning-tools a:hover{transform:translateY(-2px);box-shadow:0 6px 14px #6f52730b}
.learning-tools a[aria-current]{background:#eaf0e8;border-color:#d7e1d3}
.intro{position:relative;padding:26px 0 30px;margin-bottom:30px}.intro .eyebrow{font-size:10px;letter-spacing:.21em;color:#8b6d91}.intro h1{font-weight:800;font-size:clamp(37px,6vw,55px);letter-spacing:-.035em;margin:12px 0}.intro p{font-size:17px;line-height:1.8;color:#756782}.title-star{display:inline-block;color:#b69a70;font-size:40px;margin-left:16px;vertical-align:top;transform:rotate(12deg)}.handwritten{display:inline-block;margin-top:18px;padding:5px 17px;transform:rotate(-4deg);background:#f4eadb;color:#846a53;font-size:14px;font-style:italic;border-radius:3px}
.training-list{max-width:780px;margin:auto;grid-template-columns:1fr}.training-tile{position:relative;overflow:visible;background:#fffdf9;border:1px solid #e8dfe7;border-radius:24px;padding:27px 30px 30px 350px;min-height:290px;box-shadow:0 10px 35px #6e4d6209;transition:transform .2s,box-shadow .2s}.training-tile:hover{transform:translateY(-4px);box-shadow:0 15px 38px #6e4d6214}.training-tile h2{font-size:28px;line-height:1.25}.tile-cover{position:absolute;left:24px;top:28px;width:290px;height:230px;padding:9px 9px 28px;background:white;box-shadow:0 4px 14px #61465b15;transform:rotate(-3deg);border:1px solid #efe7ed;border-radius:3px}.tile-cover:before{content:'';position:absolute;z-index:1;left:90px;top:-12px;width:94px;height:30px;background:#dbccdfaa;transform:rotate(6deg);border:1px solid #ccbbd233}.tile-cover>img:first-child{width:100%;height:100%;object-fit:cover;border-radius:2px}.tile-cover .tile-sticker{position:absolute;right:-15px;bottom:-10px;width:85px;height:85px;transform:rotate(12deg)}.tile-meta{font-size:12px;letter-spacing:.025em;margin:18px 0}.tile-action{background:#eae0f0;color:#694b84;box-shadow:0 2px 0 #d3bedc55}.tile-action:after{content:'  ✧';color:#9c7caa}
.deck{position:relative;background:#fffdfa;border-color:#e8dfe7;padding:34px 38px;box-shadow:0 12px 45px #72546a09;border-radius:26px}.deck-heading{position:relative;padding:0 110px 18px 0;border-bottom:1px solid #eee5e9}.deck-heading h1{line-height:1.25;margin-top:12px}.deck-heading p{max-width:560px;font-size:15px;line-height:1.7}.deck-sticker{position:absolute;right:-2px;top:4px;transform:rotate(8deg);filter:drop-shadow(0 3px 2px #88708212)}.margin-note{display:inline-block;margin-left:15px;color:#8c768e;font-size:12px;font-style:italic;transform:rotate(-3deg)}.summary{margin:20px 0 26px}.summary>span{background:#edf2e9;color:#52654f;padding:6px 12px}.summary>span:nth-child(2){background:#f8ede3;color:#8a604b}.summary .text-button{margin-left:auto;font-size:12px;color:#806e88}.session-meta{font-size:12px}.session-meta>span:first-child{font-weight:800;color:#735786;padding:2px 9px;border-radius:8px;background:#f1eaf5}progress{height:6px;margin-bottom:28px}progress::-webkit-progress-value{background:#b39ac4;transition:width .3s ease}progress::-moz-progress-bar{background:#b39ac4}
.card{position:relative;background:#fff;border:1px solid #e8deec;border-radius:17px;padding:33px 22px 24px;box-shadow:0 5px 0 #f1eaf5;min-height:185px}.card:before{content:'';position:absolute;width:78px;height:23px;left:calc(50% - 39px);top:-12px;background:#e5d8edb5;transform:rotate(-3deg);border:1px solid #d4bedc33}.paper-tab{position:absolute;right:17px;top:-12px;background:#f4ebdb;padding:3px 11px;border-radius:3px;font-size:10px;color:#8a7357;letter-spacing:.04em;transform:rotate(3deg)}.card-label{font-size:13px;font-weight:600;letter-spacing:.015em;color:#806b90}.options{gap:12px;margin-top:27px}.option{border-color:#e4d9e9;border-radius:14px;background:#fffefa;min-height:68px;box-shadow:0 3px 0 #eee7f1;transition:background .15s,transform .15s,box-shadow .15s}.option:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 5px 0 #e7daed;background:#f5eff9}.option:active:not(:disabled){transform:translateY(1px);box-shadow:none}.option.correct{background:#edf4e9;border-color:#9ab591;box-shadow:0 3px 0 #dce9d5}.option.wrong{background:#fbefe9;border-color:#cba68f;box-shadow:0 3px 0 #f0ded3}.option-number{background:#f3edf6;padding:1px 6px;border-radius:5px}.answer{background:#f6f8f0;border-style:dashed;border-color:#c5d5bc}.discovery{position:relative;background:#fbf2e8;border-color:#ecdcca;border-radius:18px;padding:20px;box-shadow:0 4px 0 #f1e6d9}.discovery:after{content:'✧';position:absolute;right:13px;top:5px;font-size:24px;color:#bc9969}.discovery img{transform:rotate(-2deg);border:5px solid #fffdfa;box-shadow:0 3px 8px #785e4610}.discovery .tag{display:block;padding-right:15px;line-height:1.6;color:#8d6e4f;font-size:9px}.discovery p{font-size:15px}.primary{box-shadow:0 3px 0 #6f4a91;transition:transform .15s}.primary:hover{background:#7b589f;transform:translateY(-1px)}.primary:active{transform:translateY(2px);box-shadow:none}.storage-note{text-align:center;margin-top:28px;color:#887c90;font-size:11px}.finish-stamp{display:block;font-size:65px;color:#aa8ebb;line-height:1.3;transform:rotate(9deg)}.result h2{font-size:30px}.result p{max-width:440px;margin:14px auto 24px;line-height:1.8}.deck[data-result=correct] .discovery{animation:paper-reveal .32s ease-out}.deck[data-result=correct] .deck-sticker{animation:sticker-nod .45s ease-out}
@keyframes paper-reveal{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}@keyframes sticker-nod{0%,100%{transform:rotate(8deg)}45%{transform:rotate(-5deg)}}
@media(max-width:700px){.training-tile{padding:24px;min-height:0}.tile-cover{position:relative;left:auto;top:auto;width:calc(100% - 12px);height:210px;margin:0 6px 30px;transform:rotate(-2deg)}.tile-cover:before{left:calc(50% - 47px)}.training-tile h2{font-size:27px}.deck{padding:26px 18px}.deck-heading{padding-right:65px}.deck-sticker{width:66px;height:66px;right:-9px;top:12px}.margin-note{display:block;margin:9px 0 0}.intro{padding:12px 0 20px}.intro p{font-size:15px}.card{padding:31px 12px 20px}.summary{gap:8px}.summary .text-button{margin-left:0}.discovery{padding:17px}.formula-options .structure{height:145px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Keep the question beside its choices; sticky is bounded by this workspace. */
.question-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px;align-items:start;scroll-margin-top:18px}
.question-workspace .card{position:sticky;top:18px;align-self:start;min-height:0;padding:24px 16px 16px;margin-top:8px;z-index:2}
.question-workspace .prompt{margin:10px 0 2px;font-size:26px}
.question-workspace .prompt .structure{max-height:150px}
.question-workspace .options{margin-top:8px;gap:10px;grid-template-columns:1fr}
.question-workspace .option{min-height:53px;padding:12px 15px;font-size:16px}
.question-workspace .formula-options{grid-template-columns:1fr 1fr}
.question-workspace .formula-options .option{min-height:119px;padding:21px 6px 6px}
.question-workspace .formula-options .structure{height:95px;max-height:95px}
.deck-heading{padding-bottom:12px}.deck-heading h1{font-size:28px;margin:8px 0}.deck-heading p{font-size:14px;margin:5px 0}.summary{margin:14px 0 17px}progress{margin-bottom:17px}
.deck[data-result] .question-workspace .card{position:relative;top:auto}
@media(max-width:700px){
 .deck{padding:22px 15px}.deck-heading h1{font-size:24px}.deck-heading p{font-size:13px}.deck-sticker{width:53px;height:53px}.margin-note{display:none}
 .question-workspace{display:block;scroll-margin-top:12px}
 .question-workspace .card{position:sticky;top:8px;padding:16px 12px 10px;margin:8px 0 17px;box-shadow:0 4px 0 #eee4f2,0 9px 16px #513a6210;background:#fffdfa}
 .question-workspace .card-label{font-size:12px;line-height:1.4}
 .question-workspace .prompt{font-size:23px;margin:5px 0 0}
 .question-workspace .prompt .structure{max-height:105px}
 .question-workspace .card:before{width:56px;left:calc(50% - 28px);height:17px;top:-9px}.paper-tab{top:-9px;font-size:9px;padding:1px 7px}
 .question-workspace .options{grid-template-columns:1fr 1fr;margin:0;gap:10px}
 .question-workspace .option{font-size:14px;padding:12px 9px;min-height:56px}
 .question-workspace .formula-options{grid-template-columns:1fr}
 .question-workspace .formula-options .option{min-height:100px;padding:14px 20px 6px}
 .question-workspace .formula-options .structure{height:95px;max-height:95px}
}
@media(max-height:500px) and (max-width:700px){.question-workspace .prompt .structure{max-height:65px}.question-workspace .card{padding-top:11px}.question-workspace .card-label{font-size:11px}}
@media print{.question-workspace .card{position:static!important}}

/* Correctness is explicit, with shape and words as well as colour. */
.question-workspace .option.correct{border:3px solid #438761;background:#e1f1df;color:#244d35;font-weight:900;box-shadow:0 4px 0 #b2d3ad,0 0 0 3px #f2f8ed;opacity:1;padding-right:86px}
.question-workspace .option.correct:after{content:'✓ Верно';position:absolute;right:8px;top:50%;transform:translateY(-50%);padding:5px 8px;border-radius:9px;background:#438761;color:white;font:800 12px/1.4 Nunito,sans-serif}
.question-workspace .formula-options .option.correct{padding:25px 8px 8px}.question-workspace .formula-options .option.correct:after{top:4px;right:5px;transform:none;padding:2px 7px;font-size:11px}.question-workspace .formula-options .option.correct .option-number{background:#d5e7cc;color:#244d35}
.success-message{display:flex;align-items:center;gap:15px;margin:20px 0 12px;padding:17px 23px;border:2px solid #84af7c;border-radius:18px;background:#e9f4e3;box-shadow:0 4px 0 #d5e8cd;color:#315f3b}.success-icon{display:grid;place-items:center;flex-shrink:0;width:48px;height:48px;border-radius:50%;background:#438761;color:#fff;font-size:30px;font-weight:900}.success-message strong{display:block;font-size:28px;font-weight:900;line-height:1.2}.success-message div>span{display:block;font-size:13px;margin-top:5px;color:#4d704e}.deck[data-result=correct] #feedback{font-weight:900;color:#315f3b;font-size:20px}
.quiz-confetti{position:fixed;inset:0;z-index:1000;pointer-events:none;overflow:hidden;contain:strict}.quiz-confetti i{position:absolute;left:50%;top:42%;width:8px;height:13px;border-radius:2px;animation:quiz-confetti-burst 1.4s var(--delay) ease-out both}.quiz-confetti i:nth-child(3n){border-radius:50%;width:9px;height:9px}.quiz-confetti i:nth-child(4n){width:6px;height:15px}
@keyframes quiz-confetti-burst{0%{opacity:0;transform:translate(0,0) scale(.3)}10%{opacity:1}40%{opacity:1;transform:translate(var(--mx),var(--rise)) rotate(160deg)}100%{opacity:0;transform:translate(var(--dx),65vh) rotate(var(--turn))}}
@media(max-width:700px){.question-workspace .option.correct{padding-right:12px;padding-top:33px}.question-workspace .option.correct:after{top:5px;right:6px;transform:none;padding:2px 7px;font-size:10px}.success-message{padding:14px 16px;gap:12px}.success-message strong{font-size:25px}.success-icon{width:41px;height:41px;font-size:26px}}
@media(prefers-reduced-motion:reduce){.quiz-confetti{display:none}.quiz-confetti i{animation:none!important}}

/* One compact result row; progression is available before optional reading. */
.answer-toolbar{position:sticky;top:10px;z-index:5;display:flex;align-items:center;gap:16px;margin:18px 0 12px;padding:12px 15px;border:1px solid #ded1e7;border-radius:16px;background:#fffdfa;box-shadow:0 4px 14px #58446212}
.deck[data-result=correct] .answer-toolbar{border:2px solid #84af7c;background:#e9f4e3}
.answer-toolbar .success-message{margin:0;padding:0;border:0;box-shadow:none;background:none;gap:10px;flex:1;min-width:0}
.answer-toolbar .success-message strong{font-size:24px;line-height:1.2}
.answer-toolbar .success-icon{width:34px;height:34px;font-size:23px}
.answer-toolbar #next{margin:0 0 0 auto;flex-shrink:0;min-height:45px;padding:10px 21px;white-space:nowrap}
.answer-toolbar #feedback{margin:0;font-size:14px;line-height:1.5;color:#795b47;flex:1}
.deck[data-result=correct] .answer-toolbar #feedback{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.answer{margin-top:12px;padding:16px;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:8px 18px}.answer strong{font-size:18px;text-align:left}.answer #answer-structure{grid-column:2;grid-row:1/3}.answer #note{text-align:left;font-size:14px;line-height:1.6;margin:0}.answer .structure{max-height:105px}
.discovery{grid-template-columns:110px minmax(0,1fr);gap:20px;padding:16px 20px;margin:14px 0;background:#fbf4eb;box-shadow:none}
.discovery img{height:110px;width:110px;transform:rotate(-1deg);border-width:4px}
.discovery:after{font-size:20px;top:7px;right:12px}.discovery .tag{font-size:10px;letter-spacing:.08em;margin-bottom:5px}.discovery strong{display:block;font-size:18px;line-height:1.4;color:#493953}.discovery p{font-size:16px;line-height:1.6;margin:7px 0 0;color:#55475d}
@media(max-width:550px){.answer-toolbar{top:8px;gap:10px;padding:11px 12px}.answer-toolbar .success-message strong{font-size:22px}.answer-toolbar .success-icon{width:29px;height:29px;font-size:20px}.answer-toolbar #next{font-size:15px;min-height:43px;padding:9px 16px}.answer-toolbar #feedback{font-size:12px}.discovery{grid-template-columns:65px minmax(0,1fr);gap:13px;padding:15px}.discovery img{width:65px;height:78px;border-width:3px;align-self:start}.discovery .tag{font-size:9px}.discovery strong{font-size:16px}.discovery p{font-size:15px;line-height:1.65}.answer{grid-template-columns:1fr}.answer #answer-structure{grid-column:auto;grid-row:auto}.answer strong,.answer #note{text-align:center}}
@media print{.answer-toolbar{position:static}}

.rx-task-title{font-size:15px;font-weight:800;color:#755987;margin:12px 0}.rx-equation{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:7px 3px;padding:20px 10px;scroll-margin-top:14px;background:#fff;border:1px solid #e6daed;border-radius:17px;line-height:1.3}.rx-fragment{display:inline-flex;align-items:center;justify-content:center;min-height:48px;min-width:44px;padding:3px 5px;background:#fdfbff;color:#302044;border:2px solid #e9e0ef;border-radius:10px;cursor:pointer;flex-shrink:0}.rx-fragment:hover:not(:disabled){background:#f2e8fa;border-color:#bba0cf}.rx-fragment[aria-pressed=true]{border:3px solid #8764ac;background:#e9dcf4;box-shadow:0 0 0 2px #f4edf9}.rx-fragment.rx-miss{border-color:#cd9b7f;background:#fff0e7}.rx-plus{padding:0 3px;color:#766180}.rx-arrow{flex-direction:column;min-width:110px;max-width:210px;padding:7px 10px}.rx-condition{font:600 12px/1.35 Nunito,sans-serif;text-align:center;max-width:180px}.rx-arrow-line{font:32px/1 Arial,sans-serif}.rx-formula{display:block;max-width:100%;overflow:visible;font-family:Arial,sans-serif;fill:#302044}.rx-controls{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;margin:16px 0}#rx-check:disabled{opacity:.5;box-shadow:none}#rx-message{margin:15px 0;font-size:16px;line-height:1.6}.rx-deck[data-result=correct] #rx-message{font-weight:900;color:#356d46;padding:13px 17px;background:#e5f2de;border:2px solid #86ae7d;border-radius:13px}.rx-deck .option{min-height:65px;display:flex;align-items:center;justify-content:center}.rx-deck .option.correct{border:3px solid #438761;background:#e1f1df;box-shadow:0 3px 0 #b2d3ad}.rx-explanation{margin:18px 0;padding:18px;background:#f8f5ee;border:1px solid #e7dfce;border-radius:16px}.rx-explanation>strong{font-size:13px;color:#806948}.rx-explanation .rx-equation{margin:12px 0;border:none;background:transparent;padding:10px 0}.rx-explanation p{font-size:16px;line-height:1.7;color:#55475d}.rx-explanation .rx-fragment{cursor:default;border-color:transparent;background:none;padding:0;min-width:0}.rx-explanation .rx-fixed{background:#e5f1df;border:2px solid #87b77f;padding:4px 6px}.rx-species{display:inline-flex;align-items:center;flex-wrap:nowrap}#rx-next{display:block;margin:18px auto}.rx-deck .summary{margin-bottom:14px}@media(max-width:550px){.rx-equation{padding:15px 5px;gap:8px 2px}.rx-fragment{padding:1px 3px}.rx-condition{font-size:11px}.rx-arrow{max-width:180px;min-width:90px}.rx-explanation{padding:14px}.rx-explanation p{font-size:15px}}

.tile-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 8px;margin:18px 0 20px;padding:14px 0 0;border-top:1px solid #e9e0e9}.tile-stat{display:flex;flex-direction:column;gap:3px;min-width:0}.tile-stat strong{font-size:21px;color:#73558b;line-height:1.3;font-weight:900;font-variant-numeric:tabular-nums}.tile-stat>span{font-size:11px;color:#7e7187;line-height:1.4}.tile-stat:nth-child(2) strong{color:#4b7658}.tile-stat:nth-child(3) strong{color:#9a7050}.tile-progress{grid-column:1/-1;height:5px;background:#eee7f2;border-radius:8px;overflow:hidden}.tile-progress>span{display:block;height:100%;background:#b399c5;border-radius:inherit}.training-stats-note{max-width:720px;margin:22px auto;text-align:center;font-size:12px;line-height:1.7;color:#887a90}@media(max-width:380px){.tile-stat strong{font-size:19px}.tile-stat>span{font-size:10px}}

/* Keep chemical typography natural and the reaction together at every width. */
.rx-equation{display:block;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding:18px 12px}
.rx-equation-line{display:flex;align-items:center;gap:8px;width:max-content;min-width:100%;justify-content:center}
.rx-fragment{min-width:32px;min-height:48px;padding:4px 6px;border-width:1px;border-radius:8px}
.rx-fragment[aria-pressed=true]{border-width:1px;box-shadow:inset 0 0 0 2px #8764ac,0 0 0 2px #f4edf9}
.rx-formula{display:inline-block;max-width:none;white-space:nowrap;overflow:visible;font:400 24px/1.4 Arial,sans-serif;letter-spacing:normal}
.rx-formula sub{position:relative;bottom:-.22em;vertical-align:baseline;font-size:70%;line-height:0}
.rx-species{gap:2px;flex-shrink:0}
.rx-plus{flex-shrink:0;padding:0;font-size:20px}
.rx-arrow{min-width:105px;max-width:145px;flex-shrink:0;padding:5px 7px;gap:2px}
.rx-condition{max-width:130px;font-size:11px;line-height:1.3}
.rx-arrow-line{font-size:30px;line-height:1}
.rx-explanation .rx-equation{padding:12px 3px}
.rx-explanation .rx-fragment{min-height:44px}
@media(max-width:550px){.rx-equation{padding:14px 8px}.rx-equation-line{gap:6px}.rx-formula{font-size:22px}.rx-fragment{min-width:30px;padding:3px 5px}.rx-arrow{min-width:100px;max-width:130px}.rx-condition{max-width:116px;font-size:10px}}


/* Compact reaction detective. Only products are interactive. */
body:has(#reaction-view:not([hidden])) .top{padding:16px 30px}
body:has(#reaction-view:not([hidden])) .learning-tools a{padding:12px 20px}
body:has(#reaction-view:not([hidden])) .learning-tools strong{font-size:18px}
body:has(#reaction-view:not([hidden])) .learning-tools small{font-size:12px}
body:has(#reaction-view:not([hidden])) main{max-width:1120px;margin:14px auto}
#reaction-view{scroll-margin-top:12px}#reaction-view>#rx-back{padding:4px 0;font-size:12px}
.rx-deck{padding:19px 24px;margin-top:9px;border-radius:21px;background:linear-gradient(135deg,#fffefa,#fffcff)}
.rx-deck:before{content:'';position:absolute;top:-7px;left:28px;width:55px;height:15px;transform:rotate(-4deg);background:#e4d8edaa;border-left:1px dashed #c9b5d8;border-right:1px dashed #c9b5d8;pointer-events:none}
.rx-deck .deck-heading{padding:0 60px 11px 0}.rx-deck .deck-heading h1{font-size:25px;margin:4px 0}.rx-deck .deck-heading p{max-width:none;font-size:13px;margin:4px 0;line-height:1.5}.rx-deck .deck-sticker{width:53px;height:53px;top:2px;right:0}.rx-deck .tag{font-size:9px}
.rx-rules{font-size:11px;color:var(--muted);margin-top:4px}.rx-rules summary{cursor:pointer;text-decoration:underline;text-underline-offset:3px}.rx-deck .rx-rules p{font-size:11px}
.rx-deck .summary{margin:10px 0;font-size:12px;gap:8px}.rx-deck .summary>span{padding:3px 9px}.rx-deck .summary .text-button{padding:3px;font-size:11px}.rx-deck .session-meta{font-size:11px}.rx-deck progress{height:5px;margin:7px 0 9px}.rx-task-title{font-size:13px;margin:3px 0 8px;display:flex;align-items:center;gap:6px}.rx-task-title:before{content:'✧';font-size:18px;color:#ad93ba}
.rx-deck .rx-equation{padding:16px 13px;background:#faf7fd;border:1px solid #e8deec;border-radius:13px;overflow:visible;box-shadow:0 3px 0 #eee6f1}
.rx-deck .rx-equation-line{width:auto;min-width:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px 12px}
.rx-side{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:7px;min-width:0}
.rx-deck .rx-species{gap:7px;max-width:100%}.rx-compound{display:inline-flex;align-items:baseline;gap:1px}.rx-coefficient{font:400 24px/1.4 Arial,sans-serif;color:var(--ink)}
.rx-deck .rx-static{display:inline-flex;align-items:center;background:none;border:0;padding:0;cursor:default;min-width:0}.rx-deck .rx-plus{font-size:19px;color:#a28caf}.rx-deck .rx-formula{font-size:24px}
.rx-deck .rx-arrow{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;border:0;background:none;box-shadow:none;border-radius:0;padding:0 3px;min-width:85px;max-width:155px;cursor:default;color:#8764ac}.rx-deck .rx-condition{font-size:10px;max-width:150px}.rx-deck .rx-arrow-line{font-size:36px;line-height:1}
.rx-deck .rx-product{min-height:41px;padding:4px 9px;background:#fffefa;border:1px dashed #cbb7da;border-radius:8px;box-shadow:0 2px 0 #e9def0;cursor:pointer}.rx-deck .rx-product:hover:not(:disabled){border-style:solid;background:#f1e8f7}.rx-deck .rx-product[aria-pressed=true]{border:1px solid #8764ac;background:#eadcf4;box-shadow:inset 0 0 0 1px #8764ac}.rx-deck .rx-product.rx-miss{border-color:#cc9d86;background:#fff0ea}.rx-deck .rx-fixed{color:#357449;background:#e5f1df;border-bottom:2px solid #83ad7a;border-radius:4px;padding:1px 5px}
.rx-deck .rx-controls{margin:11px 0 0;justify-content:flex-end;gap:13px}.rx-deck .button{font-size:13px;min-height:39px;padding:8px 16px}.rx-deck .text-button{font-size:12px}
.rx-deck #rx-choices{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:12px;gap:9px}.rx-deck #rx-choices .option{min-height:46px;padding:7px 12px;border-radius:10px}.rx-deck #rx-choices .rx-formula{font-size:22px}
.rx-answer-toolbar{display:flex;align-items:center;gap:15px;margin-top:12px}.rx-deck #rx-message{flex:1;font-size:13px;line-height:1.5;margin:0;padding:0}.rx-deck #rx-message:empty{display:none}.rx-answer-toolbar:has(#rx-message:empty):has(#rx-next[hidden]){display:none}.rx-deck[data-result=correct] #rx-message{padding:8px 11px;border:1px solid #b6cfae;background:#f0f6eb;border-radius:10px;font-size:13px}.rx-deck #rx-next{margin:0 0 0 auto;flex-shrink:0}.rx-deck .rx-explanation{margin:11px 0 0;padding:10px 13px;border:1px dashed #dccdb6;border-radius:11px;background:#faf4ea}.rx-deck .rx-explanation strong{font-size:11px}.rx-deck .rx-explanation p{font-size:13px;line-height:1.6;margin:3px 0 0}.rx-deck .storage-note{margin:12px 0 0;font-size:10px}
@media(max-width:600px){body:has(#reaction-view:not([hidden])) .learning-tools{display:none}body:has(#reaction-view:not([hidden])) .top{padding:15px 18px}.rx-deck{padding:17px 14px}.rx-deck .deck-heading{padding-right:40px}.rx-deck .deck-heading h1{font-size:21px}.rx-deck .deck-heading p{font-size:12px}.rx-deck .deck-sticker{width:39px;height:39px}.rx-deck .rx-equation{padding:13px 9px}.rx-deck .rx-equation-line{gap:9px}.rx-deck .rx-formula,.rx-coefficient{font-size:21px}.rx-deck .rx-arrow{min-width:72px;max-width:135px}.rx-deck .rx-condition{max-width:130px;font-size:10px}.rx-deck .rx-product{min-height:37px;padding:3px 7px}.rx-deck #rx-choices{grid-template-columns:repeat(2,minmax(0,1fr))}.rx-deck #rx-choices .rx-formula{font-size:20px}.rx-answer-toolbar{flex-wrap:wrap;gap:9px}.rx-deck #rx-message{flex-basis:100%}.rx-deck .summary .text-button{margin-left:auto}.rx-deck .rx-explanation p{font-size:12px}.rx-side{gap:6px}.rx-deck .rx-species{gap:6px}}
