.study-program{max-width:1240px;margin:100px auto 40px;padding:0 28px;color:var(--ink)}.study-page-head{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:30px}.study-page-head h1{font-size:38px;font-weight:750;letter-spacing:-1.2px;margin:8px 0}.study-program p,.study-note{color:var(--ink-2);font-size:14px;line-height:1.65}.study-two-column{display:grid;grid-template-columns:1.1fr 1fr;gap:24px;align-items:start}.study-panel{background:var(--ground-2);border:1px solid var(--hairline);border-radius:18px;padding:24px;margin-bottom:24px;min-width:0}.study-panel h2{font-size:22px;letter-spacing:-.5px;font-weight:700;margin-bottom:8px}.study-panel button,.study-panel select,.study-navigator button,.study-navigator input,.study-navigator select{font:500 13px/1.4 Manrope,sans-serif;border-radius:9px;padding:10px 12px;background:var(--ground);border:1px solid var(--hairline);color:var(--ink);min-height:40px}.study-panel .native-primary{background:var(--cyan);color:var(--ground);margin-top:16px}.builder-controls{display:flex;gap:8px;align-items:end;flex-wrap:wrap;margin:20px 0}.builder-controls label{display:grid;gap:5px;font-size:13px}.builder-chapter{border-top:1px solid var(--hairline)}.builder-chapter summary{font-size:16px;font-weight:650;padding:14px 0;cursor:pointer}.builder-chapter summary span{float:right;font-size:12px;font-weight:400;color:var(--muted)}.builder-outcome{display:flex;align-items:start;gap:12px;padding:12px;border-radius:8px;font-size:13px;line-height:1.5;cursor:pointer}.builder-outcome:hover{background:var(--surface-2)}.builder-outcome input{margin-top:5px;accent-color:var(--cyan);flex-shrink:0}.builder-outcome strong{display:block;font-size:12px;color:var(--cyan);margin-bottom:3px}.priority-list{max-height:600px;overflow:auto;margin-top:20px}.priority-list article{display:flex;align-items:center;gap:16px;justify-content:space-between;border-top:1px solid var(--hairline);padding:18px 0}.priority-list strong{display:block;font-size:13px;margin-top:8px}.priority-list p{margin:5px 0}.priority-reason{font-size:12px;color:var(--cyan);background:var(--pale);padding:4px 8px;border-radius:6px}.priority-reason[data-rank="0"]{color:var(--amber)}.study-panel small{display:block;font-size:12px;color:var(--muted);line-height:1.5}.calibration-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:20px}.calibration-grid article{padding:18px;background:var(--ground);border:1px solid var(--hairline);border-radius:12px;min-width:0}.calibration-grid article>span{font-size:13px}.calibration-grid article>strong{display:block;font-size:29px;margin:10px 0;letter-spacing:-1px}.assistance-grid{grid-template-columns:repeat(3,1fr)}.outcome-trends{margin-top:20px}.outcome-trends details{border-top:1px solid var(--hairline);padding:12px 0}.outcome-trends summary{display:grid;grid-template-columns:1fr 100px 100px 155px;gap:16px;font-size:13px;cursor:pointer;align-items:center}.outcome-trends b{font-weight:500;color:var(--ink-2);font-size:12px}.study-navigator{display:grid;gap:8px;margin-top:14px}.study-navigator input{width:100%;min-width:0}.study-navigator p{font-size:12px;color:var(--muted)}.navigator-actions{display:flex;gap:8px}.question-scratch{border-top:1px solid var(--hairline);padding-top:16px;margin-top:20px}.question-scratch summary{font-size:14px;font-weight:600;cursor:pointer}.question-scratch summary span{font-size:12px;font-weight:400;color:var(--muted);margin-left:8px}.question-scratch textarea{width:100%;margin-top:12px;padding:14px;border:1px solid var(--hairline);border-radius:10px;min-height:120px;background:var(--ground-2);color:var(--ink);font:14px/1.6 Manrope,sans-serif}.review-chapter-summary{margin:24px 0}.review-chapter-summary .calibration-grid{grid-template-columns:repeat(5,1fr)}.study-entry{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:22px 24px;background:var(--ground-2);border:1px solid var(--hairline);border-radius:16px;margin:24px 0}.study-entry h2{font-size:20px;font-weight:700}.study-entry p{font-size:13px;color:var(--ink-2);margin-top:5px}.chem-surface{background:#fff!important;color:#24333e!important;border-radius:12px;border:1px solid #d7dde3!important;overflow:hidden;isolation:isolate}.chem-surface svg{background:#fff!important}.chem-surface .molecule,.chem-surface .diagram,.chem-surface .diagram-wrap,.chem-surface .sketch-svg{background:#fff!important}.chem-surface strong,.chem-surface p{color:#24333e!important}.chem-surface button{background:#f1f3f6!important;color:#24333e!important;border-color:#ccd3dc!important}:root[data-theme=dark] .chem-surface{filter:invert(.86) hue-rotate(180deg) brightness(1.08)}#molecule-editor{background:#fff!important}.editor-shell{background:#fff!important;border:1px solid var(--hairline)!important}:root[data-theme=dark]:not([data-editor-theme=paper]) .editor-shell{filter:invert(.86) hue-rotate(180deg) brightness(1.08)}.editor-theme-description{font-size:12px!important;line-height:1.6!important}
@media(max-width:800px){.study-program{margin-top:115px;padding:0 16px}.study-page-head{display:block}.study-page-head>a{margin-top:15px}.study-two-column{grid-template-columns:1fr}.study-panel{padding:20px}.calibration-grid,.review-chapter-summary .calibration-grid{grid-template-columns:repeat(2,1fr)}.outcome-trends summary{grid-template-columns:1fr 65px 65px;gap:10px}.outcome-trends b{grid-column:1/-1}.study-entry{align-items:start;flex-direction:column}.study-panel h2{font-size:20px}}
.study-section-nav{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:24px;position:sticky;top:64px;z-index:5;padding:10px;background:color-mix(in srgb,var(--ground-2) 94%,transparent);backdrop-filter:blur(16px);border:1px solid var(--hairline);border-radius:12px}.study-section-nav a{font-size:13px;color:var(--ink-2);padding:8px 10px;border-radius:7px;text-decoration:none}.study-section-nav a:hover{background:var(--surface-2);color:var(--ink)}.study-panel[id]{scroll-margin-top:130px}.preset-tools{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 18px;padding-bottom:18px;border-bottom:1px solid var(--hairline)}.preset-tools input,.journal-controls input{padding:10px;border:1px solid var(--hairline);border-radius:9px;background:var(--ground);color:var(--ink);font:13px Manrope,sans-serif;min-width:0}.preset-tools input{width:155px}.preset-tools select{max-width:175px}.reminder-list article,.journal-row{display:flex;gap:12px;align-items:start;justify-content:space-between;border-top:1px solid var(--hairline);padding:18px 0}.reminder-list article>div{flex:1}.reminder-controls{display:flex;flex-wrap:wrap;gap:10px;margin:15px 0}.reminder-controls #reminder-outcome{width:100%;max-width:100%}.study-panel details>summary{cursor:pointer;font-weight:600;font-size:14px;padding:12px 0}.source-chapter{border-top:1px solid var(--hairline)}.source-chapter>summary span{float:right;color:var(--muted);font-size:12px}.source-outcome{padding:12px;border-top:1px solid var(--hairline)}.source-outcome>label{display:flex;gap:12px;font-size:14px;line-height:1.5;cursor:pointer}.source-outcome strong{display:block;font-size:12px;color:var(--cyan)}.source-page-links{display:flex;flex-wrap:wrap;gap:8px}.source-page-links a{font-size:12px;color:var(--cyan);padding:8px;border:1px solid var(--hairline);border-radius:7px}.journal-controls{display:flex;gap:10px;margin-top:18px}.journal-controls input{flex:1}.journal-row>div{min-width:0;flex:1}.journal-row h3,.comparison-cards h3{font-size:16px;font-weight:650;margin:7px 0}.journal-note{padding:14px;border-radius:10px;background:var(--ground);margin-top:12px}.journal-note>strong{font-size:12px;color:var(--cyan)}.journal-note p{white-space:pre-wrap;overflow-wrap:anywhere}.time-grid{grid-template-columns:repeat(5,1fr)}.comparison-controls{display:flex;gap:16px;margin:20px 0}.comparison-controls label{display:grid;gap:8px;flex:1;min-width:0;font-size:13px}.comparison-controls select{max-width:100%;min-width:0;width:100%}.comparison-cards{display:grid;grid-template-columns:1fr 1fr;gap:18px}.comparison-cards article{border:1px solid var(--hairline);padding:18px;border-radius:12px;background:var(--ground)}.comparison-scores{display:flex;gap:24px;margin-top:20px}.comparison-scores strong{font-size:26px}.comparison-chapters>div{display:grid;grid-template-columns:1fr 1fr 1fr;padding:12px 0;border-bottom:1px solid var(--hairline);font-size:13px}.mistake-label{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:18px 0;font-size:13px}.mistake-label select{padding:9px;background:var(--ground);color:var(--ink);border:1px solid var(--hairline);border-radius:9px}.diagram-enlarge{display:block;margin:8px 0 12px auto;min-height:30px;padding:5px 10px;border-radius:7px;background:var(--ground-2);color:var(--ink-2);border:1px solid var(--hairline);font:12px Manrope,sans-serif}.diagram-modal{max-width:min(1000px,94vw);width:900px;max-height:90vh;padding:20px;border-radius:18px}.diagram-modal header{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.diagram-modal header h2{margin:0;font-size:18px}.diagram-modal .chem-surface{max-height:70vh;overflow:auto}.diagram-modal svg{width:100%;height:auto;max-height:65vh}.editor-workspace-size{display:flex;align-items:center;gap:12px;font-size:13px;margin:12px 0}.editor-workspace-size select{padding:7px 10px;background:var(--ground-2);color:var(--ink);border:1px solid var(--hairline);border-radius:8px}.draft-recovery{position:fixed;top:68px;left:50%;transform:translateX(-50%);z-index:300;width:min(650px,94vw);border:1px solid var(--amber);background:var(--ground-2);color:var(--ink);border-radius:14px;padding:18px;box-shadow:0 15px 45px #0003}.draft-recovery p{font-size:13px;color:var(--ink-2);margin:8px 0}.draft-recovery .actions{display:flex;gap:8px}.draft-recovery button{padding:8px 12px;background:var(--ground);border:1px solid var(--hairline);border-radius:7px;color:var(--ink)}.study-entry:has(+.export-ui){max-width:1240px;margin:92px auto -70px;padding:20px 24px}
@media(max-width:800px){.study-section-nav{top:90px}.study-panel[id]{scroll-margin-top:220px}.time-grid{grid-template-columns:repeat(2,1fr)}.journal-controls,.comparison-controls{flex-direction:column}.journal-row{flex-direction:column}.comparison-cards{grid-template-columns:1fr}.reminder-list article{flex-wrap:wrap}.reminder-list article>div{flex-basis:100%}.study-entry:has(+.export-ui){margin:115px 16px -50px}.draft-recovery{top:100px}.comparison-chapters>div{gap:8px;font-size:12px}}
.chem-frame{position:relative;min-width:0}.chem-frame>.chem-surface{height:100%;box-sizing:border-box}.chem-frame>.diagram-enlarge{position:absolute;top:8px;right:8px;margin:0;width:30px;height:30px;min-height:30px;display:grid;place-items:center;padding:0;font-size:19px;line-height:1;border-radius:7px;background:color-mix(in srgb,var(--ground-2) 92%,transparent);color:var(--ink-2);border:1px solid var(--hairline);opacity:.75}.chem-frame>.diagram-enlarge:hover,.chem-frame>.diagram-enlarge:focus-visible{opacity:1;color:var(--cyan)}.mol-grid:has(>.chem-frame:nth-child(4)):not(:has(>.chem-frame:nth-child(5))){grid-template-columns:repeat(2,minmax(0,1fr))}.mol-grid .mol-card{margin:0}.chem-surface .molecule{border:0!important}.diagram-modal .chem-surface{height:auto}.diagram-modal .mol-card{padding:25px}
@media(max-width:600px){.mol-grid:has(>.chem-frame:nth-child(4)):not(:has(>.chem-frame:nth-child(5))){grid-template-columns:1fr}.chem-frame>.diagram-enlarge{width:38px;height:38px;min-height:38px}}
.editor-shell #molecule-editor{min-height:0!important}

[data-calibration="Confident"]>span{color:var(--confidence-blue,#7399ee)}[data-calibration="Unsure"]>span{color:var(--amber,#d2a453)}[data-calibration="Guessing"]>span{color:var(--confidence-purple,#a58bd0)}

#clear-sketch{display:inline-flex;align-items:center;min-height:36px;padding:8px 12px;margin:12px 0;background:var(--ground-2);color:var(--ink-2);border:1px solid var(--hairline);border-radius:8px;font:500 13px/1.4 var(--ui-font, sans-serif)}#clear-sketch:hover{background:var(--surface-2)}#clear-sketch:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}

/* Treat diagram frames as grid items, so the zoom control never changes card sizing. */
.mol-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));align-items:stretch;gap:12px}
.mol-grid>.chem-frame{width:100%;min-width:0}
.mol-grid .mol-card{min-width:0;width:100%;padding:18px}
.mol-grid .mol-card strong{padding-right:30px;line-height:1.5}
.mol-grid .molecule{min-width:0}
@media(max-width:600px){.mol-grid{grid-template-columns:1fr}.mol-grid .mol-card{padding:16px}.mol-grid .mol-card strong{padding-right:38px}}

/* The paper inversion needs a darker source green to keep chlorine legible. */
:root[data-theme=dark] .chem-surface svg [style*="stroke:#00CC00" i]{stroke:#237339!important}
:root[data-theme=dark] .chem-surface svg [fill="#00CC00" i],
:root[data-theme=dark] .chem-surface svg [style*="fill:#00CC00" i]{fill:#237339!important}
:root[data-theme=dark] .chem-surface svg [style*="stroke:#33CCCC" i]{stroke:#237378!important}
:root[data-theme=dark] .chem-surface svg [fill="#33CCCC" i],
:root[data-theme=dark] .chem-surface svg [style*="fill:#33CCCC" i]{fill:#237378!important}
