.formula,.lab section { padding:clamp(14px,2.6vw,26px); background:#15191b; border:1px solid #37423d; border-radius:12px; }
.formula label { display:block; font-weight:700; }
#expression { width:100%; margin-top:.5rem; padding:.8rem; border:1px solid #56645a; background:#101411; color:#c7ebc3; font:600 1.3rem monospace; border-radius:8px; }
#examples,#switches { display:flex; flex-wrap:wrap; gap:.45rem; }
.lab { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); gap:1rem; margin-top:1rem; align-items:start; }
#switches [aria-pressed=true] { background:#a7d5a6; color:#152718; }
.canvas,.scroll { overflow:auto; max-height:60vh; }
.canvas { background:#0c1511; border-radius:8px; }
#diagram { display:block; margin:auto; }
#diagram path { fill:none; stroke-width:2; }
.hot { stroke:#afd495; }.cold { stroke:#597b68; }
.on { fill:#376446; stroke:#a2d48e; }.off { fill:#23332a; stroke:#698674; }
svg text { fill:white; font:12px monospace; }
table { width:100%; border-collapse:collapse; text-align:center; font-family:monospace; }
th,td { padding:.4rem; border-bottom:1px solid #3c4740; }
th { background:#29392e; position:sticky; top:0; }
td button { padding:.2rem .6rem; }
tr.active { color:#ffe1a3; background:#3e392b; }
@media(max-width:700px){.lab{grid-template-columns:1fr;}}
[data-theme="light"] .formula, [data-theme="light"] .lab section { background:var(--surface);border-color:var(--border); }
[data-theme="light"] #expression { background:#f4f8f2;color:#25472a; }
[data-theme="light"] th { background:#dfebe1; }
[data-theme="light"] tr.active { background:#fae8c4;color:#5e410d; }
.lab section { min-width:0; }
.hint{font-size:.88rem;color:var(--text-3)}.exlabel{align-self:center;font-size:.88rem;color:var(--text-2);margin-right:.2rem}
#status{font-weight:700;color:#c7ebc3}[data-theme="light"] #status{color:#25472a}
header code{color:var(--accent,#f59e0b);font-size:.95em}
[data-theme="light"] th{color:#1d2b21}
