/* ================================================
   REPORTE EJECUTIVO — CLOSER DE VENTAS VS. VENTAS B2B/ALTO VALOR
   Design System & Styles
   ================================================ */

/* ---------- Design Tokens ---------- */
:root {
    /* Primary palette */
    --navy-900: #0B1628;
    --navy-800: #111E3A;
    --navy-700: #16233F;
    --navy-600: #1E2F55;
    --navy-500: #2A3F6F;
    --navy-400: #4A6491;
    --navy-300: #7B96BF;
    --navy-200: #A9BADD;
    --navy-100: #D4DDEE;
    --navy-50: #EEF1F7;

    /* Accent – Petrol */
    --petrol-700: #134840;
    --petrol-600: #1A6055;
    --petrol-500: #1F7268;
    --petrol-400: #2E9585;
    --petrol-300: #5BBAA9;
    --petrol-200: #9DD8CE;
    --petrol-100: #D0EDE8;
    --petrol-50: #E8F6F3;

    /* Accent – Amber */
    --amber-700: #8A5A1F;
    --amber-600: #A86E24;
    --amber-500: #C17A2E;
    --amber-400: #D9993F;
    --amber-300: #E8B96A;
    --amber-200: #F2D9A5;
    --amber-100: #F6E7D2;
    --amber-50: #FDF5EB;

    /* Accent – Red (alerts) */
    --red-600: #A6382A;
    --red-500: #C04435;
    --red-400: #D85E4F;
    --red-100: #F3DDD8;
    --red-50: #FAF0EE;

    /* Neutrals */
    --ink: #1A1814;
    --ink-soft: #5B5546;
    --ink-muted: #8C8577;
    --paper: #FFFCF6;
    --ivory: #F5F0E2;
    --ivory-dark: #EDE8D8;
    --white: #FFFFFF;
    --line: rgba(34, 30, 25, 0.12);
    --line-strong: rgba(34, 30, 25, 0.2);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(22, 35, 63, 0.06);
    --shadow-md: 0 4px 16px rgba(22, 35, 63, 0.08);
    --shadow-lg: 0 8px 32px rgba(22, 35, 63, 0.10);
    --shadow-xl: 0 16px 48px rgba(22, 35, 63, 0.12);
    --shadow-glow-petrol: 0 4px 24px rgba(31, 114, 104, 0.15);
    --shadow-glow-amber: 0 4px 24px rgba(193, 122, 46, 0.15);

    /* Spacing */
    --section-gap: 5rem;
    --container-max: 1080px;
    --container-narrow: 720px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.2s var(--ease-out);
    --transition-base: 0.35s var(--ease-out);
    --transition-slow: 0.6s var(--ease-out);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    overflow-x: hidden;
}

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

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    color: var(--navy-700);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin-bottom: 0.6em;
}

h3 {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    margin-bottom: 0.5em;
}

h4 {
    font-size: 1rem;
    font-weight: 600;
}

p {
    margin-bottom: 1em;
    color: var(--ink-soft);
}

strong {
    font-weight: 600;
    color: var(--ink);
}

a {
    color: var(--petrol-500);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--petrol-400);
}

.mono {
    font-family: 'IBM Plex Mono', monospace;
}

/* ---------- Layout ---------- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container--narrow {
    max-width: var(--container-narrow);
}

.section {
    padding: var(--section-gap) 0;
    position: relative;
    scroll-margin-top: 76px;
}

.section--alt {
    background: var(--ivory);
}

.section--dark {
    background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 60%, var(--navy-600) 100%);
    color: var(--navy-100);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
    color: var(--white);
}

.section--dark p {
    color: var(--navy-200);
}

.section--dark .hallazgo__body strong,
.section--dark .framework-explainer strong {
    color: var(--amber-300);
}

/* ---------- Reveal Animations ---------- */
.reveal.visible {
    animation: reveal-in 0.7s var(--ease-out);
}

@keyframes reveal-in {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal-delay-1 {
    animation-delay: 0.1s;
}

.reveal-delay-2 {
    animation-delay: 0.2s;
}

.reveal-delay-3 {
    animation-delay: 0.3s;
}

.reveal-delay-4 {
    animation-delay: 0.4s;
}

.reveal-delay-5 {
    animation-delay: 0.5s;
}

/* ---------- Hero / Cover ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--navy-900) 0%, #15243E 40%, #1A3050 70%, var(--navy-600) 100%);
    padding: 3.5rem 1.5rem 5.5rem;
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(31, 114, 104, 0.18) 0%, transparent 70%);
    top: -120px;
    right: -150px;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(193, 122, 46, 0.12) 0%, transparent 70%);
    bottom: -100px;
    left: -120px;
    pointer-events: none;
}

.hero__eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--petrol-300);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.hero__eyebrow::before,
.hero__eyebrow::after {
    content: '';
    width: 32px;
    height: 1px;
    background: var(--petrol-400);
    opacity: 0.5;
}

.hero h1 {
    color: var(--white);
    max-width: 720px;
    margin-bottom: 1rem;
}

.hero__subtitle {
    font-size: 1.1rem;
    color: var(--navy-200);
    max-width: 580px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero__meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}

.hero__meta-item {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    color: var(--navy-300);
    letter-spacing: 0.04em;
}

.hero__scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--navy-400);
    font-size: 0.72rem;
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    animation: float 2.5s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-6px);
    }
}

.hero__scroll-hint svg {
    width: 20px;
    height: 20px;
    stroke: var(--navy-400);
}

/* ---------- Section Header ---------- */
.section-header {
    margin-bottom: 2.5rem;
}

.section-number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--petrol-500);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.section-number::after {
    content: '';
    height: 1px;
    flex: 1;
    max-width: 80px;
    background: var(--petrol-300);
    opacity: 0.4;
}

