/* =============================================================================
   mando-prioridades — "Qué operar hoy"

   Tarjetas de grafito "de colección": borde de luz según el nivel (crítica =
   rojo→ámbar, media = oro, baja = acero), el logo como sello de oro en la
   cabecera y como marca de agua completa, el puntaje en un medidor de precisión,
   la acción sugerida como llamada a la acción de la tarjeta y los importes como
   cifras de libro mayor.

   Todo va acotado bajo `.mando` y con clases nuevas (`hoy-*`): no pelea con las
   reglas viejas `.prio*` de piezas.css, que ya no se usan. La única excepción es
   `.hoy-hoja`, el contenido de la hoja "¿Cómo se calcula?", que se pinta en el
   <body> (fuera de `.mando`) y por eso lleva su propia clase.

   Las fichas son de grafito en TODOS los temas (como las de Movimientos): dentro
   de ellas se reponen los tonos de tinta y los acentos del tema oscuro; el texto
   que queda sobre el fondo de la página usa los tokens del tema.
   ========================================================================== */

/* --- La sección -------------------------------------------------------------- */

.mando .hoy-seccion {
  --hoy-trama: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  /* El oro del texto pequeño: en "Día" el oro del tema no llega a 4,5:1 sobre
     blanco, así que se oscurece con la tinta; en los temas oscuros queda más claro. */
  --hoy-oro-texto: var(--oro);
  --hoy-oro-texto: color-mix(in srgb, var(--oro) 76%, var(--tinta));
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: var(--e5);
  /* Una sección nueva de la pantalla: respira respecto a los botones de arriba. */
  margin-top: calc(var(--e3) + var(--e2));
}

/* El halo dorado de las piezas premium, detrás de la rejilla: un solo ambiente,
   sin borde (se desvanece antes de tocar el límite de la sección). */
.mando .hoy-seccion::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -36px -16px -40px;
  pointer-events: none;
  /* Centrado y desvanecido por los cuatro lados: ningún borde de la caja se ve. */
  background: radial-gradient(ellipse closest-side at 50% 48%, var(--oro-tenue), transparent);
}

/* --- Cabecera editorial ------------------------------------------------------ */

/* Cuatro piezas (sobretítulo, botón, titular, leyenda) en una rejilla: en laptop
   el botón se sienta a la derecha, al pie del titular; en celular sube a la
   línea del sobretítulo para no gastar una fila entera. */
.mando .hoy-cabecera {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "sobre   como"
    "titular como"
    "leyenda como";
  grid-template-rows: auto auto 1fr;
  column-gap: var(--e5);
}
.mando .hoy-sobre   { grid-area: sobre; }
.mando .hoy-titular { grid-area: titular; }
.mando .hoy-leyenda { grid-area: leyenda; }
.mando .hoy-como    { grid-area: como; align-self: end; }
/* Sin leyenda ni botón de por medio (estado vacío): solo el titular. */
.mando .hoy-cabecera > .hoy-titular:only-child { grid-column: 1 / -1; }

/* El sobretítulo: rótulo en mayúsculas con un filete de oro que nace de la nada. */
.mando .hoy-sobre {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--hoy-oro-texto);
}
.mando .hoy-sobre::before {
  content: '';
  flex: none;
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--oro));
}

/* El titular, en la serif de la casa: "1 cuenta" en cursiva dorada. */
.mando .hoy-titular {
  margin-top: 12px;
  font-family: var(--letra-display);
  font-weight: 600;
  font-size: clamp(25px, 2.5vw, 33px);
  line-height: 1.12;
  letter-spacing: -.014em;
  font-variant-numeric: lining-nums;
  color: var(--tinta);
  text-wrap: balance;
}
.mando .hoy-titular em {
  font-style: italic;
  font-weight: 600;
  color: var(--oro);
  padding-right: .04em;
}

/* La leyenda: cuántas cuentas hay de cada nivel, con la luz de su tarjeta. Cada
   nivel es un botón: lleva a la primera cuenta de ese nivel (en el celular la
   crítica suele quedar al final del carrusel) y la ilumina. El margen negativo
   sienta el punto de color justo bajo el borde izquierdo del titular. */
.mando .hoy-leyenda {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: calc(var(--e3) - 4px) 0 0 -10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--tinta-media);
}
.mando .hoy-leyenda:empty { display: none; }
.mando .hoy-leyenda-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  margin: 0;
  padding: 0 11px 0 10px;
  border: 0;
  border-radius: 99px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--tinta-media);
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  /* `.pulsable` (compartida) lo eleva y le pone sombra: aquí no. */
  transform: none;
  box-shadow: none;
  transition: background var(--t-medio) var(--suave), color var(--t-medio) var(--suave), transform var(--t-corto) var(--muelle);
}
/* El área táctil llega a 44 px sin engordar el chip. */
.mando .hoy-leyenda-item::before { content: ''; position: absolute; inset: -6px -2px; }
.mando .hoy-leyenda-item:active {
  transform: scale(.95);
  box-shadow: none;
  background: color-mix(in srgb, var(--n, var(--tinta-tenue)) 20%, transparent);
}
.mando .hoy-leyenda-item:focus-visible { outline: 2px solid var(--oro); outline-offset: 1px; }
@media (hover: hover) {
  .mando .hoy-leyenda-item:hover {
    transform: none;
    box-shadow: none;
    color: var(--tinta);
    background: color-mix(in srgb, var(--n, var(--tinta-tenue)) 13%, transparent);
  }
}
.mando .hoy-leyenda-item b { font-weight: 700; color: var(--tinta); font-variant-numeric: tabular-nums; }
.mando .hoy-leyenda-item i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--n, var(--tinta-tenue));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--n, var(--tinta-tenue)) 18%, transparent), 0 0 9px var(--n, transparent);
}
.mando .hoy-leyenda-item.hoy-critica { --n: var(--rojo); }
.mando .hoy-leyenda-item.hoy-media   { --n: var(--oro); }
.mando .hoy-leyenda-item.hoy-baja    { --n: var(--tinta-tenue); }

