/* Dominicanísimo Design System v2 — "Editorial Terminal"
   Institutional OSINT — RD compliance grade
   Direction: Bloomberg Terminal × Editorial Magazine
   Typography: Fraunces (display serif) · Instrument Sans (body) · JetBrains Mono (data) */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT@9..144,400;9..144,500;9..144,600;9..144,700;9..144,800;9..144,900&family=Instrument+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --rd-blue-50: #eef1f8;
  --rd-blue-100: #d3dbed;
  --rd-blue-200: #a3b1d3;
  --rd-blue-300: #6f83b6;
  --rd-blue-400: #41598f;
  --rd-blue-500: #213c70;
  --rd-blue-600: #152c58;
  --rd-blue-700: #0e2042;
  --rd-blue-800: #0a1730;
  --rd-blue-900: #060f22;
  --rd-blue-midnight: #0A1428;
  --rd-blue-paper: #f5f3ee;
  --rd-blue: #0e2042;
  --ink: #0a0f1a;

  --rd-red-50: #fdecee;
  --rd-red-100: #fbd0d6;
  --rd-red-500: #c91a2e;
  --rd-red-600: #a8121f;
  --rd-red-700: #8a0d18;
  --rd-red: #ce1126;

  --green-50: #ecf6ef;
  --green-100: #c7e6cf;
  --green-500: #1f7a3a;
  --green-600: #15602d;
  --green-700: #0f4a23;

  --amber-50: #fdf5e6;
  --amber-100: #fae5b8;
  --amber-500: #b87e0e;
  --amber-600: #94660b;
  --amber-700: #6e4d09;

  --gray-0: #ffffff;
  --gray-50: #fafbfc;
  --gray-100: #f4f5f7;
  --gray-150: #ebedf0;
  --gray-200: #e1e4e8;
  --gray-300: #c8cdd4;
  --gray-400: #9aa2ad;
  --gray-500: #6b7480;
  --gray-600: #4d5560;
  --gray-700: #353c47;
  --gray-800: #1f2530;
  --gray-900: #11151c;
  --gray-950: #0a0d12;

  --bg: var(--gray-0);
  --bg-subtle: var(--gray-50);
  --bg-muted: var(--gray-100);
  --bg-elevated: var(--gray-0);
  --bg-inverse: var(--gray-900);
  --bg-overlay: rgba(17, 21, 28, 0.6);

  --text: var(--gray-900);
  --text-strong: var(--gray-950);
  --text-muted: var(--gray-600);
  --text-subtle: var(--gray-500);
  --text-inverse: var(--gray-0);
  --text-link: var(--rd-blue-600);
  --text-link-hover: var(--rd-blue-800);

  --border: var(--gray-200);
  --border-subtle: var(--gray-150);
  --border-strong: var(--gray-300);
  --border-focus: var(--rd-blue-500);

  --accent: var(--rd-blue-600);
  --accent-hover: var(--rd-blue-700);
  --accent-soft: var(--rd-blue-50);
  --danger: var(--rd-red-600);
  --danger-soft: var(--rd-red-50);
  --success: var(--green-600);
  --success-soft: var(--green-50);
  --warning: var(--amber-600);
  --warning-soft: var(--amber-50);

  --font-sans: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
  --font-editorial: 'Fraunces', 'Times New Roman', Georgia, serif;

  --fs-xs: 11px;
  --fs-sm: 13px;
  --fs-base: 15px;
  --fs-md: 16px;
  --fs-lg: 18px;
  --fs-xl: 22px;
  --fs-2xl: 28px;
  --fs-3xl: 36px;
  --fs-4xl: 44px;
  --fs-5xl: 56px;

  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-normal: 1.55;
  --lh-relaxed: 1.7;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-black: 800;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-caps: 0.08em;

  --sp-0: 0;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  --radius-xs: 3px;
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(10, 13, 18, 0.04);
  --shadow-sm: 0 1px 3px rgba(10, 13, 18, 0.06), 0 1px 2px rgba(10, 13, 18, 0.04);
  --shadow-md: 0 4px 12px rgba(10, 13, 18, 0.08), 0 2px 4px rgba(10, 13, 18, 0.04);
  --shadow-lg: 0 12px 32px rgba(10, 13, 18, 0.10), 0 4px 8px rgba(10, 13, 18, 0.05);
  --shadow-xl: 0 24px 56px rgba(10, 13, 18, 0.14), 0 8px 16px rgba(10, 13, 18, 0.06);
  --shadow-focus: 0 0 0 3px rgba(42, 77, 150, 0.18);
  --shadow-focus-danger: 0 0 0 3px rgba(201, 26, 46, 0.20);

  --blur-sm: 8px;
  --blur-md: 16px;
  --blur-lg: 32px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms;
  --dur-base: 180ms;
  --dur-slow: 280ms;

  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1320px;

  --z-base: 1;
  --z-elevated: 10;
  --z-sticky: 40;
  --z-overlay: 50;
  --z-modal: 60;
  --z-toast: 70;
}

[data-theme="dark"] {
  --bg: var(--gray-950);
  --bg-subtle: #0d1118;
  --bg-muted: #141923;
  --bg-elevated: #161c27;
  --bg-inverse: var(--gray-50);
  --bg-overlay: rgba(0, 0, 0, 0.7);

  --text: #e6e9ee;
  --text-strong: #f5f7fa;
  --text-muted: #a4acb8;
  --text-subtle: #7d8593;
  --text-inverse: var(--gray-900);
  --text-link: #7fa3e6;
  --text-link-hover: #a8c2ef;

  --border: #232a36;
  --border-subtle: #1a2028;
  --border-strong: #2d3543;
  --border-focus: #5a7fc4;

  --accent: #5a7fc4;
  --accent-hover: #7fa3e6;
  --accent-soft: rgba(90, 127, 196, 0.12);
  --danger: #ed5666;
  --danger-soft: rgba(237, 86, 102, 0.12);
  --success: #52b170;
  --success-soft: rgba(82, 177, 112, 0.12);
  --warning: #d99a3c;
  --warning-soft: rgba(217, 154, 60, 0.12);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55), 0 4px 8px rgba(0, 0, 0, 0.35);
  --shadow-xl: 0 24px 56px rgba(0, 0, 0, 0.6), 0 8px 16px rgba(0, 0, 0, 0.4);
  --shadow-focus: 0 0 0 3px rgba(127, 163, 230, 0.25);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--gray-950);
    --bg-subtle: #0d1118;
    --bg-muted: #141923;
    --bg-elevated: #161c27;
    --text: #e6e9ee;
    --text-strong: #f5f7fa;
    --text-muted: #a4acb8;
    --text-subtle: #7d8593;
    --text-link: #7fa3e6;
    --text-link-hover: #a8c2ef;
    --border: #232a36;
    --border-subtle: #1a2028;
    --border-strong: #2d3543;
    --accent: #5a7fc4;
    --accent-hover: #7fa3e6;
    --accent-soft: rgba(90, 127, 196, 0.12);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'kern', 'liga';
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  font-weight: var(--fw-regular);
  min-height: 100vh;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--text-link); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--text-link-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}
