/* =========================================================
   STOA — pages.css
   Estilos específicos de cada lámina
   ========================================================= */

/* =================== INICIO =================== */
.hero {
  min-height: calc(100vh - var(--nav-h) - var(--frame) - 40px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  grid-template-rows: 1fr auto;
  gap: 24px clamp(20px, 4vw, 64px);
  align-items: center;
}
.hero-text { position: relative; z-index: 2; }
.hero-text > .label { display: block; margin-bottom: 18px; }
.hero-title {
  display: flex;
  overflow: hidden;
  padding-bottom: .04em;
}
.hero-title .ch {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1.3s var(--ease-out);
}
.hero-title.is-in .ch { transform: none; }
.hero-title .ch:nth-child(2) { transition-delay: .08s; }
.hero-title .ch:nth-child(3) { transition-delay: .16s; }
.hero-title .ch:nth-child(4) { transition-delay: .24s; }
.hero-sub {
  font-size: clamp(26px, 2.6vw, 40px);
  font-weight: 300;
  line-height: 1.1;
  margin-top: 14px;
}
.hero-text .lead { margin-top: 26px; color: var(--ink-80); }
.hero-text .btn-row { margin-top: 36px; }

.hero-fig { position: relative; margin: 0; }
.hero-fig svg { width: 100%; height: auto; max-height: 78vh; margin-inline: auto; touch-action: pan-y; }
.hero-fig figcaption { margin-top: 6px; text-align: center; }
#armillary { cursor: grab; }
#armillary:active { cursor: grabbing; }

.hero-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 8px;
}
.hero-foot .scroll-line {
  width: 1px;
  height: 44px;
  background: var(--c-ink);
  animation: scroll-hint 2.4s var(--ease) infinite;
}
.hero-foot .label:last-child { margin-left: auto; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-fig { order: -1; max-width: 520px; margin-inline: auto; width: 100%; }
  .hero-foot .label:last-child { display: none; }
}

/* Marquesina de virtudes */
.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-block: 1px solid var(--ink-20);
  padding: 18px 0;
  white-space: nowrap;
  background: rgb(var(--paper) / .6);
}
.marquee-track {
  display: inline-flex;
  gap: 48px;
  will-change: transform;
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 52px);
  font-weight: 300;
  letter-spacing: .08em;
}
.marquee-track span { display: inline-flex; align-items: center; gap: 48px; }
.marquee-track span::after {
  content: "";
  width: 9px; height: 9px;
  border: 1px solid var(--c-ink);
  transform: rotate(45deg);
}
.marquee-track em { color: var(--ink-60); font-style: normal; }

/* Pasaje de hoy (vista previa) */
.today-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  padding: clamp(28px, 4vw, 64px);
}
.today-meta { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.today-quote {
  grid-column: 1 / -1;
  font-size: clamp(26px, 3vw, 46px);
  line-height: 1.22;
  font-weight: 300;
  max-width: 30em;
}
.today-quote.is-long { font-size: clamp(22px, 2.3vw, 34px); }
.today-quote::before { content: "«"; margin-right: .08em; color: var(--ink-45); }
.today-quote::after { content: "»"; margin-left: .08em; color: var(--ink-45); }
.today-cite { font-style: italic; color: var(--ink-80); align-self: center; }
.today-cite b { font-style: normal; font-weight: 500; }

/* Índice de láminas */
.index-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}
.index-card .idx-icon { width: 100%; max-width: 150px; height: auto; margin: 8px auto 6px; }
.index-card h3 { margin-top: 4px; }
.index-card p { color: var(--ink-80); font-size: .95em; line-height: 1.45; }
.index-card .go {
  margin-top: auto;
  align-self: flex-end;
  font-family: var(--mono);
  font-size: 18px;
  transition: transform .5s var(--ease);
}
.index-card:hover .go { transform: translateX(6px); }
.index-card:hover { background: rgb(var(--paper) / .95); }
.index-card .spin-on-hover { transform-box: fill-box; transform-origin: center; transition: transform 1.4s var(--ease); }
.index-card:hover .spin-on-hover { transform: rotate(60deg); }
.index-card .swing-on-hover { transform-box: fill-box; transform-origin: 50% 100%; transition: transform 1s var(--ease); }
.index-card:hover .swing-on-hover { transform: rotate(-14deg); }

