﻿/* ═══════════════════════════════════════════════════════════════
   MACRONYX — Design System v2
   La piedra angular de los mercados
   ─────────────────────────────────────────────────────────────
   Arquitectura:
   1. Design Tokens (variables globales)
   2. Reset & Base
   3. Tipografía
   4. Layout & Grid
   5. Componentes: Ticker
   6. Componentes: Header & Nav
   7. Componentes: Buttons
   8. Componentes: Cards & Panels
   9. Componentes: Hero
   10. Componentes: Sections
   11. Componentes: Dashboard & Charts
   12. Componentes: Watchlist
   13. Componentes: Indicators
   14. Componentes: Heatmap
   15. Componentes: News & Calendar
   16. Componentes: Smart Money
   17. Componentes: Videos
   18. Componentes: X / Twitter
   19. Componentes: Contact & Legal
   20. Componentes: Footer
   21. Utilidades
   22. Responsive
   23. Accesibilidad
═══════════════════════════════════════════════════════════════ */

/* ─── 1. Design Tokens ──────────────────────────────────────── */
:root {
  /* Colores base */
  --color-background:        #070a10;
  --color-background-soft:   #0c1018;
  --color-surface:           rgba(14, 20, 32, 0.88);
  --color-surface-strong:    rgba(18, 26, 42, 0.96);
  --color-surface-hover:     rgba(255, 255, 255, 0.04);

  /* Bordes */
  --color-border:            rgba(255, 255, 255, 0.08);
  --color-border-gold:       rgba(210, 174, 88, 0.30);
  --color-border-focus:      rgba(210, 174, 88, 0.50);

  /* Dorado institucional */
  --color-gold:              #d2ae58;
  --color-gold-light:        #e8cc84;
  --color-gold-dark:         #a87e2c;
  --color-gold-soft:         rgba(210, 174, 88, 0.12);
  --color-gold-glow:         rgba(210, 174, 88, 0.20);

  /* Texto */
  --color-text:              #edf1f7;
  --color-text-secondary:    #8a9bb4;
  --color-text-faint:        #556070;
  --color-text-on-gold:      #111317;
  --color-text-on-dark-strong: #ffffff;

  /* Semánticos */
  --color-green:             #34c97a;
  --color-green-soft:        rgba(52, 201, 122, 0.12);
  --color-red:               #f05a5a;
  --color-red-soft:          rgba(240, 90, 90, 0.12);
  --color-blue:              #5a9ef5;
  --color-blue-soft:         rgba(90, 158, 245, 0.12);
  --color-amber:             #e8a030;
  --color-amber-soft:        rgba(232, 160, 48, 0.12);

  /* Impacto calendario */
  --color-impact-high:       var(--color-red);
  --color-impact-medium:     var(--color-amber);
  --color-impact-low:        var(--color-text-secondary);

  /* Bordes de onyx / marca */
  --color-onyx-vein:         rgba(210, 174, 88, 0.06);

  /* Radios */
  --radius-xs:    4px;
  --radius-sm:    6px;
  --radius-md:    8px;
  --radius-lg:    12px;
  --radius-xl:    16px;
  --radius-pill:  999px;

  /* Sombras — premium, nunca gaming */
  --shadow-xs:    0 1px 4px rgba(0, 0, 0, 0.28);
  --shadow-sm:    0 4px 16px rgba(0, 0, 0, 0.32);
  --shadow-md:    0 12px 40px rgba(0, 0, 0, 0.36);
  --shadow-lg:    0 24px 72px rgba(0, 0, 0, 0.42);
  --shadow-gold:  0 0 0 1px var(--color-border-focus), 0 0 24px var(--color-gold-glow);

  /* Espaciado — escala de 4px */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   20px;
  --space-6:   24px;
  --space-7:   28px;
  --space-8:   32px;
  --space-10:  40px;
  --space-12:  48px;
  --space-14:  56px;
  --space-16:  64px;
  --space-20:  80px;
  --space-24:  96px;

  /* Tipografía — escala */
  --text-caption:   0.75rem;    /* 12px */
  --text-small:     0.875rem;   /* 14px */
  --text-base:      0.9375rem;  /* 15px — escalón intermedio (badges, meta) */
  --text-body:      1rem;       /* 16px */
  --text-body-lg:   1.125rem;   /* 18px */
  --text-h4:        1.375rem;                       /* 22px, 600 */
  --text-h3:        clamp(1.5rem, 1.1rem + 1.6vw, 1.875rem);   /* 30px desktop, 700 */
  --text-h2:        clamp(1.85rem, 1.2rem + 2.6vw, 2.5rem);    /* 40px desktop, 700 */
  --text-h1:         clamp(2.35rem, 1.3rem + 4vw, 3.25rem);    /* 52px desktop, 800 */
  --text-hero:       clamp(2.6rem, 1.4rem + 4.8vw, 4rem);      /* 64px desktop, 800 */

  /* Transiciones */
  --transition-fast:   150ms ease;
  --transition-base:   180ms ease;
  --transition-slow:   260ms ease;

  /* Layout */
  --max-width:       1440px;
  --content-padding: clamp(16px, 3vw, 28px);
  --header-height:   64px;
  --ticker-height:   44px;
  --header-offset:   calc(var(--header-height) + var(--ticker-height));

  /* Alias de compatibilidad — usados por el JS existente */
  --bg:          var(--color-background);
  --bg-soft:     var(--color-background-soft);
  --surface:     var(--color-surface);
  --surface-strong: var(--color-surface-strong);
  --line:        var(--color-border);
  --line-strong: var(--color-border-gold);
  --text:        var(--color-text);
  --muted:       var(--color-text-secondary);
  --faint:       var(--color-text-faint);
  --gold:        var(--color-gold);
  --gold-dark:   var(--color-gold-dark);
  --gold-soft:   var(--color-gold-soft);
  --green:       var(--color-green);
  --green-soft:  var(--color-green-soft);
  --red:         var(--color-red);
  --red-soft:    var(--color-red-soft);
  --blue:        var(--color-blue);
  --shadow:      var(--shadow-md);
  --radius:      var(--radius-md);
  --onyx-vein:   var(--color-onyx-vein);
}

/* ─── 2. Reset & Base ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--text-body);
  line-height: 1.6;
  background: var(--color-background);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Capas de fondo */
#bg-photo {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: var(--color-background);
  pointer-events: none;
}

#bg-scrim {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: url("assets/mv-logo_v6_512x512.png?v=6");
  background-repeat: no-repeat;
  background-position: center;
  background-size: min(40vw, 460px);
  opacity: 0.035;
}

