/* frontend.css — pasada grande de frontend (se carga la ÚLTIMA). Solo estilos de lo nuevo: «Afecta a», Noticias (filtros y Última hora), Resumen de la semana como informe visual
   y su lector, «Ayer» comprimido, Gamma/Sesgo en móvil, pestañas de Cartera, Calendario (hoy) y refinamientos de escritorio. Colores suaves; los de estado salen de las --t-* de tema.css.
   Todo el movimiento respeta prefers-reduced-motion y el interruptor «Efectos visuales» (html[data-efectos="off"]). */

:root {
  --af-up: #8fc29c; --af-up-bg: rgba(143, 194, 156, .10); --af-up-bd: rgba(143, 194, 156, .26);
  --af-down: #d39a9a; --af-down-bg: rgba(211, 154, 154, .10); --af-down-bd: rgba(211, 154, 154, .26);
  --af-flat: #a6a5ab; --af-flat-bg: rgba(166, 165, 171, .09); --af-flat-bd: rgba(166, 165, 171, .22);
}

/* ---- sin scroll horizontal, y títulos que nunca se parten letra a letra ----
   `overflow-wrap: anywhere` (heredado de .vista) hace que el ancho mínimo de un título en una fila flexible sea el de UNA letra: el título se estrechaba y se pintaba letra por letra.
   `break-word` no reduce el ancho mínimo y parte solo las palabras que de verdad no caben. */
html, body { max-width: 100%; overflow-x: clip; }
h1, h2, h3, h4, .cb-t, .dz-cab h3, .tr .tr-t, .tr-titulo, .inf-t, .seccion-cab, .seccion-cab * { overflow-wrap: break-word; word-break: normal; hyphens: manual; }
.dz-cab h3, .cb-cab .cb-t, .panel-cab h2 { min-width: min(100%, 9ch); flex: 1 1 9ch; }
.cb-cab .cb-t { flex: 0 1 auto; }

/* ---- Calendario: HOY resaltado y aviso de semana ---- */
.cs-dia.hoy { border-left: 3px solid var(--t-naranja); padding-left: 12px; background: linear-gradient(90deg, var(--t-naranja-suave), transparent 38%); border-radius: 0 var(--t-radio-card) var(--t-radio-card) 0; }
.cs-dia.hoy h3 { color: var(--t-naranja-2); }
.cs-dia.hoy .chip-ev { background: var(--t-naranja); color: var(--t-sobre-marca); border-color: transparent; }
.ec-dia.hoy { border-color: var(--t-naranja); background: linear-gradient(180deg, var(--t-naranja-suave), transparent 60%); }
.ec-dia.hoy .ec-hoy { background: var(--t-naranja); color: var(--t-sobre-marca); }

/* ---- «Afecta a» ---- */
.afecta-a { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; min-width: 0; }
.af-et { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--t-texto-3); margin-right: 2px; }
.af-chip { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; line-height: 1.35; border: 1px solid var(--af-flat-bd); background: var(--af-flat-bg); color: var(--af-flat); max-width: 100%; }
.af-chip b { font-weight: 650; color: inherit; }
.af-up { border-color: var(--af-up-bd); background: var(--af-up-bg); color: var(--af-up); }
.af-down { border-color: var(--af-down-bd); background: var(--af-down-bg); color: var(--af-down); }
.af-fl { font-size: 12px; }
.af-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.af-por { flex-basis: 100%; font-style: normal; font-size: 12px; color: var(--t-texto-2); opacity: .9; }
.af-compacto .af-por { display: none; }
.af-q { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--t-borde); background: transparent; color: var(--t-texto-3); font-size: 12px; font-weight: 700; line-height: 1; cursor: pointer; padding: 0; }
.af-q:hover, .af-q[aria-expanded="true"] { color: var(--t-naranja-2); border-color: var(--t-naranja); }
.af-exp { flex-basis: 100%; font-size: 12px; color: var(--t-texto-2); background: var(--t-panel-2); border-radius: 8px; padding: 8px 10px; }
.af-exp[hidden] { display: none; }

/* ---- Noticias: pestañas, filtros, Última hora ---- */
.nt-tabs { display: flex; gap: 6px; margin: 4px 0 14px; border-bottom: 1px solid var(--t-borde-suave); }
.nt-tab { appearance: none; background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--t-texto-3); padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; margin-bottom: -1px; transition: color .16s, border-color .16s; }
.nt-tab:hover { color: var(--t-texto); }
.nt-tab.on, .nt-tab[aria-selected="true"] { color: var(--t-texto); border-bottom-color: var(--t-naranja); }
.nt-tab[hidden], .nt-tabs .nt-tab:only-child { display: none; }
.nt-tabs:has(.nt-tab:only-child) { display: none; }
.nt-vivo { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--t-naranja); margin-left: 6px; vertical-align: middle; opacity: .8; }
.nt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.nt-chip { appearance: none; border: 1px solid var(--t-borde); background: transparent; color: var(--t-texto-2); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; cursor: pointer; transition: background .16s, border-color .16s, color .16s; }
.nt-chip:hover { border-color: var(--t-naranja); color: var(--t-texto); }
.nt-chip[aria-pressed="true"] { background: var(--t-naranja-suave); border-color: var(--t-naranja); color: var(--t-naranja-2); }
.nt-chip-s { font-size: 12px; padding: 3px 10px; }
.nt-activos[hidden] { display: none; }
.uh-intro { margin: 0 0 8px; }
.uh-pill-caja { position: sticky; top: calc(var(--alto-cab, 56px) + 8px); z-index: var(--z-cabecera); height: 0; display: flex; justify-content: center; }
.uh-pill { margin-top: 4px; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--t-naranja); background: var(--t-naranja); color: var(--t-sobre-marca); font-weight: 700; font-size: 13px; cursor: pointer; box-shadow: 0 8px 24px -8px rgba(0,0,0,.8); }
.uh-pill[hidden] { display: none; }
.uh-zona { min-width: 0; }
.uh-flujo { list-style: none; margin: 0; padding: 0; }
.uh-dia { position: sticky; top: var(--alto-cab, 56px); z-index: var(--z-local); margin: 14px 0 2px; padding: 6px 0; background: var(--t-fondo); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--t-texto-3); }
.uh-dia[hidden], .uh-fila[hidden] { display: none; }
.uh-fila { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--t-borde-suave); }
.uh-hora { color: var(--t-texto-3); font-size: 12.5px; padding-top: 1px; }
.uh-titulo { color: var(--t-texto); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.uh-alto { box-shadow: inset 2px 0 0 var(--t-naranja); padding-left: 10px; }
.uh-tipo { display: inline-block; margin: 0 0 0 8px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--t-borde); font-size: 12px; color: var(--t-texto-3); white-space: nowrap; vertical-align: 1px; }
.uh-cuerpo .afecta-a { margin-top: 5px; }
.uh-mas { display: block; margin: 14px auto; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--t-borde); background: transparent; color: var(--t-texto-2); cursor: pointer; }
.uh-mas[hidden] { display: none; }
.uh-pie { margin-top: 12px; }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-efectos="off"]) .uh-nueva { animation: uh-entra .6s cubic-bezier(.2,.8,.2,1) backwards; }
  @keyframes uh-entra { from { opacity: 0; background: var(--t-naranja-suave); transform: translateY(-6px); } to { opacity: 1; transform: none; } }
}
.mx-ir-noticias { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 12px; }
.mx-ir { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid var(--t-borde-suave); border-radius: var(--t-radio-card); background: var(--t-panel-2); color: var(--t-texto); text-decoration: none; transition: border-color .16s, transform .16s; }
.mx-ir:hover { border-color: var(--t-naranja); transform: translateY(-1px); }