/* Sección de la columna */
.stoa-sec { min-height: 210vh; }
.stoa-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}
.stoa-text { padding-top: 12vh; }
.stoa-text p { margin-bottom: 1.1em; color: var(--ink-80); max-width: 32em; }
.stoa-text h3 { margin: 48px 0 18px; }
.parts { display: grid; gap: 18px; margin-top: 8px; }
.parts li { display: flex; gap: 16px; align-items: flex-start; }
.parts strong { font-weight: 600; }
.stoa-fig { position: sticky; top: calc(var(--nav-h) + var(--frame) + 4vh); margin: 0; }
.stoa-fig svg { width: 100%; height: auto; max-height: 80vh; }
.stoa-fig figcaption { text-align: center; margin-top: 8px; }
@media (max-width: 860px) {
  .stoa-sec { min-height: 0; }
  .stoa-grid { grid-template-columns: 1fr; }
  .stoa-fig { position: relative; top: 0; max-width: 420px; margin-inline: auto; }
  .stoa-text { padding-top: 0; }
}

/* =================== PASAJE =================== */
.passage-sheet { padding-bottom: clamp(40px, 6vw, 80px); }
.ps-grid {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 88px);
  align-items: start;
  border-top: 1px solid var(--c-ink);
  padding-top: clamp(28px, 4vw, 48px);
}
.ps-meta { position: sticky; top: calc(var(--nav-h) + var(--frame) + 24px); }
.ps-meta .spec dd { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; padding-top: 11px; }
.ps-quote {
  font-size: clamp(30px, 3.9vw, 60px);
  line-height: 1.18;
  font-weight: 300;
  min-height: 4.8em;
}
/* Pasajes largos (más de 220 caracteres): un punto menos para que quepan en pantalla */
.ps-quote.is-long { font-size: clamp(26px, 2.9vw, 44px); }
.ps-cite {
  margin-top: 28px;
  font-style: italic;
  font-size: clamp(20px, 1.6vw, 24px);
  color: var(--ink-80);
  display: flex;
  align-items: center;
  gap: 16px;
}
.ps-cite::before { content: ""; width: 48px; height: 1px; background: var(--c-ink); }
.ps-controls { margin-top: 44px; }
@media (max-width: 860px) {
  .ps-grid { grid-template-columns: 1fr; }
  .ps-meta { position: relative; top: 0; order: 2; }
}

.ps-lower { padding-top: clamp(40px, 6vw, 80px); }
.exercise { display: flex; flex-direction: column; gap: 16px; }
.exercise-q { font-size: clamp(22px, 2vw, 30px); line-height: 1.3; font-style: italic; }
.exercise textarea {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  padding: 16px;
  border: 1px solid var(--ink-30);
  background:
    repeating-linear-gradient(180deg, transparent 0 31px, var(--ink-12) 31px 32px) local,
    rgb(var(--paper) / .9);
  line-height: 32px;
  font-size: 19px;
  outline: none;
  transition: border-color .3s;
}
.exercise textarea:focus { border-color: var(--c-ink); }
.exercise textarea::placeholder { color: var(--ink-60); font-style: italic; }

.dial-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dial-fig svg { width: 100%; max-width: 520px; height: auto; touch-action: none; cursor: grab; }
.dial-fig svg:active { cursor: grabbing; }
.dial-fig figcaption { text-align: center; }
#dial:focus-visible { outline-offset: -20px; }

