/* ═══════════════════════════════════════════════════════════════
   PLANT CELL EXPLORER — HOLO-BENCH UI
   soft green/blue holographic lab aesthetic
   ═══════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/ibm-plex-sans.woff2') format('woff2');
  font-weight: 100 700;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/ibm-plex-sans-italic.woff2') format('woff2');
  font-weight: 100 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;

  --bg-deep: #04090d;
  --bg-panel: rgba(8, 24, 28, 0.72);
  --bg-inlay: rgba(6, 20, 24, 0.55);
  --ink: #d8f3ee;
  --ink-dim: #8fb8b4;
  --ink-faint: #5d857f;
  --mint: #5cf2c4;
  --mint-soft: rgba(92, 242, 196, 0.16);
  --aqua: #4fc8e8;
  --aqua-soft: rgba(79, 200, 232, 0.14);
  --lime: #aef26a;
  --amber: #ffd27a;
  --warn: #ff9d7a;
  --edge: rgba(92, 242, 196, 0.35);
  --edge-dim: rgba(92, 242, 196, 0.14);
  --shadow-glow: 0 0 22px rgba(92, 242, 196, 0.12), 0 0 60px rgba(79, 200, 232, 0.06);
  --ease-phys: cubic-bezier(0.22, 1.4, 0.32, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(1200px 700px at 50% 118%, rgba(30, 90, 80, 0.28), transparent 62%),
    radial-gradient(900px 520px at 88% -12%, rgba(28, 70, 96, 0.30), transparent 60%),
    radial-gradient(700px 500px at 8% -8%, rgba(24, 74, 64, 0.24), transparent 60%),
    var(--bg-deep);
}

button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }
i, em { font-style: italic; }
.hidden { display: none !important; }

/* ─────────── BOOT OVERLAY ─────────── */
#boot-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-deep);
  transition: opacity 0.9s var(--ease-smooth), visibility 0.9s;
}
#boot-overlay.done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-inner { text-align: center; }
.boot-ring {
  width: 92px; height: 92px; margin: 0 auto 26px;
  border-radius: 50%;
  border: 1px solid var(--edge-dim);
  border-top-color: var(--mint);
  border-right-color: var(--aqua);
  animation: bootspin 1.15s linear infinite;
  box-shadow: 0 0 34px rgba(92, 242, 196, 0.18) inset, 0 0 24px rgba(92, 242, 196, 0.12);
}
@keyframes bootspin { to { transform: rotate(360deg); } }
.boot-logo {
  font-family: var(--font-display); font-size: 26px; letter-spacing: 0.34em;
  color: var(--ink); text-shadow: 0 0 18px rgba(92, 242, 196, 0.5);
}
.boot-logo span { color: var(--mint); }
.boot-status { margin-top: 14px; font-size: 12.5px; letter-spacing: 0.12em; color: var(--ink-dim); min-height: 18px; }
.boot-bar { width: 240px; height: 2px; margin: 18px auto 0; background: rgba(92,242,196,.12); border-radius: 2px; overflow: hidden; }
.boot-bar-fill { width: 0%; height: 100%; background: linear-gradient(90deg, var(--aqua), var(--mint)); transition: width .3s ease; box-shadow: 0 0 10px var(--mint); }

/* ─────────── TOP NAV ─────────── */
#topnav {
  height: 64px;
  display: flex; align-items: center; gap: 28px;
  padding: 0 22px;
  border-bottom: 1px solid var(--edge-dim);
  background: linear-gradient(180deg, rgba(10, 28, 32, 0.85), rgba(6, 18, 22, 0.65));
  backdrop-filter: blur(8px);
  position: relative; z-index: 40;
}
#topnav::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--edge), transparent);
  opacity: .5;
}
.nav-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 34px; height: 34px; color: var(--mint); filter: drop-shadow(0 0 6px rgba(92,242,196,.55)); flex: none; }
.brand-text h1 {
  font-family: var(--font-display); font-size: 19px; font-weight: 700;
  letter-spacing: 0.06em; white-space: nowrap;
  text-shadow: 0 0 14px rgba(92, 242, 196, 0.35);
}
.brand-sub { display: block; font-size: 9.5px; letter-spacing: 0.30em; color: var(--ink-faint); }