/* El botón es de BOTONES (`.mando .boton*`); aquí solo dónde se sienta
   (`.hoy-como`, arriba, en la rejilla de la cabecera). */

/* --- La rejilla ---------------------------------------------------------------
   Laptop ancha: 4 columnas (3 con 3 cuentas, 2 con 2, 1 con 1). Tablet y laptop
   estrecha: 2, y si queda una suelta ocupa la fila entera. Celular: carrusel. */

.mando .hoy-rejilla {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--e4);
}
.mando .hoy-rejilla[data-n="1"] { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) and (max-width: 1279px) {
  .mando .hoy-rejilla > .hoy-ficha:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 1280px) {
  .mando .hoy-rejilla { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mando .hoy-rejilla[data-n="1"] { grid-template-columns: minmax(0, 1fr); }
  .mando .hoy-rejilla[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mando .hoy-rejilla[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --- La tarjeta ---------------------------------------------------------------- */

.mando .hoy-ficha {
  /* Tinta y acentos del grafito: casi negro en todos los temas. */
  --tinta: #e9edf5;
  --tinta-media: #9aa5b8;
  --tinta-tenue: #7d8699;
  /* La luz de la tarjeta: `--nivel` manda, `--nivel-b` la acompaña en el canto. */
  --nivel: var(--tinta-media);
  --nivel-b: var(--tinta-tenue);
  --brasa: linear-gradient(transparent, transparent);
  --sombra-ficha:
    inset 0 1px 0 rgba(255,255,255,.07),
    inset 0 -1px 0 rgba(0,0,0,.6),
    0 1px 2px rgba(0,0,0,.6),
    0 18px 30px -18px rgba(0,0,0,.92),
    0 22px 34px -28px rgba(0,0,0,.6);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  /* Dos zonas (identidad+acción | avance+libro). Si la tarjeta es ancha se
     ponen en dos columnas; si no, una sobre otra. Sin media queries: lo decide
     el ancho que le toque a cada tarjeta. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 268px), 1fr));
  grid-template-rows: auto 1fr;
  gap: var(--e4) var(--e6);
  padding: 18px;
  border-radius: var(--r-l);
  color: var(--tinta);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background: linear-gradient(165deg, #202126 0%, #0c0c0f 55%, #040405 125%);
  background:
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--nivel) 72%, #fff), transparent) 50% 0 / 58% 1px no-repeat,
    var(--hoy-trama),
    var(--brasa),
    radial-gradient(130% 88% at 10% -26%, color-mix(in srgb, var(--nivel) 24%, transparent), transparent 62%),
    linear-gradient(165deg, #202126 0%, #0c0c0f 55%, #040405 125%);
  background-blend-mode: normal, overlay, normal, normal, normal;
  box-shadow: var(--sombra-ficha);
  box-shadow: var(--sombra-ficha), 0 24px 38px -28px color-mix(in srgb, var(--nivel) 55%, transparent);
  transition:
    transform var(--t-medio) var(--muelle),
    box-shadow var(--t-medio) var(--suave);
}

.mando .hoy-ficha.hoy-critica {
  --nivel: var(--rojo);
  --nivel-b: var(--oro);
  --brasa: radial-gradient(90% 46% at 0% 104%, color-mix(in srgb, var(--rojo) 17%, transparent), transparent 70%);
}
.mando .hoy-ficha.hoy-media {
  --nivel: var(--oro);
  --nivel-b: color-mix(in srgb, var(--oro) 50%, #fff);
}
.mando .hoy-ficha.hoy-baja {
  --nivel: var(--tinta-media);
  --nivel-b: var(--tinta-tenue);
}

/* En "Día" los acentos del tema son oscuros (pensados para un panel blanco) y
   sobre el grafito no llegan a contraste: aquí dentro vuelven a ser los del
   tema oscuro. */
:root[data-theme="dia"] .mando .hoy-ficha {
  --oro:   #e3b35e; --oro-tenue:   rgba(227,179,94,.13);
  --verde: #4fc98a; --verde-tenue: rgba(79,201,138,.13);
  --rojo:  #e8695f; --rojo-tenue:  rgba(232,105,95,.13);
  --azul:  #6f9ae0; --azul-tenue:  rgba(111,154,224,.13);
}

/* El canto: un hilo de luz recortado con máscara, del color del nivel arriba a
   la izquierda y apagándose hacia abajo. Es lo que separa material de pintura. */
.mando .hoy-ficha::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(155deg, rgba(255,255,255,.28), rgba(255,255,255,.05) 55%, rgba(0,0,0,.5));
  background: linear-gradient(155deg,
    color-mix(in srgb, var(--nivel) 80%, rgba(255,255,255,.45)) 0%,
    color-mix(in srgb, var(--nivel-b) 30%, transparent) 30%,
    rgba(255,255,255,.05) 58%,
    rgba(0,0,0,.55) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

/* El barrido de brillo dorado: una pasada diagonal cuando el cursor entra. */
.mando .hoy-ficha::after {
  content: '';
  position: absolute;
  z-index: 3;
  top: -40%;
  bottom: -40%;
  left: 0;
  width: 44%;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(100deg,
    transparent 0%,
    color-mix(in srgb, var(--oro) 22%, transparent) 42%,
    rgba(255,255,255,.2) 50%,
    color-mix(in srgb, var(--oro) 14%, transparent) 58%,
    transparent 100%);
  transform: translateX(-140%) skewX(-18deg);
}

/* La luz que sigue al cursor (la mueve prioridades.js con --mx/--my). */
.mando .hoy-foco {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--nivel) 17%, transparent), transparent 72%);
  transition: opacity var(--t-largo) var(--suave);
}

/* Tu firma al pie: el logo COMPLETO (no una marca de agua cortada por el borde ni
   enredada con las cifras), como el sello grabado de un instrumento. Reusa la
   `.marca-tarjeta` compartida (el logo de fondo) y la saca del flujo absoluto. */
.mando .hoy-ficha .hoy-logo {
  position: static;
  z-index: auto;
  flex: none;
  width: 76px;
  height: 37px;
  /* Firma, no cartel: con cuatro tarjetas en fila, el azul del logo a plena
     intensidad compite con las cifras. Se enciende al señalar la tarjeta. */
  opacity: .62;
  mix-blend-mode: normal;
  transition: opacity var(--t-medio) var(--suave);
}
.mando .hoy-pie {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e3);
  min-height: 38px;
  padding-top: 4px;
}

/* --- Zonas -------------------------------------------------------------------- */

.mando .hoy-izq,
.mando .hoy-der {
  display: flex;
  flex-direction: column;
  gap: var(--e3);
  min-width: 0;
}

/* --- Tope: nivel y sello ---------------------------------------------------------- */

.mando .hoy-tope {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e3);
}

.mando .hoy-nivel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px 5px 9px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--nivel) 62%, #fff);
  background: color-mix(in srgb, var(--nivel) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nivel) 34%, transparent);
}
/* El rombo: la señal de nivel que se lee de lejos. En las críticas late. */
.mando .hoy-nivel i {
  position: relative;
  width: 6px;
  height: 6px;
  background: var(--nivel);
  transform: rotate(45deg);
  box-shadow: 0 0 9px var(--nivel);
}
.mando .hoy-critica .hoy-nivel i::after {
  content: '';
  position: absolute;
  inset: -3px;
  border: 1px solid var(--nivel);
  opacity: 0;
  animation: hoyLate 2.6s var(--suave) 1.4s infinite;
}
@keyframes hoyLate {
  0%   { transform: scale(.7); opacity: .75; }
  70%  { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* El sello: una moneda de oro con el monograma, como la del cauce 3D. */
.mando .hoy-sello {
  position: relative;
  display: block;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background:
    url('/brand/maax-street.png') 50% 44% / 78% auto no-repeat,
    radial-gradient(circle at 34% 26%, #28324d, #1b2130 58%, #111623);
  box-shadow: 0 0 0 1px rgba(0,0,0,.7), 0 3px 8px -2px rgba(0,0,0,.8), 0 0 14px -4px color-mix(in srgb, var(--oro) 60%, transparent);
}
.mando .hoy-sello::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(from 215deg,
    color-mix(in srgb, var(--oro) 55%, #fff),
    var(--oro),
    color-mix(in srgb, var(--oro) 40%, #000),
    var(--oro),
    color-mix(in srgb, var(--oro) 55%, #fff));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}
.mando .hoy-sello::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), inset 0 2px 5px rgba(255,255,255,.06);
}

/* --- Identidad: nombre, firma, medidor ------------------------------------------- */

.mando .hoy-id {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e3);
}
.mando .hoy-id-texto { flex: 1; min-width: 0; }

.mando .hoy-firma { display: flex; align-items: flex-start; gap: 8px; }
.mando .hoy-firma .punto-color { margin-top: 7px; }
.mando .hoy-nombre {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.016em;
  color: var(--tinta);
}
.mando .hoy-meta {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--tinta-media);
}

/* El medidor de precisión (el SVG lo arma prioridades.js). */
.mando .hoy-medidor {
  position: relative;
  flex: none;
  width: 70px;
  height: 70px;
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--nivel) 30%, transparent));
}
.mando .hoy-medidor svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mando .hoy-graduacion { fill: none; stroke: rgba(255,255,255,.2); stroke-width: 2.2; }
.mando .hoy-pista-arco { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 4; stroke-linecap: round; }
.mando .hoy-arco {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: var(--l) var(--t);
  animation: hoyAro 1100ms var(--suave) calc(var(--i, 0) * 90ms + 380ms) backwards;
}
.mando .hoy-parada-a, .mando .hoy-parada-b { stop-color: var(--nivel); }
.mando .hoy-parada-a { stop-color: color-mix(in srgb, var(--nivel) 62%, #000); }
.mando .hoy-parada-b { stop-color: color-mix(in srgb, var(--nivel) 78%, #fff); }
.mando .hoy-punta {
  transform-origin: 34px 34px;
  transform: rotate(var(--a, 0deg));
  animation: hoyPunta 1100ms var(--suave) calc(var(--i, 0) * 90ms + 380ms) backwards;
}
.mando .hoy-punta circle {
  fill: color-mix(in srgb, var(--nivel) 30%, #fff);
  stroke: color-mix(in srgb, var(--nivel) 55%, transparent);
  stroke-width: 2.6;
}
@keyframes hoyAro   { from { stroke-dasharray: 0 var(--t); } }
@keyframes hoyPunta { from { transform: rotate(0deg); } }

.mando .hoy-pts {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding-bottom: 5px;
  text-align: center;
}
.mando .hoy-pts b {
  font-family: var(--letra-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.01em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--tinta);
}
.mando .hoy-pts b i {
  font-family: var(--letra);
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--tinta-media);
}
.mando .hoy-pts em {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  font-style: normal;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .2em;
  text-indent: .2em;
  text-transform: uppercase;
  color: var(--tinta-media);
}

/* Lo que vigila la firma: diario, drawdown y el resultado de hoy, como la lectura
   de un instrumento: etiqueta a la izquierda, valor en monoespaciada a la derecha. */
.mando .hoy-vigila {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 5px var(--e3);
  margin: 0;
  padding: 10px 0 2px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.mando .hoy-vigila dt {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tinta-media);
}
.mando .hoy-vigila dd {
  margin: 0;
  text-align: right;
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  color: var(--tinta);
}
/* Un margen ya roto y un resultado de hoy se leen por su color. */
.mando .hoy-vigila dd.hoy-neg { color: color-mix(in srgb, var(--rojo) 80%, #fff); }
.mando .hoy-vigila dd.hoy-pos { color: color-mix(in srgb, var(--verde) 82%, #fff); }

/* --- La acción: la llamada a la acción de la tarjeta ------------------------------- */

.mando .hoy-accion {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--e3);
  padding: 11px 12px 11px 14px;
  border-radius: var(--r-s);
  background: rgba(255,255,255,.04);
  background: linear-gradient(120deg,
    color-mix(in srgb, var(--nivel) 17%, #0b0c10),
    color-mix(in srgb, var(--nivel) 5%, #08090c));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nivel) 26%, transparent);
  transition: box-shadow var(--t-medio) var(--suave), background var(--t-medio) var(--suave);
}
.mando .hoy-accion-txt { flex: 1; min-width: 0; }
.mando .hoy-accion-rotulo {
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--nivel) 70%, #fff);
}
.mando .hoy-accion-frase {
  margin-top: 6px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.42;
  letter-spacing: -.005em;
  color: var(--tinta);
  text-wrap: pretty;
}
/* La flecha: un botón redondo que se llena y sale disparado al señalar la tarjeta. */
.mando .hoy-flecha {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: color-mix(in srgb, var(--nivel) 70%, #fff);
  background: color-mix(in srgb, var(--nivel) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nivel) 40%, transparent);
  overflow: hidden;
  transition: background var(--t-medio) var(--suave), color var(--t-medio) var(--suave), box-shadow var(--t-medio) var(--suave);
}
.mando .hoy-flecha svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.9;
  transition: transform var(--t-medio) var(--muelle);
}

/* --- Avance al objetivo ------------------------------------------------------------ */

.mando .hoy-avance { display: flex; flex-direction: column; gap: 9px; }

.mando .hoy-pista {
  --tono: var(--verde);
  position: relative;
  height: 8px;
  border-radius: 99px;
  background: rgba(255,255,255,.07);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.035);
}
/* La graduación de la pista: marcas al 25, 50 y 75 %, como una regla de precisión. */
.mando .hoy-pista::before {
  content: '';
  position: absolute;
  inset: 1px 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.16), rgba(255,255,255,.16)) 25% 0 / 1px 100% no-repeat,
    linear-gradient(rgba(255,255,255,.16), rgba(255,255,255,.16)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(rgba(255,255,255,.16), rgba(255,255,255,.16)) 75% 0 / 1px 100% no-repeat;
}
.mando .hoy-pista-oro { --tono: var(--oro); }
.mando .hoy-relleno {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--v, 0%);
  border-radius: inherit;
  overflow: hidden;
  transform-origin: left center;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tono) 42%, #000), var(--tono));
  box-shadow: 0 0 12px color-mix(in srgb, var(--tono) 55%, transparent);
  animation: hoyLlena 1000ms var(--suave) calc(var(--i, 0) * 90ms + 420ms) backwards;
}
/* El brillo que recorre el relleno una vez, cuando acaba de llenarse. */
.mando .hoy-relleno::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 46%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: translateX(-120%);
  animation: hoyBrilloBarra 1300ms var(--suave) calc(var(--i, 0) * 90ms + 1500ms) backwards;
}
/* El pomo del final: lo mueve un contenedor del ancho de la pista (transform,
   no width), así que no se aplasta mientras se llena. */
.mando .hoy-pomo {
  position: absolute;
  inset: 0;
  transform: translateX(calc(var(--v, 0%) - 100%));
  animation: hoyPomo 1000ms var(--suave) calc(var(--i, 0) * 90ms + 420ms) backwards;
}
.mando .hoy-pomo::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--tono);
  box-shadow: 0 0 0 2px rgba(0,0,0,.6), 0 0 10px var(--tono);
}
/* Cumplido: la barra llena es de oro y no lleva pomo. */
.mando .hoy-pista-oro .hoy-relleno { width: 100%; }
@keyframes hoyLlena { from { transform: scaleX(0); } }
@keyframes hoyPomo  { from { transform: translateX(-100%); } }
@keyframes hoyBrilloBarra { from { transform: translateX(-120%); } to { transform: translateX(320%); } }

/* Sin avance: la pista vacía. Sin objetivo: una línea de puntos. En negativo: la
   pista rayada en rojo, sin relleno (no hay barra que se llene mientras pierdes). */
.mando .hoy-pista-vacia {
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px) 0 50% / 100% 1px no-repeat;
  box-shadow: none;
}
.mando .hoy-pista-vacia::before { display: none; }
.mando .hoy-pista-neg {
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--rojo) 34%, transparent) 0 3px, transparent 3px 7px), rgba(255,255,255,.05);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rojo) 30%, transparent);
}
.mando .hoy-pista-neg::before {
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 99px;
  background: var(--rojo);
  box-shadow: 0 0 9px var(--rojo);
}