/* ---- Resumen de la semana: informe visual ---- */
.is-informe { display: grid; gap: var(--t-esp-5, 20px); min-width: 0; }
.is-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-radius: var(--t-radio-card); border: 1px solid var(--t-borde-suave);
  background: linear-gradient(135deg, rgba(255,122,46,.09), transparent 55%), var(--t-panel); }
.is-cab-t { flex: 1 1 320px; min-width: 0; }
.is-et { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--t-naranja-2); display: inline-flex; align-items: center; gap: 8px; }
.is-titular { margin: 6px 0 4px; font-size: 22px; font-weight: 500; line-height: 1.3; color: var(--t-texto); max-width: 60ch; }
.is-sub { margin: 0; color: var(--t-texto-3); font-size: 13px; }
.is-leer { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px; border: 0; background: linear-gradient(135deg, var(--t-naranja-2), var(--t-naranja-3)); color: var(--t-sobre-marca); font: inherit; font-weight: 750; font-size: 14.5px; cursor: pointer;
  box-shadow: 0 10px 28px -12px rgba(255,122,46,.7); transition: transform .16s, box-shadow .16s; }
.is-leer:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(255,122,46,.85); }
.is-leer:active { transform: scale(.98); }
.is-leer i { font-style: normal; transition: transform .16s; } .is-leer:hover i { transform: translateX(3px); }
.is-bloque { display: grid; gap: 12px; min-width: 0; }
.is-h { margin: 0; font-size: 16px; font-weight: 650; color: var(--t-texto); text-transform: none; letter-spacing: 0; }
.is-h .que { font-weight: 400; font-size: 12.5px; margin-left: 8px; }
.is-ev-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.is-ev { display: grid; gap: 7px; align-content: start; padding: 14px 16px; border: 1px solid var(--t-borde-suave); border-radius: var(--t-radio-card); background: var(--t-panel); min-width: 0; transition: border-color .18s, transform .18s; }
.is-ev:hover { border-color: var(--t-borde); }
.is-ev.is-proximo, .is-ev.is-hoy { box-shadow: inset 3px 0 0 var(--t-naranja); }
.is-ev.is-hoy { background: linear-gradient(90deg, var(--t-naranja-suave), transparent 45%), var(--t-panel); }
.is-ev.is-publicado { opacity: .94; }
.is-ev-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; }
.is-ev-cab time { margin-left: auto; color: var(--t-texto-3); }
.is-tipo, .is-est { padding: 2px 9px; border-radius: 999px; border: 1px solid var(--t-borde); font-weight: 650; letter-spacing: .03em; font-size: 12px; }
.is-tipo { color: var(--t-texto-2); }
.is-t-fed { color: var(--t-naranja-2); border-color: rgba(255,122,46,.4); }
.is-e-proximo, .is-e-hoy { color: var(--t-naranja-2); border-color: rgba(255,122,46,.4); background: var(--t-naranja-suave); }
.is-e-publicado { color: var(--af-up); border-color: var(--af-up-bd); }
.is-e-pasado { color: var(--t-texto-3); }
.is-ev-t { margin: 0; font-size: 15.5px; font-weight: 600; color: var(--t-texto); line-height: 1.3; text-transform: none; letter-spacing: 0; }
.is-pais { font-size: 12px; font-weight: 500; color: var(--t-texto-3); margin-left: 4px; }
.is-l { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--t-texto-2); }
.is-l b:first-child { color: var(--t-texto); }
.is-esc { display: grid; gap: 6px; }
.is-esc-t { display: block; font-size: 12px; color: var(--t-texto-3); margin-bottom: -2px; }
.is-mas { border: 1px solid var(--t-borde-suave); border-radius: var(--t-radio-card); padding: 0 16px; }
.is-mas > summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--t-texto-2); list-style: none; }
.is-mas > summary::-webkit-details-marker { display: none; }
.is-mas[open] > summary { border-bottom: 1px solid var(--t-borde-suave); margin-bottom: 12px; }
.is-mas[open] { padding-bottom: 14px; }
.is-an-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.is-an { padding: 14px 16px; border: 1px solid var(--t-borde-suave); border-radius: var(--t-radio-card); background: var(--t-panel); }
.is-an h4 { margin: 0 0 6px; font-size: 14.5px; text-transform: none; letter-spacing: 0; color: var(--t-texto); }
.is-an p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--t-texto-2); }

/* lector del informe completo */
.is-lector { position: fixed; inset: 0; z-index: var(--z-lector); background: rgba(5,5,6,.82); display: flex; justify-content: center; }
.is-lector[hidden] { display: none; }
.is-lector-abierto body { overflow: hidden; }
.is-lector-marco { display: flex; flex-direction: column; width: min(1120px, 100%); height: 100%; background: var(--t-fondo); outline: none; }
.is-lector-barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--t-borde-suave); background: var(--t-panel); }
.is-lector-acc { display: flex; gap: 8px; }
.is-btn { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--t-borde); background: transparent; color: var(--t-texto); font: inherit; font-size: 13px; cursor: pointer; }
.is-btn:hover { border-color: var(--t-naranja); }
.is-cerrar { background: var(--t-naranja); color: var(--t-sobre-marca); border-color: transparent; font-weight: 700; }
.is-lector-cuerpo { flex: 1; min-height: 0; overflow-y: auto; display: block; padding: 18px 20px 60px; overscroll-behavior: contain; }
.is-indice { display: none; }
.is-indice ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.is-indice a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--t-texto-2); text-decoration: none; font-size: 13.5px; }
.is-indice a:hover { background: var(--t-panel-2); color: var(--t-texto); }
.is-lector-texto { max-width: 76ch; margin: 0 auto; font-size: 16px; line-height: 1.7; }
.is-lector-h { font-size: 26px; font-weight: 400; line-height: 1.25; margin: 4px 0 18px; color: var(--t-texto); text-transform: none; letter-spacing: -.01em; }
.is-seccion { margin: 0 0 28px; scroll-margin-top: 12px; }
.is-sec-t { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--t-naranja-2); font-weight: 700; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--t-borde-suave); }
.is-seccion h3 { font-size: 15px; margin: 14px 0 4px; color: var(--t-texto); text-transform: none; letter-spacing: 0; }
.is-seccion p { margin: 0 0 10px; color: var(--t-texto-2); }
.is-tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.is-tabla th, .is-tabla td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--t-borde-suave); }
.is-lector-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
@media (min-width: 901px) {
  .is-lector-cuerpo { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 36px; padding: 28px 32px 80px; align-items: start; }
  .is-indice { display: block; position: sticky; top: 0; }
  .is-lector-texto { margin: 0; }
}
@media print {
  html, body { background: #fff !important; color: #000 !important; overflow: visible !important; }
  body > *:not(#informe-lector) { display: none !important; }
  #informe-lector { position: static !important; display: block !important; background: #fff !important; }
  .is-lector-marco { width: auto; height: auto; background: #fff; }
  .is-lector-barra .is-lector-acc, .is-indice, .af-q, .af-exp { display: none !important; }
  .is-lector-barra { background: #fff; border-color: #ccc; color: #000; padding: 0 0 8px; }
  .is-lector-cuerpo { display: block; overflow: visible; padding: 8px 0; }
  .is-lector-texto, .is-lector-texto * { color: #111 !important; background: transparent !important; border-color: #ccc !important; box-shadow: none !important; }
  .is-lector-texto { max-width: none; font-size: 11pt; }
  .is-seccion, .is-ev, .is-an { break-inside: avoid; }
  .is-ev-grid { display: block; } .is-ev { margin-bottom: 8px; }
  .af-chip { border: 1px solid #999 !important; padding: 1px 6px; }
  .af-sr { position: static; width: auto; height: auto; clip-path: none; }
}

/* ---- «Ayer» comprimido (móvil) ---- */
.ay-ayer { border: 1px solid var(--t-borde-suave); border-radius: var(--t-radio-card); margin: 0 0 12px; padding: 0 12px; background: var(--t-panel); }
.ay-ayer > summary, .ay-todos > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 0; font-weight: 600; color: var(--t-texto-2); }
.ay-ayer > summary::-webkit-details-marker, .ay-todos > summary::-webkit-details-marker { display: none; }
.ay-lista { list-style: none; margin: 0; padding: 0 0 8px; display: grid; }
.ay-fila { display: grid; grid-template-columns: minmax(0, 1fr) auto 22px; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--t-borde-suave); font-size: 13px; }
.ay-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--t-texto); }
.ay-c { white-space: nowrap; font-size: 12.5px; }
.ay-chip { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; border: 1px solid var(--af-flat-bd); color: var(--af-flat); }
.ay-up { color: var(--af-up); border-color: var(--af-up-bd); } .ay-down { color: var(--af-down); border-color: var(--af-down-bd); } .ay-nada { border-color: transparent; }
.ay-todos { border-top: 1px solid var(--t-borde-suave); } .ay-todos > summary { font-size: 12.5px; color: var(--t-texto-3); }

/* ---- Sesgo del día: medidor ---- */
.sg-medidor { display: grid; gap: 3px; }
.sg-pista { position: relative; height: 6px; border-radius: 999px; background: linear-gradient(90deg, rgba(211,154,154,.45), rgba(166,165,171,.25) 50%, rgba(143,194,156,.45)); }
.sg-marca { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--t-texto); border: 3px solid var(--t-fondo); box-shadow: 0 0 0 1px var(--t-borde); }
.sg-alza .sg-marca { background: var(--af-up); } .sg-baja .sg-marca { background: var(--af-down); } .sg-neu .sg-marca { background: var(--af-flat); }
.sg-ext { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--t-texto-3); }

