/* =========================================================
   Neumotoxicidad por fármacos — sesión clínica scrollytelling
   ========================================================= */
@import url("../../fonts/fonts.css");

:root{
  --bg-deep:#0a0e17;
  --bg-panel:#111928;
  --bg-panel-2:#161f33;
  --bg-card:#1a2338;
  --border-soft:rgba(255,255,255,0.08);
  --text-primary:#eef2f8;
  --text-muted:#9fb0c9;
  --text-faint:#6b7c99;

  --c1:#e0b23c;   /* Bleomicina — ámbar, daño oxidativo */
  --c1-dim:rgba(224,178,60,0.14);
  --c2:#4fb8d6;   /* Metotrexato — cian, hipersensibilidad */
  --c2-dim:rgba(79,184,214,0.14);
  --c3:#dd7b74;   /* CAR-T — coral, fuga capilar */
  --c3-dim:rgba(221,123,116,0.14);
  --c4:#a594e0;   /* Checkpoint — violeta, autoinmunidad */
  --c4-dim:rgba(165,148,224,0.14);

  --accent-neutral:#8a9bc4;
  --accent-danger:#e5636b;
  --accent-success:#3fd18f;

  --font-display:'Fraunces','Georgia',serif;
  --font-body:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --font-mono:'IBM Plex Mono','Consolas',monospace;

  --maxw:1080px;
  --section-pad:clamp(2rem,6vw,6rem);
}

*,*::before,*::after{ box-sizing:border-box; }

#scroll-progress{
  position:fixed; top:0; left:0; height:3px; width:0%; z-index:80;
  background:linear-gradient(90deg,var(--c1),var(--c2),var(--c3),var(--c4));
  pointer-events:none;
}

html{ background:var(--bg-deep); }
body{
  margin:0; background:var(--bg-deep); color:var(--text-primary);
  font-family:var(--font-body); font-size:16px; line-height:1.6;
  -webkit-font-smoothing:antialiased; overflow-x:hidden;
}

body.presentation-mode{ scroll-snap-type:y mandatory; height:100vh; overflow-y:scroll; }
body.presentation-mode section.slide{
  scroll-snap-align:start; height:100vh; min-height:0; overflow:hidden;
  padding-top:clamp(1rem,3vh,2rem); padding-bottom:clamp(1rem,3vh,2rem);
}
body.presentation-mode section.slide.pm-scroll-fallback{ overflow-y:auto; }
body.presentation-mode section.slide{ align-items:flex-start; }
body.presentation-mode section.slide .wrap{ transform-origin:top center; width:100%; }
body.presentation-mode section.slide h2{ font-size:clamp(1.3rem,3vh,2.1rem); margin-bottom:.35em; }
body.presentation-mode section.slide .lab-grid{ margin-top:.8rem; gap:.5rem; }
body.presentation-mode section.slide .lab-card{ padding:.7rem .8rem; }
body.presentation-mode section.slide .lab-value{ font-size:1.3rem; margin:.2rem 0; }
body.presentation-mode section.slide .case-block{ margin:.8rem 0 .6rem; padding:.9rem 1.1rem; }
body.presentation-mode section.slide .mech-panel{ margin-top:1.1rem; padding:1rem 1.2rem; }
body.presentation-mode section.slide .quiz-step{ margin-top:.9rem; padding:1rem; }
body.presentation-mode section.slide .interact-box,
body.presentation-mode section.slide .trap{ margin-top:.9rem; padding:.8rem 1rem; }
body.presentation-mode section.slide .img-row,
body.presentation-mode section.slide .reveal-pair,
body.presentation-mode section.slide .compare{ margin-top:1rem; }

/* ---- desplegable que solo colapsa en modo presentación ---- */
.pm-collapse{ margin-top:1.6rem; }
.pm-collapse-head{ display:none; }
.pm-collapse-head.pm-title-always{
  display:flex; align-items:center; gap:.5rem; background:none; border:none; padding:0; margin:2rem 0 .6rem;
  cursor:default; font-family:var(--font-display); font-weight:600; font-size:clamp(1.15rem,2.2vw,1.4rem); color:var(--text-primary); text-align:left;
}
.pm-collapse-head.pm-title-always .pm-collapse-icon{ display:none; }
body.presentation-mode .pm-collapse{ margin-top:1rem; }
body.presentation-mode .pm-collapse-head{
  display:flex; align-items:center; justify-content:space-between; width:100%;
  background:var(--bg-panel); border:1px solid var(--border-soft); border-radius:12px;
  padding:.65rem 1rem; font-family:var(--font-mono); font-size:.76rem; text-transform:uppercase;
  letter-spacing:.04em; color:var(--text-primary); cursor:pointer;
}
body.presentation-mode .pm-collapse-head:hover{ border-color:var(--c-case,var(--c2)); }
body.presentation-mode .pm-collapse-head.pm-title-always{
  font-family:var(--font-mono); font-size:.76rem; text-transform:uppercase; font-weight:400; letter-spacing:.04em;
  background:var(--bg-panel); border:1px solid var(--border-soft); border-radius:12px; padding:.65rem 1rem; margin:1rem 0 0; cursor:pointer;
}
body.presentation-mode .pm-collapse-head.pm-title-always .pm-collapse-icon{ display:inline; }
body.presentation-mode .pm-collapse-icon{ transition:transform .25s ease; color:var(--text-faint); }
body.presentation-mode .pm-collapse.open .pm-collapse-icon{ transform:rotate(45deg); color:var(--c-case,var(--c2)); }
body.presentation-mode .pm-collapse-body{ max-height:0; overflow:hidden; transition:max-height .35s ease; }
body.presentation-mode .pm-collapse.open .pm-collapse-body{ max-height:900px; margin-top:.8rem; }

