/*
 * index.css — Fusion Calculator
 * Extracted from index.html (batch-29f-css-extraction-index)
 * Source: 25 inline <style> blocks merged in document order
 *   Block  1 ((unnamed-1)): original lines 20–81
 *   Block  2 (lf-se-navbarwidth-styles): original lines 82–511
 *   Block  3 ((unnamed-3)): original lines 512–572
 *   Block  4 ((unnamed-4)): original lines 573–627
 *   Block  5 ((unnamed-5)): original lines 628–698
 *   Block  6 ((unnamed-6)): original lines 699–853
 *   Block  7 ((unnamed-7)): original lines 854–859
 *   Block  8 ((unnamed-8)): original lines 860–1408
 *   Block  9 (lf-intro-overlay-overrides): original lines 1409–1555
 *   Block 10 (lf-intro-overlay-skip-align): original lines 1556–1604
 *   Block 11 (lf-intro-overlay-search-size): original lines 1605–1617
 *   Block 12 (lf-intro-overlay-suggestions-left): original lines 1618–1649
 *   Block 13 (lf-intro-overlay-suggestions-columns): original lines 1650–1720
 *   Block 14 (lf-intro-overlay-suggestions-fullwidth): original lines 1721–1808
 *   Block 15 ((unnamed-15)): original lines 1809–1913
 *   Block 16 ((unnamed-16)): original lines 1914–1947
 *   Block 17 ((unnamed-17)): original lines 1948–1962
 *   Block 18 (lf-attr-tab): original lines 1963–2063
 *   Block 19 ((unnamed-19)): original lines 2064–2187
 *   Block 20 ((unnamed-20)): original lines 2188–2278
 *   Block 21 ((unnamed-21)): original lines 2279–2288
 *   Block 22 ((unnamed-22)): original lines 2289–2300
 *   Block 23 ((unnamed-23)): original lines 2301–2322
 *   Block 24 (lf-clean-style): original lines 2323–2331
 *   Block 25 ((unnamed-25)): original lines 2332–2458
 * Do not add shared/global rules here — page-specific styles only.
 */
        :root {
            --brand: #FDA929;
            --bg: linear-gradient(to bottom right, #134160, #586C75) fixed;
        }

        html,
        body {
            height: 100%;
        }

        body {
            margin: 0;
            background: var(--bg);
            color: white;
            font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        .right {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: .5rem;
        }

        .left {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 6px;
            /* 2C-A: responsive width — fixed only on desktop, auto on tablet/mobile */
            flex: 0 0 auto;
            max-width: 100%;
            position: relative;
            /* anchor for absolute chips */
        }

        /* Desktop only: restore fixed column width so center area never reflows */
        @media (min-width: 901px) {
            .left {
                flex: 0 0 200px;
                max-width: 200px;
            }
        }

        .btn {
            background: var(--brand);
            color: #134160;
            border: none;
            border-radius: 999px;
            padding: 8px 14px;
            font-weight: 800;
            cursor: pointer;
            box-shadow: 0 3px 10px rgba(0, 0, 0, .25);
        }


        footer {
            text-align: center;
            padding: 10px 12px;
            font-size: 12px;
            color: #ddd;
            background: rgba(255, 255, 255, .06);
            border-top: 1px solid rgba(255, 255, 255, .15);
        }

/* === lf-se-navbarwidth-styles === */
        :root {
            --radius: 14px;
            --shadow: 0 8px 30px rgba(0, 0, 0, .08);
            --border: #E5E7EB;
            --focus: #3B82F6;
        }

        .address-search {
            max-width: 400px;
            margin: 0 auto;
            position: relative;
        }

        .label {
            margin-right: 10px;
            color: #ffffff;
            font-family: 'alfarn-2', sans-serif;
            font-size: 12px;
        }

        .control {
            position: relative;
        }

        .input {
            width: 100%;
            padding: 14px 44px 14px 14px;
            border: 1px solid var(--border);
            border-radius: var(--radius);
            outline: none;
            background: #fff;
            font-size: 16px;
            transition: border-color .15s ease, box-shadow .15s ease;
        }

        .input:focus {
            border-color: var(--focus);
            box-shadow: 0 0 0 4px rgba(59, 130, 246, .15);
        }

        .icon {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            pointer-events: none;
            opacity: .6;
        }

        .dropdown {
            position: absolute;
            left: 0;
            right: 0;
            top: calc(100% + 6px);
            background: #fff;
            border: 1px solid var(--border);
            border-radius: 12px;
            box-shadow: var(--shadow);
            overflow: hidden;
            z-index: 1000;
        }

        .hidden {
            display: none;
        }

        .item {
            padding: 12px 14px;
            cursor: pointer;
            transition: background .08s ease;
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 8px;
            align-items: center;
        }

        .item:hover,
        .item[aria-selected="true"] {
            background: #F3F4F6;
        }

        .primary {
            font-size: 15px;
            color: #111827;
        }

        .secondary {
            font-size: 12px;
            color: #6B7280;
        }

        .empty,
        .status {
            padding: 12px 14px;
            color: #6B7280;
            font-size: 13px;
        }

        .badge {
            font-size: 11px;
            color: #374151;
            background: #F3F4F6;
            border: 1px solid #E5E7EB;
            padding: 2px 8px;
            border-radius: 999px;
        }

        .chips {
            display: flex;
            gap: 6px;
            margin-top: 10px;
            flex-wrap: wrap;
        }

        .chip {
            font-size: 12px;
            padding: 6px 10px;
            border-radius: 999px;
            border: 1px solid #e5e7eb;
            background: #fff;
            color: #374151;
        }

        /* Chips mínimos del sujeto (reutiliza .chip existente) */

        .chips.comps-chips {
            margin-top: 6px;
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }

        .chips.comps-chips .chip {
            background: #0f172a;
            /* similar al tema */
            border: 1px solid #475569;
            color: #e2e8f0;
        }


        /* —— SPA x SearchEngine Integration (navbar-width) —— */
        #lf-se-host {
            padding: 10px 0 12px;
        }

        #lf-se-inner {
            width: 100%;
            margin: 0 auto;
        }

        #lf-se-inner .address-search {
            width: 100% !important;
            max-width: none !important;
            margin: 0;
        }

        #lf-se-inner .address-search {
            color: var(--brand) !important;
        }



        /* Shorter search input */
        #lf-se-inner .address-search .input {
            height: 35px;
            /* was ~48px */
            padding: 3px 42px 3px 14px;
            /* T R B L – less vertical padding */
            border-radius: 20px;
            /* slightly smaller pill */
            font-size: 14px;
            /* optional: smaller text */
            line-height: 1.2;
            background: #fff;
            border: 1px solid rgba(0, 0, 0, .06);
            border-radius: 20px;
            /* or whatever you’re using */
            box-shadow: 0 5px 13px rgba(0, 0, 0, .14);
            transition: box-shadow .18s ease, border-color .18s ease;
            outline: none;
        }

        /* On focus: add a soft “ring” and deepen the shadow a touch */
        #lf-se-inner .address-search .input:focus {
            border-color: #f5a623;
            box-shadow:
                0 0 0 3px rgba(245, 166, 35, .18),
                /* soft orange focus ring */
                0 6px 18px rgba(0, 0, 0, .16);
        }

        /* Keep the magnifier correctly placed */
        #lf-se-inner .address-search .icon {
            right: 12px !important;
            top: 50%;
            transform: translateY(-50%);
        }

        /* === LF Layout Adjust (2025-09-12): near-full width, label left, send right === */
        #lf-se-inner {
            width: min(1280px, 95vw) !important;
            margin: 0 auto;
        }

        #lf-se-inner .address-search {
            width: 100% !important;
            max-width: none !important;
            margin: 0 auto;
        }



        #lf-se-inner .address-search {
            margin: 5px;
            color: var(--brand) !important;
            white-space: nowrap;
            font-weight: 700;
        }



        .address-search .n8n-btn {
            position: absolute;
            padding: 8px 14px;
            font-size: 14px;
            line-height: 1;
            right: 17%;
        }


        /* === LF Exact Align (2025-09-12): match header right gutter with .bar (padding: 10px 12px) === */
        #lf-se-inner .address-search {
            padding-inline: 12px;
            /* match header .bar right/left padding so edges align */
        }



        /* === Custom Mods (2025-09-12) === */

        /* 1. Label closer to input */
        .address-search .row {
            display: grid;
            grid-template-columns: auto 1fr auto;
            align-items: center;
            gap: 4px;
            /* tighter gap */
        }

        /* 2. Fixed search box width */
        .address-search .input-wrap {
            position: relative;
            width: 700px;
            /* fixed width */
        }

        /* 3. Dropdown aligned exactly under input */
        .address-search .dropdown {
            position: absolute;
            /* not relative */
            left: 0;
            right: 0;
            /* match input width exactly */
            top: calc(100% + 6px);
            margin-top: 0;
            width: auto;
            /* cancel the old width:50% */
            z-index: 1000;
            /* you already set this in the base style */
        }



        /* ---------- BAR (kept from your layout) ---------- */
        header {
            position: sticky;
            top: 0;
            z-index: 20;
        }

        .bar {
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            /* left auto | center flex | right auto */
            gap: 12px;
            align-items: center;
            padding: 10px 12px;
            /* NEW: allow the middle column to center its own content cleanly */
            justify-items: center;
            backdrop-filter: blur(8px);
            background: rgba(255, 255, 255, 0.06);
            border-bottom: 1px solid rgba(255, 255, 255, 0.12);
            box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
            border-radius: 10px;
        }



        .btn {
            appearance: none;
            border: 1px solid rgba(255, 255, 255, .25);
            background: rgba(255, 255, 255, .12);
            color: #fff;
            padding: 10px 14px;
            border-radius: 10px;
            cursor: pointer;
            font-weight: 600;
            transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
        }

        .btn:hover {
            transform: translateY(-1px);
            /*background: rgba(255, 255, 255, .18);
            border-color: rgba(255, 255, 255, .35);
            box-shadow: 0 6px 16px rgba(0, 0, 0, .25);*/
            transition: 0.3s ease all;
            border: 1px #FDA929 solid;
            box-shadow: 0 6px 16px rgba(253, 169, 41, .25);
        }


        .left,
        .right {
            align-self: start;
        }

        /* pin both sides to the top edge */
        /* ---------- NAVIGATION BAR STYLE ---------- */
        .navbar {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-wrap: nowrap;
            /* todo en una sola fila */
            gap: clamp(0.4rem, 1.5vw, 2.9rem);
            /* el espacio se reduce en pantallas pequeñas */
            max-width: 100%;
            position: relative; /* 2C-A2: needed for ::after scroll-fade pseudo */
        }

        .navbar a {
            flex: 1 1 auto;
            /* se reparten el espacio y se pueden encoger */
            text-align: center;
            white-space: nowrap;
            /* que el texto no salte de línea */
            padding: clamp(4px, 0.8vw, 10px) clamp(6px, 1.2vw, 18px);
            /* padding se reduce con la pantalla */
            font-size: clamp(10px, 1.5vw, 16px);
            /* fuente se hace un poco más pequeña */
            color: #fff;
            text-decoration: none;
            padding: 10px 18px;
            border-radius: 8px;
            font-weight: 700;
            border: 1px solid rgba(255, 255, 255, .25);
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);

            &:hover {
                transition: 0.3s ease all;
                border: 1px #FDA929 solid;
            }
        }

        .navbar a.active {
            background-color: var(--brand);
            color: #000;
            border-color: transparent;
        }

        @media (max-width: 768px) {
            .navbar {
                flex-direction: row;
                /* 2C-A: nowrap — keep all 8 tabs in a single scrollable row */
                /* prevents multi-row wrap that silently grows bar height */
                flex-wrap: nowrap;
                justify-content: flex-start;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;          /* Firefox */
                -ms-overflow-style: none;       /* IE/Edge */
                padding-block: 4px;
                gap: 0.5rem;
                /* 2C-A2: snap gives scroll a tactile feel on touch */
                scroll-snap-type: x mandatory;
            }

            .navbar::-webkit-scrollbar {
                display: none;                  /* Chrome/Safari/WebKit */
            }

            /* 2C-A2: right-edge fade — hints that more tabs exist off-screen */
            .navbar::after {
                content: '';
                position: sticky;
                right: 0;
                top: 0;
                bottom: 0;
                flex: 0 0 28px;
                min-width: 28px;
                background: linear-gradient(to right, transparent, rgba(19, 65, 96, 0.85));
                pointer-events: none;
                border-radius: 0 8px 8px 0;
            }

            .navbar a {
                flex: 0 0 auto;
                width: auto;
                text-align: center;
                padding: 6px 10px;
                font-size: 11px;
                white-space: nowrap;            /* prevent label wrapping inside tab */
                scroll-snap-align: start;       /* 2C-A2: snap anchor per tab */
            }

            .bar {
                grid-template-columns: 1fr;
                gap: 6px;
            }

            .right {
                justify-content: center;
            }
        }

        /* ---------- Panes / Layout ---------- */
        .wrap {
            width: 100%;
            max-width: 1400px;
            margin: 0 auto;
            padding: 16px;
        }

        .pane {
            display: none;
            height: calc(100vh - 160px);
        }

        .pane.active {
            display: block;
        }

        iframe.calc {
            width: 100%;
            height: 100%;
            background: transparent;
        }