.section--dark .section-number {
    color: var(--petrol-300);
}

.section-intro {
    font-size: 1.05rem;
    max-width: 640px;
    color: var(--ink-soft);
    line-height: 1.75;
}

.section--dark .section-intro {
    color: var(--navy-200);
}

/* ---------- Executive Summary Cards ---------- */
.exec-summary {
    background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 100%);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.exec-summary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(31, 114, 104, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.exec-summary__text {
    font-family: 'Fraunces', serif;
    font-size: 1.08rem;
    font-style: italic;
    line-height: 1.8;
    color: var(--navy-100);
    position: relative;
    padding-left: 1.5rem;
    border-left: 3px solid var(--amber-400);
}

.exec-summary__text strong {
    color: var(--amber-300);
}

/* ---------- Stat Cards ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.hero__stats {
    width: 100%;
    max-width: 1040px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.hero__stats .stat-card--dark {
    padding: 1.05rem 0.95rem;
}

.hero__stats .stat-card__number {
    font-size: 1.55rem;
}

.hero__stats .stat-card--dark .stat-card__detail {
    color: var(--petrol-200);
}

@media (max-width: 860px) {
    .hero__stats {
        max-width: 560px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.4rem 1.3rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-card__number {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy-700);
    line-height: 1.1;
    margin-bottom: 0.3rem;
}

.stat-card__number--petrol {
    color: var(--petrol-500);
}

.stat-card__number--amber {
    color: var(--amber-500);
}

.stat-card__number--red {
    color: var(--red-600);
}

.stat-card__label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-card__detail {
    font-size: 0.72rem;
    color: var(--ink-muted);
    margin-top: 0.3rem;
}

/* Dark stat cards */
.stat-card--dark {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
}

.stat-card--dark:hover {
    background: rgba(255, 255, 255, 0.07);
}

.stat-card--dark .stat-card__number {
    color: var(--white);
}

.stat-card--dark .stat-card__label {
    color: var(--navy-200);
}

.stat-card--dark .stat-card__detail {
    color: var(--navy-300);
}

/* ---------- Hallazgo (Finding) Cards ---------- */
.hallazgo {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--transition-base);
}

.hallazgo:hover {
    box-shadow: var(--shadow-md);
}

.hallazgo--alt {
    background: var(--white);
}

.hallazgo__badge {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.9rem;
}

.hallazgo__badge--data {
    background: var(--petrol-100);
    color: var(--petrol-600);
}

.hallazgo__badge--insight {
    background: var(--amber-100);
    color: var(--amber-700);
}

.hallazgo__badge--risk {
    background: var(--red-100);
    color: var(--red-600);
}

.hallazgo__badge--action {
    background: var(--navy-100);
    color: var(--navy-600);
}

.hallazgo__title {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
}

.hallazgo__body {
    font-size: 0.92rem;
    color: var(--ink-soft);
    line-height: 1.7;
}

.hallazgo__body ul {
    padding-left: 1.2rem;
    margin: 0.5rem 0;
}

.hallazgo__body li {
    margin-bottom: 0.3rem;
}

.hallazgo__source {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    color: var(--ink-muted);
    margin-top: 0.8rem;
    padding-top: 0.7rem;
    border-top: 1px dashed var(--line);
}

.micro-note {
    margin: 0.9rem 0 0;
    padding: 0.75rem 0.9rem;
    border-left: 3px solid var(--petrol-500);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--petrol-50);
    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.55;
}