#bg-canvas {
  position: fixed;
  z-index: -1;
  display: block;
  pointer-events: none;
}

body.menu-open {
  overflow: hidden;
}

/* Elementos de formulario */
button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

button, input, a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ─── 3. Tipografía ─────────────────────────────────────────── */

/* Manrope para display / titulares principales */
h1, h2 {
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  margin-top: 0;
  margin-bottom: 0;
  text-wrap: balance;
  letter-spacing: -0.02em;
  line-height: 1.06;
}

h3, h4, h5, h6 {
  font-family: "Inter", system-ui, sans-serif;
  margin-top: 0;
  margin-bottom: 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p {
  margin-top: 0;
}

h1 {
  font-size: var(--text-h1);
  font-weight: 800;
  max-width: 680px;
  line-height: 1.04;
}

h2 {
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1.08;
}

h3 {
  font-size: var(--text-h3);
  font-weight: 700;
}

h4 {
  font-size: var(--text-h4);
  font-weight: 600;
}

/* Hero h1 — tamaño máximo */
.hero h1 {
  font-size: var(--text-hero);
  font-weight: 800;
  margin-bottom: var(--space-5);
}

/* Italic gold gradient — marca de identidad Macronyx
   Nota: el itálico + background-clip:text recorta el extremo
   derecho de trazos inclinados (l, k, t, d) porque el motor de
   render calcula la caja del gradiente sobre la geometría recta
   del glifo. inline-block + padding-right da margen al trazo;
   letter-spacing normal evita que los glifos se solapen y agraven
   el recorte. Visible sobre todo en móvil, donde el salto de línea
   puede dejar esas letras justo en el borde. */
h1 em,
.text-gold-gradient {
  display: inline-block;
  padding-right: 0.08em;
  font-style: italic;
  letter-spacing: normal;
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 50%, var(--color-gold-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.70));
}

/* Text-shadow para texto sobre fondo animado */
.hero-copy,
.section-heading,
.legal-note {
  text-shadow: 0 2px 20px rgba(4, 6, 10, 0.90), 0 1px 3px rgba(4, 6, 10, 0.65);
}

/* Eyebrow / kicker — ADN de sección */
.eyebrow,
.panel-kicker,
.indicator-kicker {
  margin: 0 0 var(--space-2);
  color: var(--color-gold);
  font-size: var(--text-caption);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

/* Pantalla de velas: quitar text-shadow en degradados */
h1 em { text-shadow: none; }

/* Utilidad de accesibilidad */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── 4. Layout & Grid ──────────────────────────────────────── */

.section-shell {
  width: min(var(--max-width), calc(100% - var(--content-padding) * 2));
  margin: 0 auto;
}

/* ─── 5. Ticker ─────────────────────────────────────────────── */

.ticker {
  position: sticky;
  top: 0;
  z-index: 30;
  overflow: hidden;
  height: var(--ticker-height);
  border-bottom: 1px solid var(--color-border);
  background: rgba(6, 8, 14, 0.96);
  backdrop-filter: blur(20px);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  height: 100%;
  align-items: center;
  animation: ticker-scroll 40s linear infinite;
}

.ticker:hover .ticker-track,
.ticker-track.paused {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .ticker-track::-webkit-scrollbar { display: none; }
}

.ticker-item {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: var(--space-3);
  min-width: 160px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.03);
  transition:
    transform var(--transition-base),
    border-color var(--transition-base),
    background var(--transition-base);
}

.ticker-item strong {
  color: var(--color-text);
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.ticker-item span {
  margin-left: auto;
  font-size: var(--text-caption);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ticker-ext-icon {
  flex-shrink: 0;
  color: var(--color-text-faint);
  opacity: 0;
  transform: translate(-2px, 2px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), color var(--transition-fast);
}

.ticker-item:hover .ticker-ext-icon {
  color: var(--color-gold);
  opacity: 1;
  transform: translate(0, 0);
}

.ticker-item:hover,
.ticker-item.active {
  transform: translateY(-1px);
  border-color: var(--color-border-gold);
  background: var(--color-gold-soft);
}

/* ─── 6. Header & Nav ───────────────────────────────────────── */

.site-header {
  position: sticky;
  top: var(--ticker-height);
  z-index: 25;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-6);
  padding: 0 var(--space-7);
  height: var(--header-height);
  border-bottom: 1px solid var(--color-border);
}

/* El fondo cristal-esmerilado se aplica vía ::before, NO directamente
   en .site-header. Motivo: backdrop-filter/filter en un elemento crea
   una "containing block" para sus descendientes position:fixed — eso
   atrapaba .site-nav (el menú móvil) dentro de la altura del header
   (~60-90px) en vez de la pantalla completa. Moviendo el blur a un
   pseudo-elemento (que no es ancestro de .site-nav) se preserva el
   efecto visual sin romper el posicionamiento fixed del menú. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(7, 10, 16, 0.88);
  backdrop-filter: blur(24px);
}

.site-nav,
.header-actions {
  transition: all var(--transition-slow);
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.60);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-slow);
}

body.menu-open .menu-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Brand / Logo */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.brand-mark {
  width: 53px;
  height: 53px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.brand small {
  color: var(--color-text-secondary);
  font-size: var(--text-caption);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Navegación principal */
.site-nav {
  display: flex;
  justify-content: center;
  gap: var(--space-1);
}

.nav-link {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color var(--transition-base), background var(--transition-base);
}

.nav-link:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--color-gold);
  background: var(--color-gold-soft);
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Lang switch */
.lang-switch {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.lang-switch button {
  min-height: 30px;
  padding: 0 var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.05em;
  background: transparent;
  transition: color var(--transition-base), background var(--transition-base), border-color var(--transition-base);
}

.lang-switch button.active,
.lang-switch button:hover {
  color: var(--color-text-on-gold);
  background: var(--color-gold);
  border-color: transparent;
}

/* Menu toggle mobile */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  height: 1.5px;
  background: var(--color-text);
  border-radius: var(--radius-pill);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ─── 7. Buttons ────────────────────────────────────────────── */

/* Sistema de botones completo */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 40px;
  padding: 0 var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform var(--transition-base),
    border-color var(--transition-base),
    background var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base),
    opacity var(--transition-base);
  text-decoration: none;
}

/* Primary — dorado institucional */
.button-primary {
  color: var(--color-text-on-gold);
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 60%, var(--color-gold-dark) 100%);
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(210, 174, 88, 0.18);
}

