:root {
  --po-primary: #1d6aa5;
  --po-horizon: #e4eef6;
  --po-blue: #1a4a78;
  --po-text: #3c4654;
  --po-border: #d5e2ec;
  --po-ink: #16324f;
  --po-nav: #163e66;
  --nav-h: 56px;
  --font: "Open Sans", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: var(--font);
  color: var(--po-text);
  background: #eef3f8;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--po-blue); }
img { max-width: 100%; display: block; }

.site-navbar {
  position: fixed; inset: 0 0 auto 0; z-index: 1000; height: var(--nav-h);
  background: var(--po-nav);
  box-shadow: 0 1px 0 rgba(0,0,0,.18);
}
.navbar-container {
  height: 100%; max-width: none; margin: 0; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.navbar-brand {
  display: flex; align-items: center; gap: .7rem;
  color: #fff; text-decoration: none; font-weight: 600;
}
.navbar-brand img {
  width: 34px; height: 34px; object-fit: contain;
  background: #fff; border-radius: 6px; padding: 3px;
}
.nav-links { display: flex; gap: 1.1rem; align-items: center; }
.nav-links a {
  color: rgba(255,255,255,.92); text-decoration: none;
  font-weight: 600; font-size: .88rem;
}
.nav-links a:hover { color: #fff; }
.nav-links a[aria-current="page"] {
  color: #fff; box-shadow: inset 0 -2px 0 #9fd0f0; padding-bottom: 2px;
}
.nav-links a.nav-cta {
  background: var(--po-primary); color: #fff;
  border-radius: 2px; padding: 7px 12px; box-shadow: none;
}
.nav-links a.nav-cta:hover { background: #15588a; color: #fff; }
.cta-short { display: none; }
.lang-switch { display: inline-flex; align-items: center; gap: .85rem; }
.lang-switch a { color: #fff; }

.app {
  height: 100%;
  padding-top: var(--nav-h);
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
}

.toolbar {
  display: flex; flex-wrap: wrap; align-items: end; gap: 10px 12px;
  padding: 10px 14px;
  background: #f7fafc;
  border-bottom: 1px solid var(--po-border);
}
.toolbar label {
  display: grid; gap: 4px;
  font-size: .68rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: #6d7c8f;
  min-width: 0;
}
.toolbar label.grow { flex: 1 1 180px; }
.toolbar label.sel { flex: 0 1 140px; }
.toolbar input, .toolbar select {
  font: inherit; font-size: .9rem; color: var(--po-ink);
  border: 1px solid #c5d5e4; border-radius: 2px;
  padding: 8px 10px; background: #fff; width: 100%;
}
.toolbar input:focus, .toolbar select:focus {
  outline: none; border-color: var(--po-primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(29, 106, 165, .18);
}
.toolbar-actions {
  display: flex; align-items: center; gap: 10px;
  margin-left: auto; padding-bottom: 2px;
}
.results-counter {
  margin: 0; font-weight: 600; color: var(--po-blue); font-size: .9rem;
  white-space: nowrap;
}
.reset {
  background: var(--po-primary); color: #fff; border: 0;
  border-radius: 2px; padding: 8px 12px; font: inherit; font-size: .84rem;
  font-weight: 700; cursor: pointer; white-space: nowrap;
}
.reset:hover { background: #15588a; }

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 480px);
  min-height: 0;
  height: 100%;
}

.side-pane {
  display: flex; flex-direction: column;
  min-height: 0; background: #eef3f8;
}
.side-head {
  flex: none;
  padding: 16px 18px 14px;
  background: #163e66;
  border-bottom: 3px solid #1d6aa5;
}
.side-head h2 {
  margin: 0; font-size: 1.12rem; color: #fff; font-weight: 700; letter-spacing: -.01em;
}
.side-head p {
  margin: 4px 0 0; font-size: .82rem; color: rgba(255,255,255,.7);
}
.side-list {
  flex: 1; min-height: 0;
  overflow: auto;
  padding: 0;
  display: grid; gap: 0; align-content: start;
  background: #eef3f8;
}
.side-list::-webkit-scrollbar { width: 10px; }
.side-list::-webkit-scrollbar-thumb { background: #c5d5e4; }
.media-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 13px 16px 13px 14px;
  border: 0;
  border-bottom: 1px solid #d5e2ec;
  border-left: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  text-decoration: none;
  color: inherit;
}
.media-card:hover {
  background: #fff;
  border-left-color: #1d6aa5;
  box-shadow: none;
}
.media-card img {
  width: 52px; height: 52px; object-fit: contain;
  background: #fff; border-radius: 2px; padding: 4px;
  border: 1px solid #d5e2ec;
}
.media-card h3 {
  margin: 0; font-size: 1rem; color: var(--po-ink); font-weight: 700;
  line-height: 1.25;
}
.media-card .meta {
  margin: 3px 0 0; font-size: .8rem; color: #667588; line-height: 1.35;
}
.media-card .city { font-weight: 700; color: #1d6aa5; }
.media-card .site::before { content: " · "; color: #a8b8c8; font-weight: 400; }
.media-card .tags {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px;
}

.map-pane {
  position: relative;
  min-height: 0;
  background: var(--po-horizon);
  border-right: 1px solid #d5e0ea;
}
#map { height: 100%; width: 100%; overflow: hidden; }
.kosovo-svg {
  width: 100%; height: 100%; display: block;
  cursor: grab; touch-action: none;
  user-select: none; -webkit-user-select: none;
}
.kosovo-svg:active { cursor: grabbing; }
.region {
  stroke: rgba(255,255,255,.92); stroke-width: 1.6; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.muni {
  stroke: rgba(62, 54, 46, .78); stroke-width: 1.35; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.country {
  fill: none; stroke: #7d8793; stroke-width: 5.5; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.place circle { fill: #8eafc8; stroke: #fff; stroke-width: 1.5; }
.city-dot { cursor: pointer; }
.city-dot circle { fill: #1d6aa5; stroke: #fff; stroke-width: 2; }
.city-dot.is-active circle { fill: #163e66; }
.city-count {
  fill: #fff; font-size: 12px; font-weight: 700;
  text-anchor: middle; dominant-baseline: central; pointer-events: none;
}
.city-label {
  fill: #163e66; font-size: 18px; font-weight: 700;
  dominant-baseline: central; pointer-events: none;
  stroke: #e6eef5; stroke-width: 3.5px; paint-order: stroke fill;
}
.place:not(.city-dot) .city-label { fill: #3e5f86; font-weight: 600; font-size: 16px; }
.zoom-ui {
  position: absolute; right: 14px; bottom: 14px; z-index: 6;
  display: flex; flex-direction: column; background: #163e66;
  border: 0; border-radius: 2px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(22, 62, 102, .18);
}
.zoom-ui button {
  width: 34px; height: 34px; border: 0; background: #163e66; cursor: pointer;
  font-size: 18px; line-height: 1; color: #fff;
}
.zoom-ui button:hover { background: #1d6aa5; }
.zoom-ui button + button { border-top: 1px solid rgba(255,255,255,.16); }
.map-hint {
  position: absolute; left: 14px; top: 14px; z-index: 6;
  background: rgba(255,255,255,.96); color: #163e66;
  font-weight: 600; font-size: .82rem; padding: 10px 12px; border-radius: 2px;
  border: 1px solid #d5e0ea;
  box-shadow: 0 6px 18px rgba(22, 62, 102, .08);
  max-width: 240px;
}
.map-hint p { margin: 0; }

.tag {
  display: inline-block; font-size: .68rem; font-weight: 700;
  padding: 3px 7px; border-radius: 2px; letter-spacing: .01em;
}
.tag-type { background: #e7f1fb; color: #1d4e89; }
.tag-lang { background: #eef4fa; color: #3e5f86; }
.tag-reach { background: #e5f3f6; color: #1f5f73; }
.empty {
  margin: 24px 8px; text-align: center; color: #7a8794; font-size: .9rem;
}

/* The map page locks the window. A profile must scroll on its own. */
html:has(body.profile-page),
body.profile-page {
  height: auto;
  min-height: 100%;
  overflow: auto;
}
.profile-page .site-navbar { position: sticky; }
.profile-page { background: #eef3f8; }
.record { max-width: 1200px; margin: 0 auto; padding: 28px 24px 72px; }
.record-back { margin: 0; }
.record-back a { color: var(--po-blue); font-weight: 600; text-decoration: none; font-size: .9rem; }
.record-back a:hover { text-decoration: underline; }
.record-sheet {
  margin-top: 14px;
  background: #fff;
  border: 1px solid #d5e0ea;
  border-top: 4px solid #1d6aa5;
  box-shadow: 0 10px 28px rgba(22, 62, 102, .06);
}
.record-head {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 22px;
  align-items: center;
  padding: 26px 32px;
  background: #f7fafc;
  border-bottom: 1px solid #d5e2ec;
}
.record-head img {
  width: 104px; height: 104px; object-fit: contain;
  background: #fff; border: 1px solid #d5e2ec; padding: 10px;
}
.record-head h1 {
  margin: 0; color: var(--po-ink);
  font-size: 1.85rem; line-height: 1.15; font-weight: 700;
}
.record-web {
  display: inline-block; margin-top: 6px;
  font-size: 1rem; font-weight: 600; color: var(--po-primary);
  text-decoration: none; word-break: break-all;
}
.record-web:hover { text-decoration: underline; }
.socials { display: flex; gap: 5px; margin-top: 7px; }
.social {
  width: 22px; height: 22px; border-radius: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e7f1fb; color: #1d6aa5;
}
.social svg { width: 12px; height: 12px; display: block; }
.record-head .socials { margin-top: 8px; }
.record-head .social { width: 28px; height: 28px; }
.record-head .social svg { width: 14px; height: 14px; }
.record-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.record-about { border-bottom: 1px solid #d5e2ec; }
.record-about p {
  margin: 8px 0 18px;
  max-width: 78ch;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--po-ink);
}
.record-about p.is-placeholder {
  margin-top: 10px;
  padding: 12px 14px;
  background: #f7fafc;
  border-left: 3px solid #c5d5e4;
  color: #5d6c7c;
}
.record-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.record-pair .record-block + .record-block {
  border-top: 0;
  border-left: 1px solid #d5e2ec;
}
.record-pair + .record-block { border-top: 1px solid #d5e2ec; }
.record-block { padding: 8px 32px 12px; }
.record-block + .record-block { border-top: 1px solid #d5e2ec; }
.record-block h2 {
  margin: 18px 0 4px;
  font-size: .74rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--po-primary);
}
.record-block h2::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 8px;
  background: #1d6aa5;
  vertical-align: 1px;
}
.record-block dl { margin: 0; }
.record-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 48px;
}
.record-row {
  display: grid;
  grid-template-columns: 158px minmax(0, 1fr);
  gap: 12px 16px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid #e6eef5;
}
.record-block .record-row:last-child { border-bottom: 0; }
.record-cols .record-row:nth-last-child(-n+2) { border-bottom: 0; }
.record-row dt { margin: 0; font-size: .9rem; font-weight: 600; color: #667588; }
.record-row dd { margin: 0; font-size: 1.02rem; color: var(--po-ink); overflow-wrap: anywhere; }
.record-row a { color: var(--po-blue); font-weight: 600; text-decoration: none; }
.record-row a:hover { text-decoration: underline; }
.record-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  padding: 18px 32px 22px;
  border-top: 1px solid #d5e2ec;
  background: #f7fafc;
}
.record-source { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6d7c8f; }
.record-note { margin: 6px 0 0; max-width: 62ch; font-size: .9rem; color: #6d7b8c; line-height: 1.5; }
.record-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.record-actions a {
  display: inline-block; padding: 9px 14px;
  font-weight: 700; text-decoration: none; font-size: .9rem;
  border: 0; border-radius: 2px;
}
.record-actions .back { color: #fff; background: #163e66; }
.record-actions .back:hover { background: #0f2c4c; }

@media (max-width: 980px) {
  html, body { overflow-x: hidden; overflow-y: auto; height: auto; }
  .app { height: auto; min-height: 100vh; }
  .toolbar label.grow,
  .toolbar label.sel { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .toolbar label.grow { flex-basis: 100%; }
  .toolbar input, .toolbar select { min-width: 0; }
  .toolbar-actions { flex: 1 0 100%; width: auto; max-width: 100%; margin-left: 0; justify-content: space-between; }
  .app, .stage, .map-pane, #map { min-width: 0; max-width: 100%; }
  .stage {
    grid-template-columns: 1fr;
    grid-template-rows: 46vh minmax(280px, auto);
    height: auto;
  }
  .map-pane { border-right: 0; border-bottom: 1px solid #d5e0ea; min-height: 46vh; height: 46vh; }
  .side-pane { max-height: none; }
  .side-list { max-height: none; }
  .map-hint { max-width: min(240px, calc(100% - 70px)); }
}
@media (max-width: 800px) {
  .record { padding: 16px 12px 48px; }
  .record-head { grid-template-columns: 72px 1fr; gap: 14px; padding: 16px; }
  .record-head img { width: 72px; height: 72px; }
  .record-head h1 { font-size: 1.35rem; }
  .record-about p { overflow-wrap: anywhere; }
  .record-pair, .record-cols { grid-template-columns: 1fr; }
  .record-pair .record-block + .record-block { border-left: 0; border-top: 1px solid #d5e2ec; }
  .record-block, .record-foot { padding-left: 16px; padding-right: 16px; }
  .record-foot { flex-direction: column; align-items: flex-start; }
  .record-row { grid-template-columns: 1fr; gap: 2px; }
  .record-cols .record-row:nth-last-child(-n+2) { border-bottom: 1px solid #e6eef5; }
  .record-cols .record-row:last-child { border-bottom: 0; }
}
@media (max-width: 700px) {
  .navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    height: 100%;
    padding: 0 12px;
  }
  .navbar-brand span, .nav-home { display: none; }
  .navbar-brand { flex: none; }
  .nav-links {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: .45rem;
  }
  .lang-switch { gap: .35rem; margin: 0; flex: none; }
  .nav-links a { font-size: .75rem; white-space: nowrap; }
  .cta-long { display: none !important; }
  .cta-short { display: inline !important; }
  .nav-links a.nav-cta { padding: 5px 8px; flex: none; }
  .zoom-ui button { width: 44px; height: 44px; font-size: 22px; }
}
