﻿/* ════════════════════════════════════════════════════════════════════════════
   Terrapoint — Editorial Cartography
   A premium forest intelligence surface. White & blue. Subtle depth.
   ════════════════════════════════════════════════════════════════════════════ */

/* ─── Tokens ─────────────────────────────────────────────────────────────── */
:root {
    /* Blue system — multiple tones, never one flat blue */
    --ink:        #07153d;   /* deep ink — used for display type, never for fills */
    --ink-soft:   #0f1f54;   /* slightly lifted ink */
    --blue-950:   #0a1f5c;   /* deep brand */
    --blue-900:   #0a3d9e;   /* brand primary */
    --blue-700:   #1565c0;   /* secondary */
    --blue-600:   #1d4ed8;   /* action */
    --blue-500:   #3b82f6;   /* interactive */
    --blue-400:   #60a5fa;   /* highlight */
    --blue-300:   #93c5fd;   /* muted accent */
    --blue-200:   #bfdbfe;   /* hairline tint */
    --blue-100:   #dbeafe;   /* tint */
    --blue-50:    #eff6ff;   /* wash */

    /* Cyan accent for data callouts only — used sparingly */
    --cyan-500:   #06b6d4;

    /* Neutral surface ladder */
    --white:      #ffffff;
    --paper:      #fbfcfe;   /* page bg — never pure white */
    --paper-2:    #f5f8fc;   /* subtle panel */
    --paper-3:    #eef2f8;   /* deeper panel */
    --paper-4:    #e4eaf2;   /* track */
    --hair:       #e3e8f0;   /* hairline */
    --hair-2:     #d4dce7;   /* stronger hairline */
    --ink-2:      #0f172a;   /* primary text */
    --ink-3:      #334155;   /* secondary text */
    --ink-4:      #64748b;   /* tertiary */
    --ink-5:      #94a3b8;   /* muted */
    --ink-6:      #cbd5e1;   /* very muted */

    /* Semantic */
    --success:    #047857;
    --success-bg: #ecfdf5;
    --warn:       #b45309;
    --warn-bg:    #fffbeb;
    --danger:     #b91c1c;
    --danger-bg:  #fef2f2;
    --info:       #1d4ed8;
    --info-bg:    #eff6ff;

    /* Data category palette — blue scale, used for chart segments, donut slices */
    --data-cat-1: #dbeafe;   /* blue-100 — smallest share */
    --data-cat-2: #93c5fd;   /* blue-300 */
    --data-cat-3: #3b82f6;   /* blue-500 */
    --data-cat-4: #1d4ed8;   /* blue-600 */
    --data-cat-5: #0a3d9e;   /* blue-900 — largest share */
    --data-cat-6: #07153d;   /* ink — fallback */

    /* Semantic data state — used only when a value is truly a state, not a category */
    --data-state-danger: #b91c1c;
    --data-state-warn:   #b45309;
    --data-state-ok:     #047857;
    --data-state-info:   #1d4ed8;

    /* Map — eraldiste staatus (raie liik) — muted RYG, less saturated than the old rainbow */
    --map-eraldis-lageraie:   #c2410c;  /* burnt orange — over cutting age */
    --map-eraldis-harvendus:  #ca8a04;  /* amber — approaching cutting age */
    --map-eraldis-hooldus:    #047857;  /* deep green — mature, healthy */
    --map-eraldis-noor:       #1d4ed8;  /* blue — too young for cutting */

    /* Map — kihi piirda joon (10 layer toggle swatches) */
    --map-layer-kaitseala:  #047857;    /* green — protected */
    --map-layer-piirang:    #0f766e;    /* teal — restriction */
    --map-layer-yrask:      #c2410c;    /* burnt orange — pest */
    --map-layer-lageraie:   #94a3b8;    /* slate — cleared */
    --map-layer-sood:       #0369a1;    /* sky — wetland */
    --map-layer-elupaik:    #15803d;    /* green — habitat */
    --map-layer-karuputk:   #be185d;    /* rose — invasive */
    --map-layer-malestised: #6d28d9;    /* violet — heritage */
    --map-layer-veekogu:    #0284c7;    /* cyan — lake */
    --map-layer-vooluvesi:  #0e7490;    /* teal-deep — river */
    --map-layer-kataster:   #b45309;    /* amber-700 — cadastre boundaries */

    /* Promotional callout surface — used for kinnistu turuväärtus box */
    --surface-callout:        #f0f6ff;  /* very light blue, distinct from paper-2 */
    --surface-callout-border: #c7dcfb;
    --surface-callout-label:  #1d4ed8;
    --surface-callout-text:   #07153d;

    /* Spacing — 4pt scale */
    --s-1:  4px;
    --s-2:  8px;
    --s-3:  12px;
    --s-4:  16px;
    --s-5:  20px;
    --s-6:  24px;
    --s-7:  32px;
    --s-8:  40px;
    --s-9:  48px;
    --s-10: 64px;
    --s-11: 80px;
    --s-12: 96px;

    /* Radius */
    --r-xs:  4px;
    --r-sm:  6px;
    --r:     10px;
    --r-md:  12px;
    --r-lg:  16px;
    --r-xl:  20px;
    --r-2xl: 28px;
    --r-full: 9999px;

    /* Shadow — restrained. Lift, not float. */
    --sh-1: 0 1px 0 rgba(15, 23, 42, 0.04);
    --sh-2: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 0 rgba(15, 23, 42, 0.03);
    --sh-3: 0 2px 4px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.05);
    --sh-4: 0 4px 8px rgba(15, 23, 42, 0.05), 0 12px 28px rgba(15, 23, 42, 0.07);
    --sh-5: 0 8px 16px rgba(15, 23, 42, 0.06), 0 24px 48px rgba(15, 23, 42, 0.09);
    --sh-blue: 0 4px 14px rgba(10, 61, 158, 0.18), 0 1px 3px rgba(10, 61, 158, 0.12);
    --sh-inset: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 0 rgba(15, 23, 42, 0.04);

    /* Type */
    --ff-sans: "Geist", "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --ff-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --ff-display: "Instrument Serif", "Fraunces", "Source Serif Pro", Georgia, serif;
    --ff-estonian: "Geist", "Inter Tight", system-ui, sans-serif; /* Geist covers Estonian diacritics */

    /* Motion */
    --ease: cubic-bezier(0.32, 0.72, 0, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --t-fast: 120ms;
    --t-base: 200ms;
    --t-slow: 320ms;

    /* Layout */
    --nav-h: 64px;
    --max-w: min(80vw, 1600px);
}

/* ─── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}
body {
    font-family: var(--ff-sans);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink-2);
    background: var(--paper);
    /* Subtle topographic feel — radial blue wash that never competes with content */
    background-image:
        radial-gradient(1200px 600px at 50% -10%, rgba(96, 165, 250, 0.06), transparent 70%),
        radial-gradient(900px 500px at 100% 100%, rgba(10, 61, 158, 0.04), transparent 60%);
    background-attachment: fixed;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
}
button { font: inherit; color: inherit; }
input, textarea { font: inherit; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue-700); text-decoration: none; }
::selection { background: rgba(29, 78, 216, 0.15); color: var(--ink-2); }

/* Scrollbars — thin, only in the blue family */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--paper-4);
    border: 2px solid var(--paper);
    border-radius: var(--r-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--hair-2); }

/* ─── Type scale ──────────────────────────────────────────────────────────── */
.t-mono { font-family: var(--ff-mono); font-feature-settings: "tnum" 1, "cv11" 1, "ss01" 1; }
.t-display { font-family: var(--ff-display); font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; }
.t-eyebrow {
    font-family: var(--ff-sans);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-4);
}
.t-num {
    font-family: var(--ff-mono);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "ss01" 1, "cv11" 1;
    letter-spacing: -0.02em;
}

/* ═══ NAV ═══════════════════════════════════════════════════════════════════ */
.hero {
    position: sticky;
    top: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: var(--s-4);
    padding: 0 var(--s-5);
    height: var(--nav-h);
    background: linear-gradient(135deg, #22c55e 0%, #06b6d4 50%, #3b82f6 100%);
}


.nav-left {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    flex-shrink: 0;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: 32px;
}
.nav-center a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.nav-center a:hover {
    color: white;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    text-decoration: none;
    color: white;
    padding: var(--s-1) 0;
}
.brand-mark {
    display: none;
}


.brand-name {
    font-family: var(--ff-sans);
    font-size: 22px;
    line-height: 1;
    letter-spacing: -0.01em;
    color: white;
    font-weight: 400;
}
.brand-name strong {
    font-weight: 700;
    color: #bbf7d0;
}
.brand-tag {
    display: none;
}

.hamburger {
    display: none !important;
}
.hamburger:hover { background: var(--paper-2); color: var(--ink-2); border-color: var(--hair-2); }
.hamburger:active { transform: scale(0.96); }
.hamburger svg { width: 18px; height: 18px; }

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    flex: 1;
    min-width: 0;
    justify-content: flex-end;
}

/* ═══ SEARCH ════════════════════════════════════════════════════════════════ */
.search-box {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 580px;
    min-width: 0;
    height: 42px;
    padding: 0 4px 0 14px;
    background: var(--white);
    border: 1px solid var(--hair);
    border-radius: var(--r-full);
    box-shadow: var(--sh-1);
    transition: all var(--t-base) var(--ease);
    position: relative;
}
.search-box:hover { border-color: var(--hair-2); box-shadow: var(--sh-2); }
.search-box:focus-within {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12), var(--sh-2);
}

.search-icon {
    color: var(--ink-5);
    flex-shrink: 0;
    display: flex;
    transition: color var(--t-base) var(--ease);
}
.search-icon svg { width: 16px; height: 16px; }
.search-box:focus-within .search-icon { color: var(--blue-600); }

.search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}
.search-box input {
    width: 100%;
    min-width: 0;
    padding: 0 var(--s-3);
    font-size: 14px;
    line-height: 1;
    border: none;
    outline: none;
    background: transparent;
    color: var(--ink-2);
    height: 100%;
    letter-spacing: -0.005em;
}
.search-box input::placeholder { color: var(--ink-5); }

.search-kbd {
    display: none !important;
}