/* =================== VALORES =================== */
.virtues-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}
.mech-fig { margin: 0; }
.mech-fig svg { width: 100%; height: auto; max-height: 76vh; }
.mech-fig figcaption { text-align: center; margin-top: 6px; }
#mechanism .gear { cursor: pointer; outline: none; }
#mechanism .gear .gear-body { transition: fill .4s; }
#mechanism .gear .gear-shade { transition: opacity .5s; opacity: 0; }
#mechanism .gear.is-active .gear-shade { opacity: 1; }
#mechanism .gear:hover .gear-outline,
#mechanism .gear:focus-visible .gear-outline { stroke-width: 2; }
#mechanism .gear-label { transition: opacity .3s; }
/* Engranaje seleccionado: contorno más grueso, numeral en negativo con anillo y llamada reforzada */
#mechanism .gear .gear-hub,
#mechanism .gear .gear-num { transition: fill .35s; }
#mechanism .gear .gear-ring { fill: none; opacity: 0; transition: opacity .35s; }
#mechanism .gear.is-active .gear-outline { stroke-width: 2.6; }
#mechanism .gear.is-active .gear-hub { fill: var(--c-ink); }
#mechanism .gear.is-active .gear-num { fill: var(--c-paper); }
#mechanism .gear.is-active .gear-ring { opacity: 1; }
#mechanism .gear-call text, #mechanism .gear-call .gear-lead { transition: fill .35s, stroke .35s, stroke-width .35s; }
#mechanism .gear-call.is-active .gear-lead { stroke: var(--c-ink); stroke-width: 1.4; }
#mechanism .gear-call.is-active text { fill: var(--c-ink); font-weight: 600; }
#mechanism .gear-call.is-active circle { r: 3; }

.virtue-panel { min-height: 520px; }
.virtue-panel h2 { margin: 10px 0 6px; }
.v-greek { font-size: 24px; color: var(--ink-80); margin-bottom: 18px; }
.virtue-panel > p { margin-bottom: 22px; }
.v-quote { margin-top: 24px; padding-left: 18px; border-left: 1px solid var(--c-ink); }
.v-quote p { font-size: 22px; font-style: italic; line-height: 1.35; }
.v-quote cite { display: block; margin-top: 6px; font-style: normal; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--ink-60); }
.virtue-panel .swap { transition: opacity .35s var(--ease), transform .5s var(--ease-out); }
.virtue-panel.is-swapping .swap { opacity: 0; transform: translateY(8px); }
.virtue-tabs { margin-top: 28px; justify-content: center; }
@media (max-width: 900px) {
  .virtues-grid { grid-template-columns: 1fr; }
  .virtue-panel { min-height: 0; }
  .mech-fig { max-width: 520px; margin-inline: auto; }
}

/* Dicotomía del control */
.control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
.control-diagram {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 620px;
  margin-inline: auto;
}
.control-diagram > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.control-diagram .placed {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: clamp(9px, 1.5vw, 10.5px);
  padding: 5px 9px;
  text-align: center;
  white-space: normal;
  line-height: 1.25;
  z-index: 2;
  border-color: var(--c-ink);
  justify-content: center;
}
.control-diagram .placed.inner { max-width: 36%; }
.control-diagram .placed.outer { max-width: 25%; }
.control-diagram .placed.inner { background: var(--c-ink); color: var(--c-paper); }
.tray { display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; gap: 8px; min-height: 60px; }
.tray .chip { cursor: pointer; }
.control-why {
  margin-top: 24px;
  min-height: 3.2em;
  font-size: 21px;
  font-style: italic;
  line-height: 1.35;
}
.control-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .control-grid { grid-template-columns: 1fr; }
}

/* Principios */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 36px);
}
.principle {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.principle .p-icon { width: 96px; height: 96px; }
.principle .p-term { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--ink-60); margin-bottom: 6px; text-transform: none; }
.principle h3 { margin-bottom: 12px; }
.principle p { color: var(--ink-80); font-size: .96em; }
.principle .p-practice { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--ink-30); color: var(--c-ink); }
.principle .p-practice b { font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; margin-right: 8px; }
.principle .p-ref { margin-top: 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; color: var(--ink-60); }
.principle .anim { transform-box: fill-box; transform-origin: center; }
.principle:hover .anim-spin { animation: spin 6s linear infinite; }
.principle:hover .anim-flip { animation: hourglass 2.4s var(--ease) infinite; }
.principle:hover .anim-pulse { animation: pulse-ring 1.6s var(--ease-out) infinite; }
@keyframes hourglass { 0%, 40% { transform: rotate(0); } 60%, 100% { transform: rotate(180deg); } }
@media (max-width: 900px) {
  .principles-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .principle { grid-template-columns: 1fr; }
}

/* =================== FILÓSOFOS =================== */
.timeline-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
}
.timeline-scroll svg { min-width: 880px; width: 100%; height: auto; }
#timeline .bar { cursor: pointer; }
#timeline .bar .bar-fill { transition: fill .3s; }
#timeline .bar:hover .bar-fill,
#timeline .bar:focus-visible .bar-fill,
#timeline .bar.is-alive .bar-fill { fill: url(#hatch-dense); }
#timeline .bar:hover .bar-name { font-weight: 600; }
#timeline .cursor-year { transition: opacity .3s; }

