/* =========================================================
   BeAlgarve — Barómetro
   Editorial-coastal design system
   ========================================================= */

:root {
    /* Palette */
    --navy: #08165F;
    --ink: #111A5C;
    --slate: #27306F;
    --mute: #7A80A8;

    --teal-900: #08165F;
    --teal-700: #0B2472;
    --teal-500: #006FCB;
    --teal-400: #14A8E8;
    --teal-100: #E7F2FB;
    --teal-50: #F3F8FD;

    --sand-50: #F2EEEE;
    --sand-100: #ECE7E7;
    --sand-200: #DAD3D3;
    --sand-300: #C8BDBD;

    --coral: #14A8E8;
    --coral-dark: #006FCB;
    --sun: #14A8E8;

    --line: #D8D3DD;
    --line-dark: #08165F;

    /* Typography */
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Sizing */
    --container: 1280px;
    --radius-sm: 6px;
    --radius:    14px;
    --radius-lg: 28px;

    /* Motion */
    --ease: cubic-bezier(.2,.7,.2,1);
    --ease-out: cubic-bezier(.16,1,.3,1);
}

/* ================ BASE ================ */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--sand-50);
    overflow-x: hidden;
    font-weight: 400;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--teal-500); color: var(--sand-50); }

.container {
    width: 100%;
    max-width: var(--container);
    padding: 0 32px;
    margin: 0 auto;
}

/* ================ TYPOGRAPHY ================ */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--teal-700);
    margin: 0 0 24px;
}
.eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--teal-500);
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--navy);
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.05;
    font-variation-settings: "opsz" 144, "SOFT" 50;
}

.display-1 {
    font-size: clamp(34px, 4.5vw, 82px);
    line-height: 0.95;
    letter-spacing: -0.035em;
    font-weight: 300;
}
.display-1 em {
    font-style: italic;
    font-variation-settings: "opsz" 144, "SOFT" 100;
    color: var(--teal-700);
}

.section-title {
    font-size: clamp(36px, 5vw, 68px);
    line-height: 1.0;
    letter-spacing: -0.025em;
    font-weight: 350;
}
.section-title em {
    font-style: italic;
    color: var(--teal-700);
    font-variation-settings: "opsz" 144, "SOFT" 100;
}

.lead {
    font-size: clamp(17px, 1.5vw, 21px);
    line-height: 1.5;
    color: var(--slate);
    max-width: 56ch;
    font-weight: 400;
}

/* ================ HEADER ================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--teal-500);
    width: 0%;
    z-index: 9999;
    transition: width 0.05s linear;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(251, 248, 244, 0.7);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border-bottom: 1px solid transparent;
    transition: all 0.4s var(--ease);
}
.site-header.is-scrolled {
    background: rgba(251, 248, 244, 0.92);
    border-bottom-color: var(--line);
}
.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

/* Logo */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--navy);
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.02em;
    transition: opacity 0.3s var(--ease);
}
.logo img {
    width: 70%;
}
.logo:hover { opacity: 0.7; }
.logo-mark {
    width: 36px;
    height: 36px;
    color: var(--teal-500);
    display: inline-flex;
}
.logo-mark svg { width: 100%; height: 100%; }
.logo-text { display: inline-flex; align-items: baseline; }
.logo-be {
    font-weight: 350;
    color: var(--teal-700);
}
.logo-alg {
    font-weight: 350;
    font-style: italic;
    font-variation-settings: "opsz" 144, "SOFT" 100;
}

/* Nav */
.main-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.main-nav a {
    display: inline-block;
    padding: 10px 16px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ink);
    border-radius: 100px;
    transition: all 0.3s var(--ease);
    position: relative;
}
.main-nav a:hover { background: var(--sand-100); }
.main-nav a.is-active { color: var(--teal-700); }
.main-nav a.is-active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--teal-500);
    border-radius: 50%;
}

.nav-cta {
    background: var(--navy) !important;
    color: var(--sand-50) !important;
    padding: 11px 20px !important;
    margin-left: 12px;
    transition: all 0.3s var(--ease) !important;
}
.nav-cta:hover {
    background: var(--teal-700) !important;
    transform: translateY(-1px);
}
.nav-cta i { margin-left: 6px; font-size: 12px; transition: transform 0.3s var(--ease); }
.nav-cta:hover i { transform: translateX(4px); }

.nav-close { display: none; }

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Lang switcher */
.lang-switcher {
    position: relative;
}
.lang-current {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--ink);
    border: 1px solid var(--line);
    transition: all 0.3s var(--ease);
}
.lang-current:hover {
    border-color: var(--teal-500);
    color: var(--teal-700);
}
.lang-current i:first-child { font-size: 13px; }
.lang-caret { font-size: 9px; transition: transform 0.3s var(--ease); }
.lang-switcher.is-open .lang-caret { transform: rotate(180deg); }

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--sand-50);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    list-style: none;
    margin: 0;
    padding: 6px;
    box-shadow: 0 12px 40px rgba(0, 62, 71, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s var(--ease);
}
.lang-switcher.is-open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lang-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    transition: background 0.2s var(--ease);
}
.lang-menu a:hover { background: var(--teal-50); color: var(--teal-700); }
.lang-menu a.is-active {
    background: var(--teal-50);
    color: var(--teal-700);
}
.lang-name {
    font-weight: 400;
    color: var(--mute);
    margin-left: auto;
    font-size: 12px;
}
.lang-menu a:hover .lang-name { color: var(--teal-700); }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
}
.nav-toggle span {
    display: block;
    width: 16px;
    height: 1.5px;
    background: var(--ink);
    margin: 0 auto;
    transition: all 0.3s var(--ease);
}

/* ================ HERO ================ */
.hero {
    position: relative;
    min-height: 100vh;
    padding: 140px 0 80px;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.hero-grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.0 0 0 0 0 0.4 0 0 0 0 0.45 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
    opacity: 0.5;
    mix-blend-mode: multiply;
}
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}
.hero-orb-1 {
    width: 480px; height: 480px;
    background: radial-gradient(circle, var(--teal-400), transparent 70%);
    top: -120px; right: -100px;
    animation: float 18s ease-in-out infinite;
}
.hero-orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, var(--coral), transparent 70%);
    bottom: -100px; left: -80px;
    opacity: 0.3;
    animation: float 22s ease-in-out infinite reverse;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, -30px); }
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--teal-700);
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeUp 0.9s var(--ease-out) 0.1s forwards;
}
.hero-eyebrow .pulse {
    width: 6px; height: 6px;
    background: var(--teal-500);
    border-radius: 50%;
    position: relative;
}
.hero-eyebrow .pulse::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--teal-500);
    animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

.hero-title {
    margin-bottom: 32px;
}
.hero-title-line {
    display: block;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 1s var(--ease-out) forwards;
}
.hero-title-line:nth-child(1) { animation-delay: 0.2s; }
.hero-title-line:nth-child(2) { animation-delay: 0.35s; }
.hero-title-line:nth-child(3) { animation-delay: 0.5s; }

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

.hero-lead {
    margin-bottom: 48px;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out) 0.7s forwards;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out) 0.85s forwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.4s var(--ease);
    border: 1px solid transparent;
}
.btn-primary {
    background: var(--navy);
    color: var(--sand-50);
}
.btn-primary:hover {
    background: var(--teal-700);
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0, 102, 113, 0.3);
}
.btn-primary i {
    transition: transform 0.4s var(--ease);
}
.btn-primary:hover i { transform: translate(4px, -4px); }

.btn-ghost {
    background: transparent;
    color: var(--navy);
    border-color: var(--navy);
}
.btn-ghost:hover {
    background: var(--navy);
    color: var(--sand-50);
}
.btn-ghost i { transition: transform 0.4s var(--ease); }
.btn-ghost:hover i { transform: translateX(4px); }

