/* ============================================================================
   VULTUS · Páginas de tratamiento
   Diseño de la capa que produce inc/treatment_render.php
   Usa los tokens de marca ya definidos en site.css (:root)
   ========================================================================= */

.t-shell,
.t-facts,
.t-cta-bar{
  --t-rule:  color-mix(in srgb, var(--sage) 22%, transparent);
  --t-rule-2:color-mix(in srgb, var(--gold) 34%, transparent);
  --t-body:  color-mix(in srgb, var(--ink) 88%, transparent);
  --t-measure: 66ch;
  --t-gap: clamp(28px, 5vw, 56px);
  /* Oliva casi negro para el reverso de acento (sufijo *). Hex fijo a propósito:
     evitamos color-mix en runtime (bug de WebKit). = sage-ink 52% sobre negro. */
  --t-flip-dark: #24281E;
}

/* ── Barra de datos del tratamiento ─────────────────────────────────────── */
.t-facts{
  background: var(--cream-deep);
  border-top: 1px solid var(--t-rule);
  border-bottom: 1px solid var(--t-rule);
  position: relative;
}
/* Fade a la derecha como pista de scroll: el JS pone .is-scroll cuando la barra
   desborda y .at-end cuando llegó al final. */
.t-facts::after{
  content: "";
  position: absolute;
  top: 1px; bottom: 1px; right: 0;
  width: 44px;
  background: linear-gradient(to right, transparent, var(--cream-deep));
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}
.t-facts.is-scroll::after{ opacity: 1; }
.t-facts.is-scroll.at-end::after{ opacity: 0; }
.t-facts-in{
  display: flex;
  gap: clamp(22px, 4vw, 54px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px clamp(18px, 5vw, 40px);
  overflow-x: auto;
  scrollbar-width: none;
}
.t-facts-in::-webkit-scrollbar{ display: none; }
.t-fact{
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 0 0 auto;
  position: relative;
  padding-right: clamp(22px, 4vw, 54px);
}
.t-fact + .t-fact::before{
  content: "";
  position: absolute;
  left: calc(clamp(22px, 4vw, 54px) * -0.5);
  top: 4px; bottom: 4px;
  width: 1px;
  background: var(--t-rule);
}
.t-fact:last-child{ padding-right: 0; }
.t-fact-k{
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sage-deep);
}
.t-fact-v{
  font-family: var(--serif);
  font-size: clamp(1.05rem, .95rem + .4vw, 1.28rem);
  line-height: 1.15;
  color: var(--sage-ink);
  white-space: nowrap;
}

/* ── Estructura general ─────────────────────────────────────────────────── */
.t-shell{
  background: var(--paper);
  padding: clamp(38px, 7vw, 82px) clamp(18px, 5vw, 40px) clamp(48px, 8vw, 96px);
}
.t-shell-in{
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--t-gap);
}
@media (min-width: 1080px){
  .t-shell-in{ grid-template-columns: 216px minmax(0, 1fr); gap: 72px; }
  .t-shell-in--full{ grid-template-columns: minmax(0, 1fr); }
}

