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

:root {
    --bg: #ffffff;
    --text: #000000;
    --text-secondary: #737373;
    --text-muted: #6b6b6b;
    --text-button: #404040;
    --line: #e5e5e5;
    --line-strong: #d4d4d4;
    --surface-soft: #f1f1f1;
    --surface-filled: #fafafa;
    --surface-pill: #e5e5e5;
    --ink-deep: #090909;
    --radius-control: 9999px;
    --radius-panel: 12px;
    --focus-ring: rgba(59, 130, 246, 0.5);
    --nav-bg: rgba(255, 255, 255, 0.86);
    --today: #0071e3;
    --link: #0071e3;

    --ui-radius: 8px;
    --ui-control-h: 38px;
    --ui-control-px: 12px;
    --ui-control-gap: 8px;
    --ui-border: #e5e5e5;
    --ui-border-hover: #d4d4d4;
    --ui-control-bg: #ffffff;
    --ui-control-bg-hover: #f5f5f5;
    --ui-label-size: 14px;
    --ui-control-text: 14px;
    --ui-inverse: #0d0d0d;
    --ui-inverse-hover: #262626;
    --ui-inverse-active: #171717;
    --ui-inverse-text: #ffffff;
    --ui-disabled-bg: #f5f5f5;
    --ui-disabled-text: #a3a3a3;

    --holiday-national: #b91c1c;
    --holiday-national-bg: #fee2e2;
    --holiday-regional: #7c3aed;
    --holiday-regional-bg: #ede9fe;
    --holiday-government: #1d4ed8;
    --holiday-government-bg: #dbeafe;
    --holiday-bank: #0d9488;
    --holiday-bank-bg: #ccfbf1;
    --holiday-custom: #0f766e;
    --holiday-custom-bg: #ccfbf1;
    --holiday-school: #d97706;
    --holiday-school-bg: #fef3c7;
    --holiday-catholic: #4338ca;
    --holiday-catholic-bg: #e0e7ff;
    --holiday-half_day: #64748b;
    --holiday-half_day-bg: #f1f5f9;
    --holiday-unofficial: #a16207;
    --holiday-unofficial-bg: #fef9c3;
    --holiday-overlap: #991b1b;
    --holiday-overlap-bg: #fca5a5;

    --status-active: #166534;
    --status-active-bg: #dcfce7;

    --font: "SF Pro Rounded", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --page: 1200px;
    --gutter: 24px;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    color-scheme: light;
}