/* Hero floating stats */
@media (min-width: 1101px) {
    .hero-inner {
        padding-right: min(46vw, 536px);
    }
}
.hero-floats {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: max(32px, calc((100vw - var(--container)) / 2 + 32px));
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: min(40vw, 476px);
    transform: translateY(-50%);
    pointer-events: none;
}
.float-card {
    display: block;
    min-width: 0;
    padding: 15px 18px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(0, 62, 71, 0.08);
    opacity: 0;
    animation: floatIn 1.2s var(--ease-out) forwards;
    pointer-events: auto;
    text-decoration: none;
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.float-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 24px 52px rgba(0, 62, 71, 0.16);
}
.hero-floats[data-hero-statistics="rotating"] {
    display: block;
    height: 220px;
}
.hero-floats[data-hero-statistics="rotating"] .float-card {
    position: absolute;
    top: 0;
    width: calc(50% - 7px);
    min-height: 172px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(14px) scale(0.98);
    animation: none;
    transition: opacity 850ms var(--ease), transform 850ms var(--ease), top 850ms var(--ease), visibility 0s linear 850ms;
}
.hero-floats[data-hero-statistics="rotating"] .float-card[data-hero-slot="0"] {
    top: -16px;
    left: 0;
}
.hero-floats[data-hero-statistics="rotating"] .float-card[data-hero-slot="1"] {
    top: 20px;
    right: 0;
}
.hero-floats[data-hero-statistics="rotating"] .float-card.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
}
@keyframes floatIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.float-card-label {
    min-height: 2.8em;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mute);
}
.float-card-value {
    display: flex;
    align-items: baseline;
    gap: 5px;
    font-family: var(--font-display);
    font-size: clamp(24px, 2.3vw, 32px);
    font-weight: 350;
    color: var(--navy);
    line-height: 1;
}
.float-card-value strong {
    font: inherit;
    font-weight: inherit;
}
.float-card-value small {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--teal-700);
}
.float-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-top: 9px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--mute);
}
.float-card-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--teal-700);
}
.float-card-trend.is-down { color: var(--coral-dark); }

.scroll-cue {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--slate);
    opacity: 0;
    animation: fadeUp 1s var(--ease-out) 1.4s forwards;
}
.scroll-cue::after {
    content: '';
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--slate), transparent);
    animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ================ SECTION COMMON ================ */
section {
    padding: 120px 0;
    position: relative;
}
.section-head {
    max-width: 800px;
    margin-bottom: 72px;
}

/* ================ ABOUT ================ */
.about {
    background: var(--sand-50);
    border-top: 1px solid var(--line);
}
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 80px;
    align-items: start;
}
.about-text p {
    font-size: 18px;
    line-height: 1.7;
    color: var(--slate);
    margin: 0 0 20px;
}
.about-text p:first-of-type {
    font-size: 22px;
    color: var(--ink);
    line-height: 1.5;
}

.pillar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.pillar {
    background: var(--sand-50);
    padding: 32px;
    transition: background 0.4s var(--ease);
    position: relative;
}
.pillar:hover {
    background: var(--teal-50);
}
.pillar i {
    font-size: 24px;
    color: var(--teal-700);
    margin-bottom: 20px;
    display: inline-block;
    transition: transform 0.4s var(--ease);
}
.pillar:hover i {
    transform: translateY(-4px);
    color: var(--teal-500);
}
.pillar h3 {
    font-size: 20px;
    margin-bottom: 8px;
    font-weight: 400;
}
.pillar p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--slate);
    margin: 0;
}
.pillar-num {
    position: absolute;
    top: 20px;
    right: 24px;
    font-family: var(--font-display);
    font-size: 12px;
    font-style: italic;
    color: var(--mute);
    font-weight: 300;
}

/* ================ STATS ================ */
.stats {
    background: var(--navy);
    color: var(--sand-50);
    border-radius: 0;
    position: relative;
    overflow: hidden;
}
.stats::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 80% 20%, rgba(0, 169, 183, 0.18), transparent 50%);
    pointer-events: none;
}
.stats .eyebrow { color: var(--teal-400); }
.stats .eyebrow::before { background: var(--teal-400); }
.stats .section-title { color: var(--sand-50); }
.stats .section-title em { color: var(--teal-400); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    position: relative;
}

.stat-card {
    grid-column: span 4;
    padding: 36px 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.5s var(--ease);
    position: relative;
    overflow: hidden;
}
.stat-card:hover {
    border-color: var(--teal-400);
    background: rgba(0, 169, 183, 0.08);
    transform: translateY(-4px);
}
.stat-card.is-large { grid-column: span 6; }
.stat-card.is-tall { grid-column: span 6; padding: 48px 36px; }

.stat-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mute);
    margin-bottom: 24px;
}
.stat-value {
    font-family: var(--font-display);
    font-size: clamp(38px, 4vw, 76px);
    font-weight: 300;
    line-height: 0.95;
    color: var(--sand-50);
    letter-spacing: -0.03em;
}
.stat-value .unit {
    font-size: 0.4em;
    font-style: italic;
    color: var(--teal-400);
    margin-left: 8px;
    font-variation-settings: "opsz" 144, "SOFT" 100;
}
.stat-meta {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--mute);
}
.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(0, 169, 183, 0.15);
    color: var(--teal-400);
}

.stats-cta {
    grid-column: span 12;
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}
.stats-cta a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--teal-400);
    font-weight: 600;
    font-size: 14px;
    transition: gap 0.3s var(--ease);
}
.stats-cta a:hover { gap: 16px; }

/* ================ MAP SECTION ================ */
.map-section {
    background: var(--sand-100);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.map-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 48px;
    align-items: stretch;
}
.map-container {
    position: relative;
    height: 600px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 62, 71, 0.15);
    border: 1px solid var(--line);
    background: var(--sand-50);
}
#leafletMap {
    height: 100%;
    width: 100%;
    background: var(--teal-50);
}
.map-overlay {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--teal-700);
    z-index: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
}
.map-tools {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 600;
    display: grid;
    gap: 8px;
    width: min(310px, calc(100% - 32px));
}
.map-search {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 20px rgba(8, 22, 95, 0.08);
    color: var(--teal-700);
}
.map-search:focus-within {
    border-color: var(--teal-500);
    box-shadow: 0 0 0 4px rgba(0, 111, 203, 0.12);
}
.map-search input,
.map-search select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
}
.map-search select {
    cursor: pointer;
}
.map-search input::placeholder {
    color: var(--mute);
}
.map-search-results {
    max-height: 312px;
    margin-top: 8px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 34px rgba(8, 22, 95, 0.15);
}
.map-search-result {
    width: 100%;
    display: grid;
    gap: 3px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    text-align: left;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.map-search-result:last-child {
    border-bottom: 0;
}
.map-search-result:hover,
.map-search-result:focus-visible {
    background: var(--teal-50);
    color: var(--teal-700);
    outline: 0;
}
.map-search-result > span:first-child {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
}
.map-search-result > span:last-child,
.map-search-empty {
    color: var(--mute);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.35;
}
.map-search-empty {
    margin: 0;
    padding: 14px;
}
.map-legend {
    position: absolute;
    top: 66px;
    left: 16px;
    z-index: 600;
    width: min(250px, calc(100% - 32px));
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 30px rgba(8, 22, 95, 0.1);
    overflow: hidden;
}
.map-legend-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 13px;
    color: var(--teal-700);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
}
.map-legend-toggle:hover {
    background: var(--teal-50);
}
.map-legend-list {
    padding: 0 8px 8px;
    border-top: 1px solid var(--line);
}
.map-legend-item {
    width: 100%;
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 9px 5px;
    color: var(--ink);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    transition: opacity 0.2s var(--ease), color 0.2s var(--ease);
}
.map-legend-item:hover,
.map-legend-item:focus-visible {
    color: var(--teal-700);
    outline: 0;
}
.map-legend-item.is-inactive {
    opacity: 0.42;
}
.map-legend-dot {
    width: 10px;
    height: 10px;
    border: 1px solid rgba(8, 22, 95, 0.16);
    border-radius: 50%;
}
.map-legend-label {
    overflow: hidden;
    text-overflow: ellipsis;
}
.map-legend-count {
    color: var(--mute);
    font-size: 10px;
}
.map-legend-reset {
    width: 100%;
    margin-top: 4px;
    padding: 8px 5px 3px;
    border-top: 1px solid var(--line);
    color: var(--teal-700);
    font-size: 10px;
    font-weight: 500;
    text-align: left;
}
.map-legend-reset:hover,
.map-legend-reset:focus-visible {
    color: var(--navy);
    outline: 0;
}