/* ---- Cartera: pestañas ---- */
.ct-oculto { display: none !important; }
#cartera-bloque .subnav { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--t-borde-suave); margin-bottom: 14px; }
#cartera-bloque .subnav a { padding: 9px 14px; border-bottom: 2px solid transparent; color: var(--t-texto-3); text-decoration: none; font-weight: 600; margin-bottom: -1px; }
#cartera-bloque .subnav a.on, #cartera-bloque .subnav a[aria-selected="true"] { color: var(--t-texto); border-bottom-color: var(--t-naranja); }
#cartera-bloque .subnav a:hover { color: var(--t-texto); }

/* ---- Pre-mercado Forex ---- */
.dv-bloque { min-width: 0; }
.dv-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.dv-comp > summary { cursor: pointer; }
.dv-uno { margin-top: 4px; }

/* ---- Gamma en móvil: escalera de niveles ---- */
.gm-bloque h3 { margin: 12px 0 8px; }
.gm-escalera { list-style: none; margin: 0; padding: 0 0 0 14px; position: relative; display: grid; gap: 8px; }
.gm-escalera::before { content: ""; position: absolute; left: 3px; top: 4px; bottom: 4px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, var(--af-up-bd), var(--t-borde), var(--af-down-bd)); }
.gm-niv { position: relative; display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--t-borde-suave); border-radius: 10px; background: var(--t-panel); border-left: 3px solid var(--c, var(--t-borde)); min-width: 0; }
.gm-niv::before { content: ""; position: absolute; left: -15px; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--t-borde)); }
.gm-l1 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.gm-n { font-size: 14px; flex: 1 1 auto; min-width: 0; }
.gm-p { font-size: 16px; margin-left: auto; }
.gm-l2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12.5px; color: var(--t-texto-3); }
.gm-prob .prob { display: flex; align-items: center; gap: 6px; }
.gm-prob .barra { width: 64px; }
.gm-que { font-size: 12px; line-height: 1.4; }
.gm-actual { position: relative; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--t-naranja-suave); border: 1px solid var(--t-naranja); color: var(--t-texto); }
.gm-actual::before { content: ""; position: absolute; left: -16px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--t-naranja); box-shadow: 0 0 0 4px var(--t-naranja-suave); }
.gm-flecha { color: var(--t-naranja-2); font-size: 12px; }
.gm-actual .gm-p { margin-left: auto; }
.gm-actual .vivo-m { font-size: 12px; }
.gm-niv.cerca { border-color: var(--t-ambar); } .gm-niv.tocando { border-color: var(--t-naranja); box-shadow: 0 0 0 2px var(--t-naranja-suave); }
.gm-det { border: 1px solid var(--t-borde-suave); border-radius: var(--t-radio-card); margin: 10px 0; padding: 0 12px; background: var(--t-panel); }
.gm-det > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 0; font-weight: 600; color: var(--t-texto-2); font-size: 13.5px; }
.gm-det > summary::-webkit-details-marker { display: none; }
.gm-det[open] > summary { border-bottom: 1px solid var(--t-borde-suave); margin-bottom: 10px; }
.gm-det[open] { padding-bottom: 10px; }

/* ---- móvil: compactar páginas largas ---- */
@media (max-width: 900px) {
  .is-cab { padding: 14px; } .is-titular { font-size: 18px; } .is-leer { width: 100%; justify-content: center; }
  .is-ev { padding: 12px 14px; }
  .is-lector-cuerpo { padding: 14px 14px 80px; } .is-lector-barra { padding: 10px 14px; }
  .is-lector-h { font-size: 21px; }
  /* Sesgo: tarjeta compacta (el detalle —factores y qué vigilar— sale al pulsar la tarjeta) */
  #sesgo .sesgo-grid { gap: 10px; }
  #sesgo .sesgo-card { padding: 12px; gap: 7px; }
  #sesgo .sesgo-card .motivo { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; }
  #sesgo .sesgo-card .factores, #sesgo .sesgo-card .vigilar { display: none; }
  #sesgo .sesgo-card .conviccion { font-size: 12px; }
  /* Gamma: KPIs en una sola columna compacta */
  #gamma .kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } #gamma .kpis .kpi:first-child { grid-column: 1 / -1; }
  #gamma .panel { padding: 12px; }
  /* tablas y gráficos: nunca más anchos que la pantalla */
  .tabla-scroll { max-width: 100%; overflow-x: auto; }
  .mx-ir-noticias { grid-template-columns: 1fr; }
  .nt-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; margin-right: -4px; }
  .nt-chips::-webkit-scrollbar { display: none; } .nt-chip { flex: 0 0 auto; }
  .nt-activos { flex-wrap: wrap; overflow: visible; }
  .uh-fila { grid-template-columns: 44px minmax(0, 1fr); gap: 8px; }
  .uh-tipo { margin-left: 0; margin-right: 6px; }
  .dv-grid { grid-template-columns: 1fr; }
  .dv-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* la tabla de tesis (tesis vs lectura) se desplaza dentro de su caja, no de la página */
  .dv-tesis .tabla-scroll { overflow-x: auto; }
  /* Calendario: cabecera de semana discreta */
  .cs-dia.hoy { padding-left: 10px; }
}