.phil-list { display: grid; gap: clamp(56px, 8vw, 120px); }
.phil {
  display: grid;
  grid-template-columns: minmax(200px, 340px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 88px);
  align-items: start;
  scroll-margin-top: 120px;
}
.phil:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(200px, 340px); }
.phil:nth-child(even) .bust-fig { order: 2; }
.bust-fig {
  margin: 0;
  position: sticky;
  top: calc(var(--nav-h) + var(--frame) + 40px);
}
.bust-svg { width: 100%; height: auto; max-height: 72vh; margin-inline: auto; }
.bust-fig figcaption { text-align: center; margin-top: 10px; }
.phil .phil-head .label { display: block; margin-bottom: 10px; }
.phil h3 { font-size: clamp(34px, 3.6vw, 54px); font-weight: 300; }
.phil .role { font-style: italic; color: var(--ink-80); font-size: 1.15em; margin: 4px 0 22px; }
.phil .spec { margin-bottom: 22px; }
.phil .idea { font-size: 1.08em; margin-bottom: 18px; }
.phil .fact { position: relative; padding: 16px 18px 16px 52px; border: 1px dashed var(--ink-30); color: var(--ink-80); font-size: .96em; }
.phil .fact .callout-n { position: absolute; left: 16px; top: 16px; }
.phil blockquote { margin-top: 26px; font-size: clamp(22px, 2vw, 30px); font-style: italic; line-height: 1.3; }
.phil blockquote cite { display: block; margin-top: 8px; font-style: normal; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--ink-60); }
@media (max-width: 860px) {
  .phil, .phil:nth-child(even) { grid-template-columns: 1fr; }
  .phil:nth-child(even) .bust-fig { order: 0; }
  .bust-fig { position: relative; top: 0; max-width: 260px; margin-inline: auto; }
}

.heirs-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--c-ink);
}
.heirs-list li {
  padding: 22px 22px 26px 0;
  border-bottom: 1px solid var(--ink-20);
}
.heirs-list li:not(:nth-child(3n)) { border-right: 1px solid var(--ink-12); }
.heirs-list li:not(:nth-child(3n+1)) { padding-left: 22px; }
.heirs-list h4 { font-size: 26px; font-weight: 500; line-height: 1.1; }
.heirs-list p { color: var(--ink-80); font-size: .95em; margin-top: 8px; }
@media (max-width: 860px) {
  .heirs-list { grid-template-columns: 1fr; }
  .heirs-list li { border-right: 0 !important; padding-left: 0 !important; }
}

/* =================== LECTURAS =================== */
.route {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  counter-reset: route;
}
.route li { position: relative; padding-right: 40px; }
.route li:last-child { padding-right: 0; }
.route a {
  display: block;
  padding: 18px 18px 20px;
  border: 1px solid var(--c-ink);
  background: var(--c-paper);
  height: 100%;
  transition: background-color .4s, color .4s;
}
.route a:hover { background: var(--c-ink); color: var(--c-paper); }
.route a:hover .label { color: inherit; }
.route .r-title { display: block; font-size: 22px; line-height: 1.1; margin: 8px 0 6px; }
.route .r-author { font-style: italic; font-size: .9em; opacity: .8; }
.route li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 6px;
  width: 28px;
  height: 1px;
  background: var(--c-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--ease) var(--cd, 0s);
}
.route li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: calc(50% - 4px);
  right: 4px;
  border: 4.5px solid transparent;
  border-left: 7px solid var(--c-ink);
  border-right: 0;
  opacity: 0;
  transition: opacity .3s var(--ease) calc(var(--cd, 0s) + .5s);
}
.route.is-in li::after { transform: scaleX(1); }
.route.is-in li::before { opacity: 1; }
@media (max-width: 900px) {
  .route { grid-template-columns: 1fr; gap: 0; }
  .route li { padding-right: 0; padding-bottom: 34px; }
  .route li:not(:last-child)::after { top: auto; bottom: 6px; right: auto; left: 32px; width: 1px; height: 22px; transform: scaleY(0); transform-origin: top; }
  .route.is-in li::after { transform: scaleY(1); }
  .route li:not(:last-child)::before { top: auto; bottom: 2px; right: auto; left: 28px; border: 4.5px solid transparent; border-top: 7px solid var(--c-ink); border-bottom: 0; }
}