/* === (unnamed-3) === */
        /* Center column stacks navbar (top) and search (bottom) */
        /* Left group: New Deal */
        .left {
            grid-column: 1;
            justify-self: start;
            /* stick to the left edge of the left rail */
        }

        /* Center group: nav + metrics chips */
        .bar-center {
            grid-column: 2;
            justify-self: center;
            /* sits at the exact middle of the bar */
            width: 100%;
            /* shrink-wrap so centering is precise */
        }

        /* Right group: Download PDF + Reset All */
        .right {
            grid-column: 3;
            justify-self: end;
            /* stick to the right edge of the right rail */
        }



        /* Make the search host feel native to the bar */
        #lf-se-host {
            padding: 0;
        }

        #lf-se-inner {
            width: 100% !important;
            margin: 0;
        }

        #lf-se-inner .address-search {
            padding-inline: 0;
        }

        /* Reasonable, responsive input width inside header */
        /* 2C-A: floor lowered from 360px → 200px to prevent horizontal overflow on phones */
        .address-search .input-wrap {
            width: clamp(200px, 60vw, 760px);
        }

        /* Mobile: stack everything vertically */
        @media (max-width: 900px) {
            .bar {
                grid-template-columns: 1fr;
            }

            .bar-center {
                grid-template-rows: auto auto;
                width: 100%;
            }

            .right {
                width: 100%;
            }

            .address-search .input-wrap {
                width: 100%;
            }
        }

/* === (unnamed-4) === */
        /* === Auto-Origin Integrator: barra + tabs + iframe === */
        :root {
            --bar-h: 56px;
            /* ajusta a tu barra real si no usas medición */
            --tabs-h: 44px;
            /* ajusta a tus encabezados de pestañas */
            --content-offset: 0px;
            /* usado solo en fallback cross-origin */
        }

        html,
        body {
            margin: 0;
            height: 100%;
            overflow: hidden;
            /* sin scroll en host */
        }

        .topbar {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: var(--bar-h);
            z-index: 20;
        }

        .tabs-header {
            position: fixed;
            top: var(--bar-h);
            left: 0;
            right: 0;
            height: var(--tabs-h);
            z-index: 19;
        }

        /* El iframe arranca debajo de barra + tabs; el fallback suma --content-offset */
        iframe.fullscreen-iframe,
        iframe.calc {
            position: fixed;
            top: calc(var(--bar-h) + var(--tabs-h) + var(--content-offset));
            left: 0;
            right: 0;
            width: 100%;
            height: calc(100dvh - (var(--bar-h) + var(--tabs-h) + var(--content-offset)));
            height: calc(100vh - (var(--bar-h) + var(--tabs-h) + var(--content-offset)));
            border: 0;
            display: block;
            background: transparent;
            z-index: 10;
        }

        /* === Fin CSS === */

