:root {
    --ink: #122033;
    --muted: #4d6278;
    --blue-950: #062448;
    --blue-900: #0a3268;
    --blue-800: #0e4d96;
    --blue-700: #1565c0;
    --blue-600: #1d74d6;
    --blue-100: #e7f1fb;
    --blue-50: #f4f8fc;
    --line: #d5e3f2;
    --paper: #f3f7fb;
    --white: #ffffff;
    --shadow: 0 18px 40px rgba(6, 36, 72, 0.12);
    --accent: var(--blue-800);
    --topbar: var(--blue-950);
    --topbar-ink: #d7e7f8;
    --glow: rgba(47, 138, 224, 0.45);
    --footer-ink: #d5e4f5;
    --serif: "Source Sans 3", "Segoe UI", sans-serif;
    --display: "Barlow Condensed", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: var(--serif);
    font-size: 1.05rem;
    line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-800); }
button, input, textarea { font: inherit; }
.skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    background: var(--white);
    padding: 0.5rem 0.8rem;
    z-index: 20;
}
.skip:focus { top: 0.5rem; }
.wrap { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }

.topbar {
    background: var(--topbar);
    color: var(--topbar-ink);
    font-size: 0.92rem;
}
.topbar a { color: white; text-decoration: none; }
.topbar-inner {
    display: flex;
    gap: 1.25rem;
    justify-content: space-between;
    padding: 0.45rem 0;
    flex-wrap: wrap;
}

.site-header {
    background: white;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}
.site-header .wrap { width: min(1240px, calc(100% - 2rem)); }
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    min-height: 84px;
    position: relative;
    flex-wrap: wrap;
    container-type: inline-size;
}
.brand {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    color: inherit;
    text-decoration: none;
    flex: 0 0 auto;
}
.escudo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex: 0 0 auto;
}
.brand > span:last-child { min-width: max-content; }
.brand strong, .brand small { display: block; white-space: nowrap; }
.brand strong { font-size: 1.12rem; letter-spacing: 0; line-height: 1.15; }
.brand small { color: var(--muted); font-size: 0.84rem; line-height: 1.3; }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger {
    display: inline-flex;
    border: 0;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    background: var(--accent);
    color: white;
    font-weight: 700;
    cursor: pointer;
    flex: 0 0 auto;
}
.nav { display: flex; align-items: center; justify-content: flex-end; gap: 0.1rem; flex: 1 1 auto; }
.nav > a, .nav-drop summary {
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.4rem 0.5rem;
    border-radius: 999px;
}
.nav > a.is-active, .nav > a:hover, .nav-drop summary:hover { background: var(--blue-50); }
.nav-cta {
    background: var(--accent) !important;
    color: white !important;
}
.nav-drop { position: relative; }
.nav-drop summary { list-style: none; cursor: pointer; }
.nav-drop summary::-webkit-details-marker { display: none; }
.nav-drop > div {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    min-width: 240px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 0.4rem;
    display: none;
    z-index: 12;
}
.nav-drop[open] > div { display: grid; }
.nav-drop a {
    text-decoration: none;
    color: var(--ink);
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
}
.nav-drop a:hover { background: var(--blue-50); }