.municipality-panel {
    background: var(--sand-50);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 36px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.muni-empty {
    text-align: center;
    margin: auto 0;
    padding: 32px 0;
}
.muni-empty i {
    font-size: 36px;
    color: var(--teal-500);
    margin-bottom: 16px;
}
.muni-empty h4 {
    font-size: 22px;
    margin-bottom: 10px;
}
.muni-empty p {
    color: var(--slate);
    font-size: 14px;
    margin: 0;
}

.muni-content { display: none; }
.muni-content.is-active { display: flex; flex-direction: column; flex: 1; }

.muni-name {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 350;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
.muni-tag {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--teal-700);
    margin-bottom: 28px;
}
.muni-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
}
.muni-stat {
    background: var(--sand-50);
    padding: 20px;
}
.muni-stat-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mute);
    margin-bottom: 8px;
}
.muni-stat-value {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 350;
    color: var(--navy);
    line-height: 1;
}
.muni-stat-value .unit {
    font-size: 0.5em;
    color: var(--slate);
    margin-left: 4px;
}
.muni-bar {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.muni-bar-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mute);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}
.muni-bar-track {
    height: 6px;
    background: var(--sand-200);
    border-radius: 100px;
    overflow: hidden;
}
.muni-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--teal-500), var(--teal-400));
    border-radius: 100px;
    transition: width 0.8s var(--ease);
}

/* Leaflet customization */
.leaflet-container {
    font-family: var(--font-body);
}
.leaflet-popup-content-wrapper {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(0, 62, 71, 0.15);
}
.leaflet-popup-content {
    margin: 14px 18px;
    font-family: var(--font-body);
}
.leaflet-popup-content strong {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--navy);
    font-weight: 350;
}
.leaflet-popup-tip { background: var(--sand-50); }

.muni-marker {
    background: var(--teal-500);
    border: 3px solid var(--sand-50);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 169, 183, 0.4);
    transition: all 0.3s var(--ease);
    cursor: pointer;
}
.muni-marker:hover, .muni-marker.is-active {
    background: var(--coral);
    transform: scale(1.3);
    box-shadow: 0 6px 20px rgba(232, 149, 107, 0.5);
}

/* ================ INDICATORS ================ */
.indicators {
    background: var(--sand-50);
}
.indicator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.indicator-card {
    background: var(--sand-50);
    padding: 32px;
    transition: all 0.4s var(--ease);
    position: relative;
    text-decoration: none;
    color: inherit;
    display: block;
    overflow: hidden;
}
.indicator-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
    opacity: 0;
    transition: opacity 0.4s var(--ease);
    z-index: 0;
}
.indicator-card > * { position: relative; z-index: 1; }
.indicator-card:hover { color: var(--sand-50); }
.indicator-card:hover::before { opacity: 1; }
.indicator-card:hover .indicator-arrow { opacity: 1; transform: translate(4px, -4px); }

.indicator-num {
    font-family: var(--font-display);
    font-size: 14px;
    font-style: italic;
    color: var(--mute);
    font-weight: 300;
    margin-bottom: 12px;
    transition: color 0.4s var(--ease);
}
.indicator-card:hover .indicator-num { color: var(--teal-100); }

.indicator-name {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 400;
    color: var(--navy);
    line-height: 1.1;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
    transition: color 0.4s var(--ease);
}
.indicator-card:hover .indicator-name { color: var(--sand-50); }

.indicator-desc {
    font-size: 14px;
    color: var(--slate);
    line-height: 1.5;
    margin: 0;
    transition: color 0.4s var(--ease);
}
.indicator-card:hover .indicator-desc { color: var(--teal-100); }

.dashboard-card-rows {
    display: grid;
    gap: 24px;
}
.indicator-grid--dashboard-row--statistics {
    display: block;
}
.indicator-grid--dashboard-row--statistics .indicator-card {
    width: 100%;
    min-height: 220px;
}
.indicator-grid--dashboard-row--thematic,
.indicator-grid--dashboard-row--value-chains {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.indicator-card--value-chain {
    display: flex;
    min-height: 270px;
    flex-direction: column;
}
.indicator-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
    padding-top: 24px;
}
.indicator-card-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--teal-700);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}
.indicator-card-action:hover {
    color: var(--navy);
}
.indicator-card:hover .indicator-card-action,
.indicator-card:hover .indicator-card-action:hover {
    color: var(--sand-50);
}
.indicator-card:hover .indicator-card-action.is-disabled {
    color: var(--teal-100);
}
.indicator-card-action.is-disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.indicator-arrow {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--sand-50);
    opacity: 0;
    transition: all 0.4s var(--ease);
    font-size: 12px;
}

/* ================ ECOSYSTEM ================ */
.ecosystem {
    background: var(--sand-100);
    border-top: 1px solid var(--line);
}
.eco-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}
.eco-card {
    background: var(--sand-50);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 42px 32px;
    text-align: center;
    transition: all 0.4s var(--ease);
    position: relative;
    overflow: hidden;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.eco-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--teal-50);
    color: var(--teal-700);
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    transition: all 0.4s var(--ease);
    box-shadow: inset 0 0 0 1px rgba(0, 111, 203, 0.08);
}
.eco-count {
    font-family: var(--font-display);
    font-size: clamp(40px, 3.8vw, 56px);
    font-weight: 700;
    color: var(--navy);
    line-height: 0.95;
    margin-bottom: 10px;
    letter-spacing: -0.04em;
}
.eco-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--slate);
    line-height: 1.35;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eco-cta {
    text-align: center;
}

/* ================ PARTNERS ================ */
.partners {
    background: var(--sand-50);
    padding: 80px 0;
}
.partners-track {
    display: flex;
    align-items: center;
    gap: 80px;
    overflow: hidden;
    margin-top: 40px;
    mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.partners-list {
    display: flex;
    gap: 80px;
    align-items: center;
    animation: scroll 40s linear infinite;
    flex-shrink: 0;
}
@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}
.partner {
    flex-shrink: 0;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 350;
    color: var(--mute);
    letter-spacing: -0.02em;
    white-space: nowrap;
    transition: color 0.3s var(--ease);
}
.partner:hover { color: var(--teal-700); }
.partner em {
    font-style: italic;
    color: var(--coral);
}