/* ---------- Chart Containers ---------- */
.chart-container {
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.chart-container--dark {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.chart-container__title {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-container--dark .chart-container__title {
    color: var(--navy-200);
}

.chart-container__subtitle {
    font-size: 0.75rem;
    color: var(--ink-muted);
    margin-top: -0.8rem;
    margin-bottom: 1rem;
}

.chart-data {
    margin-top: 0.8rem;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.83rem;
}

.chart-data summary {
    padding: 0.6rem 0;
    cursor: pointer;
    color: var(--petrol-600);
}

.chart-data table {
    font-size: inherit;
}

.chart-data th,
.chart-data td {
    padding: 0.45rem 0.35rem;
    white-space: normal;
    overflow-wrap: anywhere;
}

.chart-data tbody th,
.table-wrap tbody th {
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}

.table-wrap tbody th {
    padding: 0.7rem 0.8rem;
}

.chart-data td {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.chart-comparison-note {
    margin: -0.2rem 0 0;
    padding: 0.9rem 1rem;
    border-left: 4px solid var(--petrol-500);
    background: var(--petrol-50);
    color: var(--ink-muted);
    font-size: 0.76rem;
    line-height: 1.55;
}

.chart-comparison-note strong {
    color: var(--petrol-600);
}

.affordability-chart__wrap {
    height: 360px;
}

.metric-switch {
    display: none;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1rem;
}

.charts-ready .metric-switch {
    display: flex;
}

.metric-switch__button {
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink-muted);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.67rem;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.metric-switch__button:hover,
.metric-switch__button:focus-visible {
    border-color: var(--petrol-500);
    color: var(--petrol-600);
}

.metric-switch__button.is-active {
    border-color: var(--petrol-600);
    background: var(--petrol-600);
    color: white;
}

.affordability-reading {
    margin-top: 0.8rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: var(--navy-50);
    color: var(--ink-muted);
    font-size: 0.77rem;
    line-height: 1.55;
}

.affordability-reading strong {
    color: var(--navy-500);
}

.zone-directory {
    margin-top: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--ivory);
}

.zone-directory__heading span {
    display: block;
    margin-bottom: 0.35rem;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--petrol-600);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.zone-directory__heading h4 {
    margin: 0 0 0.35rem;
    color: var(--ink);
    font-family: 'DM Serif Display', serif;
    font-size: 1.2rem;
    font-weight: 400;
}

.zone-directory__heading p,
.zone-directory__item p,
.zone-directory__note {
    color: var(--ink-muted);
    line-height: 1.55;
}

.zone-directory__heading p {
    margin: 0;
    font-size: 0.8rem;
}

.zone-directory__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: start;
    margin-top: 1rem;
}

.zone-directory__item {
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
}

details.zone-directory__item {
    padding: 0;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

details.zone-directory__item[open] {
    border-color: var(--petrol-500);
    box-shadow: 0 4px 14px rgba(19, 72, 64, 0.08);
}

.zone-directory__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.78rem 0.9rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background-color 0.18s ease;
}

.zone-directory__summary::-webkit-details-marker {
    display: none;
}

.zone-directory__summary::marker {
    content: "";
}

.zone-directory__summary:hover {
    background-color: rgba(15, 76, 70, 0.04);
}

.zone-directory__summary:focus-visible {
    outline: 2px solid var(--petrol-500);
    outline-offset: -2px;
}

.zone-directory__summary::after {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid var(--petrol-600);
    border-bottom: 2px solid var(--petrol-600);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.15rem;
}

details.zone-directory__item[open] .zone-directory__summary::after {
    transform: rotate(-135deg);
}

.zone-directory__title {
    color: var(--petrol-600);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.35;
    flex: 1;
}

.zone-directory__count {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--ivory);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.zone-directory__body {
    padding: 0.65rem 0.9rem 0.85rem;
    border-top: 1px solid var(--line);
}

.zone-directory__item h5 {
    margin: 0 0 0.25rem;
    color: var(--petrol-600);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.76rem;
}

.zone-directory__item p {
    margin: 0;
    font-size: 0.76rem;
}

.zone-directory__note {
    margin: 0.9rem 0 0;
    padding-top: 0.8rem;
    border-top: 1px solid var(--line);
    font-size: 0.72rem;
}

.zone-directory__note strong {
    color: var(--ink-soft);
}

/* ---------- Semáforo pills & box ---------- */
.semaforo-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.16rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.67rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    flex-shrink: 0;
}

.semaforo-pill::before {
    content: "";
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.semaforo-pill--green {
    background: var(--petrol-50);
    border-color: rgba(31, 114, 104, 0.28);
    color: var(--petrol-700);
}

.semaforo-pill--green::before {
    background: var(--petrol-500);
}

.semaforo-pill--yellow {
    background: #FEF9E7;
    border-color: #EAD896;
    color: #846414;
}

.semaforo-pill--yellow::before {
    background: #D4A017;
}

.semaforo-pill--orange {
    background: #FDF1E8;
    border-color: #F2C9AA;
    color: #9A4816;
}

.semaforo-pill--orange::before {
    background: #D96B27;
}

.semaforo-pill--red {
    background: var(--red-50);
    border-color: var(--red-100);
    color: var(--red-600);
}

.semaforo-pill--red::before {
    background: var(--red-500);
}

.semaforo-box {
    margin-top: 1.2rem;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--paper);
    box-shadow: var(--shadow-sm);
}

.semaforo-box__eyebrow {
    display: block;
    margin-bottom: 0.35rem;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--petrol-600);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.semaforo-box__title {
    margin: 0 0 0.4rem;
    color: var(--ink);
    font-family: 'DM Serif Display', serif;
    font-size: 1.2rem;
    font-weight: 400;
}

.semaforo-box__desc {
    margin: 0 0 0.85rem;
    color: var(--ink-muted);
    font-size: 0.8rem;
    line-height: 1.55;
}

.semaforo-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.semaforo-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.semaforo-row {
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--ivory);
}

.semaforo-row__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.semaforo-row__name {
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
}

.semaforo-row__meta {
    display: block;
    margin-top: 0.12rem;
    color: var(--ink-muted);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.67rem;
    font-weight: 400;
}

.semaforo-row__bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(34, 30, 25, 0.09);
    overflow: hidden;
    margin-bottom: 0.45rem;
}

.semaforo-row__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
}

.semaforo-row__fill--green {
    background: var(--petrol-500);
}

.semaforo-row__fill--yellow {
    background: #D4A017;
}

.semaforo-row__fill--orange {
    background: #D96B27;
}

.semaforo-row__fill--red {
    background: var(--red-500);
}

.semaforo-row__note {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.75rem;
    line-height: 1.48;
}

.semaforo-warning {
    margin-top: 1rem;
    padding: 1.05rem 1.2rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-left: 5px solid #FFE082;
    background: linear-gradient(135deg, #C84B0B 0%, #E05E14 100%);
    color: var(--white);
    font-size: 0.82rem;
    line-height: 1.6;
    box-shadow: var(--shadow-md);
    scroll-margin-top: 90px;
}

.semaforo-warning strong {
    color: #FFF2C2;
}

.semaforo-warning code {
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.24);
}

