/* Kwantum Biology: area colours (dark mode re-derived below so there are no white boxes) and biology diagram styles. */
:root[data-area="cells"]     { --acc-strong: #1A6B3E; --acc: #23884F; --acc-ink: #1A6B3E; --acc-soft: #DFF2E6; --acc-tint: #F3FBF6; }
:root[data-area="organisms"] { --acc-strong: #A3245C; --acc: #C02F6E; --acc-ink: #93204F; --acc-soft: #FBE3EE; --acc-tint: #FFF4F8; }
:root[data-area="life"]      { --acc-strong: #2D6A0F; --acc: #4A8A16; --acc-ink: #2D6A0F; --acc-soft: #E8F3DA; --acc-tint: #F6FBF0; }
:root[data-area="skills"]    { --acc-strong: #5B21B6; --acc: #6D28D9; --acc-ink: #5B21B6; --acc-soft: #EDE5FB; --acc-tint: #F8F5FE; }
:root[data-area="dna"]        { --acc-strong: #1D4FA8; --acc: #2763C9; --acc-ink: #1D4FA8; --acc-soft: #E1EAFA; --acc-tint: #F4F7FE; }
:root[data-area="metabolism"] { --acc-strong: #A8370B; --acc: #C2410F; --acc-ink: #93300A; --acc-soft: #FBE7DC; --acc-tint: #FFF5EF; }
:root[data-area="sustain"]    { --acc-strong: #2D6A0F; --acc: #4A8A16; --acc-ink: #2D6A0F; --acc-soft: #E8F3DA; --acc-tint: #F6FBF0; }
:root[data-theme="dark"][data-area] {
  --acc-ink: color-mix(in srgb, var(--acc) 62%, #fff);
  --acc-soft: color-mix(in srgb, var(--acc) 26%, #1B1D23);
  --acc-tint: color-mix(in srgb, var(--acc) 12%, #121318);
  --accent: var(--acc-ink); --accent-soft: var(--acc-soft);
}
/* long area names: keep the top bar title clear of the buttons on phones */
.tb-brand { min-width: 0; flex-shrink: 1; }
.tb-brand > span:last-child { min-width: 0; overflow: hidden; }
.tb-brand b, .tb-brand small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .tb-brand { max-width: calc(100% - 150px); } }
.fgrid > .blk:only-child { grid-column: 1 / -1; }
.fgrid .fm, .blk .fm { overflow-x: auto; max-width: 100%; }
.bench .seg { flex-wrap: wrap; }

/* ---------- biology diagrams (KW.bio in bioart.js) ---------- */
.bio-fig { max-width: 100%; height: auto; color: var(--ink, #1F2328); font-family: var(--font, "Lexend", sans-serif); }
.bio-fig text { fill: currentColor; font-size: 13px; }
.bio-fig text.sm { font-size: 11px; }
.bio-fig text.b { font-weight: 600; }
.bio-fig text.big { font-size: 16px; font-weight: 700; }
.bio-fig text.mono { font-family: var(--mono, "IBM Plex Mono", monospace); font-weight: 600; }
.bio-fig .ln { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bio-fig .ln1 { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; }
.bio-fig .lead { fill: none; stroke: currentColor; stroke-width: 1; opacity: .75; }
.bio-fig .dash { stroke-dasharray: 5 4; }
.bio-fig .gridl { stroke: currentColor; stroke-width: .5; opacity: .18; }
.bio-fig .axis { fill: none; stroke: currentColor; stroke-width: 1.6; }
.bio-fig .plot { fill: none; stroke: var(--acc, #23884F); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.bio-fig .plot2 { fill: none; stroke: #C2410F; stroke-width: 2.4; stroke-linejoin: round; }
.bio-fig .plot3 { fill: none; stroke: #2763C9; stroke-width: 2.4; stroke-linejoin: round; }
.bio-fig .ptd { fill: var(--acc, #23884F); }
.bio-fig .bar { fill: var(--acc, #23884F); opacity: .85; }
.bio-fig .bar2 { fill: #C2410F; opacity: .8; }
.bio-fig .cyto { fill: rgba(242, 201, 76, .16); stroke: currentColor; stroke-width: 2; }
.bio-fig .wall { fill: rgba(74, 138, 22, .22); stroke: currentColor; stroke-width: 2; }
.bio-fig .nucl { fill: rgba(109, 40, 217, .22); stroke: currentColor; stroke-width: 1.6; }
.bio-fig .vac { fill: rgba(39, 99, 201, .16); stroke: currentColor; stroke-width: 1.4; }
.bio-fig .chl { fill: rgba(35, 160, 80, .55); stroke: currentColor; stroke-width: 1; }
.bio-fig .mito { fill: rgba(224, 65, 47, .28); stroke: currentColor; stroke-width: 1.2; }
.bio-fig .rib { fill: currentColor; }
.bio-fig .plas { fill: none; stroke: #C2410F; stroke-width: 2; }
.bio-fig .dnaL { fill: none; stroke: #6D28D9; stroke-width: 1.6; }
.bio-fig .water { fill: rgba(39, 99, 201, .16); }
.bio-fig .soft { fill: rgba(127, 127, 127, .12); stroke: currentColor; stroke-width: 1.4; }
.bio-fig .blood { fill: rgba(224, 65, 47, .35); stroke: currentColor; stroke-width: 1.2; }
.bio-fig .blue { fill: rgba(39, 99, 201, .35); stroke: currentColor; stroke-width: 1.2; }
.bio-fig .green { fill: rgba(74, 138, 22, .35); stroke: currentColor; stroke-width: 1.2; }
.bio-fig .amber { fill: rgba(242, 160, 40, .4); stroke: currentColor; stroke-width: 1.2; }
.bio-fig .pink { fill: rgba(192, 47, 110, .3); stroke: currentColor; stroke-width: 1.2; }
.bio-fig .grey { fill: rgba(127, 127, 127, .25); stroke: currentColor; stroke-width: 1.2; }
.bio-fig .redA { fill: none; stroke: #E0412F; stroke-width: 2.4; }
.bio-fig .bluA { fill: none; stroke: #2763C9; stroke-width: 2.4; }
.bio-fig .arh { fill: currentColor; }
.bio-fig .arhR { fill: #E0412F; }
.bio-fig .arhB { fill: #2763C9; }
.bio-fig .base-A { fill: #E0412F; } .bio-fig .base-T { fill: #F2A028; } .bio-fig .base-C { fill: #2763C9; } .bio-fig .base-G { fill: #23884F; } .bio-fig .base-U { fill: #C02F6E; }
.bio-fig .base-q { fill: rgba(127,127,127,.3); }
.bio-fig .bt { fill: #fff !important; font-weight: 700; font-family: var(--mono, monospace); font-size: 12px; }
.bio-fig .hl { fill: none; stroke: var(--acc, #23884F); stroke-width: 3; }
.blk-fig .bio-fig, .qfig .bio-fig { display: block; margin: 0 auto; }

/* flow diagrams in HTML: boxes joined by arrows */
.flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 6px; margin: 10px 0; }
.flow .fb { border: 1.5px solid var(--acc, #23884F); background: var(--acc-tint, #F3FBF6); color: var(--ink); border-radius: 10px; padding: 6px 10px; font-weight: 600; font-size: .92rem; text-align: center; max-width: 220px; }
.flow .fa { color: var(--acc-ink, #1A6B3E); font-weight: 700; }
.flow.col { flex-direction: column; }
.flow .fb small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }

/* sims */
.bench .bio-fig { color: var(--bench-ink, #E7ECF5); }
.bench-screen.lightscr { background: var(--card, #fff); color: var(--ink); }
.bench-screen.lightscr .bio-fig { color: var(--ink); }
.bs-cards { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 8px; }
.bs-card { border: 1.5px solid var(--rule, #D6DCE5); background: var(--card, #fff); color: var(--ink); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: .9rem; cursor: pointer; text-align: left; }
.bs-card.on { border-color: var(--acc, #23884F); box-shadow: 0 0 0 2px var(--acc-soft, #DFF2E6); }
.bs-card.ok { border-color: var(--ok, #16855A); }
.bs-card.no { border-color: var(--no, #C8312B); }
.bs-info { padding: 8px 12px 12px; font-size: .95rem; color: var(--ink); }
.bs-info b { color: var(--acc-ink); }
.punnett { border-collapse: collapse; margin: 8px auto; font-family: var(--mono, monospace); font-size: 1.05rem; }
.punnett td, .punnett th { border: 1.5px solid var(--rule, #C9D0DA); width: 54px; height: 44px; text-align: center; }
.punnett th { background: var(--acc-soft, #DFF2E6); color: var(--acc-ink); }
.punnett td { background: var(--card, #fff); color: var(--ink); }