.nav-tabs { position: relative; display: flex; gap: 6px; margin-left: 12px; }
.tab-btn {
  position: relative; z-index: 1;
  display: flex; align-items: baseline; gap: 8px;
  padding: 9px 20px 10px;
  font-family: var(--font-display); font-size: 14.5px; letter-spacing: 0.08em;
  color: var(--ink-dim);
  border-radius: 8px 8px 0 0;
  transition: color 0.28s, text-shadow 0.28s;
}
.tab-btn .tab-index { font-size: 10px; color: var(--ink-faint); letter-spacing: .1em; transition: color .28s; }
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--mint); text-shadow: 0 0 12px rgba(92, 242, 196, 0.6); }
.tab-btn.active .tab-index { color: var(--aqua); }
.tab-slider {
  position: absolute; bottom: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--aqua), var(--mint));
  box-shadow: 0 0 12px var(--mint), 0 0 4px var(--mint);
  transition: left 0.45s var(--ease-phys), width 0.45s var(--ease-phys);
}
.nav-status {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  font-size: 10.5px; letter-spacing: 0.24em; color: var(--ink-dim);
  border: 1px solid var(--edge-dim); border-radius: 20px; padding: 6px 14px;
  background: rgba(92, 242, 196, 0.05);
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); animation: pulse 2.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ─────────── LAYOUT ─────────── */
#layout {
  height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 300px 1fr 332px;
  gap: 14px;
  padding: 14px;
}

/* ─────────── HOLO PANELS ─────────── */
.holo-panel {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--edge-dim);
  border-radius: 12px;
  box-shadow: var(--shadow-glow), inset 0 0 40px rgba(8, 40, 44, 0.35);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform 0.5s var(--ease-phys), opacity 0.4s;
}
.holo-panel::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: repeating-linear-gradient(0deg, rgba(160, 255, 230, 0.022) 0 1px, transparent 1px 3px);
  mix-blend-mode: screen;
}
.panel-corner { position: absolute; width: 14px; height: 14px; z-index: 4; pointer-events: none; }
.panel-corner.tl { top: -1px; left: -1px; border-top: 2px solid var(--mint); border-left: 2px solid var(--mint); border-top-left-radius: 10px; }
.panel-corner.tr { top: -1px; right: -1px; border-top: 2px solid var(--mint); border-right: 2px solid var(--mint); border-top-right-radius: 10px; }
.panel-corner.bl { bottom: -1px; left: -1px; border-bottom: 2px solid var(--mint); border-left: 2px solid var(--mint); border-bottom-left-radius: 10px; }
.panel-corner.br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--mint); border-right: 2px solid var(--mint); border-bottom-right-radius: 10px; }
.panel-corner { filter: drop-shadow(0 0 5px rgba(92, 242, 196, 0.6)); }

.panel-scroll { position: absolute; inset: 0; overflow-y: auto; padding: 18px 18px 22px; scrollbar-width: thin; scrollbar-color: var(--edge-dim) transparent; }
.panel-scroll::-webkit-scrollbar { width: 5px; }
.panel-scroll::-webkit-scrollbar-thumb { background: var(--edge-dim); border-radius: 3px; }