.semaforo-warning__label {
    display: block;
    margin-bottom: 0.4rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #FFE7A0;
}

.semaforo-warning ul {
    margin: 0.55rem 0 0;
    padding-left: 1.15rem;
}

.semaforo-warning li {
    margin-bottom: 0.45rem;
}

.semaforo-warning li:last-child {
    margin-bottom: 0;
}

.orange-note-ref {
    color: #C84B0B;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.orange-note-ref:hover {
    color: #9E3806;
}

.hl-orange {
    background: #FDE7D7;
    color: #A83A05;
    border: 1px solid #F2B990;
    padding: 0.06rem 0.38rem;
    border-radius: 5px;
    font-weight: 600;
    font-style: normal;
}

.hl-black {
    color: #000000;
    font-weight: 700;
    font-style: normal;
}

/* ---------- Botón naranja y Modales (Pop-ups) de detalle ---------- */
.btn-urgent-orange {
    background: linear-gradient(135deg, #C84B0B 0%, #E05E14 100%);
    color: var(--white);
    border: none;
    border-radius: 999px;
    padding: 0.34rem 0.78rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.45rem;
    box-shadow: 0 2px 8px rgba(200, 75, 11, 0.28);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.btn-urgent-orange:hover,
.btn-urgent-orange:focus-visible {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200, 75, 11, 0.38);
    outline: 2px solid #FFE082;
    outline-offset: 2px;
}

dialog.detail-modal {
    width: min(680px, calc(100vw - 2rem));
    max-height: calc(100vh - 3rem);
    border: none;
    border-radius: 18px;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 24px 60px rgba(11, 22, 40, 0.32);
    overflow: hidden;
    margin: auto;
}

dialog.detail-modal::backdrop {
    background: rgba(11, 22, 40, 0.62);
    backdrop-filter: blur(4px);
}

.detail-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.4rem;
    background: linear-gradient(135deg, #C84B0B 0%, #E05E14 100%);
    color: var(--white);
}

.detail-modal__eyebrow {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #FFE7A0;
    margin-bottom: 0.25rem;
}

.detail-modal__title {
    margin: 0;
    font-family: 'DM Serif Display', serif;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.25;
    color: var(--white);
}

.detail-modal__close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.15s ease;
}

.detail-modal__close:hover,
.detail-modal__close:focus-visible {
    background: rgba(255, 255, 255, 0.28);
    outline: 2px solid #FFE082;
}

.detail-modal__body {
    padding: 1.25rem 1.4rem 1.45rem;
    overflow-y: auto;
    max-height: calc(100vh - 9.5rem);
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--ink-soft);
}

.detail-modal__body p {
    margin: 0 0 0.75rem;
}

.detail-modal__body ul {
    margin: 0 0 0.85rem;
    padding-left: 1.2rem;
}

.detail-modal__body li {
    margin-bottom: 0.45rem;
}

.detail-modal__callout {
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border-left: 4px solid #C84B0B;
    background: #FDF5EB;
    color: var(--ink);
    font-size: 0.84rem;
}

.detail-modal__body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.8rem;
}

.detail-modal__body th,
.detail-modal__body td {
    padding: 0.45rem 0.55rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.detail-modal__body thead th {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--ink-muted);
    background: var(--ivory);
}

.chart-wrap {
    display: none;
    position: relative;
    width: 100%;
}

.charts-ready .chart-wrap {
    display: block;
}

.chart-wrap--half {
    max-width: 380px;
    height: clamp(240px, 55vw, 380px);
    margin: 0 auto;
}

/* ---------- Quick report navigation ---------- */
.report-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.report-nav__inner {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.report-nav__label {
    flex: 0 0 auto;
    color: var(--ink-muted);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
}

.report-nav a {
    flex: 0 0 auto;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--navy-700);
    background: var(--paper);
    font-size: 0.74rem;
    font-weight: 600;
    transition: background var(--transition-base), border-color var(--transition-base);
}

.report-nav a:hover {
    background: var(--petrol-50);
    border-color: var(--petrol-200);
}

.report-nav a.is-active {
    color: var(--white);
    background: var(--petrol-600);
    border-color: var(--petrol-600);
}

/* ---------- Owner acquisition and marketing ---------- */
.marketing-stats .stat-card {
    display: flex;
    min-height: 180px;
    flex-direction: column;
    justify-content: center;
}

.marketing-channel-table td:first-child {
    min-width: 210px;
    color: var(--navy-800);
    font-weight: 700;
}

.marketing-landing-grid,
.marketing-engines {
    margin-top: 1.25rem;
}

.marketing-landing-grid>div {
    padding: 1.15rem 1.25rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.marketing-landing-grid h4 {
    margin-bottom: 0.65rem;
}

.marketing-engine {
    padding: 1.35rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.marketing-engine--now {
    background: var(--petrol-50);
    border-color: var(--petrol-200);
}

.marketing-engine--later {
    background: var(--amber-50);
    border-color: var(--amber-200);
}

.marketing-engine span {
    color: var(--ink-muted);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.marketing-engine h4 {
    margin: 0.45rem 0 0.55rem;
}

.marketing-engine p {
    margin: 0;
}

.shared-exclusive {
    margin-top: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid var(--petrol-200);
    border-radius: var(--radius-md);
    background: var(--petrol-50);
}

.shared-exclusive__title {
    color: var(--petrol-600);
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.shared-exclusive p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.84rem;
    line-height: 1.6;
}

.glossary {
    margin-top: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--white);
    overflow: hidden;
}

.glossary summary {
    cursor: pointer;
    padding: 0.9rem 1.1rem;
    color: var(--navy-700);
    font-weight: 700;
}

.glossary[open] summary {
    border-bottom: 1px solid var(--line);
}

.glossary__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 1.4rem;
    padding: 1rem 1.15rem;
}

.glossary__grid p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.78rem;
    line-height: 1.5;
}