/* === (unnamed-5) === */
        :root {
            --brand: #FDA929;
            --seq: #1f456a;
        }

        #lf-se-inner .address-search .row,
        #lf-se-host .address-search .row {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        #selectedChips {
            margin-left: auto;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .chip {
            display: inline-flex;
            align-items: center;
            padding: 4px 10px;
            border-radius: 999px;
            font-size: 12px;
            line-height: 1;
            border: 1px solid transparent;
            background: rgba(255, 255, 255, 0.08);
            white-space: nowrap;
        }


        .chips-secondary {
            margin-top: 10px;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .chip--kpi {
            background: var(--brand);
            /* Fondo amarillo */
            border: 1px solid var(--seq);
            /* Borde azul */
            color: var(--seq);
            /* Texto azul */
            font-weight: 700;
            /* Opcional: un poco más de peso para contraste */
        }


        .chip__value:empty::after {
            content: "";
            opacity: 0.7;
        }


        .chip--kpi:hover {
            filter: brightness(1.05);
            box-shadow: 0 0 0 2px rgba(31, 69, 106, 0.1);
        }

        /* Para accesibilidad: aumenta el padding y el letter-spacing si lo ves muy apretado */
        .chip--kpi {
            padding: 6px 12px;
            letter-spacing: 0.1px;
            border-width: 2px;
            /* si prefieres un borde más marcado */
        }

/* === (unnamed-6) === */
        /* ===================== CHIPS ATTRIBUTES STYLE (START) ============================ */

        /* ---- Compact Subject Attributes (no pills) ---- */
        #selectedChips {
            display: grid;
            gap: 2px;
            font-size: 13px;
            line-height: 1.4;
        }

        #selectedChips .chip {
            /* kill bubble look if any remain */
            all: unset;
        }

        .attrs-row {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 12px;
            /* even spacing between items */
        }

        .attrs-row .sep {
            /* middle dot “•” separators */
            opacity: .6;
        }

        .addr {
            font-weight: 600;
            text-transform: uppercase;
            color: #FDA929;
        }

        .attrs-muted {
            opacity: .85;
            font-size: 12px;
        }

        .attr {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .attr svg {
            width: 14px;
            height: 14px;
            opacity: .7;
            margin-right: 4px;
            vertical-align: -2px;
        }

        /* —— Compact attributes beside the address input —— */

        /* Attributes next to the address input: smaller, not bold */
        #selectedChips {
            font-size: 12px;
            /* smaller */
            font-weight: 400;
            /* not bold (overrides .address-search { font-weight:700 }) */
        }


        /* — Center the address row; keep chips right next to it — */
        #lf-se-inner .address-search .row {
            display: grid;
            grid-template-columns: auto max-content auto;
            /* [label] [input-wrap] [attributes] */
            align-items: center;
            justify-content: center;
            /* center the whole group within the header */
            column-gap: 16px;
        }

        /* Make the input fill its wrapper and keep the icon inside it */
        #lf-se-inner .address-search .input {
            width: 100% !important;
            box-sizing: border-box;
        }

        #lf-se-inner .address-search .icon {
            right: 12px !important;
        }

        /* was using %; causes drift */


        /* —— Attributes: single row, plain text —— */
        #selectedChips {
            display: flex;
            flex-wrap: nowrap !important;
            /* stay on one line */
            white-space: nowrap;
            /* don't wrap inside each item */
            gap: 12px;
            max-width: none !important;
            /* overrides earlier 44vw/580px cap */
            width: auto;
        }

        /* make each chip plain text and non-wrapping */
        #selectedChips .chip {
            all: unset;
            display: inline-block;
            white-space: nowrap;
        }

        /* bullets between items */
        #selectedChips .chip+.chip::before {
            content: " • ";
            opacity: .6;
            margin: 0 4px 0 2px;
        }

        /* OPTIONAL: bullet on the first item too (so Beds has one) */
        #selectedChips .chip:first-child::before {
            content: "• ";
            opacity: .6;
            margin-right: 4px;
        }

        /* Small screens: allow horizontal scroll instead of wrapping */
        @media (max-width: 900px) {
            #selectedChips {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }
        }

        /* ===================== CHIPS ATTRIBUTES STYLE (END) ============================ */

        /* ===================== PROPERTY ADDRESS INPUT (START)) ============================ */

        /* Narrower search box */
        /* 2C-A: floor lowered from 360px → 200px to prevent horizontal overflow on phones */
        #lf-se-inner .address-search .input-wrap {
            width: clamp(200px, 60vw, 760px);
        }



        /* Keep the input filling its wrapper */
        #lf-se-inner .address-search .input {
            width: 100% !important;
            box-sizing: border-box;
        }

        /* Keep the magnifier icon correctly placed */
        #lf-se-inner .address-search .icon {
            right: 15px !important;
        }

        /* ===================== PROPERTY ADDRESS INPUT (END)) ============================ */

/* === (unnamed-7) === */
        /* intro-hide */
        body[data-from-intro="1"] #lf-se-host {
            display: none !important;
        }

