:root {
  color-scheme: dark;
  --ink: #080b0f;
  --panel: #0c1117;
  --panel-2: #101720;
  --text: #e8eef2;
  --muted: #75828d;
  --line: rgba(184, 218, 229, .14);
  --line-strong: rgba(201, 235, 245, .32);
  --cyan: #bff7ff;
  --cyan-bright: #e9fdff;
  --amber: #ff7a4e;
  --lime: #c6ff8a;
  --violet: #b99cff;
  --violet-bright: #e5dcff;
  --radius: 2px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--ink); }
body {
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text);
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  letter-spacing: .01em;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }

.ambient { position: fixed; inset: 0; pointer-events: none; overflow: hidden; opacity: .75; }
.ambient::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 52% 45%, black, transparent 78%);
}
.ambient span { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: rgba(205,245,255,.38); animation: drift 14s ease-in-out infinite alternate; }
.ambient span:nth-child(1) { left: 12%; top: 18%; }.ambient span:nth-child(2) { right: 16%; top: 30%; animation-delay: -4s; }.ambient span:nth-child(3) { left: 46%; bottom: 12%; animation-delay: -9s; }
@keyframes drift { to { transform: translate(16px,-12px); opacity: .2; } }

.app-shell { position: relative; min-height: 100dvh; }
.view { min-height: 100dvh; padding: clamp(24px, 4vw, 64px); }
.is-hidden { display: none !important; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .19em; text-transform: uppercase; }

.home-view { display: flex; flex-direction: column; max-width: 1600px; margin: 0 auto; }
.home-header { display: flex; align-items: flex-start; justify-content: space-between; }
.brand-lockup h1 { margin: 0; font-size: clamp(3.2rem, 7vw, 7.2rem); font-weight: 350; line-height: .8; letter-spacing: .12em; }
.brand-node { display: inline-grid; place-items: center; width: .88em; height: .88em; margin-right: .04em; border: 2px solid var(--cyan); border-radius: 50%; font-size: 0; vertical-align: -.02em; box-shadow: 0 0 26px rgba(191,247,255,.12), inset 0 0 14px rgba(191,247,255,.07); }
.brand-node::after { content: ""; width: .13em; height: .13em; border-radius: 50%; background: var(--cyan-bright); box-shadow: 0 0 12px var(--cyan); }
.build-mark { display: flex; align-items: center; gap: 10px; color: var(--muted); font-family: ui-monospace, monospace; font-size: .72rem; letter-spacing: .12em; }
.build-mark i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px rgba(198,255,138,.55); }