.mando .hoy-avance-txt {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--tinta-media);
}
.mando .hoy-avance-txt b {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--verde);
}
.mando .hoy-avance-neg { color: color-mix(in srgb, var(--rojo) 82%, #fff); }
.mando .hoy-cumplido {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--oro);
}
.mando .hoy-cumplido svg { width: 15px; height: 15px; stroke-width: 2.2; }

/* --- Marcas: semáforo y días -------------------------------------------------------- */

.mando .hoy-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mando .hoy-chip {
  --c: var(--tinta-media);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 25px;
  padding: 0 11px 0 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .01em;
  white-space: nowrap;
  color: var(--c);
  background: rgba(255,255,255,.045);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.09);
}
.mando .hoy-chip svg { width: 13px; height: 13px; stroke-width: 1.8; }
.mando .hoy-chip-rojo  { --c: color-mix(in srgb, var(--rojo) 78%, #fff); background: var(--rojo-tenue); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rojo) 34%, transparent); }
.mando .hoy-chip-oro   { --c: color-mix(in srgb, var(--oro) 82%, #fff);  background: var(--oro-tenue);  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--oro) 34%, transparent); }
.mando .hoy-chip-verde { --c: color-mix(in srgb, var(--verde) 80%, #fff); background: var(--verde-tenue); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--verde) 32%, transparent); }

/* El semáforo: tres luces, una encendida. */
.mando .hoy-semaforo {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 99px;
  background: rgba(0,0,0,.45);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07);
}
.mando .hoy-luz {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.mando .hoy-luz-rojo.on  { background: var(--rojo);  box-shadow: 0 0 8px var(--rojo); }
.mando .hoy-luz-ambar.on { background: var(--oro);   box-shadow: 0 0 8px var(--oro); }
.mando .hoy-luz-verde.on { background: var(--verde); box-shadow: 0 0 8px var(--verde); }

/* --- El libro: lo que puedes arriesgar y lo que pagaría -------------------------------- */

.mando .hoy-libro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: end;
  row-gap: 7px;
  margin-top: auto;
  padding-top: var(--e3);
}
/* Rótulos en una fila y cifras en la de abajo, aunque un rótulo se parta en dos
   líneas en una tarjeta estrecha: las cifras quedan alineadas entre sí. */
.mando .hoy-celda { display: contents; }
.mando .hoy-celda:nth-child(1) > .hoy-rotulo { grid-row: 1; grid-column: 1; }
.mando .hoy-celda:nth-child(1) > .hoy-cifra  { grid-row: 2; grid-column: 1; }
.mando .hoy-celda:nth-child(2) > .hoy-rotulo { grid-row: 1; grid-column: 2; padding-left: var(--e3); }
.mando .hoy-celda:nth-child(2) > .hoy-cifra  { grid-row: 2; grid-column: 2; padding-left: var(--e3); }
/* El filete vertical entre las dos cifras. */
.mando .hoy-libro::after {
  content: '';
  position: absolute;
  left: 50%;
  top: calc(var(--e3) + 2px);
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,.08);
}
.mando .hoy-libro::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--nivel) 55%, transparent), rgba(255,255,255,.08) 45%, transparent);
}
.mando .hoy-rotulo {
  min-width: 0;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--tinta-media);
}
/* Cifra de libro mayor: la serif de la casa, cifras alineadas, centavos tenues. */
.mando .hoy-cifra {
  font-family: var(--letra-display);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.01em;
  white-space: nowrap;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--tinta);
}
.mando .hoy-cifra small {
  font-size: .6em;
  font-weight: 600;
  letter-spacing: 0;
  opacity: .74;
}
.mando .hoy-cifra-oro { color: var(--oro); }
.mando .hoy-cifra-m  { font-size: 20px; }
.mando .hoy-cifra-s  { font-size: 17px; }
.mando .hoy-cifra-xs { font-size: 14px; }
.mando .hoy-cifra-nula { color: var(--tinta-tenue); }
.mando .hoy-cifra-nada {
  font-style: italic;
  color: var(--rojo);
}

