/* ==========================================================================
   Fiestapréstamo Blog — static site stylesheet
   No framework, no build step. Organized in sections:
   1. Tokens  2. Reset/base  3. Accessibility utilities  4. Icons & placeholders
   5. Buttons/chips/badges  6. Header & nav  7. Layout/sections  8. Cards & grids
   9. Article prose  10. Forms  11. Footer  12. Modal  13. Responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --navy: #2B3F54;
  --navy-d: #22323F;
  --navy-dd: #1A2733;
  --turq: #5DD3BE;
  --turq-d: #3FBFA8;
  --turq-pale: #EAF9F5;
  --turq-ink: #12232E; /* text color on top of turquoise fills */

  --page: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #FAFBFC;
  --ink: #2B3F54;
  --ink-2: #5A6B7D;
  --ink-3: #8A99A8;
  --line: #E8ECF0;
  --line-2: #D4DBE3;

  --band: #2B3F54;
  --band-ink: #FFFFFF;
  --band-ink-soft: rgba(255, 255, 255, .72);
  --band-ink-softer: rgba(255, 255, 255, .6);
  --band-line: rgba(255, 255, 255, .12);

  --shadow: 0 4px 6px -1px rgba(0, 0, 0, .1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .12);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, .4);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --container: 1280px;
  --font-sans: "Montserrat", -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --dur-fast: 150ms;
  --dur-med: 200ms;
  --header-h: 66px;
}

:root[data-theme="dark"] {
  --page: #121C25;
  --surface: #1A2731;
  --surface-2: #16212B;
  --ink: #EDF3F7;
  --ink-2: #A9BAC8;
  --ink-3: #7E90A0;
  --line: #27343F;
  --line-2: #33424F;

  --band: #0D161E;
  --band-ink: #FFFFFF;
  --turq-pale: #16302B;

  --shadow: 0 4px 6px -1px rgba(0, 0, 0, .4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .5);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, .6);
}

/* 2. Reset / base ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
body { overflow-x: hidden; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }
a { color: var(--turq-d); text-decoration: none; }
a:hover { color: var(--turq); }
p { text-wrap: pretty; }
strong { font-weight: 700; }

:focus-visible {
  outline: 2px solid var(--turq-d);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 3. Accessibility utilities -------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 200;
  background: var(--turq);
  color: var(--turq-ink);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 12px; }

/* 4. Icons & image placeholders ---------------------------------------------- */
.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.img-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, var(--surface-2), var(--line));
  color: var(--ink-3);
}
.img-ph--circle { border-radius: var(--radius-full); }
.img-ph .icon { width: 28%; height: 28%; opacity: .55; }
.img-ph--avatar .icon { width: 42%; height: 42%; }

.ratio {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: var(--radius-md);
}
.ratio > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ratio--4-3 { aspect-ratio: 4 / 3; }
.ratio--16-9 { aspect-ratio: 16 / 9; }
.ratio--21-9 { aspect-ratio: 21 / 9; }
.ratio--rounded-lg { border-radius: var(--radius-lg); }

/* AI-origin badge on generated photos (EU AI Act art. 50). Dark plate always:
   it sits on the photo, not on the page background, so no dark-theme variant. */
.ratio__ai {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(18, 35, 46, .82);
  color: #FFF;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  overflow: hidden;
  flex: none;
}

/* 5. Buttons / chips / badges -------------------------------------------------- */
.btn {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  text-decoration: none;
  line-height: 1.2;
}
.btn--primary { background: var(--turq); color: var(--turq-ink); }
.btn--primary:hover { background: var(--turq-d); color: var(--turq-ink); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--turq); color: var(--turq-d); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-d); color: #fff; }
.btn--block { width: 100%; }
.btn--lg { font-size: 16px; padding: 16px; }

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-2);
  background: transparent;
  border-radius: var(--radius-full);
  color: var(--ink-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-fast) var(--ease);
  flex: none;
}
.icon-btn:hover { border-color: var(--turq); color: var(--turq-d); }
.icon-btn .icon { width: 18px; height: 18px; }