.search-box button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--blue-900);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--t-base) var(--ease);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.search-box button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
    opacity: 0;
    transition: opacity var(--t-base) var(--ease);
    border-radius: 50%;
}
.search-box button:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(10, 61, 158, 0.25); }
.search-box button:hover::before { opacity: 1; }
.search-box button:active { transform: translateY(0); }
.search-box button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.search-box button svg { position: relative; z-index: 1; width: 14px; height: 14px; }
.search-box button .btn-icon { transition: opacity var(--t-base) var(--ease); }
.search-box button .btn-spinner {
    display: none;
    width: 14px; height: 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
    position: relative;
    z-index: 1;
}
.search-box button.is-loading .btn-icon { display: none; }
.search-box button.is-loading .btn-spinner { display: block; }
@keyframes btnSpin { to { transform: rotate(360deg); } }

.search-box.is-searching {
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15), var(--sh-2);
    animation: searchBreath 2.4s ease-in-out infinite;
}
@keyframes searchBreath {
    0%, 100% { box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15), var(--sh-2); }
    50% { box-shadow: 0 0 0 5px rgba(96, 165, 250, 0.10), var(--sh-2); }
}

/* Address dropdown */
.address-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--hair);
    border-radius: var(--r);
    box-shadow: var(--sh-4);
    z-index: 9999;
    max-height: 320px;
    overflow-y: auto;
    padding: var(--s-1);
}
.address-item {
    padding: 10px 12px;
    cursor: pointer;
    border-radius: var(--r-sm);
    transition: background var(--t-fast) var(--ease);
    border: 1px solid transparent;
}
.address-item:hover { background: var(--paper-2); border-color: var(--hair); }
.address-item + .address-item { margin-top: 1px; }
.addr-main {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-2);
    letter-spacing: -0.01em;
}
.addr-sub {
    font-size: 12px;
    color: var(--ink-4);
    margin-top: 2px;
}
.addr-kataster {
    font-size: 11px;
    color: var(--blue-700);
    margin-top: 4px;
    font-family: var(--ff-mono);
    letter-spacing: 0.02em;
}

/* ═══ ERROR BANNER ═════════════════════════════════════════════════════════ */
.error-msg {
    position: fixed;
    top: calc(var(--nav-h) + 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2001;
    padding: 10px 14px 10px 12px;
    background: var(--white);
    color: var(--danger);
    border: 1px solid #fecaca;
    border-left: 3px solid var(--danger);
    border-radius: var(--r);
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: var(--sh-3);
    max-width: 440px;
    width: calc(100% - 24px);
    display: flex;
    align-items: center;
    gap: var(--s-2);
    animation: errorIn 0.25s var(--ease-spring);
}
@keyframes errorIn {
    from { opacity: 0; transform: translate(-50%, -8px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}
.error-msg::before {
    content: "!";
    width: 18px; height: 18px;
    background: var(--danger);
    color: var(--white);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

/* In-card error state — replaces data area contents on failed search */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-3);
    padding: var(--s-5) 0;
}
.error-state-icon {
    width: 36px; height: 36px;
    background: var(--danger-bg);
    color: var(--danger);
    border-radius: var(--r);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.error-state-text {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink-2);
    line-height: 1.4;
}
.error-state-hint {
    font-size: 12.5px;
    color: var(--ink-4);
    line-height: 1.5;
}

/* Promotional callout — used for kinnistu turuväärtus panel */
.callout-surface {
    background: var(--surface-callout);
    border: 1px solid var(--surface-callout-border);
    border-radius: var(--r);
    padding: var(--s-4) var(--s-5);
    margin: var(--s-3) 0;
    position: relative;
    overflow: hidden;
}
.callout-surface::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--blue-600);
}
.callout-label {
    font-family: var(--ff-sans);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--surface-callout-label);
    margin-bottom: var(--s-2);
}
.callout-value {
    font-family: var(--ff-mono);
    font-variant-numeric: tabular-nums;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--surface-callout-text);
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.callout-breakdown {
    display: flex;
    gap: var(--s-6);
    margin-top: var(--s-3);
    font-size: 0.82rem;
    color: var(--ink-3);
    flex-wrap: wrap;
}
.callout-key {
    color: var(--ink-4);
    margin-right: 4px;
}

/* Subtle inline links — secondary action with a hairline arrow */
.muted-link {
    font-size: 13px;
    color: var(--blue-700);
    text-decoration: none;
    border-bottom: 1px solid var(--blue-200);
    transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.muted-link:hover { color: var(--blue-900); border-bottom-color: var(--blue-700); }

/* Status pill — green for "active"/"present" state */
.pill-success {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid #a7f3d0;
    border-radius: var(--r-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Collapsible summary line — quiet, but legible on hover */
.muted-summary {
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--ink-4);
    list-style: none;
    padding: 4px 0;
    transition: color var(--t-fast) var(--ease);
}
.muted-summary:hover { color: var(--ink-2); }
.muted-summary::-webkit-details-marker { display: none; }
.muted-summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 6px;
    font-size: 0.7rem;
    color: var(--ink-5);
    transition: transform var(--t-base) var(--ease);
}
details[open] > .muted-summary::before { transform: rotate(90deg); }

/* Subsidy eligible banner — matches .callout-surface family */
.eligible-banner {
    margin-bottom: 10px;
    padding: 8px 12px;
    background: var(--success-bg);
    border: 1px solid #a7f3d0;
    border-left: 3px solid var(--success);
    border-radius: var(--r);
    color: var(--success);
    font-size: 0.85rem;
}

/* ═══ SIDEBAR ═══════════════════════════════════════════════════════════════ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(7, 21, 61, 0.32);
    backdrop-filter: blur(2px);
    z-index: 1500;
}
.sidebar-overlay.open { display: block; animation: fadeIn 0.2s var(--ease); }

.sidebar {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    bottom: 0;
    width: 320px;
    background: var(--white);
    border-right: 1px solid var(--hair);
    box-shadow: var(--sh-4);
    z-index: 1600;
    transform: translateX(-100%);
    transition: transform var(--t-slow) var(--ease-out);
    display: flex;
    flex-direction: column;
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--hair);
}
.sidebar-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-2);
    letter-spacing: -0.01em;
}
.sidebar-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px; height: 30px;
    border-radius: var(--r-sm);
    color: var(--ink-4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast) var(--ease);
}
.sidebar-close:hover { background: var(--paper-2); color: var(--ink-2); }
.sidebar-close svg { width: 16px; height: 16px; }

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--s-5);
}
.sidebar-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 20px;
    color: var(--ink-4);
    font-size: 13px;
    gap: 6px;
}
.sidebar-empty svg { color: var(--ink-6); margin-bottom: 4px; }

/* ═══ LOADING ═══════════════════════════════════════════════════════════════ */
.loading {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0; bottom: 0;
    z-index: 1999;
    background: rgba(251, 252, 254, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 32px;
}
.loading::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--paper-4);
    overflow: hidden;
}
.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: -30%;
    width: 30%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--blue-600), var(--cyan-500), transparent);
    animation: loadSlide 1.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes loadSlide {
    0% { left: -30%; }
    100% { left: 100%; }
}

.loading-content {
    width: 100%;
    max-width: 720px;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.loading-text {
    font-family: var(--ff-mono);
    font-size: 12px;
    color: var(--ink-4);
    text-align: center;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.skeleton {
    background: var(--white);
    border: 1px solid var(--hair);
    border-radius: var(--r-lg);
    position: relative;
    overflow: hidden;
}
.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.08), transparent);
    transform: translateX(-100%);
    animation: shimmer 1.6s var(--ease) infinite;
}
@keyframes shimmer {
    100% { transform: translateX(100%); }
}
.skeleton-map { height: 320px; }
.skeleton-card { height: 100px; }
.skeleton-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* ═══ HERO LANDING ═════════════════════════════════════════════════════════ */
.landing {
    position: relative;
    padding: 64px 24px 48px;
    text-align: center;
    max-width: 960px;
    margin: 0 auto;
}
.landing::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(600px 200px at 50% 0%, rgba(96, 165, 250, 0.10), transparent 60%),
        repeating-linear-gradient(135deg, transparent 0 39px, rgba(10, 61, 158, 0.025) 39px 40px);
    pointer-events: none;
    z-index: -1;
    mask-image: linear-gradient(to bottom, black, transparent);
    -webkit-mask-image: linear-gradient(to bottom, black, transparent);
}

.landing-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 8px;
    margin-bottom: 18px;
    background: var(--white);
    border: 1px solid var(--hair);
    border-radius: var(--r-full);
    box-shadow: var(--sh-1);
    font-size: 15px;
    color: var(--ink-3);
    font-weight: 500;
    letter-spacing: -0.005em;
}
.landing-eyebrow .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.18);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.18); }
    50% { box-shadow: 0 0 0 5px rgba(4, 120, 87, 0.05); }
}

.landing-title {
    font-family: var(--ff-display);
    font-size: clamp(48px, 7.5vw, 76px);
    line-height: 1.02;
    color: var(--ink);
    letter-spacing: -0.025em;
    margin-bottom: 14px;
    font-weight: 400;
}
.landing-title em {
    font-style: italic;
    color: #3b82f6;
    font-weight: 400;
}
.landing-title .ampersand {
    color: var(--blue-400);
    font-style: italic;
    font-weight: 300;
}

.landing-sub {
    font-size: 19px;
    line-height: 1.55;
    color: var(--ink-3);
    max-width: 540px;
    margin: 0 auto 28px;
    letter-spacing: -0.005em;
}

.landing-search {
    max-width: 560px;
    margin: 0 auto 20px;
    position: relative;
}
.landing-search .search-box {
    height: 48px;
    max-width: none;
    padding: 0 4px 0 14px;
    border-radius: var(--r-full);
    box-shadow: var(--sh-1);
}
.landing-search .search-box input {
    font-size: 16px;
    padding: 0 14px;
}
.landing-search .search-box button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}
.landing-search .search-box button svg { width: 16px; height: 16px; }
.landing-search .search-icon svg { width: 18px; height: 18px; }

.landing-hints {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}
.landing-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--white);
    border: 1px solid var(--hair);
    border-radius: var(--r-full);
    font-size: 15.5px;
    color: var(--ink-3);
    cursor: pointer;
    transition: all var(--t-fast) var(--ease);
    font-family: var(--ff-mono);
    letter-spacing: 0.01em;
}
.landing-hint:hover {
    border-color: var(--blue-400);
    color: var(--blue-700);
    background: var(--blue-50);
    transform: translateY(-1px);
}
.landing-hint .kbd {
    font-size: 10px;
    color: var(--ink-5);
    background: var(--paper-2);
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid var(--hair);
}