/* La pista "Ver la cuenta": siempre a la vista, discreta; se enciende al señalar. */
.mando .hoy-ficha .pulsable-pista {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin: 0;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--oro);
  opacity: .74;
  transform: none;
  transition: opacity var(--t-medio) var(--suave);
}
.mando .hoy-ficha .pulsable-pista::after {
  content: '→';
  font-size: 13px;
  letter-spacing: 0;
  transition: transform var(--t-medio) var(--muelle);
}

/* --- Interacción ---------------------------------------------------------------------- */

/* Cuenta que no se puede abrir (sin ficha asociada): no promete nada. */
.mando .hoy-fija { cursor: default; }

/* El anillo de foco del teclado. El `:focus-visible` global le pone un radio de
   8 px a lo que enfoca: aquí se conserva el de la tarjeta. */
.mando .hoy-ficha:focus-visible {
  outline: 2px solid var(--oro);
  outline-offset: 3px;
  border-radius: var(--r-l);
}
.mando .hoy-ficha:focus-visible .pulsable-pista { opacity: 1; }

/* Señalar con ratón: la tarjeta se eleva, su luz se enciende, pasa el barrido
   dorado, la moneda gira y la flecha sale disparada. */
@media (hover: hover) {
  .mando .hoy-ficha:not(.hoy-fija):hover {
    transform: translateY(-5px);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.09),
      inset 0 -1px 0 rgba(0,0,0,.6),
      0 1px 2px rgba(0,0,0,.6),
      0 28px 40px -18px rgba(0,0,0,.95),
      0 30px 46px -24px color-mix(in srgb, var(--nivel) 78%, transparent);
  }
  .mando .hoy-ficha:not(.hoy-fija):hover::after { animation: hoyBarrido 1000ms var(--suave); }
  .mando .hoy-ficha:not(.hoy-fija):hover .hoy-foco { opacity: 1; }
  .mando .hoy-ficha:not(.hoy-fija):hover .hoy-logo { opacity: 1; }
  .mando .hoy-ficha:not(.hoy-fija):hover .hoy-sello { animation: hoyGiro 900ms var(--suave); }
  .mando .hoy-ficha:not(.hoy-fija):hover .hoy-accion {
    background: linear-gradient(120deg,
      color-mix(in srgb, var(--nivel) 26%, #0b0c10),
      color-mix(in srgb, var(--nivel) 9%, #08090c));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nivel) 48%, transparent);
  }
  .mando .hoy-ficha:not(.hoy-fija):hover .hoy-flecha {
    color: #0b0c10;
    background: var(--nivel);
    box-shadow: 0 0 16px color-mix(in srgb, var(--nivel) 55%, transparent);
  }
  .mando .hoy-ficha:not(.hoy-fija):hover .hoy-flecha svg { transform: translate(2px, -2px); }
  .mando .hoy-ficha:not(.hoy-fija):hover .pulsable-pista { opacity: 1; }
  .mando .hoy-ficha:not(.hoy-fija):hover .pulsable-pista::after { transform: translateX(5px); }
}
@keyframes hoyBarrido {
  0%   { transform: translateX(-140%) skewX(-18deg); opacity: 0; }
  14%  { opacity: 1; }
  100% { transform: translateX(340%) skewX(-18deg); opacity: 0; }
}
/* La moneda gira una vuelta al señalar la tarjeta (solo hacia delante: al salir
   el cursor no desgira). */
@keyframes hoyGiro {
  from { transform: perspective(260px) rotateY(0deg); }
  to   { transform: perspective(260px) rotateY(360deg); }
}
/* En táctil la pista no depende del cursor: se queda bien visible. */
@media (hover: none) {
  .mando .hoy-ficha .pulsable-pista { opacity: .9; }
}

/* Al pulsar (ratón o dedo): baja, la sombra se recoge y la flecha se enciende.
   En el celular es la única respuesta de la tarjeta, y tiene que notarse. */
.mando .hoy-ficha:not(.hoy-fija):active {
  transform: translateY(0) scale(.982);
  transition-duration: 90ms;
  box-shadow: var(--sombra-ficha);
}
.mando .hoy-ficha:not(.hoy-fija):active .hoy-flecha {
  color: #0b0c10;
  background: var(--nivel);
}
.mando .hoy-ficha:not(.hoy-fija):active .hoy-flecha svg { transform: translate(2px, -2px); }
.mando .hoy-ficha:not(.hoy-fija):active .hoy-accion {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nivel) 55%, transparent);
}