.eyebrow-tag {
  display: inline-flex;
  background: var(--turq);
  color: var(--turq-ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}
a.eyebrow-tag { cursor: pointer; }

.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--turq);
}
.eyebrow--muted { color: var(--ink-3); letter-spacing: .1em; }
.eyebrow--brand { color: var(--turq-d); }

.chip-group { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  border: 1px solid var(--line-2);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  background: transparent;
  transition: all var(--dur-fast) var(--ease);
  text-decoration: none;
  display: inline-flex;
}
.chip:hover { border-color: var(--turq); background: var(--turq-pale); color: var(--turq-d); }
.chip[aria-current="page"],
.chip[aria-pressed="true"] { border-color: var(--turq); background: var(--turq-pale); color: var(--turq-d); }

/* interest chips built from real checkboxes for accessibility */
.chip-check { position: relative; }
.chip-check input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.chip-check .chip { pointer-events: none; }
.chip-check input:checked + .chip {
  border-color: var(--turq);
  background: var(--turq-pale);
  color: var(--turq-d);
}
.chip-check input:focus-visible + .chip { outline: 2px solid var(--turq-d); outline-offset: 2px; }

/* 6. Header & nav -------------------------------------------------------------- */
.progress-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 60;
}
.progress-bar__fill {
  height: 100%;
  width: 0%;
  background: var(--turq);
  transition: width 80ms linear;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--page);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.brand__logo { height: 30px; width: auto; }
[data-logo="light"] { display: block; }
[data-logo="dark"] { display: none; }
:root[data-theme="dark"] [data-logo="light"] { display: none; }
:root[data-theme="dark"] [data-logo="dark"] { display: block; }
.brand__tag {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--turq-d);
}

.main-nav { display: flex; gap: 26px; margin-left: 8px; }
.main-nav__link {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: all var(--dur-fast) var(--ease);
  text-decoration: none;
}
.main-nav__link:hover,
.main-nav__link[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--turq);
}

.header-spacer { flex: 1; }
.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-2);
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle .icon { width: 20px; height: 20px; }

