.chemistry { --chem-selected: var(--network-selection, var(--agency-brand)); --chem-connected: #ffd84a; --chem-inspected: #44dfff; --chem-qualified: #72e68a; --chem-uncertain: #c69aff; --chem-branch: var(--chem-connected); --chem-component-1: #b8a17b; --chem-component-2: #9fb0bf; --chem-component-3: #b7b5a4; min-width: 0; width: 100%; padding: 1rem clamp(.75rem, 2vw, 1.5rem); background: var(--surface-base); color: var(--text-primary); font-size: 1rem; }
.chemistry > .section-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
body:has(#view-chemistry:not([hidden])) .topbar { min-height: 5rem; padding: .85rem clamp(.75rem, 2vw, 1.5rem); background: var(--surface-base); }
body:has(#view-chemistry:not([hidden])) .topbar h1 { font-size: 2rem; }
body:has(#view-chemistry:not([hidden])) .topbar .eyebrow { margin: 0 0 .35rem; }
.chem-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.chem-snapshot { color: var(--bone-dim); font: .6rem var(--mono); margin-left: auto; }
.chem-toolbar, .chem-filters { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; }
.chem-toolbar { position: relative; flex: 1 1 24rem; max-width: 40rem; flex-wrap: nowrap; }
.chem-toolbar label { flex: 1; min-width: 0; }
.chem-toolbar > label { font-size: 0; gap: 0; }
.chemistry label { display: grid; gap: .35rem; color: var(--bone-dim); font: .65rem var(--mono); }
.chemistry input, .chemistry select { width: 100%; min-height: 2.5rem; padding: .55rem .65rem; border: 1px solid var(--line-bright); background: var(--void-panel); color: var(--bone); font: .75rem var(--mono); }
.chemistry .action { background: var(--void-panel); color: var(--bone); border-color: var(--line-bright); min-height: 2.5rem; padding: .55rem .7rem; font-size: .65rem; }
body:has(#view-chemistry:not([hidden])) .rail { background: var(--surface-base); }
.chemistry > .section-head { align-items: center; margin-bottom: 1rem; }
.chemistry .section-head h2 { font-size: clamp(1.6rem, 2.5vw, 2rem); line-height: 1.2; margin: 0; }
.chemistry .section-head .eyebrow { margin-bottom: .5rem; font-size: .65rem; }
.chemistry input:focus-visible, .chemistry select:focus-visible, .chemistry button:focus-visible, .chemistry summary:focus-visible { outline: 2px solid var(--ink-orange); outline-offset: 3px; }
.chem-filters { margin-top: .35rem; }
.chem-filters label { flex: 1 1 12rem; }
.chem-note, .chem-description { color: var(--bone-dim); line-height: 1.6; }
.chem-note { font-size: .85rem; max-width: 90rem; }
.chem-search-panel { position: absolute; top: calc(100% + .35rem); right: 0; width: min(38rem, 100%); z-index: 10; padding: .7rem; background: var(--surface-elevated); border: 1px solid var(--border-emphasis); box-shadow: 0 .7rem 1.5rem var(--surface-base); }
.chem-search-panel > .chem-note { margin: .5rem 0; font: .65rem var(--mono); }
.chem-results { display: grid; grid-template-columns: 1fr; gap: .2rem; max-height: 18rem; overflow: auto; padding: .15rem; margin: 0; }
.chem-result { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem; border: 1px solid var(--line); color: var(--bone); background: var(--void-panel); text-align: left; cursor: pointer; }
.chem-result small { color: var(--ash); font: .6rem var(--mono); }
.chem-result:has(.chem-result-output) { flex-wrap: wrap; }
.chem-result-output { display: flex; align-items: center; gap: .5rem; width: 100%; color: var(--bone); font: .875rem/1.5 var(--mono); }
.chem-result-output .chem-icon { width: 1.5rem; height: 1.5rem; }
.chem-selection { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; padding: .6rem 0; margin-top: .5rem; border-top: 1px solid var(--line); }
.chem-selection h3 { flex: 1; margin: 0; font-size: 1.1rem; }
.chem-selection-basis { display: block; margin-top: .25rem; color: var(--bone-dim); font: .6rem/1.4 var(--mono); }
:is(.chem-chain-yield, .chem-mining-yield) { display: grid; gap: .2rem; width: 100%; margin-top: .15rem; color: var(--bone); font: .65rem/1.4 var(--mono); }
:is(.chem-chain-yield, .chem-mining-yield) small { color: var(--bone-dim); font-size: .55rem; }
:is(.chem-chain-yield, .chem-mining-yield) meter { width: 100%; height: .3rem; border: 0; background: var(--line); }
:is(.chem-chain-yield, .chem-mining-yield) meter::-webkit-meter-bar { border: 0; border-radius: 0; background: var(--line); }
:is(.chem-chain-yield, .chem-mining-yield) meter::-webkit-meter-optimum-value { background: var(--chem-material); }
:is(.chem-chain-yield, .chem-mining-yield) meter::-moz-meter-bar { background: var(--chem-material); }
.chem-chain { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(2rem, 3.2vw, 3.5rem); padding: 2rem 1.6rem 0 0; isolation: isolate; background: var(--surface-base); }
.chem-column { position: relative; min-width: 0; border: 1px solid var(--line); background: var(--surface-elevated); scroll-margin-top: 12rem; }
.chem-column h4 { margin: 0; padding: .65rem .5rem .25rem; font: .68rem var(--mono); color: var(--bone); }
.chem-count { margin: .1rem .5rem .5rem; min-height: 2.6em; white-space: pre-line; font: .6rem/1.3 var(--mono); color: var(--bone-dim); }
.chemistry .chem-column-search { display: block; margin: .35rem .4rem .4rem; }
.chemistry .chem-column-search input { min-height: 2rem; padding: .35rem .4rem; font-size: .65rem; }
.chem-column-list[data-empty="true"]::after { content: 'NO MATCHES'; display: block; padding: .65rem .25rem; color: var(--bone-dim); font: .65rem var(--mono); }
.chem-column[data-filtered] .chem-item.chem-unrelated .chem-icon { opacity: 1; }
.chem-column[data-filtered] .chem-item.chem-unrelated .chem-item-status::after { content: 'OUTSIDE SELECTED PATH'; }
.chem-column-list { height: clamp(30rem, calc(100dvh - 20rem), 45rem); overflow-y: auto; padding: .25rem .45rem .25rem .25rem; scrollbar-color: var(--line-bright) var(--void); }
.chem-column-footer { min-height: 2.3rem; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; padding: .4rem; border-top: 1px solid var(--line); font: .6rem var(--mono); color: var(--bone-dim); }
.chem-more { border: 0; padding: .2rem 0; background: transparent; color: var(--bone); font: .6rem var(--mono); cursor: pointer; }
.chem-stage-nav { display: none; }
.chem-item { display: flex; flex-wrap: wrap; gap: .2rem; align-items: center; width: 100%; min-height: 2.8rem; padding: .4rem .35rem; margin-bottom: .25rem; border: 1px solid var(--line); border-left: 2px solid var(--line); color: var(--bone-dim); background: var(--void-panel); text-align: left; overflow-wrap: anywhere; cursor: pointer; font: .75rem/1.35 var(--mono); }
.chem-item:hover { background: var(--void-panel); color: var(--bone); }
.chem-item.chem-unrelated { color: var(--ash); background: var(--void-raised); border-color: transparent; }
.chem-item.chem-unrelated .chem-icon { opacity: .45; }
.chem-item.chem-connected { color: var(--bone); border-color: var(--chem-connected); border-left-width: 3px; background: color-mix(in srgb, var(--chem-connected) 14%, var(--surface-base)); }
.chem-item.chem-secondary { color: var(--bone); border-color: var(--chem-connected); background: color-mix(in srgb, var(--chem-connected) 14%, var(--surface-base)); }
.chem-item.chem-direct { border-color: var(--chem-connected); background: color-mix(in srgb, var(--chem-connected) 22%, var(--surface-base)); }
.chem-item-status { font: .6rem/1.4 var(--mono); color: var(--bone-dim); width: 100%; }
.chem-item[aria-pressed="true"] .chem-item-status { color: var(--bone); }
.chem-item.chem-possible .chem-item-status, .chem-item.chem-candidate .chem-item-status { color: var(--chem-uncertain); border-left: 2px solid var(--chem-uncertain); padding-left: .35rem; }
.chem-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: .3rem 0; color: var(--bone-dim); font: .55rem/1.5 var(--mono); }
.chem-key::before { content: ''; display: inline-block; width: 1.1rem; margin: 0 .4rem .15rem 0; border-top: 2px solid var(--chem-selected); }
.chem-key--secondary::before { border-color: var(--chem-connected); }
.chem-key--route::before { border-color: var(--chem-inspected); }
.chem-key--qualified::before { border-color: var(--chem-qualified); }
.chem-key--conditional::before { border-color: var(--chem-uncertain); }
.chem-connections { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: visible; }
.chem-column-list, .chem-column h4, .chem-count, .chem-column-footer { position: relative; z-index: 2; }
.chem-connections path { fill: none; stroke-width: 1.6; stroke: var(--chem-branch); stroke-linejoin: round; }
.chem-connections .chem-line-primary { stroke: var(--chem-connected); stroke-width: 2.4; opacity: 1; }
.chem-connections .chem-line-secondary { opacity: .8; }
.chem-connections .chem-line-conditional { stroke: var(--chem-uncertain); opacity: .8; }
.chem-chain[data-hover] path[data-focused="true"] { stroke: var(--chem-inspected); }
.chem-chain[data-hover] path[data-focused="true"] { opacity: 1; stroke-width: 2.4; }
.chem-connections .chem-line-continuation { opacity: .3; }
.chem-chain[data-hover] .chem-line-continuation[data-focused="true"] { opacity: .5; }
.chem-connections .chem-line-muted { opacity: .15; stroke-width: 1; }
.chem-chain[data-hover] .chem-item.chem-route { color: var(--bone); border-color: var(--chem-inspected); background: color-mix(in srgb, var(--chem-inspected) 16%, var(--surface-base)); }
.chem-chain[data-hover] .chem-item.chem-route-direct { border-color: var(--chem-inspected); background: color-mix(in srgb, var(--chem-inspected) 24%, var(--surface-base)); }
.chem-item.chem-route .chem-icon { opacity: 1; }
.chem-item.chem-hovered:not([aria-pressed="true"]) { outline: 2px solid var(--chem-inspected); outline-offset: -2px; }
.chemistry .chem-item:focus-visible { outline: 2px solid var(--chem-inspected); outline-offset: 2px; }
.chem-item[aria-pressed="true"], .chem-result[aria-pressed="true"], .chem-chain[data-hover] .chem-item[aria-pressed="true"] { color: var(--bone); border-color: var(--chem-selected); background: color-mix(in srgb, var(--chem-selected) 28%, var(--surface-base)); box-shadow: inset 3px 0 var(--chem-selected); outline-color: var(--chem-selected); font-weight: 700; }
.chem-selection .action[aria-pressed="true"] { color: var(--bone); border-color: var(--chem-selected); background: var(--ink-orange-soft); }
.chem-chain-note { margin: .65rem 0; font-size: .75rem; }
.chem-card-host { margin-top: .75rem; scroll-margin-top: 1rem; }
.chem-mining-launch { margin: .5rem 0; }
.chem-mining-dialog { width: min(70rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line-bright); color: var(--bone); background: var(--void-raised); }
.chem-mining-dialog::backdrop { background: var(--void); opacity: .88; }
.chem-mining-dialog > header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 1rem; background: var(--surface-elevated); border-bottom: 1px solid var(--line); }
.chem-mining-dialog .chem-mining { margin: 0; padding: 1rem; border: 0; }
.chem-mining-dialog h4 { margin: 0 0 .65rem; font: .75rem var(--mono); }
.chem-mining-list { list-style: none; padding: 0; display: grid; gap: .65rem; }
.chem-mining-list > li { display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(0, 2fr); gap: .75rem; padding: .75rem; border: 1px solid var(--line); background: var(--surface-panel); }
.chem-mining-list .chem-meta { display: block; margin-bottom: .5rem; }
.chem-mining-asteroids { display: flex; flex-wrap: wrap; align-content: start; gap: .35rem; }
.chem-mining-asteroids > .chem-meta { flex-basis: 100%; }
.chem-mining-asteroid { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .3rem .45rem; border: 1px solid var(--line); text-align: left; font-size: .75rem; }
.chem-mining-asteroid small { color: var(--bone-dim); font: .6rem/1.4 var(--mono); }
.chem-mining-asteroid.is-suggested { border-color: var(--line-bright); background: var(--surface-elevated); }
.chem-card { padding: 1rem; border: 1px solid var(--line); border-top: 2px solid var(--ink-orange); background: var(--void-raised); }
.chem-card-header { display: flex; align-items: flex-start; gap: .85rem; margin-bottom: .5rem; }
.chem-card-header > div { flex: 1; min-width: 0; }
.chem-card-header .eyebrow { color: var(--ink-orange); font-size: .75rem; }
.chem-card h3 { margin: .3rem 0; font-size: 1.6rem; line-height: 1.1; }
.chem-card h4 { margin: 0 0 .65rem; color: var(--bone); font: .75rem var(--mono); }
.chem-card h5 { margin: .7rem 0; color: var(--bone); font: .75rem var(--mono); }
.chem-description { max-width: 65rem; }
.chem-card-section { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.chem-related { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: .5rem 1rem; list-style: none; padding: 0; }
.chem-related li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem; background: var(--void-panel); border: 1px solid var(--line); }
.chem-link { border: 0; padding: .3rem 0; color: var(--bone); background: transparent; cursor: pointer; text-align: left; font: inherit; text-decoration: underline; text-underline-offset: .2rem; }
.chem-link:hover { color: var(--bone); }
.chem-meta { color: var(--bone-dim); font: .72rem var(--mono); }
.chem-presence { display: flex; gap: .22rem; }
.chem-presence i { width: .45rem; height: 1rem; background: var(--line-bright); }
.chem-presence .is-filled { background: var(--ink-orange); }
.chem-section--reprocesses-to, .chem-section--production { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, .35fr); gap: 0 2rem; }
.chem-section--reprocesses-to > *, .chem-section--production > * { grid-column: 1; }
.chem-section--reprocesses-to > h4, .chem-section--production > h4 { grid-column: 1 / -1; }
.chem-facilities { grid-column: 2 !important; grid-row: 2 / span 30; padding: .75rem; background: var(--void); border: 1px solid var(--line); align-self: start; }
.chem-facilities .chem-related { grid-template-columns: 1fr; }
.chem-yield { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .3rem .75rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.chem-yield > span { font-size: .9rem; font-weight: 600; }
.chem-yield > small { color: var(--bone-dim); font: .7rem var(--mono); }
.chem-yield .chem-icon { width: 1.3rem; height: 1.3rem; }
.chem-yield meter { grid-column: 1 / -1; width: 100%; height: .6rem; background: var(--line); border: 0; }
.chem-yield meter::-webkit-meter-bar { border: 0; border-radius: 0; background: var(--line); }
.chem-yield meter::-webkit-meter-optimum-value { background: var(--ink-orange); }
.chem-yield meter::-moz-meter-bar { background: var(--ink-orange); }
.chem-yield[data-substance] meter::-webkit-meter-optimum-value { background: var(--chem-material); }
.chem-yield[data-substance] meter::-moz-meter-bar { background: var(--chem-material); }
.chem-yield[data-substance] .chem-material-percent, .chem-material-range[data-substance] > strong { color: var(--chem-material); }
.chem-slot { display: grid; gap: .3rem; padding: 1rem; margin: .7rem 0; border: 1px solid var(--line); background: var(--void-panel); }
.chem-slot .chem-link { justify-self: start; }
.chem-slot { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.chem-slot > h5, .chem-slot > strong, .chem-slot > p { flex-basis: 100%; }
.chem-slot .chem-link { border: 1px solid var(--line-bright); border-radius: .2rem; background: var(--void); padding: .4rem .65rem; text-decoration: none; }
.chem-slot .chem-link .chem-icon { width: 1.4rem; height: 1.4rem; border: 0; }
.chem-properties { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1rem; font-size: .85rem; }
.chem-properties dt { color: var(--bone-dim); }
.chem-properties dd { margin: 0; overflow-wrap: anywhere; }
.chem-variants { max-height: 15rem; overflow: auto; padding-left: 1.2rem; font: .7rem/1.8 var(--mono); color: var(--bone-dim); }
.chem-source { margin: 1.5rem 0; padding: 1rem; border: 1px solid var(--line); color: var(--bone-dim); font-size: .85rem; overflow-wrap: anywhere; }
.chem-source summary, .chem-card summary { cursor: pointer; font: .7rem var(--mono); color: var(--bone); }
.chem-source li { margin: .5rem 0; }
.chemistry [hidden] { display: none !important; }
.chem-overview-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0; }
.chem-controls > .chem-overview-tabs { margin: 0; }
.chem-overview-tabs [aria-pressed="true"] { border-color: var(--ink-orange); color: var(--bone); background: var(--ink-orange-soft); }
.chem-overview { min-width: 0; scroll-margin-top: 1rem; }
.chem-manufacturing { min-width: 0; scroll-margin-top: 1rem; }
.chem-manufacturing .chem-card { margin-top: 1rem; overflow-wrap: anywhere; }
.chem-manufacturing .chem-link { margin-right: .7rem; }
.chem-manufacturing .chem-source { margin-left: .5rem; }
.chem-manufacturing .chem-plan-heading { margin: 1.2rem 0 .65rem; color: var(--bone); font: .8rem var(--mono); }
.chem-manufacturing .chem-plan-inputs { display: grid; grid-template-columns: minmax(8rem, .8fr) minmax(11rem, 1.4fr) minmax(10rem, 1.2fr) minmax(6rem, .5fr) auto; gap: .6rem; margin: .75rem 0; }
.chem-manufacturing label { font-size: .7rem; }
.chem-manufacturing input, .chem-manufacturing select { font-size: .85rem; }
.chem-plan-summary { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: .5rem 1.5rem; margin-top: 1rem; padding: 1rem 0 .75rem; border-top: 2px solid var(--chem-selected); border-bottom: 1px solid var(--line); }
.chem-plan-identity { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.chem-plan-identity > div { flex: 1; min-width: 0; }
.chem-plan-identity .chem-icon--hero { width: 3.5rem; height: 3.5rem; }
.chem-plan-identity h3 { margin: 0 0 .2rem; color: var(--bone); font-size: 1.65rem; line-height: 1.15; }
.chem-plan-target { color: var(--chem-selected); font: 700 clamp(1.6rem, 3vw, 2.5rem)/1.1 var(--mono); overflow-wrap: anywhere; }
.chem-final-batch { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .6rem 2rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.chem-final-batch > div { display: grid; gap: .25rem; }
.chem-final-batch strong { font: 700 1.35rem/1.4 var(--mono); }
.chem-plan-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 1rem; }
.chem-plan-metrics > div { display: grid; gap: .3rem; }
.chem-plan-metrics strong { color: var(--bone); font: 700 1.6rem/1.2 var(--mono); }
.chem-plan-metrics span { color: var(--bone-dim); font: .65rem/1.4 var(--mono); }
.chem-plan-uncertain { color: var(--chem-uncertain); font: .75rem/1.5 var(--mono); }
.chem-plan-summary > p { grid-column: 1 / -1; }
.chem-manufacturing .chem-note { margin: .3rem 0 .6rem; font-size: .9rem; line-height: 1.5; }
.chem-plan-summary > .chem-plan-uncertain { margin: .4rem 0 0; }
.chem-requirements { display: grid; gap: .65rem; max-width: 58rem; }
.chem-manufacturing .chem-requirement { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .15rem .75rem; margin: 0; padding: .4rem 0; border: 0; border-bottom: 1px solid var(--line); }
.chem-source-main { display: contents; }
.chem-source-identity { display: flex; align-items: start; gap: .5rem; min-width: 0; }
.chem-source-identity > div { min-width: 0; }
.chem-source-identity > .chem-icon { flex: 0 0 1.75rem; width: 1.75rem; height: 1.75rem; }
.chem-source-inspection { grid-column: 2; min-width: 0; }
.chem-source-inspection > summary { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .65rem; min-height: 2rem; cursor: pointer; list-style: none; color: var(--bone-dim); font: .7rem/1.5 var(--mono); }
.chem-source-inspection > summary::before { content: '+'; color: var(--chem-uncertain); font: 1rem var(--mono); }
.chem-source-inspection[open] > summary::before { content: '-'; }
.chem-requirement h5 { margin: 0; font: 700 1rem/1.4 var(--mono); }
.chem-source-status { color: var(--chem-uncertain); font: .65rem/1.4 var(--mono); }
.chem-requirement-quantity { align-self: start; color: var(--bone); font: 700 1.1rem/1.5 var(--mono); overflow-wrap: anywhere; }
.chem-requirement .chem-trait-group { padding: 0; gap: .3rem; }
.chem-plan-details .chem-requirement .chem-trait-tag { max-width: 100%; padding: .25rem .4rem; font: .8rem/1.35 var(--mono); overflow-wrap: anywhere; }
.chem-trait-group { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .55rem 0 0; font: .8rem var(--mono); }
.chem-trait-group > strong { flex-basis: 100%; }
.chem-manufacturing .chem-trait-tag { margin: 0; padding: .4rem .55rem; border: 1px solid color-mix(in srgb, var(--chem-uncertain) 65%, var(--line)); background: color-mix(in srgb, var(--chem-uncertain) 12%, var(--surface-base)); color: var(--bone); font: .8rem/1.4 var(--mono); text-decoration: none; }
.chem-production-steps { list-style: none; margin: 0; padding: 0; }
.chem-plan-schedule { max-width: 54rem; }
.chem-production-labels, .chem-production-step { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 26rem) 4.25rem; justify-content: start; gap: .25rem 1rem; padding: .5rem .8rem; border-left: 2px solid transparent; }
.chem-production-labels { color: var(--bone-dim); font: .7rem/1.5 var(--mono); }
.chem-production-labels > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.chem-production-step { border-left-color: var(--line-bright); border-bottom: 1px solid var(--line); }
.chem-production-step[data-final="true"] { border-left-color: var(--chem-selected); background: var(--void-panel); }
.chem-step-identity { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; min-width: 0; }
.chem-step-identity > div:not(.chem-step-actions) { flex: 1; min-width: 0; }
.chem-step-identity h5 { margin: .15rem 0; font-size: 1rem; line-height: 1.3; }
.chem-production-step[data-final="true"] h5 { color: var(--chem-selected); }
.chem-step-identity .chem-icon { width: 2rem; height: 2rem; }
.chem-step-destination { display: block; }
.chem-step-actions { margin-top: .5rem; font: .7rem var(--mono); }
.chem-step-output { display: grid; align-content: start; gap: .25rem; }
.chem-step-output > strong { font-size: 1rem; line-height: 1.4; }
.chem-step-cycles { display: grid; align-content: start; gap: .3rem; }
.chem-step-cycles strong { font: 700 1.25rem/1.4 var(--mono); }
.chem-production-step[data-final="true"] .chem-step-cycles strong { color: var(--chem-selected); }
.chem-step-footer { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: .5rem; }
.chem-manufacturing .chem-step-footer .chem-link { margin: 0; font: .7rem var(--mono); }
.chem-step-footer > .chem-meta { color: var(--bone); }
.chem-manufacturing .chem-meta { font-size: .7rem; line-height: 1.5; }
.chem-facility-group { padding: .7rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 1rem; }
.chem-facility-group > summary, .chem-material-sources > summary { color: var(--bone); cursor: pointer; font: .8rem/1.5 var(--mono); }
.chem-facility-options { list-style: none; margin: .75rem 0 0; padding: 0; }
.chem-facility-options > li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .75rem 1.5rem; align-items: baseline; padding: .5rem .65rem; font-size: .9rem; }
.chem-facility-options > li:nth-child(odd) { background: var(--void-panel); }
.chem-facility-options span { color: var(--bone-dim); font: .75rem/1.5 var(--mono); }
.chem-facility-options strong:last-child { font: 700 .85rem var(--mono); }
.chem-manufacturing .chem-plan-tree, .chem-manufacturing .chem-plan-assumptions { margin: .85rem 0; padding: .75rem; }
.chem-plan-tree .chem-source { margin: .5rem 0 .25rem .5rem; padding: .65rem; }
.chem-plan-tree p, .chem-calculation-step p { margin: .5rem 0; font-size: .85rem; line-height: 1.5; }
.chem-calculation-step { padding-top: .6rem; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.chem-calculation-step:focus { outline: 2px solid var(--chem-selected); outline-offset: 2px; }
.chem-calculation-step h5 { margin: .5rem 0; font-size: 1rem; }
.chem-material-sources { margin-top: .65rem; }
.chem-requirement h5 { color: var(--bone); font-size: 1rem; }
.chem-source-consumers { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; margin: .4rem 0; color: var(--bone-dim); font: .8rem/1.5 var(--mono); }
.chem-source-consumers .chem-link { font: inherit; }
.chem-source-consumers .chem-icon { width: 1.5rem; height: 1.5rem; }
.chem-material-candidates { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .8rem; margin-top: .65rem; }
.chem-material-candidates > .chem-plan-uncertain { flex-basis: 100%; }
.chem-candidate-choice { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.chem-candidate-choice .chem-link { margin: 0; font-size: .875rem; }
.chem-material-candidate .chem-icon { width: 1.5rem; height: 1.5rem; }
.chem-material-sources .chem-candidate-choice { margin: .5rem .75rem 0 0; }
.chem-material-sources > summary { font-size: .875rem; }
.chem-manufacturing .chem-trait-tag { font-size: .875rem; }
.chem-manufacturing .chem-plan-uncertain { font-size: .875rem; }
.chem-plan-materials > .chem-note { font-size: 1rem; }
.chem-requirement, .chem-production-step { scroll-margin-top: 1rem; }
.chem-requirement:focus, .chem-production-step:focus { outline: 2px solid var(--chem-uncertain); outline-offset: 2px; }
.chem-output-quantities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem .8rem; margin: 0; }
.chem-output-quantities dt { margin-bottom: .3rem; color: var(--bone-dim); font: .875rem/1.4 var(--mono); }
.chem-output-quantities dd { margin: 0; font: 700 1rem/1.4 var(--mono); overflow-wrap: anywhere; }
.chem-step-inputs { grid-column: 1 / -1; }
.chem-step-inputs > summary, .chem-optional-suppliers > summary { min-height: 2.75rem; align-content: center; color: var(--bone); cursor: pointer; font: .8rem/1.5 var(--mono); }
.chem-step-inputs ul { list-style: none; padding: 0; margin: 0; }
.chem-step-inputs li { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .7rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.chem-input-identity { flex: 1; display: inline-flex; align-items: center; gap: .5rem; min-width: 0; }
.chem-input-identity > strong { font-size: .9rem; }
.chem-input-identity .chem-icon { width: 1.5rem; height: 1.5rem; }
.chem-input-quantity { font: 700 1rem var(--mono); }
.chem-step-inputs .chem-input-origin { min-width: 0; margin: 0; text-align: left; color: var(--bone); font: .85rem/1.4 var(--mono); overflow-wrap: anywhere; }
.chem-step-inputs .chem-trait-group { width: 100%; padding-top: 0; }
.chem-optional-suppliers { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.chem-optional-supplier { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .4rem 0; font: .875rem/1.5 var(--mono); }
.chem-optional-supplier > span { margin-left: auto; }
.chem-plan-modes { margin: .75rem 0; }
.chem-supply-flow[hidden], .chem-plan-details[hidden] { display: none; }
.chem-supply-flow { --chem-flow-gold: #ffd43b; --chem-flow-blue: #42b5ff; --chem-flow-magenta: #ef83d5; --chem-flow-teal: #35dfc6; --chem-flow-target: #ff641f; --chem-flow-shared: var(--bone-dim); }
.chem-flow-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem; }
.chem-flow-modes { margin: .35rem 0; }
.chem-flow-modes .action { min-height: 2.75rem; padding: .5rem .65rem; font: .75rem var(--mono); }
.chem-flow-heading h4 { margin: .5rem 0; font: 700 1rem var(--mono); }
.chem-flow-heading .chem-meta { font-size: .75rem; }
.chem-flow-limit { color: var(--chem-uncertain); font: .875rem/1.5 var(--mono); margin: .65rem 0; }
.chem-flow-nav { display: flex; gap: .35rem; overflow-x: auto; padding: .3rem 0; }
.chem-flow-nav button { flex-shrink: 0; font: .75rem var(--mono); padding: .6rem; border: 1px solid var(--line); text-decoration: none; }
.chem-flow-nav button[aria-pressed="true"] { border-color: var(--chem-selected); color: var(--bone); }
.chem-flow-viewport { container-type: inline-size; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-color: var(--chem-component-1) var(--void-panel); border-block: 1px solid var(--line); padding-block: .5rem; }
.chem-flow-board { --flow-gap: 8rem; position: relative; display: flex; align-items: stretch; justify-content: space-between; gap: var(--flow-gap); width: max-content; min-width: 100%; isolation: isolate; }
.chem-flow-stage { flex: 1 0 14rem; width: 16rem; max-width: 18rem; min-width: 0; display: flex; flex-direction: column; scroll-snap-align: start; }
.chem-flow-stage > h5 { position: relative; z-index: 3; background: var(--surface-base); border-bottom: 1px solid var(--line); padding: .6rem 0; margin: 0; color: var(--bone-dim); font: .875rem/1.4 var(--mono); }
.chem-flow-nodes { display: flex; flex-direction: column; justify-content: center; flex: 1; gap: .65rem; padding-top: var(--flow-bus); padding-bottom: .65rem; }
.chem-flow-node { position: relative; z-index: 1; min-width: 0; padding: .45rem .65rem; border-radius: 1rem; background: var(--void-panel); border: 1px solid color-mix(in srgb, var(--flow-color) 65%, var(--line)); border-left: 3px solid var(--flow-color); color: var(--bone); }
.chem-flow-node > .chem-meta { display: block; font: .6875rem/1.3 var(--mono); color: var(--bone-dim); }
.chem-flow-node[data-optional="true"] { border-style: dashed; }
.chem-flow-node[data-final="true"] { border-color: var(--chem-flow-target); background: color-mix(in srgb, var(--chem-flow-target) 9%, var(--void-panel)); }
.chem-flow-status { display: block; margin-top: .2rem; color: var(--bone-dim); font: .6875rem/1.4 var(--mono); }
.chem-flow-node[data-kind="source"] .chem-flow-status, .chem-flow-node[data-optional="true"] .chem-flow-status { color: var(--chem-uncertain); }
.chem-flow-node[data-inspected="true"] { border-color: var(--chem-inspected); }
.chem-flow-node[data-final="true"][data-inspected="true"] { border-color: var(--chem-flow-target); }
.chem-flow-node[data-muted="true"], .chem-flow-quantity[data-muted="true"] { opacity: .3; }
.chem-flow-identity { display: flex; align-items: center; gap: .45rem; width: 100%; min-height: 2rem; text-align: left; padding: .15rem 0; border: 0; background: none; color: var(--bone); cursor: pointer; }
.chem-flow-identity strong { font: 700 .9375rem/1.3 var(--mono); overflow-wrap: anywhere; }
.chem-flow-identity .chem-icon { flex-shrink: 0; width: 1.625rem; height: 1.625rem; }
.chem-flow-amount { display: block; color: var(--flow-color); font: 700 .875rem/1.4 var(--mono); }
.chem-flow-traits { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .4rem; }
.chem-flow-traits .chem-trait-tag { margin: 0; padding: .25rem .35rem; font: .75rem/1.4 var(--mono); }
.chem-flow-output { display: grid; gap: .1rem; margin-top: .2rem; font: .8125rem/1.4 var(--mono); }
.chem-flow-output strong { color: var(--flow-color); font-size: .875rem; }
.chem-flow-output small { color: var(--bone-dim); font-size: .6875rem; }
.chem-flow-actions { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .2rem; }
.chem-flow-actions button { min-height: 1.5rem; font: .6875rem var(--mono); }
.chem-flow-identity:focus-visible, .chem-flow-actions button:focus-visible { outline: 2px solid var(--chem-inspected); outline-offset: 2px; }
.chem-flow-lines { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.chem-flow-lines g { --flow-stroke: var(--flow-link, var(--bone-dim)); color: var(--flow-stroke); }
.chem-flow-lines path { fill: none; stroke: currentColor; opacity: .9; }
.chem-flow-lines .chem-flow-hit { stroke: transparent; stroke-width: 22; pointer-events: stroke; cursor: pointer; }
.chem-flow-lines .chem-flow-arrow { stroke: none; fill: currentColor; opacity: 1; }
.chem-flow-lines g[data-reference="true"] > path:first-child { stroke-dasharray: 5 4; }
.chem-flow-lines g[data-optional="true"] > path:first-child { stroke-dasharray: 7 4; }
.chem-flow-quantity[data-optional="true"] { border-style: dashed; }
.chem-flow-lines g[data-inspected="true"] { --flow-stroke: var(--chem-inspected); }
.chem-flow-lines g[data-inspected="true"] path { opacity: 1; }
.chem-flow-lines g[data-muted="true"] { opacity: .15; }
.chem-flow-labels { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.chem-flow-quantity { position: absolute; transform: translate(-50%, -50%); max-width: 6.2rem; min-height: 1.6rem; padding: .2rem .3rem; border: 1px solid var(--flow-link); background: var(--surface-base); color: var(--flow-link); font: .75rem/1.25 var(--mono); pointer-events: auto; cursor: pointer; }
.chem-flow-quantity[data-inspected="true"], .chem-flow-quantity:focus-visible { color: var(--chem-inspected); border-color: var(--chem-inspected); outline: none; }
.chem-flow-key { font: .75rem/1.5 var(--mono); color: var(--bone-dim); }
.chem-flow-inspector { padding: .75rem 0; border-block: 1px solid var(--line); margin-top: .65rem; min-height: 3.5rem; }
.chem-flow-inspector .chem-link { margin-right: .65rem; }
.chem-flow-inspection-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; margin-bottom: .65rem; }
.chem-flow-inspection-identity { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.chem-flow-inspection-identity strong { display: block; font: 700 1.125rem/1.35 var(--mono); overflow-wrap: anywhere; }
.chem-flow-inspection-identity small { display: block; margin-top: .15rem; color: var(--bone-dim); font: .6875rem/1.4 var(--mono); }
.chem-flow-inspection-header[data-final="true"] .chem-flow-inspection-identity strong { color: var(--chem-flow-target); }
.chem-flow-inspection-actions { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.chem-flow-inspection-actions .chem-link { margin: 0; min-height: 2.75rem; }
.chem-flow-close { padding-inline: .5rem; }
.chem-flow-inspection-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 1fr); gap: 1rem 2rem; }
.chem-flow-inspection-body h5 { margin: .25rem 0 .5rem; font: .875rem/1.4 var(--mono); }
.chem-flow-inspection-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: 0 0 .65rem; }
.chem-flow-inspection-stats dt { color: var(--bone-dim); font: .6875rem/1.4 var(--mono); margin-bottom: .25rem; }
.chem-flow-inspection-stats dd { margin: 0; font: 700 1.25rem/1.4 var(--mono); overflow-wrap: anywhere; }
.chem-flow-inspection-stats [data-stat="produced"] dd { color: var(--chem-flow-target); }
.chem-flow-inspection-stats [data-stat="surplus"] dd { color: var(--chem-connected); }
.chem-flow-inspection-facilities table { width: 100%; table-layout: fixed; border-collapse: collapse; font: .8125rem/1.4 var(--mono); }
.chem-flow-inspection-facilities caption { text-align: left; font: .6875rem/1.4 var(--mono); color: var(--bone-dim); margin-bottom: .4rem; }
.chem-flow-inspection-facilities th, .chem-flow-inspection-facilities td { padding: .3rem .4rem; text-align: right; vertical-align: top; overflow-wrap: anywhere; }
.chem-flow-inspection-facilities th:first-child { width: 52%; text-align: left; padding-left: 0; }
.chem-flow-inspection-facilities th:nth-child(2) { width: 32%; }
.chem-flow-inspection-facilities thead th { color: var(--bone-dim); font-weight: 400; border-bottom: 1px solid var(--line); }
.chem-flow-facility th { font-weight: 400; }
.chem-flow-facility td { font-variant-numeric: tabular-nums; }
.chem-flow-facility small { font-size: .6875rem; color: var(--bone-dim); }
.chem-flow-inspection-facilities .chem-meta { margin: .4rem 0 0; }
.chem-flow-inspected-quantity { font: 700 1rem/1.5 var(--mono); margin: .35rem 0; }
.chem-flow-candidate { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; padding: .5rem 0; }
.chem-flow-candidate .chem-link { margin: 0; }
.chem-flow-candidate .chem-item-label { font-size: .875rem; }
.chem-flow-candidate .chem-mining-launch { margin: 0; padding: 0; }
@media (max-width: 600px) {
  .chem-flow-inspection-body { grid-template-columns: minmax(0, 1fr); }
  .chem-flow-inspection-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chem-flow-board { --flow-gap: 7rem; }
  .chem-flow-stage { flex: 0 0 min(16rem, calc(100cqw - var(--flow-gap))); width: min(16rem, calc(100cqw - var(--flow-gap))); max-width: none; }
  .chem-flow-viewport { scroll-snap-type: x mandatory; max-height: min(70vh, 42rem); overflow-y: scroll; }
  .chem-flow-nodes { justify-content: flex-start; }
  .chem-flow-stage > h5 { position: sticky; top: 0; }
  .chem-flow-nav button { min-height: 2.75rem; }
  .chem-flow-identity { min-height: 2.75rem; }
  .chem-flow-actions button, .chem-flow-traits .chem-trait-tag { min-height: 2.75rem; }
  .chem-flow-quantity { min-height: 2.75rem; }
  .chem-flow-heading .chem-meta { font-size: .75rem; }
}
@media (min-width: 901px) {
  .chem-production-step .chem-output-quantities dt, .chem-step-cycles > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (min-width: 901px) and (max-width: 1200px) {
  .chem-manufacturing .chem-plan-inputs { grid-template-columns: 1fr 1fr; }
}
.chem-overview h3 { margin: .4rem 0 1rem; font-size: clamp(1.5rem, 3vw, 2.5rem); }
.chem-overview-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .85rem; }
.chem-overview-table caption { text-align: left; padding: 1rem; background: var(--void-panel); color: var(--ink-orange); font: .7rem var(--mono); }
.chem-overview-table th, .chem-overview-table td { padding: 1rem; border: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.chem-overview-table th { color: var(--ash); font: .65rem var(--mono); }
.chem-overview-table td { background: var(--void-raised); }
.chem-overview-table td > span, .chem-overview-table td > strong, .chem-overview-table td > small { display: block; margin-bottom: .5rem; }
.chem-overview-table small { color: var(--bone-dim); font: .65rem/1.6 var(--mono); }
.chem-overview-table .chem-link { margin-right: 1rem; }
.chem-icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 2rem; height: 2rem; border: 1px solid var(--line); background: var(--void); color: var(--bone-dim); vertical-align: middle; }
.chem-icon img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.chem-icon svg { width: 75%; height: 75%; fill: none; stroke: currentColor; stroke-width: 1.6; }
.chem-substance-swatch { display: inline-block; width: .7em; height: .7em; margin-right: .4em; vertical-align: .02em; background: var(--chem-material); border: 1px solid var(--line-bright); }
.chem-icon--hero { width: 4rem; height: 4rem; }
.chem-icon--trait { color: var(--bone-dim); }
.chem-item .chem-icon { width: 1.6rem; height: 1.6rem; }
.chem-item-label { display: inline-flex; align-items: center; gap: .65rem; min-width: 0; text-align: left; }
.chem-item-label > span:last-child { min-width: 0; }
.chem-overview-table .chem-icon { float: left; margin: 0 .65rem .4rem 0; }
.chem-manufacturing .chem-card > .chem-icon { float: left; margin: 0 1rem .6rem 0; }
@media (max-width: 900px) {
  .chem-mining-dialog { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); }
  .chem-mining-list > li { grid-template-columns: minmax(0, 1fr); }
  .chemistry { padding: .85rem; }
  .chem-card-header { gap: .85rem; }
  .chem-icon--hero { width: 4.25rem; height: 4.25rem; }
  .chem-card-header h3 { font-size: 1.65rem; }
  .chem-section--reprocesses-to, .chem-section--production { display: block; }
  .chem-facilities { margin: 1.2rem 0; }
  .chemistry .chem-overview-tabs { gap: .35rem; }
  .chemistry .chem-overview-tabs .action { flex: 1 1 8rem; padding: .7rem .5rem; }
  .chem-overview, .chem-overview-table { scroll-margin-top: 10rem; }
  .chem-manufacturing { scroll-margin-top: 10rem; }
  .chem-manufacturing .chem-plan-inputs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .chem-plan-inputs > label:nth-child(2), .chem-plan-inputs > label:nth-child(3) { grid-column: 1 / -1; }
  .chem-plan-inputs > label:first-child { grid-column: 1 / -1; }
  .chem-plan-inputs > .action { align-self: end; }
  .chem-plan-summary { grid-template-columns: minmax(0, 1fr); gap: .7rem; }
  .chem-plan-metrics { gap: .5rem; }
  .chem-plan-metrics strong { font-size: 1.4rem; }
  .chem-plan-identity h3 { font-size: 1.4rem; }
  .chem-plan-target { font-size: 2rem; }
  .chem-production-step { grid-template-columns: minmax(0, 1fr) 3rem; gap: .5rem; padding: .65rem; }
  .chem-step-identity { grid-column: 1 / -1; }
  .chem-step-identity { grid-column: 1 / -1; grid-row: 1; }
  .chem-step-output { grid-column: 1; grid-row: 2; }
  .chem-step-cycles { grid-row: 2; }
  .chem-output-quantities { gap: .4rem; }
  .chem-output-quantities dt { font-size: .7rem; }
  .chem-production-labels { display: none; }
  .chem-manufacturing .chem-requirement { grid-template-columns: 8rem minmax(0, 1fr); }
  .chem-requirement-quantity { font-size: 1rem; }
  .chem-step-inputs .chem-input-origin { min-height: 2rem; }
  .chem-step-inputs li > .chem-meta { flex-basis: 100%; margin-left: 2rem; }
  .chem-requirement, .chem-production-step { scroll-margin-top: calc(var(--chem-rail-offset, 10rem) + 1rem); }
  .chem-step-cycles { grid-column: 2; }
  .chem-facility-group { scroll-margin-top: calc(var(--chem-rail-offset, 10rem) + 1rem); }
  .chem-calculation-step { scroll-margin-top: calc(var(--chem-rail-offset, 10rem) + 1rem); }
  .chem-facility-options > li { grid-template-columns: minmax(0, 1fr) auto; gap: .3rem .5rem; }
  .chem-facility-options strong:first-child { grid-column: 1 / -1; }
  .chem-overview-table, .chem-overview-table tbody, .chem-overview-table tr, .chem-overview-table td { display: block; width: 100%; }
  .chem-overview-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .chem-overview-table tr { margin-bottom: 1rem; border-top: 2px solid var(--ink-orange); }
  .chem-overview-table td { border-top: 0; }
  .chem-overview-table td::before { content: attr(data-label); display: block; margin-bottom: .6rem; color: var(--ash); font: .6rem var(--mono); }
  .chem-controls { gap: .5rem; }
  .chem-controls > .chem-overview-tabs { width: 100%; }
  .chem-snapshot { margin: 0; font-size: .55rem; }
  .chem-toolbar { flex-basis: 100%; gap: .4rem; }
  .chem-toolbar .action { flex: 0 0 auto; }
  .chem-chain { display: grid; grid-template-columns: minmax(0, 1fr); position: relative; top: auto; gap: 1.5rem; padding: 0 0 0 1.5rem; z-index: 0; }
  .chem-connections { display: none; }
  .chem-stage-nav { position: sticky; top: var(--chem-rail-offset, 10rem); z-index: 4; display: flex; flex-wrap: wrap; gap: .3rem; padding: .5rem 0; background: var(--surface-base); }
  .chem-column { scroll-margin-top: calc(var(--chem-rail-offset, 10rem) + 5rem); }
  .chem-stage { padding: .4rem; border: 1px solid var(--line); background: var(--surface-panel); color: var(--bone); font: .6rem var(--mono); cursor: pointer; }
  .chem-column-list { height: 14rem; }
  .chem-column h4 { font-size: .75rem; }
  .chem-count { font-size: .6rem; }
  .chem-item { font-size: .8rem; }
  .chem-item-status { font-size: .55rem; }
  .chem-column-footer, .chem-more { font-size: .6rem; }
  .chem-yield { grid-template-columns: minmax(0, 1fr); }
  .chem-card { padding: 1rem; }
  .chem-card-host, #view-chemistry { scroll-margin-top: 10rem; }
  .chem-selection { gap: .6rem; }
  .chem-selection h3 { min-width: 9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .chemistry *, .chemistry *::before, .chemistry *::after { scroll-behavior: auto; transition: none; }
}