.hero {
    background:
        radial-gradient(circle at 80% 20%, var(--glow), transparent 28%),
        linear-gradient(115deg, var(--blue-950) 0%, var(--blue-800) 58%, var(--blue-700) 100%);
    color: white;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2rem;
    align-items: stretch;
    min-height: 560px;
}
.hero-copy { padding: 3.5rem 0 3rem; }
.badge {
    display: inline-flex;
    margin: 0 0 1rem;
    padding: 0.2rem 0.85rem;
    border: 1.5px solid white;
    border-radius: 999px;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    font-weight: 700;
}
.eyebrow {
    margin: 0 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--blue-700);
}
.eyebrow.light { color: #c5ddf6; }
h1, h2, h3 { font-family: var(--display); line-height: 1.02; letter-spacing: 0.01em; }
.hero h1 {
    margin: 0;
    font-size: clamp(4rem, 8vw, 6.4rem);
    font-weight: 800;
    text-transform: uppercase;
}
.hero-role {
    margin: 0.4rem 0 0;
    font-family: var(--display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    text-transform: uppercase;
}
.hero-note, .hero-term { margin: 0.7rem 0 0; color: #d7e8f8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }
.hero-photo {
    margin: 0;
    min-height: 460px;
    overflow: hidden;
    border-radius: 28px 28px 0 0;
}
.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 0;
    border-radius: 999px;
    padding: 0.75rem 1.15rem;
    font-weight: 700;
    cursor: pointer;
}
.btn-light { background: white; color: var(--blue-900); }
.btn-ghost { background: transparent; color: white; border: 1px solid rgba(255,255,255,0.7); }
.btn-blue { background: var(--accent); color: white; }
.btn:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 3px solid #8ec0f3;
    outline-offset: 2px;
}

.notice { background: var(--blue-100); }
.notice-inner { display: flex; gap: 0.7rem; flex-wrap: wrap; padding: 0.9rem 0; }
.listen {
    background: #f3faf4;
    padding: 2.4rem 0;
}
.listen-inner {
    display: grid;
    grid-template-columns: minmax(240px, 420px) 1fr;
    gap: 2.2rem;
    align-items: center;
}
.listen img {
    width: 100%;
    height: auto;
    border-radius: 28px;
    box-shadow: var(--shadow);
}
.listen h2 {
    margin: 0 0 0.7rem;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    text-transform: uppercase;
}
.listen p { margin: 0 0 1.2rem; max-width: 36rem; color: var(--muted); }

.section { padding: 3.2rem 0; }
.section-paper { background: var(--paper); }
.section-head, .news-grid, .service-grid { }
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.2rem;
}
.section-head h2, .page-head h1, .prose h2, .empty-panel h2 { margin: 0; font-size: clamp(2.2rem, 4vw, 3.2rem); text-transform: uppercase; }
.section-head a { font-weight: 700; }

.service-grid, .news-grid, .facts-grid, .footer-grid {
    display: grid;
    gap: 1rem;
}
.service-grid { grid-template-columns: repeat(4, 1fr); }
.service-card, .news-card, .hours-card, .map-card, .empty-panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.1rem 1.15rem 1.2rem;
}
.service-card {
    color: inherit;
    text-decoration: none;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
button.service-card {
    width: 100%;
    text-align: left;
    font: inherit;
    cursor: pointer;
}
.service-card:hover { transform: translateY(-3px); border-color: var(--blue-600); }
.service-index { color: var(--blue-700); font-family: var(--display); font-size: 1.4rem; font-weight: 700; }
.service-card h3, .news-card h3, .news-row h2 { margin: 0; font-size: 1.55rem; text-transform: uppercase; }
.service-card p, .news-card p, .news-row p { margin: 0; color: var(--muted); }
.service-card small { margin-top: auto; color: var(--blue-800); font-weight: 700; }
.service-modal {
    width: min(680px, calc(100% - 2rem));
    max-height: min(82vh, 760px);
    margin: auto;
    border: 0;
    border-radius: 22px;
    padding: 1.4rem 1.35rem 1.5rem;
    box-shadow: var(--shadow);
    color: var(--ink);
}
.service-modal::backdrop { background: rgba(6, 36, 72, 0.55); }
.service-modal h2 { margin: 0 0 0.8rem; padding-right: 4.5rem; font-size: clamp(1.8rem, 3vw, 2.4rem); text-transform: uppercase; }
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: 1px solid var(--line);
    background: white;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-weight: 700;
    cursor: pointer;
}
.service-modal .prose { font-size: 1.05rem; }

.news-grid { grid-template-columns: repeat(3, 1fr); }
.news-card time, .news-row time, .doc-list small { color: var(--blue-700); font-size: 0.92rem; font-weight: 700; }
.news-card h3 a, .news-row h2 a { color: inherit; text-decoration: none; }
.news-card h3 a:hover, .news-row h2 a:hover { color: var(--blue-800); }
.more { font-weight: 700; }

.facts { background: var(--blue-900); color: white; }
.facts-grid { grid-template-columns: repeat(4, 1fr); padding: 1.6rem 0; }
.facts strong { display: block; font-family: var(--display); font-size: 2.4rem; line-height: 1; }
.facts span { color: #c5ddf6; }

.landmark, .visit, .layout-2 {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.5rem;
    align-items: start;
}
.layout-2 { grid-template-columns: minmax(0, 1fr) 300px; }
.landmark { grid-template-columns: 0.9fr 1.1fr; align-items: center; }
.landmark h2 { margin: 0.2rem 0 0.8rem; font-size: clamp(2.2rem, 4vw, 3.3rem); text-transform: uppercase; }
.landmark p { margin: 0 0 0.9rem; }
.landmark-photos { display: grid; gap: 0.8rem; }
.landmark-photos figure { margin: 0; }
.landmark-photos img, .portrait img, .article-photo {
    width: 100%;
    border-radius: 22px;
    box-shadow: var(--shadow);
}
.landmark-photos img { height: auto; object-fit: cover; }
.visit { grid-template-columns: 1fr 1fr; align-items: stretch; }
.visit h2 { margin: 0.2rem 0 0.8rem; font-size: clamp(2.2rem, 4vw, 3.3rem); text-transform: uppercase; }
.visit-points { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: 0.7rem; }
.visit-points li { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 0.85rem 1rem; }
.visit-map {
    margin: 0;
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
}
.visit-map img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; display: block; }
.visit-map figcaption { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.85rem 1rem; }
.visit-map a { font-weight: 700; }
.visit-map small { color: var(--muted); }
.btn-line { background: white; color: var(--blue-900); border: 1px solid var(--line); }