/* ── Índice lateral ─────────────────────────────────────────────────────── */
.t-toc{ display: none; }
@media (min-width: 1080px){
  .t-toc{
    display: block;
    position: sticky;
    top: 104px;
    align-self: start;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
  .t-toc-h{
    font-family: var(--sans);
    font-size: 10px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--sage-deep);
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--t-rule);
  }
  .t-toc ol{ list-style: none; margin: 0; padding: 0; counter-reset: t-toc; }
  .t-toc li{ margin: 0 0 2px; }
  .t-toc a{
    display: block;
    padding: 7px 0 7px 16px;
    position: relative;
    font-family: var(--sans);
    font-size: .875rem;
    line-height: 1.4;
    color: color-mix(in srgb, var(--ink) 78%, transparent);
    text-decoration: none;
    transition: color .2s ease;
  }
  .t-toc a.t-toc-faq{ color: var(--sage-deep); font-weight: 500; margin-top: 10px; }
  .t-toc a::before{
    content: "";
    position: absolute;
    left: 0; top: 13px;
    width: 7px; height: 1px;
    background: var(--t-rule-2);
    transition: width .22s ease, background .22s ease;
  }
  .t-toc a:hover,
  .t-toc a.is-current{ color: var(--sage-ink); }
  .t-toc a.is-current::before{ width: 11px; background: var(--gold); }
  /* Subcategorías del índice: lista anidada bajo una categoría. En reposo se
     colapsan (solo grupos); el JS abre la del grupo que se está leyendo. */
  .t-toc ol.t-toc-sub{
    list-style: none;
    margin: 2px 0 8px;
    padding-left: 14px;
    border-left: 1px solid var(--t-rule);
    display: none;
  }
  .t-toc li.is-open > ol.t-toc-sub{ display: block; }
  .t-toc-sub a{
    padding: 5px 0 5px 14px;
    font-size: .8125rem;
    color: color-mix(in srgb, var(--ink) 62%, transparent);
  }
  .t-toc-sub a::before{ top: 12px; }
  /* Una categoría con subtemas se ve como encabezado de grupo, con caret. */
  .t-toc > ol > li > a{ font-weight: 500; color: color-mix(in srgb, var(--ink) 88%, transparent); }
  .t-toc-grp > a{ padding-right: 16px; }
  .t-toc-grp > a::after{
    content: "";
    position: absolute;
    right: 2px; top: 15px;
    width: 6px; height: 6px;
    border-right: 1.5px solid var(--t-rule-2);
    border-bottom: 1.5px solid var(--t-rule-2);
    transform: rotate(45deg);
    transition: transform .22s ease, border-color .22s ease;
  }
  .t-toc-grp.is-open > a::after{ transform: rotate(-135deg); top: 18px; border-color: var(--gold); }
}

/* ── Índice colapsable (móvil) ───────────────────────────────────────────────
   Arriba del artículo cuando no hay barra lateral (<1080px). Reusa el mismo
   árbol agrupado: en reposo muestra solo los grupos; el JS abre el activo. */
.t-toc-m{
  display: block;
  margin: 4px 0 6px;
  border: 1px solid var(--t-rule);
  border-radius: 10px;
  background: var(--cream);
  overflow: hidden;
}
@media (min-width: 1080px){ .t-toc-m{ display: none; } }
.t-toc-m-h{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  cursor: pointer;
  list-style: none;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sage-deep);
}
.t-toc-m-h::-webkit-details-marker{ display: none; }
.t-toc-m-i{ position: relative; width: 12px; height: 12px; flex: 0 0 auto; }
.t-toc-m-i::before,
.t-toc-m-i::after{
  content: ""; position: absolute; inset: 50% 0 auto 0; height: 1.5px;
  background: var(--gold); transition: transform .26s ease;
}
.t-toc-m-i::after{ transform: rotate(90deg); }
.t-toc-m[open] .t-toc-m-i::after{ transform: rotate(0deg); }
.t-toc-m-b{ padding: 2px 18px 12px; }
.t-toc-m ol{ list-style: none; margin: 0; padding: 0; }
.t-toc-m a{
  display: block;
  padding: 11px 0;
  font-family: var(--sans);
  font-size: .95rem;
  line-height: 1.35;
  color: var(--t-body);
  text-decoration: none;
}
.t-toc-m .t-toc-grp > a{ font-weight: 500; color: var(--sage-ink); position: relative; padding-right: 20px; }
.t-toc-m .t-toc-grp > a::after{
  content: ""; position: absolute; right: 2px; top: 17px;
  width: 7px; height: 7px;
  border-right: 1.5px solid var(--t-rule-2); border-bottom: 1.5px solid var(--t-rule-2);
  transform: rotate(45deg); transition: transform .22s ease, border-color .22s ease;
}
.t-toc-m .t-toc-grp.is-open > a::after{ transform: rotate(-135deg); top: 21px; border-color: var(--gold); }
.t-toc-m .t-toc-sub{
  display: none;
  margin: 0 0 6px;
  padding-left: 14px;
  border-left: 1px solid var(--t-rule);
}
.t-toc-m li.is-open > .t-toc-sub{ display: block; }
.t-toc-m .t-toc-sub a{ padding: 9px 0; font-size: .9rem; color: color-mix(in srgb, var(--ink) 66%, transparent); }
.t-toc-m a.is-current{ color: var(--sage-ink); }

