/* =========================================================================
   Virtual Research Facility — styles
   Dark, high-contrast laboratory theme; responsive (desktop + tablet);
   visible focus states; reduced-motion support.
   ========================================================================= */
:root {
  --bg: #0a1020;
  --bg-2: #0f1830;
  --panel: #131e36;
  --panel-2: #1a2744;
  --line: #2b3b60;
  --text: #e8eef9;
  --muted: #a9b6cf;
  --accent: #5fd3f3;
  --accent-2: #8fa8ff;
  --ok: #69db7c;
  --warn: #ffd166;
  --bad: #ff8787;
  --focus: #ffe066;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;

  /* element categories (pastel backgrounds with dark text) */
  --c-alkali: #ff8f8f;
  --c-alkaline: #ffc078;
  --c-transition: #ffe08a;
  --c-post: #b8e994;
  --c-metalloid: #8ce0c8;
  --c-nonmetal: #8fd3ff;
  --c-halogen: #a5b4ff;
  --c-noble: #d0a8ff;
  --c-lanthanide: #ffa8d8;
  --c-actinide: #f5b3a0;
  --c-unknown: #cfd6e2;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: radial-gradient(1200px 600px at 80% -10%, #1a2a55 0%, transparent 60%), var(--bg);
  min-height: 100vh;
}
#bg-particles { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; color: #fff; }
h4 { font-size: 1rem; color: var(--accent); margin-top: .75rem; }
p { margin: .35rem 0; }
a { color: var(--accent); }
code { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.ok-text { color: var(--ok); }
.bad-text { color: var(--bad); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--focus); color: #000; padding: .5rem 1rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- focus ---------- */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
button:focus-visible, select:focus-visible, input:focus-visible { box-shadow: 0 0 0 5px rgba(255, 224, 102, .25); }

/* ---------- header ---------- */
.app-header {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(19, 30, 54, .95), rgba(10, 16, 32, .85));
}
.brand { display: flex; gap: .8rem; align-items: center; }
.brand-mark { font-size: 2rem; color: var(--accent); filter: drop-shadow(0 0 8px rgba(95, 211, 243, .5)); }
.brand h1 { font-size: 1.3rem; margin: 0; }
.tagline { margin: 0; color: var(--muted); font-size: .85rem; }
.status-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.stat { display: flex; align-items: center; gap: .5rem; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; }
.stat-label { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.stat select { width: auto; min-height: 30px; padding: .2rem .4rem; }
.lang-stat { border-color: var(--accent); }
#points { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 2ch; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: .25rem; overflow-x: auto; padding: .5rem 1.5rem 0; border-bottom: 1px solid var(--line); background: rgba(10, 16, 32, .92); position: sticky; top: 0; z-index: 19; backdrop-filter: blur(6px); }
[role="tab"] {
  background: transparent; color: var(--muted); border: 1px solid transparent; border-bottom: 0;
  padding: .6rem 1rem; border-radius: 10px 10px 0 0; font: inherit; cursor: pointer; white-space: nowrap;
}
[role="tab"]:hover { color: var(--text); background: var(--panel); }
[role="tab"][aria-selected="true"] { color: #fff; background: var(--panel); border-color: var(--line); box-shadow: inset 0 3px 0 var(--accent); }

main { padding: 1.25rem 1.5rem 2rem; }
main:focus { outline: none; }
.panel-head { margin-bottom: 1rem; }

/* ---------- cards & layout ---------- */
.card { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); margin-bottom: 1rem; min-width: 0; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.lab-grid { display: grid; grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.3fr) minmax(320px, 1.3fr); gap: 1rem; align-items: start; }
.table-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: .25rem; margin: .45rem 0; }
.field label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.field-control { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.unit { color: var(--muted); font-size: .85rem; min-width: 2.5ch; }
.echo { color: var(--accent); font-size: .85rem; font-variant-numeric: tabular-nums; }
.hint { font-size: .78rem; color: var(--muted); margin: 0; }
input, select, textarea {
  font: inherit; color: var(--text); background: #0b1428; border: 1px solid #3a4d78; border-radius: 8px; padding: .4rem .55rem; min-height: 36px;
}
input[type="number"] { width: 7.5rem; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
select { max-width: 100%; }
.check-row { display: flex; align-items: center; gap: .5rem; margin: .3rem 0; }
.env-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.inline-fields { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: end; margin-bottom: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem 1rem; }
.save-form { margin-top: .75rem; }
.save-form label { font-size: .85rem; color: var(--muted); font-weight: 600; }

/* ---------- buttons ---------- */
.btn, .btn-small, .btn-icon, .bench-item, .btn-link {
  font: inherit; color: var(--text); cursor: pointer; border-radius: 8px; border: 1px solid #3a4d78; background: var(--panel-2);
}
.btn { padding: .45rem .9rem; min-height: 38px; }
.btn:hover, .btn-small:hover, .btn-icon:hover { border-color: var(--accent); }
.btn-primary { background: linear-gradient(180deg, #2c8fd6, #1f6fb0); border-color: #4fb3f0; color: #fff; font-weight: 600; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-danger { border-color: #c75a5a; color: #ffc9c9; }
.btn-small { padding: .2rem .6rem; font-size: .85rem; }
.btn-icon { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; }
.btn-link { background: none; border: 0; color: var(--accent); text-align: left; padding: .15rem 0; text-decoration: underline; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; align-items: center; }

/* ---------- periodic table ---------- */
.ptable-scroll { overflow-x: auto; padding-bottom: .5rem; }
.ptable { display: grid; grid-template-columns: repeat(18, minmax(46px, 1fr)); grid-template-rows: repeat(7, auto) 14px repeat(2, auto); gap: 3px; min-width: 860px; }
.el {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1.08; padding: 2px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .3); color: #0b1220; cursor: pointer; font: inherit;
  transition: transform .12s ease, opacity .15s ease;
}
.el:hover { transform: scale(1.08); z-index: 2; }
.el.selected { outline: 3px solid #fff; outline-offset: 1px; z-index: 3; }
.el.dim { opacity: .18; }
.el-z { position: absolute; top: 2px; left: 4px; font-size: .62rem; font-weight: 600; }
.el-sym { font-size: 1.05rem; font-weight: 800; line-height: 1.1; }
.el-name { font-size: .5rem; line-height: 1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.el-w { font-size: .5rem; opacity: .85; }
.f-label { align-self: center; font-size: .75rem; color: var(--muted); }
.cat-alkali-metal { background: var(--c-alkali); }
.cat-alkaline-earth-metal { background: var(--c-alkaline); }
.cat-transition-metal { background: var(--c-transition); }
.cat-post-transition-metal { background: var(--c-post); }
.cat-metalloid { background: var(--c-metalloid); }
.cat-nonmetal { background: var(--c-nonmetal); }
.cat-halogen { background: var(--c-halogen); }
.cat-noble-gas { background: var(--c-noble); }
.cat-lanthanide { background: var(--c-lanthanide); }
.cat-actinide { background: var(--c-actinide); }
.cat-unknown { background: var(--c-unknown); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 1rem 0 0; }
.legend li { color: #0b1220; padding: .15rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.detail { position: sticky; top: 64px; max-height: calc(100vh - 80px); overflow: auto; }
.detail-head { display: flex; align-items: center; gap: .8rem; color: #0b1220; border-radius: 10px; padding: .6rem .8rem; margin-bottom: .75rem; }
.detail-head h3 { color: #0b1220; margin: 0; }
.detail-head .muted { color: #1f2a40; margin: 0; }
.detail-z { font-weight: 700; }
.detail-sym { font-size: 2.2rem; font-weight: 800; }

/* ---------- key/value lists ---------- */
.kv-list { margin: .5rem 0; display: grid; gap: .35rem; }
.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: .6rem; border-bottom: 1px dashed rgba(169, 182, 207, .18); padding-bottom: .3rem; }
.kv dt { color: var(--muted); font-size: .85rem; }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- tooltips ---------- */
.term { border-bottom: 1px dotted var(--accent); cursor: help; }
.glossary { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.tooltip { position: absolute; z-index: 60; max-width: 300px; background: #f8f9fa; color: #0b1220; padding: .5rem .7rem; border-radius: 8px; box-shadow: var(--shadow); font-size: .85rem; pointer-events: none; }

/* ---------- lab ---------- */
.bench-list { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .3rem; max-height: 70vh; overflow: auto; }
.bench-item { width: 100%; display: grid; grid-template-columns: 5.5rem 1fr auto; gap: .5rem; align-items: center; text-align: left; padding: .35rem .6rem; }
.bench-item:hover:not(:disabled) { border-color: var(--accent); background: #213258; }
.bench-item:disabled { opacity: .45; cursor: not-allowed; }
.formula { font-family: var(--mono); font-weight: 700; color: var(--accent); }
.bench-name { font-size: .85rem; }
.haz { color: var(--warn); }
.haz-high, .haz-extreme { color: var(--bad); }
.chamber-svg { width: 100%; max-height: 240px; display: block; margin-bottom: .5rem; }
.vessel { fill: rgba(143, 168, 255, .06); stroke: #8fa8ff; stroke-width: 3; }
.liquid { fill: rgba(95, 211, 243, .25); }
.liquid-blue { fill: rgba(56, 108, 255, .6); }
.atm-cl { fill: rgba(170, 230, 120, .15); }
.atm-o { fill: rgba(255, 255, 255, .05); }
.atm-vac { fill: rgba(0, 0, 0, .35); }
.token circle { fill: #213258; stroke: var(--accent); stroke-width: 1.5; }
.token-g circle { stroke-dasharray: 3 2; }
.token text { fill: #fff; font-size: 8px; font-family: var(--mono); }
.flame { fill: none; stroke: #ff922b; stroke-width: 4; stroke-linecap: round; }
.electrode { stroke: #ced4da; stroke-width: 5; }
.light-ray { stroke: #ffe066; stroke-width: 3; stroke-linecap: round; }
.cool { fill: #a5d8ff; font-size: 26px; }
.bubble { fill: none; stroke: #e7f5ff; stroke-width: 1.2; }
.precip { fill: #f1f3f5; }
.burst { fill: rgba(255, 146, 43, .35); stroke: #ff922b; }
.chamber-label { fill: var(--muted); font-size: 11px; }
.reagent { border: 1px solid var(--line); border-radius: 10px; padding: .5rem .6rem; margin-bottom: .5rem; background: rgba(11, 20, 40, .6); }
.reagent-head { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.reagent-grid { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0; }
.hint-box { border-left: 4px solid var(--warn); background: rgba(255, 209, 102, .08); padding: .5rem .7rem; border-radius: 6px; margin: .5rem 0; }

/* ---------- analysis ---------- */
.outcome { border-radius: 10px; padding: .7rem .9rem; background: var(--panel-2); border-left: 6px solid var(--accent); margin-bottom: .6rem; }
.outcome h3 { margin: .1rem 0; font-size: 1.25rem; }
.outcome-kicker { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.outcome-title { color: var(--muted); }
.outcome-no_reaction, .outcome-physical_mixing { border-left-color: #adb5bd; }
.outcome-dangerous, .outcome-invalid_quantity, .outcome-requires_unavailable { border-left-color: var(--bad); }
.outcome-insufficient_energy, .outcome-missing_condition, .outcome-unsupported { border-left-color: var(--warn); }
.outcome-combustion { border-left-color: #ff922b; }
.outcome-precipitation, .outcome-dissolution { border-left-color: #e9ecef; }
.tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.tag { background: #0b1428; border: 1px solid var(--line); border-radius: 999px; padding: .05rem .55rem; font-size: .78rem; }
.tag-dangerous { border-color: var(--bad); color: var(--bad); }
.equation { font-family: var(--mono); background: #0b1428; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem; margin: .5rem 0; overflow-x: auto; white-space: nowrap; font-size: 1rem; }
.equation.small { font-size: .8rem; padding: .3rem .5rem; }
.pred { padding: .35rem .6rem; border-radius: 8px; }
.pred-ok { background: rgba(105, 219, 124, .12); color: var(--ok); }
.pred-bad { background: rgba(255, 135, 135, .12); color: var(--bad); }
.msg-list { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .35rem; }
.msg { display: flex; gap: .5rem; padding: .45rem .6rem; border-radius: 8px; background: rgba(143, 168, 255, .08); border-left: 3px solid var(--accent-2); }
.msg-warn { background: rgba(255, 209, 102, .09); border-left-color: var(--warn); }
.msg-error { background: rgba(255, 135, 135, .1); border-left-color: var(--bad); }
.learn { display: block; color: var(--muted); font-size: .85rem; font-style: italic; }
.table-wrap { overflow-x: auto; margin: .6rem 0; }
table { border-collapse: collapse; width: 100%; font-size: .85rem; }
caption { text-align: left; font-weight: 700; color: var(--accent); padding: .3rem 0; }
th, td { border-bottom: 1px solid var(--line); padding: .35rem .45rem; text-align: left; vertical-align: top; }
thead th { color: var(--muted); font-weight: 600; background: rgba(11, 20, 40, .6); }
.haz-badge { display: inline-block; padding: .1rem .5rem; border-radius: 6px; font-weight: 700; font-size: .8rem; background: #2b3b60; }
.haz-badge.haz-none, .haz-badge.haz-low { background: #2f4f3a; color: #d3f9d8; }
.haz-badge.haz-moderate { background: #5c4a15; color: #fff3bf; }
.haz-badge.haz-high { background: #6b2c2c; color: #ffe3e3; }
.haz-badge.haz-extreme { background: #8a1c1c; color: #fff; }
.safety-note { border: 1px solid #8a1c1c; background: rgba(138, 28, 28, .18); border-radius: 8px; padding: .5rem .7rem; font-size: .85rem; }

/* ---------- visualisations ---------- */
.viz-svg { width: 100%; height: auto; max-height: 360px; background: rgba(11, 20, 40, .65); border: 1px solid var(--line); border-radius: 10px; margin: .5rem 0; }
.mc-svg { width: 100%; max-width: 260px; height: auto; display: block; margin: .5rem 0; }
.bond { stroke: #e9ecef; stroke-width: 2.5; }
.ionic-link { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.atom-label { font-weight: 800; font-size: 14px; fill: #0b1220; }
.charge-label { font-size: 16px; font-weight: 800; fill: var(--warn); }
.ox-label { font-size: 9px; fill: var(--muted); }
.lp { fill: var(--accent); }
.muted-svg { fill: var(--muted); font-size: 11px; }
.legend-svg { fill: var(--muted); font-size: 10px; }
.bad-svg { fill: var(--bad); font-size: 12px; font-weight: 700; }
.proton { fill: #ff6b6b; stroke: #c92a2a; stroke-width: .6; }
.neutron { fill: #adb5bd; stroke: #495057; stroke-width: .6; }
.nucleus-disk { fill: #e8590c; }
.nucleus-label { fill: #fff; font-size: 11px; font-weight: 700; }
.shell { fill: none; stroke: rgba(143, 168, 255, .45); stroke-dasharray: 3 4; }
.electron { fill: var(--accent); }
.model-label { font-size: .8rem; color: var(--warn); border-left: 3px solid var(--warn); padding-left: .6rem; }
.big-notation { font-size: 2rem; font-weight: 800; font-family: var(--mono); color: #fff; margin: .2rem 0; }
.builder-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; align-items: end; }
.builder-controls .btn-row, .builder-controls .check-row { grid-column: 1 / -1; }
.counter { display: flex; flex-direction: column; gap: .25rem; }
.counter-ctl { display: flex; gap: .25rem; align-items: center; }
.counter-ctl input { width: 4.5rem; text-align: center; }
.axis { stroke: var(--muted); }
.axis-label, .tick { fill: var(--muted); font-size: 10px; }
.series { fill: none; stroke-width: 2.2; }
.now-line { stroke: var(--focus); stroke-dasharray: 4 3; }
.mc-alive { fill: #4dabf7; }
.mc-decayed { fill: #343a40; }
.beamline { stroke: #3a4d78; stroke-width: 6; stroke-linecap: round; }
.target-nucleus { fill: #e8590c; stroke: #ffa94d; }
.projectile { fill: var(--accent); }
.product-track { stroke: var(--ok); stroke-width: 2.5; stroke-linecap: round; }
.examples { padding-left: 1rem; }
.candidate { border: 1px dashed var(--warn); padding: .5rem .7rem; border-radius: 8px; color: var(--warn); }

/* ---------- learning ---------- */
.card-details { border: 1px solid var(--line); border-radius: 10px; padding: .4rem .8rem; margin-bottom: .5rem; background: rgba(11, 20, 40, .5); }
.card-details summary { cursor: pointer; font-weight: 600; padding: .3rem 0; }
.criteria { padding-left: 1.2rem; }
.score { font-weight: 700; color: var(--accent); }
.bal-term { white-space: nowrap; }
.coef { width: 3.6rem !important; text-align: center; }
.quiz fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 .7rem; padding: .5rem .8rem; }
.quiz legend { font-weight: 600; padding: 0 .3rem; }
.quiz-fb { font-size: .85rem; }
.ach-list { list-style: none; padding: 0; display: grid; gap: .35rem; }
.ach { opacity: .55; display: flex; gap: .5rem; }
.ach.on { opacity: 1; }
.safety-card { grid-column: 1 / -1; }
.nb-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; max-height: 70vh; overflow: auto; }
.nb-list li { border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; background: rgba(11, 20, 40, .5); }
.nb-head { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.nb-head time { color: var(--muted); font-size: .8rem; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; z-index: 70; }
.toast { background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: .6rem .9rem; border-radius: 10px; box-shadow: var(--shadow); transition: opacity .5s ease; max-width: 340px; }
.toast-success { border-left-color: var(--ok); }
.toast-achievement { border-left-color: var(--focus); }
.toast.fade { opacity: 0; }

.app-footer { padding: 1rem 1.5rem 2rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }

/* ---------- animations (disabled by reduced motion) ---------- */
@keyframes rise { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-60px); opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: .8; } }
@keyframes flicker { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }
@keyframes fly { from { transform: translateX(0); } to { transform: translateX(270px); } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.anim-rise { animation: rise 2.2s ease-in infinite; transform-box: fill-box; }
.anim-pulse { animation: pulse 1.6s ease-in-out infinite; }
.anim-flicker { animation: flicker .9s ease-in-out infinite; }
.anim-fly { animation: fly .8s ease-in forwards; }
.anim-fade { animation: fadein .6s .8s ease both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .lab-grid { grid-template-columns: minmax(220px, .8fr) minmax(0, 1.5fr); }
  .analysis-card { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .table-layout { grid-template-columns: 1fr; }
  .detail { position: static; max-height: none; }
  .three-col { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .two-col, .three-col, .lab-grid { grid-template-columns: 1fr; }
  .env-grid { grid-template-columns: 1fr; }
  .builder-controls { grid-template-columns: 1fr; }
  main { padding: 1rem; }
}
@media (forced-colors: active) {
  .el { border: 1px solid CanvasText; }
  .el.dim { opacity: .4; }
}
