/* BAXSET AI — The Neural Heart of BAXSET
   Paleta de la guía de marca (Tech Purple, Intensive Purple) con acentos neón cian y violeta eléctrico. */
:root {
  --tech: #0e052e;
  --void: #05010f;
  --lilac: #c8b2ff;
  --violet: #a855f7;
  --cyan: #22e5ff;
  --cyan-soft: rgba(34, 229, 255, .55);
  --grey: #9199a0;
  --muted: #564a7e;
  --text: #ece6ff;
  --glass: rgba(20, 8, 58, .42);
  --line: rgba(200, 178, 255, .22);
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--cyan); color: var(--tech); }
a { color: var(--lilac); }
button { font: inherit; color: inherit; cursor: pointer; }

#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; }
.vignette { position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(3, 0, 12, .55) 80%, rgba(3, 0, 12, .9) 100%); }
.scanlines { position: fixed; inset: 0; pointer-events: none; z-index: 2; opacity: .06; mix-blend-mode: overlay;
  background: repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 3px); }
.circuit-overlay { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; overflow: visible; }
.circuit-overlay path { fill: none; stroke: var(--cyan); stroke-width: 1.2; filter: drop-shadow(0 0 4px var(--cyan)); }
.circuit-overlay .base { stroke: rgba(200, 178, 255, .16); filter: none; }
.circuit-overlay .pulse { stroke-width: 2.2; stroke-linecap: round; }
.circuit-overlay circle { fill: var(--tech); stroke: var(--cyan); stroke-width: 1.2; }

.track { height: 900vh; }
main { position: relative; z-index: 5; }

/* Arranque */
.boot { position: fixed; inset: 0; z-index: 100; background: var(--void); display: grid; place-content: center; gap: 28px; justify-items: center;
  transition: opacity .9s var(--ease), visibility .9s; }
body:not(.is-loading) .boot { opacity: 0; visibility: hidden; }
.boot__ring { position: relative; width: 92px; height: 92px; }
.boot__ring span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid transparent; border-top-color: var(--cyan); animation: spin 1.1s linear infinite; }
.boot__ring span:nth-child(2) { inset: 12px; border-top-color: var(--violet); animation-duration: 1.6s; animation-direction: reverse; }
.boot__ring span:nth-child(3) { inset: 26px; border-top-color: var(--lilac); animation-duration: .8s; }
.boot__log { font: 12px/1.7 var(--mono); color: var(--cyan); min-width: 320px; min-height: 7em; margin: 0; text-shadow: 0 0 8px var(--cyan-soft); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Barra superior */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; align-items: center; gap: 24px;
  padding: 18px clamp(16px, 3vw, 40px); background: linear-gradient(180deg, rgba(5, 1, 15, .85), rgba(5, 1, 15, 0)); }
.brand img { display: block; height: 28px; width: auto; filter: drop-shadow(0 0 10px rgba(200, 178, 255, .35)); }
.chapters { display: flex; gap: 4px; margin: 0 auto; }
.chapters button { background: none; border: 0; padding: 8px 12px; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--grey); border-radius: 999px; transition: color .3s, background .3s; }
.chapters button:hover { color: var(--text); }
.chapters button.is-active { color: var(--tech); background: var(--lilac); box-shadow: 0 0 18px rgba(200, 178, 255, .5); }

/* Botón de acceso con glitch sutil */
.access-btn { position: relative; border: 1px solid var(--cyan); background: rgba(34, 229, 255, .06); color: var(--cyan);
  font: 700 13px var(--mono); letter-spacing: .12em; padding: 14px 22px; border-radius: 2px; white-space: nowrap;
  text-shadow: 0 0 8px var(--cyan-soft); box-shadow: 0 0 0 1px rgba(34, 229, 255, .15), 0 0 24px rgba(34, 229, 255, .25), inset 0 0 18px rgba(34, 229, 255, .12);
  transition: background .3s, color .3s, box-shadow .3s; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.access-btn:hover, .access-btn:focus-visible { background: var(--cyan); color: var(--tech); text-shadow: none; outline: none;
  box-shadow: 0 0 40px rgba(34, 229, 255, .7), 0 0 90px rgba(168, 85, 247, .45); }
.access-btn--small { font-size: 11px; padding: 10px 14px; letter-spacing: .08em; }
.access-btn--block { width: 100%; margin-top: 8px; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; }
.glitch::before { color: #ff2bd6; animation: glitch-a 5.5s infinite steps(1); }
.glitch::after { color: var(--lilac); animation: glitch-b 5.5s infinite steps(1); }
@keyframes glitch-a {
  0%, 91%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); }
  92% { opacity: .8; transform: translate(-2px, 0); clip-path: inset(10% 0 60% 0); }
  94% { opacity: .8; transform: translate(2px, 0); clip-path: inset(55% 0 20% 0); }
  96% { opacity: .6; transform: translate(-1px, 0); clip-path: inset(30% 0 45% 0); }
}
@keyframes glitch-b {
  0%, 92%, 100% { opacity: 0; transform: none; }
  93% { opacity: .7; transform: translate(2px, 1px); clip-path: inset(70% 0 5% 0); }
  95% { opacity: .7; transform: translate(-2px, -1px); clip-path: inset(5% 0 75% 0); }
}