/* ── Artículo ───────────────────────────────────────────────────────────── */
.t-article{ max-width: var(--t-measure); }
/* Ficha sin índice (t-shell-in--full, p. ej. Evaluación): la columna ya es de
   ancho completo, así que el artículo debe llenarla para que las grillas de
   tarjetas se expandan. El texto conserva su medida de lectura. */
.t-shell-in--full .t-article{ max-width: none; }
.t-shell-in--full .t-article > .t-sec > p,
.t-shell-in--full .t-article > .t-sec > .t-lede,
.t-shell-in--full .t-article ul.t-list,
.t-shell-in--full .t-article ul.t-chips{ max-width: var(--t-measure); }
/* Párrafo [wide]: excepción al tope de medida, para frases de cierre en una
   sola línea. Selector más específico que la regla de arriba (sin !important). */
.t-shell-in--full .t-article > .t-sec > p.t-wide{ max-width: none; text-align: left; }
.t-article p{
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.72;
  color: var(--t-body);
  text-align: justify;
  hyphens: auto;
  margin: 0 0 1.05em;
  text-wrap: pretty;
}
.t-article p:last-child{ margin-bottom: 0; }
.t-article strong{ font-weight: 500; color: var(--sage-ink); }
.t-article u{ text-decoration-color: var(--t-rule-2); text-underline-offset: 3px; }
.t-article a{ color: var(--sage-deep); text-underline-offset: 3px; }
/* En columna angosta el justificado abre huecos: vuelve a alineado a la izquierda. */
@media (max-width: 699px){
  .t-article p{ text-align: left; hyphens: none; }
}

.t-lede{
  font-family: var(--serif) !important;
  font-size: clamp(1.32rem, 1.05rem + 1.15vw, 1.78rem) !important;
  line-height: 1.34 !important;
  color: var(--sage-deep) !important;
  margin: 0 0 clamp(30px, 4vw, 44px) !important;
  padding-bottom: clamp(26px, 4vw, 38px);
  border-bottom: 1px solid var(--t-rule);
  text-wrap: balance;
}
/* Dato clave resaltado dentro de la bajada (p. ej. "1 hora"): dorado de marca. */
.t-lede strong{ color: var(--gold); font-weight: 600; }
/* Evaluación (ficha sin índice, .t-shell-in--full): en desktop e iPad horizontal
   la bajada cabe en una sola línea → usa todo el ancho del artículo y baja el
   tamaño lo necesario (queda por debajo del h2, no rompe jerarquía). En móvil
   sigue el clamp base y puede partir, que ahí es inevitable. Solo afecta a fichas
   sin índice; las demás conservan su bajada intacta. */
@media (min-width: 1024px){
  .t-shell-in--full .t-article > .t-sec > .t-lede{ max-width: none; }
  .t-shell-in--full .t-lede{ font-size: clamp(1.28rem, 0.85rem + 0.72vw, 1.55rem) !important; }
}

.t-sec{
  margin: clamp(40px, 6vw, 68px) 0 0;
  scroll-margin-top: 96px;
}
.t-sec--intro{ margin-top: 0; }
.t-h2{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.05rem);
  line-height: 1.2;
  color: var(--sage-ink);
  margin: 0 0 .7em;
  padding-top: 0;
  text-wrap: balance;
}

/* ── Categorías desplegables (acordeón) ──────────────────────────────────────
   Un <details class="t-cat"> agrupa las subsecciones de una categoría. El
   summary es el "encabezado negro" clicable; el JS de la plantilla cierra las
   demás al abrir una (una abierta a la vez). */
.t-cat{
  border-top: 1px solid var(--t-rule);
  scroll-margin-top: 96px;
}
/* Aire simétrico entre la intro y la primera categoría: el párrafo final no
   debe quedar pegado a la línea divisoria. Refleja el margen inferior de la
   bajada (.t-lede) para que el bloque introductorio respire igual arriba y abajo.
   Las categorías siguientes quedan a ras (estilo acordeón con divisores). */