/* === (unnamed-8) === */
        /* ===== Overlay full-screen ===== */
        #lf-intro-overlay {
            position: fixed;
            inset: 0;
            z-index: 9999;
            display: none;
            place-items: center;
            background: rgba(3, 7, 18, .65);
            /* dark translucent */
            backdrop-filter: blur(6px);
            /* soft blur behind */
        }



        #lf-intro-overlay.is-open {
            display: grid !important;
        }

        .lf-intro-shell {
            width: 85vw;
            height: 85vh;
            max-width: none;
            min-width: 720px;

            /* center everything */
            display: grid;
            align-content: center;
            /* vertical center */
            justify-items: center;
            /* horizontal center */

            position: relative;
            /* for the Skip link */
            overflow-y: hidden;
            overflow-x: hidden;
            box-sizing: border-box;
            text-align: center;
            color: #EAF2FF;
            background: linear-gradient(to bottom right, #134160, #586C75, #134160, #586C75) fixed no-repeat;
            border-radius: 20px;
            padding: 32px 32px 24px;
            border: 2px solid #FDA929;
            box-shadow:
                0 0 0 3px rgba(253, 169, 41, .35),
                0 0 120px 30px rgba(253, 169, 41, .35),
                0 30px 80px rgba(0, 0, 0, .55);
            row-gap: 16px;
        }

        /* 2C-A2: intro shell mobile override — remove min-width lock, allow scroll */
        @media (max-width: 720px) {
            #lf-intro-overlay .lf-intro-shell {
                min-width: 0;
                width: 94vw;
                height: auto;
                max-height: 92dvh;
                overflow-y: auto;
                overflow-x: hidden;
                padding: 20px 16px 16px;
                row-gap: 12px;
            }

            #lf-intro-overlay .lf-input {
                width: 100%;
                box-sizing: border-box;
            }

            #lf-intro-overlay .lf-icon {
                right: 14px;
            }
        }


        /* ===== LF Confirm Overlay (custom confirm, styled like intro overlay) ===== */
        #lf-confirm-overlay {
            position: fixed;
            inset: 0;
            z-index: 10000;
            display: none;
            place-items: center;
            background: rgba(3, 7, 18, .65);
            backdrop-filter: blur(6px);
        }

        #lf-confirm-overlay.is-open {
            display: grid !important;
        }

        /* Reuse .lf-intro-shell look, but allow size to fit content */
        #lf-confirm-overlay .lf-intro-shell {
            width: fit-content;
            max-width: 92vw;
            min-width: 0;
            height: auto;
            max-height: 85vh;
            overflow: auto;

        }

        /* Center the confirm title while keeping the close button on the right */
        #lf-confirm-overlay .lf-confirm-head {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            width: 100%;
            margin-bottom: 10px;
        }

        #lf-confirm-overlay #lfConfirmTitle {
            text-align: center;
        }

        #lf-confirm-overlay .lf-confirm-x {
            /* justify-self: end; */
            position: absolute;
            top: 0px;
            right: 10px;
            width: 44px;
            height: 44px;
            display: grid;
            place-items: center;
        }


        #lf-confirm-overlay .close {
            color: #EAF2FF;
            font-size: 28px;
            font-weight: 800;
            cursor: pointer;
            line-height: 0;
            user-select: none;
            background: transparent;
            border: 0;
        }

        #lf-confirm-overlay .close:focus {
            outline: 2px solid #FDA929;
            border-radius: 6px;
        }

        /* Bigger, bolder question */
        #lf-confirm-overlay .lf-confirm-msg {
            font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
            margin: 8px 0 12px;
            color: #EAF2FF;
            opacity: 1;
            font-size: 18px;
            font-weight: 400;
            line-height: 1.25;
            text-align: center;
            max-width: 42ch;
            white-space: pre-line;
        }


        /* keep title and subtitle tight & centered */
        #lfIntroTitle {
            margin: 0 0 8px;
        }

        #lfIntroSubtitle {
            margin: 0 0 22px;
        }

        #lfIntroForm {
            width: 100%;
            margin: 0 0 18px;
        }

        /* center the search host and limit width */
        #lf-se-host {
            width: min(820px, 88%);
            margin: 0 auto;
        }

        /* make the input row expand full width and stay centered */
        #lf-se-host .address-search,
        #lf-se-host .row {
            width: 100%;
            margin: 0 auto;
        }

        /* center the Search button under the input */
        #lf-se-host .search-btn,
        #lf-se-host button[type="submit"] {
            display: block;
            margin: 14px auto 0;
        }

        /* === Intro Search loading state (Searching...) === */
        #lfIntroSearchBtn.lf-loading {
            position: relative;
            pointer-events: none;
            opacity: 0.9;
        }

        #lfIntroSearchBtn.lf-loading::after {
            content: "";
            position: absolute;
            right: 16px;
            top: 50%;
            width: 14px;
            height: 14px;
            margin-top: -7px;
            border-radius: 50%;
            border: 2px solid rgba(255, 255, 255, 0.45);
            border-top-color: rgba(255, 255, 255, 1);
            animation: lfSpin 0.8s linear infinite;
        }

        @keyframes lfSpin {
            to {
                transform: rotate(360deg);
            }
        }




        #lfIntroTitle {
            color: #FDA929;
            letter-spacing: 1.5px;
            font-weight: 700;
            margin: 10px 0 8px;
            font-size: clamp(25px, 4vw, 50px);
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6), 4px 4px 8px rgba(0, 0, 0, 0.4);
        }

        .lf-intro-sub {
            margin: 6px 0 20px;
            opacity: .95;
        }

        /* layout del form */
        .lf-intro-search {
            display: grid;
            gap: 12px;
        }

        .lf-input-wrap {
            position: relative;
        }

        .lf-input {
            width: 100%;
            height: 56px;
            padding: 12px 48px 12px 16px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, .26);
            background: rgba(255, 255, 255, 0.9);
            color: #0f172a;
            font-size: 20px;
            letter-spacing: .3px;
            font-weight: 500;
            backdrop-filter: blur(20px);
            box-shadow: 0 6px 16px rgba(0, 0, 0, .575), inset 0 1px 2px rgba(255, 255, 255, .89), 0 0 14px rgba(253, 168, 41, .48);
        }

        .lf-input:focus {
            outline: none;
            border-color: #FDA929;
            box-shadow: 0 0 0 3px rgba(253, 169, 41, .22), 0 10px 24px rgba(0, 0, 0, .25);
        }

        .lf-icon {
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: #334155;
            opacity: .9;
            pointer-events: none;
            z-index: 2;
        }

        /* Dropdown */
        .lf-dropdown {
            position: absolute;
            left: 0;
            right: 0;
            top: calc(100% + 8px);
            display: none;
            background: #476170;
            border: 1px solid #FDA929;
            border-radius: 14px;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
            color: #EAF2FF;
            max-height: 320px;
            overflow: auto;
            z-index: 1000;
        }

        .lf-dropdown.show {
            display: block;
        }

        .lf-status {
            padding: 12px 14px;
            font-size: 13px;
            background: #1c334150;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        }

        .lf-listbox {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .lf-item {
            padding: 14px 18px;
            cursor: pointer;
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 8px;
            align-items: center;
            background: #1c33417a;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            color: #EAF2FF;
        }

        .lf-item:last-child {
            border-bottom: none;
        }

        .lf-item:hover,
        .lf-item[aria-selected="true"] {
            background: #2b4a5e;
            color: #fff;
        }

        .lf-primary {
            font-size: 17px;
            font-weight: 500;
            letter-spacing: .8px;
            color: #fff;
        }

        .lf-secondary {
            grid-column: 1/-1;
            font-size: 13px;
            color: #cbd5e1;
            opacity: .95;
            margin-top: 2px;
        }

        .lf-badge {
            font-size: 11px;
            color: #FDA929;
            border: 1px solid #FDA929;
            background: #1c334186;
            padding: 2px 8px;
            border-radius: 999px;
        }

        /* Acciones */
        .lf-actions {
            display: grid;
            grid-template-columns: 1fr minmax(240px, 420px) 1fr;
            align-items: center;
            column-gap: 16px;
        }

        .lf-btn {
            height: 40px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, .28);
            background: rgba(255, 255, 255, .10);
            color: #fff;
            font-weight: 800;
            cursor: pointer;
        }

        .lf-btn--primary {
            background: linear-gradient(45deg, #FDA929, #ffb84d);
            color: #134160;
            border: none;
            box-shadow: 0 4px 15px rgba(253, 169, 41, .3);
        }

        .lf-btn--ghost {
            background: none;
            border: 0;
            text-decoration: underline;
        }

        .lf-btn--primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(253, 169, 41, .4);
        }

        /* Optional: hide header search while open */
        #lf-intro-overlay.is-open~header #lf-se-host {
            display: none !important;
        }

        /* === Overlay layout tweak (2025-10-04) === */
        .lf-intro-search {
            display: grid;
            grid-template-columns: 1fr minmax(320px, min(980px, 92vw)) 1fr;
            grid-template-rows: auto auto;
            align-items: center;
            justify-items: center;
            /* keep children perfectly centered in column 2 */
            gap: 12px 16px;
        }



        .lf-input-wrap {
            grid-column: 2;
            /* center column */
            grid-row: 1;
            /* first row */
            width: min(980px, 92vw);
        }

        #lfIntroSkipBtn.lf-skip-inline {
            grid-column: 2;
            /* center column (same as Search) */
            grid-row: 2;
            /* same row as Search */
            justify-self: end;
            /* align to the right edge of the input width */
            align-self: center;
            background: none;
            border: 0;
            text-decoration: underline;
            color: #fff;
            font-weight: 800;
            height: auto;
            padding: 0 4px;
            cursor: pointer;
        }



        .lf-actions {
            grid-column: 2;
            /* center column */
            grid-row: 2;
            /* same row as Skip */
            display: flex;
            justify-content: center;
            /* centers the Search button */
            width: 100%;
        }

        @media (max-width: 720px) {
            .lf-intro-search {
                grid-template-columns: 1fr auto;
                grid-template-areas:
                    "input input"
                    "skip  skip"
                    "search search";
            }

            #lfIntroSkipBtn.lf-skip-inline {
                justify-self: end;
                margin-right: 8px;
            }
        }

        /* ===== Loading overlay (ARV comparables) ===== */
        #lf-loading-overlay.lf-loading-overlay {
            position: fixed;
            inset: 0;
            display: none;
            align-items: center;
            justify-content: center;
            /* background: rgba(3, 7, 18, .1);  */
            background: rgba(255, 255, 255, .1);
            backdrop-filter: blur(2px);
            z-index: 99999;
        }

        #lf-loading-overlay.lf-loading-overlay.is-open {
            display: flex;

        }

        #lf-loading-overlay .lf-loading-card {
            display: flex;
            align-items: center;
            gap: 18px;
            padding: 22px 22px;
            border-radius: 18px;
            /* background: rgba(17, 24, 39, 0.72);
            border: 1px solid rgba(255, 255, 255, 0.14); */
            /* box-shadow: 0 18px 55px rgba(0, 0, 0, 0.35); */
            max-width: min(520px, calc(100vw - 40px));
        }

        /* ring loader (adapted from reference) */
        #lf-loading-overlay .lf-ring {
            position: relative;
            width: 200px;
            height: 200px;
            border-radius: 50%;
            box-sizing: border-box;

            /* Robust spinner (works even where conic-gradient is flaky) */
            border: 5px solid rgba(253, 169, 41, 0.18);
            border-top-color: #FDA929;

            animation: lfRingSpin 1.1s linear infinite;
            flex: 0 0 auto;
        }

        /* little dot accent (like the CodePen) */
        #lf-loading-overlay .lf-ring::before {
            content: "";
            position: absolute;
            top: 6px;
            left: 50%;
            width: 10px;
            height: 10px;
            border-radius: 999px;
            background: #FDA929;
            transform: translateX(-50%);
            box-shadow: 0 0 0 4px rgba(253, 169, 41, 0.16);
        }

        #lf-loading-overlay .lf-ring::after {
            content: "";
            position: absolute;
            inset: 14px;
            border-radius: 50%;
            background-image: url('https://storage.googleapis.com/msgsndr/mIu9cdQYBapF8uAMcpog/media/67e3170e625f83022bd099d8.png');
            background-repeat: no-repeat;
            background-position: center;
            background-size: 75%;
            /* background: rgba(17, 24, 39, 0.96); */
            border: 1px solid rgba(255, 255, 255, 0.08);
            animation: lfRingSpin 1.1s linear infinite reverse;
        }

        @keyframes lfRingSpin {
            to {
                transform: rotate(360deg);
            }
        }

        #lf-loading-overlay .lf-loading-title {
            font-size: 18px;
            font-weight: 700;
            letter-spacing: .2px;
            color: #fff;
            margin: 0 0 4px;
        }

        #lf-loading-overlay .lf-loading-sub {
            font-size: 13px;
            color: rgba(255, 255, 255, .78);
            margin: 0;
        }



        /* ===== While searching: hide the big intro card (keep overlay + new loader on top) ===== */
        #lf-intro-overlay.is-loading .lf-intro-shell {
            opacity: 0;
            transform: translateY(8px) scale(0.985);
            pointer-events: none;
        }

        #lf-intro-overlay .lf-intro-shell {
            transition: opacity .18s ease, transform .18s ease;
        }