.filters { margin-bottom: 40px; }
.books { border-top: 1px solid var(--c-ink); }
.book-wrap {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .6s var(--ease), opacity .5s var(--ease);
}
.book-wrap.is-hidden { grid-template-rows: 0fr; opacity: 0; }
.book-wrap > .book { min-height: 0; overflow: hidden; transition: padding .6s var(--ease), border-width .6s var(--ease); }
.book-wrap.is-hidden > .book { padding-block: 0; border-bottom-width: 0; }
.book {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 260px;
  gap: clamp(20px, 3.4vw, 56px);
  padding: 36px 0;
  border-bottom: 1px solid var(--ink-20);
  align-items: start;
  scroll-margin-top: 120px;
}
.book .book-svg { width: 100%; height: auto; transition: transform .8s var(--ease-out); }
.book:hover .book-svg { transform: translateY(-6px) rotate(-2deg); }
.book .label { display: block; margin-bottom: 8px; }
.book h3 { font-size: clamp(28px, 2.6vw, 40px); font-weight: 400; }
.book .sub { font-style: italic; color: var(--ink-60); }
.book .by { margin: 10px 0 14px; }
.book .why { color: var(--ink-80); }
.book .start { margin-top: 14px; padding-left: 14px; border-left: 1px solid var(--c-ink); }
.book .start b { font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; display: block; margin-bottom: 2px; }
.book .gauge { display: flex; align-items: center; gap: 10px; }
.book .gauge i {
  flex: 1;
  height: 8px;
  border: 1px solid var(--ink-60);
  position: relative;
  background: repeating-linear-gradient(90deg, var(--ink-20) 0 1px, transparent 1px 10%);
}
.book .gauge i::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--w, 0%);
  background: repeating-linear-gradient(-45deg, var(--c-ink) 0 1px, transparent 1px 3px);
  transition: width 1.4s var(--ease);
}
.book .level-dots { letter-spacing: .3em; }
.book.is-flash { animation: flash 1.6s var(--ease); }
@keyframes flash { 0%, 100% { background: transparent; } 20% { background: var(--ink-06); } }
@media (max-width: 1000px) {
  .book { grid-template-columns: 130px minmax(0, 1fr); }
  .book .spec { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .book { grid-template-columns: 1fr; }
  .book .book-svg { max-width: 150px; }
}

/* =========================================================
   LÁMINA 00 — BIENVENIDA
   ========================================================= */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }

/* Alzado de la Stoa: cada intercolumnio es un enlace */
.elev-fig { margin: 0; }
.elev-fig svg { width: 100%; height: auto; }
.elev-fig figcaption { text-align: center; margin-top: 10px; }
#elevation .t { font-size: 11px; }
#elevation .bay-hit { fill: transparent; stroke: none; }
#elevation .bay { cursor: pointer; outline: none; }
#elevation .bay.is-here { cursor: default; }
#elevation .bay .bay-bg { transition: fill .4s var(--ease); }
#elevation .bay:hover .bay-bg,
#elevation .bay:focus-visible .bay-bg { fill: url(#hatch); }
#elevation .bay.is-here .bay-bg { fill: url(#stipple); }
#elevation .bay .bay-n { transition: font-weight .2s; }
#elevation .bay:hover .bay-n,
#elevation .bay:focus-visible .bay-n,
#elevation .bay.is-here .bay-n { font-weight: 600; }
#elevation .bay .bay-icon { transform-box: fill-box; transform-origin: center; transition: transform .8s var(--ease); }
#elevation .bay:hover .bay-icon,
#elevation .bay:focus-visible .bay-icon { transform: translateY(-6px); }
#elevation .bay-spin { transform-box: fill-box; transform-origin: center; transition: transform 1.4s var(--ease); }
#elevation .bay:hover .bay-spin { transform: rotate(60deg); }
#elevation .bay:focus-visible .bay-bg { stroke-width: 2.4; }