/* ---- escritorio (> 900 px): panel de control — más aire, jerarquía clara y movimiento discreto ---- */
@media (min-width: 901px) {
  .pagina { --t-gap: 18px; }
  .is-informe { gap: 28px; }
  .is-ev-grid, .is-an-grid { gap: 16px; }
  .is-ev:hover, .mx-ir:hover, .gm-niv:hover { transform: translateY(-2px); }
  .sesgo-grid { gap: 16px; }
  .bloque > .seccion-cab { margin-bottom: 6px; }
  .cb:hover { border-color: var(--t-borde); }
  .tr, .inf-card, .sa-card { transition: transform .18s var(--ef-curva, ease), border-color .18s, box-shadow .18s; }
  /* Macro semanal: el panel del resumen en rejilla amplia */
  #macro-evento .is-informe { max-width: 1240px; }
  .nt-chips { margin: 10px 0 14px; }
  .nt-lista { gap: 14px; }
}
@media (min-width: 1280px) {
  #sesgo .sesgo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .is-ev-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .is-an-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .is-ev, .is-leer, .mx-ir, .nt-chip, .nt-tab, .gm-niv, .uh-nueva { transition: none !important; animation: none !important; } }
html[data-efectos="off"] .is-ev, html[data-efectos="off"] .is-leer, html[data-efectos="off"] .mx-ir { transition: none; }
html[data-efectos="off"] .is-ev:hover, html[data-efectos="off"] .mx-ir:hover, html[data-efectos="off"] .is-leer:hover { transform: none; }

/* ---- Macro: tablas de impacto en desplegable ---- */
.imp-det { margin: 0 0 12px; }
.imp-det > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.imp-det > summary::-webkit-details-marker { display: none; }
.imp-det > summary h3 { margin: 10px 0; }
.imp-det[open] > summary .chev { transform: rotate(180deg); }

/* ---- Última hora: entradas redactadas por el sistema ---- */
.uh-det > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.uh-det > summary::-webkit-details-marker { display: none; }
.uh-det > summary .uh-titulo { font-weight: 600; flex: 1 1 100%; }
.uh-det > summary .uh-tipo { margin: 0; }
.uh-fuente, .uh-conf { font-size: 12px; color: var(--t-texto-3); }
.uh-conf { color: var(--af-up); }
.uh-det[open] { padding-bottom: 6px; }
.uh-pasa, .uh-ctx { margin: 8px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--t-texto-2); }
.uh-pasa b, .uh-ctx b { color: var(--t-texto); }
.uh-eti { margin: 8px 0 0; font-size: 12px; }

/* =====================================================================
   LIMPIEZA VISUAL (23/10/2026) — menos ruido, más aire, el detalle a un toque. Solo estilos: ningún dato ni nombre cambia.
   ===================================================================== */
:root { --lp-gap: 18px; --lp-pad: 18px; --lp-borde: rgba(255, 255, 255, .06); }

/* ancho de lectura y ritmo vertical */
.bloque.pagina { max-width: 1240px; margin-inline: auto; }
.bloque.pagina > * + * { margin-top: var(--lp-gap); }
.seccion-cab { margin-bottom: 4px; }
.seccion-cab p { color: var(--t-texto-3); font-size: 13.5px; max-width: 62ch; }

/* decoración fuera: puntos, cuadros e iconos de cabecera no aportan información */
.cuadro, .panel-cab .icono, .inf-t .cuadro, .sa-et .cuadro, .tit-sec .cuadro, .is-et .cuadro { display: none !important; }
.tit-sec, .gt > h3, .panel h3, .dz-cab .que { letter-spacing: .1em; font-weight: 600; color: var(--t-texto-3); }
.gt > h3 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; }
.gt + .gt { margin-top: calc(var(--lp-gap) + 6px); }

/* bordes finos y cajas planas: sin caja dentro de caja ni sombras pesadas */
.panel, .tr, .inf-card, .sa-card, .is-ev, .is-an, .sesgo-card, .mc-card, .dv-card, .kpi, .cb, .ay-ayer, .gm-det, .imp-det, .lp-mas { border-color: var(--lp-borde) !important; box-shadow: none !important; }
.cb .panel, .cb-in .panel, .dz-in .panel, .panel .panel, .cb-plano .panel, .cb-in .cb.suave { border: 0 !important; background: transparent !important; padding-left: 0; padding-right: 0; }
.panel { padding: var(--lp-pad) calc(var(--lp-pad) + 2px); }
.panel-cab { border-bottom: 0; margin-bottom: 10px; }
hr, .dz-sep, .cb-sep { display: none; }

/* rejillas: tarjetas del mismo alto, 1 columna en móvil, 2 en escritorio, 3 en pantallas anchas */
.tr-grid, .dz-grid, .is-ev-grid, .is-an-grid, .sesgo-grid, .dv-grid, .mac-grid { gap: var(--lp-gap); align-items: stretch; }
.tr, .is-ev, .is-an, .sesgo-card, .mc-card, .dv-card { height: 100%; }
.tr { padding: 16px 18px; gap: 8px; }
.tr .tr-l { line-height: 1.5; }
.tr .tr-mas { opacity: .55; }
@media (min-width: 901px) {
  .tr-grid, .dz-grid, .mac-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .is-an-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .tr-grid, .dz-grid, .mac-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .is-an-grid, .is-ev-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .tr-grid, .dz-grid, .mac-grid, .is-ev-grid, .is-an-grid, .sesgo-grid, .dv-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 12px; }
  .tr, .is-ev, .is-an, .sesgo-card { height: auto; padding: 14px 16px; }
  .bloque.pagina > * + * { margin-top: 14px; }
  .panel { padding: 14px 14px; }
  .seccion-cab h2 { font-size: 26px; }
  .seccion-cab p { font-size: 13px; }
}

/* notas y avisos largos: una línea discreta con «ⓘ» */
.lp-nota { margin: 6px 0; }
.lp-nota > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 6px; font-size: 12px; color: var(--t-texto-3); opacity: .85; }
.lp-nota > summary::-webkit-details-marker { display: none; }
.lp-nota > summary i { font-style: normal; color: var(--t-naranja-2); }
.lp-nota > summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lp-nota > summary:hover { color: var(--t-texto-2); opacity: 1; }
.lp-nota[open] > summary span { white-space: normal; }
.lp-nota > .nota, .lp-nota > p, .lp-nota > div { margin: 6px 0 0; font-size: 12px; color: var(--t-texto-2); max-width: 72ch; }

/* «Más detalle»: bloques secundarios cerrados por defecto */
.lp-mas { border: 1px solid var(--lp-borde); border-radius: var(--t-radio-card); padding: 0 var(--lp-pad); background: transparent; margin: 4px 0; }
.lp-mas > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 0; font-weight: 600; font-size: 13.5px; color: var(--t-texto-2); }
.lp-mas > summary::-webkit-details-marker { display: none; }
.lp-mas > summary:hover { color: var(--t-texto); }
.lp-mas[open] > summary { border-bottom: 1px solid var(--lp-borde); margin-bottom: 14px; }
.lp-mas[open] { padding-bottom: var(--lp-pad); }
.lp-mas[open] > summary .chev { transform: rotate(180deg); }
.lp-mas > .dv-tesis, .lp-mas > #mac-fed { margin: 0; }

/* Notas fuente pública (privado): cabecera discreta cuando está plegado */
#bloomberg-privado.cb { padding: 0; }
#bloomberg-privado > .cb-cab .cb-t { font-size: 15px; }