/* === lf-intro-overlay-overrides === */
        /* === Overlay: mismas fuentes que INTRO.html === */
        #lf-intro-overlay,
        #lf-intro-overlay .lf-intro-shell,
        #lf-intro-overlay .lf-intro-search,
        #lf-intro-overlay .lf-input {
            font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
        }

        /* Título y subtítulo con 'alfarn' como en el Intro */
        #lfIntroTitle,
        #lf-intro-overlay .lf-intro-sub {
            font-family: 'alfarn', serif;
        }

        /* === Overlay buttons: clonar estilo de INTRO (.btn / .btn--primary) === */
        :is(#lf-intro-overlay, #lf-confirm-overlay) .lf-btn {
            height: auto;
            padding: 0 18px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, .28);
            background: rgba(255, 255, 255, .10);
            color: #fff;
            font-weight: 800;
            font-size: .95rem;
            line-height: 42px;
            cursor: pointer;
            transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
        }

        :is(#lf-intro-overlay, #lf-confirm-overlay) .lf-btn:hover {
            transform: translateY(-1px);
            background: #fff;
            color: #0a2540;
            border-color: rgba(255, 255, 255, .36);
            box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
        }

        :is(#lf-intro-overlay, #lf-confirm-overlay) .lf-btn--primary {
            background: linear-gradient(45deg, #FDA929, #ffb84d);
            color: #134160;
            border: none;
            box-shadow: 0 4px 15px rgba(253, 169, 41, .30);
        }

        :is(#lf-intro-overlay, #lf-confirm-overlay) .lf-btn--primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(253, 169, 41, .40);
        }

        /* Botón "Skip" tipo ghost (texto subrayado) como en el Intro */
        #lf-intro-overlay #lfIntroSkipBtn,
        :is(#lf-intro-overlay, #lf-confirm-overlay) .lf-btn--ghost {
            background: none !important;
            border: 0 !important;
            color: #EAF2FF;
            text-decoration: underline;
            font-size: .95rem;
            line-height: 42px;
        }

        #lf-intro-overlay #lfIntroSkipBtn:hover,
        :is(#lf-intro-overlay, #lf-confirm-overlay) .lf-btn--ghost:hover {
            color: #FDA929;
        }

        /* === Overlay input: clonar estilo de INTRO === */
        #lf-intro-overlay .lf-input-wrap {
            position: relative;
            width: min(980px, 92vw);
            margin: 0 auto;
        }

        #lf-intro-overlay .lf-input {
            width: 80%;
            height: 50px;
            padding: 12px 48px 12px 20px;
            /* leave room for icon on right */

            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, .26);
            background: rgba(255, 255, 255, 0.9);
            color: #134160;
            font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
            font-size: 20px;
            letter-spacing: .3px;
            font-weight: 500;
            backdrop-filter: blur(20px);
            box-shadow:
                0 6px 16px rgba(0, 0, 0, .575),
                inset 0 1px 2px rgba(255, 255, 255, .89),
                0 0 14px rgba(253, 168, 41, .48);
            outline: none;
            transition: box-shadow .15s ease, border-color .15s ease;
        }

        #lf-intro-overlay .lf-input::placeholder {
            color: #6b7280;
        }

        #lf-intro-overlay .lf-input:focus {
            border-color: #FDA929;
            box-shadow: 0 0 0 3px rgba(253, 169, 41, .22), 0 10px 24px rgba(0, 0, 0, .25);
        }

        /* Icono de lupa dentro del input */
        #lf-intro-overlay .lf-icon {
            position: absolute;
            right: calc(10% + 18px);
            top: 50%;
            transform: translateY(-50%);

            color: #334155;
            opacity: .9;
            pointer-events: none;
            z-index: 3;
        }

        /* Accesibilidad: foco visible también vía :focus-visible */
        #lf-intro-overlay .lf-input:focus-visible {
            outline: 3px solid #FDA929;
            outline-offset: 2px;
        }

        /* Estados opcionales */
        #lf-intro-overlay .lf-input[readonly],
        #lf-intro-overlay .lf-input:disabled {
            opacity: .85;
            cursor: not-allowed;
        }

        /* Responsive */
        @media (max-width: 720px) {
            #lf-intro-overlay .lf-input-wrap {
                width: 92vw;
            }

            #lf-intro-overlay .lf-actions {
                flex-direction: column;
                width: 100%;
            }

            :is(#lf-intro-overlay, #lf-confirm-overlay) .lf-btn {
                width: 100%;
            }
        }

/* === lf-intro-overlay-skip-align === */
        /* Align actions row to the width of the input and center the Search button */
        #lf-intro-overlay .lf-actions {
            position: relative;
            width: min(980px, 92vw);
            margin: 0 auto;
            display: flex;
            justify-content: center;
            gap: 12px;
        }

        /* Make the Skip link look like the screenshot: white, underlined, at the right */
        #lf-intro-overlay #btn-skip {
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            background: none !important;
            border: 0 !important;
            color: #EAF2FF;
            text-decoration: underline;
            font-weight: 800;
            font-size: .95rem;
            line-height: 42px;
            padding: 0;
        }

        #lf-intro-overlay #btn-skip:hover {
            color: #FDA929;
            text-decoration: underline;
        }

        /* Mobile: stack buttons and keep Skip readable below */
        @media (max-width: 720px) {
            #lf-intro-overlay .lf-actions {
                width: 92vw;
                flex-direction: column;
                align-items: stretch;
            }

            #lf-intro-overlay #btn-skip {
                position: static;
                transform: none;
                align-self: center;
                line-height: 1.2;
                margin-top: 6px;
            }
        }