.t-cat:first-of-type{ margin-top: clamp(30px, 4vw, 44px); }
.t-cat:last-of-type{ border-bottom: 1px solid var(--t-rule); }
.t-cat-h{
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(20px, 3vw, 30px) 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.32rem, 1.1rem + 1vw, 1.75rem);
  line-height: 1.22;
  color: var(--ink);
  transition: color .2s ease;
}
.t-cat-h::-webkit-details-marker{ display: none; }
.t-cat-h > span:first-child{ text-wrap: balance; }
.t-cat-h:hover{ color: var(--sage-ink); }
.t-cat[open] > .t-cat-h{ color: var(--sage-ink); }
.t-cat-i{
  flex: none;
  position: relative;
  width: 14px; height: 14px;
}
.t-cat-i::before,
.t-cat-i::after{
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 1.5px;
  background: var(--gold);
  transform: translate(-50%, -50%);
  transition: opacity .25s ease, transform .25s ease;
}
.t-cat-i::after{ transform: translate(-50%, -50%) rotate(90deg); }
.t-cat[open] > .t-cat-h .t-cat-i::after{ opacity: 0; }        /* + → − */
.t-cat-b{
  padding: 0 0 clamp(14px, 2.5vw, 26px);
  animation: t-cat-reveal .32s ease;
}
@keyframes t-cat-reveal{
  from{ opacity: 0; transform: translateY(-5px); }
  to{ opacity: 1; transform: none; }
}
/* El contenido de la categoría no depende del scroll-reveal: al desplegar debe
   verse de inmediato. */
.t-cat-b .rv{ opacity: 1 !important; transform: none !important; }
.t-cat-b .t-sec--sub{ margin: 0 0 clamp(26px, 4vw, 42px); }
.t-cat-b .t-sec--sub:last-child{ margin-bottom: 0; }
/* Preguntas titulares (subsecciones): algo más marcadas que el cuerpo. */
.t-h2--sub{
  font-size: clamp(1.16rem, 1rem + .68vw, 1.42rem);
  font-weight: 500;
  color: var(--sage-deep);
}

/* ── Enumeraciones ──────────────────────────────────────────────────────── */
.t-chips{
  list-style: none;
  margin: 4px 0 1.15em;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr));
  gap: 9px;
}
.t-chips li{
  position: relative;
  padding: 12px 14px 12px 30px;
  background: var(--cream);
  border: 1px solid var(--t-rule);
  font-family: var(--sans);
  font-size: .9375rem;
  line-height: 1.38;
  color: var(--t-body);
}
.t-chips li::before{
  content: "";
  position: absolute;
  left: 14px; top: 19px;
  width: 5px; height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
}
.t-list{
  margin: 4px 0 1.15em;
  padding-left: 20px;
  list-style: none;
}
.t-list li{
  position: relative;
  padding-left: 4px;
  margin-bottom: 9px;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--t-body);
}
.t-list li::before{
  content: "";
  position: absolute;
  left: -16px; top: .72em;
  width: 6px; height: 1px;
  background: var(--gold);
}

/* ── Tarjetas de producto ───────────────────────────────────────────────── */
.t-card{
  margin: 20px 0;
  padding: clamp(20px, 3vw, 26px) clamp(20px, 3vw, 28px);
  background: var(--cream);
  border: 1px solid var(--t-rule);
  border-left: 2px solid var(--gold);
}
.t-card-h{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.18rem, 1.05rem + .5vw, 1.42rem);
  line-height: 1.2;
  color: var(--sage-deep);
  margin: 0 0 .6em;
}
.t-card p{ font-size: 1rem; }
.t-card p:last-child{ margin-bottom: 0; }

/* ── Preguntas frecuentes ───────────────────────────────────────────────── */
.t-acc{ border-top: 1px solid var(--t-rule); }
.t-q{ border-bottom: 1px solid var(--t-rule); }
.t-q summary{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 22px;
  padding: 19px 2px;
  cursor: pointer;
  list-style: none;
}
.t-q summary::-webkit-details-marker{ display: none; }
.t-q summary:focus-visible{ outline: 2px solid var(--gold); outline-offset: 3px; }
.t-q-t{
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1rem + .35vw, 1.28rem);
  font-weight: 500;
  line-height: 1.3;
  color: var(--sage-ink);
  transition: color .2s ease;
}
.t-q:hover .t-q-t{ color: var(--sage-deep); }
.t-q-i{
  flex: 0 0 auto;
  position: relative;
  width: 13px; height: 13px;
  translate: 0 1px;
}
.t-q-i::before,
.t-q-i::after{
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1px;
  background: var(--gold);
  transition: transform .26s ease;
}
.t-q-i::after{ transform: rotate(90deg); }
.t-q[open] .t-q-i::after{ transform: rotate(0deg); }
.t-a{
  padding: 0 0 22px;
  max-width: 62ch;
  animation: t-in .3s ease both;
}
@keyframes t-in{ from{ opacity: 0; transform: translateY(-4px); } to{ opacity: 1; transform: none; } }