.theme-toggle .icon { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* 7. Layout / sections ---------------------------------------------------------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
main { display: block; }

.section { max-width: var(--container); margin: 0 auto; padding: 36px 24px 8px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.section-title { font-size: 32px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.section-link { font-size: 14px; font-weight: 700; color: var(--turq-d); white-space: nowrap; }

.band { background: var(--band); color: var(--band-ink); }
.band .eyebrow { color: var(--turq); }

/* Home hero */
.hero-section { max-width: var(--container); margin: 0 auto; padding: 56px 24px 24px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.hero-kicker__meta { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.hero-title { font-size: 56px; line-height: 1.08; font-weight: 800; letter-spacing: -.03em; margin: 0 0 20px; color: var(--ink); }
.hero-dek { font-size: 19px; line-height: 1.55; color: var(--ink-2); margin: 0 0 28px; max-width: 56ch; }
.hero-byline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.byline-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.byline-role { font-size: 13px; color: var(--ink-3); }
.hero-byline .btn { margin-left: 20px; }

/* Topics row */
.topics-section { max-width: var(--container); margin: 0 auto; padding: 8px 24px 20px; }
.topics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.topics-row .eyebrow--muted { padding: 9px 0; margin-right: 8px; }

/* Newsletter CTA band */
.cta-band { margin: 72px 0 0; }
.cta-band__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.cta-band__title { font-size: 40px; line-height: 1.14; font-weight: 800; letter-spacing: -.025em; margin: 0 0 14px; }
.cta-band__text { font-size: 17px; line-height: 1.55; color: var(--band-ink-soft); }
.inline-form { display: flex; flex-direction: column; gap: 12px; }
.inline-form__row { display: flex; gap: 12px; flex-wrap: wrap; }
.inline-form__row .field-input { flex: 1; min-width: 180px; }
.inline-form__note { font-size: 13px; color: var(--band-ink-softer); line-height: 1.5; }

/* Generic success-state pattern shared by every .subscribe-form (band, page, modal) */
[data-form-success] { display: none; }
.subscribe-form.is-success > *:not([data-form-success]),
.contact-form.is-success > *:not([data-form-success]) { display: none; }
.subscribe-form.is-success [data-form-success],
.contact-form.is-success [data-form-success] { display: block; }
.inline-form [data-form-success] { font-size: 14px; font-weight: 600; color: var(--turq); }
.newsletter-form [data-form-success],
.modal-form [data-form-success],
.contact-form [data-form-success] {
  background: var(--turq-pale);
  border: 1px solid var(--turq);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--turq-d);
}

.field-input {
  font-family: var(--font-sans);
  font-size: 16px;
  padding: 15px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .07);
  color: #fff;
  outline: none;
  width: 100%;
}
.field-input::placeholder { color: rgba(255, 255, 255, .6); }
.field-input:focus { border: 2px solid var(--turq); padding: 14px 15px; }
.field-input:invalid[data-touched="true"] { border-color: #E8877A; }

/* Guides + sidebar */
.split-section { max-width: var(--container); margin: 0 auto; padding: 72px 24px; }
.split-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: 64px; }
.split-grid__lede { font-size: 16px; color: var(--ink-2); margin: 0 0 28px; }
.section-title--tight { margin-bottom: 8px; }
.aside-stack { display: flex; flex-direction: column; gap: 24px; }

.guide-list { display: flex; flex-direction: column; }
.guide-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 22px 4px;
  border-top: 1px solid var(--line);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
  text-decoration: none;
  color: inherit;
  position: relative;
}
.guide-row:hover { background: var(--surface-2); }
.guide-row__n { font-size: 15px; font-weight: 800; color: var(--turq-d); }
.guide-row__title { display: block; font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.guide-row__meta { display: block; font-size: 14px; color: var(--ink-3); font-weight: 600; }
.guide-row .icon { width: 18px; height: 18px; color: var(--ink-3); }

.aside-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
}
.aside-card__title { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 18px; }
.stat-list { display: flex; flex-direction: column; gap: 16px; }
.stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.stat-row:last-child { border-bottom: none; padding-bottom: 0; }
.stat-row__k { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.stat-row__v { font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.aside-card__foot { font-size: 12px; line-height: 1.5; color: var(--ink-3); margin-top: 16px; }
.aside-links { display: flex; flex-direction: column; }
.aside-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.aside-link:last-child { border-bottom: none; padding-bottom: 0; }
.aside-link:first-child { padding-top: 0; }
.aside-link:hover { color: var(--turq-d); }

.promo-card {
  background: var(--turq-pale);
  border: 1px solid var(--turq);
  border-radius: var(--radius-md);
  padding: 24px;
}
.promo-card__title { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.promo-card__text { font-size: 15px; line-height: 1.55; color: var(--ink-2); margin: 0 0 18px; }

/* 8. Cards & grids ---------------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--dur-med) var(--ease), transform var(--dur-med) var(--ease);
  text-decoration: none;
  color: inherit;
  display: block;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card__body { padding: 22px; }
.card__meta-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card__title { font-size: 20px; line-height: 1.28; font-weight: 700; letter-spacing: -.01em; margin: 0 0 10px; color: var(--ink); }
.card__dek { font-size: 15px; line-height: 1.55; color: var(--ink-2); margin: 0; }

/* Related (article page) cards, no border */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.related-card { text-decoration: none; color: inherit; display: block; }
.related-card .ratio { margin-bottom: 16px; }
.related-card .eyebrow { margin-bottom: 8px; }
.related-card__title { font-size: 19px; line-height: 1.3; font-weight: 700; margin: 0; color: var(--ink); }

/* Hub list */
.hub-hero { padding: 64px 24px; }
.hub-hero__title { font-size: 52px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; margin: 0 0 16px; }
.hub-hero__lede { font-size: 18px; line-height: 1.6; color: var(--band-ink-soft); margin: 0 0 40px; max-width: 62ch; }
.hub-hero__lede:last-child { margin-bottom: 0; }

.hub-section { max-width: var(--container); margin: 0 auto; padding: 36px 24px 88px; }
.hub-body { display: grid; grid-template-columns: 1.55fr .85fr; gap: 64px; padding-top: 36px; }
.hub-list { display: flex; flex-direction: column; }
.hub-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
  text-decoration: none;
  color: inherit;
}
.hub-item__ratio { border-radius: var(--radius-md); }
.hub-item__meta-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.hub-item__meta { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.hub-item__title { font-size: 22px; line-height: 1.26; font-weight: 700; letter-spacing: -.01em; margin: 0 0 8px; color: var(--ink); }
.hub-item__dek { font-size: 15px; line-height: 1.55; color: var(--ink-2); margin: 0; }

.popular-list { display: flex; flex-direction: column; gap: 18px; }
.popular-item { display: grid; grid-template-columns: 28px 1fr; gap: 12px; text-decoration: none; color: inherit; }
.popular-item__n { font-size: 20px; font-weight: 800; color: var(--line-2); }
.popular-item__title { font-size: 15px; line-height: 1.4; font-weight: 600; color: var(--ink); }

/* 9. Article prose ------------------------------------------------------------------ */
.article-header { max-width: var(--container); margin: 0 auto; padding: 48px 24px 0; }
.article-header__inner { max-width: 760px; }
.article-title { font-size: 52px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; margin: 0 0 20px; color: var(--ink); }
.article-dek { font-size: 20px; line-height: 1.55; color: var(--ink-2); margin: 0 0 32px; }
.article-byline {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.article-byline__info { flex: 1; min-width: 160px; }
.article-byline__share { font-size: 13px; font-weight: 600; color: var(--ink-3); }

.article-hero { max-width: var(--container); margin: 0 auto; padding: 36px 24px 0; }
.article-hero__caption { font-size: 13px; color: var(--ink-3); margin-top: 10px; }

.article-layout {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: grid;
  /* The aside needs its own floor: with a bare 1fr the prose stays pinned at
     760px and the sidebar starves to 21px just above the 900px breakpoint. */
  grid-template-columns: minmax(0, 760px) minmax(280px, 1fr);
  gap: 72px;
}
.prose { font-size: 18px; line-height: 1.72; color: var(--ink); }
.prose p { margin: 0 0 24px; }
.prose h2 { font-size: 30px; line-height: 1.22; font-weight: 800; letter-spacing: -.02em; margin: 40px 0 16px; color: var(--ink); }
.prose h3 { font-size: 22px; line-height: 1.34; font-weight: 700; letter-spacing: -.01em; margin: 32px 0 12px; color: var(--ink); }

/* The mock-up article had no lists in its body copy, so prose ul/ol had no
   styling at all. Padding is in em so the marker gutter tracks the text size. */
.prose-list, .prose-steps { margin: 0 0 28px; padding-left: 1.4em; }
.prose-list { list-style: disc; }
.prose-steps { list-style: decimal; }
.prose-list li, .prose-steps li { margin-bottom: 12px; padding-left: .2em; }
.prose-list li:last-child, .prose-steps li:last-child { margin-bottom: 0; }
.prose-list li::marker { color: var(--turq-d); }
.prose-steps li::marker { color: var(--turq-d); font-weight: 800; }

/* Without this the table's min-content width sets the floor for the whole
   prose column, which pushes the article past the viewport under ~350px. */
.article-layout > * { min-width: 0; }

/* Legal pages reuse the article prose column but have no aside, so they get a
   plain single-column wrapper instead of .article-layout's two-column grid. */
.legal-layout { max-width: var(--container); margin: 0 auto; padding: 48px 24px 80px; }
.legal-layout .prose { max-width: 760px; }
/* --ink-3 is the site's caption grey and lands at 2.92:1 on the light
   background; this line is the revision date of a legal document, so it
   uses --ink-2 (5.48:1) instead. */
.legal-meta { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0; }
.table-scroll { overflow-x: auto; margin: 0 0 32px; }
.data-table { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; min-width: 288px; width: 100%; border-collapse: collapse; }
.data-table thead tr { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.data-table th {
  padding: 14px 18px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: left;
}
.data-table td { padding: 16px 18px; font-size: 16px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.data-table tr:last-child td { border-bottom: none; }
.data-table td:first-child { font-weight: 600; color: var(--ink); }
.data-table td:last-child { font-weight: 700; color: var(--ink); }

.pull-quote {
  margin: 40px 0;
  padding: 0 0 0 24px;
  border-left: 3px solid var(--turq);
}
.pull-quote p { font-size: 26px; line-height: 1.38; font-weight: 700; letter-spacing: -.02em; color: var(--ink); margin: 0; }

.check-list { display: flex; flex-direction: column; gap: 16px; margin: 0 0 32px; }
.check-list--perks { gap: 22px; margin: 0; }
.check-item { display: grid; grid-template-columns: 24px 1fr; gap: 14px; align-items: start; }
.check-item__mark {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--turq-pale);
  color: var(--turq-d);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  flex: none;
}
.check-item__mark .icon { width: 12px; height: 12px; }
.check-item__body { font-size: 17px; line-height: 1.6; }
.check-item__h { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.check-item__t { font-size: 15px; line-height: 1.55; color: var(--ink-2); }

.disclosure-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
}

.article-aside { display: flex; flex-direction: column; gap: 24px; align-self: start; position: sticky; top: 96px; }
.aside-band { background: var(--band); color: var(--band-ink); border-radius: var(--radius-md); padding: 24px; }
.aside-band__title { font-size: 19px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.aside-band__text { font-size: 14px; line-height: 1.55; color: var(--band-ink-soft); margin: 0 0 18px; }

.related-section { border-top: 1px solid var(--line); }
.related-section__inner { max-width: var(--container); margin: 0 auto; padding: 56px 24px 88px; }
.related-title { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 28px; color: var(--ink); }

/* 10. Forms --------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field-input--surface {
  border: 1px solid var(--line-2);
  background: var(--page);
  color: var(--ink);
  padding: 13px 14px;
}
.field-input--surface::placeholder { color: var(--ink-3); }
.field-input--surface:focus { border: 2px solid var(--turq); padding: 12px 13px; }
.field-error {
  font-size: 12px;
  font-weight: 600;
  color: #C9463A;
  display: none;
}
:root[data-theme="dark"] .field-error { color: #F0958A; }
.field-input:user-invalid ~ .field-error,
.field-input--surface:user-invalid ~ .field-error { display: block; }
.field-hint { font-size: 12px; line-height: 1.55; color: var(--ink-3); }

.newsletter-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}
.newsletter-panel__title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin-bottom: 24px; }
.newsletter-form, .contact-form { display: flex; flex-direction: column; gap: 18px; }
.contact-form .btn { align-self: flex-start; }
.field-textarea { min-height: 150px; resize: vertical; line-height: 1.6; }

/* Newsletter page hero column */
.news-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.news-hero__title { font-size: 52px; line-height: 1.08; font-weight: 800; letter-spacing: -.03em; margin: 0 0 20px; color: var(--ink); }
.news-hero__lede { font-size: 19px; line-height: 1.6; color: var(--ink-2); margin: 0 0 40px; max-width: 52ch; }
.split-section--news { padding-bottom: 96px; }

.field-fieldset { border: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.field-fieldset legend.field__label { padding: 0; }

/* 11. Footer -------------------------------------------------------------------------- */
.site-footer { background: var(--band); color: var(--band-ink); margin-top: 0; }
.footer-grid { max-width: var(--container); margin: 0 auto; padding: 64px 24px 32px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; }
.footer-brand__logo { height: 30px; width: auto; }
.footer-brand__row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.footer-brand__tag { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--turq); }
.footer-brand__text { font-size: 14px; line-height: 1.6; color: var(--band-ink-soft); margin: 0; max-width: 34ch; }
.footer-col__title { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--band-ink-softer); margin-bottom: 16px; }
.footer-col__list { display: flex; flex-direction: column; gap: 10px; }
.footer-col__item { font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, .8); }
.footer-col__item a { color: inherit; text-decoration: none; }
.footer-col__item a:hover,
.footer-col__item a:focus-visible { color: var(--turq); text-decoration: underline; }
.footer-legal {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--band-line);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-legal__disclaimer { font-size: 12px; line-height: 1.6; color: var(--band-ink-softer); max-width: 80ch; }
.footer-legal__copy { font-size: 12px; color: var(--band-ink-softer); }
/* The legal links sit inside a run of plain text, so colour alone would not
   mark them (WCAG 1.4.1). They keep a permanent underline and step up to full
   white: 10.82:1 on the light band, 18.25:1 on the dark one. */
.footer-legal__copy a { color: var(--band-ink); text-decoration: underline; text-underline-offset: 2px; }
.footer-legal__copy a:hover,
.footer-legal__copy a:focus-visible { color: var(--turq); }

/* 12. Modal (native <dialog>) ---------------------------------------------------------- */
.modal {
  border: none;
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 40px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-modal);
  margin: auto;
}
.modal::backdrop { background: rgba(18, 28, 37, .62); }
.modal__close {
  position: absolute;
  top: 18px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--ink-3);
  cursor: pointer;
  line-height: 1;
  padding: 6px;
  border-radius: var(--radius-full);
}
.modal__close:hover { color: var(--turq-d); }
.modal__close .icon { width: 18px; height: 18px; }
.modal__eyebrow { margin-bottom: 14px; }
.modal__title { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.025em; margin: 0 0 12px; color: var(--ink); }
.modal__text { font-size: 16px; line-height: 1.55; color: var(--ink-2); margin: 0 0 26px; }
.modal-form { display: flex; flex-direction: column; gap: 12px; }

/* Mobile nav drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
}
.mobile-nav.is-open { display: block; }
.mobile-nav__backdrop { position: absolute; inset: 0; background: rgba(18, 28, 37, .5); }
.mobile-nav__panel {
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  width: min(320px, 84vw);
  background: var(--surface);
  box-shadow: var(--shadow-modal);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav__head { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.mobile-nav__link {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.mobile-nav__link[aria-current="page"] { color: var(--turq-d); }
.mobile-nav__cta { margin-top: 20px; }

/* 13. Responsive ------------------------------------------------------------------------ */
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header__inner { gap: 16px; }
}

@media (min-width: 1081px) {
  .mobile-nav { display: none !important; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-title { font-size: 42px; }
  .cta-band__inner { grid-template-columns: 1fr; gap: 32px; }
  .split-grid { grid-template-columns: 1fr; gap: 40px; }
  .hub-body { grid-template-columns: 1fr; gap: 40px; }
  .article-layout { grid-template-columns: 1fr; gap: 40px; }
  .article-aside { position: static; }
  .news-hero { grid-template-columns: 1fr; gap: 40px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .hero-section, .section, .topics-section, .split-section, .article-layout,
  .legal-layout, .article-header, .article-hero, .related-section__inner,
  .footer-grid, .footer-legal { padding-left: 16px; padding-right: 16px; }
  .site-header__inner { padding-left: 16px; padding-right: 16px; }
  .hero-title { font-size: 34px; }
  .hero-dek { font-size: 17px; }
  .article-title { font-size: 32px; }
  .article-dek { font-size: 17px; }
  .hub-hero__title { font-size: 34px; }
  .cta-band__title { font-size: 28px; }
  .section-title { font-size: 26px; }
  .news-hero__title { font-size: 32px; }
  .card-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .hub-item { grid-template-columns: 1fr; }
  .hub-item__ratio { max-width: 220px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .guide-row { grid-template-columns: 40px 1fr auto; gap: 12px; }
  .hero-byline { gap: 10px; }
  .hero-byline .btn { margin-left: 0; width: 100%; }
  .modal { padding: 28px; max-width: calc(100vw - 32px); }
  .newsletter-panel { padding: 24px; }
}

@media (max-width: 480px) {
  /* The drawer already carries a "Suscribirme" CTA, so the header copy is
     redundant here — dropping it is what keeps the brand clear of the
     theme toggle at 360-480px. */
  .header-actions .btn--primary { display: none; }
  .site-header__inner { gap: 12px; }
}

@media (max-width: 359.98px) {
  /* Under 360px the "Blog" suffix has nowhere to go: a 13px label with
     .14em letter-spacing needs about 45px plus a 10px gap, more than the
     remaining slot leaves next to the theme toggle. The logo's alt text
     still names the site. */
  .brand__tag { display: none; }
}
