/* Chemistry-only additions. Anatomy Sensei's page and mobile CSS are unchanged. */
button,input,select{font-family:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:default}a:focus-visible,input:focus-visible,select:focus-visible,canvas:focus-visible{outline:2px solid var(--focus);outline-offset:3px}.skip{position:fixed;top:-100px;z-index:2000;background:var(--card);padding:12px}.skip:focus{top:0}
.chemistry-select{display:flex;flex-direction:column;gap:5px;margin:4px 8px 8px;font-size:13px;color:#c9ced3}.chemistry-select select{width:100%;font-size:13px;padding:5px;color:#e9e6df;background:#1a1f24;border:1px solid #2c343c;border-radius:6px}.chemistry-check{display:flex;gap:9px;align-items:center;padding:6px 10px;font-size:14px;color:#c9ced3;cursor:pointer}.chemistry-check input{accent-color:var(--focus);margin:0}.viewer-panel [data-mode]::before,.viewer-panel [data-res]::before{width:10px;height:10px;margin:0 3.5px;border-radius:50%;mask:none;-webkit-mask:none;background:var(--bone)}
.atom-label{position:absolute;transform:translate(-50%,-50%);color:#fff;font-size:12px;font-weight:600;text-shadow:0 1px 4px #000}.angle-3d{position:absolute;transform:translate(-50%,-50%);color:var(--bone);background:rgba(13,16,19,.82);border:1px solid #ffffff38;border-radius:999px;padding:2px 7px;font-size:12px;font-weight:600}.viewer-status:empty{display:none}.viewer-status:not(:empty){pointer-events:none;padding:20px;text-align:center}.lewis-view{position:absolute;inset:45px 80px 100px 220px;display:flex;align-items:center;justify-content:center}.lewis-view svg{width:100%;height:100%}.viewer.fullpage .viewer-mark{bottom:12px}.viewer-mark{z-index:1}
.chemistry-figure svg{display:block;width:100%;height:300px;border-radius:10px;background:radial-gradient(120% 90% at 50% 35%,var(--stage-a),var(--stage-b))}.lewis-lines{stroke:#c9ced3;stroke-width:2;fill:#c9ced3}.lewis-lines .atom{stroke:none;text-anchor:middle;font-size:29px;font-family:inherit;fill:#e9e6df}.lewis-lines .atom-O{fill:#e58f7d}.lewis-lines .charge{stroke:none;font-size:18px;fill:var(--bone)}.lewis-lines .bracket{fill:none;stroke-width:1.8}.geo-atom{font-size:15px;text-anchor:middle;fill:#1c2126}.geo-atom.center{fill:#fff}.angle-label{font:16px ui-sans-serif,system-ui;text-anchor:middle;fill:var(--bone)}
#search-dialog{width:min(600px,calc(100% - 32px));border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink);padding:22px;font-family:inherit}#search-dialog::backdrop{background:#0d1013a6}#search-dialog form{float:right}#search-dialog form button{border:0;background:none;font-size:24px;color:var(--muted)}#search-dialog label{display:block;font-weight:600;margin-bottom:12px}#search-input{width:100%;padding:12px;border:1px solid var(--line);border-radius:10px;font:inherit;background:var(--card);color:var(--ink)}#search-results{list-style:none;padding:0}#search-results a{display:block;padding:12px;border-bottom:1px solid var(--line);text-decoration:none}
@media(max-width:620px){.viewer-panel .pane[role=group]{display:flex}.viewer-panel button{font-size:14px;min-height:44px}.viewer-panel .pane-cap{display:block;width:100%}.viewer-panel #model-options{flex-direction:row}.chemistry-select{width:100%;margin:5px}.chemistry-check{min-height:44px;flex:1 0 40%}.chemistry-select select{min-height:44px}.viewer-panel .pane:last-child{order:initial}.viewer-panel .pane[role=group]{order:initial}.viewer-panel{order:3}.viewer-labels{height:max(56svh,300px)}.lewis-view{inset:0 20px auto;height:max(56svh,300px)}.viewer-tools.cam{flex-wrap:wrap}.viewer-tools.cam::before{content:none}.viewer-tools.cam button{min-width:44px}.viewer-tools.cam #rotate,.viewer-tools.cam #download{flex-basis:95px}.chemistry-figure svg{height:250px}}
/* Collection and learning-tool additions use the source template's design tokens. */
.collection{margin:20px 0 34px}.collection-controls{display:flex;flex-wrap:wrap;align-items:end;gap:16px;margin:18px 0}.collection-controls label{display:grid;gap:5px;font-size:14px;color:var(--muted)}.collection-controls input,.collection-controls select{font:inherit;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--ink)}.collection-controls input{width:min(350px,70vw)}#collection-count{font-size:14px;color:var(--muted);padding-bottom:9px}.chemistry-cards .thumb{aspect-ratio:640/420}.chemistry-cards .thumb svg{width:100%;height:100%;display:block}.chemistry-cards .meta>span:not(.n){font-size:14px;color:var(--muted)}.hub-takeaways{margin:24px 0 34px}.review-index{padding-bottom:40px}.review-index>.takeaways{margin:22px 0}.review-index .takeaways p{margin:0}.review-count{font-size:14px;color:var(--muted);font-weight:400;margin-left:6px}.review-index .home-section{margin-bottom:10px}.calculator,.shape-chart{margin:18px 0 28px}.calculator-presets{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.calculator button{padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--ink);font:inherit;font-size:14px}#charge-form{display:flex;flex-wrap:wrap;gap:12px;align-items:end}#charge-form label{display:grid;gap:6px;font-size:14px;color:var(--muted);flex:1 1 150px}#charge-form input{font:inherit;padding:9px 10px;width:100%;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--ink)}#charge-form button{min-height:45px;background:var(--ink);color:var(--card)}#charge-result{display:block;font-size:20px;font-weight:600;margin:18px 0 10px}.calculator>p{font-size:14px;color:var(--muted)}.table-scroll{overflow-x:auto}.shape-chart table{min-width:560px}.shape-chart thead th{background:var(--card);color:var(--ink);width:auto}.viewer-panel,.viewer-tools{z-index:3}.viewer-picked{z-index:4}.viewer.fullpage .viewer-labels{max-height:100%}.chemistry-figure svg{background:var(--stage-b)}.chemistry-figure text{font-family:inherit}.chemistry-cards svg text{font-family:inherit}
@media(max-width:620px){.collection-controls{gap:12px}.collection-controls label{width:100%}.collection-controls input{width:100%}.chemistry-cards{grid-template-columns:1fr 1fr;gap:12px}.chemistry-cards h3{font-size:15px}.chemistry-cards .meta{padding:10px}.chemistry-cards .thumb{aspect-ratio:1.3}.calculator{padding:16px}.calculator-presets button{min-height:44px}.shape-chart table{font-size:13px}.shape-chart th,.shape-chart td{padding:8px}.viewer-panel{padding-bottom:0}.lewis-view{z-index:1}.review-index .cards{grid-template-columns:1fr 1fr}}
@media(max-width:380px){.chemistry-cards,.review-index .cards{grid-template-columns:1fr}}
/* The homepage uses Anatomy Sensei's unchanged home.css and home-hero structure. */
.home-hero .home-stage .stage{margin:0}.home-hero .home-viewer{height:clamp(440px,calc(100vh - 200px),800px)}.home-hero .v2-caption{font-size:13px}.home-intro .hero-search{width:100%;font-family:inherit;text-align:left}.home .collection-controls{margin-top:20px}.home-hero .viewer-panel{max-height:calc(100% - 82px)}
@media(max-width:620px){.home-hero .stage .viewer.home-viewer{height:auto}.home-hero .viewer-panel{max-height:none}.home-intro .hero-search{font-size:16px}.home-hero .viewer-tools.cam button{min-height:44px}}
.review-flag{margin:8px 0 0;padding:8px 12px;border:1px dashed #c78a2c;border-radius:8px;background:#fff7e8;color:#7a4b06;font-size:14px}
.viewer-panel .steps{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.step-label{flex:1 0 100%;margin:0 0 4px;color:var(--bone,#e9e6df);font-size:14px;font-weight:600}
.step-text{min-height:3em;padding:10px 12px;border-left:3px solid #e3b85c;background:rgba(227,184,92,.08);border-radius:4px}
#dihedral{width:100%;accent-color:#e3b85c}.energy-plot svg,.chemistry-figure.plot svg{background:#171d22}
.chemistry-cards .thumb img{display:block;width:100%;height:100%;object-fit:cover}
/* The top-bar collection links and the subnav are the same list: show the top bar on wide screens, the subnav below 1100px. */
@media (min-width:1101px){.site-head .subnav{display:none}}
/* Mechanism step buttons are actions, not toggles */
.viewer-panel #step-controls button::before{display:none}
.viewer-panel #step-controls button{justify-content:center;border:1px solid #ffffff2e;border-radius:999px;padding:6px 12px;min-height:36px}
.viewer-panel #step-controls button:disabled{opacity:.4}
/* Phones: put the controls that change the model directly under it, so the model stays in view */
@media(max-width:620px){
 .viewer-panel #step-controls,.viewer-panel #mode-controls,.viewer-panel #dihedral-controls{order:-1}
 .viewer-panel #step-controls button{flex:1 1 30%;min-height:44px}
 #dihedral{min-height:44px}
}
/* Phones: two cards per row in collection grids, so long collections stay scannable */
@media(max-width:620px){.collection .chemistry-cards{grid-template-columns:1fr 1fr;gap:10px}.collection .chemistry-cards .meta{padding:8px 10px}.collection .chemistry-cards h3{font-size:14.5px}}