.glossary__grid strong {
    color: var(--ink);
}

.framework-explainer {
    margin: 0 0 1.2rem;
    color: var(--navy-300);
    font-size: 0.8rem;
    line-height: 1.5;
}

/* ---------- Grids ---------- */
.grid {
    display: grid;
    gap: 1.2rem;
}

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

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

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

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

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

@media (max-width: 768px) {

    .grid--2,
    .grid--3,
    .grid--4,
    .grid--2-1,
    .grid--1-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .zone-directory__grid {
        grid-template-columns: 1fr;
    }

    .semaforo-list {
        grid-template-columns: 1fr;
    }

    .zone-directory__summary {
        flex-wrap: wrap;
    }

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

/* ---------- Tables ---------- */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

thead th {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-muted);
    text-align: left;
    padding: 0.7rem 0.8rem;
    border-bottom: 2px solid var(--line-strong);
    white-space: nowrap;
}

tbody td {
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    color: var(--ink-soft);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--ivory);
}

tbody td:first-child {
    font-weight: 600;
    color: var(--ink);
}

.owner-proof-table {
    min-width: 820px;
}

.owner-proof-table th:first-child,
.owner-proof-table td:first-child {
    width: 24%;
}

.proof-differences {
    display: grid;
    gap: 0.45rem;
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-left: 3px solid var(--petrol-500);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--petrol-50);
}

.proof-differences p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
}

.proof-examples {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.proof-example {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.proof-example span {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--petrol-600);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.proof-example h4 {
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
}

.proof-example p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.78rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .proof-examples {
        grid-template-columns: 1fr;
    }
}

.district-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 0.2rem 0 1.2rem;
}

.district-pair__card {
    padding: 1.2rem 1.3rem;
    border: 1px solid var(--line);
    border-top: 4px solid var(--petrol-500);
    border-radius: var(--radius-md);
    background: var(--petrol-50);
}

.district-pair__card--access {
    border-top-color: var(--navy-400);
    background: var(--navy-50);
}

.district-pair__card span,
.district-pair__card strong,
.district-pair__card b,
.district-pair__card small {
    display: block;
}

.district-pair__card span {
    color: var(--ink-muted);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.district-pair__card strong {
    margin-top: 0.35rem;
    color: var(--navy-800);
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.35rem;
}

.district-pair__card b {
    margin-top: 0.55rem;
    color: var(--petrol-600);
    font-size: 1.05rem;
}

.district-pair__card--access b {
    color: var(--navy-500);
}

.district-pair__card small {
    margin-top: 0.2rem;
    color: var(--ink-muted);
    font-size: 0.7rem;
}

.district-pair__card p {
    margin: 0.65rem 0 0;
    color: var(--ink-soft);
    font-size: 0.78rem;
    line-height: 1.5;
}

.district-market-table {
    min-width: 720px;
    font-size: 0.82rem;
}

.district-market-table th:nth-child(4),
.district-market-table th:nth-child(5),
.district-market-table td:nth-child(4),
.district-market-table td:nth-child(5) {
    text-align: right;
}

.district-market-table thead th {
    white-space: normal;
}

#fuentes,
.sources-list [id] {
    scroll-margin-top: 76px;
}

/* ---------- Conclusion Boxes ---------- */
.conclusion {
    border-radius: var(--radius-md);
    padding: 1.3rem 1.5rem;
    margin: 1.5rem 0;
    position: relative;
}

.conclusion::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}

.conclusion--primary {
    background: var(--petrol-50);
    border: 1px solid var(--petrol-200);
}

.conclusion--primary::before {
    background: var(--petrol-500);
}

.conclusion--warning {
    background: var(--amber-50);
    border: 1px solid var(--amber-200);
}

.conclusion--warning::before {
    background: var(--amber-500);
}

.conclusion--danger {
    background: var(--red-50);
    border: 1px solid rgba(166, 56, 42, 0.15);
}

.conclusion--danger::before {
    background: var(--red-600);
}

.conclusion__label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.conclusion--primary .conclusion__label {
    color: var(--petrol-600);
}

.conclusion--warning .conclusion__label {
    color: var(--amber-700);
}

.conclusion--danger .conclusion__label {
    color: var(--red-600);
}

.conclusion__text {
    font-family: 'Fraunces', serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
}

/* ---------- FADO Quadrant ---------- */
.fado-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.fado-cell {
    padding: 1.5rem;
    position: relative;
}