/* ── Cierre editorial ───────────────────────────────────────────────────── */
.t-sec--closing{
  margin-top: clamp(44px, 6vw, 72px);
  padding: clamp(26px, 4vw, 38px) clamp(24px, 4vw, 36px);
  background: var(--cream-deep);
  border: 1px solid var(--t-rule);
}
.t-h2--closing{ padding-top: 0; }
.t-sec--closing p:last-child{ margin-bottom: 0; }

/* ── Referencias ────────────────────────────────────────────────────────── */
.t-sec--refs{ margin-top: clamp(34px, 5vw, 52px); }
.t-refs{ border-top: 1px solid var(--t-rule); }
.t-refs summary{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sage-deep);
}
.t-refs summary::-webkit-details-marker{ display: none; }
.t-refs summary::after{
  content: "+";
  font-size: 13px;
  letter-spacing: 0;
  color: var(--gold);
}
.t-refs[open] summary::after{ content: "–"; }
.t-refs-body p{
  font-size: .78rem;
  line-height: 1.62;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  padding-bottom: 18px;
}

/* ── Barra de acción fija (móvil) ───────────────────────────────────────── */
.t-cta-bar{ display: none; }
@media (max-width: 899px){
  .t-cta-bar{
    display: block;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    padding: 10px 88px calc(10px + env(safe-area-inset-bottom, 0px)) 14px;
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--t-rule);
    transform: translateY(110%);
    transition: transform .3s ease;
  }
  .t-cta-bar.is-on{ transform: none; }
  .t-cta-bar a{
    display: block;
    text-align: center;
    padding: 13px 18px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--paper);
    background: var(--sage-deep);
    text-decoration: none;
  }
  /* El JS pone la clase .cta-bar-on en <body> al mostrar la barra fija. Se usa
     esta clase en vez de :has() para no depender de Safari iOS ≥15.4. */
  body.cta-bar-on .wa{ bottom: 84px; }
}

/* ── Chip literal ([chips]) ─────────────────────────────────────────────────
   Chip sin clave (solo valor). Convive con los datos derivados key/valor. */
.t-fact--lit{ justify-content: center; }
.t-fact--lit .t-fact-v{ white-space: nowrap; }

/* ── Grilla de tarjetas que giran ([flip]) ──────────────────────────────────
   El reverso viaja en el DOM desde el servidor (indexable). El giro se dispara
   por aria-expanded (JS del template), nunca solo por hover. */
.t-flip-grid{
  list-style: none;
  display: grid;
  /* 6 pistas: tarjeta normal = span 2 (3 por fila); media fila (~) = span 3
     (2 por fila, sin hueco); ancho completo (+) = 1 / -1. */
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(14px, 2vw, 22px);
  margin: clamp(20px, 3vw, 34px) 0;
  padding: 0;
}
.t-flip-cell{ list-style: none; grid-column: span 2; }
.t-flip-cell--half{ grid-column: span 3; }
.t-flip-cell--full{ grid-column: 1 / -1; }
@media (max-width: 899px){
  .t-flip-grid{ grid-template-columns: repeat(2, 1fr); }
  .t-flip-cell, .t-flip-cell--half{ grid-column: auto; }  /* 2 por fila; ~ deja de ser media */
  .t-flip-cell--full{ grid-column: 1 / -1; }
}
@media (max-width: 559px){
  .t-flip-grid{ grid-template-columns: 1fr; }
  .t-flip-cell, .t-flip-cell--half, .t-flip-cell--full{ grid-column: auto; }
}

