:root {
    color-scheme: light;
    --surface: #ffffff;
    --surface-elevated: rgba(255, 255, 255, 0.72);
    --surface-subtle: rgba(255, 255, 255, 0.24);
    --surface-strong: rgba(15, 23, 42, 0.08);
    --surface-overlay: rgba(12, 18, 36, 0.76);
    --text-primary: #0b1220;
    --text-secondary: rgba(15, 23, 42, 0.72);
    --accent: #6366f1;
    --accent-strong: #4f46e5;
    --accent-soft: rgba(99, 102, 241, 0.18);
    --success: #10b981;
    --danger: #ef4444;
    --border: rgba(99, 102, 241, 0.25);
    --status-underinvested: #ef4444;
    --status-deviation: #f97316;
    --status-balanced: #22c55e;
    --status-overinvested: #facc15;
    --status-overinvested-nohh: #a855f7;
    --status-unknown: #94a3b8;
    --legend-under: var(--status-underinvested);
    --legend-deviation: var(--status-deviation);
    --legend-balanced: var(--status-balanced);
    --legend-over: var(--status-overinvested);
    --legend-over-nohh: var(--status-overinvested-nohh);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #0b0f19;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.28), transparent 55%),
        radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.22), transparent 45%), #0f172a;
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
}

.app-shell {
    width: min(1400px, 95vw);
    margin: 2.5vh auto;
    height: 95vh;
    min-height: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.52), rgba(15, 23, 42, 0.32));
    border-radius: 32px;
    box-shadow: 0 40px 110px rgba(15, 23, 42, 0.45);
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(320px, 380px) 1fr;
    backdrop-filter: blur(24px);
}

.sidebar {
    background: rgba(12, 18, 36, 0.6);
    padding: 2.25rem clamp(1.8rem, 3vw, 2.6rem);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    color: rgba(241, 245, 249, 0.96);
    border-right: 1px solid rgba(148, 163, 184, 0.14);
    overflow-y: auto;
}

.sidebar__header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    background: rgba(99, 102, 241, 0.16);
    color: #c7d2fe;
    border: 1px solid rgba(99, 102, 241, 0.28);
}

.sidebar__title {
    margin: 0;
    font-size: clamp(1.6rem, 2vw, 2rem);
    font-weight: 700;
    color: #f8fafc;
}

.sidebar__subtitle {
    margin: 0;
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.95rem;
    line-height: 1.6;
}

.sidebar__section {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.section__title,
.section__header {
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(226, 232, 240, 0.68);
}

.section__text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(226, 232, 240, 0.78);
}

.info-card {
    background: rgba(15, 23, 42, 0.55);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.toggle-group {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 18px;
    padding: 0.65rem 1rem;
    cursor: pointer;
    position: relative;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.85);
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.toggle:hover {
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}

.toggle input[type='radio'] {
    display: none;
}

.toggle input[type='radio']:checked + span,
.toggle:has(input[type='radio']:checked) {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(129, 140, 248, 0.95));
    border-color: rgba(99, 102, 241, 0.8);
    box-shadow: 0 12px 25px rgba(99, 102, 241, 0.25);
    color: #f8fafc;
}

.filter-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.button {
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.55rem 1.05rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.2s ease, border 0.2s ease;
    font-family: inherit;
}

.button--primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #f8fafc;
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 16px 32px rgba(99, 102, 241, 0.35);
}

.button--primary:hover {
    transform: translateY(-1px);
}

.button--primary:active {
    transform: translateY(1px);
}

.button--ghost {
    background: rgba(15, 23, 42, 0.2);
    border-color: rgba(99, 102, 241, 0.25);
    color: rgba(226, 232, 240, 0.85);
}

.button--ghost:hover {
    border-color: rgba(99, 102, 241, 0.45);
    background: rgba(99, 102, 241, 0.18);
}

.button--dense {
    padding: 0.35rem 0.8rem;
    font-size: 0.75rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.field__label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: rgba(226, 232, 240, 0.6);
    text-transform: uppercase;
}