/* movimiento: nada nuevo; respeta reduced-motion y el interruptor de efectos */
@media (prefers-reduced-motion: reduce) { .lp-mas, .lp-nota { transition: none; } }

/* ---- rendimiento: animaciones y efectos que no se ven, quietos ---- */
.rd-fuera, .rd-fuera *, .rd-fuera::before, .rd-fuera::after { animation-play-state: paused !important; }
html.ef-oculta *, html.ef-oculta *::before, html.ef-oculta *::after { animation-play-state: paused !important; }
/* sin sombras grandes ni filtros en lo que se repite muchas veces */
.tr, .is-ev, .is-an, .mc-card, .sesgo-card, .sa-card, .gm-niv { filter: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-iteration-count: 1 !important; } }

/* =====================================================================
   ÚLTIMA HORA EN MÓVIL — nada más ancho que la pantalla (titulares largos, URLs, cifras, chips y bloque expandido)
   ===================================================================== */
#nt-panel-ultima, #uh-lista, .uh-zona, .uh-flujo, .uh-fila, .uh-cuerpo, .uh-det, .uh-det > summary, .uh-pasa, .uh-ctx, .uh-eti, .uh-intro, .uh-pie { min-width: 0; max-width: 100%; box-sizing: border-box; }
#nt-panel-ultima { width: 100%; overflow-x: clip; }
.uh-fila { grid-template-columns: 52px minmax(0, 1fr); }
.uh-hora { white-space: nowrap; }
.uh-titulo, .uh-pasa, .uh-ctx, .uh-eti, .uh-fuente, .uh-conf, .uh-tipo, .uh-intro, .uh-pie, .uh-det .af-por, .uh-det .af-exp, .uh-det .af-chip b, .uh-dia span {
  overflow-wrap: anywhere; word-break: break-word; hyphens: auto; min-width: 0; max-width: 100%; }
.uh-det > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.uh-det > summary .uh-titulo { flex: 1 1 100%; white-space: normal; }
.uh-tipo, .uh-fuente, .uh-conf { white-space: normal; }
.uh-det .afecta-a { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; max-width: 100%; }
.uh-det .af-chip { max-width: 100%; min-width: 0; flex: 0 1 auto; white-space: normal; overflow-wrap: anywhere; }
.uh-det .af-chip .af-por { flex-basis: 100%; }
.uh-det .af-exp { flex: 1 1 100%; max-width: 100%; }
.uh-det .af-et { flex: 0 0 auto; }
.uh-pill-caja { max-width: 100%; }
.uh-pill { max-width: calc(100% - 24px); white-space: normal; }
.uh-mas { max-width: 100%; white-space: normal; }
#uh-tipos { max-width: 100%; min-width: 0; }
@media (max-width: 900px) {
  .uh-fila { grid-template-columns: 44px minmax(0, 1fr); gap: 8px; }
  #uh-tipos { flex-wrap: wrap; overflow: visible; margin-right: 0; }
  .uh-tipo { margin: 0; }
  .nt-tabs { max-width: 100%; overflow-x: auto; }
}
@media (max-width: 400px) {
  .uh-fila { grid-template-columns: 40px minmax(0, 1fr); gap: 6px; }
  .uh-hora { font-size: 12px; }
  .uh-titulo { font-size: 13.5px; }
}

/* pulso del mercado (VIX · ES · NQ) bajo la cabecera en móvil: en 360 px se pasaba 8 px del ancho; ahora puede encoger y bajar de línea */
@media (max-width: 900px) {
  #pulso { max-width: 100%; box-sizing: border-box; flex-wrap: wrap; overflow: hidden; padding-left: 12px; padding-right: 12px; }
  #pulso .pl-i { min-width: 0; white-space: normal; gap: 3px; }
  #pulso .pl-i b, #pulso .pl-i .pl-c { white-space: nowrap; }
}
@media (max-width: 400px) { #pulso { font-size: 12px; gap: 4px 8px; } }

/* =====================================================================
   MENÚ LATERAL PROFESIONAL (23/10/2026) — etiquetas de grupo pequeñas y apagadas, iconos de línea finos, activo = fondo sutil redondeado,
   grupos plegables con chevron y bloque de usuario fijo abajo. Sustituye a las cajas con borde y franja de color por familia.
   Tres estados distintos y sutiles: ACTIVA (fondo + barra naranja fina) · HOY (píldora «hoy» de contorno) · NOVEDAD (punto).
   ===================================================================== */
html body #barra-lateral { display: flex; flex-direction: column; padding: 12px 10px 0; gap: 0; background: var(--t-fondo-barra); border-right: 1px solid var(--lp-borde, rgba(255,255,255,.06)); }
html body #barra-lateral #btn-barra { margin: 0 2px 4px; padding: 6px 8px; font-size: 12px; color: var(--t-texto-3); border: 0; background: transparent; border-radius: 8px; }
html body #barra-lateral #btn-barra:hover { background: rgba(255,255,255,.05); color: var(--t-texto); }
html body #barra-enlaces { flex: 1 1 auto; min-height: 0; overflow-y: auto; gap: 1px; margin: 0; padding-bottom: 8px; scrollbar-width: thin; }

/* etiquetas de grupo */
html body #barra-enlaces .barra-seccion { margin: 16px 8px 4px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--t-texto-3); opacity: .75; border: 0; height: auto; }
html body #barra-enlaces .barra-seccion:first-child { margin-top: 6px; }

/* entradas: sin caja, sin franja de color, nombre en minúsculas normales */
html body #barra-enlaces > a, html body #barra-enlaces .grupo-barra, html body #barra-enlaces a.hijo, html body #barra-enlaces .grupo-cab {
  border: 0 !important; box-shadow: none !important; background: transparent; }
html body #barra-enlaces a { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--t-texto-2); min-height: 34px; transition: background .12s, color .12s; }
html body #barra-enlaces a:hover { background: rgba(255,255,255,.05); color: var(--t-texto); }
html body #barra-enlaces a .texto-barra, html body #barra-enlaces .grupo-enlace .texto-barra { text-transform: none; letter-spacing: 0; font-weight: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
html body #barra-enlaces .ico, html body #barra-lateral .ico { width: 17px; height: 17px; color: var(--t-texto-3); stroke-width: 1.5; flex: none; opacity: .95; }
html body #barra-enlaces a:hover .ico { color: var(--t-texto-2); }

/* ACTIVA: fondo sutil redondeado + barra naranja fina a la izquierda + icono naranja */
html body #barra-enlaces a[aria-current="true"] { background: rgba(255,255,255,.075); color: var(--t-texto); }
html body #barra-enlaces a[aria-current="true"]::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--t-naranja); }
html body #barra-enlaces a[aria-current="true"] .ico { color: var(--t-naranja); }
html body #barra-enlaces .grupo-barra.activo-grupo > .grupo-cab .grupo-enlace { color: var(--t-texto); }
html body #barra-enlaces .grupo-barra.activo-grupo > .grupo-cab .grupo-enlace .ico { color: var(--t-texto-2); }

