:root {
  --ink: #14213d;
  --muted: #61708a;
  --navy: #10213f;
  --sea: #dff3f6;
  --land: #d2dde4;
  --land-hover: #47a9ae;
  --active: #e74c3c;
  --line: #ffffff;
  --panel: #ffffff;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f3f6f8; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.navbar { min-height: 68px; background: var(--navy); box-shadow: 0 4px 18px rgba(16,33,63,.12); }
.navbar-brand { font-weight: 750; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #ef4d45; font-size: .75rem; letter-spacing: .08em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.map-card, .info-card { background: var(--panel); border: 1px solid #dce4ea; border-radius: 22px; box-shadow: 0 16px 40px rgba(27,50,75,.08); overflow: hidden; }
.map-toolbar { min-height: 94px; padding: 1.25rem 1.35rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #e4ebef; }
.eyebrow { color: #da443a; font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.toolbar-actions { display: flex; align-items: center; gap: .65rem; }
.search-box { width: min(300px, 35vw); height: 38px; display: flex; align-items: center; gap: .55rem; padding: 0 .75rem; border: 1px solid #cad5dc; border-radius: 11px; background: #f8fafb; }
.search-box:focus-within { border-color: #31979f; box-shadow: 0 0 0 3px rgba(49,151,159,.14); }
.search-box svg { width: 17px; fill: none; stroke: #6d7c8f; stroke-width: 2; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.map-stage { position: relative; min-height: 590px; overflow: hidden; background: radial-gradient(circle at 45% 48%, #edfafa 0, var(--sea) 57%, #cfe9ed 100%); touch-action: none; }
#europe-map { display: block; width: 100%; height: 590px; cursor: grab; }
#europe-map:active { cursor: grabbing; }
.country { fill: var(--land); stroke: var(--line); stroke-width: 1.25; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .16s ease, filter .16s ease; }
.country:hover, .country:focus { fill: var(--land-hover); filter: drop-shadow(0 2px 2px rgba(10,50,60,.25)); outline: none; }
.country.is-active { fill: var(--active); }
.country.is-dimmed { fill: #b9c4cb; opacity: .5; }
.marker circle { fill: #f9c846; stroke: var(--navy); stroke-width: 2; vector-effect: non-scaling-stroke; }
.marker text { font-size: 12px; font-weight: 800; fill: var(--navy); paint-order: stroke; stroke: white; stroke-width: 3px; stroke-linejoin: round; }
.loading-state { position: absolute; z-index: 5; inset: 0; display: flex; align-items: center; justify-content: center; gap: .6rem; color: var(--muted); background: rgba(232,247,248,.92); }
.map-tooltip { position: absolute; z-index: 8; max-width: 230px; padding: .55rem .7rem; border-radius: 9px; background: rgba(16,33,63,.94); color: #fff; font-size: .86rem; pointer-events: none; box-shadow: 0 7px 24px rgba(0,0,0,.2); }
.zoom-controls { position: absolute; right: 16px; bottom: 16px; display: grid; overflow: hidden; border: 1px solid #cbd7dd; border-radius: 12px; box-shadow: 0 5px 16px rgba(16,33,63,.14); }
.zoom-controls button { width: 42px; height: 39px; border: 0; background: white; color: var(--ink); font-size: 1.35rem; line-height: 1; }
.zoom-controls button + button { border-top: 1px solid #dce4e8; }
.zoom-controls button:hover { background: #eef6f6; }
.map-footer { min-height: 52px; padding: .8rem 1.35rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .82rem; }
.legend-swatch { display: inline-block; width: 12px; height: 12px; margin-right: .35rem; border-radius: 3px; background: var(--land-hover); vertical-align: -1px; }
.info-card { position: relative; min-height: 100%; padding: 1.6rem; }
.continent-badge { display: inline-flex; margin-bottom: 2.6rem; padding: .42rem .65rem; border-radius: 7px; background: #e5f5f5; color: #22777d; font-size: .7rem; font-weight: 850; letter-spacing: .14em; }
.info-card .display-6 { margin-bottom: 1rem; font-size: clamp(2rem, 3vw, 3rem); font-weight: 800; letter-spacing: -.055em; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.stat-grid div { padding: 1rem; border-radius: 14px; background: #f2f6f8; }
.stat-grid strong, .stat-grid span { display: block; }
.stat-grid strong { font-size: 1.5rem; }
.stat-grid span { color: var(--muted); font-size: .8rem; }
.country-facts { margin: 1.6rem 0; }
.country-facts div { padding: .9rem 0; border-bottom: 1px solid #e6ecef; }
.country-facts dt { color: var(--muted); font-size: .76rem; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; }
.country-facts dd { margin: .16rem 0 0; font-weight: 750; }

@media (max-width: 767.98px) {
  .map-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .map-stage { min-height: 470px; }
  #europe-map { height: 470px; }
  .map-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
