/* S&B United Nations — shared stylesheet
   Palette: white (primary), UN blue (secondary), yellow / red / gold (tertiary)
   Treatment: formal / governmental — square edges, hard rules, no soft shadows */

:root {
  --paper: #ffffff;
  --paper-raised: #ffffff;
  --mist: #eef1f5;
  --ink: #10182a;
  --ink-soft: #4b5566;
  --un-blue: #1b4c8c;
  --un-blue-deep: #0b2138;
  --un-blue-bright: #2f6fb0;
  --gold: #9c7519;
  --gold-soft: #d9b64f;
  --yellow: #f2b705;
  --red: #a4232b;
  --line: #d7dbe0;
  --line-strong: #aab1bc;
  --focus: #2f6fb0;

  --font-display: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }

body {
  margin: 0;
  background: linear-gradient(165deg, #ffffff 0%, #eef2f8 48%, #e2eaf3 100%) fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
figure { margin: 0; }

.watermark {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--paper);
}
.watermark video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.5);
}
.watermark .watermark-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.86) 0%, rgba(238, 242, 248, 0.8) 48%, rgba(226, 234, 243, 0.84) 100%);
}
/* anchored to the bottom of the viewport; JS drives --wm-scale / --wm-opacity
   as the visitor scrolls — big and centered at the top of the page, shrinking
   down toward a small, quiet bottom watermark as they scroll further in. */
.watermark img {
  position: absolute;
  bottom: -4%;
  left: 50%;
  width: clamp(380px, 52vw, 720px);
  transform: translate(-50%, 0) scale(var(--wm-scale, 1));
  transform-origin: bottom center;
  opacity: var(--wm-opacity, 0.4);
  filter: drop-shadow(0 18px 40px rgba(11, 33, 56, 0.35));
}
@media (prefers-reduced-motion: no-preference) {
  .watermark img {
    transition: transform 0.2s ease-out, opacity 0.25s ease-out;
  }
  /* hovering the header seal brings the background emblem forward */
  body:has(.brand:hover) .watermark img { opacity: 0.68; }
  .brand svg { transition: transform 0.25s ease; }
  .brand:hover svg { transform: scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  body:has(.brand:hover) .watermark img { opacity: 0.68; }
}
a { color: var(--un-blue); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  text-wrap: balance;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--un-blue);
  margin: 0 0 12px;
}
.lede {
  font-size: 1.06rem;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 16px 0 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 12px;
  margin-bottom: 28px;
}
.section-head h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem); }
.section-head .see-all { font-size: 0.82rem; font-weight: 700; white-space: nowrap; }

section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--yellow); color: #1c1500;
  padding: 10px 16px; font-weight: 700; z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- identity bar ---------- */
.identity-bar {
  background: var(--ink);
  color: #d7deea;
  border-bottom: 3px solid var(--gold-soft);
}
.identity-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  font-size: 0.76rem;
}
.identity-bar .service-tag {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: #ffffff;
}
.identity-bar .service-tag span { color: var(--gold-soft); }
.identity-links { display: flex; align-items: center; gap: 20px; list-style: none; margin: 0; padding: 0; }
.identity-links a { color: #c3ccdc; text-decoration: none; font-weight: 500; }
.identity-links a:hover { color: #fff; text-decoration: underline; }
.identity-links .login-btn {
  background: var(--gold-soft); color: #2b2205; text-decoration: none;
  font-weight: 700; padding: 5px 14px; border-radius: 999px; font-size: 0.72rem;
}
.identity-links .login-btn:hover { background: var(--yellow); text-decoration: none; }

/* ---------- header ---------- */
header.masthead {
  background: var(--paper-raised);
  border-bottom: 4px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 100;
}
.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.brand-name { font-family: var(--font-display); line-height: 1.15; }
.brand-name strong { display: block; font-size: 1.18rem; font-weight: 700; letter-spacing: -0.01em; }
.brand-name span { display: block; font-family: var(--font-body); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin-top: 3px; }

nav.primary-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; align-items: center; }
nav.primary-nav a {
  display: inline-block;
  padding: 9px 16px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 3px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
nav.primary-nav a:hover { color: var(--ink); border-bottom-color: var(--un-blue); }
nav.primary-nav a.current { color: var(--un-blue); border-bottom-color: var(--un-blue); }

.nav-toggle {
  display: none;
  background: var(--paper-raised);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 9px 14px;
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  nav.primary-nav { display: none; width: 100%; border-top: 1px solid var(--line); }
  nav.primary-nav.open { display: block; }
  nav.primary-nav ul { flex-direction: column; align-items: stretch; padding: 8px 0; }
  nav.primary-nav a { padding: 13px 4px; border-bottom: 0; border-left: 3px solid transparent; }
  nav.primary-nav a.current { border-left-color: var(--un-blue); border-bottom-color: transparent; }
}

/* ---------- breadcrumb ---------- */
.breadcrumb { background: var(--mist); border-bottom: 1px solid var(--line); }
.breadcrumb ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0;
  margin: 0; padding: 10px 0; font-size: 0.8rem;
}
.breadcrumb li { display: flex; align-items: center; color: var(--ink-soft); }
.breadcrumb li:not(:last-child)::after { content: "\203A"; margin: 0 8px; color: var(--line-strong); }
.breadcrumb a { color: var(--un-blue); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb li[aria-current] { font-weight: 600; color: var(--ink); }

/* ---------- notice banner ---------- */
.notice {
  border-left: 5px solid var(--un-blue);
  background: rgba(238, 241, 245, 0.7);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  padding: 18px 22px;
  margin-top: 32px;
  max-width: 70ch;
}
.notice .notice-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--un-blue);
  margin-bottom: 8px;
}
.notice p { margin: 0; font-size: 0.94rem; color: var(--ink); }
.notice.notice-gold { border-left-color: var(--gold); }
.notice.notice-gold .notice-label { color: var(--gold); }