/* Tres ideas */
.idea-card { display: flex; flex-direction: column; gap: 12px; }
.idea-card .idea-icon { width: 120px; height: 100px; margin-bottom: 6px; }
.idea-n { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--ink-60); }
.idea-card p { color: var(--ink-80); }
.idea-ref { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--ink-30); font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; color: var(--ink-60); }

/* Qué no es: mito tachado frente a la corrección */
.myths { display: grid; border-top: 1px solid var(--ink-20); }
.myths > li {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(20px, 4vw, 64px);
  padding: clamp(22px, 3vw, 36px) 0;
  border-bottom: 1px solid var(--ink-20);
}
.myth p {
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.2;
  font-style: italic;
  color: var(--ink-60);
  margin-top: 8px;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--ink-45);
}
.truth p { margin: 8px 0 12px; color: var(--ink-80); max-width: 36em; }
.truth .idea-ref { border: 0; padding: 0; }

/* Programa */
.syllabus { display: grid; border-top: 1px solid var(--c-ink); }
.syl {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 240px;
  gap: clamp(18px, 3vw, 48px);
  padding: clamp(26px, 3vw, 40px) 0;
  border-bottom: 1px solid var(--ink-20);
  align-items: start;
}
.syl-n { font-family: var(--serif); font-weight: 300; font-size: clamp(48px, 5vw, 76px); line-height: .9; }
.syl-body p { color: var(--ink-80); margin: 8px 0 16px; }
.syl-out { display: grid; gap: 8px; }
.syl-out li { position: relative; padding-left: 28px; color: var(--c-ink); }
.syl-out li::before {
  content: "";
  position: absolute;
  left: 2px; top: .5em;
  width: 11px; height: 11px;
  border: 1px solid var(--c-ink);
}
.syl-out li::after {
  content: "";
  position: absolute;
  left: 5px; top: calc(.5em + 2px);
  width: 4px; height: 7px;
  border: solid var(--c-ink);
  border-width: 0 1px 1px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .35s var(--ease);
}
.syl:hover .syl-out li::after { transform: rotate(45deg) scale(1); }
.syl:hover .syl-out li:nth-child(2)::after { transition-delay: .08s; }
.syl:hover .syl-out li:nth-child(3)::after { transition-delay: .16s; }
.syl-meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: baseline; }
.syl-meta dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-60); }
.syl-meta dd { font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; }
.syl-meta .syl-go { grid-column: 1 / -1; margin-top: 14px; }

/* Un día estoico */
.day-fig { margin: 0 0 clamp(24px, 3vw, 40px); }
.day-fig svg { width: 100%; max-width: 900px; height: auto; margin-inline: auto; }
#day .t { font-size: 11px; }
#day .station { cursor: default; }
#day .station .st-disc, #day .station .st-n { transition: fill .35s; }
#day .station.is-on .st-disc { fill: var(--c-ink); }
#day .station.is-on .st-n { fill: var(--c-paper); }
#day .station.is-on .st-label { font-weight: 600; }
.day-step { display: flex; flex-direction: column; gap: 10px; }
.day-step p { color: var(--ink-80); }
.day-step.is-on { border-color: var(--c-ink); }

/* Vocabulario */
.glossary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink-20); border-left: 1px solid var(--ink-20); }
.term { padding: clamp(18px, 2vw, 26px); border-right: 1px solid var(--ink-20); border-bottom: 1px solid var(--ink-20); transition: background-color .4s var(--ease); }
.term:hover { background: rgb(var(--ink) / .035); }
.term dt { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.term .gk { font-family: var(--serif); font-size: clamp(26px, 2.2vw, 32px); line-height: 1.1; }
.term .tr { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--ink-60); }
.term dd { color: var(--ink-80); font-size: .96em; line-height: 1.45; }

/* Empieza */
.start { text-align: center; padding: clamp(40px, 6vw, 88px) clamp(20px, 4vw, 64px); }
.start h2 { margin: 14px 0 18px; }
.start p { max-width: 34em; margin: 0 auto 30px; color: var(--ink-80); }
.start .btn-row { justify-content: center; }