.field__control {
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    font-family: inherit;
    background: rgba(15, 23, 42, 0.55);
    color: rgba(226, 232, 240, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.field__control:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.65);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.28);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.tag-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: rgba(226, 232, 240, 0.85);
    cursor: pointer;
    transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
}

.tag-option:hover {
    transform: translateY(-1px);
    border-color: rgba(99, 102, 241, 0.45);
}

.tag-option__count {
    font-size: 0.75rem;
    color: rgba(226, 232, 240, 0.65);
}

.tag-option input[type='checkbox'] {
    display: none;
}

.tag-option input[type='checkbox']:checked + span,
.tag-option:has(input[type='checkbox']:checked) {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.9), rgba(99, 102, 241, 0.85));
    border-color: rgba(56, 189, 248, 0.85);
    color: #0b1220;
    box-shadow: 0 14px 32px rgba(56, 189, 248, 0.28);
}

.tag-option:has(input[type='checkbox']:checked) .tag-option__count {
    color: rgba(15, 23, 42, 0.7);
}

.tag-option--active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.9), rgba(99, 102, 241, 0.85));
    border-color: rgba(56, 189, 248, 0.85);
    color: #0b1220;
    box-shadow: 0 14px 32px rgba(56, 189, 248, 0.28);
}

.tag-option--active .tag-option__count {
    color: rgba(15, 23, 42, 0.7);
}

.status-options {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.status-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.95rem;
    border-radius: 18px;
    border: 1px solid var(--status-accent-border, rgba(148, 163, 184, 0.24));
    transition: transform 0.18s ease, border 0.18s ease, background 0.2s ease,
        box-shadow 0.2s ease;
    background: var(--status-accent, rgba(15, 23, 42, 0.45));
    position: relative;
    overflow: hidden;
    color: rgba(226, 232, 240, 0.9);
}

.status-option--active {
    border-color: var(--status-accent-border, rgba(99, 102, 241, 0.6));
    transform: translateY(-1px);
    box-shadow: 0 16px 28px var(--status-accent-shadow, rgba(99, 102, 241, 0.22));
}

.status-option input[type='checkbox'] {
    display: none;
}

.status-option__swatch {
    width: 0.85rem;
    height: 1.85rem;
    border-radius: 999px;
    background: var(--swatch-color, var(--accent));
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.22);
}

.status-option__meta {
    margin-left: auto;
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.6);
}

.map-wrapper {
    position: relative;
    background: rgba(12, 18, 36, 0.85);
    min-height: 0;
    overflow: hidden;
}

.postal-search {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    width: min(268px, calc(100% - 2.5rem));
    z-index: 5;
    pointer-events: none;
}

.postal-search__inner {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(16px);
    color: #f8fafc;
    pointer-events: auto;
}

.postal-search__title {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.7);
}

.postal-search__field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.postal-search__label {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.56);
}

.postal-search__input {
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    padding: 0.5rem 0.8rem;
    background: rgba(15, 23, 42, 0.58);
    color: #f8fafc;
    font-size: 0.92rem;
    font-family: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.postal-search__input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.65);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.24);
}

.postal-search__input:disabled {
    opacity: 0.6;
    cursor: progress;
}

.postal-search__loader {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0;
    font-size: 0.72rem;
    color: rgba(226, 232, 240, 0.7);
}

.postal-search__loader[hidden] {
    display: none;
}

.postal-search__loader-bar {
    position: relative;
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.28);
    overflow: hidden;
}

.postal-search__loader-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.85), rgba(129, 140, 248, 0.9));
    animation: postal-search-loading 1.25s ease-in-out infinite;
}

.postal-search__loader-text {
    white-space: nowrap;
}

@keyframes postal-search-loading {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(-10%);
    }
    100% {
        transform: translateX(100%);
    }
}

.postal-search__bulk-toggle {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.postal-search__show-all {
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.58);
    color: inherit;
    font-family: inherit;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    text-transform: uppercase;
    font-weight: 600;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
}