/* panel content shared */
.p-kicker { font-size: 10px; letter-spacing: 0.32em; color: var(--aqua); margin-bottom: 6px; }
.p-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: 0.04em; line-height: 1.2; }
.p-title i { color: var(--mint); }
.p-sub { font-size: 12px; color: var(--ink-dim); margin-top: 4px; }
.p-divider { height: 1px; margin: 14px 0; background: linear-gradient(90deg, var(--edge), transparent); }
.p-body { font-size: 13px; color: var(--ink-dim); }
.p-body b, .p-body strong { color: var(--ink); font-weight: 600; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.stat-chip {
  border: 1px solid var(--edge-dim); border-radius: 9px;
  background: var(--bg-inlay);
  padding: 9px 11px;
  transition: border-color .3s, box-shadow .3s, transform .3s;
}
.stat-chip:hover { border-color: var(--edge); box-shadow: 0 0 14px rgba(92,242,196,.12); transform: translateY(-1px); }
.stat-chip .sc-val { font-family: var(--font-display); font-size: 15.5px; font-weight: 600; color: var(--mint); }
.stat-chip .sc-key { font-size: 9.5px; letter-spacing: 0.14em; color: var(--ink-faint); text-transform: uppercase; margin-top: 2px; }

.dossier-fact {
  margin-top: 12px; padding: 10px 12px;
  border-left: 2px solid var(--aqua);
  background: var(--aqua-soft); border-radius: 0 8px 8px 0;
  font-size: 12.5px; color: var(--ink-dim);
}
.dossier-fact b { color: var(--aqua); }

/* organelle library list */
.lib-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left;
  padding: 10px 11px; margin-bottom: 7px;
  border: 1px solid var(--edge-dim); border-radius: 10px;
  background: var(--bg-inlay);
  transition: border-color .25s, box-shadow .25s, transform .25s, background .25s;
  position: relative; overflow: hidden;
}
.lib-item::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(160,255,230,.06), transparent);
  transition: left .5s ease;
}
.lib-item:hover::after { left: 120%; }
.lib-item:hover { border-color: var(--edge); box-shadow: 0 0 16px rgba(92,242,196,.14); transform: translateX(3px); }
.lib-item.selected { border-color: var(--mint); background: var(--mint-soft); box-shadow: 0 0 18px rgba(92,242,196,.2); }
.lib-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; box-shadow: 0 0 8px currentColor; background: currentColor; }
.lib-item .li-name { font-family: var(--font-display); font-size: 13.5px; font-weight: 600; letter-spacing: .03em; }
.lib-item .li-tag { font-size: 10.5px; color: var(--ink-faint); display: block; }
.lib-item .li-arrow { margin-left: auto; color: var(--ink-faint); font-size: 13px; transition: transform .25s, color .25s; }
.lib-item:hover .li-arrow { transform: translateX(3px); color: var(--mint); }

.lib-detail { animation: fadeSlide .45s var(--ease-phys); }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.lib-back { font-size: 11.5px; color: var(--aqua); letter-spacing: .08em; margin-bottom: 10px; padding: 4px 0; }
.lib-back:hover { color: var(--mint); text-shadow: 0 0 8px rgba(92,242,196,.5); }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.data-chip {
  font-size: 10.5px; letter-spacing: .06em;
  padding: 4px 10px; border-radius: 20px;
  border: 1px solid var(--edge-dim); color: var(--ink-dim);
  background: rgba(92, 242, 196, 0.06);
}
.data-chip.accent { color: var(--mint); border-color: var(--edge); }

.mini-diagram { margin: 12px 0; border: 1px solid var(--edge-dim); border-radius: 10px; background: var(--bg-inlay); padding: 8px; }

/* ─────────── STAGE ─────────── */
#stage-wrap { position: relative; min-width: 0; }
#stage {
  position: absolute; inset: 0;
  border-radius: 14px;
  border: 1px solid var(--edge-dim);
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 50% 100%, rgba(16, 52, 48, 0.42), transparent 65%),
    radial-gradient(70% 60% at 50% 0%, rgba(12, 34, 48, 0.5), transparent 70%),
    #050d11;
  box-shadow: var(--shadow-glow), inset 0 0 80px rgba(4, 12, 16, 0.7);
}
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.stage-scanlines {
  position: absolute; inset: 0; pointer-events: none; z-index: 6;
  background: repeating-linear-gradient(0deg, rgba(170, 255, 235, 0.018) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}
.stage-scanlines::after {
  content: ''; position: absolute; left: 0; right: 0; height: 120px; top: -120px;
  background: linear-gradient(180deg, transparent, rgba(140, 255, 225, 0.05), transparent);
  animation: scansweep 7s linear infinite;
}
@keyframes scansweep { to { top: 110%; } }
.stage-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 6; box-shadow: inset 0 0 120px rgba(2, 8, 10, 0.75); border-radius: 14px; }

