/* JMH · Bosque y ciudad · components.css (v3): librería de componentes. Requiere tokens.css + base.css antes. Solo var(--…), cero hex. Los patrones de Territorio (umbral, campo de tareas, compuerta humana, comparador, instrumentos, cuaderno, nota doblada, riel, motion-toggle) viven en dist/patrones.css + dist/patrones.js. */

/* ===================================================================== */
/* BOTONES                                                                */
/* ===================================================================== */

/* .btn: acción principal de la pantalla; UNA sola por pantalla, fondo encendido. Letras claras + borde de tinta al 14 % (DS5, 2026-09-09) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 10px var(--sp-4);
  border: 1px solid var(--cta-line); border-radius: var(--r-btn);
  background: var(--cta-bg); color: var(--cta-ink);
  font: 500 13px/1 var(--font-mono); letter-spacing: .02em; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  box-shadow: var(--elev-2);
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out), opacity var(--t-fast) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .btn:hover { transform: translateY(-1px); box-shadow: var(--elev-3); } }
.btn:active { transform: translateY(1px) scale(.985); box-shadow: var(--elev-1); }
.btn:focus-visible { outline: 2px solid var(--blue-fill); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; box-shadow: none; transform: none; }

/* .btn--ghost: acción secundaria junto a un .btn primario; borde de tinta, sin fondo */
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .btn--ghost:hover { background: var(--line-soft); transform: none; box-shadow: none; } }
.btn--ghost:active { background: var(--line-soft); }

/* .btn--big / .btn--small: variantes de tamaño, mismo rol semántico */
.btn--big { font-size: 15px; padding: 14px var(--sp-5); }
.btn--small { font-size: 11.5px; padding: 6px var(--sp-3); }

/* .btn--icon: botón cuadrado solo-ícono; exige aria-label en el HTML */
.btn--icon { padding: 10px; width: 40px; height: 40px; }

/* ===================================================================== */
/* ENLACES                                                                */
/* ===================================================================== */

/* .link: enlace dentro de texto o suelto, subrayado fino en el color que manda */
.link { color: var(--leaf); text-decoration-thickness: 1px; text-underline-offset: .2em; font-weight: 500; }
.link:hover { color: var(--ink); }
.link:focus-visible { outline: 2px solid var(--blue-fill); outline-offset: 2px; }

/* .link--ext: enlace que saca del sitio (otra pestaña, otro dominio) */
.link--ext::after { content: "↗"; display: inline-block; margin-left: .3em; font-size: .85em; }

/* ===================================================================== */
/* CAMPOS                                                                 */
/* ===================================================================== */

/* .field: envoltorio de un campo de formulario, label .lbl arriba + control */
.field { display: grid; gap: var(--sp-2); margin-bottom: var(--sp-4); max-width: 100%; }
.field > input, .field > select, .field > textarea {
  font: 15px/1.5 var(--font-mono); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-field); padding: 10px var(--sp-3);
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.field > textarea { min-height: 6em; resize: vertical; }
.field > input::placeholder, .field > textarea::placeholder { color: var(--mute); }
.field > input:focus-visible, .field > select:focus-visible, .field > textarea:focus-visible {
  outline: none; border-color: var(--blue-fill); box-shadow: 0 0 0 3px color-mix(in oklab, var(--blue-fill) 25%, transparent);
}
.field > input:disabled, .field > select:disabled, .field > textarea:disabled { opacity: .5; cursor: not-allowed; }
.field__help { font-size: var(--fs-small); color: var(--soft); }

/* .field--error: campo con validación fallida; borde y mensaje en --alert */
.field--error > input, .field--error > select, .field--error > textarea { border-color: var(--alert); }
.field--error > input:focus-visible, .field--error > select:focus-visible, .field--error > textarea:focus-visible { box-shadow: 0 0 0 3px color-mix(in oklab, var(--alert) 25%, transparent); }
.field--error .field__help { color: var(--alert); }

/* .check / .radio: casilla y radio nativos con acento de marca */
.check, .radio { display: inline-flex; align-items: center; gap: .6em; font-size: var(--fs-body); cursor: pointer; }
.check input, .radio input { width: 18px; height: 18px; accent-color: var(--leaf-fill); cursor: pointer; }
.check:has(input:disabled), .radio:has(input:disabled) { opacity: .5; cursor: not-allowed; }