/* === lf-intro-overlay-search-size === */
        /* Search button: wider (260px), same height */
        #lf-intro-overlay #btn-search,
        #lf-intro-overlay #lfIntroSearchBtn {
            width: 260px !important;
            /* was 200px */
            height: 48px !important;
            line-height: 48px !important;
            font-size: 1.1rem !important;
            font-weight: 800;
            border-radius: 999px;
        }

/* === lf-intro-overlay-suggestions-left === */
        /* Alinear sugerencias a la izquierda en todos los posibles selectores */
        #lf-intro-overlay .lf-dropdown {
            text-align: left !important;
        }

        /* listbox genérico por ARIA + clases usadas */
        #lf-intro-overlay [role="listbox"],
        #lf-intro-overlay .lf-listbox {
            text-align: left !important;
            justify-items: start;
        }

        /* cada item */
        #lf-intro-overlay .lf-item,
        #lf-intro-overlay .lf-option,
        #lf-intro-overlay [role="option"] {
            text-align: left !important;
            justify-content: flex-start;
        }

        /* textos primario/secundario de cada opción */
        #lf-intro-overlay .lf-primary,
        #lf-intro-overlay .lf-secondary {
            text-align: left !important;
        }

        /* por si heredan centrado desde un contenedor */
        #lf-intro-overlay .lf-intro-shell * {
            text-align: inherit;
        }

/* === lf-intro-overlay-suggestions-columns === */
        /* ---- Suggestions: left text column + badge at far right ---- */
        #lf-intro-overlay .lf-item,
        #lf-intro-overlay .lf-option,
        #lf-intro-overlay [role="option"] {
            display: flex !important;
            align-items: center !important;
            gap: 12px !important;
            text-align: left !important;
        }

        /* Wrap text in a block if there are spans for primary/secondary */
        #lf-intro-overlay .lf-text {
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
        }

        #lf-intro-overlay .lf-primary {
            font-size: 14px;
            font-weight: 500;
            line-height: 1.25;
        }

        #lf-intro-overlay .lf-secondary {
            font-size: 11px;
            opacity: .95;
        }

        /* Send the badge/button to the far right */
        #lf-intro-overlay .lf-badge,
        #lf-intro-overlay .lf-choose,
        #lf-intro-overlay .lf-item>button,
        #lf-intro-overlay .lf-option>button {
            margin-left: auto !important;
            flex: 0 0 auto;
            border-radius: 999px;
            padding: 2px 8px;
            font-size: 10px;
            border: 1px solid #FDA929;
            color: #FDA929;
            background: rgba(28, 51, 65, 0.35);
        }


        /* Ensure the dropdown width matches input and content doesn't overflow */
        #lf-intro-overlay .lf-dropdown {
            width: min(980px, 92vw);
        }

        #lf-intro-overlay .lf-item,
        #lf-intro-overlay .lf-option,
        #lf-intro-overlay [role="option"] {
            white-space: nowrap;
            overflow: hidden;
        }

        #lf-intro-overlay .lf-primary,
        #lf-intro-overlay .lf-secondary {
            text-overflow: ellipsis;
            overflow: hidden;
        }

        /* Hover/active keeps layout */
        #lf-intro-overlay .lf-item:hover,
        #lf-intro-overlay .lf-option:hover,
        #lf-intro-overlay [role="option"][aria-selected="true"] {
            background: #2b4a5e !important;
        }

/* === lf-intro-overlay-suggestions-fullwidth === */
        /* Que cada sugerencia ocupe TODO el ancho del dropdown */
        #lf-intro-overlay .lf-dropdown {
            width: 600px !important;
            /* o el valor que prefieras */
            max-width: 90vw;
            margin: 0 auto;
            padding: 0 !important;
        }

        #lf-intro-overlay .lf-listbox,
        #lf-intro-overlay [role="listbox"] {
            display: block;
            margin: 0;
            padding: 0;
        }

        /* Cada opción / item estira al 100% y el hover pinta de lado a lado */
        #lf-intro-overlay .lf-item,
        #lf-intro-overlay .lf-option,
        #lf-intro-overlay [role="option"] {
            width: 100% !important;
            box-sizing: border-box;
            display: flex !important;
            align-items: center !important;
            justify-content: flex-start !important;
            gap: 12px !important;
            padding: 8px 14px !important;
            background: transparent;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        }

        #lf-intro-overlay .lf-item:last-child,
        #lf-intro-overlay .lf-option:last-child,
        #lf-intro-overlay [role="option"]:last-child {
            border-bottom: none;
        }

        #lf-intro-overlay .lf-item:hover,
        #lf-intro-overlay .lf-option:hover,
        #lf-intro-overlay [role="option"][aria-selected="true"] {
            background: #2b4a5e !important;
            /* cubre ancho completo */
        }

        /* Columna de texto a la izquierda y badge a la derecha */
        #lf-intro-overlay .lf-text {
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
            flex: 1 1 auto;
            /* ocupa el espacio disponible */
        }

        #lf-intro-overlay .lf-primary {
            font-size: 14px;
            font-weight: 500;
            line-height: 1.25;
        }

        #lf-intro-overlay .lf-secondary {
            font-size: 11px;
            opacity: .95;
        }

        #lf-intro-overlay .lf-badge,
        #lf-intro-overlay .lf-choose,
        #lf-intro-overlay .lf-item>button,
        #lf-intro-overlay .lf-option>button {
            margin-left: auto !important;
            flex: 0 0 auto;
            border-radius: 999px;
            padding: 2px 8px;
            font-size: 10px;
            border: 1px solid #FDA929;
            color: #FDA929;
            background: rgba(28, 51, 65, 0.35);
        }

        /* El texto puede cortar con ellipsis si es muy largo, pero permite ocupar el ancho */
        #lf-intro-overlay .lf-primary,
        #lf-intro-overlay .lf-secondary {
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
        }

/* === (unnamed-15) === */
        /* ======================== NEWER STYLE FOR CHIPS (START) ================== */
        /* === KPI band (Global header) — glass + gold cards, MAO-matched === */
        /* Card */
        #kpiChips .kpi-card {
            display: inline-flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;

            /* Let width adapt to content instead of forcing equal size */
            flex: 0 0 auto;
            padding: 5px 10px;
            min-width: 110px;
            margin: 2px;

            background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .05));
            border: 1px solid rgba(255, 255, 255, .18);
            border-radius: 14px;
            backdrop-filter: blur(8px);
            box-shadow: 0 4px 16px rgba(0, 0, 0, .25), 0 0 0 1px rgba(255, 255, 255, .05) inset;
            position: relative;
        }

        #kpiChips .kpi-card::before {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: 16px;
            pointer-events: none;
            box-shadow: 0 0 0 1px rgba(253, 169, 41, .35), 0 0 22px rgba(253, 169, 41, .15) inset;
        }

        /* Label (top) and value (bottom) */
        #kpiChips .kpi-label {
            font-family: 'alfarn', serif;
            /* font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; */
            /* font-family: "Roboto", sans-serif; */
            font-weight: bold;
            font-size: 12px;
            letter-spacing: 1px;
            color: #FDA929;
            opacity: .95;

        }

        #kpiChips .kpi-value {
            margin-top: 0.5px;
            font-weight: 400;
            font-size: 18px;
            color: #fff;
            text-shadow: 0 2px 4px rgba(0, 0, 0, .35);
            font-variant-numeric: tabular-nums;
            font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
        }

        /* Label inferior en blanco dentro del KPI */
        #kpiChips .kpi-sub {
            margin-top: 0.5px;
            font-size: clamp(7px, 0.75vw, 11px);
            line-height: 1.2;
            color: rgba(255, 255, 255, 0.9);
            /* blanco suave */
            font-weight: 600;
            opacity: 0.9;
        }


        /* Emphasize the middle “MAO” a touch (optional) */
        #kpiChips .kpi-card:nth-child(5) {
            transform: scale(1.06);
        }

        /* Positive / negative coloring for values */
        #kpiChips .kpi-value.is-negative {
            color: #fee2e2;
            text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
        }

        #kpiChips .kpi-value.is-positive {
            color: #ffffff;
            text-shadow: 0 1px 0 rgba(0, 0, 0, .30);
        }

        /* Kill any previous pill styles in this container */
        #kpiChips .chip,
        #kpiChips .chip--kpi,
        #kpiChips .chip__value {
            all: unset;
        }

        #kpiChips .kpi-card .kpi-label {
            font-weight: 400;
            white-space: normal;
            overflow: visible;
            text-overflow: unset;
            line-height: 1.1;
        }

        /* ======================== NEWER STYLE FOR CHIPS (END) ================== */
        .icon {
            color: #FDA929;
        }