#leader-layer { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 8; pointer-events: none; }
#label-layer { position: absolute; inset: 0; z-index: 9; pointer-events: none; }
.cell-label {
  position: absolute; transform: translate(-50%, -50%);
  pointer-events: auto; cursor: pointer;
  font-family: var(--font-display); font-size: 11px; font-weight: 500; letter-spacing: 0.1em;
  color: var(--ink);
  padding: 3px 9px 4px;
  border: 1px solid var(--edge-dim); border-radius: 20px;
  background: rgba(6, 20, 24, 0.78);
  backdrop-filter: blur(4px);
  white-space: nowrap;
  transition: border-color .25s, box-shadow .25s, color .25s, opacity .3s;
  text-transform: uppercase;
}
.cell-label:hover, .cell-label.hot { border-color: var(--mint); color: var(--mint); box-shadow: 0 0 12px rgba(92, 242, 196, 0.35); }
.cell-label.selected { background: var(--mint); color: #05281e; border-color: var(--mint); box-shadow: 0 0 18px rgba(92, 242, 196, 0.55); font-weight: 700; }
.cell-label.dim { opacity: 0.28; }

#specimen-tag {
  position: absolute; top: 14px; left: 16px; z-index: 10;
  display: flex; flex-direction: column; gap: 1px;
  padding: 8px 14px; border-left: 2px solid var(--mint);
  background: linear-gradient(90deg, rgba(92,242,196,.08), transparent);
  border-radius: 0 8px 8px 0;
  pointer-events: none;
}
#specimen-tag .tag-line { font-size: 8.5px; letter-spacing: 0.34em; color: var(--aqua); }
#specimen-tag .tag-name { font-size: 13px; color: var(--ink); }
#specimen-tag .tag-name i { color: var(--mint); }

#stage-mode-chip {
  position: absolute; top: 14px; right: 16px; z-index: 10;
  font-family: var(--font-display); font-size: 10.5px; letter-spacing: 0.22em;
  color: var(--amber);
  padding: 7px 14px; border: 1px solid rgba(255, 210, 122, 0.35); border-radius: 20px;
  background: rgba(40, 30, 8, 0.45);
  box-shadow: 0 0 16px rgba(255, 210, 122, 0.12);
  pointer-events: none;
  animation: chipIn .4s var(--ease-phys);
}
@keyframes chipIn { from { opacity: 0; transform: translateY(-8px); } }

/* control cluster */
#control-cluster {
  position: absolute; right: 16px; bottom: 16px; z-index: 12;
  display: flex; flex-direction: column; gap: 7px;
}
.ctl-btn {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 13px;
  border: 1px solid var(--edge-dim); border-radius: 10px;
  background: rgba(6, 20, 24, 0.8);
  backdrop-filter: blur(6px);
  font-size: 11px; letter-spacing: 0.1em; color: var(--ink-dim);
  transition: all .25s var(--ease-smooth);
}
.ctl-btn svg { width: 16px; height: 16px; flex: none; }
.ctl-btn:hover { border-color: var(--edge); color: var(--ink); box-shadow: 0 0 14px rgba(92,242,196,.16); transform: translateX(-3px); }
.ctl-btn[aria-pressed="true"] { border-color: var(--mint); color: var(--mint); background: var(--mint-soft); box-shadow: 0 0 16px rgba(92,242,196,.25); }
.ctl-btn:active { transform: scale(0.96); }

/* focus widget */
#focus-widget { position: absolute; left: 16px; bottom: 16px; z-index: 12; }
#focus-toggle {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 15px;
  border: 1px solid var(--edge-dim); border-radius: 10px;
  background: rgba(6, 20, 24, 0.8);
  backdrop-filter: blur(6px);
  font-size: 11.5px; letter-spacing: 0.08em; color: var(--ink-dim);
  transition: all .25s;
}
#focus-toggle:hover { border-color: var(--edge); color: var(--ink); box-shadow: 0 0 14px rgba(92,242,196,.16); }
#focus-toggle svg { width: 15px; height: 15px; }
#focus-toggle .chev { width: 11px; height: 11px; transition: transform .3s; }
#focus-widget.open #focus-toggle .chev { transform: rotate(180deg); }
#focus-list {
  position: absolute; bottom: calc(100% + 8px); left: 0;
  min-width: 220px; max-height: 300px; overflow-y: auto;
  border: 1px solid var(--edge-dim); border-radius: 10px;
  background: rgba(5, 16, 20, 0.94);
  backdrop-filter: blur(10px);
  padding: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5), var(--shadow-glow);
  animation: fadeSlide .3s var(--ease-phys);
  scrollbar-width: thin;
}
#focus-list li {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 7px;
  font-size: 12.5px; color: var(--ink-dim); cursor: pointer;
  transition: background .2s, color .2s;
  list-style: none;
}
#focus-list li:hover, #focus-list li.active { background: var(--mint-soft); color: var(--mint); }
#focus-list .li-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; flex: none; }