@media (max-width: 1000px) {
  .glossary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .syl { grid-template-columns: 80px minmax(0, 1fr); }
  .syl-meta { grid-column: 2; }
}
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .myths > li { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 560px) {
  .glossary { grid-template-columns: 1fr; }
  .syl { grid-template-columns: 1fr; }
  .syl-meta { grid-column: 1; }
}
.inline-link { color: var(--c-ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.inline-link:hover { text-decoration-thickness: 2px; }

/* Etimología: cadena de la palabra «estoico» */
.etym {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--c-ink);
  border-bottom: 1px solid var(--ink-20);
}
.etym li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px clamp(14px, 1.6vw, 24px) 24px;
  border-right: 1px dashed var(--ink-30);
  transition: background-color .4s var(--ease);
}
.etym li:last-child { border-right: 0; }
.etym li:hover { background: rgb(var(--ink) / .035); }
.etym li + li::before {
  content: "";
  position: absolute;
  left: -11px; top: 50%;
  width: 22px; height: 22px;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 1px solid var(--ink-45);
  background: var(--c-paper) center / 12px 12px no-repeat;
}
.etym li + li::after {
  content: "";
  position: absolute;
  left: -6px; top: 50%;
  width: 12px; height: 12px;
  transform: translateY(-50%);
  background: var(--c-ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1 6h9M6.5 2.5L10 6l-3.5 3.5' fill='none' stroke='black' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1 6h9M6.5 2.5L10 6l-3.5 3.5' fill='none' stroke='black' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.etym .label { margin-bottom: 10px; }
.etym .gk { font-family: var(--serif); font-size: clamp(26px, 2.3vw, 36px); line-height: 1.05; }
.etym .tr { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--ink-60); }
.etym em { margin-top: 8px; color: var(--ink-80); line-height: 1.35; }
.etym .is-now .gk { font-weight: 500; }
.etym .is-now { background: rgb(var(--ink) / .035); }
.etym-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  margin-top: clamp(36px, 5vw, 64px);
  align-items: start;
}
.etym-text p { color: var(--ink-80); margin-bottom: 1em; max-width: 34em; }
.etym-text .idea-ref { display: block; border: 0; padding: 0; }
.etym-facts { display: grid; gap: 14px; }
.fact-box { position: relative; padding: 16px 18px 16px 54px; border: 1px dashed var(--ink-30); color: var(--ink-80); font-size: .96em; }
.fact-box .callout-n { position: absolute; left: 16px; top: 16px; }
.fact-box strong { color: var(--c-ink); font-weight: 600; }
@media (max-width: 900px) {
  .etym { grid-template-columns: 1fr; }
  .etym li { border-right: 0; border-bottom: 1px dashed var(--ink-30); }
  .etym li:last-child { border-bottom: 0; }
  .etym li + li::before { left: 50%; top: -11px; transform: translateX(-50%); }
  .etym li + li::after { left: 50%; top: -6px; transform: translateX(-50%) rotate(90deg); }
  .etym-story { grid-template-columns: 1fr; }
}

/* ---------- Bienvenida: hero editorial con tipografía construida ---------- */
.wh { padding-top: clamp(8px, 1.6vw, 24px); padding-bottom: clamp(56px, 8vw, 120px); }
.wh-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--c-ink);
  border-bottom: 1px solid var(--ink-20);
}
.wh-strip .label:nth-child(n+3) { text-align: right; }
.wh-type { position: relative; margin-top: clamp(28px, 5vw, 72px); padding-bottom: clamp(54px, 5vw, 74px); }
.wh-word {
  position: relative;
  z-index: 1;
  display: inline-block;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(120px, 25vw, 400px);
  line-height: 1.02;
  letter-spacing: -.015em;
  max-width: none;
  white-space: nowrap;
}
.wh-word .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(.18em);
  transition: opacity .9s var(--ease), transform 1.1s var(--ease), color .3s;
  transition-delay: calc(var(--i, 0) * .09s + .15s);
}
.wh.is-ready .wh-word .ch { opacity: 1; transform: none; }
.wh-word .ch.is-hot { color: transparent; -webkit-text-stroke: 1px var(--c-ink); }