html, body { height: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body, h1, h2, h3, p, ul, ol, dl, figure { margin: 0; }

::selection {
    background: var(--ink-deep);
    color: #fff;
}

a {
    color: var(--link);
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
}

:focus { outline: none; }

:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

input:focus,
input:focus-visible,
textarea:focus,
textarea:focus-visible,
select:focus,
select:focus-visible,
.ui-input-shell:focus-within {
    outline: none;
    box-shadow: none;
}

.skip {
    position: absolute;
    left: -999px;
    top: 0;
}
.skip:focus,
.skip:focus-visible {
    left: 16px;
    top: 16px;
    z-index: 200;
    background: var(--bg);
    color: var(--text);
    padding: 8px 12px;
    border-radius: var(--ui-radius);
    outline: 2px solid var(--focus-ring);
}

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

.wrap,
.home,
.results,
.company,
.guide,
.error-page {
    width: 100%;
    max-width: var(--page);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

main { flex: 1 0 auto; }

/* ——— Nav ——— */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
}

.nav-inner {
    max-width: var(--page);
    margin: 0 auto;
    padding: 14px 24px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "left center right";
    align-items: center;
    gap: 16px;
}

.nav-left { grid-area: left; justify-self: start; }
.nav-center { grid-area: center; justify-self: center; min-width: 0; }
.nav-center:has(.nav-search) { width: 440px; }
.nav-right {
    grid-area: right;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav a { color: var(--text); text-decoration: none; }
.nav a:hover { text-decoration: none; }

.logo {
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
}
.logo:hover { color: var(--text); text-decoration: none; opacity: 0.65; }

.nav-btn,
.search-go {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 16px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    border-radius: var(--radius-control);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.nav-btn:hover,
.search-go:hover { background: var(--surface-soft); color: var(--text); text-decoration: none; }

.nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

form.inline { display: inline; margin: 0; }

/* ——— Footer ——— */
.footer {
    margin-top: 64px;
    padding: 40px 0 28px;
    border-top: 1px solid var(--line);
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.footer-inner {
    max-width: var(--page);
    margin: 0 auto;
    padding: 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px 40px;
    text-align: left;
}

.footer-heading {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a,
.footer-note {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: var(--text);
    text-decoration: none;
}

.footer-note { margin: 0; max-width: 28ch; }

/* ——— Home ——— */
.home { padding-bottom: 64px; }

.home-hero {
    padding: 64px 0 56px;
    text-align: center;
}

.home-title {
    font-size: clamp(36px, 8vw, 48px);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text);
}

.home-tagline {
    margin-top: 12px;
    font-size: 21px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-secondary);
}

.home-hero-showcase {
    max-width: 720px;
    margin-inline: auto;
}

.home-search { width: 100%; margin: 0; }

.home-search .search-shell { min-height: 52px; }

/* ——— Search shell (nav + home). Border on the shell, never the input. ——— */
.search-form { width: 100%; min-width: 0; }

.search-shell {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 36px;
    padding: 0 4px 0 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    background: var(--surface-soft);
    transition: background 0.15s, border-color 0.2s;
}

.search-shell:hover { background: var(--ui-control-bg-hover); }

.search-shell:focus-within {
    border-color: var(--line-strong);
    background: var(--bg);
    box-shadow: none;
}

.search-shell input {
    all: unset;
    display: block;
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    height: 34px;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    letter-spacing: 0;
    line-height: 1;
}

.search-shell input::placeholder { color: var(--text-muted); }

.home-search .search-shell input {
    height: 48px;
    font-size: 16px;
}

.search-go { flex-shrink: 0; height: 28px; padding: 0 12px; }
.home-search .search-go { height: 36px; }

.search-form.compact { margin: 0 0 32px; max-width: 440px; }

.hints {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hints a,
.hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: var(--radius-control);
    background: var(--surface-soft);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    transition: background 0.15s, color 0.15s;
}

.hints a:hover,
.hint:hover {
    background: var(--surface-pill);
    color: var(--text);
    text-decoration: none;
}

.hints a.is-active,
.hint.is-active {
    background: var(--ink-deep);
    color: #fff;
}

.hints code,
.hint code {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    background: none;
    padding: 0;
}

.home-search-hint {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.home-search-hint kbd {
    font: inherit;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 0.4em;
    background: var(--bg);
}

/* ——— Content pages ——— */
.results,
.company,
.guide {
    padding-top: 48px;
    padding-bottom: 64px;
}

.results h1,
.company h1,
.guide h1,
.error-page h1 {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.15;
    color: var(--text);
}

.company h1,
.guide h1 { margin-bottom: 28px; }

.guide-prose {
    margin-top: 28px;
    max-width: 42rem;
}

.guide-prose p + p { margin-top: 12px; }

.guide-block { margin-top: 36px; max-width: 42rem; }

.guide-block h2 {
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.guide-list {
    margin: 12px 0 0;
    padding-left: 1.15em;
}

.guide-list li + li { margin-top: 8px; }

.guide-note {
    margin-top: 40px;
    max-width: 42rem;
    color: var(--text-muted);
    font-size: 13px;
}

.guide-index {
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
}

.guide-block .guide-index { margin-top: 12px; }

.guide-index li { border-top: 1px solid var(--line); }
.guide-index li:last-child { border-bottom: 1px solid var(--line); }

.guide-index a {
    display: block;
    padding: 16px 0;
    color: var(--text);
    text-decoration: none;
}

.guide-index a:hover { color: var(--link); }

.guide-index strong {
    display: block;
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.guide-index span {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 15px;
}

.type-guide {
    display: inline-block;
    margin-left: 8px;
    font-size: 13px;
}

.kicker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 13px;
}

.kicker a { color: var(--text-secondary); }
.kicker a:hover { color: var(--text); text-decoration: none; }

.meta,
.report-lede {
    color: var(--text-secondary);
    font-weight: 400;
}

.results > .meta,
.report > .meta { margin-top: 12px; font-size: 13px; }

.report-lede {
    margin-top: 12px;
    font-size: 21px;
    line-height: 1.5;
    max-width: 42rem;
}

.report-filters { justify-content: flex-start; margin-top: 24px; }

.result-list {
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
}

.result-list > li { border-top: 1px solid var(--line); }
.result-list > li:last-child { border-bottom: 1px solid var(--line); }

.result-card {
    display: grid;
    gap: 4px;
    padding: 18px 0;
    color: inherit;
    text-decoration: none;
}

.result-card:hover { color: inherit; text-decoration: none; }

.result-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.result-card h2,
.result-card h3 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.result-card:hover h2,
.result-card:hover h3 { color: var(--link); }

.result-card__ids,
.result-card__loc {
    color: var(--text-secondary);
    font-size: 14px;
}

.result-card__ids { font-variant-numeric: tabular-nums; }

.pager {
    display: flex;
    gap: 20px;
    margin-top: 28px;
    font-size: 14px;
    font-weight: 500;
}

.pager a { color: var(--text); }
.pager a:hover { color: var(--link); text-decoration: none; }

.empty-state { padding: 8px 0 0; }
.empty-state h1,
.empty-state h2 { margin-bottom: 12px; }
.empty-state p { color: var(--text-secondary); font-size: 21px; max-width: 40rem; }
.empty-state h2 {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: var(--radius-control);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    background: var(--surface-soft);
    color: var(--text-secondary);
}

.badge--active { color: var(--status-active); background: var(--status-active-bg); }
.badge--inactive,
.badge--unknown { color: var(--holiday-half_day); background: var(--holiday-half_day-bg); }
.badge--dissolved { color: var(--holiday-national); background: var(--holiday-national-bg); }

.facts { display: grid; }

.facts > div {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.facts > div:last-child { border-bottom: 1px solid var(--line); }

.facts dt {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
}

.facts dd {
    margin: 0;
    font-weight: 500;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.facts dd.prose {
    white-space: pre-wrap;
    line-height: 1.5;
    font-weight: 400;
}

.nace-list { margin: 0; padding: 0; list-style: none; }
.nace-list li { margin: 4px 0; }
.nace-name { color: var(--text-secondary); font-weight: 400; }
.muted { color: var(--text-secondary); font-weight: 400; }

.cluster { margin-top: 40px; }

.cluster__head h2,
.company-web h2,
.admin h2 {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.cluster__head h2 a { color: inherit; }
.cluster__head h2 a:hover { color: var(--link); text-decoration: none; }

.cluster .result-list { margin-top: 8px; }
.cluster__more { margin-top: 12px; font-size: 14px; font-weight: 500; }
.cluster__more a { color: var(--text); }
.cluster__more a:hover { color: var(--link); text-decoration: none; }
.cluster .meta { margin-top: 6px; font-size: 13px; }

.company-web {
    margin-top: 48px;
    padding-top: 8px;
}

.company-web__lede {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.company-web__lede a { font-weight: 500; }

.company-web__legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.company-web__legend li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.company-web__swatch {
    width: 14px;
    height: 14px;
    border-radius: var(--radius-control);
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--line-strong);
    flex-shrink: 0;
}

.company-web__swatch--current { background: var(--ink-deep); box-shadow: none; }
.company-web__swatch--co { background: #fff; }
.company-web__swatch--addr {
    border-radius: 2px;
    transform: rotate(45deg);
    background: var(--link);
    box-shadow: none;
}
.company-web__swatch--addr-near {
    border-radius: 2px;
    transform: rotate(45deg);
    background: #8eb7ea;
    box-shadow: none;
}

.company-web__canvas {
    height: min(520px, 70vh);
    margin-top: 16px;
    background: var(--surface-filled);
    border-radius: var(--radius-panel);
    overflow: hidden;
    cursor: grab;
}

.company-web__canvas.is-fallback {
    display: grid;
    place-items: center;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: default;
}

.company-web__hint {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 13px;
}

.company-web__near-wrap { margin-top: 16px; }

.company-web__near {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 16px;
    border: 0;
    border-radius: var(--ui-radius);
    background: var(--ui-inverse);
    color: var(--ui-inverse-text);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s;
}

.company-web__near::before {
    content: "";
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 1.5a.75.75 0 0 1 .75.75v5h5a.75.75 0 0 1 0 1.5h-5v5a.75.75 0 0 1-1.5 0v-5h-5a.75.75 0 0 1 0-1.5h5v-5A.75.75 0 0 1 8 1.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 1.5a.75.75 0 0 1 .75.75v5h5a.75.75 0 0 1 0 1.5h-5v5a.75.75 0 0 1-1.5 0v-5h-5a.75.75 0 0 1 0-1.5h5v-5A.75.75 0 0 1 8 1.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.company-web__near:hover:not(:disabled) { background: var(--ui-inverse-hover); }
.company-web__near:active:not(:disabled) { background: var(--ui-inverse-active); }
.company-web__near:disabled {
    cursor: default;
    background: var(--ui-disabled-bg);
    color: var(--ui-disabled-text);
}
.company-web__near:disabled::before { display: none; }

.report .company-web { margin-top: 28px; }

/* ——— Errors ——— */
.error-page {
    padding-top: 18vh;
    padding-bottom: 64px;
}

.error-page .eyebrow {
    margin: 0 0 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.error-page p {
    margin-top: 12px;
    font-size: 21px;
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 36rem;
}

/* ——— Forms (Plane) ——— */
.ui-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--ui-control-gap);
    width: 100%;
    text-align: left;
}

.ui-label {
    font-size: var(--ui-label-size);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text);
}

.ui-input-shell {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 0 var(--ui-control-px);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-control-bg);
    cursor: text;
    transition: border-color 0.2s, background-color 0.2s;
}

.ui-input-shell:hover {
    border-color: var(--ui-border-hover);
    background: var(--ui-control-bg-hover);
}

.ui-input-shell:focus-within {
    border-color: var(--line-strong);
    background: var(--ui-control-bg);
    box-shadow: none;
}

.ui-input,
.ui-textarea,
.ui-select {
    width: 100%;
    height: var(--ui-control-h);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-family: var(--font);
    font-size: var(--ui-control-text);
    font-weight: 400;
    letter-spacing: 0;
    color: var(--text);
    outline: none;
    box-shadow: none;
}

.ui-input::placeholder,
.ui-textarea::placeholder { color: var(--text-muted); }

.ui-input-shell--textarea {
    align-items: flex-start;
    padding-top: 8px;
    padding-bottom: 8px;
}

.ui-textarea {
    height: auto;
    min-height: 140px;
    line-height: 1.5;
    resize: vertical;
}

.ui-input--file {
    height: auto;
    min-height: var(--ui-control-h);
    padding: 8px 0;
    cursor: pointer;
}

.ui-select {
    padding: 0 22px 0 0;
    appearance: none;
    -webkit-appearance: none;
    line-height: 1.3;
    cursor: pointer;
    background-image: none;
}

.ui-input-shell:has(> .ui-select):not(.is-enhanced) {
    padding-right: 32px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6.25L8 10.25L12 6.25' stroke='%236b6b6b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px 14px;
}

.ui-select-shell.is-open {
    border-color: var(--line-strong);
    background: var(--ui-control-bg);
}

.ui-select-shell.is-enhanced > select.ui-select {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.ui-select-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: calc(var(--ui-control-h) - 2px);
    padding: 0;
    border: 0;
    background: transparent;
    font-family: var(--font);
    font-size: var(--ui-control-text);
    font-weight: 400;
    line-height: 1.3;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.ui-select-trigger:focus { outline: none; }

.ui-select-value {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ui-select-value.is-placeholder { color: var(--text-muted); }

.ui-select-chevron {
    flex: 0 0 auto;
    color: var(--text-muted);
    transition: transform 0.15s ease, color 0.15s ease;
}

.ui-select-shell.is-open .ui-select-chevron {
    transform: rotate(180deg);
    color: var(--text);
}

.ui-select-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: min(280px, 50vh);
    overflow: auto;
    padding: 6px;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-control-bg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.ui-select-menu[hidden] { display: none !important; }

.ui-select-option {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.ui-select-option:hover,
.ui-select-option:focus {
    outline: none;
    background: var(--ui-control-bg-hover);
}

.ui-select-option.is-selected {
    background: color-mix(in srgb, var(--text) 6%, transparent);
    font-weight: 500;
}

.ui-select-option.is-selected:hover,
.ui-select-option.is-selected:focus {
    background: color-mix(in srgb, var(--text) 9%, transparent);
}

.ui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 8px 16px;
    min-height: 40px;
    border: 0;
    border-radius: var(--ui-radius);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.ui-btn:focus { outline: none; }
.ui-btn:focus-visible,
.nav-btn:focus-visible,
.search-go:focus-visible,
.ui-select-trigger:focus-visible,
.company-web__near:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.ui-btn:disabled,
.ui-btn[aria-disabled="true"] {
    background: var(--ui-disabled-bg);
    color: var(--ui-disabled-text);
    cursor: default;
}

.ui-btn--inverse {
    background: var(--ui-inverse);
    color: var(--ui-inverse-text);
}

.ui-btn--inverse:hover:not(:disabled):not([aria-disabled="true"]) {
    background: var(--ui-inverse-hover);
}

.ui-btn--inverse:active:not(:disabled):not([aria-disabled="true"]) {
    background: var(--ui-inverse-active);
}

.ui-btn--ghost {
    background: transparent;
    color: var(--text-button);
    padding: 8px 0;
    min-height: 0;
}

.ui-btn--ghost:hover { background: transparent; color: var(--text); }

.ui-btn--danger {
    background: transparent;
    color: var(--holiday-national);
    padding: 8px 0;
    min-height: 0;
}

.ui-btn--danger:hover { background: transparent; color: var(--holiday-overlap); }

.auth-page {
    width: 100%;
    max-width: 360px;
    margin: 10vh auto 0;
    text-align: center;
}

.auth-title {
    font-size: clamp(36px, 8vw, 52px);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 28px;
}

.auth-form,
.edit-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    width: 100%;
    text-align: left;
}

.edit-form { max-width: 420px; }

.auth-form .ui-btn--inverse { width: 100%; margin-top: 4px; }

.auth-page .flash { margin-bottom: 16px; text-align: left; }

.flash {
    padding: 10px 12px;
    border-radius: var(--ui-radius);
    background: var(--surface-soft);
    font-size: 14px;
    color: var(--text);
}

.flash.error {
    background: var(--holiday-national-bg);
    color: var(--holiday-national);
}

.flash.ok {
    background: var(--holiday-bank-bg);
    color: var(--holiday-custom);
}

.form-aside {
    margin-top: 8px;
    font-size: 14px;
}

.form-aside a { color: var(--text-secondary); }
.form-aside a:hover { color: var(--text); text-decoration: none; }

form:has(.ui-btn--danger) { margin-top: 8px; }

/* ——— Admin ——— */
.admin main.wrap {
    padding-top: 48px;
    padding-bottom: 64px;
}

.admin h1 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 0 24px;
}

.admin h2 { margin: 36px 0 12px; }

.admin .lede,
.admin > p,
.admin main > p {
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 46rem;
}

.admin main > p + p,
.admin main > p + h2,
.admin main > .flash { margin-top: 12px; }

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px 40px;
    padding: 0;
    list-style: none;
    margin: 0 0 32px;
}

.stats li {
    background: none;
    padding: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.stats strong {
    display: block;
    margin-bottom: 8px;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

th, td {
    text-align: left;
    padding: 12px 8px 12px 0;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

td a { color: var(--text); font-weight: 500; }
td a:hover { color: var(--link); text-decoration: none; }

.admin main > p a { color: var(--text); font-weight: 500; }
.admin main > p a:hover { color: var(--link); }

pre {
    margin-top: 12px;
    background: var(--surface-filled);
    padding: 12px 14px;
    overflow: auto;
    border-radius: var(--ui-radius);
    font-size: 13px;
    line-height: 1.5;
    letter-spacing: 0;
}

code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.92em;
}

p code, li code, .company-map__meta code {
    background: var(--surface-soft);
    padding: 0.05em 0.35em;
    border-radius: 4px;
}

pre code { background: none; padding: 0; }

/* ——— Map ——— */
body.map-page {
    overflow: hidden;
    height: 100%;
}

body.map-page main {
    flex: 1;
    min-height: 0;
    display: flex;
    padding: 0;
    max-width: none;
    width: 100%;
}

.company-map {
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.company-map__canvas {
    position: absolute;
    inset: 0;
    background: var(--surface-filled);
    z-index: 0;
}

.company-map__hud {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 500;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-panel);
    padding: 16px 18px;
    max-width: min(360px, calc(100% - 32px));
    pointer-events: none;
    box-shadow: none;
    border: 0;
}

.company-map__hud .kicker { margin: 0 0 6px; }

.company-map__hud h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.company-map__meta {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.45;
}

.map-pin { background: none !important; border: 0 !important; }

.map-pin span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-control);
    background: var(--ink-deep);
    color: #fff;
    font-family: var(--font);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.map-pin--dot span {
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.leaflet-container {
    font-family: var(--font);
    background: var(--surface-filled);
}

.leaflet-control-attribution {
    font-size: 10px !important;
    background: rgba(255, 255, 255, 0.8) !important;
    color: var(--text-muted) !important;
}

.leaflet-control-zoom a {
    color: var(--text) !important;
    border: 0 !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 16px !important;
    border-radius: 0 !important;
}

.leaflet-bar {
    border: 1px solid var(--line) !important;
    border-radius: var(--ui-radius) !important;
    overflow: hidden;
    box-shadow: none !important;
}

.leaflet-tooltip {
    font-family: var(--font);
    font-size: 13px;
    letter-spacing: 0;
    border: 1px solid var(--line) !important;
    border-radius: var(--ui-radius) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1) !important;
    padding: 6px 8px !important;
    background: #fff;
    color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 900px) {
    .nav-inner {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "left right"
            "center center";
    }

    .nav-center:has(.nav-search) {
        width: 100%;
        justify-self: stretch;
    }

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

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

@media (max-width: 640px) {
    .ui-input,
    .ui-textarea,
    .ui-select,
    .search-shell input,
    input,
    select,
    textarea {
        font-size: 16px;
    }

    .home-hero { padding: 40px 0 32px; }

    .facts > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .result-card__head {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }

    .footer-grid,
    .stats { grid-template-columns: 1fr; }

    .company-map__hud {
        top: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 2px;
}

.lang-switch a {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 8px;
    border-radius: 8px;
    text-decoration: none;
}

.lang-switch a.is-active {
    color: var(--text);
    background: var(--surface-soft);
}

.lang-switch a:hover { color: var(--text); text-decoration: none; }

.edit-form--wide { max-width: 720px; }

.admin .checkline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.admin .row-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.admin .row-actions form {
    display: flex;
    gap: 12px;
    margin: 0;
}

.admin .mini {
    background: none;
    border: 0;
    padding: 0;
    color: var(--text);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.admin .mini:hover { color: var(--link); }

.ui-textarea--mono {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 13px;
}

.ui-textarea--tall { min-height: 220px; }

.admin .field-hint {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.admin .lang-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.admin .lang-block h2 { margin: 12px 0 0; }