/* .switch: toggle binario (on/off); botón con role="switch", JS lleva aria-checked */
.switch { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; width: 44px; height: 26px; padding: 2px; border-radius: var(--r-pill); background: var(--line); cursor: pointer; transition: background-color var(--t-base) var(--ease-out); }
.switch__dot { width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: var(--elev-1); transition: transform var(--t-base) var(--ease-out), background-color var(--t-base) var(--ease-out); }
.switch[aria-checked="true"] { background: color-mix(in oklab, var(--leaf-fill) 55%, var(--line)); }
.switch[aria-checked="true"] .switch__dot { transform: translateX(18px); background: var(--leaf-fill); }
.switch:focus-visible { outline: 2px solid var(--blue-fill); outline-offset: 2px; }
.switch[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* ===================================================================== */
/* SUPERFICIES                                                            */
/* ===================================================================== */

/* .card: contenedor plano de contenido agrupado */
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-card); box-shadow: var(--elev-1); padding: var(--sp-5); }

/* .card--panel: variante bosque oscuro, para destacar un bloque sobre el resto de la página */
.card--panel { background: var(--panel); color: var(--panel-ink); border-color: transparent; border-radius: var(--r-panel); }
.card--panel .lbl { color: var(--panel-soft); }

/* .glass: vidrio sin slop (CONTRATO §2.7); siempre con contenido real detrás */
.glass { position: relative; background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--r-card); backdrop-filter: blur(12px) saturate(1.15); -webkit-backdrop-filter: blur(12px) saturate(1.15); box-shadow: var(--elev-2); padding: var(--sp-5); }

/* .bleed + .b-back/.b-mid/.b-front: foto con bordes disueltos hacia adentro (CONTRATO §2.8) */
.bleed { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-panel); --m: 62%; }
/* background-image se fija inline en cada .b-back/.b-mid (style="background-image:url(...)"), NUNCA vía var(--src):
   un url() dentro de un custom property se resuelve contra la hoja donde se USA (dist/components.css), no contra el HTML que lo declara. */
.bleed .b-back, .bleed .b-mid { position: absolute; inset: 0; background-position: center; background-size: cover; background-repeat: no-repeat; transform: scale(1.06); }
.bleed .b-back { z-index: 0; filter: blur(26px) saturate(1.05); -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 55%, transparent 100%); mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 55%, transparent 100%); }
.bleed .b-mid { z-index: 1; filter: blur(9px); -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 40%, transparent 84%); mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 40%, transparent 84%); }
.bleed .b-front { position: relative; z-index: 2; display: block; width: 100%; height: auto; -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 34%, transparent var(--m)); mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 34%, transparent var(--m)); }
.bleed--tight { --m: 74%; }

/* ===================================================================== */
/* ESTADO                                                                 */
/* ===================================================================== */

/* .badge + modificadores: estado de un loop/proceso, punto + texto mono label */
.badge { display: inline-flex; align-items: center; gap: .5em; padding: 4px var(--sp-2); border-radius: var(--r-pill); font: 500 var(--fs-label)/var(--lh-label) var(--font-mono); letter-spacing: var(--ls-label); text-transform: uppercase; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.badge--ok { color: var(--leaf); } .badge--ok::before { background: var(--leaf-fill); }
.badge--degraded { color: var(--copper); } .badge--degraded::before { background: var(--copper-fill); }
.badge--fail { color: var(--alert); } .badge--fail::before { background: var(--alert-fill); }
.badge--skip { color: var(--mute); } .badge--skip::before { background: var(--mute); }
.badge--aviso { color: var(--warn); } .badge--aviso::before { background: var(--warn-fill); }

/* .dot: punto que respira, "algo vivo corriendo" (solo transform/opacity, cumple §2.9) */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf-fill); box-shadow: 0 0 0 4px color-mix(in oklab, var(--leaf-fill) 25%, transparent); vertical-align: middle; animation: jmh-breathe var(--amb-breathe) ease-in-out infinite; }

/* .alert + modificadores: banda de aviso/error, icono a la izquierda, tinte 12% */
.alert { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4); border: 1px solid; border-radius: var(--r-card); }
.alert svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.alert p { margin: 0; color: var(--ink); }
.alert p:first-child { font-weight: 500; }
.alert--info { background: color-mix(in oklab, var(--blue-fill) 12%, transparent); border-color: color-mix(in oklab, var(--blue) 40%, transparent); color: var(--blue); }
.alert--aviso { background: color-mix(in oklab, var(--warn-fill) 12%, transparent); border-color: color-mix(in oklab, var(--warn) 40%, transparent); color: var(--warn); }
.alert--error { background: color-mix(in oklab, var(--alert-fill) 12%, transparent); border-color: color-mix(in oklab, var(--alert) 40%, transparent); color: var(--alert); }

