:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#193446;background:#f3f7fa;--teal:#087d71;--line:#dbe6ed;--proton:#d54753;--electron:#2563eb;--neutron:#647789}*{box-sizing:border-box}body{margin:0}main{max-width:1530px;padding:24px;margin:auto}button,input,select{font:inherit}button,select,input[type=text]{border:1px solid #cbdce5;border-radius:9px;background:white;color:#193446;padding:10px 13px}button{cursor:pointer;font-weight:650;transition:background .15s}button:hover:not(:disabled){background:#eaf4f4}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #157fba;outline-offset:3px}button:disabled{opacity:.48;cursor:default}[hidden]{display:none!important}.top{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:19px}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.13em;color:var(--teal);margin:0 0 8px}h1{font-size:clamp(25px,3vw,37px);letter-spacing:-.045em;margin:0}h2{font-size:18px;letter-spacing:-.02em;margin:0}p{line-height:1.55}.intro{margin:7px 0 0;color:#617587;font-size:14px}.top-actions{display:flex;gap:8px;font-size:12px}.modes{display:flex;width:fit-content;background:#e5edf2;padding:5px;border-radius:13px;gap:4px;margin-bottom:18px}.modes button{background:transparent;border-color:transparent;text-align:left;min-width:175px;font-size:14px;padding:10px 18px}.modes small{display:block;font-size:11px;margin-top:4px;color:#617587;font-weight:500}.modes button[aria-pressed=true]{background:#193b4d;color:white;box-shadow:0 3px 7px #132d4020}.modes button[aria-pressed=true] small{color:#bdd6df}.workspace{display:grid;grid-template-columns:270px minmax(0,1fr);gap:18px;align-items:start}.panel{background:white;border:1px solid var(--line);border-radius:16px;padding:22px;box-shadow:0 3px 15px #1a3b4c04}.controls{padding:20px;position:sticky;top:12px}.section-heading{display:flex;align-items:center;gap:10px;margin-bottom:18px}.number{background:#e1f1ee;color:var(--teal);font-size:12px;font-weight:800;padding:7px;border-radius:7px}label{display:block;font-size:12px;font-weight:650;margin-bottom:8px}select{width:100%;font-size:13px}.element-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}.element-buttons button{text-align:left;padding:12px;display:flex;flex-direction:column;gap:3px}.element-buttons b{font-size:24px;letter-spacing:-.035em}.element-buttons span{font-size:11px;font-weight:500}.element-buttons button[aria-pressed=true]{background:#e4f3ef;border-color:var(--teal);color:#076458}.isotope{font-size:11px;color:#647786;padding-bottom:16px;border-bottom:1px solid var(--line)}.guide{font-size:12px;color:#3d6373}.transfer-buttons{display:grid;gap:8px;margin-bottom:16px}.transfer-buttons button{font-size:12px;text-align:left;padding:12px}.transfer-buttons small{display:block;font-size:10px;font-weight:500;color:#637c8a;padding-left:28px;margin-top:4px}.electron-icon{display:inline-grid;place-items:center;width:19px;height:19px;border-radius:50%;background:#2563eb;color:white;margin-right:8px;font-size:15px}.wide{width:100%;font-size:12px;margin-bottom:10px}.primary{background:var(--teal);color:white;border-color:var(--teal)}.primary:hover:not(:disabled){background:#07665e}.animation-controls{margin-top:10px;padding-top:12px;border-top:1px solid var(--line)}.animation-controls label{margin-top:10px}.animation-controls output{float:right}.check{display:flex;align-items:center;gap:8px;font-weight:500}.check input{accent-color:var(--teal)}input[type=range]{width:100%;accent-color:var(--teal)}.control-note{font-size:11px;color:#647786;margin-bottom:0}#question-settings .wide{margin-top:12px}.main-column{display:grid;gap:18px}.atom-card{padding:20px 22px 16px;overflow:hidden}.card-heading{display:flex;justify-content:space-between;gap:12px;align-items:start}.badge{white-space:nowrap;background:#e9f5f2;color:#086d62;font-size:11px;padding:7px 10px;border-radius:30px}.badge.positive{color:#b34229;background:#fff0e9}.badge.negative{color:#7150ab;background:#f1eafa}.badge.unknown{color:#526b7a;background:#edf2f5}.diagram-scroll{overflow-x:auto;margin:0 -5px}#atoms{width:100%;min-width:720px;display:block;max-height:500px}#atoms text{font-family:inherit}#atoms .electron-dot text,#atoms .nucleon text{pointer-events:none}#atoms .shell{fill:none;stroke:#cbdbe5;stroke-width:1.5}.mobile-hint{display:none;font-size:11px;color:#687d8a}.comparison{display:grid;grid-template-columns:1fr 1fr;gap:22px}.comparison h3{font-size:12px;margin:0 0 10px;color:#5a7282}.counts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.counter{border:1px solid #e1eaf0;border-radius:9px;padding:9px 6px;text-align:center;background:#f6f9fb;border-top:3px solid var(--color)}.counter small{font-size:10px;display:block;color:#617887;margin-bottom:5px}.counter strong{font-size:22px;color:var(--color);font-variant-numeric:tabular-nums;white-space:nowrap}.legend{display:flex;gap:20px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:14px;margin-top:18px;font-size:11px;color:#5a7383}.legend span{display:flex;gap:7px;align-items:center}.legend i{display:block;width:11px;height:11px;border-radius:50%}.proton{background:var(--proton)}.neutron{background:var(--neutron)}.electron{background:var(--electron)}.diagram-note{font-size:11px;color:#627888;margin:12px 0 0}.transfer-status{font-size:12px;min-height:19px;margin:10px 0 0;color:#087567;font-weight:650}.explanation-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.law{background:#193b4d;color:white;border-color:#193b4d}.law .eyebrow{color:#8dd6cb}.law p{font-size:13px;color:#dae8ec}.formula{font-size:clamp(20px,2.5vw,29px);font-weight:800;letter-spacing:-.025em;margin:20px 0;line-height:1.6;overflow-wrap:anywhere}.formula .substitution{font-size:.82em;font-weight:600;color:#b5e4db}.formula .result{font-size:.9em;color:#d3f4e9}.step-buttons{display:flex;gap:6px}.step-buttons button{font-size:11px;padding:7px 10px;background:#274d60;color:#d5e6ed;border-color:#507181}.step-buttons button[aria-pressed=true]{background:#c4f0e5;color:#193b4d;border-color:#c4f0e5}.law p.law-note{font-size:11px;color:#b5cbd5;margin-bottom:0}.identity{display:flex;gap:10px;align-items:center;font-size:14px;margin-top:18px}.identity span{border:1px solid var(--line);border-radius:8px;padding:9px 13px;background:#f6f9fb;font-weight:750}.balance>p{font-size:12px;color:#627888}.exchange-equation{font-size:22px;font-weight:800;color:var(--teal);padding:15px 0;line-height:1.5}.intermediate{background:#fff6e9;color:#916024!important;border:1px solid #efdec5;padding:10px;border-radius:8px}.remember{background:#f3f7fa;border-radius:9px;padding:12px}.remember strong{font-size:11px;color:#264f60}.remember p{font-size:11px;margin:6px 0 0;color:#617887}.exercise{border:2px solid #85b8bc;background:#fafffe}.exercise>p{font-size:13px}.answer-row{display:flex;gap:8px}.answer-row input{flex:1;min-width:0}.exercise #feedback{min-height:20px;font-size:13px;font-weight:650}.exercise #reveal{font-size:12px}.success{color:#087b53}.error{color:#b44026}.reference{font-size:12px;color:#627888}.reference summary{font-weight:700;color:#193446;cursor:pointer}.reference a{color:var(--teal)}#action-status{font-size:12px;color:#526b7a}:fullscreen{background:#f3f7fa;overflow:auto}@media(max-width:1100px){.workspace{grid-template-columns:230px minmax(0,1fr)}.explanation-grid{grid-template-columns:1fr}.comparison{gap:12px}.counter strong{font-size:19px}.counter small{font-size:9px}.panel{padding:18px}.controls{padding:16px}}@media(max-width:850px){.comparison{grid-template-columns:1fr;gap:18px}.counter small{font-size:11px}.counter strong{font-size:23px}}@media(max-width:700px){main{padding:15px}.top{align-items:start;flex-wrap:wrap;gap:13px}.top-actions{width:100%;justify-content:flex-end}.workspace{grid-template-columns:1fr}.controls{position:static}.modes{width:100%}.modes button{flex:1;min-width:0;padding:10px 12px}.mobile-hint{display:block}.card-heading h2{font-size:16px}.badge{font-size:10px}.legend{gap:12px}.answer-row{flex-wrap:wrap}.answer-row .primary{width:100%}}@media(prefers-reduced-motion:reduce){button{transition:none}}@media print{body{background:white}main{padding:0}.top-actions,.modes,.controls,.mobile-hint,.step-buttons,.reference,#answer-form,#reveal,#action-status{display:none!important}.workspace{display:block}.main-column{gap:10px}.panel{box-shadow:none;break-inside:avoid}.law{background:white;color:#193446;border-color:#ddd}.law p,.law .eyebrow,.formula .substitution,.formula .result{color:#193446}.explanation-grid{grid-template-columns:1fr 1fr;gap:10px}#atoms{min-width:0;max-height:300px}.diagram-scroll{overflow:visible}.comparison{grid-template-columns:1fr 1fr}.counter strong{font-size:18px}.counter small{font-size:9px}}