::selection { background: var(--accent-soft); color: var(--text-strong); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
}
h5, h6 {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-strong);
}
h1 { font-size: var(--fs-3xl); font-weight: 800; font-variation-settings: 'opsz' 144, 'SOFT' 0; }
h2 { font-size: var(--fs-2xl); font-weight: 700; }
h3 { font-size: var(--fs-xl); font-weight: 700; }
h4 { font-size: var(--fs-lg); font-weight: 600; }
h5 { font-size: var(--fs-md); }
h6 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--text-muted); }

p { line-height: var(--lh-relaxed); color: var(--text); }

code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.92em; }
code {
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  color: var(--text-strong);
}

hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-5) 0; }

.container { width: 100%; max-width: var(--container-xl); margin-inline: auto; padding-inline: var(--sp-4); }
.container-sm { max-width: var(--container-sm); }
.container-md { max-width: var(--container-md); }
.container-lg { max-width: var(--container-lg); }
.container-xl { max-width: var(--container-xl); }
.container-2xl { max-width: var(--container-2xl); }
@media (min-width: 768px) { .container { padding-inline: var(--sp-5); } }

.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-base { font-size: var(--fs-base); }
.text-lg { font-size: var(--fs-lg); }
.text-xl { font-size: var(--fs-xl); }
.text-2xl { font-size: var(--fs-2xl); }
.text-3xl { font-size: var(--fs-3xl); }
.text-4xl { font-size: var(--fs-4xl); }
.text-5xl { font-size: var(--fs-5xl); }
.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.text-strong { color: var(--text-strong); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-accent { color: var(--accent); }
.font-medium { font-weight: var(--fw-medium); }
.font-semibold { font-weight: var(--fw-semibold); }
.font-bold { font-weight: var(--fw-bold); }
.font-mono { font-family: var(--font-mono); }
.uppercase { text-transform: uppercase; letter-spacing: var(--tracking-caps); }
.tabular { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--accent);
  margin-bottom: var(--sp-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 10px 18px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  white-space: nowrap;
  user-select: none;
  letter-spacing: -0.005em;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: var(--fs-xs); border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 24px; font-size: var(--fs-md); }

.btn-primary {
  background: var(--rd-blue-700);
  color: #fff;
  border-color: var(--rd-blue-800);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), var(--shadow-sm);
}
.btn-primary:hover { background: var(--rd-blue-800); border-color: var(--rd-blue-900); color: #fff; }
.btn-primary:focus-visible { box-shadow: var(--shadow-focus), inset 0 1px 0 rgba(255, 255, 255, 0.12); }

.btn-secondary {
  background: var(--bg);
  color: var(--text-strong);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { background: var(--bg-muted); border-color: var(--border-strong); color: var(--text-strong); }

.btn-ghost { background: transparent; color: var(--text); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-muted); color: var(--text-strong); }

.btn-danger {
  background: var(--rd-red-600);
  color: #fff;
  border-color: var(--rd-red-700);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), var(--shadow-sm);
}
.btn-danger:hover { background: var(--rd-red-700); color: #fff; }

.btn-link { background: transparent; color: var(--text-link); padding: 4px 0; border-radius: 0; }
.btn-link:hover { color: var(--text-link-hover); text-decoration: underline; }

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
.card-hover:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card-tight { padding: var(--sp-4); }
.card-spaced { padding: var(--sp-6); }
.card-flush { padding: 0; overflow: hidden; }
.card-header { padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border-subtle); }
.card-body { padding: var(--sp-5); }
.card-footer { padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--border-subtle); background: var(--bg-subtle); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 2px 8px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: 1.5;
  border-radius: var(--radius-pill);
  background: var(--bg-muted);
  color: var(--text);
  border: 1px solid var(--border);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge-square { border-radius: var(--radius-sm); }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(201, 26, 46, 0.2); }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: rgba(184, 126, 14, 0.2); }
.badge-success { background: var(--success-soft); color: var(--success); border-color: rgba(31, 122, 58, 0.2); }
.badge-accent { background: var(--accent-soft); color: var(--accent); border-color: rgba(42, 77, 150, 0.2); }
.badge-neutral { background: var(--bg-muted); color: var(--text-muted); border-color: var(--border); }
.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: currentColor;
  display: inline-block;
}

.table-pro {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.table-pro thead th {
  text-align: left;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table-pro tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text);
  vertical-align: middle;
}
.table-pro tbody tr:last-child td { border-bottom: 0; }
.table-pro tbody tr { transition: background var(--dur-fast) var(--ease); }
.table-pro tbody tr:hover { background: var(--bg-subtle); }
.table-pro .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-pro .mono { font-family: var(--font-mono); font-size: 0.9em; color: var(--text-muted); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); }

.kpi-stat {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.kpi-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  opacity: 0.85;
}
.kpi-stat.is-danger::before { background: var(--danger); }
.kpi-stat.is-success::before { background: var(--success); }
.kpi-stat.is-warning::before { background: var(--warning); }
.kpi-stat__label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-muted);
}
.kpi-stat__value {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-black);
  letter-spacing: var(--tracking-tight);
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.kpi-stat__delta {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
}
.kpi-stat__delta.is-up { color: var(--success); }
.kpi-stat__delta.is-down { color: var(--danger); }

