/* Chapter 6 uses the existing exam typography, theme tokens and figure surfaces. */
.chapter6-molecules { margin-block: 20px; }
.chapter6-molecules .mol-card { min-width: 0; }
.chapter6-labelled { margin-block: 20px; }
.chapter6-labelled svg { display: block; width: 100%; height: auto; max-height: 370px; }
.chapter6-ranks { border-top: 1px solid var(--hairline); margin-block: 20px; }
.chapter6-ranks .field-row { padding-block: 14px; margin: 0; border-bottom: 1px solid var(--hairline); }
.chapter6-ranks label { font-size: 16px; }
.chapter6-inline .field-row { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 10px; }
.chapter6-inline label { flex: 0 1 auto; }
.chapter6-inline select { min-width: 175px; }
.chapter6-reference { max-width: 540px; margin: 24px 0; }
.chapter6-reference table { width: 100%; border-collapse: collapse; text-align: left; font-size: 15px; }
.chapter6-reference caption { text-align: left; font-weight: 600; margin-bottom: 10px; color: var(--ink); }
.chapter6-reference th,.chapter6-reference td { padding: 10px 12px; border-bottom: 1px solid var(--hairline); }
.chapter6-reference thead th { color: var(--ink-2); font-weight: 500; }
.chapter6-reference tbody th { font-weight: 400; }
.chapter6-reference td { font-variant-numeric: tabular-nums; }
.chapter6-reaction { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 10px; align-items: center; margin-block: 24px; }
.chapter6-reaction > div { display: flex; align-items: center; min-width: 0; gap: 6px; }
.chapter6-reaction .mol-card { min-width: 0; flex: 1; padding: 8px; }
.chapter6-reaction .mol-card strong { font-size: 13px; }
.chapter6-reaction .molecule svg { width: 100%; height: auto; }
.chapter6-reaction .molecule { min-height: 100px; }
.reaction-equilibrium { font-size: 28px; color: var(--ink-2); }
.reaction-plus { color: var(--ink-2); }
@media(max-width:700px){.chapter6-reaction{grid-template-columns:1fr;}.reaction-equilibrium{text-align:center;}.chapter6-reaction .mol-card strong{font-size:14px;}}
/* Shared element paints keep charges and labels legible in both themes. */
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg { filter: none; }
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg [style*="stroke:#000000" i] { stroke: var(--ink)!important; }
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg :is([fill="#000000" i],[style*="fill:#000000" i]) { fill: var(--ink)!important; }
:root[data-theme] .chapter6-labelled svg :is(rect[fill="#FFFFFF" i],rect[style*="fill:#FFFFFF" i]) { fill: var(--ground)!important; }
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg [style*="stroke:#0000FF" i] { stroke: var(--atom-N)!important; }
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg :is([fill="#0000FF" i],[style*="fill:#0000FF" i]) { fill: var(--atom-N)!important; }
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg [style*="stroke:#FF0000" i] { stroke: var(--atom-O)!important; }
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg :is([fill="#FF0000" i],[style*="fill:#FF0000" i]) { fill: var(--atom-O)!important; }
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg [style*="stroke:#CCCC00" i] { stroke: var(--atom-S)!important; }
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg :is([fill="#CCCC00" i],[style*="fill:#CCCC00" i]) { fill: var(--atom-S)!important; }
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg [style*="stroke:#FF8000" i] { stroke: var(--atom-P)!important; }
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg :is([fill="#FF8000" i],[style*="fill:#FF8000" i]) { fill: var(--atom-P)!important; }
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg [style*="stroke:#33CCCC" i] { stroke: var(--atom-F)!important; }
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg :is([fill="#33CCCC" i],[style*="fill:#33CCCC" i]) { fill: var(--atom-F)!important; }
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg [style*="stroke:#00CC00" i] { stroke: var(--atom-Cl)!important; }
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg :is([fill="#00CC00" i],[style*="fill:#00CC00" i]) { fill: var(--atom-Cl)!important; }
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg [style*="stroke:#7F4C19" i] { stroke: var(--atom-Br)!important; }
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg :is([fill="#7F4C19" i],[style*="fill:#7F4C19" i]) { fill: var(--atom-Br)!important; }
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg [style*="stroke:#A01EEF" i] { stroke: var(--atom-I)!important; }
:root[data-theme] :is(.chapter6-labelled,.chapter6-molecules,.chapter6-reaction) svg :is([fill="#A01EEF" i],[style*="fill:#A01EEF" i]) { fill: var(--atom-I)!important; }