/* ================ CTA BAND ================ */
.cta-band {
    background: var(--navy);
    color: var(--sand-50);
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(0, 169, 183, 0.2), transparent 50%);
}
.cta-band-inner {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 32px;
}
.cta-band h2 {
    color: var(--sand-50);
    font-size: clamp(40px, 6vw, 80px);
    font-weight: 350;
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin-bottom: 24px;
}
.cta-band h2 em {
    font-style: italic;
    color: var(--teal-400);
    font-variation-settings: "opsz" 144, "SOFT" 100;
}
.cta-band p {
    color: var(--mute);
    font-size: 18px;
    margin-bottom: 40px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.cta-band .btn-primary {
    background: var(--teal-500);
    color: var(--navy);
}
.cta-band .btn-primary:hover {
    background: var(--sand-50);
    box-shadow: 0 18px 40px rgba(0, 169, 183, 0.4);
}

/* ================ FOOTER ================ */
.site-footer {
    background: var(--sand-100);
    color: var(--ink);
    padding: 80px 0 0;
    position: relative;
    overflow: hidden;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 48px;
    margin-bottom: 80px;
}
.footer-brand .logo {
    margin-bottom: 20px;
}
.footer-about {
    color: var(--slate);
    font-size: 14px;
    line-height: 1.6;
    max-width: 32ch;
    margin-bottom: 24px;
}
.footer-socials {
    display: flex;
    gap: 8px;
}
.footer-socials a {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--sand-50);
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--slate);
    transition: all 0.3s var(--ease);
    font-size: 14px;
}
.footer-socials a:hover {
    background: var(--teal-500);
    color: var(--sand-50);
    border-color: var(--teal-500);
    transform: translateY(-2px);
}

.footer-col h4, .footer-newsletter h4 {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--navy);
    margin: 0 0 20px;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col li {
    margin-bottom: 10px;
}
.footer-col a {
    color: var(--slate);
    font-size: 14px;
    transition: color 0.3s var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.footer-col a:hover { color: var(--teal-700); }
.footer-col a i { font-size: 9px; opacity: 0.5; }

.footer-newsletter p {
    color: var(--slate);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 20px;
}
.newsletter-form {
    display: flex;
    background: var(--sand-50);
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: 4px;
    transition: border-color 0.3s var(--ease);
    position: relative;
}
.newsletter-form:focus-within { border-color: var(--teal-500); }
.newsletter-form input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    padding: 10px 16px;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
}
.newsletter-form button {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--sand-50);
    transition: all 0.3s var(--ease);
}
.newsletter-form button:hover {
    background: var(--teal-700);
    transform: rotate(-45deg);
}
.newsletter-success {
    position: absolute;
    inset: 0;
    background: var(--teal-50);
    color: var(--teal-700);
    border-radius: 100px;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    gap: 8px;
}
.newsletter-form.is-sent .newsletter-success { display: flex; }

/* Big footer mark */
.footer-mark {
    text-align: center;
    overflow: hidden;
    line-height: 0.85;
    margin: 40px 0 0;
}
.footer-mark span {
    font-family: var(--font-display);
    font-size: clamp(80px, 22vw, 360px);
    font-weight: 300;
    font-style: italic;
    color: transparent;
    -webkit-text-stroke: 1px var(--teal-700);
    letter-spacing: -0.04em;
    background: linear-gradient(180deg, transparent 0%, transparent 50%, var(--sand-100) 95%);
    -webkit-background-clip: text;
    background-clip: text;
    font-variation-settings: "opsz" 144, "SOFT" 100;
    user-select: none;
}

.footer-bottom {
    padding: 32px 0;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--slate);
}
.footer-bottom p { margin: 0; }
.footer-credit a {
    color: var(--teal-700);
    font-weight: 600;
    transition: color 0.3s var(--ease);
}
.footer-credit a:hover { color: var(--coral-dark); }

/* ================ REVEAL ANIMATIONS ================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal-stagger.is-visible > * {
    opacity: 1;
    transform: translateY(0);
}
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.3s; }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.35s; }
.reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 0.4s; }
.reveal-stagger.is-visible > *:nth-child(9) { transition-delay: 0.45s; }
.reveal-stagger.is-visible > *:nth-child(n+10) { transition-delay: 0.5s; }

/* ================ RESPONSIVE ================ */
@media (max-width: 1100px) {
    .map-layout { grid-template-columns: 1fr; }
    .map-container { height: 500px; }
    .eco-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-floats { display: none; }
}

@media (max-width: 900px) {
    .container { padding: 0 24px; }
    .header-inner { padding: 14px 24px; }

    .nav-toggle { display: flex; }
    .main-nav {
        position: fixed;
        top: 0; right: 0;
        width: 100%;
        max-width: 420px;
        height: 100vh;
        background: var(--sand-50);
        padding: 80px 32px 32px;
        transform: translateX(100%);
        transition: transform 0.5s var(--ease);
        z-index: 999;
        box-shadow: -20px 0 60px rgba(0, 62, 71, 0.2);
    }
    .main-nav.is-open { transform: translateX(0); }
    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    .main-nav a {
        display: block;
        padding: 16px 20px;
        font-size: 18px;
        border-radius: 12px;
    }
    .main-nav .nav-cta {
        margin-left: 0 !important;
        margin-top: 16px;
        text-align: center;
        justify-content: center;
        display: flex !important;
    }
    .nav-close {
        display: flex;
        position: absolute;
        top: 24px; right: 24px;
        width: 40px; height: 40px;
        border-radius: 50%;
        background: var(--sand-100);
        align-items: center;
        justify-content: center;
        font-size: 18px;
    }

    .about-grid { grid-template-columns: 1fr; gap: 48px; }
    .pillar-grid { grid-template-columns: 1fr 1fr; }

    .stats-grid { grid-template-columns: 1fr; }
    .stat-card, .stat-card.is-large, .stat-card.is-tall { grid-column: span 1; }

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

    section { padding: 80px 0; }
    .hero { padding: 120px 0 60px; }
}

@media (max-width: 600px) {
    .container { padding: 0 20px; }
    .header-inner { padding: 12px 20px; gap: 12px; }
    .logo { font-size: 18px; }
    .logo-mark { width: 30px; height: 30px; }
    .lang-current { padding: 7px 10px; font-size: 12px; }
    .lang-current span { display: none; }

    .hero { padding: 110px 0 40px; min-height: auto; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .btn { justify-content: center; }
    .scroll-cue { display: none; }

    .pillar-grid { grid-template-columns: 1fr; }
    .pillar { padding: 24px; }

    .map-container { height: 380px; }
    .municipality-panel { padding: 24px; }
    .muni-name { font-size: 32px; }

    .indicator-grid,
    .indicator-grid--dashboard-row--thematic,
    .indicator-grid--dashboard-row--value-chains { grid-template-columns: 1fr; }
    .eco-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .hero-orb { animation: none; }
}

#map .map-layout {
    grid-template-columns: 1fr;
}

#map .map-container {
    min-height: 620px;
}

/* ================ DASHBOARDS ================ */
.dashboard-hero {
    position: relative;
    overflow: hidden;
    padding: 180px 0 96px;
    background: var(--sand-50);
}
.dashboard-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;
}
.dashboard-hero-copy {
    max-width: 820px;
}
.dashboard-hero-copy .display-1 {
    max-width: 13ch;
}
.dashboard-hero-copy .lead {
    margin: 28px 0 0;
}
.dashboard-hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    color: var(--slate);
    font-size: 13px;
    font-weight: 600;
}
.dashboard-hero-meta i {
    color: var(--teal-500);
}
.dashboard-hero-action {
    flex: 0 0 auto;
    white-space: nowrap;
}

