/* ============================================================
   Conceptos en relación — constelación de lectura
   Paleta y tipografía derivadas del modo noche de v5
   (misma mano que matiasbarreto.com, distinto cuarto de lectura)
   ============================================================ */
:root {
  color-scheme: dark;
  /* Tokens re-derivados del dark mode de v5 */
  --paper:       #1a1815;
  --paper-light: #221f1a;
  --paper-lift:  #2a251e;
  --ink:         #e8e2d6;
  --ink-soft:    #b8afa0;
  --ink-muted:   #8a8278;
  --line:        #3a342c;
  --line-strong: #5a5248;
  --action:      #d4704c;
  --focus:       #e8845a;
  /* Familias conceptuales = dimensiones de v5 (dark) */
  --umbral:   #d4704c; /* creación / acción  — umbrales */
  --campo:    #8aaa6a; /* cuidado            — campos */
  --mutacion: #b87da0; /* epistémico / plum  — mutaciones */
  --sintesis: #c8a840; /* soberanía / oro    — síntesis */

  --serif: "Newsreader", Georgia, serif;
  --sans:  "DM Sans", Arial, sans-serif;
  --mono:  "IBM Plex Mono", monospace;
  --ease:  cubic-bezier(.16, 1, .3, 1);
  --stage-pad: clamp(1rem, 4vw, 3.5rem);
}

/* La constelación comparte el tema persistente del sitio principal. */
:root[data-theme="light"] {
  color-scheme: light;
  --paper:       #f5f0e6;
  --paper-light: #fdf9f1;
  --paper-lift:  #ebe2d2;
  --ink:         #211c18;
  --ink-soft:    #4a4038;
  --ink-muted:   #6c6258;
  --line:        #d3c8b8;
  --line-strong: #776d62;
  --action:      #923f2b;
  --focus:       #6f3024;
  --umbral:      #a44d32;
  --campo:       #52623a;
  --mutacion:    #6d4358;
  --sintesis:    #806016;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  overflow: hidden;               /* el escenario no se scrollea; los overlays sí, internamente */
  overscroll-behavior: none;
}
body[data-view="linear"] { overflow: auto; }
button, a { color: inherit; font: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }

.skip-link {
  position: fixed; z-index: 200; top: .7rem; left: .7rem;
  padding: .5rem .8rem; color: var(--paper); background: var(--ink);
  border-radius: 3px; transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.overline, .label {
  color: var(--action);
  font: .62rem/1.4 var(--mono);
  letter-spacing: .07em; text-transform: uppercase;
}

/* ---------- Barra persistente ---------- */
.chrome {
  position: fixed; z-index: 130; inset: 0 0 auto 0;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 1rem;
  min-height: 3.4rem; padding: 0 var(--stage-pad);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(14px);
  font: .62rem var(--mono); letter-spacing: .04em; text-transform: uppercase;
}
.chrome-back { text-decoration: none; color: var(--ink-soft); transition: color .2s; }
.chrome-back:hover { color: var(--ink); }
.chrome-here { justify-self: center; color: var(--ink-muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.chrome-lenses { justify-self: end; display: flex; gap: 1.15rem; }
.lens { color: var(--ink-muted); letter-spacing: .04em; text-transform: uppercase; font: .62rem var(--mono); padding-bottom: .2rem; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.lens:hover { color: var(--ink); }
.lens[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--action); }

/* ---------- Escenario ---------- */
.stage {
  position: fixed; inset: 0; z-index: 1;
  overflow: hidden; isolation: isolate;
  background:
    radial-gradient(140% 110% at 68% 40%, #26221c 0%, #1c1915 46%, #151310 100%);
}
.stage::after { /* viñeta editorial, no espacio sideral */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: radial-gradient(120% 100% at 50% 46%, transparent 55%, rgba(10,9,7,.55) 100%);
}

:root[data-theme="light"] .stage {
  background:
    radial-gradient(140% 110% at 68% 40%, #fdf9f1 0%, #f5f0e6 46%, #e7dccb 100%);
}

:root[data-theme="light"] .stage::after {
  background: radial-gradient(120% 100% at 50% 46%, transparent 55%, rgba(66, 53, 41, .14) 100%);
}
.camera {
  position: absolute; inset: 0;
  transform: translate(0, 0) scale(1);
  transform-origin: 50% 50%;
  transition: transform 1s var(--ease);
  will-change: transform;
}

.threads { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.thread-line { transition: stroke .5s var(--ease), stroke-opacity .5s var(--ease), stroke-width .5s var(--ease); }
.thread-label {
  font: 500 .58rem var(--mono); letter-spacing: .04em; text-transform: uppercase;
  fill: var(--ink-soft); opacity: 0; transition: opacity .35s var(--ease);
  paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round;
}
.thread.is-lit .thread-label { opacity: 1; }

/* ---------- Nodos: presencias, no botones idénticos ---------- */
.nodes { position: absolute; inset: 0; }
.node {
  position: absolute;
  display: flex; flex-direction: column; align-items: var(--align, flex-start);
  gap: .35rem; max-width: 12rem;
  text-align: var(--talign, left);
  transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px)));
  color: var(--ink-soft);
  transition: color .3s var(--ease), opacity .55s var(--ease), filter .55s var(--ease), transform .7s cubic-bezier(.22, 1, .36, 1);
}
.node-dot {
  position: relative;
  width: var(--dot, .55rem); height: var(--dot, .55rem); border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 16%, transparent), 0 0 22px 2px color-mix(in srgb, var(--c) 55%, transparent);
  transition: box-shadow .4s var(--ease), transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
/* Respiro: un halo que late, como un organismo (eco del pulse-dot de v5) */
.node-dot::after {
  content: ""; position: absolute; inset: -45%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 42%, transparent) 0%, transparent 68%);
  opacity: .4; transform: scale(.85);
}
.node-name {
  font: 500 var(--size, 2rem)/.9 var(--serif);
  letter-spacing: -.035em; color: var(--ink);
}
.node-year { font: .55rem var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-muted); }
.node-kind { font: .5rem var(--mono); letter-spacing: .09em; text-transform: uppercase; color: color-mix(in srgb, var(--c) 78%, var(--ink-muted)); }

.node:hover, .node:focus-visible { color: var(--ink); }
.node:hover .node-name, .node:focus-visible .node-name { color: #fff; }
.node:hover .node-dot { transform: scale(1.25); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 20%, transparent), 0 0 30px 4px color-mix(in srgb, var(--c) 70%, transparent); }

/* estados dirigidos por JS durante el foco de lectura */
.node.is-active { align-items: flex-start; text-align: left; }
.node.is-active .node-name { color: #fff; }
.node.is-active .node-dot { transform: scale(1.45); box-shadow: 0 0 0 8px color-mix(in srgb, var(--c) 22%, transparent), 0 0 40px 6px color-mix(in srgb, var(--c) 85%, transparent); }
.node.is-related { color: var(--ink); }
.node.is-dimmed { opacity: .16; filter: blur(1.5px); pointer-events: none; }

/* ---------- Migas del recorrido ---------- */
.trail {
  position: fixed; z-index: 40; left: var(--stage-pad); bottom: 1rem;
  display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap;
  max-width: min(48rem, calc(100% - 2 * var(--stage-pad)));
  padding: .55rem .85rem; border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  backdrop-filter: blur(10px);
  color: var(--ink-muted); font: .58rem var(--mono); letter-spacing: .05em; text-transform: uppercase;
}
.trail-label { color: var(--action); }
.trail ol { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.trail li { color: var(--ink-soft); }
.trail li + li::before { content: "›"; margin-right: .4rem; color: var(--action); }
.trail-clear { color: var(--ink-muted); border-bottom: 1px solid currentColor; text-transform: uppercase; font: .58rem var(--mono); }
.trail-clear:hover { color: var(--ink); }

/* ---------- Velo de entrada (prólogo) ---------- */
.veil {
  position: fixed; inset: 0; z-index: 100;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 0 var(--stage-pad);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--paper) 94%, transparent) 0%, color-mix(in srgb, var(--paper) 80%, transparent) 62%, var(--paper) 100%);
  backdrop-filter: blur(3px);
  transition: opacity .8s var(--ease), transform .9s var(--ease), visibility .9s;
}
body[data-view="atlas"] .veil,
body[data-view="reading"] .veil,
body[data-view="guided"] .veil,
body[data-view="index"] .veil,
body[data-view="linear"] .veil { opacity: 0; visibility: hidden; transform: scale(1.04); pointer-events: none; }
.veil-lead {
  max-width: 1180px; margin: 0 auto;
  min-height: 100svh; display: grid; align-content: center; gap: 1.4rem;
  padding: 5rem 0 3rem;
}
.veil h1 {
  max-width: 15ch; margin: 0;
  font: 500 clamp(3rem, 7.5vw, 7.4rem)/.86 var(--serif);
  letter-spacing: -.05em; text-wrap: balance;
}
.veil-lede { max-width: 44ch; font: 1.08rem/1.5 var(--serif); color: var(--ink-soft); }
.veil-actions { display: flex; align-items: baseline; gap: 1.6rem; flex-wrap: wrap; margin-top: .6rem; }