/* El destello de la leyenda: el barrido dorado y la luz del nivel se encienden
   un instante en las cuentas que se acaban de señalar (solo opacidad/transform). */
.mando .hoy-ficha.hoy-destello::after { animation: hoyBarrido 1000ms var(--suave); }
.mando .hoy-ficha.hoy-destello .hoy-foco {
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--nivel) 30%, transparent), transparent 72%);
  animation: hoyDestelloFoco 1500ms var(--suave);
}
@keyframes hoyDestelloFoco {
  0%   { opacity: 0; }
  22%  { opacity: 1; }
  100% { opacity: 0; }
}

/* --- Entrada escalonada ---------------------------------------------------------------- */

.mando .hoy-ficha {
  animation: hoyEntra 620ms var(--suave) calc(var(--i, 0) * 85ms + 110ms) backwards;
}
@keyframes hoyEntra {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
}

/* --- Indicadores del carrusel (solo celular) -------------------------------------------- */

.mando .hoy-indicadores { display: none; }

@media (max-width: 699px) {
  .mando .hoy-seccion { gap: var(--e4); }

  .mando .hoy-cabecera {
    grid-template-areas:
      "sobre   como"
      "titular titular"
      "leyenda leyenda";
    grid-template-rows: auto;
    align-items: center;
  }
  .mando .hoy-como { align-self: center; }

  /* La fila se sale del padding de la vista (16 px) para que las tarjetas se vean
     pasar hasta el borde de la pantalla; la tarjeta activa alinea con el texto. */
  .mando .hoy-rejilla {
    position: relative;
    display: flex;
    gap: 12px;
    margin: -6px -16px -22px;
    padding: 6px 16px 28px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mando .hoy-rejilla::-webkit-scrollbar { display: none; }
  .mando .hoy-rejilla > .hoy-ficha {
    flex: 0 0 calc(100% - 28px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .mando .hoy-rejilla[data-n="1"] > .hoy-ficha { flex-basis: 100%; }

  /* La tarjeta a la vista manda; la que asoma por el borde baja de tono. */
  .mando .hoy-rejilla:not([data-n="1"]) > .hoy-ficha {
    transition:
      transform var(--t-medio) var(--muelle),
      box-shadow var(--t-medio) var(--suave),
      opacity 380ms var(--suave);
  }
  .mando .hoy-rejilla:not([data-n="1"]) > .hoy-ficha:not(.hoy-activa) { opacity: .82; }
  /* En "Día" la ficha es grafito sobre página clara: atenuarla la lava hacia gris
     y el texto pierde contraste, así que ahí la que asoma no se baja de tono. */
  :root[data-theme="dia"] .mando .hoy-rejilla:not([data-n="1"]) > .hoy-ficha:not(.hoy-activa) { opacity: 1; }

  .mando .hoy-indicadores {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--e3);
    margin-top: -6px;
  }
  .mando .hoy-puntos { display: flex; flex: 1; min-width: 0; }
  .mando .hoy-punto {
    --n: var(--tinta-tenue);
    flex: 0 1 44px;
    min-width: 26px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    -webkit-tap-highlight-color: transparent;
  }
  .mando .hoy-punto.hoy-critica { --n: var(--rojo); }
  .mando .hoy-punto.hoy-media   { --n: var(--oro); }
  .mando .hoy-punto i {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--n) 45%, transparent);
    transition: width var(--t-medio) var(--muelle), background var(--t-medio) var(--suave), box-shadow var(--t-medio) var(--suave);
  }
  .mando .hoy-punto.activo i {
    width: 24px;
    background: var(--n);
    box-shadow: 0 0 10px color-mix(in srgb, var(--n) 60%, transparent);
  }
  .mando .hoy-punto:active i { transform: scale(.85); }
  .mando .hoy-contador {
    flex: none;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .08em;
    font-variant-numeric: tabular-nums;
    color: var(--tinta-media);
  }
}