.dashboard-kpis {
    padding: 0;
    position: relative;
    z-index: 2;
    background: var(--navy);
}
.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}
.dashboard-kpi {
    min-height: 190px;
    padding: 34px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    transition: background 0.3s var(--ease);
}
.dashboard-kpi:hover {
    background: rgba(255, 255, 255, 0.05);
}
.dashboard-kpi p {
    max-width: 22ch;
    margin: 0;
    color: var(--teal-100);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.dashboard-kpi strong {
    margin-top: 26px;
    color: var(--sand-50);
    font-family: var(--font-display);
    font-size: clamp(32px, 3.4vw, 56px);
    font-weight: 350;
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.dashboard-note {
    padding: 36px 0;
    background: var(--teal-50);
    border-bottom: 1px solid var(--teal-100);
}
.dashboard-note-inner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    max-width: 900px;
}
.dashboard-note-inner > i {
    margin-top: 4px;
    color: var(--teal-500);
    font-size: 20px;
}
.dashboard-note-inner p {
    margin: 0;
    color: var(--slate);
    font-size: 14px;
    line-height: 1.6;
}

.dashboard-section {
    padding: 100px 0;
    background: var(--sand-50);
}
.dashboard-section--muted {
    background: var(--sand-100);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.dashboard-section .section-head {
    margin-bottom: 48px;
}
.dashboard-chart-grid {
    display: grid;
    gap: 24px;
}
.dashboard-chart-grid--single,
.dashboard-chart-grid--wide {
    grid-template-columns: minmax(0, 1fr);
}
.dashboard-chart-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dashboard-chart-grid--cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.dashboard-figure {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 36px rgba(8, 22, 95, 0.06);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.dashboard-figure:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 44px rgba(8, 22, 95, 0.12);
}
.dashboard-figure img {
    width: 100%;
    min-height: 80px;
    object-fit: contain;
    background: #fff;
}
.dashboard-figure figcaption {
    padding: 14px 18px 16px;
    border-top: 1px solid var(--line);
    color: var(--slate);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}
.dashboard-chart-grid--cards .dashboard-figure figcaption {
    display: none;
}

.dashboard-disclosure {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--sand-50);
    overflow: hidden;
}
.dashboard-disclosure summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 40px;
    cursor: pointer;
    list-style: none;
}
.dashboard-disclosure summary::-webkit-details-marker {
    display: none;
}
.dashboard-disclosure-copy {
    display: block;
    max-width: 760px;
}
.dashboard-disclosure-copy .eyebrow {
    margin-bottom: 14px;
}
.dashboard-disclosure-title,
.dashboard-disclosure-description {
    display: block;
}
.dashboard-disclosure-title {
    color: var(--navy);
    font-family: var(--font-display);
    font-size: clamp(30px, 3.2vw, 48px);
    font-weight: 350;
    letter-spacing: -0.025em;
    line-height: 1.05;
}
.dashboard-disclosure-description {
    margin-top: 14px;
    color: var(--slate);
    font-size: 15px;
    line-height: 1.55;
}
.dashboard-disclosure-icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--teal-700);
    transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.dashboard-disclosure:hover .dashboard-disclosure-icon {
    background: var(--teal-50);
}
.dashboard-disclosure[open] .dashboard-disclosure-icon {
    transform: rotate(45deg);
}
.dashboard-disclosure-content {
    padding: 0 40px 40px;
}

.dashboard-resources {
    padding: 96px 0;
    background: var(--navy);
}
.dashboard-resources .eyebrow,
.dashboard-resources .section-title {
    color: var(--sand-50);
}
.dashboard-resources .eyebrow::before {
    background: var(--teal-400);
}
.dashboard-resources-inner {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 48px;
    align-items: end;
}
.dashboard-resource-links {
    display: grid;
    gap: 12px;
}
.dashboard-resource-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-sm);
    color: var(--sand-50);
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.dashboard-resource-link:hover {
    background: rgba(20, 168, 232, 0.16);
    border-color: var(--teal-400);
    transform: translateX(4px);
}
.dashboard-resource-link i {
    color: var(--teal-400);
}

@media (max-width: 900px) {
    .dashboard-hero {
        padding: 140px 0 72px;
    }
    .dashboard-hero-inner,
    .dashboard-resources-inner {
        grid-template-columns: 1fr;
        display: grid;
        align-items: start;
    }
    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-kpi:nth-child(-n+2) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    }
    .dashboard-chart-grid--cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .dashboard-hero {
        padding: 120px 0 56px;
    }
    .dashboard-hero-action {
        width: 100%;
    }
    .dashboard-kpi {
        min-height: 156px;
        padding: 24px 20px;
    }
    .dashboard-kpi strong {
        margin-top: 18px;
    }
    .dashboard-section,
    .dashboard-resources {
        padding: 72px 0;
    }
    .dashboard-chart-grid--two,
    .dashboard-chart-grid--cards {
        grid-template-columns: 1fr;
    }
    .dashboard-disclosure summary {
        align-items: flex-start;
        padding: 28px 24px;
        gap: 18px;
    }
    .dashboard-disclosure-content {
        padding: 0 20px 20px;
    }
    .dashboard-disclosure-title {
        font-size: 30px;
    }
    .dashboard-disclosure-description {
        font-size: 14px;
    }
    .dashboard-resources-inner {
        gap: 32px;
    }
}

/* Data-driven dashboard components */
.dashboard-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}
.dashboard-chart {
    min-width: 0;
    padding: 26px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 36px rgba(8, 22, 95, 0.06);
}
.dashboard-chart--wide {
    grid-column: 1 / -1;
}
.dashboard-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}
.dashboard-chart-header h3 {
    font-size: 22px;
    font-weight: 450;
    line-height: 1.15;
}
.dashboard-chart-header span {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 100px;
    background: var(--teal-50);
    color: var(--teal-700);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.dashboard-chart-canvas {
    display: none;
    position: relative;
    height: var(--chart-height, 320px);
}
.dashboard-chart.is-rendered .dashboard-chart-canvas {
    display: block;
}
.dashboard-chart-canvas canvas {
    max-width: 100%;
}
.dashboard-chart-fallback ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.dashboard-chart-fallback li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    color: var(--slate);
    font-size: 13px;
    line-height: 1.35;
}
.dashboard-chart-fallback li:last-child {
    border-bottom: none;
}
.dashboard-chart-fallback strong {
    flex: 0 0 auto;
    color: var(--navy);
    font-size: 14px;
}
.dashboard-chart.is-rendered .dashboard-chart-fallback {
    display: none;
}
.dashboard-chart-note {
    display: flex;
    gap: 8px;
    margin: 18px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--mute);
    font-size: 12px;
    line-height: 1.5;
}
.dashboard-chart-note i {
    margin-top: 3px;
    color: var(--teal-500);
}
.dashboard-data-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--line);
}
.dashboard-data-card {
    min-height: 138px;
    padding: 20px;
    background: var(--sand-50);
}
.dashboard-data-card p,
.fileira-metrics p {
    margin: 0 0 16px;
    color: var(--slate);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.4;
    text-transform: uppercase;
}
.dashboard-data-card strong,
.fileira-metrics strong {
    display: block;
    color: var(--navy);
    font-family: var(--font-display);
    font-size: clamp(26px, 2.3vw, 38px);
    font-weight: 400;
    letter-spacing: -0.035em;
    line-height: 1;
}
.dashboard-data-card strong small,
.fileira-metrics strong small {
    color: var(--teal-700);
    font-family: var(--font-body);
    font-size: 0.42em;
    font-weight: 700;
    letter-spacing: 0;
}
.dashboard-data-card > span {
    display: block;
    margin-top: 10px;
    color: var(--teal-700);
    font-size: 11px;
    font-weight: 700;
}

.dashboard-context {
    padding: 40px 0;
    background: var(--sand-50);
    border-bottom: 1px solid var(--line);
}
.dashboard-context-inner {
    max-width: 960px;
}
.dashboard-context-inner .eyebrow {
    margin-bottom: 14px;
}
.dashboard-context-inner > p:last-child {
    margin: 0;
    color: var(--slate);
    font-size: 16px;
    line-height: 1.7;
}