.hero {
  position: relative;
  padding: var(--sp-8) var(--sp-4);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-subtle) 100%);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 400px at 20% 0%, rgba(14, 42, 94, 0.08), transparent 70%),
    radial-gradient(ellipse 600px 300px at 80% 100%, rgba(206, 17, 38, 0.04), transparent 70%);
  pointer-events: none;
}
.hero__inner { position: relative; max-width: var(--container-lg); margin-inline: auto; }
.hero__title {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  letter-spacing: -0.025em;
  color: var(--text-strong);
  max-width: 22ch;
}
.hero__subtitle {
  margin-top: var(--sp-4);
  font-size: var(--fs-lg);
  color: var(--text-muted);
  line-height: var(--lh-snug);
  max-width: 60ch;
}
.hero__actions { margin-top: var(--sp-5); display: flex; flex-wrap: wrap; gap: var(--sp-3); }
@media (min-width: 768px) {
  .hero { padding: var(--sp-9) var(--sp-5); }
  .hero__title { font-size: var(--fs-5xl); }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(var(--blur-sm));
  backdrop-filter: saturate(180%) blur(var(--blur-sm));
  border-bottom: 1px solid var(--border-subtle);
}
[data-theme="dark"] .site-header { background: rgba(10, 13, 18, 0.85); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-header { background: rgba(10, 13, 18, 0.85); }
}
.site-header__inner {
  max-width: var(--container-2xl);
  margin-inline: auto;
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: var(--fw-bold);
  color: var(--text-strong);
  font-size: var(--fs-md);
  letter-spacing: var(--tracking-tight);
}
.site-brand__flag {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-xs);
  display: inline-grid;
  place-items: center;
  font-size: 18px;
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
}
.site-nav { display: none; align-items: center; gap: var(--sp-1); }
.site-nav a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.site-nav a:hover { background: var(--bg-muted); color: var(--text-strong); }
.site-nav a.is-active { color: var(--accent); background: var(--accent-soft); }
@media (min-width: 768px) { .site-nav { display: inline-flex; } }

.site-footer {
  margin-top: var(--sp-9);
  background: var(--gray-950);
  color: #c8cdd4;
  border-top: 1px solid #1a2028;
}
.site-footer__inner {
  max-width: var(--container-2xl);
  margin-inline: auto;
  padding: var(--sp-7) var(--sp-4);
  display: grid;
  gap: var(--sp-6);
}
@media (min-width: 768px) { .site-footer__inner { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: var(--fs-sm); margin-bottom: var(--sp-3); text-transform: uppercase; letter-spacing: var(--tracking-caps); }
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: var(--sp-1); }
.site-footer a { color: #9aa2ad; font-size: var(--fs-sm); transition: color var(--dur-fast) var(--ease); }
.site-footer a:hover { color: #fff; }
.site-footer__legal {
  border-top: 1px solid #1a2028;
  font-size: var(--fs-xs);
  color: var(--gray-500);
  max-width: var(--container-2xl);
  margin-inline: auto;
  padding: var(--sp-4);
  display: grid;
  gap: var(--sp-2);
}
@media (min-width: 768px) { .site-footer__legal { grid-template-columns: 1fr auto; } }

.alert {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
}
.alert-danger { border-color: rgba(201, 26, 46, 0.25); background: var(--danger-soft); color: var(--rd-red-700); }
.alert-warning { border-color: rgba(184, 126, 14, 0.3); background: var(--warning-soft); color: var(--amber-700); }
.alert-success { border-color: rgba(31, 122, 58, 0.25); background: var(--success-soft); color: var(--green-700); }
.alert-info { border-color: rgba(42, 77, 150, 0.25); background: var(--accent-soft); color: var(--rd-blue-700); }

.input, .select, .textarea {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: var(--fs-sm);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--gray-400); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}
.input::placeholder, .textarea::placeholder { color: var(--text-subtle); }
.label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-muted);
  margin-bottom: 6px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 4px 4px 4px var(--sp-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.search-bar:focus-within { border-color: var(--border-focus); box-shadow: var(--shadow-focus); }
.search-bar input { flex: 1; border: 0; background: transparent; padding: 10px 0; font-size: var(--fs-md); }
.search-bar input:focus { outline: none; box-shadow: none; }

.breadcrumb {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  align-items: center;
}
.breadcrumb a { color: var(--text-muted); transition: color var(--dur-fast) var(--ease); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb__sep { color: var(--text-subtle); margin: 0 4px; }

.divider { height: 1px; background: var(--border); margin-block: var(--sp-5); border: 0; }
.divider-strong { background: var(--border-strong); }

.skeleton {
  background: linear-gradient(90deg, var(--bg-muted) 0%, var(--bg-subtle) 50%, var(--bg-muted) 100%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-pulse { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.fade-in { animation: fade-in var(--dur-slow) var(--ease-out) both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.flag-stripe {
  height: 3px;
  background: linear-gradient(90deg, var(--rd-red) 0 33%, #fff 33% 66%, var(--rd-blue) 66% 100%);
  width: 100%;
}

.prose {
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--text);
  max-width: 72ch;
}
.prose h2 {
  font-size: var(--fs-2xl);
  margin-top: var(--sp-7);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-strong);
}
.prose h3 { font-size: var(--fs-xl); margin-top: var(--sp-6); margin-bottom: var(--sp-2); color: var(--text-strong); }
.prose h4 { font-size: var(--fs-lg); margin-top: var(--sp-5); margin-bottom: var(--sp-2); }
.prose p { margin-bottom: var(--sp-4); }
.prose ul, .prose ol { padding-left: var(--sp-5); margin-bottom: var(--sp-4); }
.prose li { margin-bottom: var(--sp-1); }
.prose a { color: var(--text-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.prose a:hover { color: var(--text-link-hover); }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: var(--sp-2) var(--sp-4);
  background: var(--accent-soft);
  color: var(--text);
  margin: var(--sp-4) 0;
  font-style: normal;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.prose code { background: var(--bg-muted); padding: 1px 6px; border-radius: var(--radius-xs); }
.prose table { width: 100%; border-collapse: collapse; margin: var(--sp-4) 0; font-size: var(--fs-sm); }
.prose th { background: var(--bg-subtle); text-align: left; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border); font-weight: var(--fw-semibold); }
.prose td { padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border); }

.cta-block {
  margin-top: var(--sp-7);
  padding: var(--sp-6);
  background: linear-gradient(135deg, var(--rd-blue-700), var(--rd-blue-900));
  color: #fff;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.cta-block::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--rd-red) 0 50%, #fff 50% 100%);
  opacity: 0.6;
}
.cta-block h3 { color: #fff; font-size: var(--fs-xl); margin-bottom: var(--sp-2); }
.cta-block p { color: rgba(255, 255, 255, 0.85); margin-bottom: var(--sp-4); font-size: var(--fs-sm); }
.cta-block .btn-primary { background: #fff; color: var(--rd-blue-800); border-color: #fff; }
.cta-block .btn-primary:hover { background: var(--gray-100); color: var(--rd-blue-900); }

.grid { display: grid; gap: var(--sp-4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (max-width: 767px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
@media (min-width: 768px) and (max-width: 1023px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--sp-1); } .gap-2 { gap: var(--sp-2); } .gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); } .gap-5 { gap: var(--sp-5); } .gap-6 { gap: var(--sp-6); }
.mt-2 { margin-top: var(--sp-2); } .mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); } .mt-5 { margin-top: var(--sp-5); } .mt-6 { margin-top: var(--sp-6); } .mt-7 { margin-top: var(--sp-7); }
.mb-2 { margin-bottom: var(--sp-2); } .mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); } .mb-5 { margin-bottom: var(--sp-5); } .mb-6 { margin-bottom: var(--sp-6); }
.py-6 { padding-block: var(--sp-6); } .py-7 { padding-block: var(--sp-7); } .py-8 { padding-block: var(--sp-8); }

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

@media print {
  .site-header, .site-footer, .cta-block, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}

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

/* ═══════════════════════════════════════════════════════
   EDITORIAL TERMINAL MODULE — Bloomberg × Magazine
   New: news-hero, dossier-rail, terminal-nav, quick-queries,
        kpi-strip, dossier-card, noise textures
   ═══════════════════════════════════════════════════════ */

/* Newsprint background — vertical grid columns + faint noise */
.newsprint {
  position: relative;
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, var(--border-subtle) 1px, transparent 1px);
  background-size: 96px 100%;
  background-position: -1px 0;
}
.newsprint::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.6;
  mix-blend-mode: multiply;
}
[data-theme="dark"] .newsprint::before { mix-blend-mode: screen; opacity: 0.35; }

/* Editorial dateline — runs above an H1 */
.dateline {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
.dateline::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--rd-red);
}
.dateline__sep {
  display: inline-block;
  width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; opacity: 0.5;
}