.landing-meta {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.landing-meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.landing-meta-num {
    font-family: var(--ff-sans);
    font-size: 30px;
    color: var(--ink);
    font-feature-settings: "tnum" 1;
    letter-spacing: -0.02em;
}
.landing-meta-label {
    font-size: 12px;
    color: var(--ink-4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* ═══ DASHBOARD ════════════════════════════════════════════════════════════ */
.dashboard {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 24px 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Section heading */
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-3);
    margin-bottom: 14px;
}
.section-head h2 {
    font-family: var(--ff-display);
    font-size: 28px;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.section-head h2 em { font-style: italic; color: var(--blue-700); }
.section-head .section-meta {
    font-family: var(--ff-mono);
    font-size: 11.5px;
    color: var(--ink-4);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ═══ QUICK FACTS STRIP (after search) ════════════════════════════════════ */
.facts-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--hair);
    border: 1px solid var(--hair);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--sh-1);
}
.fact {
    background: var(--white);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    transition: background var(--t-base) var(--ease);
}
.fact:hover { background: var(--paper); }
.fact-label {
    font-size: 10.5px;
    color: var(--ink-4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.fact-label::before {
    content: "";
    width: 4px; height: 4px;
    background: var(--blue-500);
    border-radius: 50%;
}
.fact-value {
    font-family: var(--ff-mono);
    font-size: 24px;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "ss01" 1;
}
.fact-value .unit {
    font-size: 12px;
    color: var(--ink-4);
    font-weight: 400;
    margin-left: 3px;
    letter-spacing: 0;
}
.fact-sub {
    font-size: 11.5px;
    color: var(--ink-4);
    margin-top: 2px;
}
.fact-sub.green { color: var(--success); }
.fact-sub.blue { color: var(--blue-700); }

/* ═══ MAP ═══════════════════════════════════════════════════════════════════ */
.map-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.map-wrapper {
    position: relative;
    background: var(--white);
    border: 1px solid var(--hair);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--sh-3);
}
#map {
    width: 100%;
    height: 560px;
    background: var(--paper-3);
}

/* Map controls — refined, integrated */
.map-controls {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1000;
    max-width: 260px;
    max-height: calc(100% - 24px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}
.map-controls-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid var(--hair);
    border-radius: var(--r);
    padding: 6px 10px;
    margin-bottom: 4px;
    box-shadow: var(--sh-2);
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-2);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: all var(--t-fast) var(--ease);
}
.map-controls-toggle:hover { background: var(--white); border-color: var(--hair-2); }
.map-controls-toggle-label { line-height: 1; }
.map-controls-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--paper-2);
    color: var(--ink-3);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition: all var(--t-fast) var(--ease);
}
.map-controls-toggle:hover .map-controls-toggle-icon { background: var(--ink-2); color: var(--white); }
.map-controls.collapsed { max-width: 120px; }
.map-controls.collapsed .layer-toggle { display: none; }

/* Click-to-find hint pill — top center of map */
.map-hint {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px 7px 12px;
    max-width: calc(100% - 32px);
    background: rgba(15, 23, 42, 0.86);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--r-full);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    box-shadow: var(--sh-2);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: -0.005em;
    line-height: 1.2;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.map-hint svg { flex-shrink: 0; opacity: 0.85; }
.map-hint span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-hint-close {
    background: rgba(255, 255, 255, 0.12);
    border: 0;
    color: #fff;
    width: 20px; height: 20px;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    pointer-events: auto;
    transition: background var(--t-fast) var(--ease);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.map-hint-close:hover { background: rgba(255, 255, 255, 0.22); }
.map-hint.hidden {
    opacity: 0;
    transform: translate(-50%, -8px);
    pointer-events: none;
}

/* ── Map click confirm popup ── */
.map-confirm {
    position: absolute;
    z-index: 1100;
    transform: translate(-50%, calc(-100% - 18px));
    pointer-events: auto;
    filter: drop-shadow(0 8px 24px rgba(7, 21, 61, 0.22));
    animation: map-confirm-in 0.18s ease-out;
}
.map-confirm[hidden] { display: none; }
@keyframes map-confirm-in {
    from { opacity: 0; transform: translate(-50%, calc(-100% - 8px)); }
    to   { opacity: 1; transform: translate(-50%, calc(-100% - 18px)); }
}
.map-confirm::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -7px;
    transform: translateX(-50%) rotate(45deg);
    width: 14px;
    height: 14px;
    background: var(--white);
    border-right: 1px solid var(--hair);
    border-bottom: 1px solid var(--hair);
}
.map-confirm-card {
    background: var(--white);
    border: 1px solid var(--hair);
    border-radius: 12px;
    padding: 14px 16px 12px;
    min-width: 240px;
    max-width: 280px;
    text-align: center;
}
.map-confirm-eyebrow {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--blue-700);
    margin-bottom: 4px;
    font-family: var(--ff-mono);
}
.map-confirm-tunnus {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
    font-family: var(--ff-mono);
    margin-bottom: 6px;
    word-break: break-all;
}
.map-confirm-text {
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--ink-3);
    margin-bottom: 12px;
}
.map-confirm-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.map-confirm-btn {
    flex: 1;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid var(--hair);
    background: var(--white);
    color: var(--ink-3);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--ff-sans);
}
.map-confirm-btn-secondary:hover {
    background: var(--paper-2);
    color: var(--ink);
    border-color: var(--ink-4);
}
.map-confirm-btn-primary {
    background: var(--blue-700);
    color: var(--white);
    border-color: var(--blue-700);
}
.map-confirm-btn-primary:hover {
    background: var(--blue-800);
    border-color: var(--blue-800);
}
.map-confirm-btn-primary:active {
    transform: translateY(1px);
}
@media (max-width: 520px) {
    .map-confirm { max-width: calc(100vw - 32px); }
    .map-confirm-card { min-width: 0; max-width: 100%; }
}
.layer-toggle {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid var(--hair);
    border-radius: var(--r);
    padding: 6px;
    box-shadow: var(--sh-2);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}
.toggle-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 5px 8px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--ink-3);
    border-radius: var(--r-sm);
    transition: all var(--t-fast) var(--ease);
    user-select: none;
}
.toggle-item:hover { background: var(--paper-2); color: var(--ink-2); }
.toggle-item input { display: none; }
.toggle-item .toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-left: none !important;
    padding: 0 !important;
    font-size: 11.5px;
}
.toggle-item .toggle-label::before {
    content: "";
    width: 10px; height: 10px;
    border-radius: 3px;
    background: currentColor;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.toggle-item input:checked + .toggle-label { color: var(--ink-2); font-weight: 600; }
.toggle-item input:checked + .toggle-label::before { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); }
.toggle-item:has(input:not(:checked)) .toggle-label { opacity: 0.4; }

/* Map legend */
.map-legend {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 500;
    max-width: 280px;
    max-height: calc(100% - 28px);
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid var(--hair);
    border-radius: var(--r);
    box-shadow: var(--sh-2);
    padding: 10px 12px 8px;
    font-size: 12px;
    color: var(--ink-2);
    transition: max-width 0.25s var(--ease), padding 0.25s var(--ease);
}
.map-legend.collapsed { max-width: 36px; padding: 6px 8px; overflow: hidden; }
.map-legend.collapsed .map-legend-section,
.map-legend.collapsed .map-legend-title { display: none; }
.map-legend-title {
    font-weight: 600;
    font-size: 11.5px;
    color: var(--ink-2);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 6px;
}
.map-legend-title::before {
    content: "";
    width: 12px; height: 12px;
    background: linear-gradient(135deg, var(--map-eraldis-lageraie), var(--map-eraldis-harvendus), var(--map-eraldis-hooldus), var(--map-eraldis-noor));
    border-radius: 3px;
    flex-shrink: 0;
}
.map-legend-section { margin-bottom: 6px; }
.map-legend-section:last-child { margin-bottom: 0; }
.map-legend-subtitle {
    font-size: 10px;
    font-weight: 600;
    color: var(--ink-4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 4px 0 3px;
}
.map-legend-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 1px 0;
    line-height: 1.4;
    font-size: 11.5px;
}
.legend-swatch {
    width: 12px; height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
}
.map-legend-toggle {
    position: absolute;
    top: 4px; right: 4px;
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 1px solid var(--hair);
    background: var(--white);
    color: var(--ink-4);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast) var(--ease);
}
.map-legend-toggle:hover { background: var(--ink-2); color: var(--white); border-color: var(--ink-2); }
.map-legend.collapsed .map-legend-toggle { position: static; margin: 0 auto; }

/* ═══ METRIC GRID ═══════════════════════════════════════════════════════════ */
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 16px;
}
.metric-card {
    grid-column: span 1;
    background: var(--white);
    border: 1px solid var(--hair);
    border-radius: 8px;
    padding: 24px 28px 22px;
    box-shadow: var(--sh-1);
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
    transition: all var(--t-base) var(--ease);
    overflow: hidden;
    animation: cardIn 0.5s var(--ease-out) backwards;
}
.metric-card:nth-child(1) { animation-delay: 0.02s; }
.metric-card:nth-child(2) { animation-delay: 0.06s; }
.metric-card:nth-child(3) { animation-delay: 0.10s; }
.metric-card:nth-child(4) { animation-delay: 0.14s; }
.metric-card:nth-child(5) { animation-delay: 0.18s; }
.metric-card:nth-child(6) { animation-delay: 0.22s; }
.metric-card:nth-child(7) { animation-delay: 0.26s; }
.metric-card:nth-child(8) { animation-delay: 0.30s; }
.metric-card:nth-child(9) { animation-delay: 0.34s; }
.metric-card:nth-child(10) { animation-delay: 0.38s; }

.metric-card::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--hair-2), transparent);
    opacity: 0.6;
}

.metric-card:hover {
    border-color: var(--blue-300);
    box-shadow: var(--sh-3);
    transform: translateY(-2px);
}

/* Wide hero cards (value, eudr) */
.metric-card.span-6 { grid-column: span 6; }
.metric-card.span-8 { grid-column: span 8; }
.metric-card.span-12 { grid-column: span 12; }