.t-flip{
  display: block;
  width: 100%;
  height: 268px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  perspective: 1400px;
}
@media (max-width: 559px){ .t-flip{ height: 212px; } }
.t-flip-inner{
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transition: transform .62s cubic-bezier(.22, 1, .36, 1);
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}
.t-flip[aria-expanded="true"] .t-flip-inner{ -webkit-transform: rotateY(180deg); transform: rotateY(180deg); }
.t-flip-face{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 2.4vw, 26px);
  border-radius: var(--radius-card);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.t-flip-front{ background: var(--cream); border: 1px solid var(--t-rule); }
.t-flip-back{
  background: var(--sage-deep);
  color: var(--cream);
  -webkit-transform: rotateY(180deg);
  transform: rotateY(180deg);
}
.t-flip-num{
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem);
  line-height: 1;
  color: var(--gold);
}
.t-flip-title{
  margin-top: auto;
  font-family: var(--serif);
  font-size: clamp(1.32rem, 1.05rem + 1vw, 1.68rem);
  line-height: 1.08;
  color: var(--sage-ink);
}
.t-flip-hint{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sage-deep);
}
.t-flip-hint::before{ content: ""; width: 20px; height: 1px; background: var(--gold); }
.t-flip-back-txt{
  font-family: var(--serif);
  font-size: clamp(1.08rem, .95rem + .45vw, 1.28rem);
  line-height: 1.34;
  color: var(--cream);
  /* Justificado SIN partir palabras: los guiones de corte («volu-», «mo-») se
     veían mal. En columna angosta el justificado abre algo de espacio entre
     palabras; se asume como mal menor frente a los guiones. */
  text-align: justify;
  hyphens: none;
  -webkit-hyphens: none;
}
.t-flip-back-lbl{
  margin-top: auto;
  padding-top: 14px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
/* Acento (sufijo *): solo cambia el REVERSO — oliva casi negro. El frente queda
   idéntico a una tarjeta normal para que el destaque se descubra al abrir. */
.t-flip--accent .t-flip-back{ background: var(--t-flip-dark); }

/* Destacada (sufijo !): solo el REVERSO va dorado de marca; el frente queda
   normal. Texto y etiqueta en tinta oscura (--ink, ≥4.8:1 sobre el dorado). */
.t-flip--gold .t-flip-back{ background: var(--gold); }
.t-flip--gold .t-flip-back-txt,
.t-flip--gold .t-flip-back-lbl{ color: var(--ink); }

/* Los spans de celda (--full = fila entera, --half = media fila) se definen en
   el bloque de la grilla, con sus resets por breakpoint. La altura fija de
   .t-flip no cambia, así toda fila mide igual que las de arriba (simetría). */
.t-flip:focus-visible{ outline: 2px solid var(--gold); outline-offset: 3px; border-radius: var(--radius-card); }

/* Ítem mal formado dentro de un [flip]: fila plana de ancho completo. */
.t-flip-note{
  grid-column: 1 / -1;
  list-style: none;
  font-family: var(--sans);
  color: var(--t-body);
  padding: 6px 2px;
}

/* ── Bloques planos del cierre ([flip flat]) ────────────────────────────── */
.t-flip-grid--flat{ grid-template-columns: repeat(3, 1fr); }
@media (max-width: 559px){ .t-flip-grid--flat{ grid-template-columns: 1fr; } }
.t-flat-cell{
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(20px, 2.6vw, 28px);
  background: var(--cream);
  border: 1px solid var(--t-rule);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius-card);
}
.t-flat-title{
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem);
  line-height: 1.1;
  color: var(--sage-ink);
}
.t-flat-sub{ font-family: var(--sans); font-size: .9rem; color: var(--t-body); }

/* ── Accesibilidad ──────────────────────────────────────────────────────── */
.t-article :focus-visible,
.t-toc a:focus-visible{ outline: 2px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce){
  .t-a{ animation: none; }
  .t-q-i::before, .t-q-i::after,
  .t-cta-bar, .t-toc a, .t-toc a::before{ transition: none; }
  /* Sin giro: las caras se apilan, altura automática, el reverso se despliega
     debajo solo al expandir. */
  .t-flip{ height: auto; perspective: none; }
  .t-flip-inner{ transition: none; transform: none !important; }
  .t-flip-face{ position: static; backface-visibility: visible; transform: none; }
  .t-flip-back{ margin-top: 10px; }
  .t-flip[aria-expanded="false"] .t-flip-back{ display: none; }
}