/* Pantallas de 360 px o menos: el sobretítulo cede espacio al botón para no partirse. */
@media (max-width: 380px) {
  .mando .hoy-sobre { gap: 8px; letter-spacing: .15em; white-space: nowrap; }
  .mando .hoy-sobre::before { width: 20px; }
}

/* En el celular los rótulos en mayúsculas no bajan de 11 px. */
@media (max-width: 560px) {
  .mando .hoy-rotulo { font-size: 11px; letter-spacing: .1em; }
  .mando .hoy-ficha { padding: 16px; }
  .mando .hoy-titular { font-size: 26px; }
}

/* --- Estado vacío: sin cuentas vivas ------------------------------------------------------- */

.mando .hoy-vacio {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  justify-items: center;
  gap: var(--e2);
  padding: var(--e7) var(--e5);
  text-align: center;
  border-radius: var(--r-l);
  --tinta: #e9edf5;
  --tinta-media: #9aa5b8;
  background: linear-gradient(165deg, #202126 0%, #0c0c0f 55%, #040405 125%);
  background:
    radial-gradient(70% 90% at 50% 0%, var(--oro-tenue), transparent 70%),
    var(--hoy-trama),
    linear-gradient(165deg, #202126 0%, #0c0c0f 55%, #040405 125%);
  background-blend-mode: normal, overlay, normal;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),
    inset 0 -1px 0 rgba(0,0,0,.6),
    0 1px 2px rgba(0,0,0,.6),
    0 18px 30px -18px rgba(0,0,0,.92);
}
/* La trama de puntos y los esquineros de oro de las cajas 3D del flujo. */
.mando .hoy-vacio::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(rgba(233,237,245,.12) 1px, transparent 1.3px) 0 0 / 22px 22px;
  -webkit-mask-image: radial-gradient(60% 70% at 50% 40%, #000 8%, transparent 100%);
          mask-image: radial-gradient(60% 70% at 50% 40%, #000 8%, transparent 100%);
}
.mando .hoy-vacio::after {
  content: '';
  position: absolute;
  inset: 12px;
  pointer-events: none;
  opacity: .65;
  --l: 16px;
  --c: color-mix(in srgb, var(--oro) 75%, transparent);
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / var(--l) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 0 / 1px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--l) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 1px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / var(--l) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 1px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--l) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 1px var(--l) no-repeat;
}
.mando .hoy-vacio .hoy-sello-grande {
  width: 76px;
  height: 76px;
  margin-bottom: var(--e3);
  box-shadow: 0 0 0 1px rgba(0,0,0,.7), 0 10px 24px -6px rgba(0,0,0,.85), 0 0 34px -6px color-mix(in srgb, var(--oro) 55%, transparent);
}
.mando .hoy-vacio .hoy-sello-grande::before { padding: 4px; }
.mando .hoy-vacio .hoy-sello-grande::after { inset: 7px; }
.mando .hoy-vacio-titulo {
  font-family: var(--letra-display);
  font-style: italic;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  color: var(--tinta);
  text-wrap: balance;
}
.mando .hoy-vacio-nota { max-width: 36ch; font-size: 13px; line-height: 1.5; color: var(--tinta-media); }