.fado-cell:nth-child(1) {
    background: var(--petrol-50);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.fado-cell:nth-child(2) {
    background: var(--red-50);
    border-bottom: 1px solid var(--line);
}

.fado-cell:nth-child(3) {
    background: var(--amber-50);
    border-right: 1px solid var(--line);
}

.fado-cell:nth-child(4) {
    background: var(--navy-50);
}

.fado-cell__title {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.fado-cell:nth-child(1) .fado-cell__title {
    color: var(--petrol-600);
}

.fado-cell:nth-child(2) .fado-cell__title {
    color: var(--red-600);
}

.fado-cell:nth-child(3) .fado-cell__title {
    color: var(--amber-700);
}

.fado-cell:nth-child(4) .fado-cell__title {
    color: var(--navy-600);
}

.fado-cell ul {
    list-style: none;
    padding: 0;
}

.fado-cell li {
    font-size: 0.82rem;
    color: var(--ink-soft);
    padding: 0.35rem 0;
    padding-left: 1rem;
    position: relative;
    line-height: 1.5;
}

.fado-cell li strong {
    display: block;
    color: var(--ink);
    font-size: 0.8rem;
    line-height: 1.35;
    margin-bottom: 0.08rem;
}

.fado-cell li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.fado-cell:nth-child(1) li::before {
    background: var(--petrol-400);
}

.fado-cell:nth-child(2) li::before {
    background: var(--red-400);
}

.fado-cell:nth-child(3) li::before {
    background: var(--amber-400);
}

.fado-cell:nth-child(4) li::before {
    background: var(--navy-400);
}

@media (max-width: 640px) {
    .fado-grid {
        grid-template-columns: 1fr;
    }

    .fado-cell:nth-child(1),
    .fado-cell:nth-child(3) {
        border-right: none;
    }

    .fado-cell:nth-child(1),
    .fado-cell:nth-child(2),
    .fado-cell:nth-child(3) {
        border-bottom: 1px solid var(--line);
    }
}

/* ---------- PEST Cards ---------- */
.pest-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.3rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base);
}

.pest-card:hover {
    transform: translateY(-2px);
}

.pest-card__icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.pest-card__icon--p {
    background: var(--navy-100);
}

.pest-card__icon--e {
    background: var(--petrol-100);
}

.pest-card__icon--s {
    background: var(--amber-100);
}

.pest-card__icon--t {
    background: var(--navy-50);
}

.pest-card__title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.pest-card ul {
    list-style: none;
    padding: 0;
}

.pest-card li {
    font-size: 0.8rem;
    color: var(--ink-soft);
    padding: 0.3rem 0;
    line-height: 1.5;
}

/* ---------- Timeline ---------- */
.timeline {
    position: relative;
    padding-left: 2.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--petrol-400) 0%, var(--amber-400) 100%);
    border-radius: 2px;
}

.timeline__item {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
}

.timeline__item:last-child {
    margin-bottom: 0;
}

.timeline__dot {
    position: absolute;
    left: -2.5rem;
    top: 0.15rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--white);
    z-index: 2;
}

.timeline__item:nth-child(1) .timeline__dot {
    background: var(--petrol-500);
}

.timeline__item:nth-child(2) .timeline__dot {
    background: var(--petrol-400);
}

.timeline__item:nth-child(3) .timeline__dot {
    background: var(--amber-500);
}

.timeline__item:nth-child(4) .timeline__dot {
    background: var(--amber-400);
}

.timeline__week {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--petrol-600);
    margin-bottom: 0.3rem;
}

.timeline__title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ink);
    margin-bottom: 0.4rem;
}

.timeline__tasks {
    list-style: none;
    padding: 0;
}

.timeline__tasks li {
    font-size: 0.85rem;
    color: var(--ink-soft);
    padding: 0.2rem 0;
    padding-left: 1.1rem;
    position: relative;
}

.timeline__tasks li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--petrol-400);
    font-size: 0.75rem;
}

/* ---------- KPI Pipeline ---------- */
.pipeline {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    gap: 0;
    margin: 1.5rem 0;
}

.pipeline__stage {
    flex: 1;
    min-width: 120px;
    padding: 1rem 0.8rem;
    text-align: center;
    position: relative;
    background: var(--white);
    border: 1px solid var(--line);
    transition: transform var(--transition-fast);
}

.pipeline__stage:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.pipeline__stage:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.pipeline__stage:not(:last-child)::after {
    content: '▸';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-muted);
    font-size: 0.75rem;
    z-index: 2;
}

.pipeline__stage:hover {
    transform: translateY(-2px);
}

.pipeline__stage-name {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--petrol-600);
    margin-bottom: 0.3rem;
}

.pipeline__stage-kpi {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink);
}

.pipeline--explained .pipeline__stage {
    min-height: 142px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pipeline__stage-description {
    margin-top: 0.45rem;
    color: var(--ink-muted);
    font-size: 0.66rem;
    font-weight: 400;
    line-height: 1.4;
}

/* ---------- Competitor Visual ---------- */
.competitor-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
}

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

.competitor-row__name {
    width: 160px;
    flex-shrink: 0;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--ink);
}

.competitor-row__bar {
    flex: 1;
    height: 28px;
    background: var(--ivory);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.competitor-row__fill {
    height: 100%;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    padding: 0 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--white);
    transition: width 1s var(--ease-out);
    width: 0;
}

.competitor-row__fill--negative {
    background: linear-gradient(90deg, var(--red-500), var(--red-400));
}

.competitor-row__fill--positive {
    background: linear-gradient(90deg, var(--petrol-500), var(--petrol-400));
}

.competitor-row__fill--warning {
    background: linear-gradient(90deg, var(--amber-600), var(--amber-400));
}

/* ---------- Quote Block ---------- */
.quote-block {
    border-left: 4px solid var(--petrol-400);
    background: var(--petrol-50);
    padding: 1.2rem 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 1.5rem 0;
}