.dashboard-explorer {
    padding: 100px 0;
    background: var(--sand-100);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.fileira-explorer {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--sand-50);
}
.fileira-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    scrollbar-width: thin;
}
.fileira-tabs button {
    flex: 0 0 auto;
    padding: 16px 18px;
    border-right: 1px solid var(--line);
    color: var(--slate);
    font-size: 13px;
    font-weight: 700;
    transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.fileira-tabs button:hover,
.fileira-tabs button.is-active {
    background: var(--navy);
    color: var(--sand-50);
}
.fileira-panel {
    padding: 42px;
}
.fileira-panel-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.75fr);
    gap: 40px;
    align-items: end;
    margin-bottom: 36px;
}
.fileira-panel-heading .eyebrow {
    margin-bottom: 14px;
}
.fileira-panel-heading h3 {
    font-size: clamp(32px, 3.5vw, 52px);
    font-weight: 400;
}
.fileira-panel-heading > p {
    margin: 0;
    color: var(--slate);
    font-size: 15px;
    line-height: 1.55;
}
.fileira-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--line);
}
.fileira-metrics article {
    min-width: 0;
    padding: 22px 18px;
    background: #fff;
}
.fileira-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}
.fileira-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}
.fileira-actions .btn.is-disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

@media (max-width: 900px) {
    .indicator-grid--dashboard-row--thematic,
    .indicator-grid--dashboard-row--value-chains {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-chart-grid,
    .fileira-panel-heading {
        grid-template-columns: 1fr;
    }
    .dashboard-chart--wide {
        grid-column: auto;
    }
    .fileira-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .dashboard-chart,
    .fileira-panel {
        padding: 20px;
    }
    .dashboard-chart-header {
        align-items: flex-start;
    }
    .dashboard-chart-header h3 {
        font-size: 20px;
    }
    .dashboard-chart-header span {
        max-width: 45%;
        text-align: right;
    }
    .dashboard-data-cards,
    .fileira-metrics {
        grid-template-columns: 1fr;
    }
    .dashboard-explorer {
        padding: 72px 0;
    }
    .fileira-panel-heading {
        gap: 20px;
        margin-bottom: 24px;
    }
}

/* ================ DIRECTORY ================ */
.directory-categories .indicator-card.is-active {
    color: var(--sand-50);
}
.directory-categories .indicator-card.is-active::before {
    opacity: 1;
}
.directory-categories .indicator-card.is-active .indicator-num,
.directory-categories .indicator-card.is-active .indicator-desc,
.directory-categories .indicator-card.is-active .indicator-name {
    color: var(--sand-50);
}
.directory-categories .indicator-card.is-active .indicator-arrow {
    opacity: 1;
    transform: translate(4px, -4px);
}
.directory-resources {
    padding: 110px 0 120px;
    background: var(--sand-100);
    border-top: 1px solid var(--line);
}
.directory-resources .section-head {
    margin-bottom: 40px;
}
.directory-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}
.directory-search {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--sand-50);
    color: var(--teal-700);
}
.directory-search:focus-within {
    border-color: var(--teal-500);
    box-shadow: 0 0 0 4px rgba(0, 111, 203, 0.1);
}
.directory-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 15px;
}
.directory-search input::placeholder {
    color: var(--mute);
}
.directory-reset {
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 100px;
    background: transparent;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    transition: border-color 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}
.directory-reset:hover,
.directory-reset.is-active {
    border-color: var(--navy);
    background: var(--navy);
    color: var(--sand-50);
}
.directory-result-count {
    min-width: 130px;
    margin: 0;
    color: var(--slate);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}
.directory-resource-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.directory-resource-card {
    min-height: 250px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--sand-50);
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.directory-resource-card:hover {
    border-color: var(--teal-500);
    box-shadow: 0 20px 38px rgba(8, 22, 95, 0.1);
    transform: translateY(-4px);
}
.directory-resource-card[hidden] {
    display: none;
}
.directory-resource-category {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 18px;
    color: var(--teal-700);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.25;
    text-transform: uppercase;
}
.directory-resource-card h3 {
    font-size: 23px;
    font-weight: 450;
    line-height: 1.1;
}
.directory-resource-card > p {
    margin: 13px 0 22px;
    color: var(--slate);
    font-size: 14px;
    line-height: 1.55;
}
.directory-resource-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: var(--teal-700);
    font-size: 12px;
    font-weight: 800;
}
.directory-resource-action i {
    font-size: 10px;
    transition: transform 0.25s var(--ease);
}
.directory-resource-card:hover .directory-resource-action i {
    transform: translate(2px, -2px);
}
.directory-empty {
    margin: 36px 0 0;
    padding: 28px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--slate);
    text-align: center;
}

@media (max-width: 900px) {
    .directory-resource-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .directory-resources {
        padding: 72px 0 80px;
    }
    .directory-tools {
        grid-template-columns: 1fr;
    }
    .directory-reset,
    .directory-result-count {
        width: 100%;
        text-align: center;
    }
    .directory-resource-grid {
        grid-template-columns: 1fr;
    }
    .directory-resource-card {
        min-height: 0;
        padding: 22px;
    }
}

/* ================ ECOSYSTEM DIRECTORY ================ */
.ecosystem-directory {
    padding: 110px 0 120px;
    background: var(--sand-50);
    border-top: 1px solid var(--line);
}
.ecosystem-directory .section-head {
    margin-bottom: 40px;
}
.ecosystem-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr) auto;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}
.ecosystem-search,
.ecosystem-municipality {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--teal-700);
}
.ecosystem-search:focus-within,
.ecosystem-municipality:focus-within {
    border-color: var(--teal-500);
    box-shadow: 0 0 0 4px rgba(0, 111, 203, 0.1);
}
.ecosystem-search input,
.ecosystem-municipality select {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 15px;
}
.ecosystem-search input::placeholder {
    color: var(--mute);
}
.ecosystem-municipality select {
    appearance: none;
    cursor: pointer;
}
.ecosystem-result-count {
    min-width: 130px;
    margin: 0;
    color: var(--slate);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}
.ecosystem-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}
.ecosystem-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 100px;
    background: transparent;
    color: var(--slate);
    font-size: 12px;
    font-weight: 700;
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.ecosystem-filter:hover,
.ecosystem-filter.is-active {
    border-color: var(--navy);
    background: var(--navy);
    color: var(--sand-50);
}
.ecosystem-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.ecosystem-directory-card {
    min-height: 278px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.ecosystem-directory-card:hover {
    border-color: var(--teal-500);
    box-shadow: 0 20px 38px rgba(8, 22, 95, 0.1);
    transform: translateY(-4px);
}
.ecosystem-directory-card[hidden] {
    display: none;
}
.ecosystem-card-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}
.ecosystem-card-category,
.ecosystem-card-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--teal-700);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.25;
    text-transform: uppercase;
}
.ecosystem-card-location {
    max-width: 42%;
    color: var(--mute);
    text-align: right;
    letter-spacing: 0.04em;
}
.ecosystem-directory-card h3 {
    font-size: 23px;
    font-weight: 450;
    line-height: 1.1;
}
.ecosystem-directory-card > p {
    margin: 12px 0 22px;
    color: var(--slate);
    font-size: 14px;
    line-height: 1.5;
}
.ecosystem-card-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: -8px 0 20px;
}
.ecosystem-card-meta div {
    min-width: 0;
    padding: 8px 9px;
    border-radius: 8px;
    background: var(--sand-100);
}
.ecosystem-card-meta dt {
    margin-bottom: 3px;
    color: var(--mute);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}
.ecosystem-card-meta dd {
    margin: 0;
    color: var(--ink);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.ecosystem-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}
.ecosystem-card-actions a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 100px;
    color: var(--teal-700);
    font-size: 11px;
    font-weight: 800;
    transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.ecosystem-card-actions a:hover {
    border-color: var(--teal-500);
    background: var(--teal-50);
    color: var(--navy);
}
.ecosystem-empty {
    margin: 36px 0 0;
    padding: 28px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--slate);
    text-align: center;
}