/* =============================================================================
   LA HOJA — "Cómo se decide la prioridad"
   Se pinta en el <body>, fuera de `.mando`: por eso cuelga de `.hoy-hoja` y usa
   los tokens del tema (no el grafito): en "Día" la hoja es blanca.
   ========================================================================== */

/* La cabecera de esta hoja (del componente compartido, que no se toca): la misma
   serif de la casa y un filete de oro. `:has()` es un extra; sin él queda la
   cabecera de siempre. */
.hoja:has(.hoy-hoja) .hoja-cabeza h2 {
  font-family: var(--letra-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.012em;
}
.hoja:has(.hoy-hoja) .hoja-cabeza { border-bottom-color: transparent; position: relative; }
.hoja:has(.hoy-hoja) .hoja-cabeza::after {
  content: '';
  position: absolute;
  left: var(--e5);
  right: var(--e5);
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--oro), var(--panel-borde) 38%, transparent);
}

.hoy-hoja {
  --hoy-oro-texto: var(--oro);
  --hoy-oro-texto: color-mix(in srgb, var(--oro) 74%, var(--tinta));
  display: flex;
  flex-direction: column;
  gap: var(--e5);
}

/* La frase de apertura: cursiva de la casa, como una nota de editor. */
.hoy-hoja-intro {
  font-family: var(--letra-display);
  font-style: italic;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.55;
  color: var(--tinta);
  text-wrap: pretty;
}