/* News-hero — replaces saturated marketing hero */
.news-hero {
  position: relative;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px) clamp(24px, 4vw, 40px);
  border: 1px solid var(--border);
  border-top: 3px solid var(--rd-red);
  background: var(--bg-elevated);
  background-image:
    linear-gradient(to right, rgba(20, 30, 60, 0.025) 1px, transparent 1px);
  background-size: 64px 100%;
  overflow: hidden;
}
[data-theme="dark"] .news-hero {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}
.news-hero::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 220px; height: 100%;
  background: radial-gradient(ellipse 300px 200px at 90% 0%, rgba(206, 17, 38, 0.06), transparent 70%);
  pointer-events: none;
}
.news-hero__grid {
  position: relative;
  display: grid;
  gap: clamp(16px, 3vw, 32px);
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
}
@media (min-width: 900px) {
  .news-hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
.news-hero__title {
  font-family: var(--font-editorial);
  font-weight: 800;
  font-variation-settings: 'opsz' 144, 'SOFT' 0;
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 0.97;
  letter-spacing: -0.028em;
  color: var(--text-strong);
  margin: 14px 0 0;
  text-wrap: balance;
}
.news-hero__title em {
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  color: var(--rd-red);
  font-weight: 700;
}
.news-hero__lead {
  margin-top: 18px;
  font-family: var(--font-sans);
  font-size: clamp(14px, 1.5vw, 17px);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 56ch;
  font-weight: 400;
}
.news-hero__lead b { color: var(--text-strong); font-weight: 600; }
.news-hero__search {
  margin-top: clamp(18px, 3vw, 28px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 18px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(10, 13, 18, 0.04);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.news-hero__search:focus-within {
  border-color: var(--rd-blue-midnight);
  box-shadow: 0 0 0 3px rgba(10, 20, 40, 0.12);
}
[data-theme="dark"] .news-hero__search:focus-within {
  border-color: #5a7fc4;
  box-shadow: 0 0 0 3px rgba(127, 163, 230, 0.18);
}
.news-hero__search-icon {
  width: 18px; height: 18px;
  color: var(--text-subtle);
  flex-shrink: 0;
}
.news-hero__search input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 14px 0;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-strong);
  min-width: 0;
}
.news-hero__search input:focus { outline: none; box-shadow: none; }
.news-hero__search input::placeholder {
  color: var(--text-subtle);
  font-weight: 400;
}
.news-hero__search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  background: var(--rd-blue-midnight);
  color: #fff;
  border: 1px solid var(--rd-blue-midnight);
  border-radius: 3px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease;
}
.news-hero__search-btn:hover { background: #050a18; }
[data-theme="dark"] .news-hero__search-btn { background: #5a7fc4; border-color: #5a7fc4; color: #060f22; }
[data-theme="dark"] .news-hero__search-btn:hover { background: #7fa3e6; }

.news-hero__sidecol {
  font-family: var(--font-mono);
  font-size: 12px;
  border-left: 1px solid var(--border);
  padding-left: clamp(16px, 2vw, 28px);
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
@media (max-width: 899px) { .news-hero__sidecol { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 16px; } }
.news-hero__sidecol-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-subtle);
  margin-bottom: 14px;
  font-weight: 600;
}
.news-hero__quote {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 18px;
  line-height: 1.35;
  color: var(--text-strong);
  font-weight: 500;
  margin-bottom: 10px;
  font-variation-settings: 'opsz' 144, 'SOFT' 80;
}
.news-hero__quote::before { content: '"'; color: var(--rd-red); margin-right: 2px; }
.news-hero__quote::after { content: '"'; color: var(--rd-red); margin-left: 2px; }
.news-hero__cite {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

/* KPI ribbon — horizontal strip, monospace, separated by hairlines */
.kpi-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--border);
  border-top: 0;
  background: var(--bg-elevated);
}
.kpi-ribbon__cell {
  padding: 16px 18px;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.kpi-ribbon__cell:last-child { border-right: 0; }
.kpi-ribbon__cell::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 24px; height: 2px;
  background: var(--rd-blue-midnight);
}
[data-theme="dark"] .kpi-ribbon__cell::before { background: #5a7fc4; }
.kpi-ribbon__cell.is-danger::before { background: var(--rd-red); }
.kpi-ribbon__cell.is-warning::before { background: var(--amber-500); }
.kpi-ribbon__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
.kpi-ribbon__value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-strong);
  line-height: 1;
  letter-spacing: -0.02em;
}
.kpi-ribbon__hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-subtle);
  letter-spacing: 0.04em;
}