.button-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(210, 174, 88, 0.28);
  filter: brightness(1.04);
}

.button-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(210, 174, 88, 0.18);
  filter: brightness(0.97);
}

.button-primary:focus-visible {
  outline: none;
  box-shadow: var(--shadow-gold);
}

.button-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Secondary — borde sutil */
.button-secondary {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-border);
}

.button-secondary:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
}

.button-secondary:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.04);
}

.button-secondary:focus-visible {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 2px rgba(210, 174, 88, 0.18);
}

.button-secondary:disabled {
  opacity: 0.40;
  cursor: not-allowed;
  transform: none;
}

/* Ghost — sin fondo */
.button-ghost {
  color: var(--color-text-secondary);
  background: transparent;
  border-color: transparent;
}

.button-ghost:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
}

.button-ghost:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(210, 174, 88, 0.25);
}

.button-ghost:active {
  background: rgba(255, 255, 255, 0.08);
}

.button-ghost:disabled {
  opacity: 0.40;
  cursor: not-allowed;
}

/* Outline — borde dorado visible, sin relleno; para CTAs
   secundarios que necesitan más presencia que Ghost sin competir
   con Primary */
.button-outline {
  color: var(--color-gold);
  background: transparent;
  border-color: var(--color-border-gold);
}

.button-outline:hover {
  transform: translateY(-1px);
  background: var(--color-gold-soft);
  border-color: var(--color-gold);
}

.button-outline:active {
  transform: translateY(0);
  background: var(--color-gold-soft);
}

.button-outline:focus-visible {
  outline: none;
  box-shadow: var(--shadow-gold);
}

.button-outline:disabled {
  opacity: 0.40;
  cursor: not-allowed;
  transform: none;
}

/* Icon button — cuadrado */
.button-icon {
  width: 40px;
  min-height: 40px;
  padding: 0;
  color: var(--color-text-on-gold);
  background: var(--color-gold);
  border-color: transparent;
  font-size: 1.1rem;
  font-weight: 700;
}

.button-icon:hover {
  transform: translateY(-1px);
  background: var(--color-gold-light);
  box-shadow: 0 4px 16px rgba(210, 174, 88, 0.24);
}

.button-icon:focus-visible {
  outline: none;
  box-shadow: var(--shadow-gold);
}

/* ─── 8. Cards & Panels ─────────────────────────────────────── */

/* Panel base — usado por TODOS los paneles de contenido */
.panel,
.brief-card,
.contact-card,
.indicator-card,
.macro-card,
.intel-card {
  position: relative;
  overflow: hidden;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.indicator-card:hover {
  border-color: var(--color-border-gold);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--color-border-gold);
}

/* Radial glow en esquina superior derecha — toque de profundidad */
.panel::before,
.brief-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(210, 174, 88, 0.06), transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.panel > *,
.brief-card > *,
.indicator-card > * {
  position: relative;
  z-index: 1;
}

.panel {
  padding: var(--space-6);
}

.compact-panel {
  padding: var(--space-4);
}

/* Panel header — título + controles */
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.panel-header.tight {
  margin-bottom: var(--space-3);
}

.panel-header h3 {
  margin-top: var(--space-1);
  font-size: var(--text-h4);
  font-weight: 600;
}

/* Onyx panel — variante con venas doradas */
.panel.onyx-panel {
  background: linear-gradient(
    148deg,
    rgba(12, 16, 26, 0.96) 0%,
    rgba(20, 14, 8, 0.92) 45%,
    rgba(8, 12, 20, 0.96) 100%
  );
  border-color: rgba(210, 174, 88, 0.16);
}

/* ─── 9. Hero ───────────────────────────────────────────────── */

.hero.section-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: var(--space-10);
  align-items: center;
  min-height: calc(100vh - var(--header-offset));
  padding: var(--space-16) 0 var(--space-10);
}

/* Venas de ónix de fondo */
.hero.section-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 35%, rgba(210, 174, 88, 0.035) 50%, transparent 65%),
    linear-gradient(70deg,  transparent 52%, rgba(210, 174, 88, 0.025) 63%, transparent 74%);
  z-index: 0;
}

.hero.section-shell > * {
  position: relative;
  z-index: 1;
}

.hero-copy,
.hero-panel {
  min-width: 0;
}

/* Eyebrow del hero con subrayado vena */
.hero .eyebrow {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
}

.hero .eyebrow::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--color-gold), transparent);
  border-radius: var(--radius-pill);
}

/* Hero intro text */
.hero-intro {
  max-width: 500px;
  margin-bottom: var(--space-6);
  color: var(--color-text-secondary);
  font-size: var(--text-body-lg);
  line-height: 1.65;
}

/* Hero actions */
.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.hero-actions .button {
  min-height: 44px;
  padding: 0 var(--space-5);
  font-size: var(--text-base);
}

/* Hero chips — status badges */
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-8);
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.03);
  font-size: var(--text-small);
  font-weight: 500;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.hero-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--color-green);
  box-shadow: 0 0 8px rgba(52, 201, 122, 0.65);
  flex-shrink: 0;
}

@media (hover: hover) {
  .hero-chip:hover {
    color: var(--color-text);
    border-color: var(--color-border-gold);
    background: var(--color-gold-soft);
    transform: translateY(-1px);
  }
}

/* Hero panel lateral */
.hero-panel {
  display: grid;
  gap: var(--space-3);
}

/* Brief card — resumen ejecutivo del hero */
.brief-card {
  padding: var(--space-5);
}

.brief-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.brief-head > span:first-child {
  color: var(--color-gold);
  font-size: var(--text-caption);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.brief-live {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-secondary);
  font-size: var(--text-caption);
  font-weight: 600;
}

.brief-live i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--color-green);
  box-shadow: 0 0 10px rgba(52, 201, 122, 0.80);
  font-style: normal;
}

.brief-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.brief-stat {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}

.brief-stat-wide {
  grid-column: 1 / -1;
}

.brief-stat span {
  color: var(--color-text-secondary);
  font-size: var(--text-caption);
  letter-spacing: 0.02em;
}

.brief-stat strong {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
}

/* ─── 10. Sections ──────────────────────────────────────────── */

.terminal,
.analysis,
.news-section,
.article-section,
.video-section,
.x-section,
.contact,
.legal-note,
.smart-money,
.dashboard-intel {
  scroll-margin-top: calc(var(--header-offset) + 24px);
  padding: var(--space-14) 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-7);
}

