/* ==========================================================================
   Tu Futuro Finanzas — 2026 Design System
   Bold editorial · Red / Yellow / Navy · Playfair + Inter
   ========================================================================== */

:root {
  --red: #D52B1E;
  --red-dark: #B81D12;
  --red-soft: #FFE3E0;
  --red-wash: #FFF5EE;
  --yellow: #F5C518;
  --yellow-soft: #FFE27A;
  --yellow-wash: #FFF9E3;
  --navy: #0E1B2E;
  --navy-2: #15263F;
  --navy-3: #1F3A68;
  --orange: #E8862E;
  --orange-dark: #D86A1C;
  --green-wa: #25D366;
  --green-wa-dark: #1DA851;
  --ink: #1A1A1A;
  --text: #2B2F39;
  --muted: #5A6372;
  --bg: #FAFAF7;
  --card: #FFFFFF;
  --line: #E7E6E1;
  --line-soft: #F0EFEA;

  --serif: 'Playfair Display', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --r-xl: 20px;
  --shadow-sm: 0 2px 6px rgba(14,27,46,.06);
  --shadow: 0 16px 32px rgba(14,27,46,.08);
  --shadow-lg: 0 30px 60px rgba(14,27,46,.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Baseline document sizing — page height is content-driven, vertical scroll
   always available, horizontal scroll always suppressed. Prevents any
   ancestor from becoming a fixed-height viewport trap. */
html {
  scroll-behavior: smooth;
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  min-height: 100vh;
  height: auto;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; transition: color .2s; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 800;
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.25rem; font-family: var(--sans); font-weight: 700; letter-spacing: 0; }
h4 { font-size: 1rem; font-family: var(--sans); font-weight: 700; letter-spacing: 0; }
p { color: var(--text); }

.container { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 28px; }

/* ============== Site Header ============== */
.site-header {
  background: #D61F28;
  border-bottom: 4px solid #FFD669;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 14px;
  flex-wrap: nowrap;
}
.logo {
  display: flex;
  align-items: center;
  font-family: Impact, "Arial Black", "Haettenschweiler", "Franklin Gothic Heavy", "Oswald", Inter, sans-serif;
  font-weight: 900;
  font-size: 1.85rem;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
}
/* Real logo image — auto-swapped in by assets/i18n.js if assets/logo.png exists */
.logo .brand-img {
  display: block;
  height: 44px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  flex-shrink: 0;
}
.footer-logo .brand-img {
  display: block;
  height: 50px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
}
/* ---- New FUTURO letter system ---- */
.logo .l-grad {
  background: linear-gradient(180deg, #F5C518 0%, #E8862E 55%, #D52B1E 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.logo .l-red { color: var(--red); }
.logo .l-arrow {
  color: var(--red);
  position: relative;
  padding: 0 2px;
}
.logo .l-arrow::before {
  content: "";
  position: absolute;
  left: 50%; top: -16px;
  width: 5px; height: 18px;
  background: var(--red);
  transform: translateX(-50%);
  border-radius: 1px;
}
.logo .l-arrow::after {
  content: "";
  position: absolute;
  left: 50%; top: -22px;
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 11px solid var(--red);
  transform: translateX(-50%);
}
/* ---- Legacy classes (kept for any lingering markup) ---- */
.logo .f1 { color: var(--yellow); }
.logo .u {
  color: var(--red);
  position: relative;
  padding: 0 2px;
}
.logo .u::before {
  content: "";
  position: absolute;
  left: 50%; top: -14px;
  width: 3px; height: 12px;
  background: var(--red);
  transform: translateX(-50%);
}
.logo .u::after {
  content: "";
  position: absolute;
  left: 50%; top: -16px;
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 7px solid var(--red);
  transform: translateX(-50%);
}
.logo .rest { color: var(--ink); }
.logo small {
  font-family: var(--sans);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: 3px;
  margin-left: 10px;
  color: var(--muted);
  text-transform: uppercase;
  align-self: flex-end;
  padding-bottom: 3px;
}

nav.primary {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
nav.primary > .item {
  position: relative;
  padding: 8px 12px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--navy);
  cursor: pointer;
  border-radius: 6px;
  transition: background .18s;
  white-space: nowrap;
}
nav.primary > .item:hover { background: var(--red-wash); color: var(--red); }
nav.primary > .item.active { background: var(--red-wash); color: var(--red); }

nav.primary .dropdown {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  min-width: 280px;
  box-shadow: 0 16px 40px rgba(14,27,46,.12);
  z-index: 10;
}
nav.primary .item:hover .dropdown { display: block; }
nav.primary .dropdown a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: .88rem;
  color: var(--ink);
  font-weight: 500;
}
nav.primary .dropdown a:hover { background: var(--red-wash); color: var(--red); }
nav.primary .dropdown .label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 6px 10px;
}

.lang-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: .8rem;
  font-weight: 700;
}
.lang-toggle button {
  padding: 6px 12px;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-family: inherit;
  font-weight: 700;
}
.lang-toggle button.active { background: var(--navy); color: #fff; }

.cta-pill {
  background: var(--red);
  color: #fff;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .82rem;
  transition: background .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.cta-pill:hover { background: var(--red-dark); color: #fff; }

.header-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

/* Tighten sponsor badge inside the compact one-line header */
.site-header .sponsor-badge { padding-right: 10px; margin-right: 2px; }
.site-header .sponsor-badge .sb-text { font-size: .6rem; letter-spacing: 1.4px; }
.site-header .sponsor-badge .sb-logo { height: 16px; }

/* Compact toggle */
.site-header .lang-toggle button { padding: 5px 10px; font-size: .78rem; }

/* Progressive collapse — hide sponsor text, then sponsor entirely, then nav */
@media (max-width: 1180px) {
  .site-header .sponsor-badge .sb-text { display: none; }
  .site-header .sponsor-badge { border-right: 0; padding-right: 0; margin-right: 0; }
}
@media (max-width: 1080px) {
  nav.primary > .item { padding: 8px 8px; font-size: .85rem; }
  .site-header .container { gap: 10px; }
}

/* Sponsor badge in the red header (e.g., Wells Fargo) */
.sponsor-badge {
  display: flex; align-items: center; gap: 10px;
  padding-right: 14px;
  border-right: 1px solid rgba(255,255,255,.28);
  margin-right: 4px;
  line-height: 1;
}
.sponsor-badge .sb-text {
  font-size: .66rem; letter-spacing: 1.6px;
  text-transform: uppercase; color: rgba(255,255,255,.92);
  font-weight: 700; white-space: nowrap;
  font-family: var(--sans);
}
.sponsor-badge .sb-logo {
  height: 18px; width: auto; display: block;
}
@media (max-width: 880px) {
  .sponsor-badge .sb-text { display: none; }
  .sponsor-badge { border-right: 0; padding-right: 0; margin-right: 0; }
  .sponsor-badge .sb-logo { height: 16px; }
}

/* ============== Red header color overrides ==============
   All child elements of .site-header are recolored for contrast
   against the red (#D61F28) background. */
.site-header .logo .l-grad {
  background: none;
  -webkit-background-clip: initial;
          background-clip: initial;
  color: #FFD669;
  -webkit-text-fill-color: #FFD669;
}
.site-header .logo .l-red   { color: #fff; }
.site-header .logo .l-arrow { color: #fff; }
.site-header .logo .l-arrow::before { background: #fff; }
.site-header .logo .l-arrow::after  { border-bottom-color: #fff; }
.site-header .logo small { color: rgba(255,255,255,.88); }

.site-header nav.primary > .item { color: #fff; }
.site-header nav.primary > .item:hover,
.site-header nav.primary > .item.active {
  background: rgba(255,255,255,.16);
  color: #FFD669;
}
.site-header nav.primary .dropdown { background: #fff; color: var(--ink); }
.site-header nav.primary .dropdown a       { color: var(--ink); }
.site-header nav.primary .dropdown a:hover { background: var(--red-wash); color: var(--red); }

.site-header .lang-toggle { border-color: rgba(255,255,255,.45); }
.site-header .lang-toggle button { color: #fff; }
.site-header .lang-toggle button.active { background: #fff; color: #D61F28; }

.site-header .cta-pill { background: #fff; color: #D61F28; }
.site-header .cta-pill:hover { background: #FFD669; color: #B81D12; }

@media (max-width: 980px) {
  nav.primary { display: none; }
  /* Show the hamburger only when primary nav is collapsed */
  .nav-toggle { display: inline-flex !important; }
}

/* ============== Mobile nav (hamburger + drawer) ==============
 * Injected site-wide by assets/tracking.js. The button lives inside
 * .header-actions so it inherits header contrast automatically.
 */
.nav-toggle {
  display: none;               /* hidden on desktop; shown via 980px MQ */
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.45);
  background: transparent;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease;
  order: 99;                    /* push to the right end of header-actions */
}
.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(255,255,255,.15);
  outline: none;
}
.nav-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(255,255,255,.4);
}
.nav-toggle svg { width: 22px; height: 22px; display: block; }

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;                 /* above sticky header (which is 50) */
  visibility: hidden;
  opacity: 0;
  transition: opacity .2s ease, visibility 0s linear .2s;
}
.mobile-drawer[data-open="true"] {
  visibility: visible;
  opacity: 1;
  transition: opacity .2s ease, visibility 0s linear 0s;
}
.mobile-drawer .md-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.55);
}
.mobile-drawer .md-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(88vw, 340px);
  background: #fff;
  padding: 20px 22px calc(env(safe-area-inset-bottom, 0px) + 24px);
  box-shadow: -20px 0 40px rgba(0,0,0,.2);
  transform: translateX(100%);
  transition: transform .25s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mobile-drawer[data-open="true"] .md-panel { transform: translateX(0); }
.mobile-drawer .md-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--line, #E5E7EB);
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink, #111827);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mobile-drawer .md-close:hover,
.mobile-drawer .md-close:focus-visible {
  background: #f5f5f5;
  outline: none;
}
.mobile-drawer .md-close svg { width: 20px; height: 20px; }
.mobile-drawer .md-brand {
  font-size: .7rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #64748b;
  margin: 2px 0 14px;
  font-weight: 700;
}
.mobile-drawer .md-link {
  display: block;
  padding: 14px 12px;
  font-size: 1.06rem;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid transparent;
}
.mobile-drawer .md-link:hover,
.mobile-drawer .md-link:focus-visible {
  background: var(--red-wash, #FEF2F2);
  color: #D61F28;
  outline: none;
}
.mobile-drawer .md-divider {
  height: 1px;
  background: #E5E7EB;
  margin: 12px 0;
}
.mobile-drawer .md-cta {
  display: block;
  margin-top: 6px;
  padding: 14px 18px;
  border-radius: 999px;
  background: #D61F28;
  color: #fff;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}
.mobile-drawer .md-cta:hover { background: #B81D12; }

/* Prevent body scroll when drawer is open */
body.no-scroll { overflow: hidden; }

/* Mobile-first header rules — allow wrapping and hide non-essentials at narrow widths */
@media (max-width: 720px) {
  .site-header .container {
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
  }
  .logo .brand-img { height: 38px; max-width: 170px; }
  .site-header .header-actions { gap: 8px; }
  .site-header .cta-pill { padding: 7px 12px; font-size: .78rem; }
  .site-header .lang-toggle button { padding: 4px 8px; font-size: .74rem; }
}
@media (max-width: 560px) {
  /* Hide the sponsor badge entirely on the smallest phones; keep it in
     the footer instead where it renders larger and clearer. */
  .site-header .sponsor-badge { display: none; }
  .logo .brand-img { height: 34px; max-width: 150px; }
}

/* ============== Buttons ============== */
.btn-primary {
  background: var(--red);
  color: #fff;
  font-weight: 700;
  padding: 14px 22px;
  border-radius: 8px;
  font-size: .95rem;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--red-dark); color: #fff; transform: translateY(-1px); }

.btn-secondary {
  background: #fff;
  color: var(--navy);
  border: 2px solid var(--navy);
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: .95rem;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.btn-secondary:hover { background: var(--navy); color: #fff; }

.wa-btn {
  background: var(--green-wa);
  color: #fff;
  font-weight: 700;
  padding: 14px 22px;
  border-radius: 8px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: .95rem;
  cursor: pointer;
  border: 0;
  font-family: inherit;
}
.wa-btn:hover { background: var(--green-wa-dark); color: #fff; }

.call-btn {
  background: #fff;
  color: var(--red);
  font-weight: 700;
  padding: 14px 22px;
  border-radius: 8px;
  font-size: .95rem;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}
.call-btn:hover { background: var(--navy); color: #fff; }

/* ============== Hero ============== */
.hero {
  position: relative;
  background: linear-gradient(135deg, #fff 50%, var(--red-wash) 100%);
  padding: 60px 0 40px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px; top: 40px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, var(--yellow) 0%, transparent 70%);
  opacity: .35;
  z-index: 0;
}
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 50px;
  align-items: center;
}
@media (max-width: 980px) { .hero .container { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: .5px;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
}

.hero h1 { margin-bottom: 18px; }
.hero h1 .hl {
  background: linear-gradient(180deg, transparent 60%, var(--yellow-soft) 60%);
  padding: 0 4px;
}
.hero p.lede {
  font-size: 1.08rem;
  color: #3A4153;
  margin-bottom: 24px;
  max-width: 560px;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 8px;
}
.hero-stat .num {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--red);
}
.hero-stat .lbl {
  font-size: .75rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ============== Hero Navy Visual Panel ============== */
.hero-visual {
  position: relative;
  background: var(--navy);
  border-radius: 20px;
  padding: 28px;
  color: #fff;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--yellow);
}
.hero-visual h4 {
  color: var(--yellow);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-family: var(--sans);
}
.seg-select {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  gap: 14px;
  align-items: center;
  transition: all .2s;
}
.seg-select:hover {
  background: var(--red);
  border-color: var(--red);
  transform: translateX(4px);
}
.seg-select:hover .seg-icon { background: var(--yellow); color: var(--navy); }
.seg-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
  font-family: var(--serif);
  font-size: .95rem;
}
.seg-label { font-weight: 700; font-size: .95rem; }
.seg-desc { font-size: .78rem; opacity: .75; }

/* ============== Sections ============== */
section.block {
  padding: 70px 0;
  border-top: 1px solid var(--line);
}
section.block-white { background: #fff; }
section.block-navy { background: var(--navy); color: #fff; }
section.block-navy h2, section.block-navy h3, section.block-navy h4 { color: #fff; }
section.block-navy p { color: rgba(255,255,255,.85); }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 44px;
}
.section-head.left { text-align: left; margin-left: 0; }
.section-head .tag {
  display: inline-block;
  color: var(--red);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 1.04rem; }
section.block-navy .section-head .tag { color: var(--yellow); }

/* ============== Segment Cards ============== */
.segments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 980px) { .segments { grid-template-columns: 1fr; } }
.seg-card {
  background: var(--card);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .25s, box-shadow .25s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  color: var(--ink);
}
.seg-card:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(14,27,46,.12); color: var(--ink); }
.seg-card .head {
  padding: 24px;
  color: #fff;
  position: relative;
}
.seg-card .head h3 {
  color: #fff;
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-bottom: 6px;
  font-weight: 800;
}
.seg-card .head .mkt {
  font-size: .72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: .9;
  font-weight: 700;
}
.seg-card.f1 .head { background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%); }
.seg-card.f2 .head { background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%); }
.seg-card.f3 .head { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%); }
.seg-card .body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.seg-card .kpi {
  background: var(--red-wash);
  border-left: 3px solid var(--red);
  padding: 10px 14px;
  border-radius: 6px;
}
.seg-card .kpi b {
  color: var(--red);
  font-family: var(--serif);
  font-size: 1.15rem;
  display: block;
  line-height: 1;
  font-weight: 800;
}
.seg-card .kpi span { font-size: .78rem; color: var(--muted); }
.seg-card ul { list-style: none; }
.seg-card ul li {
  padding: 6px 0 6px 22px;
  position: relative;
  font-size: .9rem;
  color: #333;
}
.seg-card ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 800;
}
.seg-card .foot {
  margin-top: auto;
  padding: 18px 22px;
  background: #FAFAF7;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.seg-card .foot a { color: var(--red); font-weight: 700; font-size: .88rem; }

/* ============== Channels / Dark banner ============== */
.channels {
  background: var(--navy);
  color: #fff;
  border-radius: 20px;
  padding: 40px;
  position: relative;
  overflow: hidden;
}
.channels::before {
  content: "";
  position: absolute;
  top: -100px; right: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(245,197,24,.25), transparent 70%);
}
.channels h3 {
  color: #fff;
  font-size: 1.6rem;
  margin-bottom: 8px;
  font-family: var(--serif);
  font-weight: 800;
}
.channels .sub {
  color: var(--yellow);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  margin-bottom: 8px;
}
.chan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  position: relative;
  z-index: 1;
  margin-top: 22px;
}
@media (max-width: 980px) { .chan-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .chan-grid { grid-template-columns: 1fr; } }
.chan {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: all .2s;
}
.chan:hover { background: var(--red); border-color: var(--red); transform: translateY(-3px); }
.chan h4 {
  color: var(--yellow);
  font-size: .78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 800;
  font-family: var(--sans);
}
.chan:hover h4 { color: #fff; }
.chan p { color: #fff; opacity: .85; font-size: .85rem; margin-bottom: 10px; }
.chan .more { color: var(--yellow); font-size: .78rem; font-weight: 700; }
.chan:hover .more { color: #fff; }

/* ============== Two-column panels ============== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 980px) { .two-col { grid-template-columns: 1fr; } }

.panel {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--line);
}
.panel .panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.panel .panel-head h3 {
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--navy);
  font-weight: 800;
}
.panel .panel-head a { color: var(--red); font-weight: 700; font-size: .85rem; }

.tool-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 560px) { .tool-row { grid-template-columns: 1fr; } }
.tool {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  transition: all .2s;
  cursor: pointer;
  color: var(--ink);
}
.tool:hover { border-color: var(--red); background: var(--red-wash); }
.tool .ico {
  width: 36px; height: 36px;
  background: var(--yellow);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  color: var(--navy);
  font-family: var(--serif);
}
.tool .nm { font-weight: 700; font-size: .88rem; color: var(--navy); }
.tool .dc { font-size: .74rem; color: var(--muted); }

.learn-list { display: flex; flex-direction: column; gap: 14px; }
.learn {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: 10px;
  background: #FAFAF7;
  border: 1px solid var(--line);
  transition: all .2s;
  cursor: pointer;
  color: var(--ink);
}
.learn:hover { background: #fff; border-color: var(--red); }
.learn .fmt {
  font-size: .68rem;
  font-weight: 800;
  color: #fff;
  background: var(--red);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
  align-self: flex-start;
  display: inline-block;
}
.learn.podcast .fmt { background: var(--navy); }
.learn.video .fmt { background: var(--orange); }
.learn.guide .fmt { background: var(--yellow); color: var(--navy); }
.learn h4 {
  font-size: .95rem;
  font-family: var(--sans);
  font-weight: 700;
  margin: 4px 0 3px;
  color: var(--navy);
}
.learn p { font-size: .8rem; color: var(--muted); }

/* ============== Coaching banner ============== */
.coaching {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
  border-radius: 20px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 30px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.coaching::before {
  content: "";
  position: absolute;
  right: -80px; bottom: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(245,197,24,.35), transparent 65%);
}
@media (max-width: 980px) { .coaching { grid-template-columns: 1fr; } }
.coaching h2 { color: #fff; margin-bottom: 14px; position: relative; z-index: 1; }
.coaching p {
  color: rgba(255,255,255,.92);
  font-size: 1.02rem;
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
}
.coaching-ctas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.advisor-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.advisor {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  backdrop-filter: blur(6px);
}
.advisor .ic { font-size: 1.5rem; margin-bottom: 4px; }
.advisor .nm { font-size: .72rem; font-weight: 700; letter-spacing: .5px; }

/* ============== Events ============== */
.events {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 980px) { .events { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .events { grid-template-columns: 1fr; } }
.ev {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  display: flex;
  gap: 18px;
  transition: all .2s;
  cursor: pointer;
  color: var(--ink);
}
.ev:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(14,27,46,.08);
  border-color: var(--red);
}
.ev .date {
  background: var(--navy);
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  min-width: 60px;
  flex-shrink: 0;
}
.ev .date .m {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--yellow);
  font-weight: 700;
}
.ev .date .d {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--serif);
}
.ev .evtag {
  font-size: .65rem;
  color: var(--red);
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.ev h4 {
  font-size: .95rem;
  font-family: var(--sans);
  font-weight: 700;
  margin: 4px 0;
  color: var(--navy);
}
.ev p { font-size: .78rem; color: var(--muted); }

/* ============== Footer ============== */
footer.site {
  background: #D61F28;
  border-top: 4px solid #FFD669;
  color: #fff;
  padding: 50px 0 28px;
  margin-top: 40px;
}
/* Footer logo letter colors on red background */
footer.site .footer-logo .l-grad {
  background: none;
  -webkit-background-clip: initial;
          background-clip: initial;
  color: #FFD669;
  -webkit-text-fill-color: #FFD669;
}
footer.site .footer-logo .l-red   { color: #fff; }
footer.site .footer-logo .l-arrow { color: #fff; }
footer.site .footer-logo .l-arrow::before { background: #fff; }
footer.site .footer-logo .l-arrow::after  { border-bottom-color: #fff; }
footer.site .grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}
@media (max-width: 980px) { footer.site .grid { grid-template-columns: 1fr 1fr; } }
footer.site h5 {
  color: var(--yellow);
  font-size: .78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 800;
  font-family: var(--sans);
}
footer.site a {
  display: block;
  color: rgba(255,255,255,.75);
  font-size: .88rem;
  padding: 4px 0;
}
footer.site a:hover { color: var(--yellow); }
/* Copyright line: keep inline links (e.g. HISCEC) on the same line as the text */
footer.site .bottom a { display: inline; padding: 0; color: inherit; text-decoration: underline; }
footer.site .bottom a:hover { color: var(--yellow); }
footer.site .brand p {
  color: rgba(255,255,255,.75);
  font-size: .88rem;
  margin-top: 12px;
  max-width: 340px;
}
.footer-logo {
  display: flex;
  align-items: baseline;
  font-family: Impact, "Arial Black", "Haettenschweiler", "Franklin Gothic Heavy", "Oswald", Inter, sans-serif;
  font-weight: 900;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
  color: #fff;
}
/* New letter system for footer logo */
.footer-logo .l-grad {
  background: linear-gradient(180deg, #F5C518 0%, #E8862E 55%, #D52B1E 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.footer-logo .l-red { color: var(--red); }
.footer-logo .l-arrow {
  color: var(--red);
  position: relative;
  padding: 0 2px;
}
.footer-logo .l-arrow::before {
  content: "";
  position: absolute;
  left: 50%; top: -14px;
  width: 4px; height: 16px;
  background: var(--red);
  transform: translateX(-50%);
  border-radius: 1px;
}
.footer-logo .l-arrow::after {
  content: "";
  position: absolute;
  left: 50%; top: -19px;
  width: 0; height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 9px solid var(--red);
  transform: translateX(-50%);
}
/* Legacy fallback classes */
.footer-logo .f1 { color: var(--yellow); }
.footer-logo .u { color: var(--red); padding: 0 2px; }
.footer-logo .rest { color: #fff; }
.footer-logo small {
  font-family: var(--sans);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: 3px;
  margin-left: 10px;
  color: rgba(255,255,255,.75);
  text-transform: uppercase;
  align-self: flex-end;
  padding-bottom: 3px;
}
/* Footer "Sponsored by" badge — sits flat on red footer, no container.
   Stacked layout: label on its own line, then WF mark below.
   Constrained width so the wordmark never overflows into the next column. */
.footer-sponsor {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  max-width: 180px;
}
.footer-sponsor .fs-label {
  font-size: .68rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255,255,255,.92);
  font-family: var(--sans);
  white-space: nowrap;
  line-height: 1;
}
.footer-sponsor .fs-mark {
  height: 18px;
  width: auto;
  max-width: 100%;
  display: block;
}

.wf-bar {
  background: #fff;
  color: var(--navy);
  padding: 10px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: .78rem;
  font-weight: 700;
}
.wf-bar .wf {
  background: #D71E28;
  color: #fff;
  padding: 4px 8px;
  font-weight: 800;
  font-size: .72rem;
  border-radius: 3px;
  letter-spacing: .5px;
}
.bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .78rem;
  color: rgba(255,255,255,.6);
}

/* ============== Sub-hero (audience pages) ============== */
.sub-hero {
  padding: 48px 0 30px;
  border-top: 1px solid var(--line);
}
.sub-hero .crumbs {
  color: var(--muted);
  font-size: .82rem;
  margin-bottom: 10px;
}
.sub-hero .crumbs a { color: var(--red); font-weight: 600; }
.sub-hero .grid {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 980px) { .sub-hero .grid { grid-template-columns: 1fr; } }
.sub-hero h1 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  margin-bottom: 14px;
}
.mkt-tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.mkt1 { background: #FFEADB; color: var(--orange-dark); }
.mkt2 { background: var(--red-soft); color: var(--red); }
.mkt3 { background: #E1E8F5; color: var(--navy); }

/* ============== Pillars grid ============== */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 28px 0;
}
@media (max-width: 980px) { .pillars { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  background: #fff;
  border-radius: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  transition: all .25s;
}
.pillar:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pillar h4 { font-size: .98rem; font-family: var(--sans); margin-bottom: 8px; color: var(--navy); }
.pillar p { font-size: .88rem; color: var(--muted); margin-bottom: 10px; }
.pillar a { font-size: .82rem; color: var(--red); font-weight: 700; }
.pillar.yellow-top { border-top-color: var(--yellow); }
.pillar.navy-top { border-top-color: var(--navy); }
.pillar.orange-top { border-top-color: var(--orange); }

/* ============== Product bridge (WF) ============== */
.product-bridge {
  background: #F1F0EB;
  border-radius: 16px;
  padding: 30px;
  margin: 26px 0;
}
.product-bridge h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin-bottom: 4px;
  color: var(--navy);
  font-weight: 800;
}
.product-bridge .hint { font-size: .82rem; color: var(--muted); margin-bottom: 18px; }
.prods {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 980px) { .prods { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .prods { grid-template-columns: 1fr; } }
.prod {
  background: #fff;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.prod .wf-tag {
  background: #D71E28;
  color: #fff;
  padding: 2px 6px;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .5px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.prod .nm {
  font-size: .88rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.prod .dc { font-size: .76rem; color: var(--muted); }

/* ============== Chat demo ============== */
.chat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.chat-avatar {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  display: grid; place-items: center;
  color: #fff;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.chat-title { font-weight: 700; color: var(--navy); }
.chat-sub { font-size: .82rem; color: var(--muted); }
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--green-wa);
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 0 3px rgba(37,211,102,.18);
}
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
}
.msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: .92rem;
  line-height: 1.5;
}
.msg-ai {
  background: var(--red-wash);
  color: var(--ink);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.msg-user {
  background: var(--navy);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.msg-ai.typing { display: inline-flex; gap: 4px; align-self: flex-start; }
.msg-ai.typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted);
  animation: blink 1.2s infinite both;
}
.msg-ai.typing span:nth-child(2) { animation-delay: .2s; }
.msg-ai.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

.chat-input-row {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
}
.chat-input-row input {
  border: 0;
  background: transparent;
  flex: 1;
  font-family: inherit;
  font-size: .93rem;
  color: var(--ink);
  outline: none;
  padding: 10px 0;
}
.chat-send {
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: inherit;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
}
.chat-send:hover { background: var(--red-dark); }

.chat-suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.chat-chip {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--navy);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.chat-chip:hover { background: var(--red-wash); border-color: var(--red); color: var(--red); }

/* ============== Gates (Trust architecture) ============== */
.gates {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  counter-reset: gate;
}
@media (max-width: 980px) { .gates { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .gates { grid-template-columns: 1fr; } }
.gate {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--yellow);
  border-radius: 12px;
  padding: 24px;
  counter-increment: gate;
  position: relative;
}
.gate::before {
  content: counter(gate);
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}
.gate h4 { margin: 0 0 8px; font-size: 1rem; color: var(--navy); }
.gate p { color: var(--muted); font-size: .88rem; margin: 0; }

/* ============== Generic grids ============== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 980px) { .grid-3 { grid-template-columns: 1fr 1fr; } .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.stat-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
.stat-block .n {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-block p { font-size: .88rem; margin: 0; color: var(--muted); }
.stat-block p strong { color: var(--navy); font-weight: 700; }

/* ============== Language visibility fallback ============== */
html[lang="es"] [data-en]:not([data-es]) { display: none; }
html[lang="en"] [data-es]:not([data-en]) { display: none; }

/* ============== Responsive ============== */
@media (max-width: 560px) {
  .hero { padding: 40px 0 20px; }
  section.block { padding: 48px 0; }
}

/* ============== Utility ============== */
.hide-mobile { display: inline-flex; }
@media (max-width: 700px) { .hide-mobile { display: none; } }
.text-center { text-align: center; }
.mt-sm { margin-top: 10px; }
.mt { margin-top: 24px; }
.mt-lg { margin-top: 40px; }


/* ==========================================================================
   Accessibility (WCAG 2.2 AA — Step 1)
   Skip link, main landmark focus target, keyboard focus indicators.
   ========================================================================== */

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 10000;
  padding: 12px 18px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  transition: top 0.15s ease-in-out;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
  outline: 3px solid var(--yellow);
  outline-offset: 0;
  box-shadow: 0 0 0 6px var(--yellow), 0 4px 12px rgba(0,0,0,0.4);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  /* Compound focus ring for reliable contrast on both light and dark backgrounds.
     Yellow inner (10.6:1 on navy) + navy outer via box-shadow (11.27:1 on white)
     — same pattern used by GOV.UK. Verified against WCAG 2.2 SC 1.4.11 (3:1). */
  outline: 3px solid var(--yellow);
  outline-offset: 0;
  box-shadow: 0 0 0 6px var(--navy-3);
  border-radius: 2px;
}

@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;
  }
}


/* WCAG SC 2.4.11 — Focus Not Obscured (Minimum).
   Sticky/fixed header must not cover the focus target when arriving via anchor link
   or keyboard-scroll. Reserve safe zone at top of viewport for scroll snapping. */
html {
  scroll-padding-top: 90px;
}

/* Footer coming-soon placeholders (Podcast / Blog / Prensa until content lands).
   Rendered as inert text so screen readers do not announce them as links. */
.footer-placeholder {
  display: inline-block;
  opacity: 0.72;
  font-style: italic;
}


/* ==========================================================================
   TFF Responsive Table System — global mobile-first table treatment
   ==========================================================================
   Every <table> on the site gets the .tff-table class auto-added by the JS
   labeler in assets/tracking.js. That labeler also copies each column
   header's text into `data-label-es` and `data-label-en` on every <td>, so
   the CSS below can swap the label prefix by language automatically.

   Desktop (≥768px): traditional table look — clean, comfortable, zebra
   striped, rounded card container.

   Mobile (<768px):  rows transform into stacked cards where each cell shows
   its column header as a small red label above the value. Native table
   markup and accessibility are preserved (thead is visually hidden but
   still in the DOM for screen readers via aria-hidden=false + a11y clip).

   Opt-out:  pages that must keep native table layout can add
   `data-no-tff-table` on the <table> element or wrap in `.tff-no-cards`.

   Wide-table opt-in:  when horizontal scroll is the right answer, wrap the
   table in `<div class="tff-table-scroll">` — the wrapper provides smooth
   inertial scroll and a right-edge fade indicator.
   ========================================================================== */

/* --- Prevent any raw <table> from bursting out of its container --- */
main table, article table, section table {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* --- Desktop base styling (applies whenever the JS has added .tff-table) --- */
.tff-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(14,27,46,.06);
  font-size: .95rem;
  line-height: 1.55;
  margin: 12px 0;
}
.tff-table thead th {
  background: var(--navy);
  color: #fff;
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  border: 0;
}
.tff-table tbody td,
.tff-table tbody th {
  padding: 14px 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--text);
  vertical-align: top;
  text-align: left;
}
.tff-table tbody th {
  background: var(--bg);
  font-weight: 700;
  color: var(--navy);
}
.tff-table tbody tr:nth-child(even) td,
.tff-table tbody tr:nth-child(even) th {
  background: rgba(14,27,46,.02);
}
.tff-table tbody tr:nth-child(even) th {
  background: rgba(14,27,46,.04);
}
/* Preserve visually-marked total/emphasis rows if authors used a class */
.tff-table tbody tr.total td,
.tff-table tbody tr.total th,
.tff-table tbody td.total,
.tff-table tbody th.total,
.tff-table tbody td.kc-total,
.tff-table tbody th.kc-total {
  background: var(--yellow-wash) !important;
  font-weight: 800;
}

/* --- Horizontal-scroll wrapper (opt-in for very wide tables) --- */
.tff-table-scroll {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  margin: 12px 0;
  /* right-edge fade indicator that hints "there's more →" */
  mask-image: linear-gradient(to right, black 0, black calc(100% - 32px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 0, black calc(100% - 32px), transparent 100%);
}
.tff-table-scroll::after {
  content: '';
  position: sticky; right: 0; top: 0;
  display: block; width: 32px; height: 100%;
  pointer-events: none;
  background: linear-gradient(to right, transparent, rgba(255,255,255,.9));
}
.tff-table-scroll .tff-table {
  min-width: 640px;
  margin: 0;
}

/* --- Mobile transform: rows become cards --- */
@media (max-width: 767px) {
  /* !important is used to defeat inline per-page styles on the ~546 legacy
     table pages so the transform works site-wide without per-file edits. */
  .tff-table {
    display: block !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    border: 0 !important;
    margin: 12px 0 !important;
  }
  /* Visually hide the <thead> but keep it in the DOM for screen readers */
  .tff-table thead {
    position: absolute !important;
    width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
  .tff-table tbody { display: block !important; }
  .tff-table tbody tr {
    display: block !important;
    background: #fff !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    padding: 4px 0 !important;
    box-shadow: 0 1px 3px rgba(14,27,46,.05) !important;
    overflow: hidden !important;
  }
  .tff-table tbody td,
  .tff-table tbody th {
    display: block !important;
    width: 100% !important;
    padding: 12px 16px !important;
    border-top: 1px solid var(--line-soft) !important;
    background: transparent !important;
    text-align: left !important;
    font-size: 1rem !important;
    color: var(--text) !important;
    box-sizing: border-box !important;
  }
  .tff-table tbody tr > *:first-child { border-top: 0 !important; }
  /* Column-header label prefix — bilingual, swaps via html[lang] */
  .tff-table tbody td::before,
  .tff-table tbody th::before {
    content: attr(data-label-es);
    display: block;
    font-family: var(--sans);
    font-weight: 800;
    font-size: .66rem;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 4px;
  }
  html[lang="en"] .tff-table tbody td::before,
  html[lang="en"] .tff-table tbody th::before {
    content: attr(data-label-en);
  }
  /* If a table has no bilingual attrs, fall back to plain data-label */
  .tff-table tbody td[data-label]:not([data-label-es])::before,
  .tff-table tbody th[data-label]:not([data-label-es])::before {
    content: attr(data-label) !important;
  }
  /* If the column has no header label at all, hide the empty prefix */
  .tff-table tbody td[data-label=""]::before,
  .tff-table tbody th[data-label=""]::before,
  .tff-table tbody td:not([data-label])::before,
  .tff-table tbody th:not([data-label])::before {
    display: none;
  }

  /* Opt-out: pages with data-no-tff-table keep native table layout */
  .tff-table[data-no-tff-table] {
    display: table !important;
    background: #fff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 6px rgba(14,27,46,.06) !important;
  }
  .tff-table[data-no-tff-table] thead {
    position: static !important; width: auto !important; height: auto !important;
    clip: auto !important; padding: initial !important; margin: 0 !important;
    overflow: visible !important; white-space: normal !important;
  }
  .tff-table[data-no-tff-table] thead th,
  .tff-table[data-no-tff-table] tbody tr,
  .tff-table[data-no-tff-table] tbody td,
  .tff-table[data-no-tff-table] tbody th {
    display: table-cell !important;
  }
  .tff-table[data-no-tff-table] tbody tr { display: table-row !important; }
  .tff-table[data-no-tff-table] tbody td::before,
  .tff-table[data-no-tff-table] tbody th::before { content: none !important; }

  /* Wide tables inside .tff-table-scroll: stay as native table, allow scroll */
  .tff-table-scroll .tff-table {
    display: table !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    min-width: 560px;
  }
  .tff-table-scroll .tff-table thead {
    position: static !important; width: auto !important; height: auto !important;
    clip: auto !important; padding: initial !important; margin: 0 !important;
    overflow: visible !important; white-space: normal !important;
  }
  .tff-table-scroll .tff-table thead th { display: table-cell !important; }
  .tff-table-scroll .tff-table tbody { display: table-row-group !important; }
  .tff-table-scroll .tff-table tbody tr {
    display: table-row !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  .tff-table-scroll .tff-table tbody td,
  .tff-table-scroll .tff-table tbody th {
    display: table-cell !important;
    padding: 10px 14px !important;
    border-top: 1px solid var(--line-soft) !important;
    background: transparent !important;
  }
  .tff-table-scroll .tff-table tbody td::before,
  .tff-table-scroll .tff-table tbody th::before { content: none !important; }
}

/* ==========================================================================
   Newsletter — Weekly Bilingual Money Brief banner
   ========================================================================== */
.mb-strip {
  background: var(--navy);
  color: #fff;
  padding: 34px 0;
  position: relative;
  overflow: hidden;
}
.mb-strip::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(600px 200px at 15% 50%, rgba(245,197,24,.08), transparent 70%),
              radial-gradient(500px 220px at 90% 50%, rgba(213,43,30,.10), transparent 70%);
  pointer-events: none;
}
.mb-strip .container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.mb-copy { flex: 1 1 480px; min-width: 300px; }
.mb-eyebrow {
  color: #F5C518;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}
.mb-headline {
  font-family: var(--serif, Georgia, serif);
  font-weight: 800;
  font-size: clamp(1.15rem, 1.9vw, 1.6rem);
  line-height: 1.28;
  color: #FFFFFF;
  margin: 0;
}
.mb-form {
  flex: 1 1 420px;
  min-width: 300px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.mb-form label {
  color: #E8ECF2;
  font-size: .82rem;
  font-weight: 600;
  margin-right: 4px;
  white-space: nowrap;
}
.mb-form .mb-input {
  flex: 1;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.15);
  background: #fff;
  color: #0E1B2E;
  font-size: .95rem;
  min-width: 200px;
  transition: box-shadow .15s, border-color .15s;
}
.mb-form .mb-input:focus {
  outline: none;
  border-color: #F5C518;
  box-shadow: 0 0 0 3px rgba(245,197,24,.35);
}
.mb-form .mb-input::placeholder { color: #7B8494; }
.mb-form .mb-submit {
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  font-size: .92rem;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, transform .15s;
}
.mb-form .mb-submit:hover:not(:disabled) { background: var(--red-dark); transform: translateY(-1px); }
.mb-form .mb-submit:focus-visible { outline: 3px solid #F5C518; outline-offset: 2px; }
.mb-form .mb-submit:disabled { opacity: .7; cursor: wait; }
.mb-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; }

[data-tff-subscribe-status] {
  flex-basis: 100%;
  padding: 8px 0 0;
  font-size: .85rem;
  color: #FFE4A8;
}
[data-tff-subscribe-status][data-tff-status="error"] { color: #FFB3AC; }

.tff-subscribe-success {
  padding: 20px 24px;
  background: rgba(245,197,24,.15);
  border-left: 3px solid #F5C518;
  border-radius: 8px;
  color: #FFFFFF;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.5;
}
.mb-strip .tff-subscribe-success {
  flex: 1 1 100%;
  margin-top: 4px;
}

@media (max-width: 720px) {
  .mb-strip { padding: 26px 0; }
  .mb-strip .container { gap: 20px; }
  .mb-form { flex-wrap: wrap; }
  .mb-form label { display: none; }
  .mb-form .mb-input { flex: 1 1 100%; }
  .mb-form .mb-submit { flex: 1 1 100%; }
}

/* Compact "Join the List" variant — replaces old Mailchimp forms on
   VUELA / benefits pages. Reuses .ab-mc-form / .ab-mc-submit selectors
   so existing container styling still applies. */
.ab-mc-form.tff-brevo-form { display: block; }
.ab-mc-form.tff-brevo-form .mc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ab-mc-form.tff-brevo-form .mc-field-group { display: block; margin-bottom: 14px; }
.ab-mc-form.tff-brevo-form label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.ab-mc-form.tff-brevo-form label .req { color: var(--red); margin-left: 3px; }
.ab-mc-form.tff-brevo-form input[type="text"],
.ab-mc-form.tff-brevo-form input[type="email"],
.ab-mc-form.tff-brevo-form input[type="tel"] {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--line, #E7E6E1);
  background: #fff;
  color: var(--navy);
  font-size: .95rem;
  font-family: inherit;
}
.ab-mc-form.tff-brevo-form input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(213,43,30,.15);
}
.ab-mc-form.tff-brevo-form .mc-legal {
  display: block;
  margin-top: 8px;
  font-size: .74rem;
  color: var(--muted, #5A6372);
  line-height: 1.5;
}
.ab-mc-form.tff-brevo-form .ab-mc-submit {
  width: 100%;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  border: none;
  cursor: pointer;
  font-size: .95rem;
  margin-top: 4px;
  transition: background .15s;
}
.ab-mc-form.tff-brevo-form .ab-mc-submit:hover:not(:disabled) { background: var(--red-dark); }
.ab-mc-form.tff-brevo-form .ab-mc-submit:disabled { opacity: .7; cursor: wait; }
@media (max-width: 560px) {
  .ab-mc-form.tff-brevo-form .mc-row { grid-template-columns: 1fr; }
}

/* =========================================================================
   Blog / Article image system  (unified — do not crop text-in-artwork)
   -------------------------------------------------------------------------
   All blog cover artwork is authored at 1200×800 (3:2) and contains
   embedded titles and text. To guarantee no cropping of that text on any
   surface (blog listing card, featured card, article hero) or breakpoint,
   we lock the container to a 3:2 aspect ratio and use `contain` sizing.
   Because the artwork is authored at 3:2, `contain` fills the container
   exactly — no letterbox, no crop.

   Classes:
     .tff-blog-cover          → blog listing card image container
     .tff-article-hero-image  → individual article page hero image
   ========================================================================= */
.tff-blog-cover,
.tff-article-hero-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  background-color: #0E1B2E;       /* brand navy — matches SVG bg edge */
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;         /* NEVER cover — protects embedded text */
  overflow: hidden;
  display: block;
  position: relative;
}
img.tff-blog-cover,
img.tff-article-hero-image,
.tff-blog-cover > img,
.tff-article-hero-image > img {
  width: 100%;
  height: 100%;
  object-fit: contain;              /* NEVER cover — protects embedded text */
  object-position: center center;
  display: block;
  background-color: #0E1B2E;
}
/* Card corners are a touch tighter than article hero */
.tff-blog-cover { border-radius: 12px; }
.tff-article-hero-image {
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(11,27,43,.16);
}

/* =========================================================================
   Knowledge Center — layout refresh (v2)
   -------------------------------------------------------------------------
   The original .kcp-layout used a 1fr / 260px grid but the TL;DR aside was
   the first grid child, which pushed the actual article into the narrow
   right column and left a big empty yellow box on the left. This override
   flattens the layout to a single centered content column (matching the
   blog article width the site already uses) and re-mounts the TOC as a
   subtle sticky rail that only appears on wide screens. Zero edits to
   individual KC files — the specificity ratchet below overrides inline CSS
   thanks to the "body" prefix.
   ========================================================================= */
body .kcp-main { padding: 24px 0 64px; }

body .kcp-main .kcp-layout {
  display: block;                 /* undo the broken 2-col grid */
  grid-template-columns: none;
  gap: 0;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

/* Compact TL;DR — smaller, tighter, doesn't dominate */
body .kcp-main .kcp-tldr {
  max-width: none;
  margin: 0 0 28px;
  padding: 16px 20px;
  border-radius: 10px;
}
body .kcp-main .kcp-tldr .tldr-label {
  font-size: .66rem; letter-spacing: 2px; margin-bottom: 6px;
}
body .kcp-main .kcp-tldr .tldr-headline {
  font-size: 1.02rem; line-height: 1.5; font-weight: 700; margin: 0 0 8px;
}
body .kcp-main .kcp-tldr .tldr-more {
  font-size: .78rem;
}

/* Article body — cleaner rhythm, matches blog article typography */
body .kcp-main .kcp-content { max-width: none; }
body .kcp-main .kcp-section { margin-bottom: 32px; scroll-margin-top: 90px; }
body .kcp-main .kcp-section h2 {
  font-size: 1.45rem;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--red, #D52B1E);
}
body .kcp-main .kcp-section h3 { font-size: 1.08rem; margin: 18px 0 8px; }
body .kcp-main .kcp-section p { font-size: .98rem; line-height: 1.7; }

/* TOC sidebar — hidden by default, floats as a sticky rail on wide screens */
body .kcp-main .kcp-sidebar { display: none; }

@media (min-width: 1200px) {
  body .kcp-main .kcp-layout {
    max-width: 1120px;
    padding-right: 260px;         /* room for the floating TOC */
  }
  body .kcp-main .kcp-sidebar {
    display: block;
    position: absolute;
    top: 0;
    right: 24px;
    width: 220px;
  }
  body .kcp-main .kcp-sidebar-inner {
    position: sticky;
    top: 88px;
    padding: 18px 20px;
    background: #FAFAF7;
    border: 1px solid var(--line, #E7E6E1);
    border-radius: 12px;
    font-family: var(--sans, 'Inter', sans-serif);
  }
  body .kcp-main .kcp-sidebar-inner h4 {
    font-size: .66rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted, #5A6372);
    font-weight: 800;
    margin: 0 0 12px;
  }
  body .kcp-main .kcp-sidebar-inner .kcp-toc {
    list-style: none; padding: 0; margin: 0;
  }
  body .kcp-main .kcp-sidebar-inner .kcp-toc li {
    margin: 0;
  }
  body .kcp-main .kcp-sidebar-inner .kcp-toc a {
    display: block;
    padding: 6px 0;
    font-size: .84rem;
    line-height: 1.35;
    color: var(--navy, #0E1B2E);
    text-decoration: none;
    font-weight: 500;
    border-left: 2px solid transparent;
    padding-left: 10px;
    margin-left: -10px;
    transition: color .15s, border-color .15s;
  }
  body .kcp-main .kcp-sidebar-inner .kcp-toc a:hover {
    color: var(--red, #D52B1E);
    border-left-color: var(--red, #D52B1E);
  }
}

/* Mobile tightening */
@media (max-width: 720px) {
  body .kcp-main .kcp-layout { padding: 0 18px; }
  body .kcp-main .kcp-section { margin-bottom: 28px; }
  body .kcp-main .kcp-section h2 { font-size: 1.3rem; }
  body .kcp-main .kcp-tldr { padding: 14px 16px; margin-bottom: 22px; }
  body .kcp-main .kcp-tldr .tldr-headline { font-size: .98rem; }
}