.page-head {
    background: linear-gradient(115deg, var(--blue-950), var(--blue-700));
    color: white;
    padding: 2.4rem 0 2rem;
}
.page-head p { max-width: 46rem; color: #d7e8f8; }
.page-head a { color: white; }
.crumbs { font-size: 0.92rem; margin-bottom: 0.6rem; }
.crumbs span { opacity: 0.7; }

.hours-card + .hours-card, .related { margin-top: 1rem; }
.hours-card ul, .related ul, .footer-grid ul, .people { padding-left: 1.1rem; margin: 0.4rem 0 0; }
.hours-card .btn { margin-top: 0.8rem; }
.aside { position: sticky; top: 104px; }

.prose { font-size: 1.08rem; }
.mayor-intro {
    display: grid;
    grid-template-columns: 148px 1fr;
    gap: 1.2rem;
    align-items: center;
    margin-bottom: 1.8rem;
}
.mayor-intro img { width: 148px; height: 148px; object-fit: cover; object-position: center 20%; border-radius: 22px; }
.mayor-intro h2 { margin: 0.15rem 0 0.35rem; font-size: clamp(2rem, 4vw, 2.8rem); text-transform: uppercase; }
.mayor-intro p:last-child { margin: 0; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 0.4rem 1rem; }
.when { text-align: right; padding-top: 0.2rem; }
.when strong { display: block; font-family: var(--display); font-size: 1.35rem; line-height: 1; color: var(--blue-800); }
.when span { color: var(--muted); font-size: 0.86rem; }
.what { border-left: 2px solid var(--line); padding: 0 0 1.5rem 1.15rem; position: relative; }
.what::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 0.35rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--blue-800);
    box-shadow: 0 0 0 4px var(--paper);
}
.section .what::before, .layout-2 .what::before { box-shadow: 0 0 0 4px white; }
.what h2 { margin: 0 0 0.35rem; font-size: 1.7rem; text-transform: uppercase; }
.what p { margin: 0 0 0.7rem; }
.what figure { margin: 0.3rem 0 0.4rem; max-width: 460px; }
.confetti-layer { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 80; }
.what img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    object-position: center 35%;
    border-radius: 16px;
    display: block;
}
.prose p, .prose ul { margin: 0 0 1rem; }
.prose h2 { margin: 1.6rem 0 0.6rem; }
.portrait { margin: 0 0 1.2rem; max-width: 420px; overflow: hidden; border-radius: 22px; }
.portrait img { border-radius: 22px; object-fit: cover; object-position: center 28%; max-height: 460px; }

.search, .field-row { display: flex; gap: 0.7rem; align-items: end; margin-bottom: 1.2rem; }
.search input, .field input, .field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
    background: white;
}
.search label, .field label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.field { margin-bottom: 0.9rem; flex: 1; }
.field small { color: #9d2b2b; }
.news-list { display: grid; gap: 1rem; }
.news-row { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.pager { display: flex; gap: 1rem; align-items: center; margin-top: 1.2rem; }
.hp { position: absolute; left: -9999px; }

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1rem; }
.chip {
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    color: var(--ink);
    background: white;
}
.chip.is-active { background: var(--blue-800); color: white; border-color: var(--blue-800); }
.doc-group h2 { font-size: 2rem; text-transform: uppercase; }
.doc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.doc-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0.9rem 1rem;
    background: white;
}
.doc-list p { margin: 0.2rem 0; color: var(--muted); }
.pending { color: var(--muted); font-size: 0.92rem; }
.empty, .empty-panel p { color: var(--muted); }
.flash {
    margin: 1rem 0 0;
    background: #e5f6ea;
    border: 1px solid #b7e0c2;
    border-radius: 12px;
    padding: 0.8rem 1rem;
}