.quote-block__text {
    font-family: 'Fraunces', serif;
    font-size: 1.02rem;
    font-style: italic;
    color: var(--navy-700);
    line-height: 1.7;
}

.quote-block--dark {
    background: rgba(255, 255, 255, 0.04);
    border-left-color: var(--amber-400);
}

.quote-block--dark .quote-block__text {
    color: var(--navy-100);
}

/* ---------- Tags/Pills ---------- */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
}

.tag--pe {
    background: var(--petrol-100);
    color: var(--petrol-600);
}

.tag--intl {
    background: var(--navy-100);
    color: var(--navy-600);
}

.tag--strat {
    background: var(--amber-100);
    color: var(--amber-700);
}

.tag--verify {
    background: var(--red-100);
    color: var(--red-600);
}

/* ---------- Dividers ---------- */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
    margin: 2.5rem 0;
}

/* ---------- Sources ---------- */
.sources-section {
    border-top: 1px solid var(--line);
    padding-top: 2rem;
    margin-top: 3rem;
}

.sources-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.sources-list {
    columns: 2;
    gap: 2rem;
    list-style: none;
    padding: 0;
}

.sources-list li {
    font-size: 0.78rem;
    color: var(--ink-muted);
    padding: 0.3rem 0;
    break-inside: avoid;
    line-height: 1.5;
}

.sources-list li a {
    color: var(--petrol-500);
    font-weight: 500;
}

@media (max-width: 640px) {
    .sources-list {
        columns: 1;
    }
}

/* ---------- Footer ---------- */
.footer {
    background: var(--navy-900);
    color: var(--navy-300);
    text-align: center;
    padding: 2.5rem 1.5rem;
    font-size: 0.78rem;
}

.footer a {
    color: var(--petrol-300);
}

/* ---------- Final conclusion ---------- */
.final-conclusion {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.final-decisions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.final-decisions article {
    min-height: 220px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: var(--radius-lg);
}

.final-decisions span,
.final-statement__label {
    color: var(--petrol-300);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.final-decisions strong {
    display: block;
    margin: 1.1rem 0 0.75rem;
    color: var(--white);
    font-family: 'Fraunces', serif;
    font-size: 1.22rem;
    line-height: 1.28;
}

.final-decisions p {
    margin: auto 0 0;
    color: var(--navy-200);
    font-size: 0.82rem;
    line-height: 1.6;
}

.final-statement {
    margin-top: 1.5rem;
    padding: 1.7rem 2rem;
    background: var(--petrol-50);
    border-left: 4px solid var(--petrol-400);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.final-statement p {
    margin: 0.6rem 0 0;
    color: var(--navy-800);
    font-family: 'Fraunces', serif;
    font-size: 1.28rem;
    line-height: 1.5;
}

/* ---------- Responsive fine-tuning ---------- */
@media (max-width: 768px) {
    :root {
        --section-gap: 3.5rem;
    }

    .hero {
        min-height: 90vh;
        padding: 3rem 1.2rem;
    }

    .hallazgo {
        padding: 1.3rem;
    }

    .exec-summary {
        padding: 1.5rem;
    }

    .pipeline {
        flex-wrap: wrap;
    }

    .pipeline__stage {
        min-width: calc(50% - 0.5rem);
        border-radius: var(--radius-sm) !important;
        margin-bottom: 0.5rem;
    }

    .pipeline__stage::after {
        display: none;
    }

    .competitor-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .competitor-row__name {
        width: auto;
    }

    .competitor-row__bar {
        width: 100%;
    }

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

    .district-pair {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

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

    .chart-container {
        padding: 1rem;
    }

    .final-decisions {
        grid-template-columns: 1fr;
    }

    .final-decisions article {
        min-height: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal.visible {
        animation: none;
    }
}

/* ---------- Print ---------- */
@media print {
    .report-nav {
        position: static;
    }

    .hero {
        min-height: auto;
        padding: 2rem;
        page-break-after: always;
    }

    .section {
        page-break-inside: avoid;
        padding: 2rem 0;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .hero__scroll-hint {
        display: none;
    }
}

/* ---------- Reporte Closer: Veredicto, Unit Economics & Scorecard ---------- */
.verdict-banner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.verdict-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--navy-400);
}

.verdict-card--nogo {
    border-top-color: var(--red-600);
}

.verdict-card--pivot {
    border-top-color: var(--amber-500);
}

.verdict-card--go {
    border-top-color: var(--petrol-500);
}

.verdict-card__badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.65rem;
}

.verdict-card--nogo .verdict-card__badge {
    background: var(--red-50);
    color: var(--red-600);
}

.verdict-card--pivot .verdict-card__badge {
    background: var(--amber-50);
    color: var(--amber-700);
}

.verdict-card--go .verdict-card__badge {
    background: var(--petrol-50);
    color: var(--petrol-700);
}

.verdict-card h4 {
    margin-bottom: 0.45rem;
    color: var(--navy-800);
}

.verdict-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.unit-econ-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.2rem 0;
}

.unit-econ-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.25rem;
}

.unit-econ-card--danger {
    border-left: 4px solid var(--red-600);
    background: var(--red-50);
}

.unit-econ-card--warning {
    border-left: 4px solid var(--amber-500);
    background: var(--amber-50);
}

.unit-econ-card--good {
    border-left: 4px solid var(--petrol-500);
    background: var(--petrol-50);
}

.unit-econ-card__title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--navy-800);
    margin-bottom: 0.35rem;
}

.unit-econ-card__metric {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 0.4rem;
}