.wh-guides { position: absolute; inset: 0; pointer-events: none; }
.wh-line {
  position: absolute;
  left: 0; right: 0;
  height: 0;
  border-top: 1px dashed var(--ink-30);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ease);
}
.wh-line.is-base { border-top: 1px solid var(--ink-60); }
.wh.is-ready .wh-line { transform: scaleX(1); }
.wh-line span {
  position: absolute;
  right: 0; bottom: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-60);
  white-space: nowrap;
  background: var(--c-paper);
  padding-left: 8px;
}
.wh-line span b { font-weight: 500; color: var(--c-ink); margin-left: 8px; }
.wh-tag {
  position: absolute;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-60);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .6s var(--ease), color .3s;
}
.wh-tag::before { content: ""; width: 1px; height: 12px; background: var(--ink-45); }
.wh.is-ready .wh-tag { opacity: 1; transition-delay: calc(var(--i, 0) * .09s + 1s); }
.wh-tag.is-hot { color: var(--c-ink); font-weight: 500; }
.wh-dim {
  position: absolute;
  width: 1px;
  background: var(--c-ink);
  opacity: 0;
  transition: opacity .6s var(--ease) 1.3s;
}
.wh-dim::before, .wh-dim::after { content: ""; position: absolute; left: -5px; width: 11px; height: 1px; background: var(--c-ink); }
.wh-dim::before { top: 0; }
.wh-dim::after { bottom: 0; }
.wh-dim span {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  white-space: nowrap;
  color: var(--c-ink);
}
.wh.is-ready .wh-dim { opacity: 1; }

.wh-deck {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, .9fr);
  gap: clamp(24px, 4vw, 64px);
  padding-top: 26px;
  border-top: 1px solid var(--c-ink);
}
.wh-entry .label { display: block; margin-bottom: 14px; }
.we-head { font-family: var(--serif); font-size: clamp(30px, 2.6vw, 40px); line-height: 1; }
.we-head b { font-weight: 500; }
.we-ipa { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--ink-60); margin-left: 6px; vertical-align: middle; }
.we-gram { margin-top: 12px; color: var(--ink-80); }
.we-gram i { font-family: var(--mono); font-style: normal; font-size: 11px; letter-spacing: .1em; color: var(--ink-60); margin-right: 4px; }
.we-senses { list-style: none; counter-reset: s; margin-top: 10px; display: grid; gap: 6px; }
.we-senses li { counter-increment: s; position: relative; padding-left: 24px; color: var(--ink-80); line-height: 1.4; }
.we-senses li::before { content: counter(s) "."; position: absolute; left: 0; font-family: var(--mono); font-size: 11px; top: .35em; color: var(--ink-60); }
.wh-sub { font-family: var(--serif); font-weight: 300; font-size: clamp(34px, 3.6vw, 56px); line-height: 1; letter-spacing: -.005em; }
.wh-text { margin-top: 18px; font-size: clamp(19px, 1.45vw, 23px); line-height: 1.45; color: var(--ink-80); max-width: 30em; }
.wh-spec { display: flex; flex-wrap: wrap; gap: 0; margin-top: 26px; border-top: 1px solid var(--ink-20); }
.wh-spec > div { padding: 12px 28px 0 0; margin-right: 28px; border-right: 1px solid var(--ink-20); }
.wh-spec > div:last-child { border-right: 0; }
.wh-spec dt { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-60); }
.wh-spec dd { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; }
.wh-toc .label { display: block; margin-bottom: 12px; }
.wh-toc ol { list-style: none; border-top: 1px solid var(--ink-20); }
.wh-toc a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--ink-20);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: padding .4s var(--ease), color .3s;
}
.wh-toc a span { color: var(--ink-60); }
.wh-toc a::after { content: "→"; margin-left: auto; opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .4s var(--ease); }
.wh-toc a:hover { padding-left: 8px; }
.wh-toc a:hover::after { opacity: 1; transform: none; }

@media (max-width: 1000px) {
  .wh-deck { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .wh-toc { grid-column: 1 / -1; }
  .wh-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
}
@media (max-width: 760px) {
  .wh-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wh-strip .label:nth-child(3) { text-align: left; }
  .wh-deck { grid-template-columns: 1fr; }
  .wh-line span { font-size: 8.5px; letter-spacing: .1em; }
  .wh-line span b { display: none; }
  .wh-tag { font-size: 8.5px; letter-spacing: .08em; }
}
@media (prefers-reduced-motion: reduce) {
  .wh-word .ch, .wh-line, .wh-tag, .wh-dim { transition: none !important; }
}