/* Presentación completa: el prólogo como umbral y llave del mapa */
.veil-prose { max-width: 40rem; margin: 0 auto; padding: 1rem 0 7rem; }
.veil-prose > p { margin: 0 0 1.5rem; font: 1.14rem/1.62 var(--serif); color: var(--ink-soft); text-wrap: pretty; }
.veil-prose > p.veil-close { margin-top: 2.2rem; color: var(--ink); font-size: 1.28rem; line-height: 1.5; }
.p-link {
  display: inline; color: var(--action); font: inherit; letter-spacing: inherit;
  border-bottom: 1px solid color-mix(in srgb, var(--action) 42%, transparent);
  transition: color .2s, border-color .2s;
}
.p-link:hover { color: var(--focus); border-color: var(--focus); }
.veil-prose-actions { margin-top: 2.6rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.veil-enter {
  padding: .55rem 0 .35rem; border-bottom: 2px solid var(--action); color: var(--action);
  font: .72rem var(--mono); letter-spacing: .06em; text-transform: uppercase;
  transition: color .2s, border-color .2s;
}
.veil-enter:hover { color: var(--focus); border-color: var(--focus); }
.text-button { color: var(--ink-muted); border-bottom: 1px solid var(--line-strong); font: .68rem var(--mono); letter-spacing: .03em; padding-bottom: .1rem; transition: color .2s, border-color .2s; }
.text-button:hover { color: var(--ink); border-color: var(--ink-soft); }

/* ---------- Lectura en el mismo espacio ---------- */
.reading {
  position: fixed; z-index: 70; top: 0; right: 0; bottom: 0;
  width: min(560px, 46vw);
  padding: 4.4rem clamp(1.4rem, 3vw, 2.8rem) 2rem;
  overflow-y: auto; overscroll-behavior: contain;
  background:
    linear-gradient(270deg, color-mix(in srgb, var(--paper) 94%, transparent) 62%, color-mix(in srgb, var(--paper) 30%, transparent) 100%);
  backdrop-filter: blur(6px);
  border-left: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  transform: translateX(102%);
  transition: transform .7s var(--ease), opacity .5s var(--ease);
  opacity: 0;
}
body[data-view="reading"] .reading { transform: none; opacity: 1; }
.reading-inner { max-width: 34rem; }
.reading-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.reading-kicker { color: var(--action); font: .58rem var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.reading-close { color: var(--ink-soft); border-bottom: 1px solid var(--line-strong); font: .64rem var(--mono); letter-spacing: .03em; text-transform: uppercase; padding-bottom: .1rem; transition: color .2s, border-color .2s; }
.reading-close:hover { color: var(--ink); border-color: var(--ink-soft); }
.reading-from { margin-top: 1.1rem; color: var(--ink-muted); font: .62rem var(--mono); letter-spacing: .03em; }
.reading-title {
  margin: .5rem 0 1.3rem;
  font: 500 clamp(2.8rem, 5vw, 4.6rem)/.86 var(--serif);
  letter-spacing: -.05em; color: var(--ink);
}
.reading-copy { font: clamp(1.12rem, 1.6vw, 1.42rem)/1.46 var(--serif); color: var(--ink); }
.reading-copy::first-letter { float: left; margin: .1rem .3rem 0 0; color: var(--action); font: 3.6rem/.72 var(--serif); }
.reading-question { margin-top: 2.4rem; padding-top: 1rem; border-top: 2px solid var(--ink); }
.reading-question p:last-child { margin-top: .6rem; font: 1.18rem/1.24 var(--serif); color: var(--ink); }
.reading-relations, .reading-evidence { margin-top: 2.2rem; }
.reading-relations .label, .reading-evidence .label { margin-bottom: .3rem; }

.relation {
  display: block; width: 100%; text-align: left;
  padding: .85rem 0; border-top: 1px solid var(--line);
  transition: padding-left .3s var(--ease);
}
.reading-relations .relation:last-child { border-bottom: 1px solid var(--line); }
.relation:hover { padding-left: .5rem; }
.relation-verb { display: block; color: var(--action); font: .56rem var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.relation-target { display: block; margin: .3rem 0; font: 1.16rem var(--serif); color: var(--ink); }
.relation:hover .relation-target { color: #fff; }
.relation-detail { display: block; color: var(--ink-soft); font: .78rem/1.4 var(--sans); }
.relation-tag { display: inline-block; margin-top: .45rem; color: var(--ink-muted); font: .5rem var(--mono); letter-spacing: .09em; text-transform: uppercase; }

.source { padding: .95rem 0; border-top: 1px solid var(--line); }
.reading-evidence .source:last-child { border-bottom: 1px solid var(--line); }
.source-title { font: 500 .96rem/1.3 var(--serif); color: var(--ink); }
.source-meta, .source-status { margin-top: .3rem; color: var(--ink-soft); font: .58rem/1.45 var(--mono); }
.source-quote { margin-top: .55rem; padding-left: .8rem; border-left: 2px solid var(--line-strong); font: .84rem/1.4 var(--serif); color: var(--ink); }
.source a { display: inline-block; margin-top: .5rem; color: var(--action); font: .62rem var(--mono); letter-spacing: .03em; text-transform: uppercase; }
.source a:hover { color: var(--focus); }

/* ---------- Lentes (overlays sobre el escenario) ---------- */
.sheet {
  position: fixed; z-index: 80; inset: 0;
  display: grid; align-items: start; justify-items: center;
  padding: 5rem var(--stage-pad) 3rem; overflow-y: auto;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .4s var(--ease);
}
body[data-view="guided"] #sheet-guided,
body[data-view="index"] #sheet-index { opacity: 1; }
.sheet[hidden] { display: none !important; }
.sheet-inner { width: min(64rem, 100%); position: relative; padding-top: 1rem; }
.sheet-close { position: absolute; top: -.2rem; right: 0; color: var(--ink-soft); font: .64rem var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.sheet-close:hover { color: var(--ink); }
.sheet-inner h2 { max-width: 18ch; margin: .8rem 0 0; font: 500 clamp(2.4rem, 5vw, 4.6rem)/.9 var(--serif); letter-spacing: -.045em; text-wrap: balance; }
.sheet-lede { max-width: 34rem; margin-top: 1rem; color: var(--ink-soft); font: 1.05rem/1.45 var(--serif); }

.propositions { margin-top: clamp(2.5rem, 7vh, 5rem); border-top: 1px solid var(--line); }
.proposition {
  display: grid; grid-template-columns: 2.6rem 1fr auto; gap: 1rem; align-items: center;
  width: 100%; padding: 1.3rem 0; border-bottom: 1px solid var(--line); text-align: left;
  transition: color .2s, padding-left .3s var(--ease);
}
.proposition:hover { color: var(--action); padding-left: .6rem; }
.prop-num { color: var(--ink-muted); font: .64rem var(--mono); align-self: start; padding-top: .35rem; }
.prop-text { font: clamp(1.4rem, 2.8vw, 2.8rem)/1 var(--serif); letter-spacing: -.03em; color: var(--ink); }
.proposition:hover .prop-text { color: var(--action); }
.prop-meta { display: block; margin-top: .5rem; color: var(--ink-muted); font: .58rem/1.4 var(--sans); text-transform: none; letter-spacing: 0; }
.prop-arrow { font-size: 1.3rem; color: var(--ink-muted); }

.index-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 2.5rem; margin-top: 2.5rem; border-top: 1px solid var(--line); }
.index-item { display: flex; align-items: baseline; gap: .6rem; width: 100%; padding: .95rem 0; border-bottom: 1px solid var(--line); text-align: left; transition: color .2s, padding-left .25s var(--ease); }
.index-item:hover { color: var(--action); padding-left: .4rem; }
.index-item .idx-dot { width: .4rem; height: .4rem; border-radius: 50%; background: var(--c); flex: none; }
.index-item .idx-name { font: 1.3rem var(--serif); color: var(--ink); }
.index-item:hover .idx-name { color: var(--action); }
.index-item .idx-year { margin-left: auto; color: var(--ink-muted); font: .56rem var(--mono); }

/* ---------- Lectura lineal ---------- */
.linear { position: relative; z-index: 110; min-height: 100%; background: var(--paper); }
.linear-inner { width: min(920px, calc(100% - 2 * var(--stage-pad))); margin: 0 auto; padding: 6rem 0 5rem; }
.linear-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; padding-bottom: 2rem; border-bottom: 2px solid var(--ink); }
.linear-head .text-button { flex: none; margin-top: .4rem; }
.linear-head h2 { margin-top: .8rem; font: 500 clamp(2.4rem, 5vw, 4.4rem)/.9 var(--serif); letter-spacing: -.04em; }
.linear-intro { max-width: 44rem; margin: 2.4rem 0 4rem; font: 1.24rem/1.4 var(--serif); color: var(--ink-soft); }
.linear-entry { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 2rem; padding: 2.6rem 0; border-top: 1px solid var(--line); }
.linear-entry:first-child { border-top: 0; }
.linear-entry-head .le-name { font: 500 1.7rem/1 var(--serif); color: var(--ink); }
.linear-entry-head .le-meta { display: block; margin-top: .5rem; color: var(--ink-muted); font: .56rem var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.linear-entry-body > p { max-width: 42rem; font: 1.16rem/1.5 var(--serif); color: var(--ink); }
.linear-relations { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 1.3rem; }
.linear-relations button { color: var(--action); border-bottom: 1px solid color-mix(in srgb, var(--action) 55%, transparent); font: .68rem var(--mono); letter-spacing: .02em; padding-bottom: .1rem; }
.linear-relations button:hover { border-color: var(--action); }
.linear-sources { margin-top: 1.1rem; color: var(--ink-muted); font: .58rem/1.5 var(--mono); }

/* ---------- Pie ---------- */
.foot {
  position: fixed; z-index: 30; inset: auto 0 0 0;
  display: none; justify-content: space-between; gap: 2rem;
  padding: .7rem var(--stage-pad); background: color-mix(in srgb, var(--paper) 90%, transparent);
  color: var(--ink-muted); font: .55rem/1.4 var(--mono);
}
body[data-view="linear"] .foot { position: static; display: flex; background: var(--ink); color: color-mix(in srgb, var(--paper) 90%, var(--ink)); }
.foot p { max-width: 46rem; }
.foot a { white-space: nowrap; color: var(--action); text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .chrome { grid-template-columns: auto 1fr; }
  .chrome-here { display: none; }
  .chrome-lenses { gap: .85rem; }
  .lens[data-lens="index"], .lens[data-lens="veil"] { display: none; }
  .veil-prose { padding-bottom: 5rem; }
  .node { --size: 1.5rem !important; max-width: 8.5rem; }
  .veil { padding-top: 5rem; }
  .reading { width: 100%; padding-top: 4rem; background: linear-gradient(270deg, var(--paper) 84%, color-mix(in srgb, var(--paper) 55%, transparent) 100%); }
  .reading-inner { max-width: none; }
  .index-list { grid-template-columns: 1fr 1fr; }
  .linear-entry { grid-template-columns: 1fr; gap: .8rem; }
  .trail { display: none; }
}
@media (max-width: 560px) {
  .index-list { grid-template-columns: 1fr; }
  .veil-actions { flex-direction: column; align-items: flex-start; gap: .9rem; }
}

/* ============================================================
   Matriz de integración: capas, clases de presencia y revelado
   ============================================================ */

/* Nodos de la capa relacional: presencias más leves que los umbrales */
.node[data-layer="relational"] { color: var(--ink-muted); }
.node[data-layer="relational"] .node-name { color: var(--ink-soft); }
.node[data-layer="relational"]:hover .node-name,
.node[data-layer="relational"]:focus-visible .node-name { color: var(--ink); }
.node[data-layer="relational"] .node-kind { color: color-mix(in srgb, var(--c) 60%, var(--ink-muted)); }

/* Clase de presencia por la forma del punto (independiente del color) */
.node[data-mclass="operador"] .node-dot {
  background: transparent; border: 1.5px solid var(--c);
  box-shadow: 0 0 15px 1px color-mix(in srgb, var(--c) 42%, transparent);
}
.node[data-mclass="pasaje"] .node-dot {
  background: transparent; border: 1.5px dashed var(--c); box-shadow: none;
}

/* Materialización al descubrir */
.node.is-appearing { opacity: 0; transform: translate(-50%, -50%) scale(.55); }

/* Estrato de origen: estado visible de cada fuente */
.source-estado {
  display: inline-block; margin-bottom: .45rem; padding: .12rem .45rem; border-radius: 3px;
  font: .5rem var(--mono); letter-spacing: .06em; text-transform: uppercase;
}
.source[data-estado="verificada"] .source-estado { color: #aecc90; background: color-mix(in srgb, var(--campo) 20%, transparent); }
.source[data-estado="primaria"] .source-estado { color: var(--ink-soft); background: color-mix(in srgb, var(--line-strong) 32%, transparent); }
.source[data-estado="desarrollo"] .source-estado { color: var(--ink-muted); border: 1px dashed var(--line-strong); }

/* Relación hacia un término aún no revelado */
.reveal-tag {
  display: inline-block; margin-left: .45rem; padding: .04rem .32rem; vertical-align: middle;
  border: 1px solid var(--action); border-radius: 3px; color: var(--action);
  font: .48rem var(--mono); letter-spacing: .07em; text-transform: uppercase;
}
.relation--reveal .relation-target { color: var(--action); }
.relation-class { display: block; margin-top: .45rem; color: var(--ink-muted); font: .5rem var(--mono); letter-spacing: .06em; text-transform: uppercase; }

/* Doble nombre en la lectura */
.reading-alt { font-size: .46em; font-style: italic; letter-spacing: 0; color: var(--ink-muted); }

/* Tira de recorrido dentro de la lectura */
.reading-route { margin-top: 1.1rem; padding: .95rem 1.05rem; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--paper-lift) 55%, transparent); }
.rr-name { color: var(--action); font: .58rem var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.rr-steps { display: flex; flex-wrap: wrap; gap: .3rem .5rem; margin: .65rem 0 0; padding: 0; list-style: none; font: .62rem var(--mono); color: var(--ink-muted); }
.rr-steps li + li::before { content: "→"; margin-right: .5rem; color: var(--line-strong); }
.rr-steps li.rr-now { color: var(--ink); }
.rr-steps li.rr-done { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.rr-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .8rem; }
.rr-count { color: var(--ink-muted); font: .58rem var(--mono); text-transform: uppercase; }
.rr-next { color: var(--action); border-bottom: 1px solid var(--action); font: .62rem var(--mono); letter-spacing: .03em; text-transform: uppercase; padding-bottom: .1rem; }
.rr-next:hover { color: var(--focus); border-color: var(--focus); }
.rr-note { margin-top: .75rem; color: var(--ink-soft); font: .84rem/1.42 var(--serif); }

/* Lente Recorridos: caminatas curadas + frases */
.sheet-group-label { margin: 0 0 1.1rem; color: var(--action); font: .6rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.sheet-group-label--sep { margin-top: 3.5rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.propositions { margin: clamp(2rem, 6vh, 4rem) 0 0; border-top: 0; max-width: none; }
.route { display: grid; gap: .55rem; width: 100%; padding: 1.5rem 0; border-top: 1px solid var(--line); text-align: left; transition: padding-left .3s var(--ease); }
.route:last-child { border-bottom: 1px solid var(--line); }
.route:hover { padding-left: .6rem; }
.route-path { font: .6rem var(--mono); letter-spacing: .03em; color: var(--ink-muted); text-transform: uppercase; }
.route-arrow { color: var(--action); }
.route-name { font: clamp(1.4rem, 2.6vw, 2.5rem)/1.02 var(--serif); letter-spacing: -.02em; color: var(--ink); }
.route:hover .route-name { color: var(--action); }
.route-note { max-width: 48rem; color: var(--ink-soft); font: .9rem/1.42 var(--sans); }

/* Índice en dos grupos */
.index-list { display: block; margin: 2rem 0 0; border-top: 0; grid-template-columns: none; }
.index-group + .index-group { margin-top: 1rem; }
.index-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 2.5rem; border-top: 1px solid var(--line); }
.index-note { margin: -.4rem 0 .9rem; color: var(--ink-muted); font: .75rem/1.4 var(--sans); }
.idx-dot[data-mclass="operador"] { background: transparent; border: 1px solid var(--c); }
.idx-dot[data-mclass="pasaje"] { background: transparent; border: 1px dashed var(--c); }

/* Lectura lineal: segunda capa */
.linear-layer-head { margin: 3.5rem 0 0; padding-top: 2rem; border-top: 2px solid var(--ink); font: .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--action); }
.le-estado { color: var(--ink-muted); }
.le-estado[data-estado="verificada"] { color: #9bbd7c; }

:root[data-theme="light"] .source[data-estado="verificada"] .source-estado,
:root[data-theme="light"] .le-estado[data-estado="verificada"] { color: var(--campo); }

@media (max-width: 860px) {
  .index-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .index-cols { grid-template-columns: 1fr; }
}

/* ============================================================
   Vida del sistema: respiración, marea y plastilina
   La realidad es plastilina: la constelación respira y se deja tocar.
   ============================================================ */
.stage::before {
  content: ""; position: absolute; inset: -12%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 38% at 40% 42%, color-mix(in srgb, var(--umbral) 9%, transparent), transparent 70%),
    radial-gradient(34% 34% at 66% 62%, color-mix(in srgb, var(--campo) 7%, transparent), transparent 70%);
  opacity: .55;
}
@keyframes breathe-halo {
  0%, 100% { transform: scale(.82); opacity: .28; }
  50%      { transform: scale(1.45); opacity: .58; }
}
@keyframes tide {
  0%   { transform: translate(-5%, -3%) scale(1); }
  100% { transform: translate(6%, 4%) scale(1.12); }
}
@media (prefers-reduced-motion: no-preference) {
  .node-dot::after { animation: breathe-halo 6.5s ease-in-out infinite; }
  /* latidos desfasados: respira como un cuerpo, no en bloque */
  .node:nth-child(2n) .node-dot::after { animation-duration: 7.8s; animation-delay: -2.1s; }
  .node:nth-child(3n) .node-dot::after { animation-duration: 5.6s; animation-delay: -3.4s; }
  .node:nth-child(4n) .node-dot::after { animation-duration: 8.4s; animation-delay: -1.2s; }
  .stage::before { animation: tide 28s ease-in-out infinite alternate; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .camera { transition: none !important; }
  .node.is-appearing { opacity: 1; transform: translate(-50%, -50%); }
}