/* hint toast */
#hint-toast {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 11; pointer-events: none;
  font-size: 11px; letter-spacing: 0.14em; color: var(--ink-dim);
  padding: 8px 18px; border-radius: 20px;
  border: 1px solid var(--edge-dim);
  background: rgba(5, 16, 20, 0.72);
  animation: hintFloat 3.2s ease-in-out infinite;
  transition: opacity .8s;
}
@keyframes hintFloat { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -5px); } }
#hint-toast.gone { opacity: 0; }

/* ─────────── INFO CARD ─────────── */
#info-card {
  position: fixed; z-index: 60;
  width: 330px;
  border: 1px solid var(--edge); border-radius: 14px;
  background: rgba(6, 20, 24, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 60px rgba(0, 0, 0, 0.55), 0 0 30px rgba(92, 242, 196, 0.16);
  padding: 16px 18px;
  animation: cardIn 0.45s var(--ease-phys);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(0.96); } }
.ic-head { display: flex; align-items: flex-start; gap: 12px; }
.ic-swatch { width: 16px; height: 16px; border-radius: 5px; margin-top: 3px; flex: none; box-shadow: 0 0 12px currentColor; }
.ic-head h3 { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: .03em; }
.ic-latin { font-size: 11px; color: var(--ink-dim); letter-spacing: .06em; }
#ic-close { margin-left: auto; color: var(--ink-faint); font-size: 14px; padding: 4px 6px; border-radius: 6px; transition: color .2s, background .2s; }
#ic-close:hover { color: var(--warn); background: rgba(255,157,122,.1); }
.ic-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; }
.ic-body { font-size: 13px; color: var(--ink-dim); }
.ic-body b { color: var(--ink); }
.ic-foot { display: flex; gap: 8px; margin-top: 14px; }