/* Terminal-style nav (sidebar) */
.terminal-nav { padding: 8px 6px; background: var(--bg-elevated); border: 1px solid var(--border); }
.terminal-nav__section {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 10px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-subtle);
}
.terminal-nav__section::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}
.terminal-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  border-left: 2px solid transparent;
  margin-left: -1px;
  cursor: pointer;
  transition: background 100ms ease, color 100ms ease, border-color 100ms ease;
  letter-spacing: -0.005em;
}
.terminal-nav__link:hover {
  background: var(--bg-subtle);
  color: var(--text-strong);
  border-left-color: var(--border-strong);
}
.terminal-nav__link.is-active {
  background: var(--bg-muted);
  color: var(--text-strong);
  border-left-color: var(--rd-red);
  font-weight: 600;
}
.terminal-nav__link svg {
  width: 15px; height: 15px;
  color: var(--text-subtle);
  flex-shrink: 0;
  stroke-width: 1.6;
}
.terminal-nav__link.is-active svg { color: var(--rd-blue-midnight); }
[data-theme="dark"] .terminal-nav__link.is-active svg { color: #7fa3e6; }
.terminal-nav__link-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.terminal-nav__link-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 2px;
  background: var(--rd-red);
  color: #fff;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* Quick-queries (terminal style) — replaces "Probá:" pills */
.quick-queries {
  background: var(--rd-blue-midnight);
  border: 1px solid var(--rd-blue-midnight);
  padding: 18px 20px;
  font-family: var(--font-mono);
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .quick-queries { background: #050a18; }
.quick-queries::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--rd-red) 0 50%, transparent 50%);
}
.quick-queries__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.5);
}
.quick-queries__prompt { color: var(--rd-red); font-weight: 700; }
.quick-queries__list { display: flex; flex-wrap: wrap; gap: 6px 0; }
.quick-queries__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  margin-right: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
  letter-spacing: -0.005em;
}
.quick-queries__item::before {
  content: '>';
  color: var(--rd-red);
  font-weight: 700;
}
.quick-queries__item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.quick-queries__item.is-flag {
  border-color: rgba(206, 17, 38, 0.45);
  background: rgba(206, 17, 38, 0.12);
  color: #ffb3bb;
}
.quick-queries__item.is-flag::before { color: var(--rd-red); }
.quick-queries__item.is-flag:hover { background: rgba(206, 17, 38, 0.22); color: #fff; }

/* Dossier cards — replace generic shortcut tiles */
.dossier-card {
  position: relative;
  display: block;
  padding: 22px 22px 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  text-align: left;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
  cursor: pointer;
  overflow: hidden;
}
.dossier-card::before {
  content: attr(data-num);
  position: absolute;
  top: 14px; right: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  font-weight: 500;
}
.dossier-card:hover {
  border-color: var(--rd-blue-midnight);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 20, 40, 0.08);
}
[data-theme="dark"] .dossier-card:hover { border-color: #5a7fc4; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.dossier-card__kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--rd-red);
  font-weight: 700;
  margin-bottom: 14px;
}
.dossier-card__kicker::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--rd-red);
}
.dossier-card__title {
  font-family: var(--font-editorial);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.018em;
  color: var(--text-strong);
  margin-bottom: 8px;
  font-variation-settings: 'opsz' 80, 'SOFT' 30;
}
.dossier-card__desc {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.dossier-card__cta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rd-blue-midnight);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
[data-theme="dark"] .dossier-card__cta { color: #7fa3e6; }
.dossier-card__cta::after { content: '→'; transition: transform 150ms ease; }
.dossier-card:hover .dossier-card__cta::after { transform: translateX(4px); }

/* Editorial section header — for "Para quién es" / "Pipeline típico" */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.section-head__num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--rd-red);
  letter-spacing: 0.12em;
}
.section-head__title {
  font-family: var(--font-editorial);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  font-variation-settings: 'opsz' 96, 'SOFT' 30;
}
.section-head__rule { flex: 1; height: 1px; background: var(--border); align-self: center; }

/* Sign-in chip in header */
.signin-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-strong);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: var(--bg);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.signin-chip:hover { background: var(--bg-muted); border-color: var(--text-strong); }
.signin-chip svg { width: 13px; height: 13px; stroke-width: 1.8; }