.section-heading h2 {
  margin-top: var(--space-2);
  margin-bottom: 0;
}

.section-intro {
  max-width: 680px;
  margin: var(--space-3) 0 0;
  color: var(--color-text-secondary);
  font-size: var(--text-body);
  line-height: 1.70;
}

/* Live pill badge */
.live-pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid rgba(52, 201, 122, 0.20);
  border-radius: var(--radius-pill);
  color: var(--color-text-secondary);
  background: var(--color-green-soft);
  font-size: var(--text-small);
  font-weight: 600;
}

.live-pill > span:first-child {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-green);
  box-shadow: 0 0 14px rgba(52, 201, 122, 0.72);
  flex-shrink: 0;
}

/* Indicadores macro hero */
.indicator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.indicator-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  min-width: 0;
}

.indicator-top > div {
  min-width: 0;
}

.indicator-top h4 {
  margin-top: var(--space-1);
  font-size: var(--text-h4);
  font-weight: 700;
  line-height: 1.1;
  overflow-wrap: break-word;
}

.indicator-value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-1);
  flex-shrink: 0;
  white-space: nowrap;
}

.indicator-value strong {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.indicator-value span {
  font-size: var(--text-small);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.indicator-chart {
  height: 48px;
  overflow: hidden;
  border-radius: var(--radius-xs);
}

.indicator-chart svg {
  width: 100%;
  height: 100%;
}

.indicator-date {
  display: block;
  margin-top: var(--space-2);
  color: var(--color-text-faint);
  font-size: var(--text-caption);
}

.ind-num {
  font-variant-numeric: tabular-nums;
}

.ind-unit {
  margin-left: 2px;
  font-size: 0.85em;
  font-weight: 500;
  opacity: 0.75;
}

/* ─── 11. Dashboard & Charts ────────────────────────────────── */

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(280px, 0.8fr);
  gap: var(--space-5);
}

.market-panel {
  min-height: 700px;
}

.asset-meta {
  display: grid;
  justify-items: end;
  gap: var(--space-1);
}

.asset-meta strong {
  font-size: 1.6rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.asset-meta span {
  font-size: var(--text-small);
  font-weight: 700;
}

.chart-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: min(66vh, 660px);
  min-height: 480px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-background-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.chart-surface,
.chart-surface iframe {
  display: block;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

.chart-fallback {
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--space-3);
  height: 100%;
  padding: var(--space-8);
  text-align: center;
  color: var(--color-text-secondary);
}

.chart-fallback strong {
  max-width: 360px;
  color: var(--color-text);
  font-size: 1.15rem;
  font-weight: 600;
}

/* Metrics bar */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.metric {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
  transition: border-color var(--transition-base), background var(--transition-base);
}

.metric:hover {
  border-color: var(--color-border-gold);
  background: rgba(255, 255, 255, 0.04);
}

.metric span {
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  letter-spacing: 0.01em;
}

.metric strong {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text-body);
  font-weight: 600;
}

.side-stack {
  display: grid;
  gap: var(--space-5);
  align-content: start;
}

/* ─── 12. Watchlist ─────────────────────────────────────────── */

.watchlist-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0 var(--space-3);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

input::placeholder {
  color: var(--color-text-faint);
}

input:focus {
  border-color: var(--color-border-focus);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(210, 174, 88, 0.10);
}

.watchlist,
.news-list,
.event-list,
.video-list {
  display: grid;
  gap: var(--space-2);
}

/* Watchlist cards */
.wl-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-base);
}

.wl-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
}

.wl-up   { border-color: var(--color-border); }
.wl-down { border-color: var(--color-border); }
.wl-flat { border-color: var(--color-border); }

.wl-up::before   { background: var(--color-green); }
.wl-down::before { background: var(--color-red); }
.wl-flat::before { background: var(--color-text-secondary); }

.wl-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(2px);
}

.wl-card--active {
  border-color: var(--color-border-gold) !important;
  background: var(--color-gold-soft) !important;
}

.wl-card--active::before { background: var(--color-gold) !important; }

.wl-card-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.wl-sym {
  font-size: var(--text-small);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.wl-name {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.wl-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.wl-price {
  font-size: var(--text-small);
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.wl-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--text-caption);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  line-height: 1.3;
}

.wl-up   .wl-badge { background: rgba(52, 201, 122, 0.12);  color: var(--color-green); border: 1px solid rgba(52, 201, 122, 0.24); }
.wl-down .wl-badge { background: rgba(240, 90, 90, 0.12);   color: var(--color-red);   border: 1px solid rgba(240, 90, 90, 0.24); }
.wl-flat .wl-badge { background: rgba(255, 255, 255, 0.05); color: var(--color-text-secondary); border: 1px solid var(--color-border); }

.wl-arrow {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.wl-remove {
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--color-text-faint);
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
  padding: 0;
}

.wl-card:hover .wl-remove { opacity: 1; }

.wl-remove:hover {
  background: rgba(240, 90, 90, 0.16);
  color: var(--color-red);
}

.wl-empty {
  padding: var(--space-5) 0;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: var(--text-small);
}

/* ─── 13. Indicators (Macro) ────────────────────────────────── */

/* Heatmap sectorial */
.heatmap-inline-wrap {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

.heatmap-inline-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.heatmap-inline-hdr-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.heatmap-inline-hdr-left .panel-kicker { margin: 0; }

.hm-inline-time {
  font-size: var(--text-caption);
  color: var(--color-text-faint);
}

.heatmap-panel { display: none !important; }

/* ─── 14. News & Calendar ───────────────────────────────────── */

.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(260px, 0.8fr);
  gap: var(--space-5);
  align-items: start;
}

.news-item {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition:
    border-color var(--transition-base),
    background var(--transition-base),
    transform var(--transition-fast);
}

.news-item:hover {
  border-color: var(--color-border-gold);
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-1px);
}

.news-item.active {
  border-color: var(--color-border-gold);
  background: var(--color-gold-soft);
}

.news-source {
  font-size: var(--text-caption);
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-1);
}

.news-title {
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.news-summary {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  line-height: 1.55;
}

.news-status {
  margin-top: var(--space-3);
  color: var(--color-text-faint);
  font-size: var(--text-caption);
  text-align: right;
}

/* Calendar */
.calendar-panel {
  padding: var(--space-5);
}

.cal-filters {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.cal-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text-secondary);
  background: transparent;
  font-size: var(--text-small);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}