.home-stage { flex: 1; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); align-items: center; gap: clamp(28px, 6vw, 100px); padding: 3vh 0; }
.network-mark { position: relative; min-height: 400px; }
.network-mark svg { width: 100%; height: 100%; overflow: visible; }
.mark-lines path { fill: none; stroke: rgba(177,216,227,.17); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.mark-nodes circle { fill: #101820; stroke: rgba(199,238,248,.42); stroke-width: 1.4; }
.mark-origin { fill: rgba(191,247,255,.05); stroke: var(--cyan); stroke-width: 1.3; filter: drop-shadow(0 0 10px rgba(191,247,255,.35)); }
.mark-target { fill: rgba(198,255,138,.05); stroke: var(--lime); stroke-width: 1.3; stroke-dasharray: 4 3; }
.mark-bug path:first-child { fill: rgba(255,122,78,.08); stroke: var(--amber); stroke-width: 1.6; }.mark-bug path:last-child { stroke: var(--amber); stroke-width: 1; }
.coordinate { position: absolute; color: var(--muted); font-family: ui-monospace, monospace; font-size: .66rem; letter-spacing: .12em; }
.coord-a { left: 7%; top: 27%; }.coord-b { right: 15%; bottom: 7%; }

.home-actions { border-top: 1px solid var(--line); }
.menu-action { width: 100%; min-height: 82px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; transition: background .25s var(--ease), padding .25s var(--ease); }
.menu-action:hover { padding-left: 12px; background: linear-gradient(90deg, rgba(191,247,255,.045), transparent); }
.menu-action.primary .action-label { color: var(--cyan-bright); }
.action-index { color: var(--muted); font-family: ui-monospace, monospace; font-size: .68rem; }.action-label { font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 420; text-transform: uppercase; letter-spacing: .13em; }.action-arrow { color: var(--muted); font-size: 1.2rem; transition: color .2s, transform .2s; }.menu-action:hover .action-arrow { color: var(--cyan); transform: translate(2px,-2px); }
.menu-action.muted .action-label { color: #919ba2; }
.wormhole-entry-action { border-color: rgba(185,156,255,.22); background: linear-gradient(90deg,rgba(185,156,255,.025),transparent); }
.wormhole-entry-action .action-label { color: var(--violet-bright); }.wormhole-entry-action .action-arrow { color: var(--violet); }
.home-footer { display: flex; gap: 10px 34px; flex-wrap: wrap; color: var(--muted); font-family: ui-monospace, monospace; font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; }

.topbar, .game-header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; min-height: 64px; }
.topbar h2, .game-header h2 { margin: 0; font-size: clamp(1.45rem,3vw,2.35rem); font-weight: 380; letter-spacing: .04em; }
.icon-button, .text-button { border: 1px solid var(--line); background: rgba(12,17,23,.72); cursor: pointer; transition: border .2s, background .2s; }
.icon-button { width: 46px; height: 46px; font-size: 1.25rem; }.text-button { min-height: 42px; padding: 0 20px; color: #a8b4bc; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; }
.icon-button:hover, .text-button:hover { border-color: var(--line-strong); background: var(--panel-2); }
.topbar-meta { color: var(--muted); font-family: ui-monospace, monospace; font-size: .7rem; letter-spacing: .13em; }

.level-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: clamp(35px,7vh,80px); background: var(--line); border: 1px solid var(--line); }
.level-card { position: relative; min-height: 242px; border: 0; background: rgba(9,13,18,.94); text-align: left; overflow: hidden; }
.level-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 72% 20%, rgba(191,247,255,.065), transparent 34%); opacity: 0; transition: opacity .3s; }.level-card:hover::before { opacity: 1; }
.level-open { position: absolute; inset: 0; width: 100%; padding: 26px; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.level-card.locked { color: #626c73; }.level-card.locked .level-open { cursor: pointer; filter: saturate(.45); }
.level-card-index { position: relative; color: var(--muted); font-family: ui-monospace,monospace; font-size: .68rem; letter-spacing: .14em; }
.level-card h3 { position: relative; margin: 78px 0 8px; font-size: 1.3rem; font-weight: 420; letter-spacing: .05em; text-transform: uppercase; }
.level-card p { position: relative; margin: 0; max-width: 85%; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.level-card-status { position: absolute; top: 25px; right: 26px; color: var(--muted); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; }
.level-card.completed .level-card-status { color: var(--lime); }
.level-stats { position: absolute; left: 26px; bottom: 22px; color: #59656d; font-family: ui-monospace,monospace; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; }
.level-topology { position: absolute; top: 48px; right: 18px; width: 112px; height: 54px; opacity: .25; }.level-topology svg { width: 100%; height: 100%; }.level-topology path { fill: none; stroke: var(--cyan); stroke-width: .7; }.level-topology circle { fill: var(--cyan); }
.skip-remove { position: absolute; z-index: 3; right: 12px; bottom: 12px; width: 32px; height: 32px; border: 1px solid var(--line); background: rgba(8,11,15,.8); color: #77848c; cursor: pointer; font-size: 1rem; }.skip-remove:hover { border-color: var(--amber); color: var(--amber); }
.hardcore-card { background: radial-gradient(circle at 75% 18%, rgba(255,122,78,.055), transparent 32%), #090c10; }.hardcore-card .level-card-index { color: #d9856a; }

.game-view { display: flex; flex-direction: column; padding: clamp(14px,2.5vw,34px); }
.game-header { grid-template-columns: auto minmax(180px,1fr) auto auto auto; padding-bottom: 18px; }
.objective-status { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; min-width: 0; }
.objective-status.empty { display: none; }
.objective-status span { display: inline-flex; align-items: center; gap: 6px; min-height: 27px; padding: 6px 9px; border: 1px solid var(--line); color: var(--muted); font: 600 .6rem/1 ui-monospace,monospace; letter-spacing: .09em; white-space: nowrap; }
.objective-status .status-caption { border-color: transparent; padding-inline: 2px; color: #8998a2; }
.objective-status .core-chip i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid currentColor; }
.objective-status .core-chip.active { border-color: rgba(198,255,138,.34); color: var(--lime); background: rgba(198,255,138,.05); }
.objective-status .core-chip.active i { background: var(--lime); box-shadow: 0 0 7px rgba(198,255,138,.65); }
.objective-status .exit-chip { margin-left: 4px; border-color: rgba(117,130,141,.3); }
.objective-status .exit-chip.locked { color: #7f8b93; border-style: dashed; }
.objective-status .exit-chip.ready, .objective-status .exit-chip.complete { color: var(--lime); border-color: rgba(198,255,138,.42); background: rgba(198,255,138,.05); box-shadow: inset 3px 0 0 rgba(198,255,138,.48); }
.game-meta { text-align: right; }.game-meta span { display: block; color: var(--muted); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; }.game-meta strong { font-family: ui-monospace,monospace; font-size: 1.2rem; font-weight: 450; }
.board-wrap { position: relative; flex: 1; min-height: 420px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(circle at 48% 45%, #10171e 0, #090d12 68%); isolation: isolate; }
.board-wrap::after { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; box-shadow: inset 0 0 110px rgba(0,0,0,.3); }
.board-wrap.hardcore { background: radial-gradient(circle at 20% 32%, #0d141a 0, #07090d 42%, #030507 100%); border-color: rgba(255,122,78,.15); }
.board-wrap.hardcore::after { box-shadow: inset 0 0 190px 40px rgba(0,0,0,.68); }
.board-grid { position: absolute; inset: 0; opacity: .55; background-image: linear-gradient(rgba(204,238,248,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(204,238,248,.025) 1px, transparent 1px); background-size: 32px 32px; }
.game-board { position: absolute; inset: 0; width: 100%; height: 100%; }
.board-region rect { fill: rgba(185,219,229,.018); stroke: rgba(185,219,229,.07); stroke-width: 1; stroke-dasharray: none; vector-effect: non-scaling-stroke; }
.board-region text { fill: rgba(151,174,184,.34); font: 600 9px/1 ui-monospace,monospace; letter-spacing: .16em; pointer-events: none; }
.board-region.tone-cyan rect { fill: rgba(191,247,255,.018); stroke: rgba(191,247,255,.09); }
.board-region.tone-amber rect { fill: rgba(255,122,78,.014); stroke: rgba(255,122,78,.08); }
.edge { stroke: rgba(184,219,229,.19); stroke-width: 1.45; stroke-dasharray: none; vector-effect: non-scaling-stroke; transition: stroke .2s, opacity .34s, stroke-width .2s; }.edge.available { stroke: rgba(191,247,255,.46); stroke-width: 1.8; }.edge.hovered { opacity: 1; stroke: var(--cyan); stroke-width: 2.5; stroke-dasharray: none; filter: drop-shadow(0 0 5px rgba(191,247,255,.45)); }
.edge.gate-edge { stroke-dasharray: none; }
.edge.gate-edge.closed { opacity: .24; stroke: rgba(255,138,101,.52); stroke-width: 1.25; stroke-dasharray: 3 8; }
.edge.gate-edge.open { opacity: .78; stroke: rgba(198,255,138,.36); stroke-dasharray: none; }
.edge.gate-phase.open { stroke: rgba(191,247,255,.36); }
.edge.gate-x.open { stroke: rgba(125,225,255,.34); }.edge.gate-y.open { stroke: rgba(255,190,122,.34); }.edge.gate-z.open { stroke: rgba(198,255,138,.34); }
.edge.will-open { opacity: 1; stroke: var(--lime); stroke-width: 2.8; stroke-dasharray: none; filter: drop-shadow(0 0 6px rgba(198,255,138,.42)); }
.edge.will-close { opacity: .72; stroke: var(--amber); stroke-width: 2.4; stroke-dasharray: 2 5; }
.edge.state-changed.changed-open { opacity: 1; stroke: var(--lime); stroke-width: 3; stroke-dasharray: none; animation: edgeOpenFlash .9s var(--ease); filter: drop-shadow(0 0 8px rgba(198,255,138,.55)); }
.edge.state-changed.changed-closed { opacity: .62; stroke: var(--amber); stroke-width: 2.3; stroke-dasharray: 3 7; animation: edgeCloseFlash .9s var(--ease); }
@keyframes edgeOpenFlash { 0%,100% { stroke-opacity: .55; } 45% { stroke-opacity: 1; } }
@keyframes edgeCloseFlash { 45% { stroke-dashoffset: 14; stroke-opacity: 1; } }
.edge.past { opacity: .08; }
.trail-edge { stroke: rgba(191,247,255,.28); stroke-width: 2.4; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgba(191,247,255,.25)); }
.node { transition: opacity .34s; }.node-hit { fill: transparent; cursor: default; }.node.available .node-hit { cursor: pointer; }
.node-pulse { fill: transparent; stroke: transparent; stroke-width: 1; }.node.available .node-pulse { stroke: rgba(191,247,255,.24); animation: nodeBreath 2.4s ease-in-out infinite; }
@keyframes nodeBreath { 50% { r: 32px; stroke-opacity: .2; } }
.node-ring { fill: #0d141b; stroke: rgba(194,228,238,.34); stroke-width: 1.35; vector-effect: non-scaling-stroke; transition: stroke .2s, fill .2s, filter .2s; }.node-core { fill: rgba(211,241,249,.4); transition: fill .2s; }
.node.available .node-ring { stroke: rgba(191,247,255,.78); }.node.available:hover .node-ring, .node.available:focus-visible .node-ring { stroke: var(--cyan-bright); fill: rgba(191,247,255,.08); filter: drop-shadow(0 0 10px rgba(191,247,255,.35)); }.node:focus-visible { outline: none; }
.node.danger .node-ring { stroke: var(--amber); stroke-dasharray: 3 3; }.node.visited:not(.objective-node):not(.relay-node):not(.goal):not(.start) .node-ring { stroke: rgba(151,188,198,.2); }.node.start .node-ring { stroke: var(--cyan); stroke-width: 2.1; }.node.start .node-core { fill: var(--cyan-bright); }
.node.goal .node-ring { stroke-width: 2.2; }.node.goal.locked .node-ring { stroke: rgba(117,130,141,.58); stroke-dasharray: 3 5; }.node.goal.locked .node-core { fill: rgba(117,130,141,.45); filter: none; }
.node.goal.goal-ready .node-ring { fill: rgba(198,255,138,.08); stroke: var(--lime); stroke-dasharray: none; filter: drop-shadow(0 0 10px rgba(198,255,138,.4)); }.node.goal.goal-ready .node-core { fill: var(--lime); }.node.goal.goal-ready .node-pulse { stroke: rgba(198,255,138,.4); animation: exitReady 1.7s ease-in-out infinite; }
.node.goal.goal-complete .node-ring { fill: var(--lime); stroke: #efffdb; filter: drop-shadow(0 0 15px rgba(198,255,138,.75)); }.node.goal.goal-complete .node-core { opacity: 0; }
.goal-lock, .goal-arrow, .goal-check { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; pointer-events: none; }.goal-lock { stroke: #8a969e; }.goal-arrow { display: none; stroke: var(--lime); }.goal-check { display: none; stroke: #0a1010; stroke-width: 2; }
.node.goal.goal-ready .goal-lock { display: none; }.node.goal.goal-ready .goal-arrow { display: block; }.node.goal.goal-complete .goal-lock, .node.goal.goal-complete .goal-arrow { display: none; }.node.goal.goal-complete .goal-check { display: block; }
@keyframes exitReady { 50% { r: 34px; stroke-opacity: .75; } }
.objective-node .node-ring { fill: rgba(198,255,138,.025); stroke: rgba(198,255,138,.78); stroke-width: 2.2; }.objective-mark { fill: #0d141b; stroke: rgba(198,255,138,.75); stroke-width: 1.3; pointer-events: none; }.objective-check { opacity: 0; fill: none; stroke: #0b1209; stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.objective-node.objective-active .node-ring { fill: rgba(198,255,138,.16); stroke: var(--lime); filter: drop-shadow(0 0 11px rgba(198,255,138,.42)); }.objective-node.objective-active .objective-mark { fill: var(--lime); stroke: var(--lime); }.objective-node.objective-active .objective-check { opacity: 1; }
.relay-node .node-ring { fill: rgba(191,247,255,.025); stroke: rgba(191,247,255,.64); stroke-dasharray: none; }.relay-mark { fill: rgba(191,247,255,.035); stroke: var(--cyan); stroke-width: 1.35; pointer-events: none; }.relay-node.relay-triggered .relay-mark { fill: rgba(191,247,255,.3); filter: drop-shadow(0 0 5px var(--cyan)); }
.node.just-activated .node-pulse, .node.just-triggered .node-pulse, .node.just-unlocked .node-pulse { stroke: var(--lime); animation: statePulse .72s var(--ease) 2; }.node.just-triggered .node-pulse { stroke: var(--cyan); }
@keyframes statePulse { 0% { r: 20px; stroke-opacity: 1; } 100% { r: 42px; stroke-opacity: 0; } }
.node-label { fill: #d6e4e9; font-family: ui-monospace,monospace; font-size: 12px; font-weight: 700; letter-spacing: .08em; pointer-events: none; }.node-state-label { fill: #687983; font-family: ui-monospace,monospace; font-size: 6.5px; font-weight: 600; letter-spacing: .1em; pointer-events: none; }
.entity { pointer-events: none; transition: opacity .3s; }.player-orbit { fill: none; stroke: rgba(191,247,255,.5); stroke-width: 1.4; stroke-dasharray: 4 5; animation: orbitPulse 3s linear infinite; }.player-halo { fill: rgba(191,247,255,.14); stroke: var(--cyan); stroke-width: 1.5; filter: drop-shadow(0 0 8px rgba(191,247,255,.42)); }.player-core { fill: var(--cyan-bright); filter: drop-shadow(0 0 10px rgba(191,247,255,.95)); }
@keyframes orbitPulse { 50% { stroke-dashoffset: 18; opacity: .5; } }
.bug-aura { fill: rgba(255,122,78,.035); stroke: rgba(255,122,78,.26); stroke-width: 1.2; stroke-dasharray: 2 5; animation: anomalyThreat 2.1s ease-in-out infinite; }.bug-shell { fill: rgba(255,122,78,.13); stroke: var(--amber); stroke-width: 2.1; filter: drop-shadow(0 0 5px rgba(255,122,78,.3)); }.bug-slash { fill: none; stroke: #ffb094; stroke-width: 1.7; }.bug-core { fill: #fff0e9; filter: drop-shadow(0 0 8px var(--amber)); }
@keyframes anomalyThreat { 50% { r: 30px; stroke-opacity: .55; } }
.bug-preview line, .bug-preview path { fill: none; stroke: rgba(255,122,78,.72); stroke-width: 1.4; stroke-dasharray: none; vector-effect: non-scaling-stroke; pointer-events: none; }
.memory { opacity: .24; }.undiscovered { opacity: 0 !important; pointer-events: none !important; }.fog-radar { fill: url(#fog-glow); pointer-events: none; }
.tutorial-prompt { z-index: 5; position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(720px,calc(100% - 48px)); padding: 11px 18px; border: 1px solid var(--line-strong); background: rgba(7,10,14,.86); backdrop-filter: blur(12px); color: #c9d5db; font-size: .78rem; line-height: 1.35; letter-spacing: .06em; text-align: center; transition: opacity .3s, transform .3s; }.tutorial-prompt.dismissed { opacity: 0; transform: translate(-50%,8px); pointer-events: none; }
.network-event { z-index: 6; position: absolute; left: 50%; top: 18px; transform: translate(-50%,-10px); max-width: min(620px,calc(100% - 360px)); padding: 8px 13px; border: 1px solid rgba(198,255,138,.34); background: rgba(8,14,14,.9); color: var(--lime); font: 700 .63rem/1.35 ui-monospace,monospace; letter-spacing: .1em; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }.network-event.visible { opacity: 1; transform: translate(-50%,0); }.network-event.outcome-win { border-color: var(--lime); box-shadow: 0 0 24px rgba(198,255,138,.16); }.network-event.outcome-loss { border-color: var(--amber); color: #ffb094; box-shadow: 0 0 24px rgba(255,122,78,.16); }
.board-legend { position: absolute; z-index: 5; top: 14px; right: 16px; display: grid; grid-template-columns: auto auto; gap: 8px 14px; padding: 10px 12px; border: 1px solid rgba(184,218,229,.1); background: rgba(7,10,14,.66); color: #77858f; font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; }.board-legend span { display: flex; align-items: center; gap: 7px; }.board-legend i { display: inline-block; width: 9px; height: 9px; flex: none; border-radius: 50%; }.legend-player { background: var(--cyan); box-shadow: 0 0 7px var(--cyan); }.legend-bug { background: var(--amber); clip-path: polygon(50% 0,100% 28%,88% 88%,50% 100%,12% 88%,0 28%); }.legend-objective { border: 2px solid var(--lime); box-shadow: 0 0 5px rgba(198,255,138,.35); }.legend-relay { border: 1px solid var(--cyan); border-radius: 1px !important; transform: rotate(45deg); }.legend-open, .legend-closed { width: 18px !important; height: 0 !important; border-radius: 0 !important; border-top: 2px solid rgba(198,255,138,.7); }.legend-closed { border-top: 2px dashed var(--amber); }.legend-goal { border: 2px solid var(--lime); box-shadow: inset 0 0 0 2px #0a0f13; }
.board-wrap.won::before, .board-wrap.lost::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; animation: outcomeWash .65s var(--ease); }.board-wrap.won::before { background: radial-gradient(circle at 50% 50%, rgba(198,255,138,.12), transparent 55%); }.board-wrap.lost::before { background: radial-gradient(circle at 50% 50%, rgba(255,122,78,.13), transparent 55%); }
.node.collision-node .node-ring { stroke: var(--amber); fill: rgba(255,122,78,.18); animation: collisionPulse .42s ease-in-out 2; }
@keyframes outcomeWash { from { opacity: 0; } 45% { opacity: 1; } }
@keyframes collisionPulse { 50% { r: 21px; filter: drop-shadow(0 0 13px var(--amber)); } }

.modal-root:empty { display: none; }.modal-root { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(2,4,6,.72); backdrop-filter: blur(8px); }.dialog { width: min(460px,100%); padding: 32px; border: 1px solid var(--line-strong); background: #0c1117; box-shadow: 0 30px 100px rgba(0,0,0,.55); }.dialog .eyebrow { margin-bottom: 18px; }.dialog h2 { margin: 0 0 10px; font-weight: 420; }.dialog > p { margin: 0 0 24px; color: #93a0a8; line-height: 1.6; }.dialog-actions { display: flex; gap: 10px; margin-top: 24px; }.dialog-actions button { min-height: 46px; flex: 1; border: 1px solid var(--line); background: #111821; cursor: pointer; }.dialog-actions .primary { border-color: rgba(191,247,255,.42); color: var(--cyan-bright); }.dialog-actions .danger { border-color: rgba(255,122,78,.42); color: #ff9d7c; }
.code-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: .7rem; letter-spacing: .13em; text-transform: uppercase; }.code-input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 0; outline: 0; background: #080c10; color: var(--cyan-bright); font-family: ui-monospace,monospace; letter-spacing: .15em; text-transform: uppercase; }.code-input.invalid { border-color: var(--amber); }.form-error { min-height: 20px; margin: 8px 0 0 !important; color: #ff9d7c !important; font-size: .75rem; }
.win-dialog { border-color: rgba(198,255,138,.42); background: radial-gradient(circle at 82% 0, rgba(198,255,138,.075), transparent 38%), #0c1117; }.win-dialog .eyebrow, .win-dialog h2 { color: var(--lime); }
.loss-dialog { border-color: rgba(255,122,78,.48); background: radial-gradient(circle at 82% 0, rgba(255,122,78,.08), transparent 38%), #0c1117; }.loss-dialog .eyebrow, .loss-dialog h2 { color: #ffb094; }.hardcore-complete { border-color: rgba(255,122,78,.48); background: radial-gradient(circle at 80% 0, rgba(255,122,78,.08), transparent 38%), #0c0e12; }.hardcore-complete h2 { color: #ffd8ca; }
.fatal { min-height: 100dvh; display: grid; place-content: center; padding: 30px; }.fatal h1 { margin: 0; font-weight: 400; }.fatal p:last-child { color: var(--muted); }

/* The Wormhole — private research environment */
.wormhole-view { --wormhole-line: rgba(185,156,255,.18); position: relative; display: flex; flex-direction: column; padding: clamp(14px,2.5vw,34px); background: radial-gradient(circle at 72% 18%,rgba(107,74,178,.13),transparent 32%), radial-gradient(circle at 28% 75%,rgba(33,122,146,.08),transparent 38%); }
.wormhole-view::before { content:""; position: fixed; inset: 0; pointer-events:none; opacity:.25; background-image: radial-gradient(circle,rgba(220,210,255,.5) 0 1px,transparent 1.5px); background-size: 74px 74px; mask-image:radial-gradient(circle at 60% 42%,black,transparent 78%); }
.wormhole-topbar { position: relative; z-index:2; display:grid; grid-template-columns:auto 1fr auto auto; align-items:center; gap:18px; min-height:66px; padding-bottom:16px; border-bottom:1px solid var(--wormhole-line); }
.wormhole-lockup h2 { margin:0; color:var(--violet-bright); font-size:clamp(1.15rem,2.6vw,2rem); font-weight:420; letter-spacing:.18em; }
.wormhole-mode { padding:8px 12px; border:1px solid; font:700 .64rem/1 ui-monospace,monospace; letter-spacing:.14em; }
.wormhole-mode.paused { color:#ffb094; border-color:rgba(255,122,78,.42); background:rgba(255,122,78,.05); }.wormhole-mode.running { color:var(--lime); border-color:rgba(198,255,138,.42); }
.wormhole-stage { position:relative; z-index:1; flex:1; min-height:0; }
.wormhole-gate { min-height:calc(100dvh - 130px); display:grid; grid-template-columns:minmax(300px,1fr) minmax(300px,520px); align-items:center; gap:clamp(40px,8vw,130px); max-width:1260px; margin:0 auto; }
.gate-orbit { position:relative; aspect-ratio:1; display:grid; place-items:center; color:var(--violet-bright); font-size:clamp(4rem,10vw,9rem); filter:drop-shadow(0 0 25px rgba(185,156,255,.35)); }
.gate-orbit::before,.gate-orbit::after,.gate-orbit i { content:""; position:absolute; border:1px solid rgba(185,156,255,.2); border-radius:50%; animation:wormholeSpin 18s linear infinite; }.gate-orbit::before { inset:8%; border-style:dashed; }.gate-orbit::after { inset:24%; animation-direction:reverse; animation-duration:11s; }.gate-orbit i:nth-child(1){inset:0;border-color:rgba(191,247,255,.08)}.gate-orbit i:nth-child(2){inset:16%;border-top-color:var(--violet)}.gate-orbit i:nth-child(3){inset:34%;border-right-color:var(--cyan);animation-duration:7s}.gate-orbit span{animation:wormholePulse 3s ease-in-out infinite}
@keyframes wormholeSpin{to{transform:rotate(360deg)}}@keyframes wormholePulse{50%{transform:scale(1.08);opacity:.72}}
.gate-copy h3 { margin:0 0 18px; font-size:clamp(2.2rem,5vw,4.7rem); font-weight:300; line-height:1.02; letter-spacing:-.035em; }.gate-copy>p:not(.eyebrow):not(.wormhole-error):not(.fixture-warning){color:#98a0ae;line-height:1.75;max-width:54ch}
.wormhole-login { display:grid; gap:14px; margin-top:30px; }.wormhole-login label { display:grid; gap:8px; color:#888f9b; font-size:.68rem; letter-spacing:.13em; text-transform:uppercase; }.wormhole-login input { height:48px; border:1px solid var(--wormhole-line); background:rgba(7,8,13,.82); color:var(--violet-bright); padding:0 14px; outline:0; }.wormhole-primary { min-height:48px; padding:0 18px; border:1px solid rgba(185,156,255,.48); background:rgba(185,156,255,.08); color:var(--violet-bright); cursor:pointer; text-transform:uppercase; letter-spacing:.12em; font-size:.72rem; }
.config-notice { display:grid; gap:8px; margin-top:28px; padding:18px; border:1px solid rgba(255,122,78,.28); background:rgba(255,122,78,.04); }.config-notice strong{color:#ffb094}.config-notice span,.wormhole-error{color:#a99a9a;line-height:1.5}.fixture-warning,.fixture-ribbon{color:#ffcd75;font:700 .66rem/1.4 ui-monospace,monospace;letter-spacing:.12em}.fixture-ribbon{padding:8px 12px;border:1px solid rgba(255,205,117,.25);background:rgba(255,205,117,.05);text-align:center}
.wormhole-loading { min-height:calc(100dvh - 130px); display:grid; place-content:center; justify-items:center; gap:18px; color:#9790a8; }.wormhole-loading span{width:56px;height:56px;border:1px solid rgba(185,156,255,.2);border-top-color:var(--violet);border-radius:50%;animation:wormholeSpin 1.4s linear infinite}
.wormhole-shell { min-height:calc(100dvh - 116px); display:grid; grid-template-columns:170px minmax(0,1fr); }
.wormhole-rail { padding:30px 18px 24px 0; border-right:1px solid var(--wormhole-line); }.rail-action{width:100%;display:grid;grid-template-columns:26px 1fr;gap:10px;align-items:center;min-height:48px;padding:0 10px;border:0;border-left:2px solid transparent;background:transparent;color:#727987;cursor:pointer;text-align:left;font-size:.72rem;letter-spacing:.08em;text-transform:uppercase}.rail-action span{color:#8f7bb8;font-size:1rem}.rail-action:hover,.rail-action.active{color:var(--violet-bright);background:linear-gradient(90deg,rgba(185,156,255,.08),transparent);border-left-color:var(--violet)}
.wormhole-panel { position:relative; min-width:0; padding:clamp(24px,4vw,54px); }.panel-header{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,460px);gap:30px;align-items:end;margin-bottom:30px}.panel-header h3{margin:0;font-size:clamp(2rem,4.5vw,4.2rem);font-weight:300;line-height:1}.panel-header>p{margin:0;color:#858c99;line-height:1.6}
.constellation-controls{display:flex;align-items:center;gap:8px;margin-bottom:14px}.layer-tab{min-height:38px;padding:0 14px;border:1px solid var(--wormhole-line);background:transparent;color:#777d8a;cursor:pointer;text-transform:uppercase;letter-spacing:.1em;font-size:.64rem}.layer-tab.active{color:var(--violet-bright);border-color:rgba(185,156,255,.48);background:rgba(185,156,255,.08)}.graph-search{display:flex;align-items:center;gap:8px;margin-left:auto;color:#777d8a;font-size:.64rem;text-transform:uppercase;letter-spacing:.1em}.graph-search input{width:min(260px,28vw);height:38px;border:1px solid var(--wormhole-line);background:#080b11;color:#dcd6ea;padding:0 12px}
.universe-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,330px);min-height:560px;border:1px solid var(--wormhole-line);background:rgba(7,9,14,.76)}.graph-canvas{position:relative;min-width:0;overflow:hidden;background:radial-gradient(circle at 50% 50%,rgba(185,156,255,.07),transparent 48%),linear-gradient(rgba(255,255,255,.012) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.012) 1px,transparent 1px);background-size:auto,44px 44px,44px 44px}.graph-detail{padding:26px;border-left:1px solid var(--wormhole-line);overflow:auto}.graph-detail h4,.drawer-detail h4{margin:0 0 12px;font-size:1.3rem;font-weight:420}.graph-detail h5,.drawer-detail h5,.lab-console h5{margin:24px 0 10px;color:#9991aa;font-size:.68rem;text-transform:uppercase;letter-spacing:.13em}.graph-detail p,.graph-detail li,.drawer-detail p,.drawer-detail li{color:#9096a1;font-size:.78rem;line-height:1.6}.graph-detail ul,.drawer-detail ul{margin:0;padding-left:18px}.graph-detail small{display:block;color:#686e78}.detail-empty{min-height:100%;display:grid;place-content:center;text-align:center}.detail-empty>span{color:var(--violet);font-size:2rem}.detail-empty p{max-width:28ch}.detail-tags{display:flex;flex-wrap:wrap;gap:5px}.detail-tags span{padding:4px 6px;border:1px solid var(--wormhole-line);color:#8f859f;font-size:.58rem}.detail-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;margin:22px 0;background:var(--wormhole-line)}.detail-stats div{padding:10px;background:#0a0d13}.detail-stats dt{color:#666d78;font-size:.56rem;text-transform:uppercase;letter-spacing:.1em}.detail-stats dd{margin:5px 0 0;color:#cfc8dc;font-size:.7rem}.markdown-path{padding-top:16px;border-top:1px solid var(--wormhole-line);font-family:ui-monospace,monospace;word-break:break-all}
.knowledge-svg,.lineage-svg{width:100%;height:100%;min-height:560px;touch-action:none}.knowledge-edge line{stroke:rgba(185,156,255,.25);stroke-width:1}.knowledge-edge text{fill:#696273;font:8px ui-monospace,monospace;text-anchor:middle}.knowledge-node{cursor:pointer;transition:opacity .2s}.knowledge-node .knowledge-halo{fill:rgba(185,156,255,.025);stroke:rgba(185,156,255,.16)}.knowledge-node .knowledge-core{fill:#b99cff;stroke:#efe9ff;stroke-width:1.4;filter:drop-shadow(0 0 9px rgba(185,156,255,.6))}.knowledge-node.established .knowledge-core{fill:var(--cyan);stroke:#fff}.knowledge-node.frontier .knowledge-core{fill:#b99cff}.knowledge-node.proposal .knowledge-core{fill:transparent;stroke:#b88d5b;stroke-dasharray:3 3}.knowledge-node text{fill:#d3cce0;font:700 10px ui-monospace,monospace;text-anchor:middle}.knowledge-node .node-title{fill:#787181;font:8px "Segoe UI",sans-serif}.knowledge-node:hover .knowledge-halo,.knowledge-node:focus .knowledge-halo{stroke:var(--violet);fill:rgba(185,156,255,.08)}.knowledge-node.dimmed,.knowledge-edge.dimmed{opacity:.14}.graph-hint{position:absolute;left:14px;bottom:12px;color:#5e5a64;font-size:.6rem;letter-spacing:.08em}.graph-empty{min-height:300px;display:grid;place-content:center;justify-items:center;color:#686473}.graph-empty span{font-size:2.2rem;color:#807095}.graph-empty p{max-width:36ch;text-align:center;line-height:1.5}
.profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--wormhole-line)}.profile-grid div{display:grid;gap:4px;padding:9px;background:#0a0d13}.profile-grid span{color:#686e78;font-size:.56rem;text-transform:uppercase}.profile-grid strong{font:500 .72rem ui-monospace,monospace;color:#cbc4d7}.muted-copy{color:#6e747e!important}
.lineage-legend{display:flex;gap:18px;flex-wrap:wrap;margin-bottom:14px;color:#6e747e;font-size:.62rem;text-transform:uppercase;letter-spacing:.08em}.lineage-legend span::before{content:"";display:inline-block;width:7px;height:7px;margin-right:7px;border:1px solid currentColor}.lineage-legend .active{color:var(--violet)}.lineage-legend .dormant{color:#806f61}.lineage-legend .baseline{color:var(--cyan)}.lineage-edge path{fill:none;stroke:rgba(185,156,255,.26);stroke-width:1.2}.lineage-edge.lineage_crossover path{stroke:rgba(255,184,112,.45);stroke-dasharray:4 3}.lineage-edge text{fill:#625c69;font:8px ui-monospace,monospace;text-anchor:middle}.lineage-node{cursor:pointer}.lineage-node rect{fill:#0c1018;stroke:rgba(185,156,255,.35)}.lineage-node.dormant rect{stroke:#765f4c;stroke-dasharray:4 3}.lineage-node.baseline rect{stroke:rgba(191,247,255,.48)}.lineage-node text{fill:#7e7788;font:8px ui-monospace,monospace;text-anchor:middle}.lineage-node .lineage-id{fill:#d9d2e5;font-size:11px;font-weight:700}.lineage-node:hover rect{fill:rgba(185,156,255,.08);stroke:var(--violet)}
.experiment-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.experiment-card{display:grid;gap:16px;padding:22px;border:1px solid var(--wormhole-line);background:rgba(9,12,18,.76)}.experiment-card h4,.proposal-card h4,.directive-card h4{margin:0 0 8px;font-size:1.05rem;font-weight:450}.experiment-card p,.proposal-card p,.directive-card p{margin:0;color:#7e8590;line-height:1.55;font-size:.76rem}.experiment-meta{display:flex;gap:6px;flex-wrap:wrap}.experiment-meta span{padding:5px 7px;border:1px solid var(--wormhole-line);color:#81798e;font-size:.58rem;text-transform:uppercase}.card-actions{display:flex;gap:8px;margin-top:auto}.card-actions button,.lab-console button{min-height:36px;padding:0 12px;border:1px solid var(--wormhole-line);background:transparent;color:#afa6bf;cursor:pointer;font-size:.64rem;text-transform:uppercase;letter-spacing:.08em}.drawer-detail{position:fixed;z-index:12;top:0;right:0;width:min(430px,100%);height:100dvh;padding:36px;background:#0a0d13;border-left:1px solid rgba(185,156,255,.34);box-shadow:-30px 0 90px rgba(0,0,0,.45);overflow:auto}.drawer-close{float:right;width:36px;height:36px;border:1px solid var(--wormhole-line);background:transparent;color:#a49bac;cursor:pointer}
.proposal-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.proposal-card{position:relative;min-height:240px;padding:22px;border:1px solid var(--wormhole-line);background:rgba(9,12,18,.76);overflow:hidden}.proposal-risk{position:absolute;right:-23px;top:15px;width:100px;padding:5px;text-align:center;transform:rotate(40deg);background:rgba(185,156,255,.13);color:var(--violet-bright);font:700 .58rem ui-monospace,monospace}.proposal-card.risk-r2{border-color:rgba(255,188,112,.24)}.proposal-card.risk-r3{border-color:rgba(255,122,78,.28)}.proposal-card footer{position:absolute;left:22px;right:22px;bottom:18px;display:flex;gap:6px;flex-wrap:wrap;color:#8e685c;font-size:.6rem;text-transform:uppercase}.proposal-card footer i{padding-left:6px;border-left:1px solid var(--wormhole-line);font-style:normal;color:#6e6576}
.system-hero{display:flex;align-items:baseline;gap:18px;padding:24px;border:1px solid;background:rgba(9,12,18,.76)}.system-hero span{font:300 clamp(2.5rem,6vw,6rem)/1 ui-monospace,monospace;letter-spacing:.08em}.system-hero p{margin:0;color:#767d88}.system-hero.paused{border-color:rgba(255,122,78,.3);color:#ff9f7d}.system-hero.running{border-color:rgba(198,255,138,.3);color:var(--lime)}.system-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;margin-top:14px;background:var(--wormhole-line)}.system-card{display:grid;gap:8px;min-height:130px;padding:18px;background:#0a0d13}.system-card>span{color:#6b717c;font-size:.62rem;text-transform:uppercase;letter-spacing:.1em}.system-card strong{color:#d7d0e3;font:500 1.1rem ui-monospace,monospace}.system-card small{color:#625e68}.directive-card{margin-top:14px;padding:22px;border:1px solid var(--wormhole-line);background:rgba(9,12,18,.76)}.directive-card pre{max-height:280px;overflow:auto;padding:14px;background:#06080c;color:#8f879e;font-size:.68rem}
.research-control{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(280px,.7fr);gap:28px;margin-bottom:14px;padding:26px;border:1px solid rgba(185,156,255,.34);background:radial-gradient(circle at 0 0,rgba(185,156,255,.11),transparent 46%),#090c12}.research-control.ready{border-color:rgba(198,255,138,.4);box-shadow:0 0 44px rgba(198,255,138,.035)}.research-control-copy h4{margin:8px 0 10px;color:var(--violet-bright);font:400 clamp(1.8rem,4vw,3.5rem)/1.05 ui-monospace,monospace;letter-spacing:.035em}.research-control-copy>p:not(.eyebrow){max-width:58ch;margin:0;color:#a5a9b2;line-height:1.55}.research-request-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;margin:22px 0 0;background:var(--wormhole-line)}.research-request-meta div{padding:12px;background:#080b10}.research-request-meta dt{color:#777d88;font-size:.72rem;text-transform:uppercase;letter-spacing:.08em}.research-request-meta dd{margin:6px 0 0;color:#d4ccdf;font-size:.9rem}.research-control-action{display:grid;align-content:start;gap:10px}.research-control-action label{color:#9e95ab;font-size:.78rem;text-transform:uppercase;letter-spacing:.08em}.research-control-action label span{color:#666d77}.research-control-action textarea{min-height:88px;resize:vertical;padding:12px;border:1px solid var(--wormhole-line);background:#06080c;color:#ddd6e8;font:inherit;line-height:1.45}.research-control-action textarea:focus{outline:1px solid var(--violet)}.research-control-action textarea:disabled,.research-control-action button:disabled{cursor:not-allowed;opacity:.42}.research-control-action .text-button{justify-self:start}.research-confirmation{width:min(520px,calc(100vw - 30px));padding:0;border:1px solid rgba(185,156,255,.45);background:#090c12;color:#d9d2e3;box-shadow:0 30px 100px rgba(0,0,0,.7)}.research-confirmation::backdrop{background:rgba(1,2,4,.78);backdrop-filter:blur(4px)}.research-confirmation form{display:grid;gap:18px;padding:28px}.research-confirmation h4{margin:0;font-size:1.45rem;font-weight:450}.research-confirmation ul{display:grid;gap:8px;margin:0;padding-left:22px;color:#a7abb4;line-height:1.45}.research-confirmation form>div{display:flex;justify-content:flex-end;gap:10px}.wormhole-mode.failed{border-color:rgba(255,122,78,.5);color:#ff9f7d}
.lab-banner{display:flex;justify-content:space-between;gap:10px;padding:10px 14px;border:1px solid var(--wormhole-line);color:#988eaa;font:700 .6rem ui-monospace,monospace;letter-spacing:.1em}.lab-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;min-height:560px;border:1px solid var(--wormhole-line);border-top:0;background:#070a0f}.lab-board{position:relative;min-height:520px;background:radial-gradient(circle at 50% 50%,rgba(185,156,255,.06),transparent 50%)}.lab-board svg{position:absolute;inset:0;width:100%;height:100%}.lab-edge{stroke:rgba(184,219,229,.2);stroke-width:1.5}.lab-edge.closed{stroke:#7c5447;stroke-dasharray:4 5}.lab-node{cursor:default}.lab-node circle{fill:#0d141b;stroke:#6d747d;stroke-width:1.5}.lab-node text{fill:#79818b;font:11px ui-monospace,monospace;text-anchor:middle}.lab-node.legal{cursor:pointer}.lab-node.legal circle{stroke:var(--violet);filter:drop-shadow(0 0 7px rgba(185,156,255,.4))}.lab-node.goal circle{stroke:var(--lime)}.lab-bug path{fill:rgba(255,122,78,.12);stroke:var(--amber);stroke-width:2}.lab-bug text{fill:#bd765e;font:8px ui-monospace,monospace;text-anchor:middle}.lab-player circle:first-child{fill:var(--cyan);stroke:#fff}.lab-player circle:last-child{fill:none;stroke:rgba(191,247,255,.45);stroke-dasharray:3 4}.lab-console{padding:22px;border-left:1px solid var(--wormhole-line);overflow:auto}.lab-console dl{display:grid;grid-template-columns:70px 1fr;gap:8px;color:#7f8692;font-size:.72rem}.lab-console dd{margin:0;color:#ccc5d8}.lab-console ol{padding-left:20px;color:#777e89;font-size:.68rem;line-height:1.6}

.research-control>.research-request-meta{grid-column:1;margin:0}

/* Research comprehension layer */
.cycle-context{margin-bottom:22px;padding:24px;border:1px solid rgba(185,156,255,.28);background:linear-gradient(135deg,rgba(185,156,255,.075),rgba(8,11,15,.62) 52%)}
.cycle-context-heading{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.cycle-context h4,.baseline-band h4{margin:0;font-size:1.35rem;font-weight:450}.cycle-allocation,.baseline-notes{display:flex;gap:7px;flex-wrap:wrap}.cycle-allocation span,.baseline-notes span{padding:7px 9px;border:1px solid var(--wormhole-line);color:#aaa1bb;font-size:.78rem}.cycle-questions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;margin-top:20px;background:var(--wormhole-line)}.cycle-questions article{padding:16px;background:#0a0d13}.cycle-questions span{color:#887e99;font-size:.78rem;text-transform:uppercase;letter-spacing:.08em}.cycle-questions p{margin:9px 0 0;color:#c7c1d1;font-size:.95rem;line-height:1.55}
.baseline-band{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:22px;margin-bottom:22px;padding:24px;border:1px solid rgba(191,247,255,.28);background:linear-gradient(90deg,rgba(191,247,255,.06),rgba(8,11,15,.5))}.baseline-marker{display:grid;place-items:center;width:66px;height:66px;border:1px solid rgba(191,247,255,.5);border-radius:50%;color:var(--cyan);font:500 1rem ui-monospace,monospace;box-shadow:0 0 30px rgba(191,247,255,.08)}.baseline-band p{margin:8px 0 13px;color:#98a5ad;line-height:1.55}.baseline-band>button,.file-primary,.glossary-intro button{min-height:42px;padding:0 14px;border:1px solid rgba(191,247,255,.26);background:transparent;color:var(--cyan);cursor:pointer}
.experiment-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.experiment-card{gap:20px;padding:24px;border-color:rgba(185,156,255,.24);background:linear-gradient(150deg,rgba(18,21,31,.94),rgba(8,11,16,.92))}.experiment-card.exploratory{border-color:rgba(255,184,112,.35);background:linear-gradient(150deg,rgba(35,24,22,.52),rgba(8,11,16,.94))}.experiment-card h4{margin-top:13px;font-size:1.35rem}.experiment-card h5,.metric-comparison h5{margin:0 0 8px;color:#8f879c;font-size:.78rem;text-transform:uppercase;letter-spacing:.11em}.experiment-card p{font-size:.96rem;line-height:1.62;color:#a5aab4}.experiment-card .card-question{color:#ddd7e7;font-size:1.03rem}.experiment-meta span{font-size:.72rem}.experiment-meta .research-track{color:var(--violet-bright);border-color:rgba(185,156,255,.4)}.exploratory .experiment-meta .research-track{color:#ffc987;border-color:rgba(255,184,112,.45)}.card-change{padding:15px 16px;border-left:2px solid var(--violet);background:rgba(185,156,255,.05)}.card-result{padding-top:16px;border-top:1px solid var(--wormhole-line)}
.metric-comparison{margin-top:4px}.metric-comparison>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--wormhole-line)}.metric-comparison article{display:grid;gap:10px;padding:14px;background:#090c12}.metric-comparison article>span{min-height:31px}.metric-comparison strong{display:flex;align-items:center;gap:9px;color:#dcd5e8;font:500 .95rem ui-monospace,monospace}.metric-comparison strong i{font-style:normal}.metric-comparison strong i:first-child{color:#77717f}.metric-comparison strong b{color:var(--violet);font-weight:400}.metric-comparison.compact article{padding:11px}.metric-comparison.compact .term-link{font-size:.78rem}
.term-link{display:inline-flex;align-items:center;gap:7px;padding:0;border:0;background:transparent;color:#d0c7e1;cursor:pointer;text-align:left;font-weight:600;text-decoration:underline;text-decoration-color:rgba(185,156,255,.36);text-underline-offset:3px}.term-link>span{display:inline-grid;place-items:center;width:18px;height:18px;flex:none;border:1px solid rgba(185,156,255,.45);border-radius:50%;font:700 .65rem ui-monospace,monospace;color:var(--violet-bright)}
.card-impact{display:grid;gap:8px}.card-impact>button,.discovery-impact>button{display:grid;grid-template-columns:auto auto 1fr;gap:8px;align-items:center;width:100%;padding:12px;border:1px solid rgba(198,255,138,.22);background:rgba(198,255,138,.035);color:#aeb99f;cursor:pointer;text-align:left}.card-impact button span,.discovery-impact button span{font-size:.75rem;text-transform:uppercase;letter-spacing:.08em}.card-impact button strong,.discovery-impact button strong{color:var(--lime)}.card-impact button em,.discovery-impact button em{color:#8d9685;font-style:normal}.no-impact{color:#727985}.lineage-preview{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:12px 0;border-top:1px solid var(--wormhole-line);border-bottom:1px solid var(--wormhole-line);color:#7f7789;font-size:.85rem}.lineage-preview button{padding:0;border:0;background:transparent;color:var(--cyan);cursor:pointer}.lineage-preview strong{color:#d6cfdf}.card-actions button{font-size:.75rem}.card-actions button:first-child{color:var(--violet-bright);border-color:rgba(185,156,255,.4)}
.experiment-drawer{width:min(860px,100%);padding:34px 38px 60px;background:radial-gradient(circle at 100% 0,rgba(185,156,255,.08),transparent 32%),#090c12}.experiment-drawer>h4{max-width:78%;font-size:1.8rem;line-height:1.25}.inspect-tabs{position:sticky;z-index:2;top:-34px;display:flex;gap:0;margin:24px -38px 0;padding:12px 38px 0;border-bottom:1px solid var(--wormhole-line);background:rgba(9,12,18,.96);backdrop-filter:blur(16px)}.inspect-tabs button{min-height:44px;padding:0 15px;border:0;border-bottom:2px solid transparent;background:transparent;color:#777d88;cursor:pointer}.inspect-tabs button.active{color:var(--violet-bright);border-bottom-color:var(--violet)}.inspect-content{display:grid;gap:0}.research-section{padding:25px 0;border-bottom:1px solid var(--wormhole-line)}.research-section>h5,.term-drawer h4,.artifact-reader h4{margin:0 0 12px;color:#9a91aa;font-size:.78rem;text-transform:uppercase;letter-spacing:.12em}.research-section>p,.research-section>ul,.research-section>ol{margin:0;color:#aeb1ba;font-size:1rem;line-height:1.68}.research-section .highlight-copy,.research-section.learning>p{color:#e1d9ec;font-size:1.08rem}.research-section.learning{padding-left:20px;border-left:2px solid var(--violet);background:linear-gradient(90deg,rgba(185,156,255,.055),transparent)}.section-note{margin-top:12px!important;color:#777e89!important;font-size:.88rem!important}.overview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:var(--wormhole-line)}.overview-grid div{padding:12px;background:#080b10}.overview-grid dt,.playtest-stats dt{color:#6f7480;font-size:.75rem;text-transform:uppercase;letter-spacing:.08em}.overview-grid dd,.playtest-stats dd{margin:5px 0 0;color:#d0cad8;font-size:.92rem}.playtest-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;margin:16px 0 0;background:var(--wormhole-line)}.playtest-stats div{padding:12px;background:#080b10}.lineage-stack button{display:grid;justify-items:center;width:100%;gap:8px;padding:16px;border:1px solid var(--wormhole-line);background:rgba(8,11,16,.7);color:#cfc8da;cursor:pointer}.lineage-stack button i{color:#8c819d;font-style:normal}.linked-list{display:grid;gap:7px;padding:0!important;list-style:none}.linked-list button,.record-links button{width:100%;padding:11px;border:1px solid var(--wormhole-line);background:transparent;color:#b9b1c8;cursor:pointer;text-align:left}.linked-list button b,.linked-list button span{display:block}.linked-list button span{margin-top:4px;color:#797f89;font-weight:400}.technical-disclosure{margin-top:14px;border:1px solid var(--wormhole-line);background:#07090e}.technical-disclosure>summary,.structured-group>summary,.raw-json>summary{padding:12px;color:#8f879c;cursor:pointer}.technical-disclosure>p,.technical-disclosure>.structured-object{margin:0;padding:0 14px 14px}.structured-object{display:grid;gap:1px;background:var(--wormhole-line)}.structured-object>div{display:grid;grid-template-columns:minmax(130px,.45fr) 1fr;gap:14px;padding:10px 12px;background:#070a0f}.structured-object dt{color:#737884;font-size:.8rem}.structured-object dd{margin:0;color:#b7b1c1;font-size:.88rem;min-width:0;overflow-wrap:anywhere}.structured-list{margin:0;padding-left:20px}.structured-list li{margin:5px 0}.structured-empty{color:#666d77;font-style:italic}.technical-record .structured-object{max-height:540px;overflow:auto}
.file-list{display:grid;gap:8px;margin-top:18px}.file-list button{display:grid;grid-template-columns:46px 1fr;gap:4px 13px;padding:14px;border:1px solid var(--wormhole-line);background:#080b10;color:#bdb6c8;cursor:pointer;text-align:left}.file-list button>span{grid-row:1/3;display:grid;place-items:center;border:1px solid rgba(185,156,255,.28);color:var(--violet);font:700 .72rem ui-monospace,monospace}.file-list button strong{font-size:.95rem}.file-list button small{color:#6d727d;overflow-wrap:anywhere}.baseline-explainer{margin-top:24px;padding:22px;border:1px solid rgba(191,247,255,.25);background:rgba(191,247,255,.04)}.baseline-explainer>span{color:var(--cyan);font:500 2rem ui-monospace,monospace}.baseline-explainer h5{font-size:1.15rem}.baseline-explainer p{color:#99a5ad;line-height:1.6}
.discovery-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:14px}.discovery-summary{display:grid;gap:7px;padding:16px;border:1px solid var(--wormhole-line);background:rgba(8,11,16,.75);color:#bfb7ca;cursor:pointer;text-align:left}.discovery-summary.active{border-color:rgba(185,156,255,.58);background:rgba(185,156,255,.08)}.discovery-summary span{color:#847b91;font-size:.76rem;text-transform:uppercase}.discovery-summary strong{font-size:1rem}.discovery-summary em,.plain-interpretation{color:#9ca0aa;font-style:italic;line-height:1.55}.graph-detail .plain-interpretation{font-size:1rem;color:#d4cde0}.graph-detail .research-section>p,.graph-detail .research-section li{font-size:.94rem}.graph-detail .file-primary{width:100%;margin-top:18px}.term-relations,.record-links{display:flex;gap:7px;flex-wrap:wrap}.term-relations .term-link,.record-links button{width:auto;padding:8px 10px;border:1px solid var(--wormhole-line);text-decoration:none}.record-links button{font-size:.82rem}
.research-overlay{position:fixed;z-index:30;inset:0;display:grid;grid-template-columns:1fr auto}.research-scrim{grid-column:1/3;grid-row:1;background:rgba(1,2,4,.76);backdrop-filter:blur(4px)}.term-drawer{position:relative;grid-column:2;grid-row:1;width:min(480px,100vw);height:100dvh;padding:38px;background:#090c12;border-left:1px solid rgba(185,156,255,.38);overflow:auto}.term-drawer h3{margin:12px 0 18px;font-size:1.8rem}.term-drawer p{color:#a5aab3;font-size:1rem;line-height:1.65}.term-drawer .term-short{color:#e0d9ec;font-size:1.1rem}.term-drawer section{padding:18px 0;border-top:1px solid var(--wormhole-line)}.text-link{padding:0;border:0;background:transparent;color:var(--violet-bright);cursor:pointer;font-size:.92rem}.artifact-reader{position:relative;grid-column:1/3;grid-row:1;justify-self:center;align-self:center;width:min(1080px,calc(100vw - 40px));height:min(88dvh,920px);padding:30px;background:#090c12;border:1px solid rgba(185,156,255,.35);overflow:auto}.artifact-reader>header{position:sticky;z-index:2;top:-30px;display:flex;justify-content:space-between;gap:20px;padding:20px 0;border-bottom:1px solid var(--wormhole-line);background:#090c12}.artifact-reader h3{margin:0 0 5px;font-size:1.55rem}.artifact-reader header small{color:#6e747e;overflow-wrap:anywhere}.artifact-loading{padding:40px;color:#8f879c}.markdown-reader{max-width:820px;margin:24px auto;color:#b9bdc5;font-size:1rem;line-height:1.72}.markdown-reader h2,.markdown-reader h3,.markdown-reader h4{margin:34px 0 12px;color:#e4ddee;font-weight:450}.markdown-reader h2{font-size:1.8rem}.markdown-reader h3{font-size:1.4rem}.markdown-reader p{margin:12px 0}.markdown-reader code{padding:2px 5px;background:#05070a;color:#d9cdf2}.markdown-reader pre,.raw-json pre{padding:16px;background:#05070a;overflow:auto;color:#aaa2b8;font-size:.82rem}.markdown-reader blockquote{margin:16px 0;padding:10px 18px;border-left:2px solid var(--violet);color:#d7d0e3}.json-reader{display:grid;gap:18px;padding-top:20px}.raw-json{border:1px solid var(--wormhole-line)}.raw-json pre{margin:0;max-height:560px}
.glossary-intro{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px;padding:20px;border:1px solid var(--wormhole-line);background:rgba(185,156,255,.04)}.glossary-intro p{margin:0;max-width:72ch;color:#9da1aa;font-size:1rem;line-height:1.6}.glossary-search{display:flex;align-items:center;gap:12px;margin-bottom:14px;color:#81798e;font-size:.82rem;text-transform:uppercase}.glossary-search input{flex:1;max-width:540px;height:44px;padding:0 13px;border:1px solid var(--wormhole-line);background:#080b10;color:#ddd6e8}.glossary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.glossary-card{padding:0 18px;border:1px solid var(--wormhole-line);background:rgba(8,11,16,.78)}.glossary-card[open]{border-color:rgba(185,156,255,.42)}.glossary-card summary{display:flex;justify-content:space-between;gap:16px;padding:18px 0;cursor:pointer;color:#d8d1e3;font-size:1.05rem}.glossary-card summary i{color:var(--violet);font-style:normal}.glossary-card .term-short{margin:0 0 18px;color:#a7abb4;font-size:.98rem;line-height:1.6}.glossary-depth{padding:18px 0;border-top:1px solid var(--wormhole-line)}.glossary-depth h5{margin:20px 0 7px;color:#82798f;font-size:.76rem;text-transform:uppercase}.glossary-depth p{margin:0;color:#9ca1aa;line-height:1.55}

@media (max-width: 800px) {
  .view { padding: 22px; }
  .home-stage { grid-template-columns: 1fr; padding-top: 28px; }
  .network-mark { min-height: 250px; }
  .home-actions { margin-top: -8px; }
  .level-grid { grid-template-columns: 1fr 1fr; }
  .level-card { min-height: 180px; }.level-card h3 { margin-top: 52px; }
  .game-view { padding: 10px; }.game-header { gap: 10px; grid-template-columns: auto 1fr auto; }.game-meta { display:none; }.objective-status { grid-column: 1 / 4; grid-row: 2; justify-content: flex-end; }.game-header .text-button { grid-column: 3; grid-row: 1; padding: 0 12px; }.board-legend { display:none; }.network-event { max-width: calc(100% - 32px); top: 12px; }
  .wormhole-topbar{grid-template-columns:auto 1fr auto}.wormhole-topbar #wormhole-signout{grid-column:3}.wormhole-mode{display:none}.wormhole-gate{grid-template-columns:1fr}.gate-orbit{display:none}.wormhole-shell{grid-template-columns:1fr}.wormhole-rail{display:flex;overflow-x:auto;padding:8px 0;border-right:0;border-bottom:1px solid var(--wormhole-line)}.rail-action{min-width:max-content;width:auto;border-left:0;border-bottom:2px solid transparent;padding:0 12px}.rail-action.active{border-left:0;border-bottom-color:var(--violet)}.wormhole-panel{padding:26px 0}.panel-header{grid-template-columns:1fr}.universe-layout{grid-template-columns:1fr}.graph-detail{border-left:0;border-top:1px solid var(--wormhole-line);min-height:280px}.experiment-list{grid-template-columns:1fr}.proposal-grid{grid-template-columns:1fr 1fr}.system-grid{grid-template-columns:1fr 1fr}.research-control{grid-template-columns:1fr}.lab-layout{grid-template-columns:1fr}.lab-console{border-left:0;border-top:1px solid var(--wormhole-line)}
  .cycle-context-heading,.glossary-intro{display:grid}.cycle-questions{grid-template-columns:1fr}.baseline-band{grid-template-columns:auto 1fr}.baseline-band>button{grid-column:1/3}.discovery-list,.glossary-grid{grid-template-columns:1fr}.overview-grid{grid-template-columns:1fr 1fr}.experiment-drawer{width:100%;padding:24px 22px 50px}.inspect-tabs{top:-24px;margin:20px -22px 0;padding-left:22px;padding-right:22px;overflow-x:auto}.artifact-reader{width:100vw;height:100dvh;border:0;padding:22px}.artifact-reader>header{top:-22px}.research-overlay{grid-template-columns:1fr}.term-drawer{grid-column:1;width:100vw}.metric-comparison>div{grid-template-columns:1fr 1fr}
}
@media (max-width: 520px) {
  .home-header .build-mark { display: none; }.brand-lockup h1 { font-size: 3.3rem; }
  .network-mark { min-height: 210px; }.home-footer { display: none; }
  .menu-action { min-height: 68px; }.level-grid { grid-template-columns: 1fr; margin-top: 28px; }.level-card { min-height: 220px; }.level-open { padding: 20px; }.level-card h3 { margin-top: 58px; font-size: 1.12rem; }.level-card-status { top: 20px; right: 20px; }.level-stats { left: 20px; bottom: 18px; }.level-topology { top: 44px; right: 10px; opacity: .18; }
  .topbar-meta { display: none; }.game-header h2 { font-size: 1rem; }.game-header .eyebrow { font-size: .58rem; }
  .tutorial-prompt { bottom: 14px; width: max-content; max-width: calc(100% - 24px); text-align: center; }.objective-status .status-caption { display: none; }.objective-status span { font-size: .54rem; padding: 5px 7px; }.objective-status .exit-chip { margin-left: 0; }
  .dialog { padding: 24px; }.dialog-actions { flex-wrap: wrap; }.dialog-actions button { min-width: 42%; }
  .wormhole-view{padding:10px}.wormhole-lockup .eyebrow{display:none}.wormhole-lockup h2{font-size:1rem}.wormhole-topbar{gap:8px}.wormhole-panel{padding-top:20px}.panel-header h3{font-size:2.2rem}.constellation-controls{align-items:stretch;flex-wrap:wrap}.graph-search{width:100%;margin-left:0}.graph-search input{width:100%;flex:1}.universe-layout{min-height:480px}.knowledge-svg,.lineage-svg{min-height:360px}.proposal-grid,.system-grid{grid-template-columns:1fr}.system-hero{display:grid}.research-control{padding:19px;gap:22px}.research-request-meta{grid-template-columns:1fr}.research-confirmation form{padding:22px}.research-confirmation form>div{display:grid}.detail-stats{grid-template-columns:1fr}.lab-banner{display:grid}.lab-board{min-height:400px}
  .baseline-band{grid-template-columns:1fr}.baseline-marker{width:52px;height:52px}.baseline-band>button{grid-column:auto}.experiment-card{padding:18px}.metric-comparison>div,.overview-grid,.playtest-stats{grid-template-columns:1fr}.card-impact>button,.discovery-impact>button{grid-template-columns:1fr}.experiment-drawer>h4{max-width:calc(100% - 52px)}.inspect-tabs button{min-width:max-content}.structured-object>div{grid-template-columns:1fr}.artifact-reader h3{font-size:1.15rem}.artifact-reader>header{align-items:flex-start}.glossary-search{display:grid}.glossary-search input{max-width:none;width:100%}
}
@media (max-width: 520px) and (max-height: 650px) {
  .home-view { padding: 14px 20px; overflow: hidden; }
  .brand-lockup h1 { font-size: 2.75rem; }.brand-lockup .eyebrow { margin-bottom: 5px; font-size: .62rem; }
  .home-stage { gap: 2px; padding: 4px 0; }
  .network-mark { min-height: 145px; height: 145px; }
  .home-actions { margin-top: 0; }.menu-action { min-height: 58px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