/* .toast: aviso corto flotante, JMHToast.show() lo crea y lo retira solo */
.toast { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); margin-top: var(--sp-2); background: var(--panel); color: var(--panel-ink); border-radius: var(--r-field); border-left: 3px solid var(--leaf-fill); box-shadow: var(--elev-3); font-size: var(--fs-small); opacity: 0; transform: translateY(8px); transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out); }
.toast.is-on { opacity: 1; transform: translateY(0); }
/* .toast--ok explícito (aunque coincide con el default): JMHToast.show(txt,'ok') SIEMPRE agrega esta clase */
.toast--ok { border-left-color: var(--leaf-fill); }
.toast--error { border-left-color: var(--alert-fill); }
.toast--aviso { border-left-color: var(--warn-fill); }
[data-toast-host] { position: fixed; left: 50%; bottom: var(--sp-6); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
[data-toast-host] .toast { pointer-events: auto; }

/* ===================================================================== */
/* NAVEGACIÓN                                                             */
/* ===================================================================== */

/* .bar: barra superior fija; vidrio al hacer scroll (JS agrega .bar--scrolled) */
.bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: var(--sp-5); height: 64px; padding-inline: var(--sp-gutter); transition: background-color var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out), backdrop-filter var(--t-base) var(--ease-out); }
.bar--scrolled { background: var(--glass); border-bottom: 1px solid var(--glass-line); backdrop-filter: blur(12px) saturate(1.15); -webkit-backdrop-filter: blur(12px) saturate(1.15); }
.bar__name { font-family: var(--font-serif); font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.bar__role { font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--soft); }
.bar__spacer { flex: 1; }
.dial { appearance: none; background: none; border: 1px solid var(--line); border-radius: 50%; width: 44px; height: 44px; padding: 0; cursor: pointer; color: var(--ink); display: grid; place-items: center; }
.dial svg { width: 28px; height: 28px; transition: transform var(--t-slow) var(--ease-out); }
[data-mode="noche"] .dial svg { transform: rotate(180deg); }
.dial .sun { fill: var(--copper-fill); } .dial .rays line { stroke: var(--copper-fill); stroke-width: 1.4; stroke-linecap: round; }
.dial .moon { fill: var(--blue-fill); } .dial .moon-cut { fill: var(--canvas); transition: fill var(--t-base) var(--ease-out); }
.dial .moon-g, .dial .sun, .dial .rays { transition: opacity var(--t-base) var(--ease-out); }
.dial .moon-g { opacity: 0; } [data-mode="noche"] .dial .moon-g { opacity: 1; } [data-mode="noche"] .dial .sun, [data-mode="noche"] .dial .rays { opacity: 0; }
.dial:focus-visible { outline: 2px solid var(--blue-fill); outline-offset: 3px; }
@media (max-width: 860px) { .bar__role { display: none; } }

/* .tabs: role="tablist"; teclado con flechas/Home/End vía components.js */
/* width:100% + min-width:0 son obligatorios: un flex item con overflow-x:auto no se encoge solo con stretch
   (el cross-size de flexbox no siempre gana contra el contenido), y en vez de hacer scroll interno empuja
   el documento entero (overflow horizontal verificado en 390px con más pestañas de las que caben) */
.tabs { display: flex; width: 100%; min-width: 0; gap: var(--sp-1); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs [role="tab"] { all: unset; box-sizing: border-box; cursor: pointer; padding: var(--sp-3) var(--sp-4); font: 500 var(--fs-small)/1.1 var(--font-mono); color: var(--soft); white-space: nowrap; box-shadow: inset 0 -2px 0 transparent; transition: color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out); }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--leaf-fill); }
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"]:focus-visible { outline: 2px solid var(--blue-fill); outline-offset: -2px; }
.tab-panel[hidden] { display: none; }

/* .crumbs: ruta de navegación */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); font-size: var(--fs-small); color: var(--soft); }
.crumbs a { color: var(--soft); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs__sep { color: var(--mute); }

/* .pager: paginación anterior/números/siguiente */
.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--line); font-size: var(--fs-small); }
.pager__nums { display: flex; gap: var(--sp-1); }
.pager__nums a, .pager__nums span { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; border-radius: var(--r-btn); color: var(--soft); text-decoration: none; }
.pager__nums a:hover { background: var(--line-soft); color: var(--ink); }
.pager__nums .is-active { background: var(--surface-2); color: var(--ink); font-weight: 500; }