/* Los 100 puntos de un vistazo: cada tramo mide lo que pesa su factor. */
.hoy-reparto { display: flex; flex-direction: column; gap: 6px; }
.hoy-reparto-barra {
  display: flex;
  gap: 3px;
  height: 10px;
}
.hoy-reparto-barra i {
  flex: var(--w) 1 0;
  min-width: 0;
  border-radius: 99px;
  background: var(--tono);
  box-shadow: 0 0 10px color-mix(in srgb, var(--tono) 40%, transparent);
  transform-origin: left center;
  animation: hoyTramo 700ms var(--suave) calc(var(--i, 0) * 70ms + 120ms) backwards;
}
.hoy-reparto-escala {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
  color: var(--tinta-media);
}
@keyframes hoyTramo { from { transform: scaleX(0); opacity: 0; } }

/* Un color por factor: lo comparten su tramo en la barra y su fila. */
.hoy-t-verde { --tono: var(--verde); }
.hoy-t-azul  { --tono: var(--azul); }
.hoy-t-rojo  { --tono: var(--rojo); }
.hoy-t-oro   { --tono: var(--oro); }
.hoy-t-plata { --tono: var(--tinta-media); }

.hoy-factores { display: flex; flex-direction: column; gap: var(--e2); }
.hoy-factor {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: var(--e4);
  padding: var(--e3) var(--e4) var(--e3) var(--e3);
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--fondo-hondo);
  box-shadow: inset 0 0 0 1px var(--panel-borde);
  animation: hoyFactor 520ms var(--suave) calc(var(--i, 0) * 70ms + 260ms) backwards;
}
/* El hilo de luz del color del factor, a la izquierda. */
.hoy-factor::before {
  content: '';
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--tono);
  box-shadow: 0 0 12px color-mix(in srgb, var(--tono) 60%, transparent);
}
.hoy-factor-peso {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  padding-left: 4px;
  font-family: var(--letra-display);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--tono);
}
.hoy-factor-peso small {
  font-family: var(--letra);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tinta-media);
}
.hoy-factor-titulo { font-size: 14.5px; font-weight: 600; letter-spacing: -.008em; color: var(--tinta); }
.hoy-factor-texto { margin-top: 3px; font-size: 13px; line-height: 1.5; color: var(--tinta-media); text-wrap: pretty; }
@keyframes hoyFactor { from { opacity: 0; transform: translateY(10px); } }

/* El aviso del 35 %: ámbar, con su icono. */
.hoy-hoja-aviso {
  display: flex;
  align-items: flex-start;
  gap: var(--e3);
  padding: var(--e3) var(--e4);
  border-radius: var(--r-m);
  font-size: 13px;
  line-height: 1.55;
  color: var(--tinta-media);
  background: var(--oro-tenue);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--oro) 28%, transparent);
}
.hoy-hoja-aviso svg { flex: none; width: 19px; height: 19px; margin-top: 1px; stroke-width: 1.7; color: var(--hoy-oro-texto); }

.hoy-hoja-nota {
  padding-left: var(--e4);
  border-left: 2px solid color-mix(in srgb, var(--oro) 55%, transparent);
  font-size: 13px;
  line-height: 1.6;
  color: var(--tinta-media);
  text-wrap: pretty;
}

/* La firma de la casa al pie: el logo, completo. */
.hoy-hoja-firma {
  display: flex;
  justify-content: center;
  padding-top: var(--e3);
  border-top: 1px solid var(--panel-borde);
}
.hoy-hoja-firma i {
  display: block;
  width: 116px;
  height: 56px;
  background: url('/brand/maax-street.png') center / contain no-repeat;
  opacity: .9;
}
/* En "Día" la hoja es blanca y la firma del logo es blanca: hay que sentarla
   sobre un fondo oscuro para que se lea (la moneda que ya usa la app). */
:root[data-theme="dia"] .hoy-hoja-firma i {
  width: 150px;
  height: 66px;
  padding: 8px;
  box-sizing: content-box;
  border-radius: var(--r-m);
  background:
    url('/brand/maax-street.png') center / contain no-repeat content-box,
    linear-gradient(165deg, #202126, #0c0c0f);
  opacity: 1;
}

/* En el teléfono la cabecera de la hoja pierde margen (16 px, como su cuerpo). */
@media (max-width: 640px) {
  .hoja:has(.hoy-hoja) .hoja-cabeza::after { left: var(--e4); right: var(--e4); }
}

@media (max-width: 560px) {
  .hoy-hoja-intro { font-size: 16px; }
  .hoy-factor { grid-template-columns: 54px minmax(0, 1fr); gap: var(--e3); }
  .hoy-factor-peso { font-size: 30px; }
}

/* =============================================================================
   MENOS MOVIMIENTO
   Sin entradas, barridos, latidos ni giros: todo se queda en su estado final.
   (Las reglas de base.css acortan las duraciones, pero no los retardos: una
   tarjeta con retardo se quedaría invisible un instante.)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .mando .hoy-ficha,
  .mando .hoy-arco,
  .mando .hoy-punta,
  .mando .hoy-relleno,
  .mando .hoy-relleno::after,
  .mando .hoy-pomo,
  .mando .hoy-critica .hoy-nivel i::after,
  .hoy-reparto-barra i,
  .hoy-factor { animation: none !important; }
  .mando .hoy-ficha:hover::after,
  .mando .hoy-ficha.hoy-destello::after { animation: none !important; }
  /* Sin movimiento, el destello es solo una luz quieta que se apaga con la clase. */
  .mando .hoy-ficha.hoy-destello .hoy-foco { animation: none !important; opacity: 1; }
  .mando .hoy-ficha:not(.hoy-fija):hover { transform: none; }
  .mando .hoy-ficha:not(.hoy-fija):hover .hoy-sello { animation: none; }
  .mando .hoy-ficha:not(.hoy-fija):active { transform: scale(.99); }
}