/* === (unnamed-16) === */
        /* Helpers */
        .no-scroll {
            overflow: hidden !important;
        }

        /* Botón de cierre */
        .close {
            color: #EAF2FF;
            font-size: 28px;
            font-weight: 800;
            cursor: pointer;
            line-height: 1;
            user-select: none;
        }

        /* Panel del modal: posicionamiento relativo para anclar la X */
        .lf-intro-shell {
            position: relative;
        }

        /* Coloca la X en la esquina superior derecha del panel */
        .lf-intro-shell .lf-intro-close {
            position: absolute;
            top: 10px;
            right: 12px;
            z-index: 3;
        }

        .lf-intro-shell .lf-intro-close:focus {
            outline: 2px solid #FDA929;
            border-radius: 6px;
        }

/* === (unnamed-17) === */
        .lf-disclaimer {
            margin-top: auto;
            font-size: 11px;
            color: rgba(234, 242, 255, 0.75);
            text-align: center;
            line-height: 1.3;
        }

        .lf-disclaimer .lf-disclaimer-title {
            color: #FDA929;
            font-weight: 800;
            margin-right: 0.35em;
        }

/* === lf-attr-tab === */
        /* =====================  STYLE THIN TAB FOR PROPERTY ATTRIBUTES  START ==================*/
        /* === Thin Attributes Tab under navbar — single-row version === */
        #propertyTab {
            position: relative;
            left: 0;
            transform: translateY(-15px);
            /* keep animation + centering */
            width: 80%;
            margin: 0 auto;
            /* optional backup centering */
            background: #33556B;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.762);
            text-align: center;
            padding: 2px;
            color: #ffffff;
            font-size: 11px;
            font-weight: 300;
            letter-spacing: 0.5px;
            overflow: hidden;

            /* Animation start */
            height: 0;
            opacity: 0;
            transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
            border-bottom-left-radius: 25px;
            border-bottom-right-radius: 25px;
            /* font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; */
            /* font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; */
            font-family: "Roboto", sans-serif;
            display: flex;
            /* mejor control que inline-flex */
            flex-wrap: nowrap;
            /* en vez de wrap */
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            max-width: 100%;
            gap: clamp(4px, .8vw, 8px);

        }

        /* When visible */
        #propertyTab.is-visible {
            height: auto;
            opacity: 1;
            transform: translateY(0);
        }

        /* Single-row content */
        #propertyTabContent {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-wrap: wrap;
            gap: 5px;
            color: #ffffff;
            /* font-size: 15px; */
            font-size: clamp(11px, 0.9vw, 15px);
            flex: 1 1 auto;
            min-width: 0;
            /* clave para que funcione ellipsis */
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-right: clamp(6px, 1vw, 10px);
        }

        /* Address highlight */
        #propertyTabContent .address {
            color: #ffffff;
            margin-right: 10px;
        }

        /* Separador entre Address y el primer atributo (Beds) */
        #propertyTabContent .address+.attr::before {
            content: "•";
            opacity: 0.6;
            margin: 0 4px;
        }

        /* Separators between attributes */
        #propertyTabContent .attr+.attr::before {
            content: "•";
            opacity: 0.6;
            margin: 0 4px;
        }

        /* Los attrs no se parten */
        #propertyTabContent .attr {
            flex: 0 0 auto;
            white-space: nowrap;
        }

        /* Iconos y texto también se ajustan */
        #propertyTabContent .attr svg {
            width: clamp(12px, 1.2vw, 14px);
            height: clamp(12px, 1.2vw, 14px);
        }

        /* =====================  STYLE THIN TAB FOR PROPERTY ATTRIBUTES  END ==================*/

/* === (unnamed-19) === */
        .lf-sticky-btn {
            padding: 12px 18px;
            border-radius: 25px;
            border: 2px solid #f0c76a;
            color: #fff;
            background: linear-gradient(180deg, #fda929, #e08924);
            font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
            font-size: 14px;
            font-weight: 600;
            box-shadow: 0 10px 24px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 255, 255, .18);
            cursor: pointer;
            transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
        }

        .lf-sticky-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 14px 28px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 255, 255, .22);
            filter: brightness(1.05);
        }

        .lf-sticky-btn:active {
            transform: translateY(0);
        }

        /* simple demo scaffolding (safe to remove) */
        body {
            background: linear-gradient(to bottom right, #134160, #586C75) fixed;
            margin: 0;
            color: #fff;
            font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
        }

        .wrap {
            max-width: 960px;
            margin: 40px auto;
            padding: 24px;
        }

        h1 {
            margin: 0 0 12px;
            font-weight: 700;
            color: #FDA929;
        }

        p {
            opacity: .9;
            margin: 0 0 16px;
        }

        /* ==================== 1) Botón Download PDF responsivo ==================== */

        .right {
            display: flex;
            justify-content: flex-start;
            align-items: center;
            gap: clamp(0.35rem, 1vw, 0.75rem);
            /* espacio se ajusta */
        }

        /* Hace que el botón se adapte como la navbar */
        .lf-sticky-btn {
            white-space: nowrap;
            /* que no se rompa el texto */
            padding: clamp(6px, 0.8vw, 12px) clamp(12px, 1.6vw, 26px);
            font-size: clamp(11px, 1.1vw, 14px);
        }

        /* En móvil el botón se centra y puede ocupar más ancho */
        @media (max-width: 768px) {
            .right {
                justify-content: start;
            }

            .lf-sticky-btn {
                width: 100%;
                max-width: 260px;
                text-align: center;
            }
        }

        /* ==================== 2) KPIs responsivos (igual filosofía que navbar) ==================== */
        /* ===== KPIs forzados a UNA sola fila ===== */
        #kpiChips {
            display: flex;
            /* flex-wrap: wrap; */
            justify-content: center;
            align-items: stretch;
            gap: 6px;
            width: 70%;
            max-width: 70vw;
            margin: 10px auto 0;
            padding: 0 10px;
            box-sizing: border-box;
        }

        /* Cada KPI comparte el ancho disponible */
        #kpiChips .kpi-card {
            /* flex: 1 1 0; */
            /* se reparten todo el ancho */
            min-width: 0;
            /* permite encogerse lo que haga falta */
            padding: 1.5px 10px;
        }

        /* Texto súper compacto; puede cortarse */
        #kpiChips .kpi-label,
        #kpiChips .kpi-value {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        #kpiChips .kpi-label {
            font-size: clamp(6px, 0.7vw, 11px);
            letter-spacing: 0.3px;
        }

        #kpiChips .kpi-value {
            font-size: clamp(8px, 1vw, 16px);
        }

        /* KPIs: permitir que el texto salte de línea dentro del chip */

