/* ─── Google Fonts ─────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300&family=Azeret+Mono:wght@300;400;500;600&display=swap');

/* ─── Variables ────────────────────────────────────────────────────────── */
:root {
    --bg:            #eef1f6;
    --bg-surface:    #e5e9f2;
    --bg-card:       #ffffff;
    --bg-card-hover: #f7f9fd;
    --bg-input:      #f4f6fa;

    --border:        rgba(30, 60, 110, 0.1);
    --border-mid:    rgba(30, 60, 110, 0.2);
    --border-glow:   rgba(0, 91, 187, 0.45);

    --text:          #12213a;
    --text-dim:      #4a5e7a;
    --text-muted:    #8fa2b8;

    --accent:        #005bbb;
    --accent-dim:    rgba(0, 91, 187, 0.07);
    --accent-glow:   rgba(0, 91, 187, 0.18);

    --track-inc:     #cc1f00;
    --track-ref:     #006e35;
    --track-res:     #005bbb;

    --track-inc-bg:  rgba(204, 31, 0, 0.06);
    --track-ref-bg:  rgba(0, 110, 53, 0.06);
    --track-res-bg:  rgba(0, 91, 187, 0.06);

    --success:       #006e35;
    --warning:       #c96a00;
    --danger:        #cc1f00;

    --shadow-sm:     0 1px 4px rgba(15, 40, 80, 0.08);
    --shadow-md:     0 4px 16px rgba(15, 40, 80, 0.1);
    --shadow-lg:     0 8px 32px rgba(15, 40, 80, 0.13);

    --radius:        6px;
    --radius-lg:     12px;
    --sidebar-w:     340px;
    --nav-h:         56px;

    --font-display:  'Chakra Petch', sans-serif;
    --font-mono:     'Azeret Mono', monospace;
}

/* ─── Reset ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Background pattern ───────────────────────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        repeating-linear-gradient(0deg,   transparent 0, transparent 79px, rgba(30,60,120,0.04) 79px, rgba(30,60,120,0.04) 80px),
        repeating-linear-gradient(90deg,  transparent 0, transparent 79px, rgba(30,60,120,0.04) 79px, rgba(30,60,120,0.04) 80px),
        repeating-linear-gradient(0deg,   transparent 0, transparent 19px, rgba(30,60,120,0.02) 19px, rgba(30,60,120,0.02) 20px),
        repeating-linear-gradient(90deg,  transparent 0, transparent 19px, rgba(30,60,120,0.02) 19px, rgba(30,60,120,0.02) 20px);
}

/* ─── Navigation ───────────────────────────────────────────────────────── */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    color: var(--text);
    text-transform: uppercase;
    flex-shrink: 0;
}

.nav-logo-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.nav-logo span { color: var(--accent); }

.nav-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
    margin-left: 16px;
}

.nav-breadcrumb a { color: var(--text-dim); }
.nav-breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.nav-breadcrumb-sep { color: var(--text-muted); }
.nav-breadcrumb-current { color: var(--accent); font-weight: 500; }

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

.nav-right-group {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.nav-back-link {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.06em;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
}

.lang-switcher a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 3px;
    transition: color 0.15s, background 0.15s;
}

.lang-switcher a:hover {
    color: var(--accent);
    background: var(--accent-dim);
}

.lang-active {
    color: var(--accent);
    font-weight: 600;
    padding: 2px 4px;
}

.lang-sep { color: var(--text-muted); }

/* ─── Hero (index page) ─────────────────────────────────────────────────── */
.hero {
    position: relative;
    z-index: 1;
    padding: 80px 48px 64px;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0,91,187,0.04) 0%, transparent 60%);
    display: flex;
    align-items: stretch;
    gap: 48px;
}

.hero-content {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.hero-motive {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-right: -48px;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.5s forwards;
    pointer-events: none;
}

.hero-motive img {
    display: block;
    height: 100%;
    max-height: 480px;
    width: auto;
    max-width: none;
    mix-blend-mode: multiply;
}

.hero::after {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 91, 187, 0.07) 0%, transparent 65%);
    pointer-events: none;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid rgba(0, 91, 187, 0.3);
    padding: 4px 12px;
    border-radius: 2px;
    margin-bottom: 24px;
    background: var(--accent-dim);
    opacity: 0;
    animation: fadeUp 0.6s ease-out 0.1s forwards;
}

.hero-tag::before {
    content: '';
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 8vw, 7rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--text);
    opacity: 0;
    animation: fadeUp 0.7s ease-out 0.2s forwards;
}

.hero-title em {
    font-style: normal;
    color: var(--accent);
}

.hero-desc {
    margin-top: 24px;
    max-width: 480px;
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.7;
    opacity: 0;
    animation: fadeUp 0.7s ease-out 0.35s forwards;
}

/* ─── Tools Section ─────────────────────────────────────────────────────── */
.tools-section {
    position: relative;
    z-index: 1;
    padding: 48px;
}