.charge-comparison{margin:18px 0 24px;padding:20px;background:#f8fafc;border:1px solid #d5e1ea;border-radius:14px}.charge-comparison h3{margin:0;font-size:19px;color:#193446}.charge-groups{display:grid;grid-template-columns:minmax(0,1fr) 30px minmax(0,1fr);gap:12px;align-items:stretch;margin-top:18px}.charge-group{padding:16px;border:1px solid;border-radius:12px;min-width:0}.proton-group{background:#fff5f5;border-color:#efc7cc}.electron-group{background:#eff5ff;border-color:#c7d9f5}.charge-group-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:14px}.charge-group-heading h4{font-size:16px;margin:0;color:#a7273a}.electron-group h4{color:#215bb0}.charge-group-heading small{display:block;font-size:11px;font-weight:500;margin-top:4px;color:#617787}.charge-group-heading strong{font-size:34px;font-weight:800;line-height:1;color:#a7273a;font-variant-numeric:tabular-nums}.electron-group strong{color:#215bb0}.charge-beads{display:grid;grid-template-columns:repeat(5,minmax(0,40px));gap:8px}.charge-bead{display:grid;place-items:center;width:100%;aspect-ratio:1;height:auto;border-radius:50%;color:white;font-size:29px;line-height:1;font-weight:800;box-shadow:inset 0 -3px 5px #0002,0 1px 3px #17374815;border:1px solid #fff9}.proton-bead{background:radial-gradient(circle at 28% 22%,#ffb5b8 0,#ee5667 28%,#c3273b 74%)}.electron-bead{background:radial-gradient(circle at 28% 22%,#b1d6ff 0,#4d96ed 28%,#2160bf 74%)}.charge-relation{align-self:center;text-align:center;font-size:32px;color:#193b4d}.charge-note{font-size:11px;line-height:1.6;color:#617787;margin:12px 0 0}.charge-result{font-size:13px;font-weight:700;color:#205d55;padding:12px;background:#e8f3ef;border-radius:8px;margin:16px 0 0}.charge-placeholder{grid-column:1/-1;font-size:12px;color:#627888;margin:0;min-height:45px}.charge-group-heading small{line-height:1.5}@media(max-width:1050px){.charge-group-heading{align-items:start;flex-direction:column}.charge-beads{grid-template-columns:repeat(4,minmax(0,40px));gap:6px}}@media(max-width:700px){.charge-comparison{padding:12px}.charge-comparison h3{font-size:17px}.charge-groups{gap:5px;grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr)}.charge-group{padding:9px}.charge-group-heading h4{font-size:13px}.charge-group-heading small{font-size:10px}.charge-beads{grid-template-columns:repeat(3,minmax(0,36px));gap:5px}.charge-bead{font-size:22px}.charge-group-heading strong{font-size:28px}.charge-relation{font-size:25px}}@media print{.charge-comparison{padding:10px;margin:10px 0;break-inside:avoid}.charge-beads{grid-template-columns:repeat(5,minmax(0,24px));gap:4px}.charge-bead{font-size:19px;print-color-adjust:exact;-webkit-print-color-adjust:exact}.charge-group{padding:10px}.charge-group-heading{flex-direction:row}.charge-group-heading strong{font-size:24px}}
