/* Medicina Oscura · hoja de estilos
   Fuentes alojadas en el propio dominio: no se envía la IP del visitante a terceros. */
@font-face { font-family: "Cormorant"; src: url("../fonts/cormorant-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../fonts/cormorant-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../fonts/cormorant-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../fonts/cormorant-latin-600-italic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../fonts/cormorant-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IM Fell English"; src: url("../fonts/im-fell-english-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IM Fell English"; src: url("../fonts/im-fell-english-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IM Fell English SC"; src: url("../fonts/im-fell-english-sc-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

  /* Diseño de un solo tema, a propósito: claroscuro de marca.
     Hueso #E8DCC4 · sepia #8A6D3B · rojo #7C2B22 solo como acento.
     La luz fecha la escena: vela, gas, bombilla, fluorescente. */
  @font-face { font-family: "Old Standard TT"; src: url("../fonts/old-standard-tt-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Old Standard TT"; src: url("../fonts/old-standard-tt-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Old Standard TT"; src: url("../fonts/old-standard-tt-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("../fonts/libre-franklin-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("../fonts/libre-franklin-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
:root {
    color-scheme: dark;
    --soot: #0b0907;
    --soot-2: #13100c;
    --soot-3: #1c1711;
    --line: #2f271d;
    --bone: #e8dcc4;
    --bone-dim: #b3a58c;
    --sepia: #8a6d3b;
    --blood: #7c2b22;
    --blood-hi: #b8483a;
    --candle: #e0a458;
    --gas: #c8c27a;
    --bulb: #f1e7cc;
    --fluo: #9fc2d4;
    --present: #7fa3b8;
    --display: "Cormorant", Garamond, "Times New Roman", serif;
    --sc: "IM Fell English SC", "IM Fell English", Garamond, serif;
    --fell: "IM Fell English", Garamond, serif;
    --body: "Newsreader", Georgia, serif;
    --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  }
  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  html { background: var(--soot); scroll-behavior: smooth; }
  body { background: var(--soot); color: var(--bone); font: 400 1.08rem/1.6 var(--body); padding-inline: 20px; overflow-x: hidden; }
  .wrap { max-width: 1200px; margin-inline: auto; }
  h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.02; margin: 0; text-wrap: balance; }
  p { margin: 0; }
  a { color: var(--candle); }
  button, input, textarea { font: inherit; color: inherit; }
  :focus-visible { outline: 2px solid var(--candle); outline-offset: 3px; }
  .sc { font-family: var(--sc); letter-spacing: .08em; }
  .mono { font-family: var(--mono); }
  .kicker { font: 400 .95rem/1.2 var(--sc); letter-spacing: .14em; color: var(--sepia); text-transform: lowercase; }
  .dim { color: var(--bone-dim); }

  /* Grano de papel antiguo */
  .grain { position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .07; mix-blend-mode: overlay; background-size: 220px; }

  /* Navegación */
  .nav {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
    margin-inline: -20px; padding: 14px 20px;
    background: linear-gradient(var(--soot) 55%, transparent);
  }
  .nav .wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
  .mark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bone); }
  .mark svg { width: 30px; height: 30px; }
  .mark b { font: 600 1.45rem/1 var(--display); letter-spacing: .02em; }
  .mark b i { font-style: italic; color: var(--candle); font-weight: 500; }
  .nav nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
  .nav nav a { font: 1rem var(--body); color: var(--bone-dim); text-decoration: none; padding-block: 10px; }
  .nav nav a:hover { color: var(--bone); }
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
    font: 500 1rem/1.1 var(--body); text-decoration: none; min-height: 48px;
    padding: 12px 22px; border: 1px solid var(--candle); background: var(--candle); color: var(--soot);
    transition: background .2s cubic-bezier(.2,.8,.2,1), color .2s, transform .12s;
  }
  .btn:hover { background: var(--bone); border-color: var(--bone); }
  .btn.line { background: transparent; color: var(--bone); border-color: var(--line); }
  .btn.line:hover { border-color: var(--bone); }
  .btn.sm { padding: 8px 16px; min-height: 40px; font-size: .95rem; }
  .btn:active { transform: translateY(1px); }

  /* ───────── Hero: el folio a la luz de la vela ───────── */
  .hero { position: relative; margin-inline: -20px; padding: 40px 20px 90px; overflow: hidden; isolation: isolate; }
  .folio {
    position: absolute; inset: 0; z-index: -2; padding: 40px 5vw;
    color: var(--sepia); font-family: var(--fell);
    -webkit-mask-image: radial-gradient(circle at var(--x, 72%) var(--y, 42%), #000 0, rgba(0,0,0,.85) calc(var(--r, 260px) * .45), transparent var(--r, 260px));
            mask-image: radial-gradient(circle at var(--x, 72%) var(--y, 42%), #000 0, rgba(0,0,0,.85) calc(var(--r, 260px) * .45), transparent var(--r, 260px));
    display: grid; grid-template-columns: 1fr 1fr; gap: 4vw; align-content: center; user-select: none;
  }
  .folio .col { display: grid; gap: 18px; align-content: start; }
  .folio .drop { font: 400 1.35rem/1.45 var(--fell); color: var(--bone-dim); }
  .folio .drop::first-letter { float: left; font-size: 5.6em; line-height: .8; padding: 6px 12px 0 0; color: var(--blood-hi); }
  .folio .lat { font-style: italic; font-size: 1.2rem; line-height: 1.5; }
  .folio .rx { font: 400 12rem/1 var(--fell); color: var(--sepia); opacity: .8; text-align: right; }
  .folio .legend { font: 400 .95rem/1.7 var(--sc); letter-spacing: .06em; column-count: 2; }
  .folio .rule { height: 1px; background: currentColor; opacity: .5; }
  .candle-glow {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(circle at var(--x, 72%) var(--y, 42%), rgba(224,164,88,.18), rgba(224,164,88,.05) calc(var(--r, 260px) * .8), transparent calc(var(--r, 260px) * 1.3));
  }
  .hero-inner { position: relative; max-width: 1200px; margin-inline: auto; display: grid; gap: 28px; padding-top: 7vh; }
  .hero-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(11,9,7,.92) 0%, rgba(11,9,7,.6) 42%, transparent 70%); }
  .hero h1 { font-size: clamp(3.1rem, 8.4vw, 7.4rem); font-weight: 600; letter-spacing: -.01em; max-width: 11ch; }
  .hero h1 .strike { position: relative; white-space: nowrap; }
  .hero h1 .strike::after { content: ""; position: absolute; left: -2%; right: -2%; top: 55%; height: .07em; background: var(--blood-hi); transform: rotate(-2deg) scaleX(0); transform-origin: left; animation: strike 1s .8s cubic-bezier(.7,0,.3,1) forwards; }
  @keyframes strike { to { transform: rotate(-2deg) scaleX(1); } }
  .hero .lede { max-width: 36em; font-size: 1.22rem; color: var(--bone-dim); }
  .hero .lede b { color: var(--bone); font-weight: 500; }
  .hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
  .hint { font: italic .95rem var(--body); color: var(--sepia); }
  @media (hover: none) { .hint { display: none; } }
  @keyframes flick { 0%,100% { opacity: 1; } 40% { opacity: .55; } 60% { opacity: .9; } }

  /* Cifras */

  section.sec { padding-block: 110px 20px; }
  .sec-head { display: grid; gap: 14px; margin-bottom: 44px; max-width: 46rem; }
  .sec-head h2 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
  .sec-head h2 em { font-style: italic; font-weight: 500; color: var(--candle); }
  .sec-head p { color: var(--bone-dim); max-width: 36em; font-size: 1.12rem; }

  /* ───────── Episodio destacado ───────── */
  .feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
  .poster {
    position: relative; aspect-ratio: 4 / 5; max-width: 100%; overflow: hidden; isolation: isolate;
    background:
      radial-gradient(ellipse at 30% 28%, color-mix(in srgb, var(--light, var(--candle)) 38%, transparent), transparent 62%),
      repeating-linear-gradient(118deg, rgba(232,220,196,.05) 0 1px, transparent 1px 5px),
      repeating-linear-gradient(28deg, rgba(232,220,196,.035) 0 1px, transparent 1px 7px),
      var(--soot-2);
    border: 1px solid var(--line);
    display: flex; flex-direction: column; justify-content: space-between; padding: 26px;
  }
  .poster::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(232,220,196,.14); pointer-events: none; }
  .poster .yr {
    position: absolute; right: -3%; bottom: 10%; z-index: -1;
    font: 700 clamp(7rem, 20vw, 15rem)/.8 var(--display); letter-spacing: -.04em;
    color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--light, var(--candle)) 55%, transparent);
  }
  .poster .ptop { display: flex; justify-content: space-between; font: 400 1rem var(--sc); letter-spacing: .06em; color: var(--bone-dim); }
  .poster h3 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); text-transform: uppercase; letter-spacing: .01em; line-height: .92; }
  .poster h3 em { display: block; font-style: italic; text-transform: none; font-weight: 500; color: var(--light, var(--candle)); font-size: .62em; margin-top: 10px; letter-spacing: 0; }
  .poster .drip { width: 44px; height: 3px; background: var(--blood-hi); margin-bottom: 14px; }
  .feature .info { display: grid; gap: 22px; }
  .feature .info h2 { font-size: clamp(2.4rem, 5vw, 4rem); }
  .feature .info > p { color: var(--bone-dim); font-size: 1.15rem; max-width: 34em; }
  .chapters { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
  .chapters li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .chapters time { font: .82rem/1.9 var(--mono); color: var(--candle); font-variant-numeric: tabular-nums; }
  .platforms { display: flex; gap: 10px; flex-wrap: wrap; }
  .ex { font: italic .95rem var(--body); color: var(--sepia); }

  /* ───────── Recorrido por la luz ───────── */

  dialog.hito-dlg {
    width: min(92vw, 720px); max-height: 88vh; padding: 0; border: 1px solid var(--line);
    background: var(--soot-2); color: var(--bone);
  }
  dialog.hito-dlg::backdrop { background: rgba(5,4,3,.82); backdrop-filter: blur(3px); }
  .dlg-top { padding: 34px 32px 26px; background: radial-gradient(ellipse at 20% 0, color-mix(in srgb, var(--c, var(--candle)) 30%, transparent), transparent 70%); border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
  .dlg-top h3 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
  .dlg-body { padding: 26px 32px 32px; display: grid; gap: 22px; }
  .dlg-body p { max-width: 60ch; }
  .today { border-left: 2px solid var(--present); padding: 6px 0 6px 18px; }
  .today .ex { color: var(--present); display: block; margin-bottom: 6px; font-style: normal; font-weight: 500; }
  .tags { display: flex; gap: 8px; flex-wrap: wrap; }
  .tag { font: 400 .95rem var(--sc); letter-spacing: .04em; padding: 3px 10px; border: 1px solid var(--line); color: var(--bone-dim); }
  .dlg-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; display: grid; place-items: center; background: var(--soot); border: 1px solid var(--line); cursor: pointer; }

  /* ───────── Ayer / Hoy ───────── */
  .pairs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
  .pair-btn { font: 500 1rem var(--body); min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--bone-dim); }
  .pair-btn[aria-pressed="true"] { color: var(--soot); background: var(--bone); border-color: var(--bone); }
  .compare { position: relative; border: 1px solid var(--line); overflow: hidden; min-height: 400px; touch-action: pan-y; user-select: none; }
  .side { position: absolute; inset: 0; padding: 44px 44px; display: grid; align-content: center; gap: 16px; }
  .side.then { background: radial-gradient(ellipse at 25% 40%, rgba(224,164,88,.22), transparent 60%), repeating-linear-gradient(118deg, rgba(138,109,59,.10) 0 1px, transparent 1px 6px), #16110b; }
  .side.now { background: radial-gradient(ellipse at 75% 40%, rgba(127,163,184,.22), transparent 60%), linear-gradient(#0e1418, #0b1013); clip-path: inset(0 0 0 var(--split, 50%)); justify-items: end; text-align: right; }
  .side .when { font: 600 clamp(3.4rem, 9vw, 6.4rem)/.9 var(--display); }
  .side.then .when { color: var(--candle); font-style: italic; }
  .side.now .when { color: var(--present); font-family: var(--mono); font-weight: 400; font-size: clamp(2.6rem, 7vw, 5rem); letter-spacing: -.03em; }
  .side h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); max-width: 16ch; }
  .side.now h3 { font-family: var(--body); font-weight: 500; }
  .side p { max-width: 30ch; color: var(--bone-dim); }
  .side.now p { color: #b9c7cf; }
  .handle { position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 2px; background: var(--bone); transform: translateX(-1px); cursor: ew-resize; }
  .handle button { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--bone); color: var(--soot); font: 600 .9rem var(--mono); cursor: ew-resize; box-shadow: 0 0 0 6px rgba(232,220,196,.15); }

  /* ───────── Mito o verdad ───────── */
  .quiz { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 56px; align-items: center; }
  .case {
    position: relative; background: #e9dec6; color: #2a2016; padding: 40px 36px 32px; min-height: 420px;
    display: flex; flex-direction: column; gap: 18px; box-shadow: 0 30px 60px rgba(0,0,0,.5);
    background-image: repeating-linear-gradient(transparent 0 31px, rgba(138,109,59,.18) 31px 32px);
    transform: rotate(-.6deg);
  }
  .case::before { content: ""; position: absolute; left: 22px; top: 0; bottom: 0; width: 1px; background: rgba(124,43,34,.35); }
  .case .cmeta { display: flex; justify-content: space-between; align-items: center; font: 400 1rem var(--sc); letter-spacing: .04em; color: #6b5636; }
  .case .q { font: 500 1.9rem/1.2 var(--fell); }
  .case .why { font-size: 1.02rem; color: #4a3b28; }
  .case .acts { display: flex; gap: 10px; margin-top: auto; flex-wrap: wrap; }
  .case .acts button { flex: 1 1 130px; min-height: 48px; padding: 12px; cursor: pointer; font: 500 1.05rem var(--body); background: transparent; border: 1.5px solid #2a2016; color: #2a2016; }
  .case .acts button:hover { background: #2a2016; color: #e9dec6; }
  .stamp {
    position: absolute; top: 58px; right: 22px; font: 400 2rem/1 var(--sc); letter-spacing: .1em; padding: 6px 14px;
    border: 3px double currentColor; transform: rotate(-12deg) scale(1); opacity: .88; animation: stamp .35s cubic-bezier(.2,1.6,.4,1);
  }
  .stamp.mito { color: var(--blood); }
  .stamp.verdad { color: #3b5e2e; }
  @keyframes stamp { from { transform: rotate(-12deg) scale(2.4); opacity: 0; } }
  .score-dots { display: flex; gap: 6px; }
  .score-dots i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid #6b5636; }
  .score-dots i.ok { background: #3b5e2e; border-color: #3b5e2e; }
  .score-dots i.ko { background: var(--blood); border-color: var(--blood); }

  /* ───────── Gabinete ───────── */
  .cabinet { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px; background: linear-gradient(#2a1d12, #1b130c); border: 1px solid #3a2a1a; box-shadow: inset 0 0 60px rgba(0,0,0,.6); }
  .drawer {
    position: relative; min-height: 150px; background: linear-gradient(#3b2a1a, #2c1f13); border: 1px solid #4a3522; cursor: pointer;
    display: grid; place-items: center; gap: 10px; padding: 18px 12px; text-align: center; perspective: 600px;
  }
  .drawer .plate { background: #e3d5b8; color: #2a2016; padding: 8px 12px; font: 400 1.05rem/1.1 var(--sc); letter-spacing: .08em; border: 1px solid #8a6d3b; box-shadow: 0 2px 0 rgba(0,0,0,.4); }
  .drawer .knob { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #d9b77a, #7a5a2c); box-shadow: 0 2px 3px rgba(0,0,0,.6); }
  .drawer:hover { border-color: var(--candle); }
  .drawer[aria-expanded="true"] { background: #e9dec6; color: #2a2016; cursor: default; align-content: start; text-align: left; place-items: start; }
  .drawer[aria-expanded="true"] .knob { display: none; }
  .drawer .open-txt { font-size: .95rem; line-height: 1.45; }
  .drawer .open-txt b { display: block; font: 600 1.3rem/1.1 var(--display); margin-bottom: 6px; }
  .drawer .open-txt small { display: block; margin-top: 8px; font: 400 .95rem var(--sc); color: #6b5636; }

  /* ───────── Archivo ───────── */
  .tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); flex-wrap: wrap; margin-bottom: 30px; }
  .tab { background: none; border: 0; cursor: pointer; min-height: 44px; padding: 0 0 12px; margin-bottom: -1px; font: 500 1.6rem var(--display); color: var(--bone-dim); border-bottom: 2px solid transparent; }
  .tab[aria-selected="true"] { color: var(--bone); border-bottom-color: var(--candle); }
  .tab sup { font: .8rem var(--body); color: var(--sepia); margin-left: 4px; }
  .shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .shelf .poster { aspect-ratio: 3 / 4; }
  .shelf > * { text-decoration: none; color: inherit; display: grid; gap: 14px; }
  .shelf > a:hover .poster { border-color: var(--light, var(--candle)); }
  .shelf .poster .yr { bottom: 34%; }
  .feature .info > p.ex { font-size: .7rem; color: var(--sepia); }
  .shelf .poster h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
  .shelf .meta { display: flex; justify-content: space-between; gap: 10px; font: .95rem var(--body); color: var(--bone-dim); }
  .stages { display: flex; gap: 4px; }
  .stages i { width: 22px; height: 4px; background: var(--line); }
  .stages i.on { background: var(--candle); }

  /* ───────── Receta ───────── */
  .pad {
    position: relative; background: #efe6d2; color: #2a2016; padding: 40px 38px 30px; box-shadow: 0 30px 70px rgba(0,0,0,.55);
    transform: rotate(.8deg); display: grid; gap: 16px;
  }
  .pad .head { display: flex; justify-content: space-between; align-items: start; border-bottom: 2px solid #2a2016; padding-bottom: 14px; gap: 12px; }
  .pad .head b { font: 600 1.5rem/1.1 var(--display); }
  .pad .head small { display: block; font: italic .92rem var(--body); color: #6b5636; margin-top: 4px; }
  .pad .big-rx { font: 400 4.2rem/1 var(--fell); color: var(--blood); }
  .pad ol { margin: 0; padding-left: 20px; font: 1.12rem/1.6 var(--fell); }
  .pad label { font: 500 .95rem var(--body); color: #4a3b28; display: grid; gap: 6px; }
  .pad input { background: transparent; border: 0; border-bottom: 1.5px dashed #6b5636; padding: 8px 2px; font: 1.1rem var(--fell); color: #2a2016; }
  .pad input:focus-visible { outline: none; border-bottom-style: solid; border-color: var(--blood); }
  .pad .sign { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
  .pad .sign span { font: italic 1.5rem var(--fell); color: #3a2c1c; }
  .pad button { min-height: 48px; padding: 12px 22px; cursor: pointer; background: #2a2016; color: #efe6d2; border: 0; font: 500 1.02rem var(--body); }
  .pad button:active { transform: translateY(1px); }
  .pad button:hover { background: var(--blood); }
  .note { font: 500 .98rem var(--body); color: var(--blood); min-height: 1.2em; }
  .buzon { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 22px; }
  .buzon label { font: 500 1.05rem var(--body); color: var(--bone); }
  .buzon .row { display: flex; gap: 10px; flex-wrap: wrap; }
  .buzon input { flex: 1 1 220px; background: var(--soot-2); border: 1px solid var(--line); padding: 12px 14px; font: 1rem var(--body); }
  .buzon .note { color: var(--candle); }

  footer { margin-top: 120px; border-top: 1px solid var(--line); padding-block: 44px 60px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
  footer .motto { font: italic 500 clamp(2rem, 5vw, 3.6rem)/1 var(--display); color: var(--bone-dim); }
  footer .motto small { display: block; font: italic .95rem var(--body); margin-top: 10px; color: var(--sepia); max-width: 34em; }

  @media (max-width: 900px) {
    .sec-head, .feature, .quiz, .rx-wrap { grid-template-columns: 1fr; }
    .cabinet { grid-template-columns: repeat(2, 1fr); }
    .shelf { grid-template-columns: 1fr 1fr; }
    .folio { grid-template-columns: 1fr; }
    .folio .rx { display: none; }
    .nav nav { margin-left: 0; width: 100%; gap: 16px; }
    footer { grid-template-columns: 1fr; }
  }
  @media (max-width: 560px) {
    .shelf { grid-template-columns: 1fr; }
    .side { padding: 28px 22px; }
    .case, .pad { padding: 30px 22px 24px; }
    .case .q { font-size: 1.5rem; }
    .stamp { font-size: 1.4rem; top: 14px; right: 12px; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .hero h1 .strike::after { transform: rotate(-2deg) scaleX(1); }
    html { scroll-behavior: auto; }
  }

/* ───────── Colores de época como clases (sin estilos en línea, por la CSP) ───────── */
.c-candle { --c: var(--candle); }
.c-gas { --c: var(--gas); }
.c-bulb { --c: var(--bulb); }
.c-fluo { --c: var(--fluo); }
.poster { --light: var(--c, var(--candle)); }
.quiz-title { font-size: clamp(2.6rem, 6vw, 5rem); margin-top: 12px; }
.quiz-title em { color: var(--candle); font-weight: 500; }
.quiz-intro { margin-top: 22px; max-width: 30em; font-size: 1.15rem; }
.note-top { margin-top: 22px; }
.dlg-era { font: 500 .9rem var(--mono); color: var(--c, var(--candle)); font-variant-numeric: tabular-nums; }

/* ───────── Imágenes (si faltan, queda el cartel tipográfico) ───────── */
.hero-img { position: absolute; top: 0; right: 0; bottom: 0; width: 62%; z-index: -3; overflow: hidden; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; opacity: .5; filter: saturate(.8);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%); mask-image: linear-gradient(90deg, transparent, #000 35%); }
.poster-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .62; }
.poster:has(.poster-img:not(.missing))::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(transparent 35%, rgba(11,9,7,.92)); }
img.missing { display: none; }

/* ───────── Formularios: casillas y primera capa informativa ───────── */
.check { display: flex; gap: 10px; align-items: flex-start; font: .9rem/1.45 var(--body); letter-spacing: 0; text-transform: none; color: inherit; cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blood); }
.pad .check { color: #3a2c1c; }
.pad .check a { color: var(--blood); }
.first-layer { font: .85rem/1.5 var(--body); color: #5a4830; border-top: 1px dashed #b9a883; padding-top: 10px; }
.first-layer a { color: var(--blood); }
.buzon .first-layer { color: var(--bone-dim); border-top-color: var(--line); }
.buzon .first-layer a, .buzon .check a { color: var(--candle); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.note.ok { color: #3b5e2e; }
.buzon .note.ok { color: var(--gas); }
button[disabled] { opacity: .6; cursor: progress; }

/* ───────── Pie legal ───────── */
.legal-links { display: flex; gap: 8px 20px; flex-wrap: wrap; font: .95rem var(--body); }
.legal-links a, .linklike { color: var(--bone-dim); text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.legal-links a:hover, .linklike:hover { color: var(--bone); }
footer .foot-right { display: grid; gap: 14px; justify-items: end; }

/* ───────── Aviso de cookies ───────── */
.consent { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  max-width: 560px; margin-left: auto; background: var(--soot-2); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0,0,0,.6);
  padding: 22px; display: grid; gap: 14px; }
.consent h2 { font-size: 1.6rem; }
.consent p { font-size: .95rem; color: var(--bone-dim); }
.consent .row { display: flex; gap: 10px; flex-wrap: wrap; }
.consent .row .btn { flex: 1 1 140px; }
.consent .cat { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.consent .cat b { font: 600 1.1rem var(--display); }
.consent .cat small { grid-column: 1; color: var(--bone-dim); font-size: .85rem; }
.consent .cat input { width: 20px; height: 20px; accent-color: var(--candle); grid-row: 1 / span 2; grid-column: 2; }

/* ───────── Páginas legales ───────── */
.legal { max-width: 760px; margin-inline: auto; padding-block: 40px 20px; }
.legal h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); margin: 10px 0 8px; }
.legal .updated { font: italic .95rem var(--body); color: var(--sepia); }
.legal h2 { font-size: 1.8rem; margin: 40px 0 12px; }
.legal h3 { font-size: 1.3rem; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--bone-dim); max-width: 68ch; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; display: grid; gap: 6px; }
.legal strong { color: var(--bone); font-weight: 500; }
.legal .todo { background: rgba(184,72,58,.14); color: var(--bone); padding: 0 4px; font-family: var(--mono); font-size: .85em; }
.legal .tbl { overflow-x: auto; margin-top: 12px; }
.legal table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--bone-dim); }
.legal th { font: 500 .9rem var(--body); color: var(--bone); }
.legal .back { font: .98rem var(--body); color: var(--candle); }

/* ───────── Revisión de diseño (frontend-design, impeccable, taste, ui-ux-pro-max) ───────── */
::selection { background: var(--blood); color: var(--bone); }
html { scrollbar-color: var(--line) var(--soot); caret-color: var(--candle); }
a { text-underline-offset: .2em; text-decoration-thickness: 1px; }
.ic { width: 1.15em; height: 1.15em; flex: none; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 70; background: var(--bone); color: var(--soot); padding: 10px 16px; font: 500 1rem var(--body); }
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }
.textlink { color: var(--bone); font: 500 1.05rem var(--body); align-self: center; text-decoration: underline; text-decoration-color: var(--candle); text-underline-offset: .3em; }
.textlink:hover { color: var(--candle); }
.meta-line { font: italic 1.05rem var(--body); color: var(--sepia); margin-top: -8px; }
.soon { font: italic 1rem var(--body); color: var(--bone-dim); align-self: center; }
.pair-btn, .chip, .drawer, .hito, .tab, .arrows button { cursor: pointer; }

/* Archivo asimétrico: una pieza protagonista y dos secundarias */
.shelf { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: auto auto; }
.shelf > :first-child { grid-row: span 2; }
.shelf > :not(:first-child) .poster { aspect-ratio: 16 / 10; }
.shelf > :not(:first-child) .poster h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.shelf > :not(:first-child) .poster .yr { font-size: clamp(5rem, 11vw, 9rem); bottom: 18%; }
@media (max-width: 700px) {
  .shelf { grid-template-columns: 1fr; }
  .shelf > :first-child { grid-row: auto; }
}
.pad label.check, .buzon label.check { display: flex; font-weight: 400; }
.shelf > :not(:first-child) .poster .yr { top: 8%; bottom: auto; }
/* Con la imagen de la portada cargada, el ℞ del folio taparía el rostro */
.hero:has(.hero-img img:not(.missing)) .folio .rx { visibility: hidden; }

/* ═════════ Rediseño: el recorrido por la luz ═════════ */

/* Cabecera compacta */
.nav { padding-block: 10px; background: color-mix(in srgb, var(--soot) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.nav .wrap { flex-wrap: nowrap; gap: 14px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { font: 1rem var(--body); color: var(--bone-dim); text-decoration: none; padding-block: 10px; }
.nav-links a:hover { color: var(--bone); }
.nav-social { display: flex; gap: 2px; }
.icon-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; color: var(--bone-dim); text-decoration: none; background: none; border: 0; cursor: pointer; font: 1rem var(--body); }
.icon-link:hover { color: var(--bone); }
.icon-link .ic { width: 1.35em; height: 1.35em; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0; padding: 8px 20px 16px; background: var(--soot-2); border-bottom: 1px solid var(--line); }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding-block: 12px; border-bottom: 1px solid var(--line); }
  .nav-social { margin-left: auto; }
  .menu-btn { display: inline-flex; }
  .mark b { font-size: 1.2rem; }
}
@media (max-width: 420px) { .nav-social { display: none; } .nav .btn.sm { margin-left: auto; } }

/* Portada: la vela ilumina la escena */
.hero { padding: 24px 20px 72px; }
.hero-inner { padding-top: 9vh; gap: 24px; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 5rem); max-width: 12.5ch; line-height: 1.02; }
.hero-img { inset: 0; width: auto; }
.hero-img img { opacity: 1; object-position: 70% 40%; filter: saturate(.85);
  -webkit-mask-image: radial-gradient(circle at var(--x, 72%) var(--y, 42%), #000 0, rgba(0,0,0,.55) calc(var(--r, 260px) * .9), rgba(0,0,0,.2) calc(var(--r, 260px) * 2));
  mask-image: radial-gradient(circle at var(--x, 72%) var(--y, 42%), #000 0, rgba(0,0,0,.55) calc(var(--r, 260px) * .9), rgba(0,0,0,.2) calc(var(--r, 260px) * 2)); }
.folio { left: 52%; padding-inline: 2vw 4vw; grid-template-columns: 1fr; opacity: .55; }
.folio .col + .col { display: none; }
.hero-shade { background: linear-gradient(90deg, rgba(11,9,7,.95) 0%, rgba(11,9,7,.8) 34%, rgba(11,9,7,.2) 62%, transparent 80%), linear-gradient(transparent 70%, var(--soot)); }
@media (max-width: 700px) {
  .hero { padding-bottom: 48px; }
  .hero-inner { padding-top: 34vh; }
  .hero-img img { object-position: 78% 30%; }
  .hero-shade { background: linear-gradient(transparent 15%, rgba(11,9,7,.85) 48%, var(--soot) 75%); }
  .folio { display: none; }
}

/* Recorrido: textos de cada época */
.era-note { color: var(--bone-dim); font-style: italic; max-width: 32em; }
.era-fact { font: 500 clamp(1.4rem, 2.6vw, 2rem)/1.3 var(--display); color: var(--bone-dim); max-width: 26em; padding-left: 18px; border-left: 1px solid var(--c); }
.era-fact b { color: var(--bone); font-weight: 700; }
.era-cases { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; max-width: 46rem; }
.case-btn { display: grid; gap: 2px; text-align: left; min-height: 44px; padding: 10px 16px; background: rgba(11,9,7,.6); border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); cursor: pointer; color: var(--bone); backdrop-filter: blur(4px); transition: border-color .2s, background .2s; }
.case-btn:hover, .case-btn:focus-visible { border-color: var(--c); background: rgba(11,9,7,.8); }
.case-btn .y { font: 500 .8rem var(--mono); color: var(--c); }
.case-btn b { font: 600 1.15rem/1.15 var(--display); }
/* La letra también fecha la época */
.f-vela h3 { font-family: "IM Fell English", var(--display); font-weight: 400; font-style: italic; }
.f-gas h3 { font-family: "Old Standard TT", var(--display); font-weight: 700; letter-spacing: -.01em; }
.f-bombilla h3 { font-family: "Libre Franklin", "Franklin Gothic Medium", Arial, sans-serif; font-weight: 800; letter-spacing: -.02em; }
.f-fluorescente h3 { font-family: "Atkinson Hyperlegible", Arial, sans-serif; font-weight: 700; letter-spacing: -.01em; }

/* Ayer y hoy con imágenes de encuadre rimado */
.compare { min-height: 0; aspect-ratio: 16 / 9; max-height: 620px; width: 100%; }
.side { padding: 0; display: block; }
.side img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.side.then img { filter: saturate(.9); }
.side .when { position: absolute; bottom: 14px; font: 600 clamp(1.6rem, 4vw, 2.8rem)/1 var(--display); padding: 4px 12px; background: rgba(11,9,7,.6); }
.side.then .when { left: 14px; color: var(--candle); font-style: italic; }
.side.now .when { right: 14px; color: var(--present); font-family: var(--mono); font-weight: 400; font-size: clamp(1.3rem, 3vw, 2.2rem); background: rgba(10,16,20,.65); }
.captions { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 20px; }
.captions h3 { font-size: 1.6rem; margin-bottom: 6px; }
.captions p { color: var(--bone-dim); max-width: 34em; }
.captions .hoy h3 { font-family: "Atkinson Hyperlegible", Arial, sans-serif; font-weight: 700; font-size: 1.35rem; }
.captions .hoy { border-left: 1px solid var(--present); padding-left: 18px; }
.captions .ayer { border-left: 1px solid var(--candle); padding-left: 18px; }
@media (max-width: 700px) { .captions { grid-template-columns: 1fr; } .compare { aspect-ratio: 4 / 3; } }

.platforms .btn .ic { width: 1.25em; height: 1.25em; }

/* Quiz: el sello ya no tapa la pregunta */
.stamp { position: static; display: inline-block; align-self: flex-start; margin-block: 2px; }

/* Gabinete con los objetos */
.drawer[aria-expanded="true"] { padding: 0; display: grid; grid-template-rows: auto 1fr; place-items: stretch; }
.drawer .obj { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #000; }
.drawer[aria-expanded="true"] .open-txt { padding: 14px 14px 16px; }
.drawer[aria-expanded="true"] { cursor: pointer; }
.cabinet { align-items: start; }

/* Archivo y buzón */
.more { margin-top: 20px; }
.buzon-sec { padding-top: 64px; }
.buzon-sec .buzon { max-width: 42rem; border-top: 0; padding-top: 0; }

/* Pie */
.foot-social { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.foot-social .icon-link { padding-inline: 4px; }

/* Ajustes tras la primera revisión visual */
.nav .nav-links { display: flex; width: auto; margin-left: auto; gap: 22px; }
@media (max-width: 900px) {
  .nav .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0; padding: 8px 20px 16px; background: var(--soot-2); border-bottom: 1px solid var(--line); }
  .nav.open .nav-links { display: flex; }
}
.folio .legend, .folio .rule { display: none; }
.folio { opacity: .4; align-content: end; padding-bottom: 12vh; }
/* Cajón abierto: miniatura y texto, sin estirar la fila */
.drawer[aria-expanded="true"] { grid-template-columns: 96px 1fr; grid-template-rows: auto; align-items: start; }
.drawer[aria-expanded="true"] .obj { width: 96px; height: 96px; }
.drawer[aria-expanded="true"] .open-txt { padding: 12px 12px 12px 0; font-size: .9rem; }
@media (max-width: 900px) {
  .drawer[aria-expanded="true"] { grid-template-columns: 1fr; }
  .drawer[aria-expanded="true"] .obj { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .drawer[aria-expanded="true"] .open-txt { padding: 12px; }
}

/* ═════════ Tres páginas y movimiento con intención ═════════
   Regla (impeccable, taste): cada animación explica algo. Respuesta a una acción,
   cambio de estado o la luz que fecha la escena. Nada se mueve solo por decorar. */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-in: cubic-bezier(.7, 0, .84, 0); }
@property --split { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Menú: la página en la que estás */
.nav-links a { position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: var(--candle); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--bone); }
@media (max-width: 900px) {
  .nav.open .nav-links { animation: drop .28s var(--ease-out); }
  .nav-links a::after { display: none; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }

/* Botones: respuesta inmediata y un halo de vela al pasar */
.btn { transition: background .2s var(--ease-out), color .2s, border-color .2s, box-shadow .3s var(--ease-out), transform .12s; }
.btn:hover { box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--candle) 55%, transparent); }
.btn.line:hover { box-shadow: 0 0 0 1px var(--bone) inset; }
.btn:active { transform: scale(.97); transition-duration: .08s; }
.textlink { text-decoration: none; background: linear-gradient(var(--candle), var(--candle)) 0 100% / 100% 1px no-repeat; padding-bottom: 3px; transition: background-size .35s var(--ease-out), color .2s; }
.textlink:hover { background-size: 0 1px; background-position: 100% 100%; }

/* ── Panel desplegable de suscripción ── */
.sub-panel {
  position: absolute; top: calc(100% + 8px); right: max(20px, calc((100vw - 1200px) / 2)); z-index: 30;
  width: min(420px, calc(100vw - 32px));
  opacity: 0; visibility: hidden; transform: translateY(-10px); clip-path: inset(0 0 100% 0);
  transition: opacity .18s var(--ease-in), transform .18s var(--ease-in), clip-path .18s var(--ease-in), visibility 0s .18s;
}
.sub-panel.open { opacity: 1; visibility: visible; transform: none; clip-path: inset(0 0 -40px 0); transition: opacity .3s var(--ease-out), transform .42s var(--ease-out), clip-path .42s var(--ease-out), visibility 0s; }
.sub-toggle[aria-expanded="true"] { background: var(--bone); border-color: var(--bone); }
.slip {
  position: relative; display: grid; gap: 12px; padding: 30px 26px 20px; background: #efe6d2; color: #2a2016;
  box-shadow: 0 30px 70px rgba(0,0,0,.6), 0 0 0 1px rgba(0,0,0,.2);
  background-image: repeating-linear-gradient(transparent 0 27px, rgba(138,109,59,.13) 27px 28px);
}
.slip h2 { font-size: 1.7rem; padding-right: 54px; }
.slip-rx { position: absolute; right: 54px; top: 14px; font: 400 2.4rem/1 var(--fell); color: var(--blood); }
.slip-lede { font: 1.02rem/1.45 var(--fell); color: #4a3b28; }
.slip label { font: 500 .92rem var(--body); color: #4a3b28; display: grid; gap: 4px; }
.slip input[type=email] { background: transparent; border: 0; border-bottom: 1.5px dashed #6b5636; padding: 8px 2px; font: 1.1rem var(--fell); color: #2a2016; }
.slip input[type=email]:focus-visible { outline: none; border-bottom-style: solid; border-color: var(--blood); }
.slip .check { color: #3a2c1c; font-size: .86rem; }
.slip .check a, .slip .first-layer a { color: var(--blood); }
.slip .btn { background: #2a2016; border-color: #2a2016; color: #efe6d2; justify-self: start; }
.slip .btn:hover { background: var(--blood); border-color: var(--blood); box-shadow: none; }
.slip .first-layer { font-size: .76rem; }
.slip-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: #2a2016; cursor: pointer; }
.slip-close:hover { color: var(--blood); }
@media (max-width: 560px) { .sub-panel { right: 16px; } .slip { padding: 26px 20px 16px; } }

/* Sello al firmar: confirma la acción con el gesto de la marca */
.pad, .slip { isolation: isolate; }
.rx-stamp {
  position: absolute; right: 18px; bottom: 34%; z-index: 2; pointer-events: none;
  font: 400 1.9rem/1 var(--sc); letter-spacing: .12em; color: #3b5e2e; padding: 6px 14px;
  border: 3px double currentColor; transform: rotate(-11deg); opacity: .85; mix-blend-mode: multiply;
  animation: stamp-in .4s cubic-bezier(.2,1.5,.4,1);
}
@keyframes stamp-in { from { transform: rotate(-11deg) scale(2.4); opacity: 0; } }
/* Error: un leve temblor, sin color extra */
.shake { animation: shake .36s var(--ease-out); }
@keyframes shake { 20% { translate: -6px 0; } 40% { translate: 5px 0; } 60% { translate: -3px 0; } 80% { translate: 2px 0; } }
.sending button[type=submit] { position: relative; color: transparent !important; }
.sending button[type=submit]::after { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #efe6d2; border-right-color: transparent; animation: spin .7s linear infinite; }
.buzon.sending button[type=submit]::after { border-color: var(--bone); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(1turn); } }

/* ── Cabecera de las páginas interiores ── */
.page-head { position: relative; isolation: isolate; margin-inline: -20px; padding: 13vh 20px 20px; }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 55% 80% at 78% 0, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%); }
.page-head .wrap { display: grid; gap: 18px; }
.page-head h1 { font-size: clamp(2.8rem, 7vw, 5.6rem); max-width: 14ch; }
.page-head .lede { color: var(--bone-dim); max-width: 36em; font-size: 1.18rem; }
.page-head + .wrap > .sec:first-child { padding-top: 56px; }

/* ── Ayer y hoy: el separador viaja solo y enseña que se puede arrastrar ── */
.compare.glide { transition: --split .9s var(--ease-out); }
.compare.swap .side img { animation: fade-in .45s var(--ease-out); }
@keyframes fade-in { from { opacity: 0; } }
.pair-btn { transition: background .2s, color .2s, border-color .2s; }
.pair-btn:hover { border-color: var(--bone-dim); color: var(--bone); }
.handle button { transition: transform .2s var(--ease-out), box-shadow .3s; }
.compare:hover .handle button, .handle button:focus-visible { box-shadow: 0 0 0 10px rgba(232,220,196,.12); }

/* Archivo completo: rejilla uniforme e indicador de pestaña que se desliza */
.shelf.full { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); grid-template-rows: none; }
.shelf.full > :first-child { grid-row: auto; }
.shelf.full > * .poster, .shelf.full > :not(:first-child) .poster { aspect-ratio: 3 / 4; }
.shelf.full > :not(:first-child) .poster h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.shelf.full > :not(:first-child) .poster .yr { font-size: clamp(7rem, 20vw, 15rem); top: auto; bottom: 34%; }
.tabs { position: relative; }
.tab { border-bottom-color: transparent !important; transition: color .2s; }
.tab:hover { color: var(--bone); }
.tab-ink { position: absolute; left: 0; bottom: -1px; height: 2px; width: var(--ink-w, 0); background: var(--candle); transform: translateX(var(--ink-x, 0)); transition: transform .4s var(--ease-out), width .4s var(--ease-out); }

/* Buzón en la página de episodios */
.buzon h2 { font-size: clamp(2rem, 4.4vw, 3rem); }
.buzon .row input { transition: border-color .2s; }
.buzon .row input:focus-visible { outline: none; border-color: var(--candle); }

/* ── Gabinete: carta que se reparte, cajón que se desliza ── */
.case .acts button { transition: background .18s, color .18s, transform .1s; }
.case .acts button:active { transform: scale(.97); }
.score-dots i.new { animation: pop .4s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { from { transform: scale(0); } }
.drawer { transition: border-color .25s, transform .3s var(--ease-out), box-shadow .3s var(--ease-out); }
.drawer:hover { transform: translateY(-3px); box-shadow: 0 10px 18px -8px rgba(0,0,0,.8), 0 0 0 1px var(--candle) inset; }
.drawer:hover .knob { transform: scale(1.15); }
.drawer .knob { transition: transform .25s var(--ease-out); }
.drawer.moved > * { animation: pull .42s var(--ease-out) both; }
.drawer.moved > :nth-child(2) { animation-delay: .06s; }
@keyframes pull { from { opacity: 0; transform: perspective(600px) translateZ(-40px) translateY(-6px); } }

/* Diálogo de cada caso */
dialog.hito-dlg[open] { animation: dlg-in .38s var(--ease-out); }
dialog.hito-dlg[open]::backdrop { animation: fade-in .3s ease-out; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.case-btn { transition: border-color .2s, background .2s, transform .2s var(--ease-out); }
.case-btn:hover { transform: translateY(-2px); }

/* Movimiento reducido: sin desplazamientos; se mantienen los cambios de estado */
@media (prefers-reduced-motion: reduce) {
  .sub-panel, .sub-panel.open { transform: none; clip-path: none; }
  .drawer:hover, .case-btn:hover { transform: none; }
}

/* Ajustes tras la revisión visual de las tres páginas */
.slip, .pad { color-scheme: light; }
.slip label.check { display: flex; gap: 10px; align-items: flex-start; }
.slip .check input { accent-color: var(--blood); }
.pair-btn[aria-pressed="true"]:hover { color: var(--soot); border-color: var(--bone); }
/* Ayer y hoy: el caso lleva a su episodio o artículo */
.captions .pair-more { grid-column: 1 / -1; padding-left: 18px; }
.captions .pair-more .textlink { font-size: 1.05rem; }

/* Marca: el sello de las redes */
.mark img { width: 40px; height: 40px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px color-mix(in srgb, var(--sepia) 50%, transparent); }
@media (max-width: 900px) { .mark img { width: 34px; height: 34px; } }

/* ═════════ Portada corta: recorrido en una pantalla y cierre único ═════════ */

/* Recorrido: un escenario y cuatro luces. Solo se anima el encendido */
.lights { padding-top: 110px; }
.lights-head { display: grid; gap: 12px; margin-bottom: 28px; }
.lights-head h2 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
.lights-head p { color: var(--bone-dim); max-width: 36em; font-size: 1.12rem; }
.stage { position: relative; isolation: isolate; overflow: hidden; margin-inline: -20px; min-height: min(84vh, 760px); display: grid; align-items: stretch; border-block: 1px solid var(--line); }
.stage-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .7; filter: saturate(.95); }
.stage::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(ellipse 60% 50% at 72% 18%, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%),
  linear-gradient(90deg, rgba(11,9,7,.94) 0%, rgba(11,9,7,.74) 42%, rgba(11,9,7,.12) 78%); }
.stage-inner { width: 100%; padding: 28px 20px 40px; display: grid; grid-template-rows: auto 1fr; gap: 28px; }
.switches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 760px; }
.switch { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; min-height: 56px; padding: 10px 14px; cursor: pointer;
  background: rgba(11,9,7,.62); border: 1px solid var(--line); color: var(--bone-dim); backdrop-filter: blur(4px); transition: border-color .2s, color .2s, background .2s; }
.switch i { grid-row: span 2; width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--c); transition: background .25s, box-shadow .25s; }
.switch b { font: 500 1.02rem/1.1 var(--body); }
.switch span { font: .76rem var(--mono); color: var(--sepia); font-variant-numeric: tabular-nums; }
.switch:hover { color: var(--bone); border-color: color-mix(in srgb, var(--c) 50%, var(--line)); }
.switch[aria-selected="true"] { color: var(--bone); border-color: var(--c); background: rgba(11,9,7,.82); }
.switch[aria-selected="true"] i { background: var(--c); box-shadow: 0 0 14px 3px color-mix(in srgb, var(--c) 60%, transparent); }
.switch:active { transform: scale(.98); }
.stage-body { align-self: end; display: grid; gap: 16px; max-width: 40rem; }
.stage-body h3 { font-size: clamp(2.6rem, 6vw, 4.8rem); line-height: .98; max-width: 12ch; }
/* El encendido: cada luz entra como lo hacía de verdad */
.stage.switching.c-candle .stage-img { animation: on-candle 1.8s ease-out; }
.stage.switching.c-gas .stage-img { animation: on-gas 1.4s ease-out; }
.stage.switching.c-bulb .stage-img { animation: on-bulb .8s ease-out; }
.stage.switching.c-fluo .stage-img { animation: on-fluo 1.1s linear; }
.stage.switching .stage-body { animation: fade-in .45s ease-out; }
@keyframes on-candle { 0% { opacity: .1; } 30% { opacity: .6; } 45% { opacity: .45; } 65% { opacity: .72; } 80% { opacity: .64; } }
@keyframes on-gas { from { opacity: .1; filter: saturate(.4) brightness(.55); } }
@keyframes on-bulb { 0% { opacity: .1; } 12% { opacity: .95; filter: brightness(1.35); } 30% { opacity: .62; } }
@keyframes on-fluo { 0%, 8% { opacity: .1; } 10% { opacity: .8; } 13% { opacity: .15; } 22% { opacity: .15; } 24% { opacity: .85; } 27% { opacity: .3; } 40% { opacity: .72; } }
@media (max-width: 700px) {
  .stage { min-height: 0; }
  .stage-img { height: 46%; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
  .stage::before { background: radial-gradient(ellipse 80% 40% at 50% 8%, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%), linear-gradient(transparent 22%, rgba(11,9,7,.88) 44%, var(--soot) 58%); }
  .stage-inner { gap: 34vw; padding-bottom: 32px; }
  .switches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-body h3 { font-size: clamp(2.2rem, 11vw, 3rem); }
  .era-fact { font-size: 1.25rem; }
}

/* Cierre: suscripción y quién la escribe, juntos */
.closing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.closing-copy { display: grid; gap: 22px; align-content: start; }
.closing-copy h2 { font-size: clamp(2.4rem, 5vw, 4rem); }
.closing-copy > p { color: var(--bone-dim); font-size: 1.15rem; max-width: 30em; }
.author { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.author-img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.author-text { display: grid; gap: 8px; }
.author-text h3 { font-size: 1.7rem; }
.author-text > p:not(.meta-line) { color: var(--bone-dim); font-size: 1rem; }
.author .meta-line { margin-top: -4px; color: var(--present); font-style: normal; font-family: "Atkinson Hyperlegible", Arial, sans-serif; font-size: .95rem; }
.author .platforms { gap: 18px; margin-top: 4px; }
@media (max-width: 900px) { .closing { grid-template-columns: 1fr; gap: 36px; } }
@media (max-width: 420px) { .author { grid-template-columns: 64px minmax(0, 1fr); gap: 14px; } .author-img { width: 64px; height: 64px; } }
/* Los saltos a una sección no quedan tapados por la cabecera fija */
section[id], .stage { scroll-margin-top: 84px; }
/* Móvil: el episodio destacado sin la lista de capítulos (siguen en YouTube) */
@media (max-width: 700px) { .feature .chapters { display: none; } }

/* Créditos de imágenes */
.creditos { max-width: 1000px; }
.creditos td small { color: var(--sepia); }
.creditos td a { color: var(--candle); }
.creditos td:first-child { white-space: nowrap; color: var(--bone); }
@media (max-width: 700px) { .creditos td:first-child { white-space: normal; } }

/* Carteles con foto: sombra arriba para que se lea el número aunque la imagen sea clara */
.poster:has(.poster-img:not(.missing))::before { background: linear-gradient(rgba(11,9,7,.6), transparent 22%, transparent 38%, rgba(11,9,7,.92)); }
/* Episodio destacado: el cartel arriba aunque haya muchos capítulos */
.feature { align-items: start; }
@media (min-width: 901px) { .feature .poster { position: sticky; top: 96px; } }

/* ═════════ Página de cada episodio: la historia por escrito ═════════ */
.ep-head { position: relative; isolation: isolate; margin-inline: -20px; padding: 18vh 20px 48px; min-height: min(78vh, 720px); display: grid; align-items: end; overflow: hidden; }
.ep-head-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .55; filter: saturate(.85); }
.ep-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(ellipse 60% 50% at 75% 15%, color-mix(in srgb, var(--c) 14%, transparent), transparent 70%),
  linear-gradient(rgba(11,9,7,.35), rgba(11,9,7,.55) 40%, var(--soot) 96%); }
.ep-head-in { display: grid; gap: 16px; width: 100%; }
.ep-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 500 .85rem var(--mono); color: var(--c); }
.ep-head h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); line-height: 1; max-width: 16ch; }
.f-vela .ep-head h1 { font-family: "IM Fell English", var(--display); font-weight: 400; font-style: italic; }
.f-gas .ep-head h1 { font-family: "Old Standard TT", var(--display); font-weight: 700; letter-spacing: -.01em; }
.f-bombilla .ep-head h1 { font-family: "Libre Franklin", Arial, sans-serif; font-weight: 800; letter-spacing: -.02em; }
.f-fluorescente .ep-head h1 { font-family: "Atkinson Hyperlegible", Arial, sans-serif; font-weight: 700; }
.ep-sub { font: italic 500 clamp(1.3rem, 2.6vw, 1.8rem)/1.2 var(--display); color: var(--c); }
.ep-head .lede { max-width: 40em; font-size: 1.2rem; color: var(--bone); }
.ep-date { font: italic .98rem var(--body); color: var(--bone-dim); }

.ep-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: start; padding-top: 56px; }
.prose { max-width: 68ch; font-size: 1.16rem; line-height: 1.75; }
.prose p { margin: 0 0 1.15em; }
.prose > p:first-child::first-letter { float: left; font: 600 4.2em/.8 var(--display); padding: 6px 10px 0 0; color: var(--c); }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 2.2em 0 .7em; scroll-margin-top: 90px; }
.prose a { color: var(--candle); }
.ep-figs { margin: 2em 0 2.2em; display: grid; gap: 16px; }
.ep-figs.multi { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); align-items: start; }
.ep-figs figure { margin: 0; display: grid; gap: 8px; }
.ep-figs img { width: 100%; height: auto; display: block; border: 1px solid var(--line); background: var(--soot-2); }
.ep-figs figcaption { font: .82rem/1.45 var(--body); color: var(--sepia); }
.ep-figs figcaption a { color: var(--bone-dim); }

.ep-side { position: sticky; top: 90px; display: grid; gap: 28px; }
.ep-side h2 { font-size: 1.3rem; margin-bottom: 8px; }
.ep-side .chapters li a { display: contents; color: inherit; text-decoration: none; }
.ep-side .chapters li:hover span { color: var(--candle); }
.ep-side .today { font-size: .98rem; color: var(--bone-dim); }
.ep-sub-box { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); background: var(--soot-2); }
.ep-sub-box p { font-size: .98rem; color: var(--bone-dim); }

.ep-fuentes { padding-top: 72px; max-width: 72ch; }
.ep-fuentes h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 12px; }
.ep-fuentes h2 ~ h2, .ep-fuentes h2:not(:first-child) { font-size: 1.25rem; margin: 24px 0 8px; }
.ep-fuentes ol, .ep-fuentes ul { padding-left: 1.6em; display: grid; gap: 8px; font-size: .92rem; color: var(--bone-dim); }
.ep-fuentes p { font-size: .95rem; color: var(--bone-dim); }
.ep-fuentes a { color: var(--candle); overflow-wrap: anywhere; }
.ep-cred { margin-top: 28px; font: italic .92rem var(--body); color: var(--sepia); }
.ep-cred a { color: var(--bone-dim); }
.ep-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; }
.ep-nav a { display: grid; gap: 4px; padding: 18px 20px; border: 1px solid var(--line); text-decoration: none; color: var(--bone); font: 600 1.3rem/1.15 var(--display); transition: border-color .2s; }
.ep-nav a:hover { border-color: var(--candle); }
.ep-nav a small { font: 500 .78rem var(--mono); color: var(--sepia); }
.ep-nav .next { text-align: right; }

@media (max-width: 960px) {
  .ep-layout { grid-template-columns: 1fr; gap: 40px; }
  .ep-side { position: static; }
}
@media (max-width: 560px) {
  .ep-head { padding-top: 22vh; min-height: 0; }
  .prose { font-size: 1.08rem; }
  .ep-nav { grid-template-columns: 1fr; }
  .ep-nav .next { text-align: left; }
}