h1,h2,h3,h4{ font-family:var(--font-display); font-weight:600; letter-spacing:-0.01em; margin:0 0 0.6em; }
h2{ font-size:clamp(1.7rem,3.6vw,2.5rem); }
h3{ font-size:clamp(1.15rem,2.2vw,1.4rem); }
p{ margin:0 0 1em; color:var(--text-muted); }
a{ color:var(--c2); }
strong{ color:var(--text-primary); }
b{ color:var(--text-primary); }

.eyebrow{
  font-family:var(--font-mono); text-transform:uppercase; letter-spacing:0.14em;
  font-size:0.72rem; color:var(--accent-neutral); margin-bottom:0.9em; display:block;
}

section.slide{
  position:relative; width:100%; min-height:100vh;
  display:flex; align-items:center; padding:var(--section-pad) 0;
  border-bottom:1px solid var(--border-soft);
  border-top:3px solid var(--c-case,transparent);
}
.wrap{ max-width:var(--maxw); margin:0 auto; padding:0 clamp(1.2rem,5vw,2rem); width:100%; }

/* ---------- progress dots ---------- */
#progress-nav{ position:fixed; right:1.1rem; top:50%; transform:translateY(-50%); z-index:60; display:flex; flex-direction:column; gap:0.5rem; }
#progress-nav button{ width:9px; height:9px; border-radius:50%; border:1px solid var(--dot-c,var(--text-faint)); background:transparent; cursor:pointer; padding:0; transition:all .25s ease; }
#progress-nav button.active{ background:var(--dot-c,var(--text-primary)); border-color:var(--dot-c,var(--text-primary)); transform:scale(1.3); box-shadow:0 0 8px var(--dot-c,transparent); }
#progress-nav button:hover{ border-color:var(--dot-c,var(--text-primary)); }
@media (max-width:720px){ #progress-nav{ display:none; } }

/* ---------- top controls ---------- */
#top-controls{ position:fixed; top:1rem; left:1rem; z-index:60; display:flex; gap:0.5rem; align-items:center; flex-wrap:wrap; }
.pill-btn{
  display:inline-flex; align-items:center; gap:.4em; font-family:var(--font-mono); font-size:0.7rem;
  letter-spacing:0.06em; text-transform:uppercase; text-decoration:none;
  background:rgba(17,25,40,0.85); backdrop-filter:blur(6px); border:1px solid var(--border-soft);
  color:var(--text-muted); padding:0.5rem 0.85rem; border-radius:999px; cursor:pointer; transition:all .2s ease;
}
.pill-btn:hover{ color:var(--text-primary); border-color:var(--c2); }
.pill-btn.on{ color:var(--bg-deep); background:var(--text-primary); }
#timer-display{ font-variant-numeric:tabular-nums; }
#timer-display[data-warn="1"]{ color:var(--c1); border-color:var(--c1); }

/* ---------- reveal-on-scroll ---------- */
.reveal{ opacity:0; transform:translateY(22px); transition:opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.in{ opacity:1; transform:translateY(0); }
.reveal.d1{ transition-delay:.06s; } .reveal.d2{ transition-delay:.12s; }
.reveal.d3{ transition-delay:.18s; } .reveal.d4{ transition-delay:.24s; }
@media (prefers-reduced-motion:reduce){ .reveal{ transition:none; opacity:1; transform:none; } }

/* ================= HERO ================= */
#hero{ background:var(--bg-deep); text-align:left; }
.hero-mesh{ position:absolute; inset:0; z-index:0; pointer-events:none; overflow:hidden; background:var(--bg-deep); }
.hero-blob{ position:absolute; width:58%; padding-bottom:58%; border-radius:50%; filter:blur(74px); opacity:0.5; will-change:transform; }
.hero-blob.b1{ background:var(--c1); top:-12%; left:-8%; animation:blobMove1 7s ease-in-out infinite alternate; }
.hero-blob.b2{ background:var(--c3); bottom:-16%; right:-10%; width:62%; padding-bottom:62%; animation:blobMove2 8s ease-in-out infinite alternate; }
.hero-blob.b3{ background:var(--c2); top:32%; left:38%; width:38%; padding-bottom:38%; opacity:.32; animation:blobMove3 6s ease-in-out infinite alternate; }
.hero-blob.b4{ background:var(--c4); top:6%; right:14%; width:30%; padding-bottom:30%; opacity:.28; animation:blobMove2 9s ease-in-out infinite alternate-reverse; }
@keyframes blobMove1{ 0%{transform:translate(0,0) scale(1);} 100%{transform:translate(36%,28%) scale(1.35);} }
@keyframes blobMove2{ 0%{transform:translate(0,0) scale(1);} 100%{transform:translate(-32%,-24%) scale(1.3);} }
@keyframes blobMove3{ 0%{transform:translate(-20%,-16%) scale(.85);} 100%{transform:translate(24%,20%) scale(1.25);} }
@media (prefers-reduced-motion:reduce){ .hero-blob{ animation:none; } }
#hero .wrap{ position:relative; z-index:1; }

#hero .tag-row{ display:flex; gap:0.55rem; margin-bottom:1.5rem; flex-wrap:wrap; }
.tag{ font-family:var(--font-mono); font-size:0.7rem; letter-spacing:0.06em; padding:0.3rem 0.65rem; border-radius:999px; border:1px solid var(--border-soft); color:var(--text-muted); }
.tag.c1{ border-color:rgba(224,178,60,.4); color:var(--c1); }
.tag.c2{ border-color:rgba(79,184,214,.4); color:var(--c2); }
.tag.c3{ border-color:rgba(221,123,116,.4); color:var(--c3); }
.tag.c4{ border-color:rgba(165,148,224,.4); color:var(--c4); }

.tag-link{
  background:transparent; cursor:pointer; -webkit-appearance:none; appearance:none;
  transition:background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.tag-link.c1:hover, .tag-link.c1:focus-visible{ background:rgba(224,178,60,.16); border-color:var(--c1); color:var(--c1); transform:translateY(-1px); box-shadow:0 0 0 1px rgba(224,178,60,.3), 0 6px 18px rgba(224,178,60,.18); }
.tag-link.c2:hover, .tag-link.c2:focus-visible{ background:rgba(79,184,214,.16); border-color:var(--c2); color:var(--c2); transform:translateY(-1px); box-shadow:0 0 0 1px rgba(79,184,214,.3), 0 6px 18px rgba(79,184,214,.18); }
.tag-link.c3:hover, .tag-link.c3:focus-visible{ background:rgba(221,123,116,.16); border-color:var(--c3); color:var(--c3); transform:translateY(-1px); box-shadow:0 0 0 1px rgba(221,123,116,.3), 0 6px 18px rgba(221,123,116,.18); }
.tag-link.c4:hover, .tag-link.c4:focus-visible{ background:rgba(165,148,224,.16); border-color:var(--c4); color:var(--c4); transform:translateY(-1px); box-shadow:0 0 0 1px rgba(165,148,224,.3), 0 6px 18px rgba(165,148,224,.18); }
.tag-link:active{ transform:translateY(0); }
.tag-link:focus-visible{ outline:none; }
@media (prefers-reduced-motion:reduce){ .tag-link{ transition:none; } .tag-link:hover{ transform:none; } }

#hero h1{ font-size:clamp(2.1rem,5.6vw,3.7rem); line-height:1.06; max-width:16ch; }
#hero .sub{ font-size:clamp(1rem,2vw,1.15rem); max-width:56ch; margin-top:.4rem; }
.hero-meta{ margin-top:2.4rem; display:flex; gap:2.2rem; flex-wrap:wrap; font-family:var(--font-mono); font-size:0.8rem; color:var(--text-primary); }
.hero-meta b{ display:block; color:var(--text-primary); font-family:var(--font-body); font-size:0.95rem; }
.scroll-cue{ margin-top:2.8rem; font-family:var(--font-mono); font-size:0.74rem; color:var(--text-faint); display:flex; align-items:center; gap:0.6rem; }
.scroll-cue .arrow{ animation:bob 1.6s ease-in-out infinite; }
@keyframes bob{ 0%,100%{transform:translateY(0);} 50%{transform:translateY(6px);} }

/* ================= FRAMEWORK (punto de partida) ================= */
.wheel3{ position:relative; height:clamp(260px,32vw,320px); margin-top:2.6rem; }
.wheel3-item{
  position:absolute; top:50%; left:50%; width:min(74%,380px);
  background:var(--bg-panel); border:1px solid var(--border-soft); border-radius:16px;
  padding:1.3rem 1.5rem; text-align:left; cursor:pointer; font:inherit; color:inherit;
  transition:transform .5s cubic-bezier(.2,.8,.2,1), opacity .5s ease, border-color .5s ease, box-shadow .5s ease;
}
.wheel3-item .fc-num{ font-family:var(--font-mono); color:var(--accent-neutral); font-size:.78rem; margin-bottom:.5rem; }
.wheel3-item h4{ font-family:var(--font-body); font-weight:700; color:var(--text-primary); margin:0 0 .4rem; font-size:1.05rem; }
.wheel3-item p{ margin:0; font-size:.9rem; }

.wheel3-item.is-active{
  transform:translate(-50%,-50%) scale(1); opacity:1; z-index:3;
  border-color:var(--c2); box-shadow:0 20px 44px rgba(0,0,0,.4);
}
.wheel3-item.is-left{ transform:translate(calc(-50% - 60%),-50%) scale(.7); opacity:.38; z-index:1; }
.wheel3-item.is-right{ transform:translate(calc(-50% + 60%),-50%) scale(.7); opacity:.38; z-index:1; }
.wheel3-item.is-left:hover, .wheel3-item.is-right:hover{ opacity:.65; }
.wheel3-item.is-active p{ opacity:1; }
.wheel3-item.is-left p, .wheel3-item.is-left h4, .wheel3-item.is-right p, .wheel3-item.is-right h4{ opacity:.75; }

@media (max-width:700px){
  .wheel3{ height:auto; display:flex; flex-direction:column; gap:1rem; }
  .wheel3-item{ position:static; transform:none !important; opacity:1 !important; width:100%; }
  .wheel3-item.is-active{ border-color:var(--c2); }
}
@media (prefers-reduced-motion:reduce){ .wheel3-item{ transition:none; } }
.callout{
  margin-top:1.8rem; padding:1.1rem 1.3rem; border-radius:14px;
  background:linear-gradient(180deg,rgba(224,178,60,.09),transparent);
  border:1px solid rgba(224,178,60,.3); font-size:.92rem;
}
.callout strong{ color:var(--c1); }

/* ================= CASE HEADER (per drug) ================= */
.case-hero{ display:flex; align-items:baseline; gap:.8rem; flex-wrap:wrap; margin-bottom:.3em; }
.case-hero .drugname{ font-family:var(--font-mono); font-size:.8rem; letter-spacing:.06em; text-transform:uppercase; }

/* ================= CASE NARRATIVE (accordion) ================= */
.case-block{
  background:var(--bg-panel); border:1px solid var(--border-soft); border-radius:14px;
  padding:1.3rem 1.5rem; margin:1.8rem 0 .9rem; cursor:pointer; transition:border-color .2s ease;
}
.case-block:hover{ border-color:var(--c-case,var(--c2)); }
.case-block .cb-head{ display:flex; justify-content:space-between; align-items:center; font-family:var(--font-mono); font-size:.8rem; color:var(--text-primary); letter-spacing:.02em; }
.case-block .cb-icon{ width:24px; height:24px; border-radius:50%; border:1px solid var(--text-faint); display:flex; align-items:center; justify-content:center; font-size:.85rem; transition:transform .25s ease; flex-shrink:0; }
.case-block.open .cb-icon{ transform:rotate(45deg); border-color:var(--c-case,var(--c2)); color:var(--c-case,var(--c2)); }
.cb-body{ max-height:0; overflow:hidden; transition:max-height .4s ease, padding-top .3s ease; }
.case-block.open .cb-body{ max-height:600px; padding-top:.9rem; }
.cb-body p:last-child{ margin-bottom:0; }

/* ================= GRADE TABLE (dentro de case-block) ================= */
.table-scroll{ overflow-x:auto; margin-top:.2rem; }
.grade-table{ width:100%; min-width:480px; border-collapse:collapse; font-size:.82rem; }
.grade-table th{
  text-align:left; font-family:var(--font-mono); font-size:.66rem; text-transform:uppercase;
  letter-spacing:.05em; color:var(--text-faint); padding:.5rem .6rem; border-bottom:1px solid var(--border-soft);
}
.grade-table td{ padding:.55rem .6rem; border-bottom:1px solid var(--border-soft); color:var(--text-muted); vertical-align:top; }
.grade-table tr:last-child td{ border-bottom:none; }
.grade-table td:first-child{ font-family:var(--font-mono); font-weight:700; color:var(--c-case,var(--c2)); }
.grade-table td b{ color:var(--text-primary); }

/* ================= LAB / DATA CARDS ================= */
.lab-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:.9rem; margin-top:1.6rem; }
.lab-card{ background:var(--bg-panel); border:1px solid var(--border-soft); border-radius:14px; padding:1.1rem 1.2rem; position:relative; overflow:hidden; }
.lab-card .lab-head{ display:flex; align-items:center; gap:.5rem; }
.lab-icon{ width:18px; height:18px; flex-shrink:0; color:var(--text-faint); opacity:.85; }
.lab-card.abn .lab-icon{ color:var(--accent-danger); }
.lab-card .lab-label{ font-family:var(--font-mono); font-size:.68rem; text-transform:uppercase; letter-spacing:.06em; color:var(--text-faint); }
.lab-card .lab-value{ font-family:var(--font-display); font-size:1.7rem; margin:.3rem 0; color:var(--text-primary); }
.lab-card .lab-value.abn{ color:var(--accent-danger); }
.lab-card .lab-ref{ font-size:.75rem; color:var(--text-faint); }
.lab-bar{ height:5px; border-radius:3px; background:rgba(255,255,255,.06); margin-top:.6rem; overflow:hidden; }
.lab-bar>span{ display:block; height:100%; width:0%; background:var(--accent-danger); border-radius:3px; transition:width 1s cubic-bezier(.2,.8,.2,1); }
.lab-card.ok .lab-bar>span{ background:var(--accent-success); }

/* ================= IMAGES ================= */
.img-row{ display:grid; grid-template-columns:1fr 1fr; gap:.7rem; margin-top:1.6rem; }
.img-row.solo{ grid-template-columns:1fr; max-width:420px; }
@media (max-width:600px){ .img-row{ grid-template-columns:1fr; } }
.img-card{ background:var(--bg-panel); border:1px solid var(--border-soft); border-radius:14px; overflow:hidden; }
.img-card img{ width:100%; display:block; max-height:300px; object-fit:cover; }
.img-card figcaption{ padding:.6rem .9rem; font-size:.74rem; color:var(--text-faint); line-height:1.4; }
.img-card .tagline{ display:block; text-align:center; font-size:.7rem; color:var(--text-faint); padding:.4rem 0; background:var(--bg-panel-2); }
.img-empty{ border:1px dashed var(--border-soft); border-radius:14px; padding:2rem 1.2rem; text-align:center; font-size:.8rem; color:var(--text-faint); line-height:1.5; background:var(--bg-panel); }
.img-empty code{ color:var(--c2); font-family:var(--font-mono); }

/* CT strip */
.ct-strip{ margin-top:1.6rem; }
.ct-strip-row{ display:grid; grid-template-columns:repeat(3,1fr); gap:.6rem; margin-top:.5rem; }
.ct-strip-label{ font-family:var(--font-mono); font-size:.68rem; color:var(--text-faint); letter-spacing:.06em; text-transform:uppercase; }
.ct-cell{ border-radius:10px; overflow:hidden; background:var(--bg-panel); border:1px solid var(--border-soft); }
.ct-cell img{ width:100%; height:110px; object-fit:cover; display:block; }
.ct-cell span{ display:block; text-align:center; font-size:.68rem; color:var(--text-faint); padding:.35rem 0; }
.ct-cell.is-empty{ display:flex; align-items:center; justify-content:center; height:110px; text-align:center; font-size:.68rem; color:var(--text-faint); padding:.5rem; border-style:dashed; }

/* before/after draggable image compare */
.compare{
  position:relative; aspect-ratio:516/419; margin-top:1.6rem; border-radius:14px; overflow:hidden;
  border:1px solid var(--border-soft); background:var(--bg-deep); cursor:ew-resize; touch-action:none; user-select:none;
}
.compare img{ position:absolute; inset:0; width:100%; height:100%; object-fit:contain; display:block; pointer-events:none; }
.compare-before{ clip-path:inset(0 50% 0 0); z-index:2; }
.compare-label{
  position:absolute; top:.7rem; font-family:var(--font-mono); font-size:.68rem; text-transform:uppercase; letter-spacing:.05em;
  color:var(--text-primary); background:rgba(10,14,23,.72); border:1px solid var(--border-soft); border-radius:999px;
  padding:.3rem .7rem; z-index:3; pointer-events:none;
}
.compare-label-before{ left:.7rem; }
.compare-label-after{ right:.7rem; }
.compare-handle{
  position:absolute; top:0; bottom:0; left:50%; width:2px; background:var(--text-primary); z-index:4;
  transform:translateX(-50%); pointer-events:none;
}
.compare-handle span{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:34px; height:34px; border-radius:50%;
  background:var(--text-primary); color:var(--bg-deep); display:flex; align-items:center; justify-content:center;
  font-size:.9rem; box-shadow:0 6px 18px rgba(0,0,0,.4);
}

/* blind comparison (caso 2) */
.reveal-pair{ display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-top:1.6rem; max-width:560px; }
.reveal-img{ background:var(--bg-panel); border:1px solid var(--border-soft); border-radius:14px; overflow:hidden; aspect-ratio:4/4.3; }
.reveal-img img{ width:100%; height:100%; object-fit:cover; display:block; }
.reveal-img .img-empty{ height:100%; border:none; display:flex; align-items:center; justify-content:center; border-radius:0; }
.reveal-label{ text-align:center; margin-top:.6rem; font-weight:700; color:var(--text-primary); font-size:.9rem; }
.reveal-label[hidden]{ display:none; }

/* ================= QUIZ ================= */
.quiz-step{ background:var(--bg-panel); border:1px solid var(--border-soft); border-radius:16px; padding:1.5rem; margin-top:1.6rem; }
.quiz-step .q-prompt{ font-size:1rem; color:var(--text-primary); margin-bottom:1rem; }
.q-note{ font-size:.78rem; color:var(--text-faint); margin:-.6rem 0 1rem; }
.q-options{ display:flex; gap:.6rem; flex-wrap:wrap; }
.q-opt{ font-family:var(--font-body); font-size:.9rem; padding:.6rem 1rem; border-radius:10px; border:1px solid var(--border-soft); background:var(--bg-card); color:var(--text-muted); cursor:pointer; transition:all .2s ease; text-align:left; }
.q-opt:hover:not(.disabled){ border-color:var(--c-case,var(--c2)); color:var(--text-primary); }
.q-opt.chosen-right{ border-color:var(--accent-success); color:var(--accent-success); background:rgba(63,209,143,.08); }
.q-opt.chosen-wrong{ border-color:var(--accent-danger); color:var(--accent-danger); background:rgba(229,99,107,.08); }
.q-opt.disabled{ pointer-events:none; opacity:.6; }
.q-opt.multi.is-pick{ border-color:var(--c-case,var(--c2)); color:var(--text-primary); }
.q-check{ margin-top:.9rem; font-family:var(--font-body); font-weight:700; font-size:.85rem; padding:.55rem 1.2rem; border-radius:10px; border:none; background:var(--c-case,var(--c2)); color:var(--bg-deep); cursor:pointer; }
.q-check[hidden]{ display:none; }
.q-feedback{ margin-top:1rem; font-size:.88rem; color:var(--text-muted); border-left:2px solid var(--accent-success); padding-left:.9rem; display:none; }
.q-feedback.show{ display:block; }
.q-feedback p{ margin:0 0 .55em; } .q-feedback p:last-child{ margin:0; }

/* ================= MECHANISM PANEL ================= */
.mech-panel{ margin-top:2.2rem; background:var(--bg-panel); border-radius:16px; border:1px solid var(--border-soft); border-top:3px solid var(--c-case,var(--c2)); padding:1.5rem; }
.mech-panel h3{ display:flex; align-items:center; gap:.5rem; }
.mech-grid{ display:grid; grid-template-columns:.9fr 1.1fr; gap:1.6rem; align-items:start; margin-top:.6rem; }
@media (max-width:780px){ .mech-grid{ grid-template-columns:1fr; } }
.mech-grid svg{ width:100%; height:auto; display:block; background:var(--bg-panel-2); border-radius:12px; }
.mech-steps{ margin:0; padding:0; list-style:none; display:grid; gap:.55rem; }
.mech-steps li{ font-size:.9rem; color:var(--text-muted); padding-left:1.1rem; position:relative; }
.mech-steps li::before{ content:''; position:absolute; left:0; top:.5em; width:5px; height:5px; border-radius:50%; background:var(--c-case,var(--c2)); }
.mech-steps b{ color:var(--text-primary); }

.interact-box{ margin-top:1.2rem; padding:1rem 1.2rem; border-radius:12px; background:var(--c-case-dim,rgba(79,184,214,.1)); border:1px solid var(--border-soft); font-size:.88rem; }
.interact-box .lbl{ display:block; font-family:var(--font-mono); font-size:.66rem; text-transform:uppercase; letter-spacing:.06em; color:var(--c-case,var(--c2)); margin-bottom:.35rem; }

.trap{ margin-top:1.2rem; padding:1rem 1.2rem; border-radius:12px; background:rgba(229,99,107,.07); border:1px solid rgba(229,99,107,.25); font-size:.88rem; }
.trap strong{ color:var(--accent-danger); }

.abbr-tip{
  position:relative; border-bottom:1px dotted var(--text-faint); cursor:help;
}
.abbr-tip::after{
  content:attr(data-tip); position:absolute; left:50%; bottom:calc(100% + 8px); transform:translate(-50%,4px);
  width:max-content; max-width:240px; background:var(--bg-panel-2); border:1px solid var(--border-soft);
  border-left:2px solid var(--c-case,var(--c2)); color:var(--text-primary); font-size:.78rem; font-weight:400;
  font-family:var(--font-body); line-height:1.4; text-align:left; padding:.55rem .75rem; border-radius:8px;
  opacity:0; pointer-events:none; transition:opacity .2s ease, transform .2s ease;
  box-shadow:0 10px 24px rgba(0,0,0,.4); z-index:20;
}
.abbr-tip:hover::after, .abbr-tip:focus-visible::after{ opacity:1; transform:translate(-50%,0); }
@media (prefers-reduced-motion:reduce){ .abbr-tip::after{ transition:none; } }

.cite{ font-size:.68em; vertical-align:super; line-height:0; margin-left:.05em; }
.cite a{ color:var(--c2); text-decoration:none; font-weight:600; padding:0 .05em; }
.cite a:hover{ text-decoration:underline; }

/* ================= COMPARISON TABLE ================= */
.cmp-table{ width:100%; border-collapse:collapse; margin-top:1.6rem; font-size:.92rem; }
.cmp-table th{ text-align:left; font-family:var(--font-mono); font-size:.7rem; text-transform:uppercase; letter-spacing:.06em; color:var(--text-faint); padding:.75rem .9rem; border-bottom:1px solid var(--border-soft); }
.cmp-table th.col-c1{ color:var(--c1); } .cmp-table th.col-c2{ color:var(--c2); }
.cmp-table th.col-c3{ color:var(--c3); } .cmp-table th.col-c4{ color:var(--c4); }
.cmp-row td{ padding:.85rem .9rem; border-bottom:1px solid var(--border-soft); vertical-align:top; color:var(--text-muted); font-size:.86rem; }
.cmp-row td:first-child{ color:var(--text-primary); font-weight:700; width:16%; }
.cmp-row{ cursor:pointer; }
.cmp-row:hover td{ background:rgba(255,255,255,.02); }
.cmp-detail{ display:none; font-size:.84rem; padding:0 .9rem 1rem; color:var(--text-faint); border-bottom:1px solid var(--border-soft); }
.cmp-detail.show{ display:table-row; }
.cmp-detail td{ padding:0 .9rem 1.05rem; border-bottom:none; }
@media (max-width:760px){
  .cmp-table,.cmp-table thead,.cmp-table tbody,.cmp-table th,.cmp-table td,.cmp-table tr{ display:block; }
  .cmp-table thead{ display:none; }
  .cmp-row{ border:1px solid var(--border-soft); border-radius:12px; margin-bottom:.7rem; padding:.3rem 0; }
  .cmp-row td{ border-bottom:none; padding:.3rem .9rem; }
  .cmp-row td:first-child{ width:auto; }
}

/* ================= FLASHCARDS ================= */
.card-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:1.1rem; margin-top:1.8rem; }
.flip-card{ perspective:1200px; height:180px; cursor:pointer; }
.flip-inner{ position:relative; width:100%; height:100%; transition:transform .6s cubic-bezier(.3,.7,.2,1); transform-style:preserve-3d; }
.flip-card.flipped .flip-inner{ transform:rotateY(180deg); }
.flip-face{ position:absolute; inset:0; backface-visibility:hidden; border-radius:14px; padding:1.2rem; display:flex; flex-direction:column; justify-content:center; border:1px solid var(--border-soft); }
.flip-front{ background:var(--bg-panel); }
.flip-front .num{ font-family:var(--font-mono); color:var(--c2); font-size:.78rem; margin-bottom:.5rem; }
.flip-front h4{ font-family:var(--font-body); font-size:1rem; color:var(--text-primary); margin:0; }
.flip-back{ background:var(--bg-panel-2); transform:rotateY(180deg); font-size:.86rem; color:var(--text-muted); }

/* ================= REFERENCES — recortes brutalistas de papel ================= */
.ref-list{ display:flex; flex-flow:row wrap; align-items:flex-start; gap:1.3rem; margin-top:2rem; max-width:960px; }
.ref-item{ width:var(--ref-w,78%); margin-top:var(--ref-overlap,0px); }
@media (max-width:760px){
  .ref-item{ width:100% !important; margin-top:0 !important; --ref-rot:0deg; }
}

.ref-item{
  display:block; position:relative; text-decoration:none; cursor:pointer;
  background:var(--bg-panel); color:var(--text-primary); border-radius:0; padding:1.15rem 1.3rem 1.2rem;
  border:2px solid var(--text-primary);
  box-shadow:6px 6px 0 var(--ref-accent,var(--c2));
  scroll-margin-top:2rem;
  transform:rotate(var(--ref-rot,0deg));
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.ref-item:hover, .ref-item:focus-visible{
  transform:rotate(var(--ref-rot,0deg)) translate(-3px,-3px);
  box-shadow:9px 9px 0 var(--ref-accent,var(--c2));
  border-color:var(--ref-accent,var(--c2));
  outline:none; z-index:5;
}
.ref-item:active{ transform:rotate(var(--ref-rot,0deg)) translate(0,0); box-shadow:3px 3px 0 var(--ref-accent,var(--c2)); }
.ref-item:target{ animation:refFlash 1.6s ease; }
@keyframes refFlash{ 0%{ background:var(--c2-dim); } 100%{ background:var(--bg-panel); } }

/* variante 1: muesca cortada en la esquina, como un archivador troquelado */
.ref-item.type-notch::before{
  content:''; position:absolute; top:-2px; left:-2px; width:20px; height:20px; pointer-events:none; z-index:1;
  background:
    linear-gradient(135deg, transparent 49%, var(--text-primary) 49%, var(--text-primary) 52%, transparent 52%),
    linear-gradient(135deg, var(--bg-deep) 50%, transparent 50%);
}

.ref-num{
  font-family:var(--font-mono); font-weight:800; font-size:1.15rem;
  color:var(--ref-accent,var(--c2)); letter-spacing:.02em; display:block; margin-bottom:.5rem;
  padding-bottom:.4rem; border-bottom:2px dashed var(--border-soft);
}
.ref-thumb{ width:100%; max-height:110px; object-fit:cover; border-radius:0; border:2px solid var(--border-soft); margin:0 0 .7rem; display:block; }
.ref-title{
  font-family:var(--font-display); font-weight:700; font-size:1.05rem; line-height:1.28;
  letter-spacing:-.01em; text-transform:uppercase; margin:0 0 .4rem; color:var(--text-primary);
}
.ref-byline{ font-family:var(--font-mono); font-size:.68rem; text-transform:uppercase; letter-spacing:.06em; color:var(--text-faint); }
.ref-byline em{ color:var(--text-faint); }

.ref-more{ max-height:0; opacity:0; overflow:hidden; transition:max-height .4s cubic-bezier(.2,.8,.2,1), opacity .25s ease, margin-top .25s ease; }
.ref-item:hover .ref-more, .ref-item:focus-visible .ref-more{ max-height:280px; opacity:1; margin-top:.7rem; }
.ref-clave{ font-size:.85rem; line-height:1.45; margin:0 0 .5rem; padding-top:.65rem; border-top:2px dashed var(--border-soft); color:var(--text-muted); }
.ref-clave b{ color:var(--ref-accent,var(--c2)); }
.ref-cite{ font-size:.74rem; line-height:1.4; margin:0; color:var(--text-faint); }
.ref-cite em{ color:var(--text-faint); }

.ref-goto{
  display:inline-flex; align-items:center; gap:.3rem; margin-top:.65rem;
  font-family:var(--font-mono); font-weight:700; font-size:.68rem; text-transform:uppercase; letter-spacing:.05em; color:var(--ref-accent,var(--c2));
  opacity:0; transform:translateY(4px); transition:opacity .25s ease, transform .25s ease;
}
.ref-item:hover .ref-goto, .ref-item:focus-visible .ref-goto{ opacity:1; transform:translateY(0); }
@media (prefers-reduced-motion:reduce){
  .ref-item, .ref-more, .ref-goto{ transition:none; }
  .ref-item:hover, .ref-item:focus-visible{ transform:none; }
}

footer.end{ text-align:center; padding:3rem 1rem 4rem; color:var(--text-faint); font-size:.85rem; }
::selection{ background:var(--c2); color:#04121a; }

/* ================= LIGHTBOX ================= */
.img-card,.ct-cell,.reveal-img{ position:relative; }
.img-card img,.ct-cell img,.reveal-img img{
  cursor:zoom-in; transition:transform .35s cubic-bezier(.2,.7,.2,1);
}
.img-card:hover img,.ct-cell:hover img,.reveal-img:hover img{ transform:scale(1.06); }
.img-card::after,.ct-cell::after,.reveal-img::after{
  content:'⤢'; position:absolute; top:.5rem; right:.5rem; width:26px; height:26px; border-radius:50%;
  background:rgba(10,14,23,.75); border:1px solid var(--border-soft); color:var(--text-primary);
  font-size:.8rem; display:flex; align-items:center; justify-content:center;
  opacity:0; transform:scale(.8); transition:opacity .25s ease, transform .25s ease; pointer-events:none;
}
.img-card:hover::after,.ct-cell:hover::after,.reveal-img:hover::after{ opacity:1; transform:scale(1); }
@media (prefers-reduced-motion:reduce){
  .img-card img,.ct-cell img,.reveal-img img{ transition:none; }
  .img-card:hover img,.ct-cell:hover img,.reveal-img:hover img{ transform:none; }
}
#lightbox{
  position:fixed; inset:0; z-index:200; background:rgba(5,8,14,.94);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1rem;
  padding:clamp(1rem,5vw,3rem);
  opacity:0; pointer-events:none; transition:opacity .25s ease; cursor:zoom-out;
}
#lightbox.show{ opacity:1; pointer-events:auto; }
#lightbox .lb-stage{ position:relative; max-width:100%; max-height:76vh; display:inline-flex; cursor:default; }
#lightbox .lb-stage img{ max-width:100%; max-height:76vh; display:block; border-radius:10px; box-shadow:0 24px 70px rgba(0,0,0,.55); }
#lightbox .lb-canvas{
  position:absolute; inset:0; width:100%; height:100%; border-radius:10px;
  pointer-events:none; touch-action:none;
}
#lightbox.pen-active .lb-canvas{ pointer-events:auto; cursor:crosshair; }
#lightbox .lb-toolbar{
  position:absolute; top:1.1rem; right:1.2rem; z-index:1; display:flex; align-items:center; gap:.6rem;
}
#lightbox .lb-close, #lightbox .lb-pen, #lightbox .lb-clear{
  width:38px; height:38px; border-radius:50%; flex-shrink:0;
  background:rgba(17,25,40,.9); border:1px solid var(--border-soft); color:var(--text-primary);
  font-size:1.1rem; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:border-color .2s ease, background .2s ease;
}
#lightbox .lb-pen:hover, #lightbox .lb-clear:hover{ border-color:var(--c2); }
#lightbox .lb-pen.active{ background:#ffd146; border-color:#ffd146; color:#241a0e; }
#lightbox .lb-pen-size{
  width:0; opacity:0; pointer-events:none; margin:0; accent-color:#ffd146;
  transition:width .2s ease, opacity .2s ease;
}
#lightbox.pen-active .lb-pen-size{ width:100px; opacity:1; pointer-events:auto; }
#lightbox .lb-caption{ max-width:680px; text-align:center; font-size:.9rem; line-height:1.5; color:var(--text-muted); }
#lightbox .lb-caption b{ color:var(--text-primary); }