@media (max-width: 900px) {
    .ecosystem-tools {
        grid-template-columns: 1fr 1fr;
    }
    .ecosystem-result-count {
        grid-column: 1 / -1;
        text-align: left;
    }
    .ecosystem-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .ecosystem-directory {
        padding: 72px 0 80px;
    }
    .ecosystem-card-meta {
        grid-template-columns: 1fr;
    }
    .ecosystem-tools,
    .ecosystem-card-grid {
        grid-template-columns: 1fr;
    }
    .ecosystem-directory-card {
        min-height: 0;
        padding: 22px;
    }
}

/* ================ LEGAL PAGES ================ */
.legal-hero {
    position: relative;
    overflow: hidden;
    padding: 180px 0 88px;
    background: var(--sand-50);
}
.legal-hero-inner {
    position: relative;
    z-index: 1;
    max-width: var(--container);
}
.legal-hero-inner .display-1 {
    max-width: 11ch;
}
.legal-hero-inner .lead {
    margin-top: 28px;
}
.legal-updated {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 28px 0 0;
    color: var(--slate);
    font-size: 13px;
    font-weight: 600;
}
.legal-updated i {
    color: var(--teal-500);
}
.legal-content {
    padding: 104px 0 120px;
    background: var(--sand-100);
    border-top: 1px solid var(--line);
}
.legal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.36fr);
    align-items: start;
    gap: 80px;
}
.legal-intro {
    max-width: 760px;
    margin-bottom: 60px;
}
.legal-intro .eyebrow {
    margin-bottom: 18px;
}
.legal-intro .section-title {
    font-size: clamp(36px, 4vw, 56px);
}
.legal-intro > p:last-child {
    margin: 24px 0 0;
    color: var(--slate);
    font-size: 17px;
    line-height: 1.65;
}
.legal-sections {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--line);
}
.legal-section {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 20px;
    padding: 34px;
    background: var(--sand-50);
}
.legal-section-number {
    padding-top: 4px;
    color: var(--teal-700);
    font-family: var(--font-display);
    font-size: 17px;
    font-style: italic;
}
.legal-section h2 {
    font-size: 25px;
    font-weight: 450;
}
.legal-section p {
    margin: 14px 0 0;
    color: var(--slate);
    font-size: 15px;
    line-height: 1.65;
}
.legal-contact {
    position: sticky;
    top: 112px;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--navy);
}
.legal-contact > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 24px;
    border-radius: 50%;
    background: rgba(20, 168, 232, 0.14);
    color: var(--teal-400);
    font-size: 20px;
}
.legal-contact h2 {
    color: var(--sand-50);
    font-size: 27px;
    font-weight: 450;
}
.legal-contact p {
    margin: 16px 0 22px;
    color: var(--teal-100);
    font-size: 14px;
    line-height: 1.6;
}
.legal-contact > a:not(.btn) {
    display: inline-block;
    margin-bottom: 26px;
    color: var(--teal-400);
    font-size: 14px;
    font-weight: 700;
}
.legal-contact .btn {
    width: 100%;
    justify-content: center;
    padding: 13px 18px;
    background: var(--teal-500);
    color: var(--sand-50);
}
.legal-contact .btn:hover {
    background: var(--sand-50);
    color: var(--navy);
}

@media (max-width: 900px) {
    .legal-hero {
        padding: 140px 0 72px;
    }
    .legal-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .legal-contact {
        position: static;
    }
}

@media (max-width: 600px) {
    .legal-hero {
        padding: 120px 0 56px;
    }
    .legal-content {
        padding: 72px 0 80px;
    }
    .legal-section {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 26px 22px;
    }
    .legal-section h2 {
        font-size: 23px;
    }
}

