:root{--background:#f8faf8;--surface:#fff;--text:#1a312d;--muted:#677973;--border:#e1eae5;--green:#166b5c;--dark:#113b33;--softgreen:#e8f5ef;--shadow:0 6px 25px rgba(32,67,53,.055)}*{box-sizing:border-box}body{margin:0;background:var(--background);color:var(--text);font:15px/1.48 system-ui,-apple-system,'Segoe UI',sans-serif}button,select,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #7acbb2;outline-offset:2px}.topbar{height:74px;padding:0 28px;display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid var(--border)}.brand{display:flex;align-items:center;gap:12px}.brandmark{width:40px;height:40px;border-radius:12px;background:var(--green);color:#fff;display:grid;place-items:center;font-size:30px}.brand strong{font-size:17px;display:block;line-height:1.1}.brand span:not(.brandmark){font-size:12px;color:var(--muted)}.topright{display:flex;align-items:center;gap:16px}.subtle-hint{color:var(--muted);font-size:12px}.shell{display:grid;grid-template-columns:232px minmax(0,1fr);height:calc(100dvh - 74px);min-height:540px}.sidebar{padding:22px 12px;display:flex;flex-direction:column;gap:5px;background:#fff;border-right:1px solid var(--border);overflow:auto}.navlabel{padding:0 13px 9px;font-size:10px;letter-spacing:.14em;color:#81948b;font-weight:800}.secondlabel{margin-top:17px}.navbtn{width:100%;border:0;border-radius:12px;display:flex;text-align:left;align-items:center;gap:10px;padding:9px 10px;background:transparent;color:#334b43;font-weight:730;font-size:13px}.navbtn:hover{background:#f0f6f2}.navbtn.active{background:#e9f5ef;color:#155a4b}.navbtn small{display:block;color:#83958d;font-weight:450;font-size:10px;margin-top:2px}.navicon{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;font-size:19px;flex-shrink:0}.green{background:#e5f5e8}.amber{background:#fff0d6}.blue{background:#e4efff}.purple{background:#f0eaff}.grey{background:#edf2f0}.pink{background:#ffebed}.sidebottom{margin-top:auto;padding:16px 12px;border-top:1px solid var(--border);font-size:11px;color:#81918a}.sidebottom b{display:block;font-size:12px;color:#375448;margin-bottom:3px}.maincontent{padding:26px 34px 40px;overflow:auto;scrollbar-gutter:stable;min-width:0}.heading-row{display:flex;align-items:start;justify-content:space-between;gap:15px}.eyebrow{color:var(--green);font-size:11px;letter-spacing:.13em;font-weight:850;text-transform:uppercase;margin-bottom:7px}.heading-row h1{font-size:clamp(24px,2.5vw,32px);line-height:1.2;margin:0}.heading-row p{margin:8px 0 0;color:var(--muted);max-width:830px;font-size:14px}.tiny-pill{display:inline-flex;align-items:center;background:#edf4f0;color:#40725e;padding:7px 10px;border-radius:18px;font-size:11px;font-weight:750;white-space:nowrap}.path{margin-top:24px;background:#fff;border:1px solid var(--border);border-radius:18px;padding:20px 19px 14px;box-shadow:var(--shadow)}.sectiontitle{font-size:12px;color:#597469;text-transform:uppercase;letter-spacing:.08em;font-weight:800}.flowline{display:flex;gap:8px;align-items:stretch;overflow-x:auto;padding:14px 2px 10px}.flow-step{flex:1 0 114px;max-width:210px;min-height:112px;border:1px solid #dce7e1;border-radius:13px;background:#fafcfb;padding:13px 9px;text-align:left;color:#35554a;transition:.15s}.flow-step:hover{border-color:#70b69b;background:#f2fbf5;transform:translateY(-2px)}.flow-step.selected{background:var(--softgreen);border:2px solid #4e9c82;padding:12px 8px}.flow-number{font-size:10px;letter-spacing:.06em;color:var(--green);font-weight:800}.flow-emoji{display:block;font-size:27px;margin:6px 0 7px}.flow-step b{display:block;font-size:12px}.flow-step small{display:block;font-size:10px;color:#71877e;margin-top:4px}.arrow{align-self:center;font-size:20px;color:#99afa5;flex:none}.tiprow{display:flex;justify-content:space-between;align-items:center;margin-top:8px;color:#82958c;font-size:11px}.linkbtn,.soft-btn{border:1px solid var(--border);background:#fff;padding:7px 12px;border-radius:9px;color:#356c5a;font-weight:700;font-size:12px}.linkbtn:hover,.soft-btn:hover{background:#f2f8f4}.contentgrid{display:grid;grid-template-columns:minmax(330px,.91fr) minmax(390px,1.09fr);gap:20px;margin-top:20px}.panel{background:#fff;border:1px solid var(--border);border-radius:18px;padding:21px;box-shadow:var(--shadow);min-width:0}.panel h2{font-size:21px;margin:0 0 8px;line-height:1.25}.panel h3{font-size:15px;margin:0 0 7px}.panel p{color:#4d645a;font-size:13px;margin:0 0 14px;line-height:1.6}.panel .smalllabel{font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--green);font-weight:800;margin-bottom:7px}.equation{border:1px solid #d6e8df;background:#f5faf7;border-radius:12px;padding:14px 13px;font-size:15px;line-height:1.8;font-weight:690;overflow-wrap:anywhere;margin:13px 0}.educator-note{font-size:12px;background:#fff8ea;border-left:3px solid #dfb459;padding:12px;border-radius:8px;color:#64532c;margin:12px 0}.chiprow{display:flex;gap:8px;flex-wrap:wrap}.chip{background:#eef5f1;border:1px solid #d9e8df;color:#3d6c59;padding:5px 9px;font-size:11px;border-radius:20px}.vcecheck{border-top:1px solid var(--border);padding-top:14px;margin-top:14px}.vcecheck p{font-size:12px}.vcecheck strong{color:#2d6656}.group-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-top:13px}.molecule-tile{display:flex;gap:7px;flex-direction:column;text-align:left;border:1px solid #dce8e2;background:#fff;border-radius:12px;padding:12px 11px;color:var(--text);min-width:0}.molecule-tile:hover,.molecule-tile.active{border-color:#66a888;background:#f3fbf6}.molecule-tile strong{font-size:12px}.molecule-tile small{font-size:12px;color:#668075}.molecule-tile .tileformula{color:#73837b;font-size:11px}.molecule-image-small{height:48px;width:100%;object-fit:contain;background:#fff;border-radius:5px}.viewer{border:1px solid #e2e9e6;border-radius:14px;background:#fff;margin-top:13px;padding:14px;min-width:0}.viewer-toolbar{display:flex;flex-wrap:wrap;gap:7px;justify-content:space-between;align-items:center}.segmented{display:flex;gap:3px;flex-wrap:wrap}.segmented button{border:1px solid transparent;background:#f0f5f2;border-radius:7px;padding:7px 9px;color:#60756b;font-size:11px;font-weight:750}.segmented button.active{background:#cceadd;border-color:#7ebf9c;color:#175c4d}.struct-viewport{height:255px;overflow:auto;display:flex;align-items:center;justify-content:flex-start;border-radius:12px;border:1px solid #e5ece8;background:#fff;margin-top:12px}.struct-viewport img{width:auto;height:90%;max-width:none;object-fit:contain;margin:auto}.struct-viewport.large img{height:290px}.struct-viewport.full img{height:390px}.struct-viewport.full.large img{height:440px}.formula-display{min-height:180px;display:flex;align-items:center;justify-content:center;padding:25px;text-align:center;font-size:clamp(19px,2vw,27px);font-weight:690;letter-spacing:.02em;overflow-wrap:anywhere}.subtle{color:var(--muted);font-size:12px}.detailtext{font-size:12px!important;margin:10px 0 0!important}.viewer-meta{margin-top:10px;display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}.viewer-meta b{color:#244e3f}.view-selector{padding:10px 10px;max-width:320px;width:100%;border:1px solid var(--border);border-radius:10px;background:#fff;color:var(--text)}.helpheading{display:flex;align-items:center;justify-content:space-between;gap:10px}.sideby{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin:18px 0}.compare-card{min-width:0}.compare-card h3{font-size:13px;margin:0 0 6px}.compare-card .viewer{margin:0;padding:9px}.compare-card .struct-viewport{height:185px}.compare-card .struct-viewport img{height:230px}.compare-card .formula-display{min-height:185px;font-size:14px}.compare-card .viewer-meta{font-size:11px}.compare-card .detailtext{min-height:52px}.compare-legend{display:flex;gap:12px;flex-wrap:wrap;margin:15px 0}.labeldot{font-size:12px;color:#5f7c70}.labeldot span{width:11px;height:11px;display:inline-block;border-radius:50%;margin-right:6px}.blue-dot{background:#6f9ed2}.gold-dot{background:#ddb25a}.green-dot{background:#75bd92}.reaction-steps{display:flex;align-items:stretch;gap:10px;margin:13px 0}.reaction-bubble{flex:1;padding:11px;border-radius:12px;background:#f0f7f3;font-size:12px}.reaction-bubble b{display:block;margin-bottom:6px}.reaction-arrow{align-self:center;color:var(--green);font-size:24px}.toggle-group{display:flex;gap:6px;flex-wrap:wrap;margin:15px 0}.toggle-group button{background:#fff;border:1px solid var(--border);border-radius:10px;padding:9px 12px;color:#59766a;font-size:12px;font-weight:750}.toggle-group button.active{background:#e0f3e9;border-color:#6caf91;color:var(--green)}.reactions-panel{background:#f7faf8;border:1px solid var(--border);border-radius:14px;padding:19px;margin:18px 0}.reaction-switch{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.reaction-switch select{min-width:230px;max-width:100%;padding:10px;border:1px solid #d3e2d8;border-radius:10px;background:#fff}.flash .highlight-reaction{animation:glow 1.4s ease-in-out infinite alternate}@keyframes glow{0%{box-shadow:0 0 0 transparent}100%{box-shadow:0 0 0 6px #b6ead1}}.library-layout{display:grid;grid-template-columns:235px minmax(0,1fr);gap:18px;margin-top:20px}.library-list{height:calc(100dvh - 220px);min-height:430px;overflow:auto;padding:12px}.libitem{display:block;text-align:left;width:100%;border:0;border-bottom:1px solid #edf2ed;background:#fff;padding:12px 10px;color:#2b4a3c}.libitem:hover,.libitem.active{background:#eaf7ee}.libitem b{display:block;font-size:12px}.libitem span{display:block;font-size:11px;color:#6d8075}.library-display .struct-viewport{height:380px}.library-display .struct-viewport.full{height:440px}.library-display .struct-viewport img{height:360px}.library-display .struct-viewport.full img{height:500px}.practice-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:20px;margin-top:20px}.question{font-size:18px!important;line-height:1.5!important;font-weight:670;color:#203f34!important}.choices{display:grid;gap:9px}.choice{background:#fff;border:1px solid #dce8e1;border-radius:10px;padding:12px 14px;text-align:left;font-size:13px;color:#345243}.choice:hover{border-color:#72b89b}.choice.correct{border-color:#35a17e;background:#e9f9f1;color:#12674f}.choice.incorrect{border-color:#c87978;background:#fff0ef;color:#aa4f49}.feedback{margin-top:18px;padding:13px;border-radius:10px;background:#f1f7f2;border:1px solid #cbded2;font-size:12px;color:#3e6352}.primary{border:none;background:var(--green);padding:10px 16px;color:#fff;border-radius:10px;font-size:12px;font-weight:770}.primary:hover{background:#0f5649}.question-counter{font-size:12px;color:var(--muted);margin-bottom:10px}.overlay{position:fixed;inset:0;background:rgba(17,42,32,.5);display:grid;place-items:center;padding:20px;z-index:10}.overlay[hidden]{display:none}.modal{background:#fff;border-radius:19px;width:min(700px,100%);max-height:90dvh;overflow:auto;padding:22px;box-shadow:0 25px 65px #102a2035}.modalhead{display:flex;align-items:center;justify-content:space-between}.modal h2{margin:0}.modal p,.modal li{line-height:1.65;color:#53685e;font-size:14px}.modal h3{font-size:15px}.iconbtn{width:36px;height:36px;background:#f0f5f2;border:0;border-radius:50%;font-size:17px}.refnotes{font-size:11px;color:#87958d;margin-top:17px}.refnotes a{color:#387a62}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}@media(max-width:1100px){.contentgrid{grid-template-columns:1fr}.sideby{grid-template-columns:repeat(2,1fr)}.maincontent{padding:23px 22px 36px}.practice-grid{grid-template-columns:1fr}.library-layout{grid-template-columns:210px 1fr}}@media(max-width:700px){.topbar{padding:0 14px;height:62px}.brandmark{height:35px;width:35px}.topright .subtle-hint{display:none}.shell{grid-template-columns:1fr;height:calc(100dvh - 62px)}.sidebar{height:auto;display:flex;flex-direction:row;overflow-x:auto;padding:8px;align-items:center;border:0;border-bottom:1px solid var(--border);gap:4px}.navlabel,.sidebottom,.navbtn small{display:none!important}.navbtn{width:auto;flex:none;padding:7px;font-size:11px;gap:4px}.navicon{width:30px;height:30px;font-size:15px}.maincontent{padding:17px 13px 30px}.heading-row h1{font-size:25px}.path{padding:13px}.flow-step{flex-basis:115px}.contentgrid{gap:13px}.panel{padding:16px}.sideby{grid-template-columns:1fr}.library-layout{grid-template-columns:1fr}.library-list{display:flex;height:auto;min-height:0;overflow-x:auto}.libitem{min-width:160px;max-width:160px}.library-display .struct-viewport{height:280px}}
/* Fit whole molecular structure by default; zoom for reading every explicit H bond. */
.struct-viewport.fit{justify-content:center}
.struct-viewport.fit img,.struct-viewport.fit.large img,.struct-viewport.fit.full img,.struct-viewport.fit.full.large img{width:auto;height:auto;max-width:98%;max-height:95%;flex-shrink:1}
.struct-viewport.zoom{justify-content:flex-start;align-items:flex-start}
.struct-viewport.zoom img,.struct-viewport.zoom.large img,.struct-viewport.zoom.full img,.struct-viewport.zoom.full.large img{max-width:none;max-height:none;flex-shrink:0;width:auto;height:410px}
.compare-card .struct-viewport.zoom img{height:320px}
.library-display .struct-viewport.zoom img{height:550px}
/* v2.0: legible textbook-style molecular structures and interactive comparison lab */
.structure-tools{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end;align-items:center;min-height:27px}
.structure-tools .linkbtn{font-size:11px;padding:5px 9px}
.structure-tools .active-labels{background:#e4f5ec;border-color:#9ccdb6}
.struct-viewport.main{width:100%;height:auto;min-height:150px;max-height:390px;overflow:auto;justify-content:center;align-items:center;padding:10px;border:1px solid #e4ebe8;background:#fff}
.struct-viewport.main img,.struct-viewport.main.large img,.compare-card .struct-viewport.main img,.library-display .struct-viewport.main img{width:100%;height:auto;max-height:370px;max-width:100%;object-fit:contain;display:block;margin:auto}
.struct-viewport.main:not(.large) img{max-height:300px}
.struct-viewport.main img[src*="triglyceride"],.struct-viewport.main img[src*="triolin"],.struct-viewport.main img[src*="triolein"],.struct-viewport.main img[src*="tricaprin"],.struct-viewport.main img[src*="trilinol"]{max-height:390px}
.annotation-bar{font-size:12px;line-height:1.5;margin:9px 0 0;border-radius:9px;padding:10px 11px;background:#f1f8f3;border-left:3px solid #68a88e;color:#365b4a}
.rep-note{display:block;font-size:11px;margin-top:7px;color:#75877e;line-height:1.45}
.molecule-image-small{height:76px}
.molecule-tile{overflow:hidden}
.molecule-tile .molecule-image-small{object-position:center;background:transparent}
.compare-tabs{display:flex;align-items:stretch;gap:6px;overflow:auto;border-bottom:1px solid #dce8df;margin:10px 0 17px;padding:0 0 8px}
.compare-tabs button{white-space:nowrap;border:1px solid transparent;border-radius:9px;background:transparent;padding:10px 13px;color:#5a7569;font-size:12px;font-weight:750}
.compare-tabs button.selected{background:#e1f3e9;border-color:#b9e0cd;color:#12614f}
.compare-panel{padding:23px}
.comparison-bar{display:flex;align-items:start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.comparison-bar h2{margin-bottom:0}
.comparison-full{display:grid;gap:17px}
.compare-half{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.compare-panel .compare-card{padding:13px;border:1px solid #e3ece6;border-radius:13px;background:#fcfefc;min-width:0}
.compare-panel .compare-card h3{font-size:15px}
.compare-panel .compare-card .viewer{border:0;padding:4px;background:transparent;margin-top:4px}
.compare-panel .compare-card .struct-viewport.main{max-height:290px;min-height:110px;padding:4px}
.compare-panel .wide-trig .compare-card .struct-viewport.main{max-height:400px}
.compare-panel .wide-trig .compare-card .struct-viewport.main img{max-height:370px}
.compare-panel .compare-half .struct-viewport.main img{max-height:195px}
.compare-panel .compare-card .card-explanation{font-size:12px;line-height:1.5;margin:11px 0 9px;color:#566c60}
.compare-panel .compare-card .viewer-meta{font-size:12px}
.compare-panel .compare-card .detailtext{min-height:0}
.compare-panel .compare-card .annotation-bar{font-size:11px}
.key-comparison{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:16px 0 4px;font-size:12px}
.key-comparison>span{padding:7px 10px;border-radius:9px;font-weight:650}
.gold-word{background:#fff1d0;color:#8b610d}
.green-word{background:#e5f7ea;color:#277047}
.blue-word{background:#e9f1fd;color:#305f90}
.focus-panel .struct-viewport.main{max-height:480px;min-height:250px}
.focus-panel .struct-viewport.main img{max-height:460px}
.focus-description{margin:18px 0;font-size:14px;color:#435f52}
.reactions-panel{background:#fff;padding:23px;border-radius:18px;margin-top:16px}
.reactions-panel h2{margin:4px 0 0;font-size:21px}
.reaction-explorer{border:1px solid #dcebe2;background:#f8fcf9;border-radius:13px;overflow:hidden;margin:15px 0}
.reaction-phase-nav{display:grid;grid-template-columns:repeat(3,1fr);background:#ecf3ee;gap:2px;padding:6px}
.reaction-phase-nav button{font-size:12px;color:#668175;padding:11px 5px;border:0;border-radius:8px;background:transparent;font-weight:750}
.reaction-phase-nav button.chosen{background:white;color:#176a56;box-shadow:0 2px 5px #285c4518}
.reaction-phase-nav button span{display:inline-grid;place-items:center;background:#d1e8dc;width:22px;height:22px;border-radius:50%;margin-right:8px}
.reaction-phase-nav button.chosen span{background:#1c7962;color:#fff}
.phase-content{padding:19px}
.phase-text{font-size:14px;line-height:1.7;color:#425f52;max-width:900px}
.reaction-visuals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin:16px 0}
.reaction-visual{border:1px solid #e1ebe5;border-radius:11px;background:white;padding:10px;display:flex;align-items:center;flex-direction:column;gap:9px;min-width:0}
.reaction-visual img{width:100%;height:190px;object-fit:contain}
.reaction-visual b{font-size:13px;text-align:center}
.reaction-visual span{color:#567d67;font-size:13px}
.phase-controls{display:flex;align-items:center;justify-content:space-between;padding:12px 19px;border-top:1px solid #dcebe2;font-size:12px;color:#668074}
.phase-controls button:disabled{opacity:.4;cursor:default}
.mixed-panel{margin-top:16px}
.mixed-panel p{font-size:13px}
.mixed-panel .viewer .struct-viewport.main{max-height:440px}
.mixed-products{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:13px 0}
.mixed-product{display:flex;gap:7px;align-items:center;flex-wrap:wrap;padding:12px 10px;background:#f7fbf7;border:1px solid #dfebe3;border-radius:10px;font-size:11px}
.mixed-product strong{font-size:12px}
.mixed-product .linkbtn{margin-left:auto}
.chain-swatch{display:inline-block;width:12px;height:12px;border-radius:50%;flex-shrink:0}
.swatch-0{background:#f6b18c}.swatch-1{background:#b5baff}.swatch-2{background:#a9cb86}
.bottom-learning{margin-top:16px}
.library-head{display:flex;gap:12px;align-items:start;justify-content:space-between;flex-wrap:wrap}
.library-display .struct-viewport.main{height:auto;max-height:500px;min-height:270px}
.library-display .struct-viewport.main img{max-height:490px}
/* Better defaults for the main view on 1080p screens. */
@media (max-width:1120px){.contentgrid{grid-template-columns:1fr}.compare-half{grid-template-columns:1fr}.compare-panel .compare-half .struct-viewport.main img{max-height:250px}}
@media (max-width:800px){.compare-tabs{flex-wrap:nowrap}.reaction-visuals{grid-template-columns:1fr}.mixed-products{grid-template-columns:1fr}.comparison-bar{display:block}.comparison-bar .segmented{margin-top:11px}.reaction-visual img{height:160px}.compare-half{grid-template-columns:1fr}}
.enlarge-pane{display:flex;align-items:center;justify-content:center;max-height:67vh;min-height:180px;overflow:auto;border:1px solid #e2eae5;border-radius:12px;background:#fff;padding:14px;margin:14px 0}
.enlarge-pane img{max-width:none;width:100%;height:auto;object-fit:contain;max-height:62vh;min-width:min(600px, 95%)}
.modal:has(.enlarge-pane){width:min(1180px,98vw);max-height:95vh}
/* Short R-group structures keep the key –COOH and –COOCH3 differences readable. */
.compare-panel .compare-half .struct-viewport.main{height:225px;min-height:140px;max-height:255px}
.compare-panel .compare-half .struct-viewport.main img{width:100%;max-height:218px}

/* v3: chemical stages are primary nodes; physical tasks sit over the arrows */
.compact-path{padding:14px 16px 8px;margin-top:17px}
.core-flow{padding:8px 0 6px;align-items:stretch;gap:4px}
.flow-core{flex:1 1 140px;min-width:108px;max-width:none;border:1px solid #d5e5db;background:#fbfdfa;border-radius:12px;min-height:84px;padding:12px 7px;text-align:center;color:#315a4a}
.flow-core.selected{background:#e5f5ec;border:2px solid #288168}
.flow-core .flow-emoji{display:block;font-size:23px;line-height:1.1;margin:2px auto 7px}
.flow-core b{display:block;font-size:13px}
.flow-connector{flex:0 0 108px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;text-align:center;color:#658578}
.flow-connector span{font-size:10px;font-weight:750;max-width:105px;line-height:1.2;min-height:26px}
.flow-connector strong{color:#237861;font-size:27px;line-height:1}
.path-caption{font-size:11px;color:#83978b;margin:4px 0 0}
.compact-facts .summary-lead{font-size:15px;color:#2c4840;font-weight:530}
.compact-facts .equation{margin:13px 0;font-size:16px}
.quick-points{display:grid;gap:6px;margin:16px 0}
.quick-points>div{border:1px solid #dfeae3;border-radius:9px;padding:10px 12px;display:flex;gap:9px;align-items:baseline;font-size:13px}
.quick-points b{min-width:88px;color:#277259}
.quick-points span{color:#415c51}
/* distillation virtual model */
.distil-module{border-top:1px solid #dfe9e4;margin-top:22px;padding-top:15px}
.distil-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.distil-head h3{font-size:17px;margin:0 0 4px}
.distil-head p{font-size:12px;margin:0 0 6px;color:#60786d}
.distil-sim{border:1px solid #d9e5e2;background:#f7fbfb;border-radius:14px;overflow:hidden;padding:10px}
.distil-sim svg{width:100%;max-height:220px}
.distil-vapour,.distil-bubbles,.distil-drop,.distil-heat{opacity:0;transition:opacity .2s}
.distil-sim.running .distil-vapour,.distil-sim.running .distil-bubbles,.distil-sim.running .distil-drop,.distil-sim.running .distil-heat{opacity:1}
.distil-sim.running .distil-vapour{animation:dashflow 1.6s linear infinite}
.distil-sim.running .distil-bubbles{animation:bubble 1.1s ease-in-out infinite alternate}
.distil-sim.running .distil-drop{animation:drop 1s ease-in infinite}
.distil-sim.running .distil-heat{animation:bubble .7s ease-in-out infinite alternate}
@keyframes dashflow{to{stroke-dashoffset:-36}}
@keyframes bubble{to{transform:translateY(-9px);opacity:.45}}
@keyframes drop{0%{transform:translateY(-6px);opacity:0}30%{opacity:1}100%{transform:translateY(36px);opacity:0}}
.distil-status{display:flex;gap:9px;align-items:center;font-size:11px;color:#536e65;margin:5px 0 10px}
.distil-meter{height:10px;flex:1;background:#e0ebe8;border-radius:20px;overflow:hidden}
.distil-meter span{height:100%;display:block;background:#42a89e;border-radius:20px;transition:width .13s}
.sim-controls{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.sim-controls select{border:1px solid #d9e5dc;padding:7px 10px;border-radius:9px;background:#fff}
.sim-controls label{font-size:12px;color:#587264;display:flex;align-items:center;gap:7px}
.simulation-note{font-size:11px!important;line-height:1.4;color:#648075;margin:10px 0 0!important}
/* full reaction remains in the DOM; tabs change highlight only */
.rx-complete{margin-top:15px}
.rx-tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:10px}
.rx-tabs button{border:1px solid #d8e5dd;border-radius:9px;padding:9px 16px;color:#527465;font-size:12px;font-weight:750;background:#f5faf6}
.rx-tabs button.chosen{border-color:#5ba78b;color:#0f644f;background:#e4f6e9}
.rx-equation{background:#f3f7f4;padding:10px 13px;text-align:center;border-radius:10px;font-weight:700;font-size:15px;margin:8px 0 11px;letter-spacing:.01em}
.rx-full-diagram{display:grid;grid-template-columns:minmax(0,1fr) 112px minmax(0,1fr);align-items:stretch;gap:9px}
.rx-zone{border:2px solid #dfe9e3;border-radius:13px;padding:10px 8px;background:#fff;min-width:0;transition:border .18s,background .18s,box-shadow .18s}
.rx-zone.focus{border-color:#188769;background:#f0fbf4;box-shadow:0 0 0 2px #ccebd7}
.rx-zone.change-focus{border-color:#e0b96a}
.rx-zone-head{font-size:11px;letter-spacing:.11em;font-weight:850;color:#6d8d7d;padding:3px 5px 10px}
.rx-mol-row{display:flex;flex-direction:column;gap:8px}
.rx-mol{padding:8px;border:1px solid #e4ebe6;background:#fcfdfc;border-radius:9px;min-width:0}
.rx-mol-name{display:flex;gap:7px;align-items:center;justify-content:center;flex-wrap:wrap;text-align:center;font-size:12px;font-weight:780;min-height:20px}
.rx-coeff{background:#e5f3e8;color:#176c55;border-radius:6px;padding:1px 5px;font-size:12px}
.rx-mol img{width:100%;height:105px;object-fit:contain;display:block;margin:4px auto}
.rx-mol.wide img{height:185px}
.rx-mol-formula{text-align:center;font-size:11px;color:#768b80}
.rx-middle{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:10px;color:#7a9285;font-size:10px;border-radius:12px}
.rx-middle.focus{background:#fff5de;color:#835c19}
.rx-arrow{font-size:49px;font-weight:700;color:#217f65;line-height:1}
.rx-explain{padding:11px 14px;border:1px solid #d9e8de;background:#f4faf6;color:#375e4d;border-radius:10px;margin-top:11px;font-size:13px}
.rx-structure-note{color:#6b8278;font-size:11px;margin-top:9px}
.compare-panel .compare-card .detailtext,.library-display .detailtext{display:none}
.refnotes a{color:#23765d}
@media(max-width:1090px){.core-flow{overflow-x:auto}.flow-core{flex:0 0 136px}.rx-full-diagram{grid-template-columns:minmax(0,1fr) 65px minmax(0,1fr)}.rx-middle .rx-arrow{font-size:34px}.rx-middle b{font-size:9px}}
@media(max-width:660px){.rx-full-diagram{grid-template-columns:1fr}.rx-middle{min-height:45px;flex-direction:row}.rx-arrow{transform:rotate(90deg)}.rx-mol img{height:100px}.rx-mol.wide img{height:150px}.quick-points>div{display:block}.quick-points b{display:block}.sim-controls{gap:5px}}
@media(prefers-reduced-motion:reduce){.distil-sim.running *{animation:none!important}}


/* v4 media + transesterification */
.media-panel{margin-top:18px}.media-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:14px}.media-card{border:1px solid #dbe6ea;border-radius:18px;overflow:hidden;background:#fcfeff;display:flex;flex-direction:column;min-height:100%}.media-card img{width:100%;height:168px;object-fit:cover;background:#eef4f8}.media-placeholder{height:168px;display:flex;align-items:center;justify-content:center;font-size:48px;background:linear-gradient(135deg,#ecf7f5,#eef4fb);color:#2d8c7e}.media-body{padding:14px 14px 16px}.media-body h3{margin:4px 0 8px;font-size:18px}.media-body p{margin:0 0 12px;color:#40545f;line-height:1.45}.media-source{font-size:12px;color:#5d727e}.media-links{margin-bottom:8px}.media-link{display:inline-flex;text-decoration:none}.trans-anim-panel{margin-top:18px;padding-top:6px;border-top:1px solid #e4edf1}.trans-anim svg{width:100%;height:auto;border:1px solid #d9e6ea;border-radius:16px;background:#fff}.trans-anim .sim-controls{margin-top:12px}.trans-anim .simulation-note{margin-top:10px}.rx-complete{margin-bottom:18px}@media (max-width:900px){.media-card img,.media-placeholder{height:140px}}


/* v6 compact molecule selector + energy profile + detailed trans animation */
.compact-selector{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0 18px}.molecule-chip{border:1px solid #cfe0d8;background:#f7fbf9;border-radius:14px;padding:10px 12px;display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:154px;color:#28413d}.molecule-chip strong{font-size:14px}.molecule-chip span{font-size:13px;color:#556b75}.molecule-chip.active{background:#dff1e8;border-color:#6bb995;box-shadow:0 0 0 2px rgba(107,185,149,.12) inset}.energy-panel{margin:14px 0 16px;padding:14px 14px 10px;border:1px solid #d8e7ee;border-radius:16px;background:#fcfeff}.energy-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.energy-head h3{margin:0;font-size:18px}.energy-svg{width:100%;max-width:420px;height:auto;display:block}.energy-note{margin:8px 0 0;color:#4c616d;line-height:1.42}.equation.thermo-equation,.rx-equation.thermo-equation{border-left:5px solid #88afc3;background:#f5fafc}.equation-title{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#54707b;margin-bottom:6px}.equation-body{font-weight:600;line-height:1.5}.trans-anim .quick-points{margin-top:12px}.trans-change-points{grid-template-columns:1fr 1fr}.trans-anim svg text{user-select:none}.rx-equation.thermo-equation{margin-bottom:14px}.library-list .libitem img,.molecule-image-small{display:none !important}@media (max-width:860px){.molecule-chip{min-width:132px}.trans-change-points{grid-template-columns:1fr}.energy-svg{max-width:100%}}


/* v6 clearer energy profiles and asset-based trans animation */
.delta-h-line{margin-top:8px;font-weight:700;color:#a45327}.energy-panel.clear-energy{border:1px solid #d9e5ee;background:#ffffff}.energy-svg.clear{max-width:820px;width:100%;height:auto;display:block;margin-top:6px}.trans-anim.rebuilt{border:1px solid #d9e6ea;border-radius:18px;padding:14px;background:#fbfdff}.trans-frame-img{width:100%;height:auto;border:1px solid #d8e3ea;border-radius:14px;background:white}.anim-step-row{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 10px}.step-dot{min-width:38px;height:38px;border-radius:999px;border:1px solid #c9d7df;background:#fff;font-weight:700;color:#38505d}.step-dot.active{background:#dff1e8;border-color:#6bb995;color:#1f4d3d}.step-dot:hover{background:#f2f8fb}.sim-controls{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.energy-note{max-width:720px}.quick-points.trans-change-points{margin-top:12px}.equation.thermo-equation,.rx-equation.thermo-equation{background:#f8fbfd}.equation.thermo-equation .equation-body,.rx-equation.thermo-equation .equation-body{font-size:1.02rem}@media (max-width:900px){.energy-svg.clear{max-width:100%}.sim-controls{gap:8px}.step-dot{min-width:34px;height:34px}}

/* v7: six-fuel explorer, precise structure highlighting and clear energy profiles */
.energy-panel.clear-energy{margin:14px 0 8px;background:#fff;padding:15px 13px 14px;border:1px solid #dbe6ed;border-radius:16px}
.energy-panel-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;margin:0 4px 8px;color:#245a78;font-size:12px}
.energy-panel-head strong{text-transform:uppercase;letter-spacing:.04em}
.energy-panel-head span{font-size:13px;font-weight:800;color:#b25e32}
.energy-svg.clear{width:100%;height:auto;max-width:100%;display:block;aspect-ratio:840/360;overflow:visible}
.energy-legend{display:flex;gap:8px 18px;flex-wrap:wrap;font-size:11px;line-height:1.5;color:#55707d;margin:7px 6px 0}
.energy-legend span{white-space:normal}
.equation-caption{font-size:11px!important;line-height:1.45!important;color:#718178!important;margin:3px 1px 12px!important}
.thermo-equation{overflow-wrap:normal;word-break:normal}
.mixture-note{border:1px solid #e7e8cd;background:#fffdf2;border-radius:10px;padding:10px 12px;margin:10px 0 14px!important;font-size:12px!important}
.source-link-list{display:flex;flex-wrap:wrap;gap:8px}
.source-link-list a{display:inline-flex;align-items:center;font-size:12px;color:#246b62;text-decoration:none;padding:9px 11px;border:1px solid #cfded7;background:#f8fcfa;border-radius:10px}
.source-link-list a:hover{text-decoration:underline}
.definition-panel{margin-top:18px}
.definition-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.definition-choice{padding:15px 15px 16px;display:flex;flex-direction:column;align-items:start;text-align:left;gap:7px;min-width:0;border:1px solid #deeae4;border-radius:13px;background:#f9fcfa;color:#31594c}
.definition-choice.active{border-color:#66b397;background:#eaf6ef;box-shadow:0 0 0 1px #7cbea1 inset}
.definition-choice strong{font-size:15px}
.definition-choice span{line-height:1.55;font-size:12px;font-weight:450}
.vce-test{margin-top:14px;border-left:3px solid #5ca98c;background:#f6faf7;padding:11px 13px;border-radius:7px;font-size:13px;color:#445e51}
.sustainability-panel,.sustain-table-scroll{margin-top:18px}
.sustainability-panel .section-head h2{font-size:22px;margin:3px 0 4px}
.sustainability-panel .section-head p{margin:0 0 12px}
.sustain-fuel-tabs{display:flex;flex-wrap:wrap;gap:7px;margin:14px 0 17px}
.sustain-fuel-tabs button{padding:9px 12px;border:1px solid #d9e5dd;border-radius:9px;background:#f9fbf9;color:#38584a;font-size:12px;font-weight:700}
.sustain-fuel-tabs button.active{border-color:#80bf9f;background:#e2f3e9;color:#155e4a}
.argument-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.argument-card{padding:18px;border:1px solid #e2e8e2;border-radius:13px;background:#fafcfb;min-width:0}
.argument-card h3{font-size:15px;margin-bottom:11px}
.argument-card ul{padding-left:20px;margin:0;display:grid;gap:12px}
.argument-card li{font-size:13px;line-height:1.55;color:#3b5650}
.argument-for{border-left:4px solid #4f9e7e;background:#f8fcfa}
.argument-against{border-left:4px solid #cc986a;background:#fffbf5}
.sustainability-panel .sustain-warning{font-size:12px;margin:15px 0 0;color:#697c70}
.sustain-table-scroll{overflow-x:auto}
.sustain-table{border-collapse:collapse;width:100%;min-width:650px;font-size:12px}
.sustain-table th{text-align:left;background:#eaf4ee;color:#2a5948}
.sustain-table td,.sustain-table th{padding:11px 12px;border-bottom:1px solid #e1eae4;vertical-align:top}
.sustain-table tbody tr:nth-child(even){background:#fafcfb}
/* Display the full chemistry of highlighted groups without cropped labels or crowded previews. */
.compare-panel .compare-half .struct-viewport.main{height:auto;min-height:150px;max-height:none;padding:6px}
.compare-panel .compare-half .struct-viewport.main img{width:100%;height:auto;max-height:none;object-fit:contain}
.compare-panel .wide-trig .compare-card .struct-viewport.main{max-height:none;min-height:170px}
.compare-panel .wide-trig .compare-card .struct-viewport.main img{width:100%;height:auto;max-height:440px}
.focus-panel .struct-viewport.main img{width:100%;height:auto;max-height:500px}
@media(max-width:1150px){.definition-grid{grid-template-columns:1fr 1fr}.argument-columns{grid-template-columns:1fr}.contentgrid{grid-template-columns:1fr}}
@media(max-width:680px){.definition-grid{grid-template-columns:1fr}.maincontent{padding:15px}.sustain-fuel-tabs button{padding:8px 10px}.definition-choice{padding:12px}}
@media(max-width:760px){
 .topbar{height:auto;min-height:65px;padding:10px 15px;gap:10px}.subtle-hint{display:none}
 .shell{display:flex;flex-direction:column;height:auto;min-height:calc(100dvh - 65px)}
 .sidebar{flex-direction:row;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;gap:6px;padding:8px 10px;border-right:0;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:4}
 .sidebar .navlabel,.sidebar .sidebottom{display:none}.sidebar .navbtn{width:auto;flex:0 0 145px;padding:7px 9px}.sidebar .navicon{height:32px;width:32px;font-size:16px}
 .maincontent{padding:16px 13px 26px;overflow:visible;width:100%;min-height:calc(100dvh - 140px)}
 .contentgrid{grid-template-columns:minmax(0,1fr)}.flow-core{flex:0 0 116px}.flow-connector{flex:0 0 66px}
 .flow-connector span{font-size:10px;max-width:70px}.heading-row{flex-wrap:wrap}
}
.process-visual{margin:14px 0;padding:13px;border:1px solid #dde7e9;border-radius:13px;background:#fff}
.process-visual img{display:block;width:100%;height:auto;max-height:330px;object-fit:contain}
.process-visual p{font-size:12px!important;color:#657d80!important;margin:8px 0 0!important}