.cal-filter-btn.active,
.cal-filter-btn:hover {
  color: var(--color-text);
  border-color: var(--color-border-gold);
  background: var(--color-gold-soft);
}

.cal-filter-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.cal-filter-dot--high   { background: var(--color-red); }
.cal-filter-dot--medium { background: var(--color-amber); }
.cal-filter-dot--low    { background: var(--color-text-secondary); }

.cal-day-tabs {
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: var(--space-1);
}

.cal-day-tabs::-webkit-scrollbar { display: none; }

.cal-loading {
  padding: var(--space-5) 0;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: var(--text-small);
}

/* Article view */
.article-section {
  padding-top: var(--space-3);
}

.article-view {
  padding: var(--space-8);
}

.tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text-secondary);
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.article-view h3 {
  font-size: var(--text-h3);
  margin-bottom: var(--space-5);
  line-height: 1.3;
}

/* ─── 15. Smart Money ───────────────────────────────────────── */

.smart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

.consensus-panel,
.alerts-panel {
  margin-bottom: var(--space-5);
  padding: var(--space-6);
}

/* ─── 16. Dashboard Intel ───────────────────────────────────── */

.macro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-5);
  align-items: start;
}

/* ─── 17. Analysis section ──────────────────────────────────── */

.analysis-layout {
  display: grid;
  gap: var(--space-5);
}

/* Education block — el padding lo gestiona el <summary> interno;
   solo se alinea el "chrome" (borde/radio/sombra) al resto de cards. */
details.edu-block {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

details.edu-block > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  cursor: pointer;
  list-style: none;
  transition: background var(--transition-base);
}

details.edu-block > summary::-webkit-details-marker { display: none; }

details.edu-block > summary:hover {
  background: rgba(255, 255, 255, 0.04);
}

details.edu-block[open] > summary {
  border-bottom: 1px solid var(--color-border);
}

.edu-summary-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.edu-body {
  padding: var(--space-6);
}

.edu-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  margin-top: var(--space-5);
}

.edu-col h4 {
  margin-bottom: var(--space-3);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-gold);
}

.edu-list {
  margin: 0;
  padding-left: var(--space-5);
  display: grid;
  gap: var(--space-3);
}

.edu-list li {
  color: var(--color-text-secondary);
  font-size: var(--text-base);
  line-height: 1.6;
}

.edu-list li strong {
  color: var(--color-text);
}

.edu-svg-point {
  font-size: 11px;
  fill: var(--color-text-secondary);
}

/* ─── 18. Videos ────────────────────────────────────────────── */

.video-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(260px, 0.8fr);
  gap: var(--space-5);
}

.video-feature {
  min-height: 400px;
}

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-8);
  text-align: center;
  color: var(--color-text-secondary);
}

.video-placeholder strong {
  color: var(--color-text);
  font-size: var(--text-h4);
  font-weight: 600;
}

.video-note {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

/* Video list items */
.video-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition:
    border-color var(--transition-base),
    background var(--transition-base),
    transform var(--transition-fast);
}

.video-item:hover,
.video-item.active {
  border-color: var(--color-border-gold);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.video-thumb-wrap {
  position: relative;
  flex-shrink: 0;
  width: 76px;
  height: 44px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.video-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gold-soft);
}

.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--color-text-on-dark-strong);
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.video-item:hover .video-play-icon,
.video-item.active .video-play-icon { opacity: 1; }

.video-thumb-placeholder .video-play-icon {
  opacity: 1;
  background: transparent;
  color: var(--color-gold);
}

.video-meta-wrap {
  min-width: 0;
  flex: 1;
}

.video-item-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--text-small);
  line-height: 1.4;
  color: var(--color-text);
}

.video-item-date {
  display: block;
  margin-top: var(--space-1);
  color: var(--color-text-secondary);
  font-size: var(--text-caption);
}

/* Skeleton loaders */
.video-skeleton { pointer-events: none; }

.skeleton-box,
.skeleton-line {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.10) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-xs);
}

.skeleton-line {
  height: 10px;
  margin-bottom: var(--space-2);
}

.skeleton-line.w80 { width: 80%; }
.skeleton-line.w50 { width: 50%; }

@keyframes shimmer {
  to { background-position: -200% 0; }
}

/* ─── 19. X / Twitter ───────────────────────────────────────── */

.x-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(260px, 0.8fr);
  gap: var(--space-5);
}

.x-feed-frame {
  min-height: 600px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.x-stats-row {
  display: flex;
  gap: var(--space-5);
  margin: var(--space-4) 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
}

.x-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.x-stat-value {
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-text);
}

.x-stat-label {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.x-follow-btn-wrap { margin-bottom: var(--space-4); }

.x-follow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 42px;
  padding: 0 var(--space-5);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text);
  font-weight: 700;
  font-size: var(--text-base);
  cursor: pointer;
  transition: all var(--transition-base);
  width: 100%;
}

.x-follow-btn:hover {
  border-color: var(--color-border-gold);
  background: var(--color-gold-soft);
  transform: translateY(-1px);
}

.x-follow-btn--following {
  border-color: rgba(52, 201, 122, 0.35);
  background: var(--color-green-soft);
  color: var(--color-green);
}

.x-follow-btn--following:hover {
  border-color: rgba(240, 90, 90, 0.35);
  background: var(--color-red-soft);
  color: var(--color-red);
}

.x-follow-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.x-follow-check {
  margin-left: auto;
  font-size: var(--text-small);
}

.x-view-profile {
  display: block;
  margin-top: var(--space-2);
  text-align: center;
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  transition: color var(--transition-fast);
}

.x-view-profile:hover { color: var(--color-gold); }

.x-feed-embed {
  margin-top: var(--space-4);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 120px;
}

.x-feed-fallback {
  margin-top: var(--space-3);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
  text-align: center;
}

.x-feed-fallback p {
  margin: 0 0 var(--space-3);
  color: var(--color-text-secondary);
  font-size: var(--text-base);
}

.x-follow-text {
  color: var(--color-text-secondary);
  font-size: var(--text-base);
  line-height: 1.65;
  margin-bottom: 0;
}

/* ─── 20. Contact & Legal ───────────────────────────────────── */

.contact {
  padding: var(--space-14) 0;
}

.contact-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  padding: var(--space-12) var(--space-10);
}

.contact-card h2 {
  margin-top: var(--space-2);
  margin-bottom: var(--space-4);
}