.postal-search__show-all:hover:not(:disabled) {
    border-color: rgba(99, 102, 241, 0.52);
    background: rgba(99, 102, 241, 0.18);
    transform: translateY(-1px);
}

.postal-search__show-all:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.postal-search__show-all--active {
    border-color: rgba(99, 102, 241, 0.7);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.26), rgba(129, 140, 248, 0.34));
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.28);
}

.postal-search__warning {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.45;
    color: #facc15;
    background: rgba(120, 53, 15, 0.32);
    border: 1px solid rgba(234, 179, 8, 0.35);
    border-radius: 10px;
    padding: 0.45rem 0.6rem;
}

.postal-search__hint {
    margin: 0;
    font-size: 0.72rem;
    color: rgba(226, 232, 240, 0.64);
}

.postal-search__results {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 200px;
    overflow-y: auto;
}

.postal-search__results--expanded {
    max-height: min(320px, 60vh);
}

.postal-search__result {
    margin: 0;
}

.postal-search__toggle {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.52);
    color: inherit;
    padding: 0.55rem 0.75rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    font-family: inherit;
    font-size: 0.88rem;
}

.postal-search__toggle:hover {
    border-color: rgba(99, 102, 241, 0.52);
    background: rgba(99, 102, 241, 0.18);
    transform: translateY(-1px);
}

.postal-search__toggle--active {
    border-color: rgba(99, 102, 241, 0.7);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.72), rgba(129, 140, 248, 0.82));
    box-shadow: 0 16px 28px rgba(99, 102, 241, 0.26);
}

.postal-search__code {
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.78);
    flex-shrink: 0;
}

.postal-search__details {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
    min-width: 0;
}

.postal-search__name {
    font-weight: 600;
    font-size: 0.86rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.postal-search__state {
    font-size: 0.74rem;
    color: rgba(226, 232, 240, 0.62);
}

.postal-search__empty {
    padding: 0.6rem 0.25rem;
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.64);
}

.postal-search__active {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.postal-search__summary {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.postal-search__count {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.68);
    display: inline-flex;
    gap: 0.25rem;
    align-items: baseline;
}

.postal-search__count strong {
    font-size: 1rem;
    color: #f8fafc;
}

.postal-search__status {
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.8);
}

.postal-search__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.postal-chip {
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.25);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #f8fafc;
    padding: 0.25rem 0.65rem;
    font-size: 0.78rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.postal-chip:hover {
    background: rgba(99, 102, 241, 0.4);
    border-color: rgba(129, 140, 248, 0.6);
}

.postal-search__more {
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.65);
    align-self: center;
}

.postal-search__chips-placeholder {
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.6);
}

.postal-search__toggle--active .postal-search__code,
.postal-search__toggle--active .postal-search__name {
    color: #f8fafc;
}

.postal-search__toggle--active .postal-search__state {
    color: rgba(226, 232, 240, 0.8);
}

.postal-search__result:first-child .postal-search__toggle {
    margin-top: 0.15rem;
}

.postal-search__results::-webkit-scrollbar {
    width: 6px;
}

.postal-search__results::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.35);
    border-radius: 999px;
}

.postal-search__results::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.35);
}

.map {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.map-loader {
    position: absolute;
    inset: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(10, 12, 24, 0.82);
    color: #f8fafc;
    border-radius: 24px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.42);
    transition: opacity 0.25s ease;
}

.map-loader__spinner {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    border: 3px solid rgba(148, 163, 184, 0.45);
    border-top-color: #f8fafc;
    animation: map-loader-spin 0.85s linear infinite;
}

.map-loader__text {
    display: block;
    font-size: 0.82rem;
    letter-spacing: inherit;
}

.map-loader.is-hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes map-loader-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.map-toolbar {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    border-radius: 1.25rem;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.35);
    overflow: hidden;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.25);
    backdrop-filter: blur(12px);
    z-index: 4;
}