.pbtn {
  padding: 7px 14px;
  border: 1px solid var(--edge-dim); border-radius: 8px;
  font-family: var(--font-display); font-size: 11.5px; letter-spacing: 0.08em;
  color: var(--ink-dim);
  transition: all .25s;
}
.pbtn:hover { border-color: var(--mint); color: var(--mint); box-shadow: 0 0 12px rgba(92,242,196,.2); }
.pbtn.primary { border-color: var(--mint); color: #062a1f; background: var(--mint); font-weight: 700; box-shadow: 0 0 16px rgba(92,242,196,.4); }
.pbtn.primary:hover { filter: brightness(1.1); }
.pbtn:disabled { opacity: .35; pointer-events: none; }

/* ─────────── PROCESSES VIEW ─────────── */
.stage-tab-view {
  position: absolute; inset: 0; z-index: 20;
  padding: 18px;
  background: rgba(4, 11, 14, 0.66);
  backdrop-filter: blur(3px);
  animation: viewIn .5s var(--ease-smooth);
}
@keyframes viewIn { from { opacity: 0; } }
.holo-inlay {
  height: 100%;
  border: 1px solid var(--edge-dim); border-radius: 12px;
  background: var(--bg-panel);
  box-shadow: inset 0 0 50px rgba(8, 40, 44, 0.4);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.proc-head { padding: 16px 22px 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.proc-head h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: .04em; }
.proc-sub { font-size: 12px; font-weight: 400; color: var(--ink-dim); margin-left: 8px; }
.proc-sub i { color: var(--mint); }
.proc-eq { font-family: var(--font-display); font-size: 13px; color: var(--aqua); letter-spacing: .05em; padding: 5px 12px; border: 1px solid rgba(79,200,232,.3); border-radius: 8px; background: var(--aqua-soft); }
.proc-eq em { color: var(--amber); font-style: normal; }
.proc-canvas-wrap { flex: 1; position: relative; min-height: 0; padding: 0 14px; }
#proc-svg { width: 100%; height: 100%; }
#proc-caption {
  position: absolute; left: 28px; bottom: 12px; max-width: 560px;
  font-size: 12.5px; color: var(--ink);
  padding: 9px 14px; border-radius: 10px;
  border: 1px solid var(--edge-dim);
  background: rgba(5, 16, 20, 0.85);
  box-shadow: 0 0 18px rgba(92,242,196,.1);
  transition: opacity .3s;
}
#proc-caption b { color: var(--mint); }
.proc-controls { display: flex; align-items: center; gap: 10px; padding: 12px 22px 16px; border-top: 1px solid var(--edge-dim); }
.proc-steps { display: flex; gap: 7px; margin-left: auto; }
.proc-step-dot {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--edge-dim);
  font-family: var(--font-display); font-size: 10.5px; color: var(--ink-faint);
  display: grid; place-items: center;
  transition: all .3s;
}
.proc-step-dot:hover { border-color: var(--edge); color: var(--ink); }
.proc-step-dot.active { border-color: var(--mint); color: #062a1f; background: var(--mint); box-shadow: 0 0 14px rgba(92,242,196,.45); font-weight: 700; }
.proc-step-dot.done { border-color: var(--aqua); color: var(--aqua); }

/* ─────────── EXPERIMENTS ─────────── */
.exp-block { margin-bottom: 18px; animation: fadeSlide .45s var(--ease-phys); }
.exp-head { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.exp-num {
  font-family: var(--font-display); font-size: 10px; font-weight: 700;
  color: #062a1f; background: var(--mint);
  width: 19px; height: 19px; border-radius: 6px; display: grid; place-items: center;
  box-shadow: 0 0 10px rgba(92,242,196,.5); flex: none;
}
.exp-title { font-family: var(--font-display); font-size: 14.5px; font-weight: 600; letter-spacing: .04em; }
.exp-desc { font-size: 11.5px; color: var(--ink-faint); margin-bottom: 10px; }

.slider-row { margin: 12px 0; }
.slider-row label { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .1em; color: var(--ink-dim); margin-bottom: 6px; }
.slider-row label output { color: var(--mint); font-family: var(--font-display); font-weight: 600; }
input[type="range"] {
  width: 100%; height: 4px; -webkit-appearance: none; appearance: none;
  background: linear-gradient(90deg, var(--mint) var(--fill, 50%), rgba(92,242,196,.12) var(--fill, 50%));
  border-radius: 3px; outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--mint); border: 2px solid #062a1f;
  box-shadow: 0 0 12px rgba(92,242,196,.6);
  transition: transform .15s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.25); }
input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--mint); border: 2px solid #062a1f; box-shadow: 0 0 12px rgba(92,242,196,.6); }

.rate-readout {
  display: flex; align-items: baseline; gap: 8px;
  padding: 12px 14px; margin-top: 12px;
  border: 1px solid var(--edge); border-radius: 10px;
  background: var(--mint-soft);
}
.rate-readout .rr-val { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--mint); text-shadow: 0 0 14px rgba(92,242,196,.5); }
.rate-readout .rr-unit { font-size: 10px; color: var(--ink-dim); letter-spacing: .06em; }
.rate-limit-tag { margin-left: auto; font-size: 9.5px; letter-spacing: .12em; padding: 4px 9px; border-radius: 12px; border: 1px solid rgba(255,210,122,.4); color: var(--amber); }
.rate-limit-tag.co2 { border-color: rgba(79,200,232,.45); color: var(--aqua); }
#rate-chart { width: 100%; height: 150px; margin-top: 12px; border: 1px solid var(--edge-dim); border-radius: 10px; background: var(--bg-inlay); }
.bubble-tank { position: relative; height: 74px; margin-top: 12px; border: 1px solid var(--edge-dim); border-radius: 10px; background: linear-gradient(180deg, rgba(20,60,70,.3), rgba(10,30,36,.5)); overflow: hidden; }
.bubble-tank .bt-label { position: absolute; top: 6px; left: 10px; font-size: 9px; letter-spacing: .2em; color: var(--ink-faint); z-index: 2; }
.o2-bubble { position: absolute; bottom: -12px; border-radius: 50%; border: 1px solid rgba(180,240,255,.7); background: radial-gradient(circle at 32% 30%, rgba(220,250,255,.75), rgba(140,220,240,.12)); animation: rise linear infinite; }
@keyframes rise { to { transform: translateY(-110px); } }