/* Highlight card — the value card gets a refined treatment */
.highlight-card {
    background:
        linear-gradient(135deg, #fff 0%, var(--blue-50) 100%);
    border-color: var(--blue-200);
    position: relative;
}
.highlight-card::after {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 100px; height: 100px;
    background: radial-gradient(circle at 100% 0%, rgba(96, 165, 250, 0.2), transparent 70%);
    pointer-events: none;
}
.highlight-card:hover { border-color: var(--blue-400); }

/* Card header */
.card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}
.card-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--paper-2);
    color: var(--blue-700);
    border: 1px solid var(--hair);
    transition: all var(--t-base) var(--ease);
}
.card-icon svg { width: 20px; height: 20px; }
.metric-card:hover .card-icon {
    background: var(--blue-700);
    color: var(--white);
    border-color: var(--blue-700);
    transform: scale(1.05) rotate(-3deg);
}
.kataster-icon { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-200); }
.mets-icon     { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.vaartus-icon  { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-200); }
.sinik-icon    { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.risk-icon     { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }
.eudr-icon     { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-200); }
.teatised-icon { background: var(--info-bg); color: var(--info); border-color: var(--blue-200); }

.card-head-text { flex: 1; min-width: 0; }
.card-header h3 {
    font-size: 14.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-3);
    line-height: 1.2;
    margin: 0;
}
.section-desc {
    font-size: 15.5px;
    color: var(--ink-4);
    margin: 4px 0 0;
    line-height: 1.4;
    letter-spacing: -0.005em;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes sectionIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ═══ INFO ROWS ═════════════════════════════════════════════════════════════ */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--paper-3);
    position: relative;
}
.info-row:last-child { border-bottom: none; }
.info-row .label {
    color: var(--ink-4);
    font-weight: 400;
    font-size: 15px;
    letter-spacing: -0.005em;
    min-width: 0;
}
.info-row .value {
    font-family: var(--ff-mono);
    font-weight: 500;
    color: var(--ink-2);
    text-align: right;
    font-size: 15.5px;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    letter-spacing: -0.005em;
    min-width: 0;
    word-break: break-word;
}
.info-row .value strong { font-weight: 600; }

/* ═══ BIG NUMBERS ═══════════════════════════════════════════════════════════ */
.big-number {
    font-family: var(--ff-mono);
    font-size: 40px;
    font-weight: 500;
    color: var(--blue-700);
    line-height: 1.05;
    margin-bottom: 6px;
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "ss01" 1, "cv11" 1;
}
.big-number .unit {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-4);
    margin-left: 4px;
    letter-spacing: 0;
}
.big-number.accent { color: var(--blue-700); }

.value-block {
    background:
        linear-gradient(135deg, var(--blue-50) 0%, rgba(219, 234, 254, 0.4) 100%);
    border: 1px solid var(--blue-100);
    border-radius: var(--r);
    padding: 14px 16px 12px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

/* Override inline green styles from JS — the kinnistu turuväärtus box */
#kataster-info [style*="background:linear-gradient(135deg,#f0f7f0"],
#kataster-info [style*="background:linear-gradient(135deg, #f0f7f0"] {
    background: linear-gradient(135deg, var(--blue-50) 0%, rgba(219, 234, 254, 0.5) 100%) !important;
    border: 1px solid var(--blue-100) !important;
    color: var(--ink-2) !important;
}
#kataster-info [style*="background:linear-gradient(135deg,#f0f7f0"] [style*="color:#2e7d32"],
#kataster-info [style*="background:linear-gradient(135deg, #f0f7f0"] [style*="color:#2e7d32"] {
    color: var(--blue-700) !important;
}
#kataster-info [style*="color:#1b5e20"] {
    color: var(--blue-700) !important;
}
#kataster-info [style*="color:var(--text-muted)"] {
    color: var(--ink-4) !important;
}

/* The inline vaartus gradient block in vaartus-info */
#vaartus-info [style*="background:linear-gradient(135deg,#eef4ff"] {
    background: linear-gradient(135deg, var(--blue-50) 0%, rgba(219, 234, 254, 0.5) 100%) !important;
    border: 1px solid var(--blue-100) !important;
}
.value-block-label {
    font-size: 10.5px;
    color: var(--blue-700);
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 5px;
}
.value-block-label::before {
    content: "";
    width: 12px; height: 1px;
    background: currentColor;
}
.value-block .sub {
    font-size: 11.5px;
    color: var(--ink-4);
    margin-top: 4px;
    letter-spacing: -0.005em;
}
.value-block .row {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--blue-100);
    font-size: 12px;
}
.value-block .row > div { color: var(--ink-3); }
.value-block .row strong {
    font-family: var(--ff-mono);
    color: var(--ink-2);
    font-weight: 500;
    margin-left: 4px;
}

/* ═══ TRAFFIC LIGHTS / PILLS ════════════════════════════════════════════════ */
.traffic-light {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 8px;
    border-radius: var(--r-full);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.005em;
    border: 1px solid transparent;
    font-family: var(--ff-sans);
}
.traffic-light .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    animation: pulse-dot 2.4s ease-in-out infinite;
}
.traffic-light.green { background: var(--success-bg); color: var(--success); border-color: #a7f3d0; }
.traffic-light.green .dot { background: var(--success); box-shadow: 0 0 0 2px rgba(4, 120, 87, 0.18); }
.traffic-light.yellow { background: var(--warn-bg); color: var(--warn); border-color: #fde68a; }
.traffic-light.yellow .dot { background: var(--warn); box-shadow: 0 0 0 2px rgba(180, 83, 9, 0.18); }
.traffic-light.red { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }
.traffic-light.red .dot { background: var(--danger); box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.18); }
.traffic-light.blue { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-200); }
.traffic-light.blue .dot { background: var(--blue-600); box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.18); }

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 2px currentColor; opacity: 1; }
    50% { opacity: 0.6; }
}

/* ═══ PROGRESS BAR ═════════════════════════════════════════════════════════ */
.progress-bar {
    height: 6px;
    background: var(--paper-3);
    border-radius: var(--r-full);
    overflow: hidden;
    margin: 6px 0 8px;
    position: relative;
}
.progress-bar .fill {
    height: 100%;
    border-radius: var(--r-full);
    transition: width 0.9s var(--ease-out);
    background: linear-gradient(90deg, var(--blue-700), var(--blue-500));
    position: relative;
}
.progress-bar .fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressShine 2s var(--ease) infinite;
}
@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ═══ COMPOSITION TABLE / BARS ═════════════════════════════════════════════ */
.comp-table {
    width: 100%;
    margin-top: 12px;
    font-size: 15.5px;
    border-collapse: collapse;
    border-top: 1px solid var(--paper-3);
}
.comp-table td {
    padding: 8px 0;
    border-bottom: 1px solid var(--paper-3);
    font-family: var(--ff-sans);
}
.comp-table tr:last-child td { border-bottom: none; }
.comp-table .bar-cell { width: 45%; padding-left: 12px; }
.comp-bar {
    display: block;
    height: 8px;
    background: linear-gradient(90deg, var(--blue-700), var(--blue-400));
    border-radius: var(--r-full);
    transition: width 0.7s var(--ease-out);
    position: relative;
}

/* ═══ EUDR BUTTON ══════════════════════════════════════════════════════════ */
.eudr-desc { font-size: 14px; color: var(--ink-3); margin-bottom: 12px; line-height: 1.55; letter-spacing: -0.005em; }
.btn-eudr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--ink);
    color: var(--white);
    font-weight: 600;
    font-family: var(--ff-sans);
    font-size: 13px;
    border: none;
    border-radius: var(--r);
    cursor: pointer;
    transition: all var(--t-base) var(--ease);
    width: 100%;
    box-shadow: var(--sh-blue);
    letter-spacing: -0.005em;
    position: relative;
    overflow: hidden;
}
.btn-eudr::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
    opacity: 0;
    transition: opacity var(--t-base) var(--ease);
}
.btn-eudr:hover { transform: translateY(-1px); }
.btn-eudr:hover::before { opacity: 1; }
.btn-eudr:active { transform: translateY(0); }
.btn-eudr svg { position: relative; z-index: 1; width: 14px; height: 14px; }
.btn-eudr span { position: relative; z-index: 1; }

/* ═══ AI CHAT ══════════════════════════════════════════════════════════════ */
.ai-chat-section {
    background: var(--white);
    border: 1px solid var(--hair);
    border-radius: 8px;
    box-shadow: var(--sh-1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    grid-column: span 12;
}
.ai-chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--white);
    border-bottom: 1px solid var(--hair);
    position: relative;
}
.ai-chat-header::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, var(--blue-200), var(--blue-400) 50%, var(--blue-200));
    opacity: 0.4;
}
.ai-chat-icon {
    width: 32px; height: 32px;
    background:
        radial-gradient(circle at 30% 30%, var(--blue-400), var(--blue-700));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
    box-shadow: var(--sh-2);
    position: relative;
}
.ai-chat-icon::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 10px;
    border: 1px solid var(--blue-300);
    opacity: 0.4;
    animation: pulse 2.4s ease-in-out infinite;
}
.ai-chat-icon svg { width: 16px; height: 16px; position: relative; z-index: 1; }
.ai-chat-header h2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2);
    margin: 0;
    letter-spacing: -0.01em;
}
.ai-chat-subtitle {
    font-size: 12px;
    color: var(--ink-4);
    margin: 1px 0 0;
    letter-spacing: -0.005em;
    font-family: var(--ff-mono);
    letter-spacing: 0;
}

.ai-chat-messages {
    padding: 16px 18px;
    max-height: 420px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background:
        repeating-linear-gradient(0deg, transparent 0 31px, rgba(15, 23, 42, 0.015) 31px 32px),
        var(--white);
}

