:root{--text:#25313d;--page:#f3f5f8;--surface:#ffffff;--sidebar:#fafbfc;--divider:#e0e5ec;--border:#8794a5;--muted:#536174;--accent:#294fb9;--selected:#eaf0ff;--hover:#e3e9f2;--focus:#245ddd;--warning:#8c4500;color-scheme:light}
:root[data-theme=studio]{--text:#edf0f5;--page:#15191f;--surface:#1d232c;--sidebar:#181e26;--divider:#556173;--border:#748196;--muted:#b2becf;--accent:#a5c2ff;--selected:#2b3c56;--hover:#303b4b;--focus:#a9cbff;--warning:#ffd29b;color-scheme:dark}
:root[data-theme=fieldnotes]{--text:#263d32;--page:#e9eee4;--surface:#f6f8ef;--sidebar:#edf2e7;--divider:#879d89;--border:#7e917f;--muted:#4d6654;--accent:#285b3a;--selected:#dbe8d4;--hover:#e0ead9;--focus:#286441;--warning:#7b4300;color-scheme:light}
*{box-sizing:border-box} :root{font:15px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--text);background:var(--page)}body{margin:0;min-width:280px}button,a,input{font:inherit}button{color:inherit;cursor:pointer}button:disabled{cursor:default}button:focus-visible,a:focus-visible,[tabindex]:focus-visible,input:focus-visible{outline:3px solid var(--focus);outline-offset:3px}button{border:1px solid var(--border);border-radius:7px;background:var(--surface);padding:8px 12px}a{color:inherit}.appbar{height:76px;display:flex;align-items:center;gap:70px;background:var(--surface);border-bottom:1px solid var(--border);padding:0 30px}.brand{font-size:22px;letter-spacing:-.8px;font-weight:650;text-decoration:none}.brand span{color:var(--accent)}nav{display:flex;height:100%;gap:26px}nav button{border:0;border-radius:0;border-bottom:3px solid transparent;background:transparent;padding:0 4px}nav [aria-selected=true]{border-color:var(--accent);color:var(--accent);font-weight:650}#menu{display:none}#workspace{--side:260px;display:grid;grid-template-columns:var(--side) 10px minmax(0,1fr);min-height:600px;height:calc(100dvh - 150px);background:var(--surface)}#side{min-width:0;background:var(--sidebar);overflow:auto;padding:26px 16px}#divider{background:var(--divider);cursor:col-resize;touch-action:none;border-inline:3px solid var(--surface)}#divider:hover,#divider:focus{background:var(--accent)}#catalogue{min-width:0}.nav-label,.eyebrow{text-transform:uppercase;letter-spacing:.13em;font-size:11px;color:var(--muted);font-weight:650}.nav-label{padding-left:12px;margin:0 0 16px}.group-toggle{display:block;width:100%;text-align:left;background:transparent;border:0;padding:13px 12px;font-weight:600}.group-toggle:before{content:'▸';display:inline-block;width:20px;color:var(--muted)}.group-toggle[aria-expanded=true]:before{content:'▾'}.items{margin:0 0 8px 20px}.items[hidden]{display:none}.item{display:block;width:100%;text-align:left;border:0;background:transparent;font-size:14px;padding:9px 12px}.item[aria-current=true]{color:var(--accent);background:var(--selected);font-weight:600}.item:hover{background:var(--hover)}.hint{color:var(--muted);font-size:12px;margin:18px 12px;line-height:1.65}.items .hint{margin:3px 12px 6px}.tools{display:flex;justify-content:flex-end;margin-bottom:16px}fieldset{border:1px solid var(--border);border-radius:8px;margin:0 0 18px;padding:10px}fieldset label{display:flex;align-items:center;gap:8px;padding:5px}input{accent-color:var(--accent)}.table-scroll{overflow:auto;max-width:100%}table{border-collapse:collapse;width:100%;font-size:13px;white-space:nowrap}th,td{text-align:left;padding:10px 8px;border-bottom:1px solid var(--border)}th button{background:transparent;border:0;padding:4px 0;font-size:11px;font-weight:600}td button{padding:3px 8px;border:0;background:transparent;font-weight:700;font-size:17px;color:var(--text)}.selected{background:var(--selected)}.valence,td strong{font-weight:750;color:var(--accent)}#viewer{min-width:0;display:flex;flex-direction:column;padding:40px 44px 24px}#viewer header{flex:none}.eyebrow{margin:0 0 8px}h1{font-size:34px;font-weight:550;letter-spacing:-1px;margin:0 0 8px}.formula{font-size:18px;color:var(--muted);margin:0}#viewSurface{flex:1;display:flex;align-items:center;justify-content:center;flex-direction:column;min-height:220px;gap:20px}#viewSurface img{object-fit:contain;max-width:100%;max-height:55vh}.empty{max-width:390px;text-align:center;border:1px dashed var(--border);padding:32px;border-radius:14px;color:var(--muted)}.empty h2{font-size:18px;font-weight:500;margin:0 0 8px;color:var(--text)}.empty p{font-size:13px;margin:0}.element-badge{border:1px solid var(--border);border-radius:18px;font-size:70px;font-weight:500;width:170px;height:170px;display:grid;place-items:center;background:var(--selected);color:var(--accent)}.caption{font-size:12px;color:var(--muted);text-align:center}footer{display:flex;gap:18px;align-items:center;flex-wrap:wrap;padding:14px 24px;color:var(--muted);font-size:11px}footer button{font-size:11px;padding:4px 8px}footer small{margin-left:auto;font-size:10px}#storageStatus{font-size:12px;color:var(--warning);margin:0 24px}#storageStatus:empty{display:none}dialog{color:inherit;background:var(--surface);border:1px solid var(--border);border-radius:12px;max-width:540px;padding:26px;box-shadow:0 20px 80px #18253826}dialog::backdrop{background:#15233766}#aboutDialog p{line-height:1.8;font-size:14px}#drawer{margin:0;width:min(92vw,620px);height:100dvh;max-height:100dvh;max-width:100vw;border-radius:0 12px 12px 0;padding:20px;overflow:auto}#drawer header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:24px}#drawer header strong{font-size:15px}#closeDrawer{font-size:12px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}@media(max-width:1000px){.appbar{gap:35px}#viewer{padding:30px 24px}}@media(max-width:760px){.appbar{height:65px;padding:0 16px;gap:14px}.brand{font-size:17px}.brand span{display:none}nav{gap:13px;margin-left:auto}nav button{font-size:13px}#menu{display:block;font-size:12px;padding:7px 9px}#workspace{display:block;height:calc(100dvh - 170px);min-height:420px}#side,#divider{display:none}#viewer{height:100%;padding:27px 22px 20px}h1{font-size:28px}#viewSurface{min-height:220px}.empty{padding:24px;max-width:330px}footer{padding:12px 16px;gap:8px 14px}footer small{flex-basis:100%;margin:0}#drawer .table-scroll{max-width:100%}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

button:hover{background:var(--hover)}nav button:hover{background:var(--hover)}.item[aria-current=true]:hover{background:var(--selected)}
#settings{margin-left:auto;width:40px;height:40px;padding:0;flex:none;font-size:23px;line-height:1;display:grid;place-items:center}
#settingsDialog{width:min(440px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto}
#settingsDialog header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
#settingsDialog #rotationSettings{margin-top:20px}#rotationSettings label{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:12px 0}#rotationSettings input{width:96px;min-height:44px;font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:7px;padding:8px}#rotationSettings .hint{font-size:12px;line-height:1.5}#settingsTitle{font-size:22px;margin:0}#settingsDialog fieldset{margin:0}#themeChoices label{min-height:44px;gap:12px;cursor:pointer}#themeChoices input{width:18px;height:18px}
#viewSurface img{background:#fff;border-radius:10px;padding:12px;width:min(100%,650px);height:auto;aspect-ratio:1;min-height:0}#viewSurface .caption{margin:0;max-width:100%}
.caption a{text-underline-offset:3px}dialog:focus-visible{outline:3px solid var(--focus)}
@media(max-width:760px){.appbar{gap:10px}nav{gap:10px}#settings{width:36px;height:36px;margin-left:0}.brand{font-size:16px}#viewSurface img{max-height:45dvh;width:auto;max-width:100%}}
@media(max-width:360px){.appbar{padding:0 6px;gap:5px}.brand{font-size:14px}nav{gap:7px}nav button{font-size:12px}#menu{font-size:11px;padding:7px}#settings{width:32px;height:36px}}

select{font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:7px;padding:8px;max-width:100%}select:focus-visible{outline:3px solid var(--focus);outline-offset:3px}.language-choice{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:20px;flex-wrap:wrap}#settingsDialog select{min-height:44px}#menu{white-space:nowrap}@media(max-width:360px){.appbar{height:auto;min-height:65px;flex-wrap:wrap;padding:8px;gap:8px}.appbar nav{height:42px;margin-left:0;flex:1}.appbar .brand{flex-basis:100%;font-size:17px}#menu{margin-left:auto}#settings{margin-left:0}#workspace{height:calc(100dvh - 205px)}}

#moleculeInfo{margin-top:18px;max-width:760px;font-size:13px;line-height:1.65}#moleculeInfo[hidden]{display:none}.badges{display:flex;gap:6px;flex-wrap:wrap}.badge{border:1px solid var(--border);border-radius:20px;padding:3px 9px;font-size:11px;line-height:1.5;background:var(--selected);color:var(--text)}.molecule-note{margin:10px 0 7px}#factDetails{font-size:12px;color:var(--muted)}#factDetails summary{cursor:pointer;width:fit-content;padding:4px 0;text-decoration:underline;text-underline-offset:3px}summary:focus-visible{outline:3px solid var(--focus);outline-offset:3px}#factDetails p{margin:10px 0}#factDetails h3{font-size:12px;margin:14px 0 6px}#factDetails ul{padding-left:20px;margin:6px 0 14px}#factDetails li{margin:4px 0;overflow-wrap:anywhere}#viewer{overflow-y:auto}#viewSurface{flex-shrink:0;padding-top:16px}#viewSurface img{max-height:46dvh}#viewSurface .caption{padding-bottom:8px}@media(max-width:760px){#moleculeInfo{font-size:12px;margin-top:14px}#viewer{height:100%;overflow-y:auto}#viewSurface img{max-height:37dvh}.badge{font-size:10px}}

/* Group-scoped molecule tables: horizontal overflow belongs to the table, not the page. */
.molecule-items{margin-left:0}.molecule-columns-toggle{font-size:12px;padding:5px 9px;margin:0 0 8px 10px}.molecule-table{font-size:12px;width:100%;border-collapse:separate;border-spacing:0}.molecule-table th,.molecule-table td{white-space:normal;vertical-align:top;padding:8px;min-width:100px;max-width:180px;overflow-wrap:anywhere}.molecule-table th:first-child,.molecule-table td:first-child{min-width:150px;position:sticky;left:0;background:var(--sidebar);z-index:1}.molecule-table .selected td:first-child{background:var(--selected)}.molecule-table th:first-child{z-index:2}.molecule-table th button{font-size:12px;white-space:normal;text-align:left;min-height:36px}.molecule-table .item{font-size:13px;font-weight:500;padding:4px;min-height:36px;line-height:1.45}.molecule-table .item[aria-current=true]{font-weight:650}.molecule-scroll{max-width:100%;overscroll-behavior-inline:contain}.molecule-scroll:focus-visible{outline:3px solid var(--focus);outline-offset:-3px}#drawer .molecule-table th:first-child,#drawer .molecule-table td:first-child{background:var(--surface)}#drawer .molecule-table .selected td:first-child{background:var(--selected)}

.molecule-scroll{container-type:inline-size}
@container (max-width:300px){.molecule-table th:first-child,.molecule-table td:first-child{position:static}}

/* Symbolic sugar units: fixed white surface, never a computed molecular geometry. */
.polymer-diagram{margin:0;width:min(100%,600px);min-width:0}.polymer-diagram svg{display:block;width:100%;height:auto;background:#fff;border:1px solid #c8d4d7;border-radius:10px;color:#172e38;font-family:system-ui,sans-serif}.diagram-bond{stroke:#344d57;stroke-width:3}.unit-glc{fill:#e1f2f0;stroke:#326f69;stroke-width:2}.unit-fru{fill:#f9ecd5;stroke:#896328;stroke-width:2}.diagram-label{font-size:20px;fill:#172e38}.diagram-unit{font-size:24px;font-weight:650;fill:#172e38}.diagram-heading{font-size:21px;font-weight:650;fill:#172e38}.diagram-small{font-size:16px;fill:#344d57}.diagram-legend{font-size:12px;line-height:1.6;margin:10px 0;color:var(--text)}.polymer-diagram .caption{line-height:1.6}.polymer-diagram a{display:inline-block;margin-inline-end:5px}

/* Consumer-owned renderer surface; the module retains camera/picking/lifecycle. */
#viewSurface{gap:12px;justify-content:flex-start;min-height:0}
.viewer-tools{display:flex;flex-wrap:wrap;gap:6px;align-items:center;width:100%;padding-top:14px}
.viewer-tools:empty{display:none}.viewer-tools button{font-size:12px;padding:6px 9px;min-height:34px}
.viewer-tools [aria-pressed=true]{background:var(--selected);border-color:var(--accent);color:var(--accent)}
.viewer-control{display:inline-flex;align-items:center;flex-wrap:wrap;gap:5px;font-size:12px;color:var(--muted)}
.viewer-control select{max-width:210px;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:5px;font:inherit;min-height:34px;padding:4px}
.viewer-control input{width:90px}.model-viewport{width:100%;min-height:230px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;flex:1}
.model-viewport.interactive{position:relative;height:clamp(280px,42vh,520px);min-height:280px;flex:1 0 280px;background:#e8edf0;border-radius:10px;overflow:hidden;color:#25313d}
.model-viewport.interactive .studio-view-toolbar{display:none!important}
.model-caption{max-width:850px;margin:0;font-size:11px;line-height:1.45}.model-status{margin:0 0 8px;font-size:11px;line-height:1.45}
#viewSurface[data-renderer-state=fallback] .model-status{color:var(--warning)}
@media(max-width:700px){.viewer-tools{gap:5px}.viewer-tools button{min-height:44px}.model-viewport.interactive{height:320px;flex-basis:320px}.viewer-control select{max-width:190px}.model-caption,.model-status{text-align:left}.model-viewport img{max-height:45vh}#workspace{height:auto;min-height:calc(100dvh - 170px)}#viewer{height:auto;overflow:visible}}

/* Visible compact language codes; native buttons expose the selected locale. */
#version{font-size:11px;color:var(--muted);margin-left:auto;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}.release-history{max-width:850px;margin:36px auto;padding:20px;line-height:1.7}.release-history li{margin:16px 0}
#language{display:flex;flex:none;gap:0;margin-left:auto}#language button{min-width:36px;min-height:40px;padding:6px;font-size:12px;border-radius:0}#language button:first-child{border-radius:7px 0 0 7px}#language button:last-child{border-radius:0 7px 7px 0;border-left:0}#language [aria-pressed=true]{background:var(--selected);color:var(--accent);font-weight:750;text-decoration:underline;text-underline-offset:4px}#settings{margin-left:0}.appbar{column-gap:24px}
@media(max-width:760px){.appbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;height:auto;min-height:100px;padding:8px 12px;gap:4px 10px}.appbar .brand{grid-column:1;grid-row:1;font-size:17px}.appbar #language{grid-column:2;grid-row:1;margin:0}.appbar #settings{grid-column:3;grid-row:1;justify-self:end;width:36px;height:40px}.appbar nav{grid-column:1/3;grid-row:2;margin:0;height:40px;gap:18px}.appbar #menu{grid-column:3;grid-row:2;margin:0;padding:7px;font-size:12px;min-height:40px}#language button{min-height:40px;min-width:36px}}

/* Ion markers are illustrative colour keys, not measured ionic surfaces. */
.ion-key{display:inline-flex;align-items:center;gap:5px;margin-inline-end:12px;white-space:nowrap;color:var(--text)}.ion-key::before{content:"";width:12px;height:12px;border:1px solid var(--border);border-radius:50%;display:inline-block}.ionic-na::before{background:#8d71db}.ionic-cl::before{background:#3d9875}