.contact-card p {
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.contact-form {
  display: grid;
  gap: var(--space-4);
}

.contact-form label {
  display: grid;
  gap: var(--space-2);
}

.contact-form label span {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}

.contact-form input {
  min-height: 44px;
}

.form-status {
  font-size: var(--text-small);
  min-height: 20px;
  margin: 0;
}

/* Legal note */
.legal-note {
  padding: var(--space-12) 0;
  border-top: 1px solid var(--color-border);
}

.legal-note h2 {
  font-size: var(--text-h4);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
  letter-spacing: 0;
}

.legal-note p {
  max-width: 860px;
  color: var(--color-text-faint);
  font-size: var(--text-small);
  line-height: 1.75;
}

/* ─── 21. Footer ────────────────────────────────────────────── */

.site-footer {
  position: relative;
  border-top: 1px solid var(--color-border);
  background: rgba(6, 8, 14, 0.96);
  overflow: hidden;
}

.footer-glow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(210, 174, 88, 0.04), transparent 70%);
  pointer-events: none;
}

.footer-container {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--space-10);
  width: min(var(--max-width), calc(100% - var(--content-padding) * 2));
  margin: 0 auto;
  padding: var(--space-12) 0 var(--space-8);
}

.footer-brand-heading {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.footer-brand-heading h3 {
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.footer-brand p {
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  line-height: 1.70;
  max-width: 280px;
}

.footer-links h4,
.footer-contact h4 {
  font-size: var(--text-small);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.footer-links a,
.footer-contact p {
  display: block;
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  line-height: 1;
  margin-bottom: var(--space-3);
  transition: color var(--transition-fast);
}

.footer-links a:hover { color: var(--color-gold); }

.footer-bottom {
  width: min(var(--max-width), calc(100% - var(--content-padding) * 2));
  margin: 0 auto;
  padding: var(--space-5) 0;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-faint);
  font-size: var(--text-caption);
  letter-spacing: 0.03em;
  text-align: center;
}

/* ─── 22. Utilities ─────────────────────────────────────────── */

.positive { color: var(--color-green); }
.negative { color: var(--color-red); }
.neutral  { color: var(--color-text-secondary); }

/* Onyx eyebrow mark */
.eyebrow.onyx-mark::after {
  content: "";
  display: block;
  width: 28px;
  height: 1.5px;
  margin-top: var(--space-1);
  background: linear-gradient(90deg, var(--color-gold), transparent);
  border-radius: var(--radius-pill);
}

/* Exchange clock */
.exchange-clock-grid {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: var(--space-1);
}

/* Heatmap grid
   IMPORTANTE: el contenedor no es un grid de celdas individuales.
   renderHeatmapFull() (script.js) inyecta un .hm-sector-block completo
   por sector (cabecera + fila de acciones con flex-wrap interno), así
   que cada bloque debe ocupar el 100% del ancho disponible, apilados
   verticalmente — nunca repartidos en columnas de grid. */
.heatmap-full-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.hm-cell {
  position: relative;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.hm-cell:hover {
  transform: scale(1.03);
  filter: brightness(1.1);
}

.hm-cell-label {
  font-size: var(--text-caption);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.03em;
}

.hm-cell-val {
  font-size: var(--text-small);
  font-weight: 800;
  color: var(--color-text-on-dark-strong);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.hm-live-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--color-green);
  box-shadow: 0 0 8px rgba(52, 201, 122, 0.70);
  flex-shrink: 0;
}

.hm-loading-state {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5) 0;
  color: var(--color-text-secondary);
  font-size: var(--text-small);
}

.hm-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.hm-legend-bar {
  flex: 1;
  height: 3px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-red), rgba(255,255,255,0.12), var(--color-green));
}

.hm-legend-neg,
.hm-legend-pos {
  font-size: var(--text-caption);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hm-legend-neg { color: var(--color-red); }
.hm-legend-pos { color: var(--color-green); }

.hm-timestamp {
  margin-top: var(--space-2);
  font-size: var(--text-caption);
  color: var(--color-text-faint);
}

/* Tooltip heatmap */
.hm-tooltip {
  position: fixed;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border-gold);
  border-radius: var(--radius-md);
  background: var(--color-surface-strong);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  font-size: var(--text-small);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  max-width: 220px;
}

.hm-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── 23. Responsive ────────────────────────────────────────── */

@media (max-width: 1200px) {
  .dashboard-grid,
  .news-layout,
  .video-layout,
  .x-layout {
    grid-template-columns: 1fr;
  }

  .indicator-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-card {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    padding: var(--space-8) var(--space-8);
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 900px) {
  .hero.section-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: var(--space-12) 0 var(--space-8);
  }

  .hero-panel {
    display: none;
  }

  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .edu-columns {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .smart-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --content-padding: 16px;
    --header-height: 60px;
  }

  .site-header {
    grid-template-columns: auto 1fr auto;
    padding: 0 var(--space-4);
  }

  .site-nav {
    position: fixed;
    top: calc(var(--ticker-height) + var(--header-height));
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: var(--space-1);
    padding: var(--space-5) var(--space-4);
    background: rgba(7, 10, 16, 0.98);
    backdrop-filter: blur(24px);
    border-top: 1px solid var(--color-border);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
    z-index: 24;
    overflow-y: auto;
  }

  body.menu-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-link {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-body);
    border-radius: var(--radius-md);
  }

  .header-actions .button-ghost,
  .header-actions .button-primary {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .indicator-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .contact-card {
    padding: var(--space-6) var(--space-5);
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .terminal,
  .analysis,
  .news-section,
  .article-section,
  .video-section,
  .x-section,
  .contact,
  .smart-money,
  .dashboard-intel {
    padding: var(--space-10) 0;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }

  .hero.section-shell {
    padding: var(--space-8) 0;
  }

  .hero-intro {
    max-width: 100%;
    font-size: var(--text-body);
    line-height: 1.55;
  }

  .indicator-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .smart-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .button {
    justify-content: center;
  }

  .contact-card {
    padding: var(--space-5) var(--space-4);
  }
}

/* ─── 24. Accesibilidad ─────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .ticker-track {
    animation: none;
    overflow-x: auto;
    scrollbar-width: none;
  }
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Resto de selectores del JS dinámico — necesarios para compatibilidad */
.exchange-row        { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.exchange-pill       { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-pill); font-size: var(--text-caption); font-weight: 600; transition: all var(--transition-fast); }
.exchange-pill.open  { border-color: rgba(52, 201, 122, 0.30); background: var(--color-green-soft); color: var(--color-green); }
.exchange-pill.closed{ border-color: var(--color-border); background: transparent; color: var(--color-text-faint); }
.exchange-dot        { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.exchange-dot.open   { background: var(--color-green); box-shadow: 0 0 8px rgba(52, 201, 122, 0.65); }
.exchange-dot.closed { background: var(--color-text-faint); }

/* Nota: el bloque .smart-card / .smart-fund-name / .smart-badge
   se eliminó por ser CSS huérfano — ninguna de esas clases la
   genera script.js. El componente vivo de Smart Money es
   .investor-card (ver sección "Smart Money — investor cards"). */
.smart-holdings      { display: grid; gap: var(--space-2); }
.smart-holding-row   { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); background: rgba(255,255,255,0.025); }
.smart-sym           { font-size: var(--text-small); font-weight: 700; color: var(--color-text); letter-spacing: 0.03em; }
.smart-pct           { font-size: var(--text-caption); color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }

.consensus-row       { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); }
.consensus-row:last-child { border-bottom: none; }
.consensus-rank      { font-size: var(--text-small); font-weight: 800; color: var(--color-gold); min-width: 24px; }
.consensus-sym       { font-size: var(--text-base); font-weight: 700; flex: 1; }
.consensus-count     { font-size: var(--text-small); color: var(--color-text-secondary); }