.ai-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: msgIn 0.35s var(--ease-spring);
}
@keyframes msgIn {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.ai-message.user-message { flex-direction: row-reverse; }
.ai-avatar {
    width: 22px; height: 22px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, var(--blue-400), var(--blue-700));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 4px;
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    box-shadow: var(--sh-1);
    position: relative;
}
.ai-avatar::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid var(--white);
}
.user-message .ai-avatar { display: none; }
.ai-bubble {
    background: var(--paper-2);
    border: 1px solid var(--paper-3);
    border-radius: var(--r-md);
    padding: 10px 14px;
    max-width: 88%;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--ink-2);
    letter-spacing: -0.005em;
}
.user-message .ai-bubble {
    background: var(--ink);
    color: var(--white);
    border-color: var(--ink);
}
.ai-bubble p { margin: 0 0 6px; }
.ai-bubble p:last-child { margin-bottom: 0; }
.ai-bubble strong { font-weight: 600; color: var(--ink-2); }
.user-message .ai-bubble strong { color: var(--white); }
.ai-bubble h2, .ai-bubble h3, .ai-bubble h4 {
    font-size: 13.5px;
    font-weight: 600;
    margin: 8px 0 4px;
    color: var(--blue-700);
    letter-spacing: -0.005em;
}
.ai-bubble h2:first-child, .ai-bubble h3:first-child, .ai-bubble h4:first-child { margin-top: 0; }
.ai-bubble ul, .ai-bubble ol { margin: 6px 0; padding-left: 18px; }
.ai-bubble li { margin-bottom: 3px; }
.ai-bubble code {
    background: var(--paper-3);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
    font-family: var(--ff-mono);
}
.ai-bubble pre {
    background: var(--paper-3);
    padding: 8px 10px;
    border-radius: var(--r-sm);
    font-size: 12px;
    overflow-x: auto;
    margin: 6px 0;
    font-family: var(--ff-mono);
}

.ai-thinking {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ai-thinking-icon { color: var(--blue-600); animation: pulse 1.5s ease-in-out infinite; }
.ai-thinking-text {
    font-size: 12.5px;
    color: var(--ink-4);
    font-style: italic;
    letter-spacing: -0.005em;
}
.ai-typing {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 0;
}
.ai-typing span {
    width: 5px; height: 5px;
    background: var(--blue-500);
    border-radius: 50%;
    animation: typing 1.3s var(--ease) infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
    0%, 60%, 100% { opacity: 0.2; transform: scale(0.7); }
    30% { opacity: 1; transform: scale(1); }
}

.ai-thinking-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 10px;
    background: var(--paper-2);
    border: 1px solid var(--paper-3);
    border-left: 2px solid var(--blue-500);
    border-radius: var(--r-sm);
    color: var(--ink-4);
    font-size: 12px;
    font-style: italic;
    max-height: 64px;
    overflow: hidden;
    position: relative;
}
.ai-thinking-block::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 18px;
    background: linear-gradient(to bottom, transparent, var(--paper-2));
    pointer-events: none;
}
.ai-thinking-block .ai-thinking-text {
    color: var(--blue-700);
    font-style: normal;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.ai-thinking-block .ai-thinking-text::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--blue-500);
    animation: thinkPulse 1.2s ease-in-out infinite;
}
@keyframes thinkPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.4); }
}
.ai-thinking-snippet {
    font-size: 12px;
    color: var(--ink-4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-style: italic;
    font-family: var(--ff-sans);
}
.ai-answer-block { margin-top: 6px; }

.ai-chat-input-area {
    padding: 12px 16px 14px;
    border-top: 1px solid var(--hair);
    background: var(--white);
}
.ai-chat-input-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--hair);
    border-radius: var(--r-full);
    padding: 4px 4px 4px 14px;
    transition: all var(--t-base) var(--ease);
}
.ai-chat-input-wrap:focus-within {
    background: var(--white);
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.10);
}
.ai-chat-input-wrap input {
    flex: 1;
    min-width: 0;
    padding: 8px 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--ink-2);
    font-size: 13.5px;
    font-family: var(--ff-sans);
    letter-spacing: -0.005em;
}
.ai-chat-input-wrap input::placeholder { color: var(--ink-5); }
.ai-chat-input-wrap button {
    width: 36px; height: 36px;
    background: var(--blue-900);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-base) var(--ease);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.ai-chat-input-wrap button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
    opacity: 0;
    transition: opacity var(--t-base) var(--ease);
}
.ai-chat-input-wrap button:hover { transform: translateY(-1px); }
.ai-chat-input-wrap button:hover::before { opacity: 1; }
.ai-chat-input-wrap button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.ai-chat-input-wrap button svg { position: relative; z-index: 1; width: 14px; height: 14px; }

.ai-chat-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.ai-hint {
    padding: 5px 11px;
    background: var(--white);
    border: 1px solid var(--hair);
    border-radius: var(--r-full);
    font-size: 12px;
    font-family: var(--ff-sans);
    color: var(--ink-3);
    cursor: pointer;
    transition: all var(--t-fast) var(--ease);
    letter-spacing: -0.005em;
}
.ai-hint:hover {
    background: var(--ink);
    color: var(--white);
    border-color: var(--ink);
    transform: translateY(-1px);
}
.ai-hint-custom {
    background: var(--ink);
    color: var(--white);
    border-color: var(--ink);
    font-weight: 600;
}
.ai-hint-custom:hover {
    background: var(--blue-700);
    border-color: var(--blue-700);
}
.ai-welcome { opacity: 0.95; }

.eraldis-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    width: 100%;
}
.eraldis-strip-label {
    font-size: 11px;
    color: var(--ink-4);
    font-weight: 600;
    margin-right: 2px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.eraldis-pick-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: transparent;
    border: 1px solid var(--hair);
    border-radius: var(--r);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
    cursor: pointer;
    transition: all var(--t-fast) var(--ease);
    white-space: nowrap;
    letter-spacing: -0.005em;
}
.eraldis-pick-btn:hover {
    background: var(--paper-2);
    border-color: var(--hair-2);
    color: var(--blue-700);
}
.eraldis-pick-btn svg {
    transition: transform var(--t-base) var(--ease);
}
.eraldis-pick-btn:hover svg {
    transform: rotate(90deg);
}

/* Eraldis bottom sheet */
.eraldis-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 21, 61, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 3000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.22s var(--ease);
}
.eraldis-sheet-overlay.open { opacity: 1; }
.eraldis-sheet {
    width: 100%;
    max-width: 520px;
    max-height: 80vh;
    background: var(--white);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -16px 48px rgba(7, 21, 61, 0.25);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s var(--ease-out);
    overflow: hidden;
}
.eraldis-sheet-overlay.open .eraldis-sheet { transform: translateY(0); }
.eraldis-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--hair);
    flex-shrink: 0;
}
.eraldis-sheet-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-2);
    margin: 0;
    letter-spacing: -0.01em;
}
.eraldis-sheet-close {
    background: transparent;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: var(--ink-4);
    cursor: pointer;
    padding: 2px 8px;
    border-radius: var(--r-sm);
    transition: all var(--t-fast) var(--ease);
}
.eraldis-sheet-close:hover { background: var(--paper-2); color: var(--ink-2); }
.eraldis-sheet-list {
    overflow-y: auto;
    padding: 6px;
    flex: 1;
}
.eraldis-sheet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--r);
    text-align: left;
    cursor: pointer;
    font-family: var(--ff-sans);
    color: var(--ink-2);
    transition: all var(--t-fast) var(--ease);
}
.eraldis-sheet-item:hover,
.eraldis-sheet-item:focus {
    background: var(--paper-2);
    border-color: var(--hair);
    outline: none;
}
.eraldis-sheet-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px var(--white), 0 0 0 4px var(--paper-3);
}
.eraldis-sheet-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.eraldis-sheet-nr {
    font-size: 13px;
    font-weight: 600;
    color: var(--blue-700);
    font-family: var(--ff-mono);
    letter-spacing: 0;
}
.eraldis-sheet-meta {
    font-size: 12.5px;
    color: var(--ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.eraldis-sheet-sub {
    font-size: 11.5px;
    color: var(--ink-4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--ff-mono);
    letter-spacing: 0;
}
.eraldis-sheet-arrow {
    font-size: 18px;
    color: var(--ink-5);
    flex-shrink: 0;
    line-height: 1;
}
@media (min-width: 641px) {
    .eraldis-sheet-overlay { align-items: center; padding: 16px; }
    .eraldis-sheet {
        border-radius: var(--r-xl);
        max-height: 70vh;
    }
}

/* ═══ CHARTS ════════════════════════════════════════════════════════════════ */
.charts-section {
    animation: sectionIn 0.5s var(--ease-out);
}
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.chart-card {
    background: var(--white);
    border: 1px solid var(--hair);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--sh-1);
    transition: all var(--t-base) var(--ease);
    position: relative;
    overflow: hidden;
}
.chart-card::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--hair-2), transparent);
    opacity: 0.6;
}
.chart-card:hover { box-shadow: var(--sh-3); }
.chart-card h3 {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-3);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.chart-card h3::before {
    content: "";
    width: 4px; height: 4px;
    background: var(--blue-500);
    border-radius: 50%;
}
.chart-wrapper { position: relative; height: 260px; display: flex; align-items: center; justify-content: center; }
.chart-wrapper canvas { max-height: 100% !important; max-width: 100% !important; }

/* ═══ TABLES ════════════════════════════════════════════════════════════════ */
#card-mets details {
    margin-top: 12px;
    border-top: 1px solid var(--paper-3);
    padding-top: 12px;
}
#card-mets details > summary {
    cursor: pointer;
    font-size: 15.5px;
    font-weight: 600;
    color: var(--blue-700);
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 4px 0;
    letter-spacing: -0.005em;
}
#card-mets details > summary::-webkit-details-marker { display: none; }
#card-mets details > summary::before {
    content: "";
    display: inline-block;
    width: 10px; height: 10px;
    background: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 3.5L5 6.5L8 3.5' stroke='currentColor' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
    flex-shrink: 0;
    transition: transform var(--t-base) var(--ease);
}
#card-mets details[open] > summary::before { transform: rotate(90deg); }
#card-mets details > summary .pill {
    background: var(--ink);
    color: var(--white);
    padding: 2px 7px;
    border-radius: var(--r-full);
    font-size: 11px;
    font-family: var(--ff-mono);
    font-weight: 500;
}
#card-mets details > summary .total {
    color: var(--success);
    font-family: var(--ff-mono);
    font-weight: 500;
    font-size: 12px;
}
#card-mets details table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin-top: 8px;
}
#card-mets details table th,
#card-mets details table td {
    padding: 6px 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11.5px;
}
#card-mets details table th {
    text-align: left;
    color: var(--ink-4);
    font-weight: 600;
    border-bottom: 1px solid var(--paper-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 10px;
}
#card-mets details table td {
    border-bottom: 1px solid var(--paper-3);
    font-family: var(--ff-mono);
    font-weight: 500;
    color: var(--ink-2);
    font-size: 11.5px;
}
#card-mets details table tr:last-child td { border-bottom: none; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}
th, td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--paper-3);
}
th {
    color: var(--ink-4);
    font-weight: 600;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--paper-2);
    font-family: var(--ff-sans);
}
tr:hover td { background: var(--paper); }
td strong { font-weight: 600; color: var(--ink-2); }
td { font-family: var(--ff-mono); color: var(--ink-3); font-size: 12px; }
td a { color: var(--blue-700); font-family: var(--ff-sans); font-weight: 500; }