/* Sign-in inline drawer (collapsed by default, opens from header) */
.signin-drawer {
  display: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-top: 2px solid var(--rd-red);
  padding: 18px 22px;
  margin-bottom: 24px;
}
.signin-drawer.is-open { display: block; }
.signin-drawer__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.signin-drawer__title {
  font-family: var(--font-editorial);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.signin-drawer__close {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 2px;
}
.signin-drawer__close:hover { background: var(--bg-muted); color: var(--text-strong); }

/* Editorial body card — used inside dashboard "Para quién" panels */
.editorial-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 24px 26px;
  position: relative;
}
.editorial-card__kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--rd-red);
  font-weight: 700;
  margin-bottom: 10px;
}
.editorial-card__title {
  font-family: var(--font-editorial);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin-bottom: 16px;
  color: var(--text-strong);
  font-variation-settings: 'opsz' 96, 'SOFT' 40;
}
.editorial-card ul, .editorial-card ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.editorial-card li {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  padding-left: 20px;
  position: relative;
}
.editorial-card ol { counter-reset: stepc; }
.editorial-card ol li { counter-increment: stepc; }
.editorial-card ol li::before {
  content: counter(stepc, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--rd-red);
  letter-spacing: 0.04em;
}
.editorial-card ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  background: var(--rd-red);
}
.editorial-card li b, .editorial-card li strong {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.005em;
}
.editorial-card li a {
  color: var(--rd-blue-midnight);
  font-weight: 600;
  border-bottom: 1px solid currentColor;
  text-decoration: none;
}
[data-theme="dark"] .editorial-card li a { color: #7fa3e6; }

/* Mobile menu toggle theming */
@media (max-width: 900px) {
  .terminal-nav {
    border: 0;
    background: var(--bg);
  }
}

/* ═══════════════════════════════════════════════════════
   EDITORIAL TERMINAL — SEO server-rendered pages module
   New: site-masthead, ed-grid, ed-card, ed-source-card,
        ed-law-card, ed-pepca-card, ed-faq, ed-prose, etc.
   ═══════════════════════════════════════════════════════ */

/* Editorial site masthead — replaces tailwind-flat header on SEO pages */
.site-masthead {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(180%) blur(var(--blur-sm));
  backdrop-filter: saturate(180%) blur(var(--blur-sm));
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .site-masthead { background: rgba(10, 13, 18, 0.92); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-masthead { background: rgba(10, 13, 18, 0.92); }
}
.site-masthead__inner {
  max-width: var(--container-2xl);
  margin-inline: auto;
  padding: 14px clamp(16px, 3vw, 28px);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4);
}
.ed-brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--text-strong);
  flex-shrink: 0;
}
.ed-brand__monogram {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  background: var(--rd-blue-midnight); color: #fff;
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.06em; border-radius: 2px;
  border-top: 2px solid var(--rd-red);
}
.ed-brand__name {
  font-family: var(--font-editorial);
  font-size: 19px; font-weight: 700;
  letter-spacing: -0.018em; color: var(--text-strong);
  font-variation-settings: 'opsz' 60, 'SOFT' 30;
  line-height: 1;
}
.ed-brand__name em {
  font-style: italic; color: var(--rd-red);
  font-variation-settings: 'opsz' 60, 'SOFT' 80;
}
.ed-brand__tag {
  display: block; margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-subtle);
}
.ed-nav {
  display: none; align-items: center;
  gap: 0; flex: 1;
  margin-left: 24px; padding-left: 24px;
  border-left: 1px solid var(--border);
}
@media (min-width: 900px) { .ed-nav { display: inline-flex; } }
.ed-nav a {
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 120ms ease, border-color 120ms ease;
}
.ed-nav a:hover { color: var(--text-strong); border-bottom-color: var(--rd-red); }
.ed-masthead__cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  background: var(--rd-blue-midnight); color: #fff !important;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  border-radius: 2px;
  text-decoration: none !important;
  border: 1px solid var(--rd-blue-midnight);
  transition: background 120ms ease;
}
.ed-masthead__cta:hover { background: #050a18; color: #fff !important; }
[data-theme="dark"] .ed-masthead__cta { background: #5a7fc4; border-color: #5a7fc4; color: #060f22 !important; }
[data-theme="dark"] .ed-masthead__cta:hover { background: #7fa3e6; color: #060f22 !important; }
.ed-masthead__cta::after { content: '→'; }

/* Container scoped to editorial pages (wider than .container-md prose) */
.ed-shell {
  max-width: var(--container-xl);
  margin-inline: auto;
  padding: clamp(20px, 3vw, 36px) clamp(16px, 3vw, 28px) 0;
}
.ed-shell--narrow { max-width: 900px; }

/* Editorial breadcrumb — monospace, dimmed, with em-dash separator */
.ed-crumb {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-subtle);
  margin-bottom: 18px;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px;
}
.ed-crumb a { color: var(--text-muted); text-decoration: none; transition: color 120ms ease; }
.ed-crumb a:hover { color: var(--rd-red); }
.ed-crumb__sep { color: var(--rd-red); opacity: 0.7; }

/* Editorial grid wrappers (no gap by default — uses internal borders) */
.ed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  border: 1px solid var(--border);
  border-bottom: 0;
  margin-bottom: 36px;
  background: var(--bg-elevated);
}
.ed-grid--cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.ed-grid--cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.ed-grid--cols-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ed-grid > * {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
@media (max-width: 700px) {
  .ed-grid > * { border-right: 0; }
}

/* Source card — fuente oficial con kicker */
.ed-source {
  padding: 22px 22px 24px;
  position: relative; display: block;
  text-decoration: none;
  transition: background 150ms ease;
}
.ed-source:hover { background: var(--bg-subtle); }
.ed-source__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--rd-red);
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--rd-red);
}
.ed-source__title {
  font-family: var(--font-editorial);
  font-size: 18px; font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: var(--text-strong);
  font-variation-settings: 'opsz' 80, 'SOFT' 30;
  margin-bottom: 8px;
}
.ed-source__desc {
  font-family: var(--font-sans);
  font-size: 13px; line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.ed-source__url {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--rd-blue-midnight);
  word-break: break-all;
}
[data-theme="dark"] .ed-source__url { color: #7fa3e6; }
.ed-source__url::before { content: '→ '; opacity: 0.7; }

/* Law card — for marco legal Ley XXX-XX */
.ed-law {
  padding: 28px 24px 26px;
  position: relative; display: block;
  text-decoration: none;
  background: var(--bg-elevated);
}
.ed-law__num {
  display: block;
  font-family: var(--font-editorial);
  font-size: 44px; font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--rd-blue-midnight);
  font-variation-settings: 'opsz' 144, 'SOFT' 0;
  margin-bottom: 6px;
}
[data-theme="dark"] .ed-law__num { color: #7fa3e6; }
.ed-law__num em {
  font-style: italic; font-weight: 700;
  color: var(--rd-red);
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
}
.ed-law__kicker {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--text-subtle);
  margin-bottom: 14px;
}
.ed-law__title {
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text-strong);
  margin-bottom: 6px;
  line-height: 1.3;
}
.ed-law__desc {
  font-family: var(--font-sans);
  font-size: 12.5px; line-height: 1.5;
  color: var(--text-muted);
}