.alert-row           { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); }
.alert-row:last-child{ border-bottom: none; }
.alert-icon          { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; flex-shrink: 0; margin-top: 2px; }
.alert-icon.buy      { background: var(--color-green-soft); color: var(--color-green); }
.alert-icon.sell     { background: var(--color-red-soft);   color: var(--color-red); }
.alert-text          { font-size: var(--text-small); line-height: 1.5; color: var(--color-text-secondary); }
.alert-text strong   { color: var(--color-text); }
.alert-date          { font-size: var(--text-caption); color: var(--color-text-faint); margin-top: 3px; }

/* Macro dashboard grid */
.macro-card-title    { font-size: var(--text-small); font-weight: 700; color: var(--color-gold); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: var(--space-3); }
.macro-value         { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.macro-change        { font-size: var(--text-small); font-weight: 600; font-variant-numeric: tabular-nums; margin-top: var(--space-1); }
.macro-label         { font-size: var(--text-caption); color: var(--color-text-secondary); margin-top: var(--space-1); }

/* Calendar events — ver definición completa (BEM) en la sección
   "Componentes: News & Calendar", junto a .cal-event__left/__body. */
.cal-day-tab         { padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: var(--text-small); font-weight: 600; color: var(--color-text-secondary); cursor: pointer; white-space: nowrap; transition: all var(--transition-fast); background: transparent; }
.cal-day-tab.active  { border-color: var(--color-border-gold); background: var(--color-gold-soft); color: var(--color-text); }
.cal-day-tab:hover   { color: var(--color-text); border-color: rgba(255,255,255,0.15); }

/* Analysis layout */
.analysis-header     { margin-bottom: var(--space-3); }
.asset-tabs          { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.asset-tab           { padding: var(--space-2) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: var(--text-small); font-weight: 600; color: var(--color-text-secondary); cursor: pointer; transition: all var(--transition-fast); background: transparent; }
.asset-tab.active,
.asset-tab:hover     { border-color: var(--color-border-gold); background: var(--color-gold-soft); color: var(--color-text); }
.analysis-panel      { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: var(--space-5); }

/* Video list panel */
.video-list-panel    { padding: var(--space-5); }
.video-list-panel h3 { margin-top: var(--space-2); margin-bottom: var(--space-4); font-size: var(--text-h4); font-weight: 600; }
.x-follow-panel      { padding: var(--space-5); }
.x-follow-panel h3   { margin-top: var(--space-2); margin-bottom: var(--space-4); font-size: var(--text-h4); font-weight: 600; }
.x-feed-panel        { min-height: 600px; }
.news-panel {
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  min-height: 400px;
}

.news-panel .news-list {
  flex: 1;
}

/* ─── Componentes generados por JS ──────────────────────────────
   Estos estilos cubren elementos que script.js inyecta en el DOM.
   Se mantienen aquí para no depender de estilos inline.
──────────────────────────────────────────────────────────────── */

/* ── News cards (renderNews) ──────────────────────────────── */
.news-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition:
    border-color var(--transition-base),
    background var(--transition-base),
    transform var(--transition-fast);
}

.news-card:hover,
.news-card.active {
  border-color: var(--color-border-gold);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.news-card--featured {
  border-color: var(--color-border-gold);
  background: var(--color-gold-soft);
}

.news-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.news-card__cat {
  font-size: var(--text-caption);
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.news-card__impact {
  font-size: var(--text-caption);
  font-weight: 700;
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
}

.news-card__impact.impact-high   { background: var(--color-red-soft);   color: var(--color-red); }
.news-card__impact.impact-medium { background: var(--color-amber-soft); color: var(--color-amber); }
.news-card__impact.impact-low    { background: rgba(255,255,255,0.06); color: var(--color-text-secondary); }

.news-card__title {
  display: block;
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.news-card__summary {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__arrow {
  display: block;
  margin-top: var(--space-2);
  color: var(--color-text-faint);
  font-size: var(--text-small);
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.news-card:hover .news-card__arrow {
  color: var(--color-gold);
  transform: translateX(3px);
}

/* ── Article view ──────────────────────────────────────────── */
.article-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}

.article-tags {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.article-date {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
}

.article-body p {
  color: var(--color-text-secondary);
  line-height: 1.75;
  margin-bottom: var(--space-4);
}

.editorial-note {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-small);
  color: var(--color-text-faint);
  font-style: italic;
  line-height: 1.6;
}

/* ── Smart Money (investor cards — JS generado) ───────────────
   Caja unificada en el selector base junto a .panel/.brief-card. */
.investor-card {
  transition: border-color var(--transition-base);
}

.investor-card:hover {
  border-color: var(--color-border-gold);
}

.investor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.investor-name {
  font-size: var(--text-body);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.stale-badge {
  display: inline-block;
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--color-amber);
  background: var(--color-amber-soft);
  padding: 1px var(--space-2);
  border-radius: var(--radius-pill);
}

.holding {
  margin-bottom: var(--space-3);
}

.holding-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-1);
  font-size: var(--text-small);
  color: var(--color-text-secondary);
}

.holding-label span:last-child {
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.holding-bar {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.holding-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-gold-dark), var(--color-gold));
  border-radius: var(--radius-pill);
  transition: width 0.5s ease;
}

.period-note {
  margin-top: var(--space-4);
  font-size: var(--text-caption);
  color: var(--color-text-faint);
}

.trend-up  { color: var(--color-green); margin-left: 3px; font-size: 0.7em; }
.trend-down{ color: var(--color-red);   margin-left: 3px; font-size: 0.7em; }
.trend-new { color: var(--color-gold);  margin-left: 3px; font-size: 0.65em; font-weight: 700; letter-spacing: 0.05em; }

.smart-alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-small);
  margin-bottom: var(--space-2);
}