/* ═══ TOETUSED ══════════════════════════════════════════════════════════════ */
.toetus-card {
    border: 1px solid var(--hair);
    border-radius: var(--r);
    padding: 16px;
    margin-bottom: 8px;
    background: var(--white);
    transition: all var(--t-fast) var(--ease);
}
.toetus-card:hover { box-shadow: var(--sh-2); border-color: var(--hair-2); }

#toetused-info .toetus-card { min-width: 400px; }
.toetus-eligible {
    border-color: #a7f3d0;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}
.toetus-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 6px;
}
.toetus-info strong { color: var(--ink-2); font-size: 13px; }
.toetus-cat {
    display: block;
    font-size: 10.5px;
    color: var(--ink-4);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}
.toetus-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}
.toetus-badge {
    font-size: 10.5px;
    padding: 2px 8px;
    border-radius: var(--r-full);
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.02em;
}
.toetus-amount {
    color: var(--ink-4);
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
    font-family: var(--ff-mono);
}
.toetus-amount.eligible { color: var(--success); font-weight: 600; font-size: 13px; }
.toetus-desc {
    color: var(--ink-3);
    font-size: 12px;
    margin: 4px 0 6px;
    line-height: 1.5;
    letter-spacing: -0.005em;
    font-family: var(--ff-sans);
}
.toetus-reason {
    color: var(--danger);
    font-size: 11.5px;
    margin: 0 0 6px;
    padding: 6px 8px;
    background: var(--danger-bg);
    border-radius: var(--r-sm);
    font-family: var(--ff-sans);
}
.toetus-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.toetus-voor { color: var(--ink-4); font-size: 11px; }
.toetus-links { display: flex; gap: 12px; }
.toetus-links a { color: var(--ink-4); font-size: 12px; text-decoration: none; }
.toetus-links a:hover { color: var(--blue-700); }
.toetus-cta { color: var(--success) !important; font-weight: 600 !important; font-size: 12.5px !important; }
.toetus-cta:hover { color: #065f46 !important; }


#kitsendused-info table { width: 100%; table-layout: fixed; min-width: 500px; }
#kitsendused-info td:nth-child(2) { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ═══ INFO DROPDOWNS ═══════════════════════════════════════════════════════ */
.info-dd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 4px;
    width: 14px; height: 14px;
    color: var(--ink-5);
    transition: all var(--t-fast) var(--ease);
    vertical-align: middle;
    user-select: none;
}
.info-dd:hover { color: var(--blue-700); }
.info-dd.open { transform: rotate(180deg); color: var(--blue-700); }
.info-dd svg { width: 10px; height: 10px; }
.info-dd-text {
    display: none;
    font-size: 12px;
    color: var(--ink-3);
    padding: 8px 10px;
    background: var(--paper-2);
    border-radius: var(--r-sm);
    border-left: 2px solid var(--blue-500);
    line-height: 1.5;
    font-weight: 400;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    box-shadow: var(--sh-2);
    margin-top: 2px;
    font-family: var(--ff-sans);
    letter-spacing: -0.005em;
}
.info-dd-text.show { display: block; }
.info-dd-text .dd-field { font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.info-dd-text .dd-value {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid var(--hair);
    font-size: 11.5px;
    color: var(--blue-700);
    font-weight: 500;
    line-height: 1.5;
}

/* ═══ UTILITIES ════════════════════════════════════════════════════════════ */
.muted { color: var(--ink-4); font-size: 12.5px; font-style: italic; }
.hidden { display: none !important; }
.initial-info {
    padding: 16px 12px;
    text-align: center;
    color: var(--ink-4);
    font-size: 12.5px;
}
.initial-info .icon { font-size: 18px; margin-bottom: 6px; opacity: 0.4; }
.initial-info p { margin: 3px 0; }
.initial-info .hint { font-size: 11.5px; margin-top: 4px; opacity: 0.7; }

/* ═══ FOOTER ═══════════════════════════════════════════════════════════════ */
footer {
    text-align: center;
    padding: 20px 24px 32px;
    border-top: 1px solid var(--hair);
    margin-top: 24px;
    background: var(--white);
}
.footer-content { max-width: var(--max-w); margin: 0 auto; }
.footer-brand {
    font-family: var(--ff-sans);
    font-size: 16px;
    color: var(--ink-2);
    margin-bottom: 2px;
    letter-spacing: -0.01em;
    font-weight: 400;
}
.footer-sources { color: var(--ink-4); font-size: 11.5px; font-family: var(--ff-mono); letter-spacing: 0.02em; }

/* ═══ LEAFLET OVERRIDES ═══════════════════════════════════════════════════ */
.leaflet-bar,
.leaflet-bar a,
.leaflet-bar a:hover { background: transparent !important; border: none !important; box-shadow: none !important; }
.leaflet-bar { box-shadow: var(--sh-2) !important; border-radius: var(--r) !important; overflow: hidden; }
.leaflet-control-zoom a {
    background: var(--white) !important;
    color: var(--ink-2) !important;
    border: 1px solid var(--hair) !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    margin: 0 !important;
    transition: all var(--t-fast) var(--ease);
}
.leaflet-control-zoom a:first-child { border-radius: var(--r) var(--r) 0 0 !important; border-bottom: 1px solid var(--hair) !important; }
.leaflet-control-zoom a:last-child { border-radius: 0 0 var(--r) var(--r) !important; }
.leaflet-control-zoom a:hover { background: var(--blue-50) !important; color: var(--blue-700) !important; }
.center-control { margin-top: 6px !important; border-radius: var(--r) !important; box-shadow: var(--sh-2) !important; }
.center-control a {
    background: var(--white) !important;
    color: var(--ink-2) !important;
    border: 1px solid var(--hair) !important;
    border-radius: var(--r) !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 18px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast) var(--ease);
}
.center-control a:hover { background: var(--blue-50) !important; color: var(--blue-700) !important; }
.leaflet-control-layers {
    border-radius: var(--r) !important;
    box-shadow: var(--sh-2) !important;
    border: 1px solid var(--hair) !important;
    background: var(--white) !important;
    font-family: var(--ff-sans) !important;
    font-size: 12px !important;
}
.leaflet-control-layers-expanded { padding: 10px 12px !important; }
.leaflet-popup-content-wrapper {
    border-radius: var(--r) !important;
    box-shadow: var(--sh-4) !important;
    font-family: var(--ff-sans) !important;
    border: 1px solid var(--hair);
}
.leaflet-popup-content { margin: 12px 14px !important; font-size: 12.5px !important; line-height: 1.5 !important; }
.leaflet-popup-tip { box-shadow: var(--sh-1) !important; }
.leaflet-tooltip {
    background: var(--ink) !important;
    color: var(--white) !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    font-size: 11.5px !important;
    font-family: var(--ff-sans) !important;
    box-shadow: var(--sh-2) !important;
}
.leaflet-tooltip::before { border-top-color: var(--ink) !important; }

/* Custom map markers */
.custom-marker { cursor: pointer; }