/* PEPCA case dossier card — for /casos-pepca grid */
.ed-pepca {
  padding: 24px 22px 26px;
  position: relative; display: block;
  text-decoration: none;
  background: var(--bg-elevated);
  transition: background 150ms ease;
}
.ed-pepca:hover { background: var(--bg-subtle); }
.ed-pepca__monto {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--rd-red);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.ed-pepca__monto::before {
  content: ''; width: 18px; height: 1px; background: var(--rd-red);
}
.ed-pepca__title {
  font-family: var(--font-editorial);
  font-size: 22px; font-weight: 700;
  line-height: 1.08; letter-spacing: -0.020em;
  color: var(--text-strong);
  font-variation-settings: 'opsz' 96, 'SOFT' 30;
  margin-bottom: 10px;
}
.ed-pepca__desc {
  font-family: var(--font-sans);
  font-size: 13.5px; line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.ed-pepca__meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--text-subtle);
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}
.ed-pepca__meta strong {
  color: var(--text-strong);
  font-family: var(--font-mono);
  font-weight: 700;
}
.ed-pepca__cta {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--rd-blue-midnight);
}
[data-theme="dark"] .ed-pepca__cta { color: #7fa3e6; }
.ed-pepca__cta::after { content: ' →'; transition: transform 150ms ease; }
.ed-pepca:hover .ed-pepca__cta::after { transform: translateX(3px); }

/* Editorial alert — replaces .alert with editorial typography */
.ed-alert {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--rd-red);
  background: var(--bg-elevated);
  margin-bottom: 32px;
  font-family: var(--font-sans); font-size: 14px;
  line-height: 1.55; color: var(--text);
}
.ed-alert__tag {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--rd-red);
  flex-shrink: 0;
  padding-top: 2px;
}
.ed-alert__body { flex: 1; }
.ed-alert__body b { color: var(--text-strong); font-weight: 700; }
.ed-alert--info { border-left-color: var(--rd-blue-midnight); }
.ed-alert--info .ed-alert__tag { color: var(--rd-blue-midnight); }
[data-theme="dark"] .ed-alert--info { border-left-color: #5a7fc4; }
[data-theme="dark"] .ed-alert--info .ed-alert__tag { color: #7fa3e6; }
.ed-alert--danger { border-left-color: var(--rd-red); background: rgba(206, 17, 38, 0.04); }

/* Editorial CTA block — replaces broken .cta-block */
.ed-cta {
  margin: 56px 0 0;
  padding: 36px clamp(24px, 4vw, 48px);
  background: var(--rd-blue-midnight);
  color: #fff;
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--rd-red);
  display: grid; grid-template-columns: 1fr; gap: 20px;
  align-items: center;
}
@media (min-width: 720px) {
  .ed-cta { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; }
}
.ed-cta::before {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 64px 100%;
  pointer-events: none;
}
.ed-cta::after {
  content: '';
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--rd-red) 0 50%, #fff 50% 100%);
  opacity: 0.85;
}
.ed-cta__head {
  position: relative;
}
.ed-cta__kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 14px;
}
.ed-cta__kicker::before {
  content: ''; width: 24px; height: 1px; background: var(--rd-red);
}
.ed-cta__title {
  font-family: var(--font-editorial);
  font-size: clamp(24px, 3vw, 34px); font-weight: 800;
  line-height: 1.05; letter-spacing: -0.022em;
  color: #fff; margin-bottom: 12px;
  font-variation-settings: 'opsz' 144, 'SOFT' 0;
}
.ed-cta__title em {
  font-style: italic; color: var(--rd-red);
  font-variation-settings: 'opsz' 144, 'SOFT' 60;
}
.ed-cta__lead {
  font-family: var(--font-sans);
  font-size: 14px; line-height: 1.55;
  color: rgba(255,255,255,0.78);
  max-width: 56ch;
}
.ed-cta__action { position: relative; display: flex; flex-direction: column; gap: 10px; }
.ed-cta__btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; padding: 14px 24px;
  background: #fff; color: var(--rd-blue-midnight);
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  border-radius: 2px;
  text-decoration: none;
  border: 1px solid #fff;
  transition: background 120ms ease;
}
.ed-cta__btn:hover { background: var(--gray-100); color: var(--rd-blue-midnight); }
.ed-cta__btn::after { content: '→'; }
.ed-cta__btn--ghost {
  background: transparent; color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.ed-cta__btn--ghost:hover { background: rgba(255,255,255,0.08); color: #fff; }
.ed-cta__hint {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
}

/* Editorial footer — fully redone with 4 columns + Fraunces */
.ed-footer {
  margin-top: 80px;
  background: #060f22;
  color: #c8cdd4;
  border-top: 3px solid var(--rd-red);
  position: relative;
  overflow: hidden;
}
.ed-footer::before {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 96px 100%;
  pointer-events: none;
}
.ed-footer__masthead {
  position: relative;
  max-width: var(--container-2xl);
  margin-inline: auto;
  padding: 40px clamp(20px, 3vw, 32px) 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ed-footer__brand {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px;
}
.ed-footer__brand .ed-brand__monogram {
  background: rgba(255,255,255,0.08);
  border-top-color: var(--rd-red);
  color: #fff;
}
.ed-footer__name {
  font-family: var(--font-editorial);
  font-size: 26px; font-weight: 700;
  color: #fff; letter-spacing: -0.020em;
  font-variation-settings: 'opsz' 96, 'SOFT' 30;
  line-height: 1;
}
.ed-footer__name em { color: var(--rd-red); font-style: italic; font-variation-settings: 'opsz' 96, 'SOFT' 80; }
.ed-footer__tag {
  display: block; margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: rgba(255,255,255,0.5);
}
.ed-footer__lead {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 500; line-height: 1.3;
  letter-spacing: -0.012em;
  color: #fff;
  max-width: 60ch;
  font-variation-settings: 'opsz' 96, 'SOFT' 80;
  margin-bottom: 4px;
}
.ed-footer__lead b { color: var(--rd-red); font-weight: 600; font-style: italic; }
.ed-footer__cols {
  position: relative;
  max-width: var(--container-2xl);
  margin-inline: auto;
  padding: 32px clamp(20px, 3vw, 32px) 32px;
  display: grid; gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .ed-footer__cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ed-footer__cols { grid-template-columns: repeat(4, 1fr); } }
.ed-footer__col h4 {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--rd-red);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.ed-footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ed-footer__col li { margin: 0; }
.ed-footer__col a {
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  letter-spacing: -0.005em;
  transition: color 120ms ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.ed-footer__col a:hover { color: #fff; }
.ed-footer__col a::before {
  content: '›'; color: var(--rd-red); opacity: 0; margin-right: -10px;
  transition: opacity 120ms ease, margin 120ms ease;
}
.ed-footer__col a:hover::before { opacity: 1; margin-right: 0; }
.ed-footer__legal {
  position: relative;
  background: #03081a;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.ed-footer__legal-inner {
  max-width: var(--container-2xl); margin-inline: auto;
  padding: 18px clamp(20px, 3vw, 32px);
  display: grid; gap: 8px;
}
@media (min-width: 720px) { .ed-footer__legal-inner { grid-template-columns: 1fr auto; } }
.ed-footer__legal a { color: rgba(255,255,255,0.6); text-decoration: none; }
.ed-footer__legal a:hover { color: #fff; }

/* Editorial article prose — refined for SEO long-form */
.ed-prose {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  max-width: 70ch;
}
.ed-prose--wide { max-width: none; }
.ed-prose h1 {
  font-family: var(--font-editorial);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.028em;
  color: var(--text-strong);
  margin: 0 0 18px;
  text-wrap: balance;
  font-variation-settings: 'opsz' 144, 'SOFT' 0;
}
.ed-prose h1 em {
  font-style: italic; color: var(--rd-red);
  font-variation-settings: 'opsz' 144, 'SOFT' 60;
}
.ed-prose__lead {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.008em;
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0 0 32px;
  font-variation-settings: 'opsz' 96, 'SOFT' 60;
}
.ed-prose__lead b { color: var(--text-strong); font-weight: 600; font-style: italic; }
.ed-prose p { margin-bottom: 18px; line-height: 1.7; max-width: 68ch; }
.ed-prose p b, .ed-prose p strong { color: var(--text-strong); font-weight: 700; }
.ed-prose ul, .ed-prose ol {
  list-style: none; padding-left: 0;
  margin: 18px 0 24px;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 68ch;
}
.ed-prose ul li, .ed-prose ol li {
  position: relative;
  padding-left: 22px;
  font-size: 15px; line-height: 1.55;
}
.ed-prose ul li::before {
  content: '';
  position: absolute; left: 0; top: 9px;
  width: 8px; height: 1px;
  background: var(--rd-red);
}
.ed-prose ol { counter-reset: edprose; }
.ed-prose ol li { counter-increment: edprose; padding-left: 30px; }
.ed-prose ol li::before {
  content: counter(edprose, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  color: var(--rd-red); letter-spacing: 0.04em;
}
.ed-prose li b, .ed-prose li strong { color: var(--text-strong); font-weight: 700; }
.ed-prose a {
  color: var(--rd-blue-midnight);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: color 120ms ease, border-color 120ms ease;
}
[data-theme="dark"] .ed-prose a { color: #7fa3e6; }
.ed-prose a:hover { color: var(--rd-red); border-bottom-color: var(--rd-red); }
.ed-prose blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  background: var(--bg-subtle);
  border-left: 3px solid var(--rd-red);
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  font-variation-settings: 'opsz' 96, 'SOFT' 60;
}
.ed-prose blockquote b { color: var(--text-strong); font-weight: 700; font-style: italic; }
.ed-prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  color: var(--text-strong);
}

/* Editorial KPI ribbon — slimmer 4-cell variant for embed in article body */
.ed-prose .kpi-ribbon { margin: 0 0 36px; }

/* Editorial spacer for 2-column layout block */
.ed-section { margin-bottom: 56px; }
.ed-section:last-child { margin-bottom: 0; }

/* Editorial entity hero — for /empresa/{rnc} pages */
.entity-hero {
  position: relative;
  padding: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px);
  border: 1px solid var(--border);
  border-top: 3px solid var(--rd-red);
  background: var(--bg-elevated);
  background-image:
    linear-gradient(to right, rgba(20, 30, 60, 0.025) 1px, transparent 1px);
  background-size: 64px 100%;
  margin-bottom: 0;
  overflow: hidden;
}
[data-theme="dark"] .entity-hero {
  background-image: linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px);
}
.entity-hero::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 220px; height: 100%;
  background: radial-gradient(ellipse 300px 200px at 90% 0%, rgba(206, 17, 38, 0.06), transparent 70%);
  pointer-events: none;
}
.entity-hero__rnc {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 12px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  margin-bottom: 16px;
}
.entity-hero__rnc-label { color: var(--rd-red); font-weight: 700; }
.entity-hero__rnc-num { color: var(--text-strong); font-weight: 700; letter-spacing: 0.04em; }
.entity-hero__title {
  font-family: var(--font-editorial);
  font-size: clamp(28px, 4.8vw, 48px);
  font-weight: 800; line-height: 1.0;
  letter-spacing: -0.024em;
  color: var(--text-strong);
  font-variation-settings: 'opsz' 144, 'SOFT' 0;
  margin: 0 0 14px;
  text-wrap: balance;
}
.entity-hero__lead {
  font-family: var(--font-sans);
  font-size: 15px; line-height: 1.55;
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0;
}
.entity-hero__lead b { color: var(--text-strong); font-weight: 600; }
.entity-hero__chips {
  margin-top: 16px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.entity-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text-muted);
  border-radius: 2px;
}
.entity-chip--danger { background: rgba(206, 17, 38, 0.08); color: var(--rd-red); border-color: rgba(206, 17, 38, 0.4); }
.entity-chip--warn { background: rgba(184, 126, 14, 0.08); color: var(--amber-700); border-color: rgba(184, 126, 14, 0.4); }
.entity-chip--ok { background: rgba(31, 122, 58, 0.08); color: var(--green-700); border-color: rgba(31, 122, 58, 0.4); }

/* Section subhead — for in-article subsections */
.ed-subhead {
  font-family: var(--font-editorial);
  font-size: 22px; font-weight: 700;
  line-height: 1.15; letter-spacing: -0.018em;
  color: var(--text-strong);
  margin: 32px 0 14px;
  font-variation-settings: 'opsz' 96, 'SOFT' 30;
  position: relative;
  padding-left: 16px;
}
.ed-subhead::before {
  content: ''; position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px;
  background: var(--rd-red);
}

/* Editorial FAQ item — for preguntas-frecuentes */
.ed-faq {
  border: 1px solid var(--border);
  border-bottom: 0;
  background: var(--bg-elevated);
  margin-bottom: 32px;
}
.ed-faq__item {
  border-bottom: 1px solid var(--border);
  padding: 22px 24px;
}
.ed-faq__q {
  display: flex; gap: 14px; align-items: baseline;
  margin-bottom: 8px;
}
.ed-faq__num {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--rd-red);
  flex-shrink: 0;
  min-width: 28px;
}
.ed-faq__title {
  font-family: var(--font-editorial);
  font-size: 18px; font-weight: 700;
  line-height: 1.25; letter-spacing: -0.014em;
  color: var(--text-strong);
  font-variation-settings: 'opsz' 80, 'SOFT' 30;
}
.ed-faq__a {
  margin-left: 42px;
  font-family: var(--font-sans);
  font-size: 14.5px; line-height: 1.6;
  color: var(--text-muted);
}
.ed-faq__a a { color: var(--rd-blue-midnight); font-weight: 600; border-bottom: 1px solid currentColor; }
[data-theme="dark"] .ed-faq__a a { color: #7fa3e6; }

/* Mobile menu toggle */
.ed-menu-toggle {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  color: var(--text-strong);
  cursor: pointer;
}
@media (min-width: 900px) { .ed-menu-toggle { display: none; } }
.ed-nav.is-open {
  display: flex; flex-direction: column;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  margin: 0; border-left: 0;
  z-index: var(--z-sticky);
}
@media (max-width: 899px) {
  .ed-nav.is-open a {
    border-bottom: 0; padding: 12px 8px; margin-bottom: 0;
    border-top: 1px solid var(--border-subtle);
  }
}