/* .footer: dos filas, enlaces mono arriba + línea legal abajo */
.footer { border-top: 1px solid var(--line); padding: var(--sp-6) var(--sp-gutter) var(--sp-7); }
.footer__row { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); font-size: var(--fs-small); }
.footer__row a { color: var(--soft); text-decoration: none; }
.footer__row a:hover { color: var(--ink); }
.footer__legal { margin-top: var(--sp-4); font-size: var(--fs-small); color: var(--mute); }

/* ===================================================================== */
/* DATOS                                                                  */
/* ===================================================================== */

/* .table + .table--dense: tabla de datos, cabeceras label, fila activa marcada */
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-data); font-variant-numeric: tabular-nums; }
.table th { text-align: left; padding: var(--sp-2) var(--sp-3); font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; font-weight: 400; color: var(--soft); border-bottom: 1px solid var(--line); }
.table td { padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tr.is-active td { background: color-mix(in oklab, var(--leaf-fill) 10%, transparent); }
.table--dense th, .table--dense td { padding: var(--sp-1) var(--sp-2); }

/* .stat: número grande en serif con una mancha que respira detrás */
.stat { position: relative; display: grid; justify-items: start; align-content: center; }
.stat__blob { position: absolute; left: -10px; top: 4px; width: 120px; height: 80px; border-radius: 50%; background: var(--blue-fill); filter: blur(28px); opacity: .35; animation: jmh-blob var(--amb-breathe) ease-in-out infinite alternate; }
.stat__n { position: relative; z-index: 1; font-family: var(--font-serif); font-weight: 400; font-size: 3.4rem; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat__lbl { position: relative; z-index: 1; margin-top: var(--sp-2); max-width: 22ch; font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--soft); }

/* .kpi-row: fila de varios .stat en columnas parejas */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--sp-5); }

/* .log: bitácora en vivo; JS agrega .is-on a cada línea nueva para que aparezca */
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-1); }
.log li { display: grid; grid-template-columns: 4rem 1fr auto; gap: var(--sp-4); align-items: center; padding: var(--sp-2) 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-small); opacity: 0; transform: translateY(6px); transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out); }
.log li.is-on { opacity: 1; transform: translateY(0); }
.log time { color: var(--blue); font-variant-numeric: tabular-nums; }

/* .timeline: eventos verticales con marca y hora */
.timeline { position: relative; display: grid; gap: var(--sp-5); padding-left: var(--sp-5); border-left: 1px solid var(--line); }
.timeline__item { position: relative; }
.timeline__item::before { content: ""; position: absolute; left: calc(-1 * var(--sp-5) - 4px); top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf-fill); }
.timeline__time { font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--soft); }

/* ===================================================================== */
/* CONTENIDO                                                              */
/* ===================================================================== */

/* .quote: cita en serif, cite en label debajo */
.quote { margin: 0; padding-left: var(--sp-5); border-left: 2px solid var(--leaf-fill); font-family: var(--font-serif); font-size: var(--fs-h4); line-height: 1.4; }
.quote cite { display: block; margin-top: var(--sp-3); font-family: var(--font-mono); font-style: normal; font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--soft); }

/* .callout: nota destacada dentro de un párrafo largo */
.callout { padding: var(--sp-3) var(--sp-4); border-left: 2px solid var(--leaf-fill); background: var(--surface-2); border-radius: 0 var(--r-field) var(--r-field) 0; }
.callout p:last-child { margin-bottom: 0; }

/* .figure: imagen + pie en label */
.figure { margin: 0; }
.figure img { border-radius: var(--r-img); }
.figure figcaption { margin-top: var(--sp-2); font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--soft); }

/* .kbd: tecla de teclado en texto */
.kbd { display: inline-block; padding: 2px var(--sp-2); font-family: var(--font-mono); font-size: var(--fs-small); background: var(--surface); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: var(--r-field); }

/* .wire + .wire.on + .pulse: cable SVG con flujo, aplica a <path>/<line> */
.wire { fill: none; stroke: var(--soft); stroke-width: 1.2; stroke-dasharray: 4 6; opacity: .55; animation: jmh-flow var(--amb-flow) linear infinite; }
.wire.on { stroke: var(--blue-fill); opacity: .95; }
.pulse { fill: var(--blue-fill); filter: drop-shadow(0 0 4px var(--blue-fill)); }

