:root {
    --bg: #edf3f9;
    --bg-soft: #f7fbff;
    --card: #ffffff;
    --line: #d8e1ec;
    --line-strong: #c8d5e4;
    --text: #16304a;
    --muted: #5c6f83;
    --primary: #1166d8;
    --primary-dark: #0e56b7;
    --green: #1f9d5c;
    --shadow: 0 12px 36px rgba(19, 47, 80, 0.08);
    --shadow-soft: 0 8px 24px rgba(19, 47, 80, 0.06);
    --radius: 24px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top right, rgba(17, 102, 216, 0.06), transparent 26%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
    color: var(--text);
}
a { color: inherit; }
.wrap { width: min(1240px, calc(100% - 28px)); margin: 0 auto; }
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(248, 251, 255, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(216, 225, 236, 0.85);
}
.topbar {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px 0;
}
.brand-badge,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #edf4ff;
    border: 1px solid #d7e5fb;
    color: var(--primary);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.brand-block h1 {
    margin: 10px 0 8px;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    line-height: 1.12;
}
.brand-block p {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    max-width: 760px;
}
.topbar-side {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.main-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.main-nav a,
.admin-link {
    text-decoration: none;
    padding: 11px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.88);
    font-weight: 700;
    font-size: .95rem;
    box-shadow: var(--shadow-soft);
}
.main-nav a:hover,
.admin-link:hover { transform: translateY(-1px); }
.admin-link {
    background: linear-gradient(135deg, var(--primary), #2a7cf0);
    color: white;
    border-color: transparent;
}
.page-stack {
    display: grid;
    gap: 18px;
    padding: 20px 0 34px;
}
.hero-split {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
    gap: 18px;
}
.hero-panel,
.card {
    background: var(--card);
    border: 1px solid rgba(216, 225, 236, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.hero-panel {
    padding: 24px;
}
.hero-panel-main {
    background: linear-gradient(135deg, #ffffff 0%, #f4f9ff 100%);
}
.hero-panel-main h2 {
    margin: 12px 0 10px;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    line-height: 1.15;
}
.hero-panel-main p {
    margin: 0;
    color: var(--muted);
    max-width: 760px;
}
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.stats-panel {
    display: grid;
    gap: 14px;
    align-content: stretch;
}
.stats-grid-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.card { padding: 20px; }
.hero-card { overflow: hidden; }
#map {
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    margin-top: 8px;
}
.section-head,
.item-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.section-head.compact { margin-bottom: 4px; }
.section-head h2,
.form-card h2,
.list-card h2 { margin: 6px 0 0; }
.section-head p,
.muted,
.map-note { color: var(--muted); }
.legend,
.pill { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot-blue { background: var(--primary); }
.dot-green { background: var(--green); }
.stat-box {
    background: #f7fbff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px;
}
.stat-box.highlight {
    background: linear-gradient(135deg, #1166d8, #2d84f4);
    color: white;
    border-color: transparent;
}
.stat-box.highlight .stat-label { color: rgba(255,255,255,.82); }
.stat-label { color: var(--muted); font-size: .92rem; margin-bottom: 8px; }
.stat-value { font-size: 2rem; font-weight: 800; }
.stat-value.small { font-size: 1rem; line-height: 1.35; }
.content-grid-2 {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.accent-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.single-form-grid { grid-template-columns: 1fr; }
label span { display: block; margin-bottom: 7px; font-weight: 700; font-size: .95rem; }
input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fbfdff;
    padding: 12px 14px;
    font: inherit;
    color: var(--text);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
input:focus, textarea:focus, select:focus {
    outline: 2px solid rgba(17, 102, 216, 0.16);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(17, 102, 216, 0.08);
}
textarea { resize: vertical; min-height: 110px; }
.full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-start; }
.btn {
    appearance: none;
    border: 0;
    background: linear-gradient(135deg, var(--primary), #2a7cf0);
    color: white;
    font-weight: 800;
    border-radius: 999px;
    padding: 13px 20px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}
.btn-secondary {
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--line);
}
.btn:hover { transform: translateY(-1px); }
.list-grid,
.list-stack { display: grid; gap: 12px; }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.list-item {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fcfeff 100%);
}
.list-item h3 { margin: 0; font-size: 1.05rem; }
.tag, .pill {
    background: #edf4ff;
    color: var(--primary);
    border: 1px solid #cfe0fb;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: .82rem;
    font-weight: 800;
}
.pill-soft {
    background: #f5f8fc;
    color: #50657a;
    border-color: #d9e3ef;
}
.meta-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    color: #37516c;
}
.single-column-meta { grid-template-columns: 1fr; }
.map-note { margin-top: 12px; }
.leaflet-popup-content-wrapper { border-radius: 16px; }

@media (max-width: 1080px) {
    .topbar,
    .hero-split,
    .content-grid-2,
    .cards-2 { grid-template-columns: 1fr; }
    .topbar-side { justify-content: flex-start; }
}

@media (max-width: 760px) {
    .wrap { width: min(100% - 16px, 1240px); }
    .site-header { position: static; }
    .topbar { padding: 14px 0; }
    .hero-panel,
    .card { padding: 16px; border-radius: 20px; }
    .main-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
    .main-nav a,
    .admin-link { text-align: center; }
    #map { height: 360px; }
    .form-grid,
    .meta-grid,
    .stats-grid-compact { grid-template-columns: 1fr; }
}
.meta-grid div {
    display: flex;
    gap: 6px;
}
.meta-grid strong {
    min-width: 130px;
    color: #1e3a5f;
}
