/* Electrode Equilibrium: tool-specific layout; common styles live in ../resources/styles.css */
[hidden] { display: none !important; }
.wrap { grid-template-columns: 18rem minmax(0, 1fr) 22rem; }
header p { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg button { flex: 1; }
.seg button.active { background: var(--seg-add); border-color: var(--accent); color: var(--btn-ink); }
.screen-app .seg3 button { padding-left: 0.3rem; padding-right: 0.3rem; font-size: 0.95rem; }
.controls-inline { display: flex; gap: 0.6rem; }
.screen-app #controls label.tick { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.8rem; font-weight: 500; cursor: pointer; }
#controls input[type="checkbox"] { width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--accent); }

/* Key */
.key { margin: 1rem 0 0; padding: 0.6rem 0.8rem; list-style: none; font-size: 0.95rem; line-height: 1.9; border: 2px solid var(--border); border-radius: 0.6rem; background: var(--surface); }
.key li { display: flex; align-items: center; gap: 0.6rem; }
.key span { display: inline-block; flex: none; border-radius: 50%; }
.k-atom { width: 1.1rem; height: 1.1rem; background: #9aa7b8; border: 2px solid #0b1020; }
.k-ion { width: 0.9rem; height: 0.9rem; background: #3b82f6; outline: 2px dashed rgba(56, 189, 248, .7); outline-offset: 2px; }
.k-e { width: 0.65rem; height: 0.65rem; background: #ffd166; border: 1px solid #0b1020; }
.k-an { width: 0.8rem; height: 0.8rem; background: #7c3aed; border: 1px solid #ddd6fe; }

/* Scene: the board stays dark in every theme */
.screen-app .scene-wrap { display: grid; place-items: center; padding: 0.6rem; overflow: hidden; }
#scene { display: block; max-width: none; aspect-ratio: auto; background: var(--canvas); border: 1px solid var(--panel-border); border-radius: 0.8rem; }

/* Read-outs */
#readouts { overflow: auto; }
.card { padding: 0.6rem 0.9rem; border: 2px solid var(--border); border-radius: 0.8rem; background: var(--surface); }
.card h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.card p { margin: 0.35rem 0; font-size: 1rem; line-height: 1.45; }
.card ul { margin: 0.3rem 0; padding-left: 1.3rem; font-size: 1rem; line-height: 1.45; }
.card .half { font-size: 1.05rem; color: var(--muted); }
.card .note { font-size: 0.92rem; color: var(--muted); }
.nw { white-space: nowrap; }
.stats4 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem 0.6rem; margin: 0.4rem 0; }
.stats4 span { display: block; font-size: 1rem; font-weight: 600; color: var(--muted); }
.stats4 b { font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats4 b.elec { color: #c48a00; }
:root:not([data-theme="classroom-light"]) .stats4 b.elec { color: #ffd166; }
.stats4 b.leave { color: #f97316; }
.stats4 b.ret { color: #0ea5e9; }
.chart { display: block; width: 100%; height: auto; margin-top: 0.3rem; border-radius: 0.5rem; background: var(--panel); }
.chart-key { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 1.05rem; font-weight: 700; }
.status { padding: 0.35rem 0.6rem; border-radius: 0.5rem; background: var(--panel); font-size: 0.95rem !important; }
.status.eq { background: var(--ok-bg); color: var(--ok-ink); }

@media (max-width: 1100px) {
    .wrap { grid-template-columns: 16rem minmax(0, 1fr); }
    #readouts { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
    body.screen-app { height: auto; overflow: auto; }
    .wrap { grid-template-columns: 1fr; }
    .scene-wrap { min-height: 60vh; }
}