/* === (unnamed-20) === */
        /* 2C-A2: hide KPI band on mobile — 12 cards cannot fit without breaking bar height */
        /* On desktop the band remains fully visible and unchanged */
        @media (max-width: 768px) {
            #kpiChips {
                display: none;
            }
        }

        @media (min-width: 1600px) {
            #kpiChips .kpi-card {
                flex-basis: auto;
                min-width: 90px;
            }
        }

        /* === Botones de header: New Deal + Download PDF =================== */

        /* Layout con icono + texto */
        .header-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
        }

        /* === Layout general de los botones de header ===================== */

        .header-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.45rem;
            border-radius: 999px;
            /* por si quieres que se vean como pills */
        }

        /* Icono Font Awesome dentro del botón */
        .header-icon {
            font-size: 1.1em;
            line-height: 1;
        }

        /* Tamaño responsivo similar a la navbar */
        #newDeal,
        .lf-sticky-btn {
            font-size: clamp(11px, 1vw, 14px);
            padding: clamp(7px, 0.8vw, 10px) clamp(12px, 1.4vw, 22px);
            white-space: nowrap;
        }

        /* Botón de la derecha (Download PDF) alineado correctamente */
        .right {
            display: flex;
            align-items: start;
            justify-content: flex-end;
        }

        /* Badge "BETA" un poco más discreta */
        .beta-badge {
            font-size: 10px;
            margin-left: 4px;
            opacity: 0.7;
        }

        /* === Breakpoint: en pantallas medianas/pequeñas solo queda el icono === */
        @media (max-width: 900px) {

            .header-btn .header-label,
            .header-btn .beta-badge {
                display: none;
                /* 🔹 se oculta texto y "BETA" */
            }

            .header-btn {
                padding: 6px 8px;
                /* botón compacto tipo icono */
                min-width: 38px;
                transition: 0.3 ease all;
            }
        }

        /* En móviles, centramos el botón derecho si lo deseas */
        @media (max-width: 768px) {
            .right {
                justify-content: center;
            }
        }

/* === (unnamed-21) === */
        :root {
            /* Valores por defecto; los ajusta el script de abajo */
            --bar-h: 0px;
            --tabs-h: 0px;
            /* déjalo en 0 si no usas tabs */
            --content-offset: 0px;
            /* márgen extra opcional debajo de la barra */
        }

/* === (unnamed-22) === */
        iframe.fullscreen-iframe,
        iframe.calc {
            position: fixed;
            left: 0;
            right: 0;
            width: 100%;
            border: 0;
            top: calc(var(--bar-h) + var(--tabs-h) + var(--content-offset));
            height: calc(100vh - (var(--bar-h) + var(--tabs-h) + var(--content-offset)));
        }

/* === (unnamed-23) === */
        /* Defaults robustos para el primer paint cuando se usa layout FULLSCREEN con position:fixed */
        :root {
            --bar-h: 86px;
            /* altura estimada de la barra/header */
            --tabs-h: 0px;
            --content-offset: 0px;
        }

        /* Evita que loaders dejen la página invisible si algo falla */
        html[style*="visibility:hidden"],
        body[style*="opacity:0"] {
            visibility: visible !important;
            opacity: 1 !important;
        }

        /* Si algún contenedor queda con altura 0, fuerza un mínimo temporal */
        .fullscreen-guard,
        body[data-fullscreen-safe="1"] {
            min-height: 100dvh;
        }

/* === lf-clean-style === */
        #lf-se-host {
            display: none !important;
        }

        body[data-from-intro="1"] #lf-se-host {
            display: none !important;
        }

/* === (unnamed-25) === */
        /* Style of dropDown report buttons*/
        /* === Dropdown wrapper === */
        .report-dd {
            position: relative;
            display: inline-flex;
            /* respeta la línea del header */
        }

        /* caret con spacing consistente */
        .report-dd-caret {
            margin-left: 8px;
            opacity: 0.95;
            font-size: 0.95em;
        }

        /* === Menu (card) === */
        .report-dd-menu {
            position: absolute;
            top: calc(100% + 10px);
            right: 0;

            min-width: 240px;
            padding: 8px;
            border-radius: 16px;

            /* análogo: mismo dorado + sombra */
            border: 2px solid rgba(240, 199, 106, 0.9);
            background: rgba(18, 18, 18, 0.92);
            /* oscuro elegante, contrasta con items */
            backdrop-filter: blur(6px);

            box-shadow: 0 14px 28px rgba(0, 0, 0, .45),
                inset 0 0 0 2px rgba(255, 255, 255, .08);

            z-index: 9999;
        }

        /* === Items === */
        .report-dd-item {
            width: 100%;
            display: inline-flex;
            align-items: center;
            gap: 0.55rem;

            border: 0;
            border-radius: 999px;
            /* “pill” como tu header-btn */
            padding: 10px 12px;

            cursor: pointer;
            text-align: left;

            font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
            font-size: 13px;
            font-weight: 650;
            color: #fff;

            /* “análogo” al botón: dorado pero más sobrio */
            background: linear-gradient(180deg, rgba(253, 169, 41, 0.28), rgba(224, 137, 36, 0.18));
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10);
            transition: transform .12s ease, filter .18s ease, box-shadow .18s ease;
        }

        .report-dd-item:hover {
            filter: brightness(1.08);
            transform: translateY(-1px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, .35),
                inset 0 0 0 1px rgba(255, 255, 255, .16);
        }

        .report-dd-item:active {
            transform: translateY(0);
        }

        /* Separación visual (opcional) sin líneas feas */
        .report-dd-item+.report-dd-item {
            margin-top: 6px;
        }

        /* Iconos con ancho fijo para alinear texto */
        .report-dd-item i {
            width: 18px;
            text-align: center;
            opacity: 0.95;
        }

        /* === Responsive: igual que tu header-btn (ocultar label en <900px) === */
        @media (max-width: 900px) {
            .report-dd-menu {
                min-width: 210px;
            }

            /* En móvil puedes preferir que los items muestren texto siempre */
            /* Si quisieras ocultar texto en items también, descomenta: */
            /*
        .report-dd-item span { display:none; }
        .report-dd-item { justify-content:center; }
        */
        }

        /* Si tu header se aprieta mucho, permite que el menú se alinee al borde */
        @media (max-width: 768px) {
            .report-dd-menu {
                right: 0;
                left: auto;
            }
        }

        /* Asegura que el header esté por encima del propertyTab */
        #tabs {
            position: relative;
            z-index: 10000;
        }

        /* y que el tab esté debajo */
        #propertyTab {
            position: relative;
            /* o fixed/sticky si así lo usas */
            z-index: 5000;
        }

        /* menú encima de todo dentro del header */
        .report-dd-menu {
            z-index: 20000;
        }

/* === Phase 2D: Shell UX Polish === */
/* Scope: mobile nav visual simplification + search modal compactness */
/* Base: development branch | No HTML/JS changes | Desktop rules untouched */

        /* --- 2D-1: Text-chip nav tabs on mobile --- */
        /* Inactive tabs: strip border + box-shadow, reduce to plain text-chip look */
        /* Active tab: keep gold fill, tighten border-radius to pill, no border */
        @media (max-width: 768px) {
            .navbar a {
                border: none;
                box-shadow: none;
                background: transparent;
                opacity: 0.72;
                padding: 5px 8px;
            }

            .navbar a.active {
                border: none;
                border-radius: 20px;
                opacity: 1;
                /* gold fill preserved from base rule: background-color: var(--brand); color: #000 */
            }
        }

        /* --- 2D-2: Search modal mobile compactness (≤720px) --- */
        @media (max-width: 720px) {
            /* Tighten subtitle gap */
            #lf-intro-overlay .lf-intro-sub {
                margin-bottom: 12px;
            }

            /* Input full-width with safe box model */
            #lf-intro-overlay .lf-input {
                width: 100%;
                box-sizing: border-box;
            }

            /* Search button: prevent overflow on very narrow phones */
            #lf-intro-overlay #lfIntroSearchBtn,
            #lf-intro-overlay #btn-search {
                max-width: min(260px, 85%);
            }

            /* Disclaimer: improve readability, remove auto-push spacing */
            .lf-disclaimer {
                color: rgba(234, 242, 255, 0.85);
                line-height: 1.45;
                margin-top: 16px;
            }
        }