/* ================ COOKIE CONSENT ================ */
.cookie-consent {
    position: fixed;
    right: 20px;
    bottom: 20px;
    left: 20px;
    z-index: 2000;
    max-width: 1080px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
    pointer-events: none;
}
.cookie-consent.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.cookie-consent-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    padding: 22px 24px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-lg);
    background: rgba(8, 22, 95, 0.97);
    box-shadow: 0 24px 60px rgba(8, 22, 95, 0.28);
    backdrop-filter: blur(18px);
}
.cookie-consent-copy {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.cookie-consent-copy > i {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(20, 168, 232, 0.16);
    color: var(--teal-400);
    font-size: 17px;
}
.cookie-consent h2 {
    color: var(--sand-50);
    font-size: 20px;
    font-weight: 500;
}
.cookie-consent p {
    max-width: 680px;
    margin: 7px 0 9px;
    color: var(--teal-100);
    font-size: 13px;
    line-height: 1.5;
}
.cookie-consent-copy a {
    color: var(--teal-400);
    font-size: 12px;
    font-weight: 700;
}
.cookie-consent-copy a:hover {
    color: var(--sand-50);
}
.cookie-consent-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cookie-essential {
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 100px;
    color: var(--sand-50);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.cookie-essential:hover {
    border-color: var(--teal-400);
    background: rgba(20, 168, 232, 0.15);
}
.cookie-consent-actions .btn {
    padding: 12px 16px;
    background: var(--teal-500);
    color: var(--sand-50);
    font-size: 12px;
    white-space: nowrap;
}
.cookie-consent-actions .btn:hover {
    background: var(--sand-50);
    color: var(--navy);
}

@media (max-width: 760px) {
    .cookie-consent {
        right: 12px;
        bottom: 12px;
        left: 12px;
    }
    .cookie-consent-inner {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 20px;
        border-radius: var(--radius);
    }
    .cookie-consent-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .cookie-consent-actions .btn,
    .cookie-essential {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* ================ STATISTICAL INFORMATION ================ */
.statistics-page {
    background: #efedf4;
}
.statistics-hero {
    position: relative;
    overflow: hidden;
    padding: 150px 0 58px;
    background: #f5f3f7;
    border-bottom: 1px solid #ddd8e7;
}
.statistics-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.55fr);
    align-items: end;
    gap: 48px;
}
.statistics-hero-copy .display-1 {
    max-width: 12ch;
}
.statistics-hero-copy .lead {
    margin: 20px 0 0;
}

.statistics-dashboard {
    padding: 40px 0 82px;
    background: #efedf4;
}
.statistics-data-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 880px;
    margin: 0 0 26px;
    padding: 14px 18px;
    border: 1px solid #d9d3e4;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.66);
}
.statistics-data-note i {
    margin-top: 4px;
    color: #5d4e9d;
}
.statistics-data-note p {
    margin: 0;
    color: var(--slate);
    font-size: 13px;
    line-height: 1.55;
}
.statistics-data-status {
    display: block;
    margin-bottom: 3px;
    color: #5d4e9d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.statistics-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 18px;
    row-gap: 14px;
}
.statistics-card {
    min-width: 0;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    padding: 22px 22px 18px;
    position: relative;
    overflow: hidden;
    border: 1px solid #ddd8e5;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 28px rgba(34, 29, 81, 0.055);
    color: var(--navy);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.statistics-card:hover {
    transform: translateY(-4px);
    border-color: #afa5cc;
    box-shadow: 0 22px 36px rgba(34, 29, 81, 0.12);
}
.statistics-card--featured {
    min-height: 282px;
    border-color: transparent;
    background: #27205f;
    color: #fff;
    box-shadow: 0 20px 38px rgba(34, 29, 81, 0.2);
}
.statistics-card--featured::after {
    content: '';
    position: absolute;
    width: 190px;
    height: 190px;
    right: -76px;
    bottom: -112px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    box-shadow: 0 0 0 36px rgba(255, 255, 255, 0.035), 0 0 0 72px rgba(255, 255, 255, 0.02);
    pointer-events: none;
}
.statistics-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.statistics-card-header h2,
.statistics-card-header h3 {
    max-width: 18ch;
    color: inherit;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.statistics-card-header span {
    flex: 0 0 auto;
    max-width: 42%;
    color: #77718f;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.07em;
    line-height: 1.3;
    text-align: right;
    text-transform: uppercase;
}
.statistics-card--featured .statistics-card-header span {
    color: #bbb5d8;
}
.statistics-card-value {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin: 19px 0 10px;
}
.statistics-card-value strong {
    color: inherit;
    font-family: var(--font-display);
    font-size: clamp(40px, 4vw, 62px);
    font-weight: 420;
    letter-spacing: -0.05em;
    line-height: 0.9;
}
.statistics-card-value small {
    color: #635b82;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
}
.statistics-card--featured .statistics-card-value small {
    color: #d5d1eb;
}
.statistics-sparkline {
    height: 64px;
    margin-top: auto;
    color: #6357a9;
}
.statistics-card--featured .statistics-sparkline {
    color: #bdb8ff;
}
.statistics-sparkline svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}
.statistics-sparkline-area {
    fill: currentColor;
    opacity: 0.12;
}
.statistics-sparkline-line {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.3;
}
.statistics-sparkline-marker {
    fill: currentColor;
    stroke: #fff;
    stroke-width: 2;
}
.statistics-card--featured .statistics-sparkline-marker {
    stroke: #27205f;
}
.statistics-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e7e3ec;
}
.statistics-card-meta p {
    margin: 0;
    color: #6e6886;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.35;
}
.statistics-card-meta p:last-child {
    text-align: right;
}
.statistics-card-meta span {
    display: block;
    margin-bottom: 2px;
    color: #9a94ad;
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.statistics-card--featured .statistics-card-meta {
    border-top-color: rgba(255, 255, 255, 0.18);
}
.statistics-card--featured .statistics-card-meta p {
    color: #d7d3ea;
}
.statistics-card--featured .statistics-card-meta span {
    color: #aaa3c8;
}
.statistics-group {
    margin-top: 46px;
    padding: 0;
}
.statistics-group-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 15px;
}
.statistics-group-number {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #5b4a9d;
    color: #fff;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
}
.statistics-group-heading h2 {
    color: #2d275b;
    font-family: var(--font-body);
    font-size: clamp(20px, 2.1vw, 26px);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

@media (max-width: 900px) {
    .statistics-hero {
        padding: 126px 0 52px;
    }
    .statistics-hero-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .statistics-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 600px) {
    .statistics-hero {
        padding: 110px 0 42px;
    }
    .statistics-dashboard {
        padding: 28px 0 64px;
    }
    .statistics-data-note {
        margin-bottom: 24px;
        padding: 14px;
    }

    .statistics-card-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .statistics-card,
    .statistics-card--featured {
        min-height: 250px;
        padding: 20px 20px 16px;
    }
    .statistics-card-value {
        margin-top: 18px;
    }
    .statistics-card-value strong {
        font-size: 50px;
    }
    .statistics-group {
        margin-top: 38px;
    }
}

@media (max-width: 600px) {
    .map-tools {
        top: 66px;
        right: 16px;
        left: 16px;
        width: auto;
    }
    .map-legend {
        top: 116px;
    }
    .map-legend-list {
        max-height: 240px;
        overflow-y: auto;
    }
}

/* Statistical-matrix cards: metadata is shown until validated observations are imported. */
.statistics-card--summary {
    min-height: 242px;
}
.statistics-featured-description {
    max-width: 29ch;
    margin: auto 0 0;
    color: #d7d3ea;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
    position: relative;
    z-index: 1;
}
.statistics-card--indicator {
    min-height: 220px;
}
.statistics-card--indicator.is-pending {
    border-color: #d9d3e4;
    border-style: dashed;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: none;
}
.statistics-card--indicator.is-pending:hover {
    border-color: #afa5cc;
    box-shadow: 0 18px 30px rgba(34, 29, 81, 0.08);
}
.statistics-card--indicator .statistics-card-header {
    display: block;
}
.statistics-indicator-number {
    display: block;
    margin-bottom: 12px;
    color: #77718f;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.09em;
    line-height: 1.3;
    text-transform: uppercase;
}
.statistics-card--indicator .statistics-card-header h3 {
    max-width: none;
    color: var(--navy);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.35;
    text-transform: none;
}
.statistics-card-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 18px 0 auto;
    color: #6357a9;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
}
.statistics-card-status i {
    flex: 0 0 auto;
    margin-top: 3px;
    font-size: 10px;
}
.statistics-card-status strong {
    font-weight: 600;
}
.statistics-card-status.is-loaded {
    color: #14724d;
}
.statistics-card-live-value {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin: 17px 0 0;
}
.statistics-card-live-value strong {
    color: var(--navy);
    font-family: var(--font-display);
    font-size: clamp(32px, 3.4vw, 48px);
    font-weight: 420;
    letter-spacing: -0.045em;
    line-height: 0.95;
}
.statistics-card [data-statistics-value] {
    font-variant-numeric: tabular-nums;
}
.statistics-card-live-value small {
    color: #635b82;
    font-size: 13px;
    font-weight: 500;
}
.statistics-card--indicator.has-comparison {
    min-height: 332px;
}
.statistics-comparison-chart {
    margin: 16px 0 0;
}
.statistics-comparison-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 3px;
    color: #77718f;
    font-size: 9px;
    font-weight: 500;
    line-height: 1.3;
}
.statistics-comparison-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.statistics-comparison-legend i {
    width: 14px;
    border-top: 2px solid #45388e;
}
.statistics-comparison-legend i.is-portugal {
    border-top-color: #aaa4bf;
    border-top-style: dashed;
}
.statistics-comparison-chart svg {
    width: 100%;
    height: 78px;
    display: block;
    overflow: visible;
}
.statistics-comparison-gridline {
    stroke: #e5e1ec;
    stroke-width: 1;
    stroke-dasharray: 2 3;
}
.statistics-comparison-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}
.statistics-comparison-line.is-algarve {
    stroke: #45388e;
}
.statistics-comparison-line.is-portugal {
    stroke: #aaa4bf;
    stroke-dasharray: 4 4;
    stroke-width: 1.8;
}
.statistics-comparison-chart.is-prepared:not(.is-visible) .statistics-comparison-legend,
.statistics-comparison-chart.is-prepared:not(.is-visible) svg,
.statistics-comparison-chart.is-prepared:not(.is-visible) figcaption {
    opacity: 0;
    transform: translateY(6px);
}
.statistics-comparison-chart.is-prepared .statistics-comparison-legend,
.statistics-comparison-chart.is-prepared svg,
.statistics-comparison-chart.is-prepared figcaption {
    transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.statistics-comparison-chart.is-prepared .statistics-comparison-line {
    transition: none;
}
.statistics-comparison-chart.is-prepared.is-visible .statistics-comparison-line {
    transition: stroke-dashoffset 1s var(--ease-out);
}
.statistics-comparison-chart figcaption {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
    color: #88819b;
    font-size: 9px;
    font-weight: 500;
    line-height: 1.35;
}
.statistics-comparison-chart figcaption strong {
    color: #14724d;
    font-weight: 500;
    text-align: right;
}
.statistics-comparison-chart figcaption strong.is-negative {
    color: #a53d47;
}
.statistics-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px 16px;
    margin: auto 0 0;
    padding-top: 13px;
    border-top: 1px solid #e7e3ec;
}
.statistics-card-details div {
    min-width: 0;
}
.statistics-card-details dt {
    margin: 0 0 3px;
    color: #9a94ad;
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.09em;
    line-height: 1.2;
    text-transform: uppercase;
}
.statistics-card-details dd {
    margin: 0;
    overflow: hidden;
    color: #514b69;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.35;
    text-overflow: ellipsis;
}
@media (max-width: 600px) {
    .statistics-card--summary,
    .statistics-card--indicator,
    .statistics-card--indicator.has-comparison {
        min-height: 0;
    }
    .statistics-featured-description {
        margin-top: 26px;
    }
    .statistics-comparison-chart figcaption {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
    .statistics-comparison-chart figcaption strong {
        text-align: left;
    }
}