.map-toolbar__button {
    background: none;
    border: none;
    color: #f8fafc;
    font-size: 1.45rem;
    padding: 0.65rem 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.map-toolbar__button:hover {
    background: rgba(99, 102, 241, 0.18);
}

.map-toolbar__button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.map-toolbar__button--reset {
    font-size: 1.1rem;
}

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

.insight-list__item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.15rem;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.insight-list__item dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(226, 232, 240, 0.6);
    margin: 0;
}

.insight-list__item dd {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #f8fafc;
}

.legend {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.1rem 1.2rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.legend__title {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.6);
}

.legend__gradient {
    height: 0.75rem;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        var(--legend-under),
        var(--legend-deviation),
        var(--legend-balanced),
        var(--legend-over),
        var(--legend-over-nohh)
    );
}

.legend__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.78);
}

.legend__swatch {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    margin-right: 0.4rem;
}

.legend__swatch--under {
    background: var(--legend-under);
}

.legend__swatch--deviation {
    background: var(--legend-deviation);
}

.legend__swatch--balanced {
    background: var(--legend-balanced);
}

.legend__swatch--over {
    background: var(--legend-over);
}

.legend__swatch--over-nohh {
    background: var(--legend-over-nohh);
}

@media (max-width: 1024px) {
    .postal-search {
        width: min(360px, calc(100% - 2.5rem));
        left: 1.25rem;
    }
}

@media (max-width: 768px) {
    .postal-search {
        position: static;
        width: auto;
        margin: 1rem;
    }

    .postal-search__inner {
        border-radius: 18px;
    }
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 11, 24, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.overlay.hidden {
    display: none;
}

.overlay__card {
    width: min(420px, 92vw);
    background: rgba(15, 23, 42, 0.86);
    border-radius: 24px;
    padding: 2.4rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    box-shadow: 0 35px 80px rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #f8fafc;
}

.overlay__card h2 {
    margin: 0;
    font-size: 1.35rem;
}

.overlay__card p {
    margin: 0;
    color: rgba(226, 232, 240, 0.78);
    line-height: 1.5;
}

.overlay__card input[type='password'],
.overlay__card input[type='text'] {
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    padding: 0.75rem 0.95rem;
    font-size: 0.95rem;
    font-family: inherit;
    background: rgba(15, 23, 42, 0.65);
    color: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.overlay__card input[type='password']::placeholder,
.overlay__card input[type='text']::placeholder {
    color: rgba(226, 232, 240, 0.48);
}

.overlay__card input[type='password']:focus,
.overlay__card input[type='text']:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.26);
}

.overlay__actions {
    display: flex;
    justify-content: flex-end;
}

.overlay__hint {
    font-size: 0.85rem;
    color: rgba(148, 163, 184, 0.85);
}

.marker-info {
    display: grid;
    gap: 0.35rem;
    font-size: 0.9375rem;
    line-height: 1.45;
    color: #0b1220;
}

.marker-info strong {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
}

.marker-info__list {
    margin: 0.35rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.3rem;
}

.marker-info__list li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: #1f2937;
}

.marker-info__list span:last-child {
    font-weight: 600;
}

.marker-info__actions {
    margin-top: 0.25rem;
    display: flex;
}

.marker-info__button {
    appearance: none;
    border: none;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.marker-info__button:hover,
.marker-info__button:focus {
    background: #1d4ed8;
}

.marker-info__button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

.overlay__error {
    margin: 0;
    color: var(--danger);
    font-weight: 600;
}

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

@media (max-width: 1200px) {
    .app-shell {
        grid-template-columns: minmax(300px, 360px) 1fr;
        width: 96vw;
        margin: 2vh auto;
    }

    .sidebar {
        padding-inline: clamp(1.6rem, 2.5vw, 2.2rem);
    }
}

@media (max-width: 960px) {
    body {
        overflow: auto;
        background: #0f172a;
    }

    .app-shell {
        grid-template-columns: 1fr;
        margin: 0;
        width: 100vw;
        height: auto;
        min-height: 100vh;
        border-radius: 0;
    }

    .sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.16);
        max-height: 60vh;
    }

    .map {
        height: auto;
        min-height: 60vh;
    }

    .map-loader {
        inset: 1.25rem;
    }
}