.section-label {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeUp 0.6s ease-out 0.5s forwards;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    opacity: 0;
    animation: fadeUp 0.7s ease-out 0.6s forwards;
}

.tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, background 0.2s;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px;
    height: 100%;
    background: var(--card-accent, var(--accent));
    border-radius: 3px 0 0 3px;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.tool-card:hover {
    border-color: rgba(0, 91, 187, 0.2);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.tool-card:hover::before { opacity: 1; }

.tool-card--available { cursor: pointer; }
.tool-card--soon { cursor: default; }
.tool-card--soon .tool-card-header,
.tool-card--soon .tool-name,
.tool-card--soon .tool-desc { opacity: 0.5; }
.tool-card--soon:hover { transform: none; border-color: var(--border); background: var(--bg-card); box-shadow: var(--shadow-sm); }

.tool-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.tool-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--icon-bg, rgba(0,91,187,0.08));
    border-radius: var(--radius);
    color: var(--card-accent, var(--accent));
    flex-shrink: 0;
}

.tool-icon svg { width: 22px; height: 22px; }

.tool-badge {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 2px;
    font-weight: 500;
}

.tool-badge--available {
    color: var(--success);
    background: rgba(0, 110, 53, 0.08);
    border: 1px solid rgba(0, 110, 53, 0.25);
}

.tool-badge--soon {
    color: var(--text-muted);
    background: rgba(0,0,0,0.04);
    border: 1px solid var(--border);
}

.tool-name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text);
    margin-bottom: 8px;
}

.tool-desc {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.65;
    flex: 1;
    margin-bottom: 20px;
}

.tool-launch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--card-accent, var(--accent));
    padding: 9px 16px;
    border: 1px solid rgba(0, 91, 187, 0.2);
    border-radius: var(--radius);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    width: fit-content;
    background: var(--accent-dim);
}

.tool-card:hover .tool-launch {
    background: rgba(0, 91, 187, 0.12);
    border-color: var(--border-glow);
    box-shadow: 0 0 0 3px rgba(0, 91, 187, 0.08);
}

.tool-launch svg { width: 14px; height: 14px; transition: transform 0.2s; }
.tool-card:hover .tool-launch svg { transform: translateX(3px); }

/* ─── MSR Tool Layout ───────────────────────────────────────────────────── */
.msr-layout {
    position: relative;
    z-index: 1;
    display: flex;
    height: calc(100vh - var(--nav-h));
    overflow: hidden;
}

.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--shadow-sm);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 2px; }

.map-area {
    flex: 1;
    position: relative;
    min-width: 0;
}

#map {
    width: 100%;
    height: 100%;
    background: var(--bg);
}

/* ─── Sidebar Sections ──────────────────────────────────────────────────── */
.sb-section {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.sb-section:last-child { border-bottom: none; }

.sb-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.sb-heading-num {
    width: 18px;
    height: 18px;
    border: 1px solid var(--text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    flex-shrink: 0;
}

/* ─── Slider ────────────────────────────────────────────────────────────── */
.slider-group { margin-bottom: 8px; }
.slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.slider-value {
    font-weight: 600;
    color: var(--text-main);
}
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--border-mid);
    outline: none;
    cursor: pointer;
}
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-card);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    cursor: pointer;
}
.slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-card);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    cursor: pointer;
}
.slider-range {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ─── Upload Zones ──────────────────────────────────────────────────────── */
.upload-zone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 12px;
    border: 1.5px dashed var(--border-mid);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    margin-bottom: 10px;
    text-align: center;
    min-height: 90px;
    background: var(--bg-input);
}

.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--zone-color, var(--accent));
    background: rgba(0, 91, 187, 0.04);
    box-shadow: 0 0 0 3px rgba(0, 91, 187, 0.06);
}

.upload-zone.loaded {
    border-style: solid;
    border-color: var(--zone-color, var(--accent));
    background: rgba(0, 91, 187, 0.04);
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.upload-zone-label {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--zone-color, var(--accent));
}