/* grupos plegables con chevron a la derecha y hijos con una línea fina */
html body #barra-enlaces .grupo-cab { display: flex; align-items: center; gap: 0; padding: 0; }
html body #barra-enlaces .grupo-cab .grupo-enlace { flex: 1; min-width: 0; }
html body #barra-enlaces .grupo-flecha { position: static; width: 28px; height: 30px; margin-right: 2px; border: 0; background: transparent; color: var(--t-texto-3); border-radius: 6px; }
html body #barra-enlaces .grupo-flecha:hover { background: rgba(255,255,255,.06); color: var(--t-texto); }
html body #barra-enlaces .grupo-flecha .chev { width: 6px; height: 6px; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); transition: transform .18s; }
html body #barra-enlaces .grupo-barra.abierto > .grupo-cab .chev { transform: rotate(45deg); }
html body #barra-enlaces .grupo-hijos { margin: 1px 0 4px 17px; padding-left: 8px; border-left: 1px solid rgba(255,255,255,.08); gap: 1px; }
html body #barra-enlaces a.hijo { padding: 6px 10px; font-size: 13px; min-height: 30px; }
html body #barra-enlaces a.hijo .ico { display: inline-block; flex: none; }
html body #barra-enlaces a.hijo[aria-current="true"]::before { left: -9px; top: 7px; bottom: 7px; }

/* HOY (píldora de contorno) y NOVEDAD (punto): estados distintos de «activa» */
html body #barra-enlaces .nav-hoy { margin-left: auto; flex: none; font-size: 12px; font-weight: 600; letter-spacing: .04em; line-height: 1; padding: 3px 7px; border-radius: 999px; color: var(--t-texto-2); border: 1px solid rgba(255,255,255,.16); background: transparent; }
html body #barra-enlaces a[aria-current="true"] .nav-hoy { border-color: rgba(255,255,255,.28); color: var(--t-texto); }
html body #barra-enlaces .nav-novedad { margin-left: auto; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--t-verde); box-shadow: 0 0 0 3px rgba(52,191,160,.16); }
html body #barra-enlaces .nav-hoy + .nav-novedad { margin-left: 6px; }

/* bloque de usuario fijo abajo (sin correo ni datos personales: en la vista de amigos dice «Solo lectura») */
#barra-usuario { flex: none; display: flex; align-items: center; gap: 10px; margin: 0 -10px; padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.06); background: var(--t-fondo-barra); }
.bu-av { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--t-sobre-marca); background: linear-gradient(135deg, var(--t-naranja-2), var(--t-naranja-3)); }
.bu-t { display: grid; min-width: 0; line-height: 1.25; }
.bu-t b { font-size: 12.5px; font-weight: 600; color: var(--t-texto); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bu-t small { font-size: 12px; color: var(--t-texto-3); }

/* barra comprimida: solo iconos */
html body:not(.barra-abierta) #barra-lateral { padding: 12px 6px 0; }
html body:not(.barra-abierta) #barra-enlaces a { justify-content: center; padding: 8px 0; }
html body:not(.barra-abierta) #barra-enlaces .barra-seccion { margin: 8px 12px; border-top: 1px solid rgba(255,255,255,.07); height: 0; overflow: hidden; padding: 0; }
html body:not(.barra-abierta) #barra-enlaces .barra-seccion .texto-barra, html body:not(.barra-abierta) #barra-enlaces .nav-hoy, html body:not(.barra-abierta) #barra-enlaces .grupo-flecha { display: none; }
html body:not(.barra-abierta) #barra-enlaces .nav-novedad { position: absolute; top: 6px; right: 10px; margin: 0; }
html body:not(.barra-abierta) #barra-usuario { justify-content: center; margin: 0 -6px; padding: 12px 0; }
html body:not(.barra-abierta) #barra-usuario .texto-barra { display: none; }
html body:not(.barra-abierta) #barra-enlaces .grupo-hijos { margin-left: 0; padding-left: 0; border-left: 0; }

/* menú: refuerzos de especificidad frente a las cajas antiguas de tema.css (8b) */
html body #barra-enlaces > a, html body #barra-enlaces .grupo-barra, html body #barra-enlaces .grupo-barra.activo-grupo, html body #barra-enlaces a.hijo, html body #barra-enlaces .grupo-cab {
  background: transparent !important; border: 0 !important; box-shadow: none !important; }
html body #barra-enlaces a:hover { background: rgba(255,255,255,.05) !important; }
html body #barra-enlaces a[aria-current="true"] { background: rgba(255,255,255,.075) !important; }
html body #barra-enlaces .grupo-barra.abierto { background: transparent !important; }
html body #barra-enlaces > a .ico, html body #barra-enlaces .grupo-enlace .ico { display: inline-block !important; }
html body #barra-enlaces a { min-height: 32px; padding-top: 6px; padding-bottom: 6px; }
html body #barra-enlaces .barra-seccion { margin-top: 12px; }
html body #barra-enlaces .barra-seccion .texto-barra { opacity: 1; }

/* ---- barra de probabilidades de la Fed (Macro y resumen de la semana): segmentos sin texto + tres columnas alineadas, legibles en web y móvil ---- */
.fed-barra, .rv-barra { display: flex; gap: 2px; height: 10px; border-radius: 6px; overflow: hidden; background: rgba(255,255,255,.06); }
.fb-barra { height: 10px; }
.fed-barra i { min-width: 3px; border-radius: 2px; font-size: 0; }
.fb-fila { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; align-items: start; }
.fb-f { padding-top: 0; font-size: 13px; font-weight: 600; color: var(--t-texto); line-height: 1.1; }
.fb-cuerpo, .rv-prob { display: grid; gap: 8px; min-width: 0; }
.rv-prob { margin-top: 12px; height: auto; display: grid; }
.fb-cifras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.fb-c { display: grid; gap: 1px; min-width: 0; }
.fb-n { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--t-texto-3); white-space: nowrap; }
.fb-n i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0; flex: none; }
.fb-c.cut .fb-n i { background: var(--d-cut); } .fb-c.hold .fb-n i { background: var(--d-hold); } .fb-c.hike .fb-n i { background: var(--d-hike); }
.fb-c b { font-size: 15px; font-weight: 600; color: var(--t-texto-2); line-height: 1.2; font-variant-numeric: tabular-nums; }
.fb-c.top b { font-size: 18px; color: var(--t-texto); }
.fb-c.top .fb-n { color: var(--t-texto-2); }
.fb-leyenda { display: none; }          /* la leyenda antigua ya va en cada columna */
@media (max-width: 400px) { .fb-fila { grid-template-columns: 1fr; gap: 6px; } .fb-f { font-size: 12px; } .fb-c b { font-size: 14px; } .fb-c.top b { font-size: 16px; } }
.fb-fila { grid-template-columns: 92px minmax(0, 1fr); }
.fb-f { white-space: nowrap; }
.fb-cifras { max-width: 420px; }
.fed-barra i.cut:only-child, .fed-barra i[style*="flex:1.5"] { min-width: 3px; }
@media (max-width: 400px) { .fb-fila { grid-template-columns: 1fr; } }

/* =====================================================================
   BOTONES «?» — un único componente: círculo de 20 px centrado con el texto, zona táctil de 32 px, hoja inferior en móvil
   ===================================================================== */
.gl-q, .af-q { position: relative; box-sizing: border-box; display: inline-grid; place-items: center; width: 20px; height: 20px; min-width: 20px; min-height: 20px; margin: 0 3px; padding: 0;
  vertical-align: middle; position: relative; top: -0.03em; border-radius: 50%; border: 1px solid rgba(255,255,255,.28); background: transparent; color: var(--t-texto-3); font-size: 12px; font-weight: 700; line-height: 1; cursor: pointer; flex: none; align-self: center; }