/* ═══ ERALDISED EXPANDED PANEL ═══ */
.eraldised-panel { padding: 0; overflow-x: auto; }
.eraldised-filters {
    display: flex; flex-wrap: wrap; gap: 12px; padding: 12px 16px;
    background: var(--paper-2); border-bottom: 1px solid var(--hair);
}
.eraldised-filter-group { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.eraldised-filter-label { font-size: 10px; text-transform: uppercase; color: var(--ink-4); letter-spacing: 0.06em; font-weight: 600; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.filter-chip {
    padding: 3px 10px; border-radius: var(--r-full); font-size: 11px; cursor: pointer;
    border: 1px solid var(--hair); background: white; transition: all 0.15s;
    font-family: var(--ff-sans); user-select: none;
}
.filter-chip:hover { border-color: var(--blue-400); }
.filter-chip.active { background: var(--blue-700); color: white; border-color: var(--blue-700); }
.filter-chip-disabled { opacity: 0.3; pointer-events: none; }
.filter-range { display: flex; align-items: center; gap: 4px; }
.filter-range input {
    width: 60px; padding: 4px 8px; border: 1px solid var(--hair); border-radius: var(--r-sm);
    font-size: 12px; font-family: var(--ff-sans); background: white;
}
.filter-range input:focus { border-color: var(--blue-500); outline: none; }
.filter-range-sep { color: var(--ink-4); font-size: 11px; }
.eraldised-controls {
    display: flex; align-items: center; gap: 8px; padding: 8px 16px;
    border-bottom: 1px solid var(--hair); font-size: 13px; color: var(--ink-4);
}
.eraldised-controls button {
    padding: 3px 10px; border-radius: var(--r-full); border: 1px solid var(--hair);
    background: white; cursor: pointer; font-size: 11px; font-family: var(--ff-sans);
    transition: all 0.15s;
}
.eraldised-controls button:hover { border-color: var(--blue-400); }
.eraldised-controls button.active { background: var(--blue-700); color: white; border-color: var(--blue-700); }
.eraldised-table-header {
    display: grid; grid-template-columns: 36px 1fr 65px 65px 70px 75px 90px;
    padding: 6px 10px; font-size: 11px; text-transform: uppercase; color: var(--ink-4);
    letter-spacing: 0.06em; font-weight: 600; border-bottom: 1px solid var(--hair);
    background: var(--paper-2);
    min-width: 460px;
}
.eraldised-row {
    display: grid; grid-template-columns: 36px 1fr 65px 65px 70px 75px 90px;
    padding: 8px 10px; border-bottom: 1px solid var(--hair); font-size: 14px;
    align-items: center; transition: background 0.1s;
    min-width: 460px;
}
.eraldised-row:hover { background: var(--paper-2); }
.eraldised-row .er-nr { font-weight: 600; color: var(--ink-2); }
.eraldised-row .er-species { font-weight: 500; }
.eraldised-row .er-value { font-weight: 700; color: var(--ink); font-family: var(--ff-mono); text-align: right; }
.eraldised-empty { padding: 24px 16px; text-align: center; color: var(--ink-4); font-size: 13px; }
/* Expanded card when eraldised details is open */
.metric-card:has(.eraldised-expand[open]) {
    grid-column: span 8 !important;
    transition: grid-column 0.3s ease;
}

/* ═══ DROPDOWN FILTER ═══ */
.filter-dropdown { position: relative; }
.filter-dropdown-trigger {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px; border: 1px solid var(--hair); border-radius: var(--r-sm);
    background: white; cursor: pointer; font-size: 12px; font-family: var(--ff-sans);
    transition: all 0.15s; user-select: none; white-space: nowrap;
}
.filter-dropdown-trigger:hover { border-color: var(--hair-2); }
.filter-dropdown.open .filter-dropdown-trigger { border-color: var(--blue-500); }
.filter-arrow { font-size: 9px; transition: transform 0.2s; color: var(--ink-4); }
.filter-dropdown.open .filter-arrow { transform: rotate(180deg); }
.filter-dropdown-menu {
    display: none; position: absolute; top: calc(100% + 4px); left: 0;
    background: white; border: 1px solid var(--hair); border-radius: var(--r-sm);
    box-shadow: var(--sh-4); z-index: 100; min-width: 180px; max-width: 280px;
    max-height: 240px; overflow-y: auto; padding: 4px 0;
}
.filter-dropdown.open .filter-dropdown-menu { display: block; }
.filter-dropdown-menu label {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px; font-size: 12px; cursor: pointer; transition: background 0.1s;
}
.filter-dropdown-menu label:hover { background: var(--paper-2); }
.filter-dropdown-menu input[type="checkbox"] {
    width: 14px; height: 14px; accent-color: var(--blue-700); cursor: pointer;
}
.filter-dropdown-menu .filter-option-disabled { opacity: 0.3; pointer-events: none; }
.filter-dropdown-menu .filter-count { font-size: 10px; color: var(--ink-4); margin-left: auto; }
.filter-dropdown-selected {
    font-size: 11px; color: var(--ink-4); padding: 2px 6px;
    background: var(--paper-2); border-radius: var(--r-full); margin-left: 2px;
}

/* Metsateatised table — 5 columns */
.teatised-table-header {
    display: grid; grid-template-columns: 1fr 120px 120px 80px 100px;
    padding: 6px 16px; font-size: 10px; text-transform: uppercase; color: var(--ink-4);
    letter-spacing: 0.06em; font-weight: 600; border-bottom: 1px solid var(--hair);
    background: var(--paper-2);
}
.teatised-row {
    display: grid; grid-template-columns: 1fr 120px 120px 80px 100px;
    padding: 8px 16px; border-bottom: 1px solid var(--hair); font-size: 13px;
    align-items: center; transition: background 0.1s; min-width: 500px;
}
.teatised-row:hover { background: var(--paper-2); }

/* ═══ RESPONSIVE ════════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
    .facts-strip { grid-template-columns: repeat(2, 1fr); }
    .metric-card { grid-column: span 6; }
    .metric-card.span-8 { grid-column: span 12; }
    .metric-card.span-6 { grid-column: span 6; }
}

/* Small tablet / large phone */
@media (max-width: 768px) {
    :root { --nav-h: 56px; }
    .hero { padding: 0 12px; gap: 8px; }
    .brand-name { font-size: 19px; }
    .brand-tag { display: none; }
    .nav-center { display: none; }
    .search-box { max-width: none; }
    .nav-right { gap: 8px; }
    .hamburger { display: none !important; }
    .dashboard { padding: 16px 14px 80px; gap: 18px; }
    #map { height: 420px; }
    .charts-grid { grid-template-columns: 1fr; }
    .layer-toggle {
        max-width: 240px;
        grid-template-columns: 1fr 1fr;
    }
    .section-head h2 { font-size: 24px; }
    .map-legend { max-width: 220px; font-size: 11.5px; }
}

/* Phone */
@media (max-width: 640px) {
    body { font-size: 14.5px; }
    .hero { padding: 0 10px; height: 56px; }
    .nav-left { gap: 6px; }
    .nav-center { display: none; }
    .brand-name { font-size: 17px; letter-spacing: -0.015em; }
    .brand-tag { display: none; }
    .search-box {
        height: 34px;
        padding: 0 3px 0 12px;
        border-radius: var(--r-full);
        min-width: 0;
        width: fit-content;
        margin-left: auto;
    }
    .search-box input { font-size: 13px; padding: 0 8px; min-width: 0; }
    .search-icon { display: none; }
    .search-box button { width: 26px; height: 26px; border-radius: 50%; }
    .search-box button svg { width: 12px; height: 12px; }
    .search-kbd { display: none !important; }

    .dashboard {
        padding: 12px 6px 100px;
        gap: 16px;
    }

    .landing {
        padding: 40px 18px 32px;
    }
    .landing-title { font-size: 38px; line-height: 1.04; }
    .landing-sub { font-size: 13px; line-height: 1.45; margin-bottom: 20px; }
    .landing-search .search-box { height: 38px; padding: 0 3px 0 12px; }
    .landing-search .search-box input { font-size: 14px; padding: 0 10px; }
    .landing-search .search-box button { width: 30px; height: 30px; }
    .landing-search .search-box button svg { width: 14px; height: 14px; }
    .landing-hints { gap: 6px; margin-top: 10px; }
    .landing-hint { font-size: 11px; padding: 4px 8px; gap: 4px; }
    .landing-hint .kbd { font-size: 9px; padding: 0px 4px; }
    .landing-search .search-icon { display: flex; }
    .landing-search .search-icon svg { width: 18px; height: 18px; }
    .landing-meta { gap: 12px; margin-top: 24px; }
    .landing-meta-num { font-size: 18px; }
    .landing-meta-label { font-size: 9px; letter-spacing: 0.04em; }
    .landing-eyebrow { font-size: 10px; padding: 2px 7px 2px 6px; gap: 4px; margin-bottom: 12px; letter-spacing: 0.01em; }
    .landing-eyebrow .dot { width: 4px; height: 4px; box-shadow: 0 0 0 2px rgba(4, 120, 87, 0.18); }

    .section-head { flex-direction: column; align-items: flex-start; gap: 4px; }
    .section-head h2 { font-size: 22px; }
    .section-head .section-meta { font-size: 10.5px; }

    .facts-strip { grid-template-columns: repeat(2, 1fr); gap: 0; }
    .fact { padding: 14px 14px; }
    .fact-value { font-size: 19px; }
    .fact-label { font-size: 9.5px; }

    .metrics-grid { grid-template-columns: 1fr; gap: 12px; }
    .metric-card { grid-column: span 1 !important; padding: 16px 16px 14px; border-radius: var(--r-sm); }
    .metric-card.span-6, .metric-card.span-8, .metric-card.span-12 { grid-column: span 1 !important; }
    .card-header h3 { font-size: 10px; letter-spacing: 0.08em; }
    .section-desc { font-size: 12px; }
    .card-icon { width: 30px; height: 30px; border-radius: 7px; }
    .card-icon svg { width: 14px; height: 14px; }

    .eraldised-table-header,
    .eraldised-row {
        grid-template-columns: 32px 1fr 55px 55px 60px 65px 80px;
        font-size: 10px;
        padding: 6px 8px;
        min-width: 380px;
    }
    .eraldised-row { font-size: 12px; }

    .info-row { padding: 7px 0; }
    .info-row .label { font-size: 12px; }
    .info-row .value { font-size: 12.5px; }
    .big-number { font-size: 28px; }
    .big-number .unit { font-size: 12px; }
    .value-block { padding: 12px 14px 10px; }
    .value-block .row { gap: 12px; flex-wrap: wrap; }

    #map { height: 300px; }
    .map-hint {
        top: 50px;
        font-size: 10.5px;
        padding: 5px 5px 5px 9px;
        gap: 5px;
        max-width: calc(100% - 16px);
        white-space: nowrap;
    }
    .map-hint svg { width: 12px; height: 12px; }
    .map-hint-close { width: 18px; height: 18px; font-size: 13px; }
    .map-controls { top: 8px; left: 8px; max-width: 140px; }
    .layer-toggle {
        font-size: 10px;
        max-width: 140px;
        grid-template-columns: 1fr;
        padding: 3px;
        gap: 0;
    }
    .toggle-item { padding: 3px 6px; min-height: 24px; }
    .toggle-item .toggle-label { font-size: 10px; gap: 4px; }
    .toggle-item .toggle-label::before { width: 7px; height: 7px; }
    .map-legend {
        right: 8px;
        bottom: 8px;
        max-width: 180px;
        font-size: 10.5px;
        padding: 6px 8px 5px;
    }
    .map-legend-title { font-size: 9.5px; }
    .map-legend-subtitle { font-size: 9px; }
    .map-legend-row { font-size: 10.5px; }
    .map-legend-toggle { width: 18px; height: 18px; font-size: 11px; }

    .ai-chat-section { border-radius: 8px; }
    .ai-chat-messages { max-height: 320px; padding: 12px 14px; }
    .ai-chat-header { padding: 12px 14px; }
    .ai-chat-header h2 { font-size: 13px; }
    .ai-chat-subtitle { font-size: 11.5px; }
    .ai-bubble { font-size: 13px; padding: 8px 12px; }
    .ai-hint { font-size: 11.5px; padding: 4px 10px; }
    .ai-chat-input-area { padding: 10px 12px 12px; }

    .charts-section { gap: 12px; }
    .chart-card { padding: 16px 14px; border-radius: 8px; }
    .chart-card h3 { margin-bottom: 10px; }
    .chart-wrapper { height: 280px; padding: 0; }

    .error-msg {
        top: calc(var(--nav-h) + 8px);
    font-size: 14.5px;
        padding: 8px 12px 8px 10px;
    }
    .error-msg::before { width: 16px; height: 16px; font-size: 10px; }

    .loading { top: var(--nav-h); }
    .skeleton-map { height: 240px; }
    .skeleton-card { height: 80px; }

    footer { padding: 16px 16px 24px; }
    .footer-brand { font-size: 14px; }
    .footer-sources { font-size: 10.5px; }

    /* Sidebar becomes full-width sheet on phone */
    .sidebar { width: 100%; max-width: 360px; }
    .sidebar-header { padding: 16px 18px; }

    /* Toetused — stack header & footer vertically for readability on phone */
    .toetus-card { padding: 14px; }
    .toetus-header {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    .toetus-info strong { font-size: 13.5px; line-height: 1.3; display: block; }
    .toetus-cat {
        font-size: 10px;
        letter-spacing: 0.04em;
        margin-top: 3px;
        line-height: 1.35;
    }
    .toetus-meta {
        margin-top: 6px;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    .toetus-amount {
        text-align: left;
        white-space: normal;
        font-size: 12.5px;
        line-height: 1.35;
    }
    .toetus-amount.eligible { font-size: 13px; }
    .toetus-desc { font-size: 12.5px; line-height: 1.55; }
    .toetus-reason { font-size: 12px; line-height: 1.45; }
    .toetus-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 4px;
    }
    .toetus-voor { font-size: 11px; line-height: 1.4; }
    .toetus-links {
        gap: 16px;
        justify-content: flex-end;
        flex-wrap: wrap;
    }
    .toetus-links a, .toetus-cta { font-size: 12.5px !important; }

    /* ── Touch targets: bump everything that taps to ≥44px on mobile ── */
    .ai-chat-input-wrap input { min-height: 28px; padding: 10px 0; }
    .ai-chat-input-wrap button { width: 44px; height: 44px; }
    .search-box { min-height: 40px; }
    .search-box button { width: 36px; height: 36px; }
    .landing-search .search-box { min-height: 44px; }
    .landing-search .search-box button { width: 36px; height: 36px; }
    .zoom-btn { min-width: 44px; min-height: 44px; }
    .ai-hint { min-height: 32px; padding: 8px 12px; font-size: 12.5px; }
    .map-controls-toggle { min-height: 40px; padding: 8px 12px; }
    .toggle-item { min-height: 32px; padding: 6px 8px; }
    .toggle-item .toggle-label { font-size: 11px; }
    .landing-hint { min-height: 28px; padding: 6px 10px; }
    .map-legend-toggle { width: 28px; height: 28px; font-size: 14px; }
    .map-hint-close { width: 28px; height: 28px; font-size: 18px; }
}

/* Very small phones */
@media (max-width: 380px) {
    .facts-strip { grid-template-columns: 1fr 1fr; }
    .fact-value { font-size: 17px; }
    .landing-title { font-size: 30px; line-height: 1.05; }
    .landing-sub { font-size: 12.5px; }
    .big-number { font-size: 28px; }
    .brand-name { font-size: 15px; }
    .search-box { max-width: 200px; }
    .map-controls { max-width: 130px; }
    .layer-toggle { max-width: 130px; }
    .map-legend { max-width: 160px; }
}

/* ═══ ZOOM CONTROLS ═══════════════════════════════════════════════════════ */
.zoom-controls {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1500;
    display: flex;
    gap: 4px;
    background: var(--white);
    border: 1px solid var(--hair);
    border-radius: var(--r-full);
    padding: 4px;
    box-shadow: var(--sh-3);
}
.zoom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 32px;
    border: none;
    border-radius: var(--r-full);
    background: transparent;
    color: var(--ink-3);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--ff-mono);
    cursor: pointer;
    transition: all var(--t-fast) var(--ease);
    letter-spacing: -0.02em;
}
.zoom-btn:hover {
    background: var(--paper-2);
    color: var(--ink-2);
}
.zoom-btn.active {
    background: var(--blue-700);
    color: var(--white);
}

/* Zoom applied to html element */
html.zoom-75 {
    zoom: 0.75;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print — minimal */
@media print {
    .hero, .sidebar, .ai-chat-section, .map-controls, footer { display: none; }
    body { background: #fff; }
}

/* ═══ Meist (About) section ═══ */
.about {
    position: relative;
    padding: 80px 0 80px;
    background: var(--paper);
    overflow: hidden;
}
.about-inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
    z-index: 1;
}
@media (max-width: 768px) {
    .about { padding: 56px 0; }
    .about-inner { padding: 0 20px; }
}
.about-photo {
    position: relative;
    margin: 0 0 40px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 36px -12px rgba(7, 21, 61, 0.18);
    background: var(--blue-50);
    aspect-ratio: 16/9;
}
.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
}
.about-photo-caption {
    position: absolute;
    left: 20px;
    bottom: 18px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: var(--white);
    text-shadow: 0 2px 12px rgba(7, 21, 61, 0.6);
    max-width: calc(100% - 40px);
}
.about-photo-caption-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.92);
    font-family: var(--ff-mono);
}
.about-photo-caption-names {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--white);
}
@media (max-width: 640px) {
    .about-photo-caption { left: 14px; bottom: 12px; }
    .about-photo-caption-title { font-size: 10px; }
    .about-photo-caption-names { font-size: 12px; }
}
.about-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--blue-200);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px -4px rgba(7, 21, 61, 0.3);
}
.about-eyebrow .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 8px #fbbf24;
    display: inline-block;
}
.about-title {
    font-size: clamp(26px, 3.6vw, 36px);
    line-height: 1.12;
    color: var(--ink);
    letter-spacing: -0.02em;
    margin: 0 0 16px;
    font-weight: 800;
}
.about-title em {
    font-style: normal;
    background: linear-gradient(135deg, var(--blue-900), var(--blue-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.about-lead {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-3);
    margin: 0 0 28px;
    max-width: 760px;
}
.about-hackathon {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 10px 16px;
    background: var(--blue-50);
    border: 1px solid var(--blue-200);
    border-radius: 999px;
    color: var(--blue-900);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.about-hackathon-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blue-700);
}
.about-hackathon-badge svg { width: 14px; height: 14px; flex-shrink: 0; }
.about-hackathon-title,
.about-hackathon-sub,
.about-hackathon-text { display: none; }
.about-stats,
.about-stat,
.about-stat-num,
.about-stat-label,
.about-team-heading,
.about-team,
.about-member,
.about-member-avatar,
.about-member-name,
.about-member-role,
.about-member-school,
.about-contact,
.about-contact-row,
.about-contact-icon,
.about-contact-email,
.about-contact-label,
.about-contact-note { display: none; }

/* ═══ Allikad (sources) section ═══ */
.sources {
    background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
    padding: 64px 32px 56px;
    border-top: 1px solid var(--hair);
}
.sources-inner {
    max-width: 1180px;
    margin: 0 auto;
}
.sources-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--blue-50);
    color: var(--blue-900);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
}
.sources-eyebrow .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--blue-600);
    display: inline-block;
}
.sources-title {
    font-size: clamp(24px, 3.4vw, 34px);
    line-height: 1.15;
    color: var(--ink);
    letter-spacing: -0.02em;
    margin: 0 0 24px;
    font-weight: 800;
    max-width: 760px;
}
.sources-title em {
    font-style: normal;
    background: linear-gradient(135deg, var(--blue-900), var(--blue-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.sources-sub { display: none; }
.sources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (max-width: 980px) {
    .sources-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .sources { padding: 48px 20px; }
    .sources-grid { grid-template-columns: 1fr; }
    .sources-sub { margin-bottom: 32px; }
}
.source-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 44px;
    background: var(--white);
    border: 1px solid var(--hair);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
    isolation: isolate;
}
.source-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--blue-50), transparent 60%);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: -1;
}
.source-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px -8px rgba(10, 29, 92, 0.12);
    border-color: var(--blue-200);
}
.source-card:hover::before { opacity: 1; }
.source-card-own {
    background: linear-gradient(135deg, var(--blue-50) 0%, var(--white) 100%);
    color: var(--ink);
    border-color: var(--blue-300);
}
.source-card-own::before {
    background: linear-gradient(135deg, var(--blue-100), transparent 60%);
}
.source-card-own .source-org,
.source-card-own .source-name { color: var(--blue-900); }
.source-card-own .source-desc { color: var(--ink-3); }
.source-card-own .source-uses li { color: var(--ink-3); }
.source-card-own .source-uses li::before { background: var(--blue-500); }
.source-card-own .source-meta { border-color: var(--hair); }
.source-card-own .source-fresh { background: var(--blue-50); color: var(--blue-700); }
.source-card-own .source-link { color: var(--blue-700); }
.source-card-own .source-icon { color: var(--blue-700); background: var(--blue-50); }
.source-org {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--blue-700);
    margin-bottom: 4px;
}
.source-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 6px;
    line-height: 1.3;
}
.source-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-3);
    margin: 0;
}
.source-arrow {
    position: absolute;
    bottom: 14px;
    right: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--blue-50);
    color: var(--blue-700);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.source-arrow svg { width: 14px; height: 14px; }