.site-footer { background: var(--blue-950); color: var(--footer-ink); padding-top: 2.4rem; }
.footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1fr; padding-bottom: 1.5rem; }

.district-intro {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.6rem;
}
.district-intro img { width: 160px; height: auto; }
.portal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
}
.portal-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: white;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1rem 1.05rem 1.15rem;
    min-height: 140px;
}
.portal-card:hover { border-color: var(--blue-600); }
.portal-card h3 { margin: 0 0 0.35rem; font-size: 1.45rem; text-transform: uppercase; }
.portal-card p { margin: 0; color: var(--muted); }

.council-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
    margin: 1rem 0 1.4rem;
}
.council-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 0.9rem;
    background: var(--blue-50);
}
.council-photo {
    height: 180px;
    border-radius: 14px;
    background: white;
    border: 1px dashed var(--line);
    display: grid;
    place-items: center;
    align-content: center;
    overflow: hidden;
    margin-bottom: 0.7rem;
    text-align: center;
}
.council-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.council-photo span {
    font-family: var(--display);
    font-size: 2.4rem;
    color: var(--blue-800);
    line-height: 1;
}
.council-photo small { color: var(--muted); }
.council-order { margin: 0; color: var(--blue-700); font-weight: 700; }
.council-card h3 { margin: 0.1rem 0; font-size: 1.35rem; text-transform: uppercase; }
.council-card p { margin: 0; color: var(--muted); }
.party {
    display: inline-flex;
    margin-top: 0.45rem;
    padding: 0.12rem 0.55rem;
    border-radius: 999px;
    background: var(--blue-800);
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.party.is-anr { background: #8d2b2b; }
.digital {
    background:
        radial-gradient(circle at 12% 20%, var(--glow), transparent 32%),
        linear-gradient(115deg, var(--blue-950) 0%, var(--blue-800) 100%);
    color: white;
    padding: 3.2rem 0;
}
.digital-grid {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 2rem;
    align-items: end;
}
.digital h2 {
    margin: 0;
    font-size: clamp(3rem, 6vw, 4.6rem);
    text-transform: uppercase;
    line-height: 0.92;
}
.digital blockquote {
    margin: 0 0 0.9rem;
    font-family: var(--display);
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    font-weight: 700;
    line-height: 1.12;
    text-transform: uppercase;
}
.digital p { margin: 0; max-width: 40rem; color: #d7e8f8; }
.digital-sign { margin-top: 1rem; color: white; font-weight: 700; }
.footer-brand, .footer-title { font-family: var(--display); font-size: 1.5rem; text-transform: uppercase; margin: 0 0 0.4rem; color: white; }
.social {
    display: flex;
    gap: 0.55rem;
    margin-top: 1rem;
}
.social a, .social span {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.social a:hover { background: white; color: var(--blue-950); }
.social svg { width: 18px; height: 18px; display: block; }
.footer-note { color: #9fc0e4; }
.site-footer a { color: white; text-decoration: none; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0 1.1rem;
    font-size: 0.92rem;
}

@media (max-width: 980px) {
    .service-grid, .facts-grid { grid-template-columns: repeat(2, 1fr); }
    .news-grid, .hero-grid, .landmark, .visit, .digital-grid, .layout-2, .footer-grid, .district-intro, .portal-grid, .council-grid, .timeline-item, .mayor-intro, .listen-inner { grid-template-columns: 1fr; }
    .when { text-align: left; }
    .what { margin-left: 0.35rem; }
    .hero-grid { min-height: 0; }
    .hero-photo { order: -1; min-height: 340px; border-radius: 0; }
    .hero-copy { padding-top: 1.5rem; }
    .aside { position: static; }
}

@media (max-width: 1024px) {
    .topbar-inner { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
    .brand { flex: 1 1 auto; }
    .brand > span:last-child { min-width: 0; }
    .brand strong, .brand small { white-space: normal; }
    .header-inner { flex-wrap: wrap; }
    .nav-burger, .nav-toggle { display: none !important; }
    .nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        position: static;
        gap: 0.1rem;
        padding: 0 0 0.7rem;
    }
    .nav-drop > div { position: static; box-shadow: none; border: 0; padding: 0 0 0 0.6rem; display: grid; }
    .service-grid, .field-row, .search, .doc-list li, .footer-bottom { grid-template-columns: 1fr; display: grid; }
    .header-inner { min-height: 72px; }
}

@media (min-width: 1025px) {
    .nav-burger { display: none; }
    @container (max-width: 1220px) {
        .nav {
            flex: 1 0 100%;
            justify-content: flex-start;
            padding-bottom: 0.35rem;
        }
    }
}

html[data-theme="bordo"] {
    --blue-950: #3d1018;
    --blue-900: #6b1d32;
    --blue-800: #8b2342;
    --blue-700: #a33b56;
    --blue-600: #b5526a;
    --blue-100: #f8e8ec;
    --blue-50: #fdf6f7;
    --line: #ead5db;
    --paper: #fbf6f7;
    --muted: #6a4650;
    --accent: #8b2342;
    --topbar: #3d1018;
    --topbar-ink: #f8e4e8;
    --glow: rgba(180, 70, 96, 0.4);
    --footer-ink: #f3d5dc;
    --shadow: 0 18px 40px rgba(61, 16, 24, 0.12);
}
html[data-theme="cerro"] {
    --blue-950: #0c3328;
    --blue-900: #145c45;
    --blue-800: #1a7a56;
    --blue-700: #218a62;
    --blue-600: #2f9a70;
    --blue-100: #e5f6ee;
    --blue-50: #f3fbf7;
    --line: #cfe6da;
    --paper: #f4faf7;
    --muted: #3d6556;
    --accent: #1a7a56;
    --topbar: #0c3328;
    --topbar-ink: #d7f3e6;
    --glow: rgba(46, 168, 112, 0.4);
    --footer-ink: #d3eee2;
    --shadow: 0 18px 40px rgba(12, 51, 40, 0.12);
}
html[data-theme="tricolor"] {
    --blue-950: #001a4d;
    --blue-900: #0038a8;
    --blue-800: #0038a8;
    --blue-700: #1d4fae;
    --blue-600: #2f62c4;
    --blue-100: #fdecea;
    --blue-50: #f8f4f4;
    --line: #eadfdd;
    --paper: #f7f5f4;
    --muted: #5c4a48;
    --accent: #d52b1e;
    --topbar: #d52b1e;
    --topbar-ink: #fff4f3;
    --glow: rgba(80, 150, 255, 0.45);
    --footer-ink: #ffe8e6;
    --shadow: 0 18px 40px rgba(0, 26, 77, 0.14);
}
.flag-stripe { display: none; height: 7px; }
html[data-theme="tricolor"] .flag-stripe {
    display: block;
    background: linear-gradient(90deg, #d52b1e 0 33.33%, #f7f7f7 33.33% 66.66%, #0038a8 66.66% 100%);
}
html[data-theme="tricolor"] .digital {
    background:
        radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.16), transparent 32%),
        linear-gradient(115deg, #6e120c 0%, #d52b1e 100%);
}
html[data-theme="tricolor"] .digital p { color: #ffe8e6; }
html[data-theme="tricolor"] .facts { background: #c4271c; }
html[data-theme="tricolor"] .facts span { color: #ffe4e1; }
html[data-theme="tricolor"] .site-footer { background: #6e120c; }
html[data-theme="tricolor"] .footer-note { color: #ffd0cb; }
html[data-theme="tricolor"] .eyebrow,
html[data-theme="tricolor"] .service-index,
html[data-theme="tricolor"] .service-card small,
html[data-theme="tricolor"] .news-card time,
html[data-theme="tricolor"] .news-row time,
html[data-theme="tricolor"] .doc-list small,
html[data-theme="tricolor"] .when strong,
html[data-theme="tricolor"] .council-order { color: #c4271c; }
html[data-theme="tricolor"] .what::before,
html[data-theme="tricolor"] .chip.is-active { background: #c4271c; border-color: #c4271c; }
html[data-theme="tricolor"] .service-card:hover,
html[data-theme="tricolor"] .portal-card:hover { border-color: #d52b1e; }

.palette {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 40;
    display: grid;
    gap: 0.35rem;
    padding: 0.7rem;
    background: white;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}
.palette p {
    margin: 0 0.2rem 0.15rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.palette button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 0;
    background: transparent;
    border-radius: 999px;
    padding: 0.35rem 0.7rem 0.35rem 0.35rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--ink);
}
.palette button[aria-pressed="true"] { background: var(--blue-50); }
.swatch {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    border: 1px solid rgba(18, 32, 51, 0.15);
}
.swatch-azul { background: #0e4d96; }
.swatch-bordo { background: #8b2342; }
.swatch-cerro { background: #1a7a56; }
.swatch-tricolor { background: linear-gradient(180deg, #d52b1e 0 33%, #f4f4f4 33% 66%, #0038a8 66%); }