.upload-zone-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.upload-zone-file {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.upload-zone.loaded .upload-zone-idle { display: none; }
.upload-zone.loaded .upload-zone-file { display: flex; }

.upload-zone-filename {
    font-size: 0.78rem;
    color: var(--zone-color, var(--accent));
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-zone-filesize {
    font-size: 0.68rem;
    color: var(--text-dim);
}

.upload-zone-icon {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

.upload-zone.loaded .upload-zone-icon { color: var(--zone-color, var(--accent)); }

/* ─── Button ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 10px 18px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.18s;
    border: none;
    width: 100%;
}

.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn--primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 91, 187, 0.25);
}

.btn--primary:hover:not(:disabled) {
    background: #0070e0;
    box-shadow: 0 4px 16px rgba(0, 91, 187, 0.35);
}

.btn--primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.btn--ghost {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--border-mid);
}

.btn--ghost:hover:not(:disabled) {
    border-color: var(--border-glow);
    background: var(--accent-dim);
}

.btn--download {
    background: rgba(0, 110, 53, 0.07);
    color: var(--success);
    border: 1px solid rgba(0, 110, 53, 0.25);
}

.btn--download:hover:not(:disabled) {
    background: rgba(0, 110, 53, 0.12);
    border-color: rgba(0, 110, 53, 0.5);
    box-shadow: 0 2px 12px rgba(0, 110, 53, 0.15);
}

.btn--download:disabled { opacity: 0.35; cursor: not-allowed; }

.btn--loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ─── Stats Panel ────────────────────────────────────────────────────────── */
.stats-panel { display: none; }
.stats-panel.visible { display: block; }

.stat-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid var(--border);
    gap: 8px;
}

.stat-row:last-child { border-bottom: none; }

.stat-key {
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    text-transform: uppercase;
    flex-shrink: 0;
}

.stat-val {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    text-align: right;
}

.stat-val.accent { color: var(--accent); }
.stat-val.inc    { color: var(--track-inc); }
.stat-val.ref    { color: var(--track-ref); }
.stat-val.res    { color: var(--track-res); }

.stat-separator {
    border: none;
    border-top: 1px solid var(--border);
    margin: 8px 0;
}

/* ─── Track Toggles ──────────────────────────────────────────────────────── */
.track-toggles {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.track-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-input);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    transition: all 0.15s;
    user-select: none;
    text-align: left;
    width: 100%;
}

.track-toggle:hover { border-color: var(--border-mid); color: var(--text); background: var(--bg-card); }

.track-toggle.active { color: var(--text); background: var(--bg-card); }

.track-toggle-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--dot-color);
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.track-toggle.inactive .track-toggle-dot { opacity: 0.25; }
.track-toggle.inactive { opacity: 0.55; }

.track-toggle-label { flex: 1; }

.track-toggle-count {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* ─── Toast ──────────────────────────────────────────────────────────────── */
.toast {
    display: none;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 0.78rem;
    line-height: 1.5;
    border: 1px solid;
}

.toast.error {
    display: block;
    color: var(--danger);
    background: rgba(204, 31, 0, 0.06);
    border-color: rgba(204, 31, 0, 0.25);
}

.toast.info {
    display: block;
    color: var(--accent);
    background: var(--accent-dim);
    border-color: rgba(0, 91, 187, 0.25);
}

/* ─── Map overlay ────────────────────────────────────────────────────────── */
.map-overlay {
    position: absolute;
    inset: 0;
    z-index: 400;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    background: rgba(238, 241, 246, 0.8);
    backdrop-filter: blur(4px);
}

.map-overlay.visible { display: flex; }

.map-overlay-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(0, 91, 187, 0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.map-overlay-text {
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.map-empty-hint {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    color: var(--text-muted);
    pointer-events: none;
}

.map-empty-hint svg {
    width: 48px;
    height: 48px;
    opacity: 0.25;
}

.map-empty-hint p {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ─── Splice info ────────────────────────────────────────────────────────── */
.splice-info {
    display: none;
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 10px;
    padding: 8px 10px;
    background: rgba(0,0,0,0.03);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    line-height: 1.6;
}

.splice-info.visible { display: block; }
.splice-info strong { color: var(--warning); }

/* ─── Leaflet overrides ──────────────────────────────────────────────────── */
.leaflet-container { font-family: var(--font-mono); }

.leaflet-popup-content-wrapper {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.leaflet-popup-tip { background: var(--bg-card); }
.leaflet-popup-content { font-size: 0.78rem; line-height: 1.6; }

.leaflet-control-attribution {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    background: rgba(255,255,255,0.85) !important;
    color: var(--text-muted) !important;
}

.leaflet-bar {
    border: 1px solid var(--border-mid) !important;
    box-shadow: var(--shadow-sm) !important;
}

.leaflet-bar a {
    background: var(--bg-card) !important;
    color: var(--text) !important;
    border-bottom: 1px solid var(--border) !important;
    font-size: 16px !important;
}

.leaflet-bar a:hover { background: var(--bg-input) !important; color: var(--accent) !important; }

/* ─── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

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

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.footer-credit {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
    color: var(--text-dim);
}
.footer-credit a          { color: var(--accent); text-decoration: none; }
.footer-credit a:hover    { text-decoration: underline; }
.footer-heart             { color: #e8375f; }

.sb-credit {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 0.68rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.8;
}
.sb-credit a       { color: var(--accent); text-decoration: none; }
.sb-credit a:hover { text-decoration: underline; }

.footer {
    position: relative;
    z-index: 1;
    padding: 24px 48px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
    background: var(--bg-card);
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1330px) {
    .hero-motive img {
        height: auto;
        width: 100%;
        max-height: none;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .hero { padding: 48px 24px 40px; flex-direction: column; gap: 32px; }
    .hero-motive { display: none; }
    .tools-section { padding: 32px 24px; }
    .footer { padding: 20px 24px; flex-direction: column; gap: 8px; text-align: center; }

    .msr-layout { flex-direction: column; height: auto; min-height: calc(100vh - var(--nav-h)); }
    .sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
    .map-area { height: 55vh; flex: none; }
}