.unit-econ-card p {
    font-size: 0.88rem;
    margin-bottom: 0;
}

.country-effort-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.8rem;
    margin: 1.1rem 0;
}

.country-effort-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.9rem;
    text-align: center;
}

.country-effort-card span {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.country-effort-card strong {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.35rem;
    color: var(--navy-800);
    margin: 0.25rem 0;
}

.country-effort-card small {
    display: block;
    font-size: 0.78rem;
    color: var(--ink-soft);
    line-height: 1.35;
}

.scorecard-table td strong {
    font-family: 'IBM Plex Mono', monospace;
}

@media (max-width: 900px) {

    .verdict-banner,
    .unit-econ-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {
    .country-effort-grid {
        grid-template-columns: 1fr;
    }
}

.simple-takeaway {
    margin-top: 1rem;
    padding: 0.95rem 1.15rem;
    border-left: 4px solid var(--petrol-500);
    background: var(--petrol-50);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.94rem;
    color: var(--ink);
}

.simple-takeaway strong {
    color: var(--petrol-700);
}

.before-after-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.before-after-card {
    border-radius: var(--radius-md);
    padding: 1.25rem 1.35rem;
    border: 1px solid var(--line);
}

.before-after-card--before {
    background: var(--red-50);
    border-left: 4px solid var(--red-600);
}

.before-after-card--after {
    background: var(--petrol-50);
    border-left: 4px solid var(--petrol-500);
}

.before-after-card__tag {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.before-after-card--before .before-after-card__tag {
    color: var(--red-600);
}

.before-after-card--after .before-after-card__tag {
    color: var(--petrol-700);
}

.before-after-card h4 {
    margin-bottom: 0.55rem;
    color: var(--navy-800);
}

.before-after-card ul {
    margin: 0;
    padding-left: 1.15rem;
    font-size: 0.92rem;
    color: var(--ink-soft);
}

.before-after-card li+li {
    margin-top: 0.35rem;
}

@media (max-width: 768px) {
    .before-after-grid {
        grid-template-columns: 1fr;
    }
}

.red-note-ref {
    color: var(--red-600);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.red-note-ref:hover {
    color: var(--red-500);
}

.conclusion--alert-red {
    background: linear-gradient(135deg, #9B2C22 0%, #B83A2E 100%);
    border-color: rgba(255, 255, 255, 0.2);
    border-left: 5px solid var(--amber-300);
    box-shadow: var(--shadow-lg);
}

.conclusion--alert-red .conclusion__label {
    color: var(--amber-200);
    font-weight: 700;
}

.conclusion--alert-red .conclusion__text {
    color: var(--white);
}

.conclusion--alert-red .conclusion__text strong {
    color: var(--amber-200);
}

/* ---------- Página Explorador de Palabras Clave ---------- */
.page-header-compact {
    background: linear-gradient(160deg, var(--navy-900) 0%, #15243E 55%, var(--navy-600) 100%);
    color: var(--white);
    padding: 3rem 1.5rem 3.25rem;
}

.page-header-compact__inner {
    max-width: var(--container-max);
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--petrol-200);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1.4rem;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
}

.page-header-compact h1 {
    color: var(--white);
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    margin-bottom: 0.85rem;
    max-width: 820px;
}

.page-header-compact p {
    color: var(--navy-100);
    max-width: 760px;
    margin-bottom: 0;
    font-size: 1.02rem;
}

.kw-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.4rem 0;
}

.kw-summary-card {
    text-align: left;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
    font-family: inherit;
}

.kw-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--petrol-400);
}

.kw-summary-card__top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.kw-summary-card__count {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--petrol-700);
    background: var(--petrol-50);
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}

.kw-summary-card h4 {
    color: var(--navy-800);
    font-size: 1rem;
    margin: 0;
}

.kw-summary-card__bid {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
    color: var(--amber-700);
    font-weight: 600;
    margin: 0.35rem 0 0.45rem;
}

.kw-summary-card p {
    font-size: 0.86rem;
    color: var(--ink-soft);
    margin: 0;
    line-height: 1.45;
}

.kw-controls {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.kw-controls__top {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
}

.kw-search {
    flex: 1 1 280px;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--paper);
}

.kw-sort {
    flex: 0 1 260px;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--paper);
}

.kw-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.kw-filter-btn {
    border: 1px solid var(--line-strong);
    background: var(--paper);
    color: var(--ink-soft);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.kw-filter-btn:hover {
    border-color: var(--petrol-500);
    color: var(--petrol-700);
}

.kw-filter-btn.is-active {
    background: var(--navy-800);
    border-color: var(--navy-800);
    color: var(--white);
}

.kw-counter {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--ink-muted);
    margin-top: 0.8rem;
}

.kw-table td.num,
.kw-table th.num {
    text-align: right;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.86rem;
    white-space: nowrap;
}

.kw-pill {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.14rem 0.5rem;
    border-radius: 999px;
    background: var(--navy-50);
    color: var(--navy-700);
    margin: 0.1rem 0.2rem 0.1rem 0;
    white-space: nowrap;
}

.kw-pill--good {
    background: var(--petrol-50);
    color: var(--petrol-700);
}

.kw-pill--warn {
    background: var(--amber-50);
    color: var(--amber-700);
}

.kw-pill--bad {
    background: var(--red-50);
    color: var(--red-600);
}

@media (max-width: 900px) {
    .kw-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .kw-summary-grid {
        grid-template-columns: 1fr;
    }
}