.seg-control { display: flex; gap: 6px; margin: 10px 0; }
.seg-btn {
  flex: 1; padding: 9px 6px;
  border: 1px solid var(--edge-dim); border-radius: 9px;
  font-family: var(--font-display); font-size: 11px; letter-spacing: .05em;
  color: var(--ink-dim); transition: all .28s var(--ease-smooth);
}
.seg-btn small { display: block; font-size: 8.5px; color: var(--ink-faint); letter-spacing: .1em; margin-top: 2px; }
.seg-btn:hover { border-color: var(--edge); color: var(--ink); }
.seg-btn.active { border-color: var(--mint); color: var(--mint); background: var(--mint-soft); box-shadow: 0 0 16px rgba(92,242,196,.22); }
.seg-btn.active.warn { border-color: var(--warn); color: var(--warn); background: rgba(255,157,122,.1); box-shadow: 0 0 16px rgba(255,157,122,.2); }

.exp-explain {
  font-size: 12px; color: var(--ink-dim);
  border-left: 2px solid var(--aqua); padding: 9px 12px;
  background: var(--aqua-soft); border-radius: 0 8px 8px 0;
  margin-top: 10px; min-height: 60px;
  transition: opacity .3s;
}
.exp-explain b { color: var(--aqua); }
.exp-explain .ee-state { color: var(--mint); font-weight: 600; }

.exp-reset-row { display: flex; justify-content: flex-end; margin-top: 8px; }

/* tonicity HUD on stage */
#tonicity-hud { position: absolute; top: 58px; left: 16px; z-index: 12; display: flex; flex-direction: column; gap: 8px; }
.ton-chip {
  font-family: var(--font-display); font-size: 10.5px; letter-spacing: .16em;
  padding: 7px 13px; border-radius: 20px;
  border: 1px solid var(--edge); color: var(--mint);
  background: rgba(6,20,24,.8); box-shadow: 0 0 14px rgba(92,242,196,.18);
  transition: all .4s;
}
.ton-chip.warn { border-color: var(--warn); color: var(--warn); box-shadow: 0 0 14px rgba(255,157,122,.25); }
.turgor-gauge { display: flex; align-items: center; gap: 9px; padding: 7px 12px; border: 1px solid var(--edge-dim); border-radius: 10px; background: rgba(6,20,24,.8); }
.tg-label { font-size: 8.5px; letter-spacing: .22em; color: var(--ink-faint); }
.tg-track { width: 110px; height: 5px; border-radius: 3px; background: rgba(92,242,196,.12); overflow: hidden; }
.tg-fill { height: 100%; width: 60%; border-radius: 3px; background: linear-gradient(90deg, var(--aqua), var(--mint)); box-shadow: 0 0 8px var(--mint); transition: width 1.2s var(--ease-smooth), background .8s; }
.tg-fill.low { background: linear-gradient(90deg, var(--warn), var(--amber)); }
.tg-val { font-family: var(--font-display); font-size: 11.5px; font-weight: 600; color: var(--ink); min-width: 62px; }

/* comparison legend */
.compare-legend { margin-top: 10px; }
.cl-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-dim); padding: 5px 0; border-bottom: 1px dashed rgba(92,242,196,.08); }
.cl-row:last-child { border-bottom: none; }
.cl-badge { font-size: 8.5px; letter-spacing: .1em; padding: 2px 8px; border-radius: 10px; flex: none; }
.cl-badge.plant { border: 1px solid var(--edge); color: var(--mint); }
.cl-badge.animal { border: 1px solid rgba(255, 210, 122, .4); color: var(--amber); }
.cl-badge.both { border: 1px solid rgba(79,200,232,.4); color: var(--aqua); }

/* generic responsive squeeze */
@media (max-width: 1180px) {
  #layout { grid-template-columns: 250px 1fr 280px; }
}
@media (max-width: 960px) {
  #layout { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  #panel-left { display: none; }
  #panel-right { grid-row: 2; max-height: 240px; }
}