/* ================= SVG HOTSPOTS ================= */
.mech-grid{ position:relative; }
.hotspot{ cursor:pointer; }
.hotspot circle.dot{ fill:var(--c-case,var(--c2)); }
.hotspot circle.ring{ fill:none; stroke:var(--c-case,var(--c2)); stroke-width:1.4; opacity:.55; animation:hotspotPulse 2.2s ease-out infinite; transform-origin:center; transform-box:fill-box; }
@keyframes hotspotPulse{ 0%{ transform:scale(1); opacity:.6; } 100%{ transform:scale(2.4); opacity:0; } }
@media (prefers-reduced-motion:reduce){ .hotspot circle.ring{ animation:none; opacity:.3; } }
.svg-tip{
  position:absolute; z-index:10; max-width:220px; background:var(--bg-panel-2); border:1px solid var(--border-soft);
  border-left:2px solid var(--c-case,var(--c2)); border-radius:8px; padding:.6rem .8rem; font-size:.8rem;
  color:var(--text-primary); line-height:1.35; pointer-events:none; opacity:0; transform:translateY(4px);
  transition:opacity .15s ease, transform .15s ease; box-shadow:0 10px 30px rgba(0,0,0,.4);
}
.svg-tip.show{ opacity:1; transform:translateY(0); }