/* .sep[data-ticks]: separador giratorio con marcas de reloj (griffin) */
.sep { display: grid; place-items: center; gap: var(--sp-4); padding: var(--sp-7) 0 var(--sp-4); }
.sep svg { width: 120px; height: 120px; animation: jmh-spin var(--amb-spin) linear infinite; }
.sep circle { fill: none; stroke: var(--line); stroke-width: 1; }
.sep [data-ticks] line { stroke: var(--line); stroke-width: 1; }
.sep [data-ticks] line.q { stroke: var(--leaf-fill); stroke-width: 1.6; }
.sep .hand { stroke: var(--copper); stroke-width: 1.6; stroke-linecap: round; }

/* .clock: números tabulares para relojes en vivo */
.clock { font-variant-numeric: tabular-nums; }

/* ===================================================================== */
/* OVERLAY                                                                */
/* ===================================================================== */

/* .modal: backdrop + panel; components.js lo abre/cierra por data-modal-open/close y Escape */
.modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: var(--sp-5); opacity: 0; pointer-events: none; transition: opacity var(--t-base) var(--ease-out); }
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__backdrop { position: absolute; inset: 0; background: var(--scrim); }
.modal__panel { position: relative; z-index: 1; width: 100%; max-width: 32rem; max-height: 84vh; overflow: auto; background: var(--surface); border-radius: var(--r-panel); box-shadow: var(--elev-3); padding: var(--sp-6); transform: translateY(8px) scale(.98); transition: transform var(--t-base) var(--ease-out); }
.modal.is-open .modal__panel { transform: translateY(0) scale(1); }
.modal__close { position: absolute; top: var(--sp-3); right: var(--sp-3); }

/* .tooltip[data-tip]: texto corto al pasar/enfocar, contenido en el atributo data-tip */
.tooltip { position: relative; }
/* max-width + white-space:normal (nunca nowrap sin tope): un tip largo cerca del borde no debe abrir scroll horizontal del documento (la caja de un ::after cuenta para scrollWidth aunque opacity:0) */
.tooltip[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); max-width: min(200px, calc(100vw - var(--sp-6))); width: max-content; white-space: normal; text-align: center; background: var(--ink); color: var(--canvas); padding: .35em .6em; border-radius: var(--r-field); font-size: var(--fs-label); letter-spacing: var(--ls-label); opacity: 0; pointer-events: none; transition: opacity var(--t-fast) var(--ease-out); }
.tooltip[data-tip]:hover::after, .tooltip[data-tip]:focus-visible::after { opacity: 1; }

/* ===================================================================== */
/* UTILIDADES                                                             */
/* ===================================================================== */

/* .stack-1..10: columna con gap consistente en la escala de espacio */
.stack-1 { display: flex; flex-direction: column; gap: var(--sp-1); }
.stack-2 { display: flex; flex-direction: column; gap: var(--sp-2); }
.stack-3 { display: flex; flex-direction: column; gap: var(--sp-3); }
.stack-4 { display: flex; flex-direction: column; gap: var(--sp-4); }
.stack-5 { display: flex; flex-direction: column; gap: var(--sp-5); }
.stack-6 { display: flex; flex-direction: column; gap: var(--sp-6); }
.stack-7 { display: flex; flex-direction: column; gap: var(--sp-7); }
.stack-8 { display: flex; flex-direction: column; gap: var(--sp-8); }
.stack-9 { display: flex; flex-direction: column; gap: var(--sp-9); }
.stack-10 { display: flex; flex-direction: column; gap: var(--sp-10); }

/* .row: fila flex con gap, envuelve en angosto */
.row { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }

/* .grid-12: grilla de 12 columnas parejas */
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--sp-5); }

/* .hide-narrow: oculto por debajo de 860px (breakpoint "narrow" de tokens.json) */
@media (max-width: 860px) { .hide-narrow { display: none; } }

/* ===================================================================== */
/* KEYFRAMES (solo transform/opacity/stroke-dashoffset, CONTRATO §2.9)    */
/* base.css ya apaga todo esto globalmente bajo prefers-reduced-motion    */
/* ===================================================================== */
@keyframes jmh-breathe { 50% { opacity: .55; transform: scale(.92); } }
@keyframes jmh-blob { to { transform: translate(14px, 6px) scale(1.12); opacity: .5; } }
@keyframes jmh-flow { to { stroke-dashoffset: -32; } }
@keyframes jmh-spin { to { transform: rotate(360deg); } }