.smart-alert-up   { background: var(--color-green-soft); color: var(--color-green); }
.smart-alert-down { background: var(--color-red-soft);   color: var(--color-red); }
.smart-alert-new  { background: var(--color-gold-soft);  color: var(--color-gold); }
.smart-alert-exit { background: rgba(255,255,255,0.05);  color: var(--color-text-secondary); }
.smart-empty { color: var(--color-text-secondary); font-size: var(--text-small); padding: var(--space-4) 0; }

/* ── Intel Dashboard cards (loadMacronyxDashboard) ───────────── */
.intel-header {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.intel-category {
  display: inline-block;
  font-size: var(--text-caption);
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 3px var(--space-3);
  border-radius: var(--radius-pill);
}

.intel-category.macro        { background: var(--color-blue-soft);  color: var(--color-blue); }
.intel-category.energy       { background: var(--color-amber-soft); color: var(--color-amber); }
.intel-category.geopolitics  { background: var(--color-red-soft);   color: var(--color-red); }
.intel-category.crypto       { background: var(--color-gold-soft);  color: var(--color-gold); }
.intel-category.smart-money  { background: var(--color-gold-soft);  color: var(--color-gold); }

.intel-live-dot {
  display: inline-flex;
  width: 7px;
  height: 7px;
  margin-left: var(--space-2);
  border-radius: 50%;
  background: var(--color-green);
  box-shadow: 0 0 8px rgba(52, 201, 122, 0.70);
  vertical-align: middle;
}

.intel-item {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.intel-item:last-child { border-bottom: none; }

.intel-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.45;
  margin: 0 0 var(--space-2);
}

.intel-summary {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin: 0 0 var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.intel-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.intel-date {
  font-size: var(--text-caption);
  color: var(--color-text-faint);
}

.intel-relevance {
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--color-gold);
}

/* Bloque de mercados dentro del dashboard intel — fila por símbolo */
.intel-market-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.intel-market-row:last-child { border-bottom: none; }

.intel-market-symbol {
  font-size: var(--text-small);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.03em;
  flex: 0 0 auto;
  min-width: 64px;
}

.intel-market-price {
  font-size: var(--text-base);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  flex: 1;
  text-align: right;
}

.intel-market-chg {
  font-size: var(--text-small);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
  min-width: 64px;
  text-align: right;
}

/* Loading state genérico */
.loading-news {
  padding: var(--space-8) var(--space-6);
  text-align: center;
  color: var(--color-text-secondary);
  font-size: var(--text-base);
}

/* Heatmap sector blocks */
.hm-sector-block {
  margin-bottom: var(--space-4);
}

.hm-sector-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.hm-sector-name {
  font-size: var(--text-caption);
  font-weight: 700;
  color: var(--color-text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hm-sector-chg {
  font-size: var(--text-small);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hm-stocks-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hm-stock-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-2) 6px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  overflow: hidden;
  transition: filter var(--transition-fast), transform var(--transition-fast);
  flex-grow: 1;
  min-width: 64px;
}

.hm-stock-tile:hover {
  filter: brightness(1.15);
  transform: scale(1.04);
  z-index: 2;
}

.hm-st-sym {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hm-st-chg {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--color-text-on-dark-strong);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

.hm-st-name {
  display: none;
}

/* Solo muestra el nombre completo en tiles lo bastante anchas */
.hm-stock-tile[data-wide="true"] .hm-st-name {
  display: block;
  font-size: 0.60rem;
  color: rgba(255, 255, 255, 0.60);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* Heatmap tooltip internals */
.hm-tt-sym {
  display: block;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.hm-tt-name {
  display: block;
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.hm-tt-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--text-small);
  padding: 3px 0;
  color: var(--color-text-secondary);
}

.hm-tt-row span:last-child {
  font-weight: 700;
  color: var(--color-text);
}

/* Calendar — estilos complementarios para el widget dinámico */
.cal-time-group {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.cal-time-label {
  font-size: var(--text-small);
  font-weight: 700;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
  white-space: nowrap;
}

.cal-events-col {
  display: grid;
  gap: var(--space-2);
}

.cal-event {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.025);
}

.cal-event--high   { border-left: 2px solid var(--color-red);   border-left-color: var(--color-red); }
.cal-event--medium { border-left: 2px solid var(--color-amber); border-left-color: var(--color-amber); }
.cal-event--low    { border-left: 2px solid var(--color-border); }

.cal-event__left {
  display: flex;
  align-items: center;
  padding-top: 3px;
  flex-shrink: 0;
}

.cal-impact-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-impact-dot.cal-impact--high   { background: var(--color-red); }
.cal-impact-dot.cal-impact--medium { background: var(--color-amber); }
.cal-impact-dot.cal-impact--low    { background: var(--color-text-secondary); }

.cal-event__body {
  flex: 1;
  min-width: 0;
}

.cal-event__top {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.cal-event__name {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.35;
}

.cal-country {
  font-size: var(--text-caption);
  color: var(--color-text-faint);
  padding: 1px 5px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  white-space: nowrap;
}

.cal-event__vals {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
  flex-wrap: wrap;
}

.cal-val {
  font-size: var(--text-caption);
  font-variant-numeric: tabular-nums;
}

.cal-val--actual   { color: var(--color-text);          font-weight: 700; }
.cal-val--forecast { color: var(--color-text-secondary); }
.cal-val--prev     { color: var(--color-text-faint); }

.cal-day-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  min-width: 50px;
  position: relative;
}

.cal-day-btn:hover,
.cal-day-btn.active {
  border-color: var(--color-border-gold);
  background: var(--color-gold-soft);
  color: var(--color-text);
}

.cal-day-btn.today {
  font-weight: 700;
}

.cal-day-name {
  font-size: var(--text-caption);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cal-day-num {
  font-size: var(--text-base);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cal-day-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-red);
  position: absolute;
  top: 4px;
  right: 4px;
}

.cal-empty {
  padding: var(--space-6) 0;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: var(--text-small);
}