.notice-label.is-live { color: var(--red); }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(164, 35, 43, 0.5);
}
@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: liveDotPulse 1.8s ease-out infinite; }
}
@keyframes liveDotPulse {
  0% { box-shadow: 0 0 0 0 rgba(164, 35, 43, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(164, 35, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(164, 35, 43, 0); }
}

/* ---------- photo slots (user-replaceable images) ---------- */
.photo-slot {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--mist);
}
.photo-slot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(.2,.7,.2,1); }
.photo-fallback {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border: 1.5px dashed var(--line-strong);
  color: var(--ink-soft);
  text-align: center;
  padding: 20px;
}
.photo-fallback svg { width: 28px; height: 28px; opacity: 0.5; }
.photo-fallback strong { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); }
.photo-fallback code {
  font-size: 0.7rem;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  padding: 2px 7px;
  color: var(--ink-soft);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px;
  font-weight: 700; font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-gold { background: var(--gold-soft); color: #2b2205; border-color: var(--gold-soft); }
.btn-gold:hover { background: var(--yellow); border-color: var(--yellow); box-shadow: 0 4px 0 var(--gold); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; box-shadow: 0 4px 0 var(--line-strong); }

@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
}

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- hero (per page) ---------- */
.page-hero { padding: 56px 0 64px; }
.page-hero h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem); line-height: 1.12; }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin: 44px 0 0;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}
.hero-stats .stat {
  flex: 1 1 150px;
  padding: 22px 20px 24px;
  background: var(--paper-raised);
  border-top: 4px solid var(--un-blue);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-stats .stat:nth-child(2) { border-top-color: var(--gold); }
.hero-stats .stat:nth-child(3) { border-top-color: var(--red); }
.hero-stats .stat:nth-child(4) { border-top-color: var(--yellow); }
.hero-stats .stat:hover {
  background-color: var(--mist);
  transform: translateY(-3px);
  box-shadow: 0 10px 22px -12px rgba(16, 24, 42, 0.35);
}
.hero-stats .label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero-stats .num {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 1.6rem + 1.8vw, 3.1rem);
  color: var(--un-blue);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.01em;
}
.hero-stats .stat:nth-child(2) .num { color: var(--gold); }
.hero-stats .stat:nth-child(3) .num { color: var(--red); }
.hero-stats .stat:nth-child(4) .num { color: #7a5b00; }
@media (max-width: 620px) {
  .hero-stats .stat { flex: 1 1 42%; }
}

/* ---------- shortcut / index cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}
@media (max-width: 860px) { .card-grid { grid-template-columns: 1fr; } }

.shortcut-card {
  text-decoration: none; color: inherit; display: block; background: var(--paper-raised); padding: 24px;
  transition: box-shadow 0.2s ease;
}
.shortcut-card:hover { box-shadow: inset 0 0 0 1px var(--un-blue); }
.shortcut-card .photo-slot { aspect-ratio: 4/3; margin-bottom: 18px; border: none; }
.shortcut-card:hover .photo-slot img { transform: scale(1.06); }
.shortcut-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.shortcut-card p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }
.shortcut-card .go {
  display: inline-block; margin-top: 12px; font-size: 0.76rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--un-blue);
  transition: letter-spacing 0.2s ease;
}
.shortcut-card:hover .go { text-decoration: underline; letter-spacing: 0.09em; }

/* ---------- organs (Security Council / General Assembly / Secretariat / Group Management) ---------- */
.organ-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}
@media (max-width: 780px) { .organ-grid { grid-template-columns: 1fr; } }