.source-card:hover .source-arrow {
    background: var(--blue-700);
    color: var(--white);
    transform: translateX(2px);
}
.source-uses,
.source-meta,
.source-fresh,
.source-link,
.source-icon,
.sources-note {
    display: none;
}

/* ═══ KONTAKT ══════════════════════════════════════════════════════════ */
.contact {
    background: var(--white);
    padding: 80px 0;
    border-top: 1px solid var(--hair);
    text-align: center;
}
.contact-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 32px;
}
@media (max-width: 640px) {
    .contact { padding: 56px 0; }
    .contact-inner { padding: 0 20px; }
}
.contact-title {
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    color: var(--ink);
    letter-spacing: -0.02em;
    margin: 0 0 12px;
    font-weight: 800;
}
.contact-title em {
    font-style: normal;
    background: linear-gradient(135deg, var(--blue-900), var(--blue-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.contact-lead {
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-3);
    margin: 0 0 20px;
}
.contact-email {
    display: inline-block;
    font-size: 17px;
    font-weight: 600;
    color: var(--blue-700);
    text-decoration: none;
    padding: 12px 24px;
    border: 1px solid var(--blue-200);
    border-radius: 999px;
    background: var(--blue-50);
    transition: all 0.2s ease;
    word-break: break-all;
}
.contact-email:hover {
    color: var(--white);
    background: var(--blue-700);
    border-color: var(--blue-700);
}
.contact-grid,
.contact-card,
.contact-card-primary,
.contact-card-icon,
.contact-card-icon svg,
.contact-card-label,
.contact-card-title,
.contact-card-cta,
.contact-card-cta svg { display: none; }