/* HUD */
.hud { position: fixed; z-index: 30; font: 500 11px var(--mono); letter-spacing: .14em; color: rgba(200, 178, 255, .6); pointer-events: none; }
.hud--tl { top: 84px; left: clamp(16px, 3vw, 40px); }
.hud--tr { top: 84px; right: clamp(16px, 3vw, 40px); }
.hud span { color: var(--cyan); }
.rail { position: fixed; right: clamp(10px, 1.6vw, 24px); top: 50%; z-index: 30; width: 2px; height: 42vh; transform: translateY(-50%); background: rgba(200, 178, 255, .14); }
.rail__fill { position: absolute; left: 0; top: 0; width: 100%; height: 0; background: linear-gradient(var(--violet), var(--cyan)); box-shadow: 0 0 12px var(--cyan); }
.rail__marks i { position: absolute; left: -3px; width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--lilac); background: var(--void); transform: translateY(-50%); transition: background .3s, box-shadow .3s; }
.rail__marks i.on { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

/* Capas de contenido: fijas, aparecen según el scroll (main.js fija --a de 0 a 1) */
.layer { position: fixed; z-index: 20; --a: 0; --d: 0; opacity: var(--a); visibility: hidden; pointer-events: none;
  transform: translate3d(0, calc((1 - var(--a)) * 40px * var(--d)), 0); will-change: opacity, transform; }
.layer.is-visible { visibility: visible; }
.layer.is-live { pointer-events: auto; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; font: 600 12px var(--mono); letter-spacing: .32em; text-transform: uppercase; color: var(--cyan); text-shadow: 0 0 10px var(--cyan-soft); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }

.hero::before { content: ''; position: absolute; inset: -120px -160px -80px -200px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 35% 55%, rgba(5, 1, 15, .78), rgba(5, 1, 15, .45) 45%, transparent 72%); }
.hero { left: clamp(16px, 6vw, 96px); bottom: clamp(90px, 14vh, 150px); max-width: min(760px, 92vw); }
.hero__title { margin: 0; font-weight: 800; font-size: clamp(34px, 5.6vw, 82px); line-height: .98; letter-spacing: -.035em; }
.hero__title .line { display: block; background: linear-gradient(100deg, #fff 30%, var(--lilac) 70%, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px rgba(168, 85, 247, .35)); }
.hero__title em { font-style: normal; background: linear-gradient(90deg, var(--cyan), var(--lilac)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { margin: 22px 0 0; max-width: 560px; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.6; color: rgba(236, 230, 255, .78); }
.hero__scroll { margin-top: 36px; display: flex; align-items: center; gap: 14px; font: 500 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--grey); }
.hero__scroll i { width: 22px; height: 36px; border: 1px solid var(--line); border-radius: 12px; position: relative; }
.hero__scroll i::after { content: ''; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--cyan); animation: wheel 1.8s infinite var(--ease); }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* Tarjetas holográficas */
.value { left: clamp(16px, 6vw, 96px); top: 50%; margin-top: -230px; width: min(500px, 92vw); perspective: 1200px; }
.holo-card { position: relative; padding: 30px 30px 26px; border-radius: 4px 22px 4px 22px; background: var(--glass);
  border: 1px solid var(--line); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px rgba(34, 229, 255, .05);
  transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease); overflow: hidden; }
.holo-card::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--spin, 0deg), transparent 0 60%, var(--cyan) 72%, var(--violet) 82%, transparent 90%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: rim 6s linear infinite; }
@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes rim { to { --spin: 360deg; } }
.holo-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, rgba(34, 229, 255, .05) 0 1px, transparent 1px 4px); animation: scan 8s linear infinite; }
@keyframes scan { to { background-position: 0 200px; } }
.holo-card__glare { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(200, 178, 255, .22), transparent 45%); }
.holo-card:hover .holo-card__glare { opacity: 1; }
.holo-card > * { transform: translateZ(30px); }
.holo-card header { display: flex; justify-content: space-between; font: 600 11px var(--mono); letter-spacing: .2em; color: var(--grey); }
.holo-card .tag { color: var(--cyan); }
.holo-card h2 { margin: 18px 0 12px; font-size: clamp(24px, 2.3vw, 32px); line-height: 1.12; letter-spacing: -.02em; font-weight: 700; }
.holo-card p { margin: 0; color: rgba(236, 230, 255, .75); line-height: 1.6; font-size: 15px; }
.metrics { list-style: none; padding: 0; margin: 24px 0 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metrics li { border-left: 1px solid var(--line); padding-left: 12px; }
.metrics b { display: block; font: 700 26px var(--mono); color: #fff; text-shadow: 0 0 14px rgba(34, 229, 255, .6); letter-spacing: -.02em; }
.metrics span { display: block; margin-top: 4px; font-size: 11.5px; line-height: 1.35; color: var(--grey); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 46px; }
.bars i { flex: 1; height: calc(var(--v) * 100% * var(--a, 1)); background: linear-gradient(var(--cyan), rgba(168, 85, 247, .2)); box-shadow: 0 0 10px rgba(34, 229, 255, .4); border-radius: 2px 2px 0 0; transition: height .1s; }
.spark { width: 100%; height: 56px; overflow: visible; }
.spark path { fill: none; stroke: var(--cyan); stroke-width: 2; filter: drop-shadow(0 0 6px var(--cyan)); stroke-dasharray: 520; stroke-dashoffset: calc(520 * (1 - var(--a))); }
.tiers { display: flex; align-items: flex-end; gap: 10px; height: 60px; }
.tiers span { flex: 1; height: calc(var(--h) * 100% * var(--a, 1)); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; font: 600 10px var(--mono); color: var(--tech);
  background: linear-gradient(var(--lilac), var(--violet)); border-radius: 2px; box-shadow: 0 0 14px rgba(168, 85, 247, .5); }
.chain { list-style: none; padding: 0; margin: 0; display: flex; align-items: center; justify-content: space-between; font: 700 11px var(--mono); color: var(--cyan); }
.chain li { position: relative; padding: 8px 10px; border: 1px solid rgba(34, 229, 255, .45); border-radius: 2px; background: rgba(34, 229, 255, .06); }
.chain li + li::before { content: ''; position: absolute; right: 100%; top: 50%; width: calc((100% + 12px) * .35); height: 1px; background: var(--cyan); }

/* Etiquetas de nodos */
.node-labels { position: fixed; inset: 0; z-index: 15; pointer-events: none; }
.node-label { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); font: 600 12px var(--font); white-space: nowrap; color: #fff;
  padding: 7px 12px 7px 10px; border: 1px solid rgba(34, 229, 255, .45); background: rgba(5, 1, 15, .6); border-radius: 2px; backdrop-filter: blur(6px);
  opacity: var(--o, 0); box-shadow: 0 0 22px rgba(34, 229, 255, .15); }
.node-label b { font: 700 10px var(--mono); color: var(--cyan); margin-right: 8px; }
.node-label small { display: block; margin-top: 2px; font: 500 10px var(--mono); letter-spacing: .1em; color: var(--grey); }
.node-label small i { font-style: normal; color: var(--lilac); }
.node-label::after { content: ''; position: absolute; left: 50%; top: 100%; width: 1px; height: 26px; background: linear-gradient(var(--cyan), transparent); }
.node-label.is-focus { border-color: var(--lilac); box-shadow: 0 0 30px rgba(200, 178, 255, .4); }

/* Simulador */
.sim { left: 50%; top: 50%; width: min(1180px, 94vw); transform: translate3d(-50%, calc(-50% + (1 - var(--a)) * 40px), 0); }
.sim__head { position: relative; text-align: center; margin-bottom: 22px; }
.sim__head::before, .final::before { content: ''; position: absolute; inset: -60px -10%; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at center, rgba(5, 1, 15, .82), rgba(5, 1, 15, .5) 50%, transparent 75%); }
.final::before { inset: -80px -20%; }
.sim__head h2 { margin: 0; font-size: clamp(28px, 3.4vw, 48px); letter-spacing: -.03em; }
.sim__head p:last-child { margin: 8px 0 0; color: var(--grey); }
.sim__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.chart { position: relative; border: 1px solid var(--line); background: rgba(8, 3, 26, .84); backdrop-filter: blur(14px); border-radius: 4px 16px 4px 16px; padding: 16px 16px 10px; overflow: hidden; }
.chart header { display: flex; justify-content: space-between; align-items: baseline; font: 600 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--grey); }
.chart header b { font: 700 22px var(--mono); letter-spacing: -.02em; color: #fff; text-transform: none; text-shadow: 0 0 12px currentColor; }
.chart[data-chart="stability"] header b { color: var(--cyan); }
.chart[data-chart="latency"] header b { color: var(--lilac); }
.chart[data-chart="volume"] header b { color: #ff7ae6; }
.chart canvas { display: block; width: 100%; height: 170px; margin-top: 10px; }
.chart.is-alert { border-color: rgba(255, 90, 120, .7); box-shadow: 0 0 30px rgba(255, 60, 100, .25); }
.sim__controls { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 16px; align-items: end;
  border: 1px solid var(--line); background: rgba(8, 3, 26, .84); backdrop-filter: blur(14px); padding: 14px 18px; border-radius: 4px; }
.ctrl span { display: flex; justify-content: space-between; font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--grey); margin-bottom: 8px; }
.ctrl output { color: var(--cyan); }
.ctrl input[type=range] { width: 100%; -webkit-appearance: none; appearance: none; height: 2px; background: linear-gradient(90deg, var(--cyan) var(--p, 40%), rgba(200, 178, 255, .2) var(--p, 40%)); outline: none; }
.ctrl input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 2px; transform: rotate(45deg); background: var(--tech); border: 2px solid var(--cyan); box-shadow: 0 0 12px var(--cyan); cursor: pointer; }
.ctrl input[type=range]::-moz-range-thumb { width: 14px; height: 14px; background: var(--tech); border: 2px solid var(--cyan); box-shadow: 0 0 12px var(--cyan); cursor: pointer; }
.ctrl-btn { border: 1px solid rgba(200, 178, 255, .5); background: rgba(200, 178, 255, .08); color: var(--lilac); padding: 11px 16px; font: 700 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; border-radius: 2px; transition: all .25s; }
.ctrl-btn:hover { background: var(--lilac); color: var(--tech); box-shadow: 0 0 24px rgba(200, 178, 255, .6); }
.ctrl-btn--warn { border-color: rgba(255, 110, 140, .6); color: #ff8ca6; background: rgba(255, 90, 120, .08); }
.ctrl-btn--warn:hover { background: #ff8ca6; color: var(--tech); box-shadow: 0 0 24px rgba(255, 90, 120, .6); }

/* Final */
.final { left: 50%; top: 50%; width: min(820px, 92vw); text-align: center; transform: translate3d(-50%, calc(-50% + (1 - var(--a)) * 40px), 0); }
.final h2 { margin: 0; font-size: clamp(38px, 6vw, 88px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.final h2 em { font-style: normal; color: var(--cyan); text-shadow: 0 0 30px var(--cyan); }
.final > p { margin: 18px 0 34px; color: rgba(236, 230, 255, .75); font-size: 17px; }
.final .access-btn { font-size: 15px; padding: 20px 34px; }
.legal { margin-top: 48px; font: 500 11px var(--mono); letter-spacing: .14em; color: var(--grey); }
.legal a { color: var(--grey); text-decoration: none; }

/* Terminal */
.terminal { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; height: 34px; overflow: hidden; display: flex; align-items: center;
  border-top: 1px solid rgba(34, 229, 255, .25); background: linear-gradient(0deg, rgba(5, 1, 15, .95), rgba(5, 1, 15, .7)); backdrop-filter: blur(8px);
  font: 500 12px var(--mono); letter-spacing: .06em; color: var(--cyan); }
.terminal__line { display: flex; gap: 48px; white-space: nowrap; will-change: transform; text-shadow: 0 0 8px var(--cyan-soft); }
.terminal__line span { opacity: .9; }
.terminal__line em { font-style: normal; color: var(--lilac); }
.terminal__line strong { color: #fff; }
.terminal::before { content: '›_'; position: relative; z-index: 2; padding: 0 12px 0 16px; height: 100%; display: grid; place-items: center; background: var(--void); color: var(--lilac); font-weight: 700; box-shadow: 12px 0 20px var(--void); }

/* Modal de acceso */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(3, 0, 12, .7); backdrop-filter: blur(10px); animation: fade .4s var(--ease); }
.modal__panel { position: relative; width: min(420px, 100%); padding: 36px 32px 28px; background: rgba(14, 5, 46, .78); border: 1px solid rgba(34, 229, 255, .4);
  border-radius: 4px 22px 4px 22px; box-shadow: 0 0 60px rgba(34, 229, 255, .2), 0 40px 100px rgba(0, 0, 0, .6); backdrop-filter: blur(20px);
  animation: materialize .7s var(--ease); overflow: hidden; }
.modal__panel::after { content: ''; position: absolute; left: 0; right: 0; height: 40%; top: -40%; pointer-events: none;
  background: linear-gradient(transparent, rgba(34, 229, 255, .12), transparent); animation: sweep 3.2s linear infinite; }
@keyframes sweep { to { top: 100%; } }
@keyframes fade { from { opacity: 0; } }
@keyframes materialize { 0% { opacity: 0; transform: scale(.94) translateY(10px); clip-path: inset(48% 0 48% 0); } 50% { clip-path: inset(0 0 0 0); } 100% { opacity: 1; transform: none; } }
.modal__x { position: absolute; top: 10px; right: 14px; background: none; border: 0; font-size: 26px; color: var(--grey); }
.modal__x:hover { color: #fff; }
.modal h2 { margin: 0; font: 800 30px var(--font); letter-spacing: -.02em; }
.modal__lead { margin: 6px 0 22px; color: var(--grey); font-size: 14px; }
.lock { width: 46px; height: 46px; margin-bottom: 16px; }
.lock svg { width: 100%; height: 100%; fill: none; stroke: var(--cyan); stroke-width: 2.5; filter: drop-shadow(0 0 8px var(--cyan)); }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; margin-bottom: 6px; font: 600 10.5px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--lilac); }
.field input { width: 100%; padding: 12px 14px; background: rgba(5, 1, 15, .7); border: 1px solid rgba(200, 178, 255, .25); border-radius: 2px; color: #fff;
  font: 500 15px var(--mono); outline: none; transition: border-color .25s, box-shadow .25s; }
.field input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 229, 255, .15), 0 0 18px rgba(34, 229, 255, .25); }
.modal__status { min-height: 1.5em; margin: 14px 0 0; font: 500 12px/1.5 var(--mono); color: var(--cyan); }
.modal__status.is-warn { color: #ffb86b; }
.handshake { display: flex; gap: 4px; margin-top: 12px; }
.handshake i { flex: 1; height: 3px; background: rgba(200, 178, 255, .15); }
.modal.is-busy .handshake i { animation: hs 1s infinite; }
.handshake i:nth-child(n) { animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes hs { 0%, 100% { background: rgba(200, 178, 255, .15); } 50% { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); } }

.noscript { position: fixed; inset: 0; display: grid; place-items: center; z-index: 200; background: var(--void); color: var(--lilac); font: 16px var(--mono); }

/* Accesibilidad */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .glitch::before, .glitch::after, .holo-card::before, .holo-card::after, .dot { animation: none; }
}

/* Responsive */
@media (max-width: 1100px) {
  .chapters { display: none; }
  .topbar { justify-content: space-between; }
}
@media (max-width: 860px) {
  .sim__grid { grid-template-columns: 1fr; gap: 10px; }
  .chart canvas { height: 70px; }
  .sim__controls { grid-template-columns: 1fr 1fr; }
  .sim__head { margin-bottom: 12px; }
  .sim__head p:last-child { display: none; }
  .value { left: 16px; right: 16px; width: auto; top: auto; bottom: 56px; margin-top: 0; }
  .holo-card { padding: 22px 20px 18px; }
  .holo-card p { font-size: 13.5px; }
  .metrics b { font-size: 20px; }
  .bars, .spark, .tiers, .chain { display: none; }
  .hud { display: none; }
  .access-btn--small { font-size: 0; padding: 10px 12px; }
  .access-btn--small::before, .access-btn--small::after { display: none; }
  .access-btn--small { font-size: 10px; letter-spacing: .04em; }
  .node-label { font-size: 10px; padding: 5px 8px; }
  .node-label small { display: none; }
}
@media (max-width: 520px) {
  .access-btn--small { max-width: 150px; white-space: normal; text-align: center; line-height: 1.3; }
  .final .access-btn { font-size: 12px; padding: 16px 18px; white-space: normal; }
}