.organ-block {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-raised);
  border-top: 4px solid var(--un-blue);
}
.organ-block--gold { border-top-color: var(--gold); }
.organ-block--red { border-top-color: var(--red); }
.organ-block--yellow { border-top-color: var(--yellow); }

.organ-block .photo-slot {
  position: absolute;
  inset: 0;
  border: none;
}
/* dimmed by default; hovering the block brings the photo to full opacity */
.organ-block .photo-slot img { opacity: 0.4; }
.organ-block:hover .photo-slot img { opacity: 1; transform: scale(1.04); }
@media (prefers-reduced-motion: no-preference) {
  .organ-block .photo-slot img { transition: opacity 0.4s ease, transform 0.5s ease; }
}

.organ-scrim {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px;
  background: linear-gradient(0deg, rgba(16, 24, 42, 0.88) 0%, rgba(16, 24, 42, 0.35) 65%, rgba(16, 24, 42, 0) 100%);
}
.organ-scrim .eyebrow { color: var(--gold-soft); margin-bottom: 6px; }
.organ-scrim h2 { color: #fff; font-size: 1.3rem; }
.organ-meta { margin: 8px 0 0; font-size: 0.8rem; color: #d7deea; }
.organ-meta.is-placeholder { font-style: italic; color: #aab4c6; }

/* ---------- resolution filters ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px;
  padding: 20px;
  margin-bottom: 8px;
  background: var(--mist);
  border: 1px solid var(--line-strong);
}
.filter-field { display: flex; flex-direction: column; gap: 6px; }
.filter-field label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
}
.filter-field select {
  background: var(--paper-raised);
  border: 1px solid var(--ink);
  padding: 9px 10px;
  font-size: 0.84rem;
  font-family: var(--font-body);
  color: var(--ink);
  min-width: 168px;
}
.filter-reset { margin-left: auto; align-self: flex-end; }
.filter-count { margin: 16px 0 24px; font-size: 0.82rem; color: var(--ink-soft); }

/* ---------- resolutions ---------- */
.res-list { list-style: none; margin: 0; padding: 0; max-width: 72ch; }
.res-item { padding: 24px 0 24px 20px; border-bottom: 1px solid var(--line); border-left: 3px solid var(--line-strong); transition: background-color 0.2s ease; }
.res-item:hover { background-color: var(--mist); }
.res-item:first-child { padding-top: 4px; }
.res-item.is-passed { border-left-color: var(--un-blue); }
.res-item.is-pending { border-left-color: var(--yellow); }
.res-item.is-archived { border-left-color: var(--line-strong); }
.res-item.is-doc { border-left-color: var(--yellow); }
.res-item time { font-size: 0.76rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; text-transform: uppercase; letter-spacing: 0.04em; }
.res-item h3 { font-size: 1.08rem; margin: 6px 0 8px; font-weight: 700; }
.res-item h3 a { color: var(--ink); text-decoration: none; }
.res-item h3 a:hover { color: var(--un-blue); text-decoration: underline; }
.res-item p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.res-meta {
  display: flex; flex-wrap: wrap; gap: 4px 18px;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.res-meta strong { color: var(--ink); font-weight: 600; }
.status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 4px 9px; margin-top: 10px;
  border: 1px solid currentColor;
}
.status.passed { color: var(--un-blue); }
.status.pending { color: #7a5b00; }
.status.archived { color: var(--ink-soft); }

/* ---------- member states grid ---------- */
.state-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}
@media (max-width: 900px) { .state-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .state-grid { grid-template-columns: repeat(2, 1fr); } }
.state-card { background: var(--paper-raised); padding: 14px; margin: 0; transition: box-shadow 0.2s ease; }
.state-card:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.state-card .photo-slot { aspect-ratio: 1; border: none; }
.state-card:hover .photo-slot img { transform: scale(1.07); }
.state-card figcaption {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 12px; font-size: 0.84rem;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.state-card .code { font-weight: 800; letter-spacing: 0.04em; }
.state-card .name { color: var(--ink-soft); font-size: 0.78rem; }
.state-note { margin-top: 32px; color: var(--ink-soft); font-size: 0.88rem; }

/* ---------- view toggle (List / Map) ---------- */
.view-toggle {
  display: inline-flex;
  border: 1px solid var(--ink);
  margin-bottom: 32px;
}
.view-toggle button {
  background: var(--paper-raised);
  border: 0;
  border-right: 1px solid var(--ink);
  padding: 10px 26px;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  cursor: pointer;
}
.view-toggle button:last-child { border-right: 0; }
.view-toggle button:hover { background: var(--mist); color: var(--ink); }
.view-toggle button[aria-selected="true"] { background: var(--ink); color: #fff; }
.view-toggle button[aria-selected="true"]:hover { background: var(--ink); }

.view-panel { display: none; }
.view-panel.active { display: block; }

/* ---------- interactive map (Member States) ---------- */
.map-view {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}
@media (max-width: 860px) { .map-view { grid-template-columns: 1fr; } }

.map-viewport {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: var(--paper-raised);
  cursor: grab;
  touch-action: none;
}
.map-viewport.is-dragging { cursor: grabbing; }

.map-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 2000px;
  height: 1001px;
  background-color: #dbe6f0;
  transform-origin: 0 0;
  will-change: transform;
}
.map-world { display: block; width: 100%; height: 100%; }
.map-world .country {
  fill: var(--line-strong);
  stroke: #dbe6f0;
  stroke-width: 1.2;
}

/* the 6 country shapes standing in for our fictional member states —
   clickable/focusable, colored by category, highlighted on hover/focus/pin */
.map-world .country.nation {
  cursor: pointer;
  outline: none;
  stroke: #dbe6f0;
  stroke-width: 1.2;
}
.map-world .country.nation.cat-obs { fill: var(--ink-soft); }
.map-world .country.nation.cat-ga { fill: var(--un-blue); }
.map-world .country.nation.cat-sc { fill: var(--red); }
.map-world .country.nation.cat-p5 { fill: var(--gold); }
.map-world .country.nation:hover,
.map-world .country.nation:focus-visible,
.map-world .country.nation.is-active {
  stroke: var(--ink);
  stroke-width: 2.5;
  filter: brightness(1.3) saturate(1.15);
}
@media (prefers-reduced-motion: no-preference) {
  .map-world .country.nation { transition: stroke 0.15s ease, filter 0.15s ease; }
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 16px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.map-legend .legend-item { display: inline-flex; align-items: center; gap: 7px; }
.map-legend .swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1px solid var(--ink);
  flex-shrink: 0;
}
.map-legend .swatch.cat-obs { background: var(--ink-soft); }
.map-legend .swatch.cat-ga { background: var(--un-blue); }
.map-legend .swatch.cat-sc { background: var(--red); }
.map-legend .swatch.cat-p5 { background: var(--gold); }

.map-detail .category-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border: 1px solid currentColor;
  margin-top: 4px;
}
.category-tag.cat-obs { color: var(--ink-soft); }
.category-tag.cat-ga { color: var(--un-blue); }
.category-tag.cat-sc { color: var(--red); }
.category-tag.cat-p5 { color: var(--gold); }

.map-controls {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
}
.map-controls button {
  width: 34px;
  height: 34px;
  background: var(--paper-raised);
  border: 1px solid var(--ink);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.map-controls button:hover { background: var(--ink); color: #fff; }

.map-hint {
  position: absolute;
  left: 14px;
  top: 14px;
  margin: 0;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line-strong);
  padding: 6px 10px;
  font-size: 0.7rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 5;
  pointer-events: none;
}

.map-detail { background: var(--paper-raised); padding: 22px; }
.map-detail h3 { font-size: 1.15rem; margin-bottom: 16px; }
.map-detail .detail-row { font-size: 0.86rem; margin-bottom: 16px; }
.map-detail .detail-row .k {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.map-detail .rep-list { display: grid; gap: 12px; margin-top: 8px; }
.map-detail .rep { display: flex; gap: 10px; align-items: center; }
.map-detail .rep .photo-slot { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; overflow: hidden; }
.map-detail .rep .photo-fallback { padding: 0; }
.map-detail .rep .photo-fallback code { font-size: 0.5rem; border: 0; background: none; padding: 0; }
.map-detail .rep .rep-name { display: block; font-size: 0.84rem; font-weight: 700; }
.map-detail .rep .rep-role { display: block; font-size: 0.74rem; color: var(--ink-soft); }
.map-detail .empty-state { color: var(--ink-soft); font-size: 0.88rem; margin: 0; }
.map-detail .is-placeholder { font-style: italic; color: var(--ink-soft); }
.map-detail .detail-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 0; }
.btn-small { padding: 8px 14px; font-size: 0.68rem; }

/* ---------- footer ---------- */
footer { background: var(--ink); color: #c9cfdc; border-top: 4px solid var(--gold-soft); }
footer .wrap { padding: 52px 28px 28px; }
.footer-seal { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-logo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.footer-seal strong { font-family: var(--font-display); font-size: 1.15rem; color: #fff; font-weight: 700; }
.footer-seal span { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: #8b95ab; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 14px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,0.15); padding-bottom: 10px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-grid a { color: #c9cfdc; text-decoration: none; font-size: 0.86rem; }
.footer-grid a:hover { color: #fff; text-decoration: underline; }
.footer-brand p { font-size: 0.84rem; max-width: 32ch; color: #8b95ab; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.74rem; color: #78829a;
}