.gl-q > span { all: unset; display: contents; font: inherit; }
.gl-q::after, .af-q::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; }          /* zona táctil mínima 32 × 32 sin agrandar la línea */
.gl-q:hover, .af-q:hover, .gl-q:focus-visible, .af-q:focus-visible, .gl-q[aria-expanded="true"], .af-q[aria-expanded="true"] { background: var(--t-naranja); border-color: var(--t-naranja); color: var(--t-sobre-marca); outline: none; }
.gl-q:hover > span, .gl-q[aria-expanded="true"] > span { background: none; border: 0; color: inherit; }
.gl-q:focus-visible, .af-q:focus-visible { box-shadow: 0 0 0 3px rgba(255,122,46,.28); }
h1 .gl-q, h2 .gl-q, h3 .gl-q, h4 .gl-q, .cb-t .gl-q { vertical-align: middle; }
.hoja-cerrar { display: none; }
@media (max-width: 900px) {
  .gl-exp.hoja, .af-exp.hoja:not([hidden]) { position: fixed; left: 10px; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: var(--z-modal); margin: 0; max-height: 60vh; overflow-y: auto; box-sizing: border-box;
    padding: 16px 16px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: #17181a; box-shadow: 0 -12px 40px rgba(0,0,0,.6); font-size: 14px; line-height: 1.5; animation: hoja-sube .2s ease-out; }
  .gl-exp.hoja p, .af-exp.hoja { color: var(--t-texto-2); }
  .gl-exp.hoja .hoja-cerrar, .af-exp.hoja:not([hidden]) .hoja-cerrar { display: block; width: 100%; margin-top: 12px; min-height: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: transparent; color: var(--t-texto); font: inherit; font-weight: 600; cursor: pointer; }
  @keyframes hoja-sube { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) { .gl-exp.hoja, .af-exp.hoja { animation: none !important; } }

/* etiqueta «Hoy» / «Mañana» / «Evento clave»: píldora suave y redondeada, color sutil (antes un rectángulo de color pleno) */
.chip-ev { display: inline-flex; align-items: center; padding: 3px 10px !important; border-radius: 999px !important; font-size: 12px !important; font-weight: 600 !important; letter-spacing: .01em !important; text-transform: none !important; line-height: 1.2;
  background: rgba(255,122,46,.12) !important; color: var(--t-naranja-2) !important; border: 1px solid rgba(255,122,46,.28) !important; vertical-align: middle; }
.chip-ev.manana { background: rgba(255,255,255,.04) !important; color: var(--t-texto-2) !important; border-color: rgba(255,255,255,.16) !important; }
.cs-dia.hoy .chip-ev { background: rgba(255,122,46,.14) !important; color: var(--t-naranja-2) !important; border-color: rgba(255,122,46,.32) !important; }
.ec-hoy { padding: 2px 9px !important; border-radius: 999px !important; background: rgba(255,122,46,.14) !important; color: var(--t-naranja-2) !important; border: 1px solid rgba(255,122,46,.3); font-weight: 600; }
.ec-dia.hoy .ec-hoy { background: rgba(255,122,46,.14) !important; color: var(--t-naranja-2) !important; }

/* ---- Sesgo del día: espaciado correcto del medidor y tarjeta compacta en móvil ---- */
.sg-medidor { gap: 9px; margin: 4px 0 2px; }
.sg-pista { height: 6px; }
.sg-ext { padding-top: 2px; font-size: 12px; letter-spacing: .1em; line-height: 1.2; }
.sesgo-card .cab { align-items: center; }
@media (max-width: 900px) {
  #sesgo .sesgo-card { display: grid; gap: 8px; padding: 14px 16px; height: auto; }
  #sesgo .sesgo-card .cab { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; }
  #sesgo .sesgo-card .cab .espacio { display: none; }
  #sesgo .sesgo-card .cab .tk { font-size: 17px; }
  #sesgo .sesgo-card .cab .que { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
  #sesgo .sesgo-card .badge { height: auto !important; min-height: 0 !important; width: auto !important; padding: 4px 10px !important; border-radius: 999px; font-size: 12px; white-space: nowrap; align-self: center; justify-self: end; }
  #sesgo .sesgo-card .conviccion { font-size: 12px; }
  #sesgo .sesgo-card .motivo { -webkit-line-clamp: 3; }
  #sesgo .sesgo-card .ver-mas { font-size: 12px; }
}
@media (max-width: 900px) { #sesgo .sesgo-card { align-content: start; grid-auto-rows: auto; } #sesgo .sesgo-grid { align-items: start; } }
@media (min-width: 901px) { #sesgo .sesgo-card { align-content: start; } }
/* los iconos de línea (svg.ico) nunca se estiran: «#macro-bloque svg { height:auto }» (móvil) los dejaba en 150 px de alto dentro de las etiquetas */
#macro-bloque svg.ico, svg.ico { width: 16px; height: 16px; max-width: none; flex: none; }
.badge svg.ico, .chip svg.ico { width: 14px; height: 14px; }

/* termómetro de riesgo: toda la barra y el estado son enlaces al Riesgo de cola */
.rv-medidor-ir { display: block; color: inherit; text-decoration: none; border-radius: 10px; }
.rv-medidor-ir:hover .rv-marca, .rv-medidor-ir:focus-visible .rv-marca { box-shadow: 0 0 0 4px rgba(255,255,255,.12); }
.rv-medidor-ir:focus-visible, .rv-estado-lnk:focus-visible, .rv-mas-lnk:focus-visible { outline: 2px solid var(--t-naranja-2); outline-offset: 3px; }
.rv-estado-lnk { text-decoration: underline; text-decoration-color: rgba(255,255,255,.25); text-underline-offset: 3px; }
.rv-estado-lnk:hover { text-decoration-color: currentColor; }
.rv-mas-lnk { display: inline-flex; align-items: center; min-height: 32px; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--t-naranja-2); text-decoration: none; }
.rv-mas-lnk:hover { text-decoration: underline; }

/* =====================================================================
   INFORMES DE LA SEMANA — un único contenedor con ancho máximo, selector de secciones alineado y tarjetas que ocupan exactamente su celda
   ===================================================================== */
#informe-bloque { width: 100%; max-width: 1240px; margin-inline: auto; box-sizing: border-box; min-width: 0; }
#informe-bloque > *, #informe { min-width: 0; max-width: 100%; box-sizing: border-box; }
.inf-selector { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--lp-gap, 18px); padding: 0; max-width: 100%; }
.inf-sel-i { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); color: var(--t-texto-2); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; scroll-snap-align: start; transition: background .12s, border-color .12s, color .12s; }
.inf-sel-i:hover { background: rgba(255,255,255,.07); color: var(--t-texto); border-color: rgba(255,255,255,.2); }
.inf-sel-i:focus-visible { outline: 2px solid var(--t-naranja-2); outline-offset: 2px; }
.inf-grid { display: grid; gap: var(--lp-gap, 18px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); align-items: stretch; width: 100%; }
.inf-grid > .inf-card { display: flex; flex-direction: column; min-width: 0; max-width: 100%; box-sizing: border-box; overflow: hidden; }
.inf-card .inf-cuerpo, .inf-card .inf-cab { min-width: 0; max-width: 100%; }
.inf-card .inf-cuerpo { overflow-wrap: anywhere; }
.inf-card .inf-cuerpo table { width: 100%; table-layout: fixed; font-size: 12.5px; }
.inf-card .inf-cuerpo th, .inf-card .inf-cuerpo td { padding: 5px 6px; word-break: normal; overflow-wrap: anywhere; }
.inf-card .inf-ver { margin-top: auto; }
@media (min-width: 1280px) { .inf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 901px) and (max-width: 1279px) { .inf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  /* móvil: el selector es una tira horizontal con snap que llega al borde de la pantalla sin recortar el título */
  .inf-selector { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin-inline: 0; padding: 2px 0 6px; max-width: 100%; }
  .inf-selector::-webkit-scrollbar { display: none; }
  .inf-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Tipos de interés y Fed (Macro semanal): jerarquía clara, alineación y color sutil ---- */
#macro .tp-kpis { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 20px; }
#macro .tp-kpi { display: grid; align-content: start; gap: 6px; padding: 16px 18px; border: 1px solid rgba(255,255,255,.07); border-radius: var(--t-radio-card); background: var(--t-panel-2); min-width: 0; }
#macro .tp-et { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--t-texto-3); }
#macro .tp-v { font-size: 34px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; color: var(--t-texto); }
#macro .tp-v.tp-m { font-size: 22px; font-weight: 600; }
#macro .tp-vars { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 2px; }
#macro .tp-var { display: inline-grid; gap: 1px; }
#macro .tp-var b { font-size: 13.5px; font-weight: 600; }
#macro .tp-var small { font-size: 12px; color: var(--t-texto-3); }
#macro .tp-h { margin: 4px 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--t-texto-3); }
#macro .tp-filas { display: grid; gap: 18px; margin-bottom: 18px; }
#macro .tp-fila { display: grid; gap: 8px; min-width: 0; }
#macro .tp-cab { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 14px; }
#macro .tp-cab b { font-size: 14px; font-weight: 600; color: var(--t-texto); }
#macro .tp-cab .que { font-size: 12px; }
#macro .tp-barra { height: 10px; }
@media (max-width: 700px) {
  #macro .tp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #macro .tp-kpi.tp-principal { grid-column: 1 / -1; }
  #macro .tp-v { font-size: 30px; } #macro .tp-v.tp-m { font-size: 19px; }
  #macro .tp-cab { flex-direction: column; gap: 2px; }
}

/* menú algo más ancho (el nombre completo de «Informes de la semana» cabe) y cabecera en UNA fila en portátiles */
:root { --ancho-barra: 252px; --t-ancho-barra: 252px; }
@media (min-width: 901px) and (max-width: 1400px) { body > header .relojes, body > header #meta-ejecucion { display: none; } }
/* tablas dentro de las tarjetas de Informes: cabeceras que bajan de línea en vez de solaparse */
.inf-card .inf-cuerpo th { white-space: normal; font-size: 12px; letter-spacing: .05em; line-height: 1.25; overflow-wrap: anywhere; text-align: right; }
.inf-card .inf-cuerpo th:first-child { text-align: left; }

/* =====================================================================
   DESBORDES (23/10/2026) — causas reales halladas con detectar_desbordes.js (la red general está en seguridad.css)
   ===================================================================== */
.tira { overflow: hidden; grid-auto-columns: minmax(0, 1fr); }                      /* decenas de barritas de 1 px + hueco sumaban más que la caja */
.pi-resumen { flex-wrap: wrap; } .pi-resumen .badge { flex: 0 1 auto; white-space: normal; }
.tr-cab { flex-wrap: wrap; } .tr-cab .badge { white-space: normal; }
.af-q { overflow: visible; }
@media (max-width: 600px) {
  .kpi .v { white-space: normal; overflow-wrap: anywhere; }
  #pulso .pl-i b { min-width: max-content; }
  .cola-fila td { overflow-wrap: anywhere; }
}
/* nombres de la escena de Agentes: etiquetas flotantes, no deben pesar en el ancho */
.persona { max-width: none; }
.nt-lista .tr-cab { flex-wrap: wrap; align-items: flex-start; } .nt-lista .tr-cab .tr-t { flex: 1 1 12em; }
.nt-badges { flex: 0 1 auto; max-width: 100%; justify-content: flex-start; }
#nt-controles, .nt-controles { max-width: 100%; } .nt-buscar { box-sizing: border-box; max-width: 100%; }
.nt-chips { max-width: 100%; margin-right: 0; }

/* ---------- Calendario · ficha profesional al desplegar un dato ---------- */
.cs-ficha { margin-top: 10px; border-top: 1px solid var(--t-borde, rgba(255,255,255,.08)); padding-top: 8px; }
.cs-f-in { display: grid; gap: 8px; }
.cs-f-bloque p, .cs-f-col p { margin: 2px 0; }
.cs-f-dato { font-size: 1.02em; }
.cs-f-regla { font-size: 12px; margin: 0; }
.cs-f-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cs-f-col { min-width: 0; overflow-wrap: anywhere; }
.cs-f-g { font-weight: 600; margin-right: 4px; }
.cs-f-tab { width: 100%; border-collapse: collapse; font-size: .9em; }
.cs-f-tab th, .cs-f-tab td { padding: 3px 6px; text-align: right; } .cs-f-tab th:first-child, .cs-f-tab td:first-child { text-align: left; }
@media (max-width: 700px) { .cs-f-cols { grid-template-columns: minmax(0, 1fr); } }

/* ACTIVOS AFECTADOS (afectaChipsHTML): chips compactos que se envuelven; los que tienen explicación son botones táctiles */
.afecta-a.af-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; min-width: 0; }
.af-chips .af-chip { min-width: 0; max-width: 100%; }
button.af-chip.af-tocar { font: inherit; font-size: 12px; cursor: pointer; min-height: 32px; background-clip: padding-box; }
button.af-chip.af-tocar[aria-expanded="true"] { outline: 1.5px solid var(--t-naranja); }
button.af-chip.af-tocar:focus-visible { outline: 2px solid var(--t-naranja); outline-offset: 1px; }
.af-pors { margin: 4px 0 0; } .af-por-l { margin: 4px 0 0; padding: 6px 10px; border-left: 3px solid var(--t-naranja); border-radius: 0 8px 8px 0; background: var(--t-panel-2); font-size: 12.5px; line-height: 1.45; color: var(--t-texto-2); }
.afecta-ayuda { display: inline-flex; align-items: center; gap: 6px; position: relative; } .afecta-ayuda .af-exp { position: absolute; z-index: 5; top: 26px; left: 0; width: min(320px, 86vw); }
@media (prefers-reduced-motion: no-preference) { html:not([data-efectos="off"]) .af-por-l:not([hidden]) { animation: af-ent .2s ease both; } }
@keyframes af-ent { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* ===== F · COLOR ÚNICO DEL DATO (04/11/2026): verde = mejor que la previsión, rojo = peor, gris = en línea. Misma paleta en Calendario, Dato clave, Informe del evento, Semana anterior y fichas. El borde
   de la fila del Calendario marca IMPORTANCIA con otra paleta (azules), nunca verde/rojo. ===== */
:root { --dato-verde: #35c47c; --dato-rojo: #ef5350; --dato-gris: #9a9a9a; --imp-3: #7aa2ff; --imp-2: #5a79c4; --imp-1: #3b4a6b; }
.dato-verde, .fam-lista .fam-l b.dato-verde { color: var(--dato-verde) !important; }
.dato-rojo, .fam-lista .fam-l b.dato-rojo { color: var(--dato-rojo) !important; }
.dato-neutro, .fam-lista .fam-l b.dato-neutro { color: var(--dato-gris) !important; }
.dato-chip { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 600; vertical-align: middle; }
.dato-chip.dato-verde { background: rgba(53,196,124,.14); } .dato-chip.dato-rojo { background: rgba(239,83,80,.14); } .dato-chip.dato-neutro { background: rgba(154,154,154,.14); }
