/* ============================================================
   Nordmål — an atlas of how the North speaks
   Design tokens: strict 4/8px spacing rhythm, one modular
   type scale, ink field + paper appendix, four hot accents.
   Layout: game-first 100dvh stage, paper long-form below.
   ============================================================ */

:root {
  --ink: #0b1717;
  --ink-2: #14302d;
  --ink-3: #091514;
  --paper: #f2efe4;
  --paper-dim: rgba(242, 239, 228, 0.72);
  --lime: #d7ff43;
  --cyan: #62d6c9;
  --coral: #ff6b4a;
  --yellow: #ffcf33;
  --moss: #46615d;
  --hair-ink: rgba(11, 23, 23, 0.18);
  --hair-paper: rgba(242, 239, 228, 0.22);

  /* spacing scale — multiples of 4 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  /* type scale */
  --fs-2xs: 0.625rem;   /* 10 — kickers, notes */
  --fs-xs: 0.6875rem;   /* 11 — buttons, meta */
  --fs-sm: 0.8125rem;   /* 13 — pills, captions */
  --fs-md: 0.9375rem;   /* 15 — secondary serif */
  --fs-body: 1.0625rem; /* 17 — serif body */
  --fs-lg: 1.375rem;    /* 22 — entry names */
  --fs-xl: 1.75rem;     /* 28 — country titles */
  --fs-2xl: clamp(2rem, 4.5vw, 3.5rem);      /* section display */
  --fs-card: clamp(2rem, 3vw, 2.75rem);      /* card display */
  --fs-hero: clamp(2rem, 5vw, 3.75rem);      /* WHERE FROM? */

  --font-display: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;

  --topbar-h: 72px;
  --banner-h: 84px; /* mobile sponsor strip */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.paper :focus-visible,
.topbar :focus-visible,
.game-card :focus-visible {
  outline-color: var(--ink);
}

#card-body:focus-visible,
#card-body:focus {
  outline: none;
}

/* ============================================================
   Topbar
   ============================================================ */

.topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--topbar-h);
  padding: 0 var(--sp-6);
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--hair-ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  justify-self: start;
  font-size: var(--fs-lg);
  font-weight: 900;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: var(--fs-body);
}

.top-copy {
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: 0.25em;
  line-height: 1.4;
  text-align: center;
}

.about {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  justify-self: end;
  font-size: var(--fs-xs);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.about span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: var(--fs-sm);
  transition: background 0.2s, color 0.2s;
}

.about:hover span,
.about:active span {
  background: var(--ink);
  color: var(--paper);
}

.about:active {
  transform: translateY(1px);
}

/* ============================================================
   Map shell — full-viewport game stage
   ============================================================ */

.map-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--topbar-h));
  height: calc(100dvh - var(--topbar-h));
  min-height: 560px;
  overflow: hidden;
  /* bottom padding reserves the pinned sponsor-card band (now 36vw wide)
     so the Denmark cluster stays clear of it */
  padding: var(--sp-4) clamp(var(--sp-4), 4vw, var(--sp-8)) calc(var(--sp-9) + var(--sp-6));
  background: radial-gradient(circle at 58% 42%, #173735 0%, #0b1717 56%, #071010 100%);
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
}

.map-head {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  max-width: 720px;
  margin: 0 auto var(--sp-4);
  text-align: center;
}

.map-kicker {
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--paper-dim);
}

.map-display {
  margin-top: var(--sp-1);
  font-size: var(--fs-hero);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.map-tagline {
  max-width: 480px;
  margin: var(--sp-2) auto 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--paper-dim);
}

/* ---- stage grid: card first in DOM (keyboard), map first visually ---- */

.stage {
  position: relative;
  z-index: 3;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 384px;
  gap: clamp(var(--sp-5), 3vw, var(--sp-8));
  align-items: center;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.map-wrap {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.map-wrap.zoomed {
  touch-action: none;
}

.game-card {
  grid-column: 2;
  grid-row: 1;
}

.map-wrap svg {
  /* width driven by viewport height so the whole game fits one screen;
     the tightened viewBox (0 161 850 544) frames just the used band and
     overflow:hidden keeps zoomed content inside the map frame */
  width: min(100%, calc((100vh - 372px) * 1.55));
  width: min(100%, calc((100dvh - 372px) * 1.55));
  height: auto;
  overflow: hidden;
}

.map-view {
  transform-origin: 0 0;
}

.map-view.anim {
  transition: transform 0.25s ease;
}

/* ---- countries (real Natural-Earth coastlines) ---- */

.country {
  fill: var(--ink-2);
  stroke: #7ea29a;
  stroke-opacity: 0.5;
  stroke-width: 1.2px;
  vector-effect: non-scaling-stroke;
  transition: fill 0.35s, stroke 0.35s;
}

.country.active {
  fill: #25534e;
  stroke: var(--lime);
  stroke-opacity: 1;
}

/* ---- zoom controls ---- */

.zoom-controls {
  position: absolute;
  right: var(--sp-3);
  bottom: var(--sp-3);
  z-index: 6;
  display: grid;
  gap: var(--sp-2);
}

.zoom-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--ink-2);
  color: var(--paper);
  border: 1px solid rgba(242, 239, 228, 0.4);
  border-radius: 4px;
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1;
  transition: background 0.2s, border-color 0.2s;
}

.zoom-btn:hover:not([disabled]) {
  background: #1d423e;
  border-color: rgba(242, 239, 228, 0.7);
}

.zoom-btn:active:not([disabled]) {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--lime);
}

.zoom-btn[disabled] {
  opacity: 0.35;
  cursor: default;
}

/* ---- markers ---- */

.marker {
  cursor: pointer;
  outline: none;
}

/* all marker circle geometry counter-scales via --inv-k (like the labels):
   at zoom the dots keep constant screen size while their spacing grows,
   so dense clusters genuinely separate */

.marker .hit {
  r: max(calc(17px * var(--inv-k, 1)), 9px);
  fill: transparent;
  stroke: none;
  pointer-events: all;
}

.marker .dot {
  r: calc(8px * var(--inv-k, 1));
  stroke: var(--ink-3);
  stroke-width: calc(5px * var(--inv-k, 1));
  transition: r 0.2s, stroke 0.2s;
}

.marker .pulse {
  r: calc(25px * var(--inv-k, 1));
  opacity: 0;
}

.marker text {
  font-family: var(--font-display);
  /* counter-scaled by --inv-k so labels keep constant screen size while
     zoom separates the dots — overlap resolves as you zoom in */
  font-size: calc(13px * var(--inv-k, 1));
  font-weight: 900;
  fill: var(--paper);
  paint-order: stroke;
  stroke: var(--ink);
  stroke-width: calc(4px * var(--inv-k, 1));
  stroke-linejoin: round;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.marker:hover .dot,
.marker:focus-visible .dot {
  r: calc(11px * var(--inv-k, 1));
}

.marker:active .dot {
  r: calc(9px * var(--inv-k, 1));
}

.marker:focus-visible .dot {
  stroke: var(--lime);
}

.marker:hover text,
.marker:focus-visible text,
.marker.selected text {
  opacity: 1;
}

.marker.selected .pulse {
  animation: pulse 1.8s infinite;
}

.marker.answer-correct .dot {
  stroke: var(--lime);
  stroke-width: calc(7px * var(--inv-k, 1));
}

.marker.answer-correct .pulse {
  animation: pulse 1.2s infinite;
  fill: var(--lime) !important;
}

.marker.answer-wrong .dot {
  stroke: var(--paper);
  fill: var(--coral) !important;
}

/* reveal shows only the answer's label — the wrong dot flashes coral and
   the result card names the player's pick, so no second label is needed
   (two labels collide in the dense clusters: Copenhagen/Zealand etc.) */
.marker.answer-correct text {
  opacity: 1;
}

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

/* game mode: labels stay hidden so names never leak the answer */

.game-active .marker text {
  opacity: 0;
}

.game-active .marker:hover .dot,
.game-active .marker:focus-visible .dot {
  r: calc(12px * var(--inv-k, 1));
  stroke: var(--lime);
}

.game-active .marker.answer-correct text {
  opacity: 1;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: var(--sp-3);
  z-index: 5;
  transform: translateX(-50%);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: 0.25em;
  color: var(--paper-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.scroll-cue:hover {
  color: var(--lime);
}

/* ============================================================
   Game card
   ============================================================ */

.game-card {
  --accent: var(--coral);
  position: relative;
  max-height: 100%;
  overflow-y: auto;
  padding: var(--sp-5);
  background: var(--paper);
  color: var(--ink);
  border-top: 6px solid var(--accent);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  transition: background 0.3s;
}

.game-card.winner {
  background: var(--lime);
  animation: winner-pop 0.48s cubic-bezier(0.2, 0.9, 0.25, 1.2);
}

.sheet-toggle {
  display: none;
}

.winner-seal {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: var(--fs-lg);
  font-weight: 900;
  transform: rotate(-8deg);
}

@keyframes winner-pop {
  0% { opacity: 0; transform: scale(0.9) rotate(-1.5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

.game-kicker {
  font-size: var(--fs-2xs);
  font-weight: 900;
  letter-spacing: 0.22em;
  color: rgba(11, 23, 23, 0.64);
}

.card-display {
  margin: var(--sp-3) 0;
  font-size: var(--fs-card);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.88;
}

.card-display em {
  font-family: var(--font-serif);
  font-weight: 400;
}

.card-lead {
  margin: 0 0 var(--sp-4);
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  line-height: 1.55;
}

.card-miss {
  margin-top: var(--sp-3);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-md);
  color: var(--moss);
}

.card-name {
  margin-top: var(--sp-3);
  font-size: var(--fs-card);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.88;
  overflow-wrap: break-word;
}

.card-eng {
  margin-top: var(--sp-2);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-body);
  color: var(--moss);
}

.card-where {
  margin-top: var(--sp-3);
  font-size: var(--fs-2xs);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.card-desc {
  margin: var(--sp-3) 0;
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  line-height: 1.55;
}

/* traits — shared between card and directory */

.traits {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  list-style: none;
}

.traits li,
.traits span {
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid rgba(11, 23, 23, 0.3);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: var(--fs-2xs);
  font-weight: 800;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* sample row */

.sample-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin: var(--sp-4) calc(-1 * var(--sp-5)) 0;
  padding: var(--sp-3) var(--sp-5);
  border-top: 1px solid var(--hair-ink);
  border-bottom: 1px solid var(--hair-ink);
}

.sample-row small {
  display: block;
  margin-bottom: var(--sp-1);
  font-size: var(--fs-2xs);
  font-weight: 900;
  letter-spacing: 0.18em;
  color: rgba(11, 23, 23, 0.64);
}

.sample-row strong {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: var(--fs-body);
}

.play {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font-size: var(--fs-sm);
  transition: transform 0.15s;
}

.play:hover {
  transform: scale(1.08);
}

.play:active {
  transform: scale(0.96);
}

/* listen button */

.listen-button {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  width: 100%;
  min-height: 72px;
  padding: var(--sp-3) var(--sp-4);
  background: var(--ink);
  color: var(--paper);
  text-align: left;
  transition: background 0.2s;
}

.listen-button:hover {
  background: #12302c;
}

.listen-ring {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font-size: var(--fs-md);
  transition: transform 0.15s;
}

.listen-button:active .listen-ring {
  transform: scale(0.94);
}

.listen-copy small {
  display: block;
  margin-bottom: var(--sp-1);
  font-size: var(--fs-2xs);
  font-weight: 900;
  letter-spacing: 0.18em;
  color: rgba(242, 239, 228, 0.6);
}

.listen-copy strong {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: var(--fs-body);
}

.listen-button.speaking .listen-ring,
.play.speaking {
  animation: audio-ring 1s ease-in-out infinite alternate;
}

@keyframes audio-ring {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 65%, transparent); }
  100% { box-shadow: 0 0 0 10px transparent; }
}

.game-instruction {
  padding: var(--sp-2) 0 0;
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: center;
  color: rgba(11, 23, 23, 0.64);
}

/* score + actions */

.score-chip {
  display: inline-block;
  margin-top: var(--sp-3);
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: var(--fs-2xs);
  font-weight: 900;
  letter-spacing: 0.14em;
}

.card-actions {
  display: grid;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--sp-4);
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 900;
  letter-spacing: 0.14em;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}

.btn-primary:hover {
  background: transparent;
  color: var(--ink);
}

.btn-primary:active {
  background: transparent;
  color: var(--ink);
  transform: translateY(1px);
}

.skip-game {
  width: 100%;
  margin-top: var(--sp-2);
  padding: var(--sp-2);
  font-size: var(--fs-2xs);
  font-weight: 900;
  letter-spacing: 0.14em;
  color: rgba(11, 23, 23, 0.6);
  transition: color 0.2s;
}

.skip-game:hover,
.skip-game:active {
  color: var(--ink);
}

.card-actions .skip-game {
  margin-top: 0;
}

.audio-status {
  min-height: 20px;
  margin-top: var(--sp-3);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(11, 23, 23, 0.6);
}

.noscript-note {
  margin-top: var(--sp-4);
  padding: var(--sp-3);
  border: 1px solid var(--hair-ink);
  font-family: var(--font-serif);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

/* confetti */

.celebration {
  position: absolute;
  inset: 0;
  z-index: 11;
  overflow: hidden;
  pointer-events: none;
}

.celebration i {
  position: absolute;
  top: 48%;
  left: 50%;
  width: 10px;
  height: 24px;
  background: var(--lime);
  animation: confetti-burst 1.3s ease-out both;
}

.celebration i:nth-child(3n) { background: var(--coral); border-radius: 50%; }
.celebration i:nth-child(3n + 1) { background: var(--cyan); }
.celebration i:nth-child(4n) { background: var(--yellow); }
.celebration i:nth-child(1) { --x: -44vw; --y: -30vh; --r: 130deg; }
.celebration i:nth-child(2) { --x: -34vw; --y: -18vh; --r: 240deg; }
.celebration i:nth-child(3) { --x: -24vw; --y: 28vh; --r: 80deg; }
.celebration i:nth-child(4) { --x: -14vw; --y: -34vh; --r: 310deg; }
.celebration i:nth-child(5) { --x: -5vw; --y: 32vh; --r: 170deg; }
.celebration i:nth-child(6) { --x: 8vw; --y: -32vh; --r: 260deg; }
.celebration i:nth-child(7) { --x: 16vw; --y: 28vh; --r: 60deg; }
.celebration i:nth-child(8) { --x: 27vw; --y: -26vh; --r: 200deg; }
.celebration i:nth-child(9) { --x: 38vw; --y: 20vh; --r: 120deg; }
.celebration i:nth-child(10) { --x: 45vw; --y: -16vh; --r: 330deg; }
.celebration i:nth-child(11) { --x: -42vw; --y: 10vh; --r: 190deg; }
.celebration i:nth-child(12) { --x: 40vw; --y: 32vh; --r: 270deg; }
.celebration i:nth-child(13) { --x: -28vw; --y: -36vh; --r: 90deg; }
.celebration i:nth-child(14) { --x: 24vw; --y: 36vh; --r: 220deg; }
.celebration i:nth-child(15) { --x: -10vw; --y: -28vh; --r: 150deg; }
.celebration i:nth-child(16) { --x: 12vw; --y: 22vh; --r: 300deg; }

@keyframes confetti-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r)); }
}

/* ============================================================
   Sponsor banner — persistent, pinned to the viewport
   ============================================================ */

.patersonbet-banner {
  position: fixed;
  left: var(--sp-4);
  bottom: var(--sp-4);
  z-index: 50;
  display: block;
  width: min(560px, 36vw);
  background: var(--ink);
  border: 1px solid rgba(242, 239, 228, 0.55);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.48);
  transition: transform 0.2s, box-shadow 0.2s;
}

.patersonbet-banner:hover,
.patersonbet-banner:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.58);
}

.patersonbet-banner:active {
  transform: translateY(-1px);
}

.patersonbet-banner img {
  width: 100%;
  height: auto;
}

.sponsor-tag {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  padding: var(--sp-1) var(--sp-2);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: 0.18em;
  border-bottom-left-radius: 6px;
}

/* ============================================================
   Paper appendix — the printed-atlas sections
   ============================================================ */

.paper {
  background: var(--paper);
  color: var(--ink);
}

/* content lock: applied by JS only, so crawlers and no-JS visitors
   always see the full appendix */

.content-teaser {
  display: none;
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--sp-8) clamp(var(--sp-5), 5vw, var(--sp-7));
  text-align: center;
}

.teaser-line {
  max-width: 52ch;
  margin: var(--sp-3) auto 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-body);
  color: var(--moss);
}

body.content-locked .content-teaser {
  display: block;
}

body.content-locked .paper .section {
  display: none;
}

.unlock-note {
  margin-top: var(--sp-3);
  font-size: var(--fs-2xs);
  font-weight: 900;
  letter-spacing: 0.14em;
}

.unlock-note a {
  text-underline-offset: 3px;
}

.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--sp-9) clamp(var(--sp-5), 5vw, var(--sp-7));
}

.section + .section {
  border-top: 1px solid var(--hair-ink);
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--sp-7);
}

.section-kicker {
  font-size: var(--fs-2xs);
  font-weight: 900;
  letter-spacing: 0.3em;
  color: rgba(11, 23, 23, 0.64);
}

.section-head h2 {
  margin-top: var(--sp-4);
  font-size: var(--fs-2xl);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.96;
  text-transform: uppercase;
}

.section-sub {
  margin-top: var(--sp-4);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-body);
  color: var(--moss);
}

/* prose — narrow measure, serif body */

.prose {
  max-width: 62ch;
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  line-height: 1.65;
}

.prose p + p {
  margin-top: var(--sp-4);
}

.prose .lede {
  font-size: var(--fs-lg);
  line-height: 1.5;
  font-style: italic;
}

.prose h3 {
  margin: var(--sp-7) 0 var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--hair-ink);
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.prose a {
  color: inherit;
  text-decoration-color: rgba(11, 23, 23, 0.4);
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-color: var(--ink);
}

.cta-line {
  margin-top: var(--sp-6);
}

.cta-line a {
  display: inline-block;
  padding: var(--sp-3) var(--sp-5);
  border: 1px solid var(--ink);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.cta-line a:hover,
.cta-line a:active {
  background: var(--ink);
  color: var(--lime);
}

/* ---- directory ---- */

.country-group {
  margin-top: var(--sp-8);
}

.country-group:first-of-type {
  margin-top: 0;
}

.country-title {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--ink);
  font-size: var(--fs-xl);
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.country-title span {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: var(--fs-md);
  letter-spacing: 0;
  text-transform: none;
  color: var(--moss);
}

.entries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--sp-8);
}

.entry {
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--hair-ink);
}

.entry-name {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
  font-size: var(--fs-lg);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.swatch {
  align-self: center;
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--ink);
}

.entry-eng {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: var(--fs-md);
  letter-spacing: 0;
  color: var(--moss);
}

.entry-where {
  margin-top: var(--sp-1);
  font-size: var(--fs-2xs);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(11, 23, 23, 0.6);
}

.entry-desc {
  margin-top: var(--sp-3);
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  line-height: 1.55;
}

.entry-facts {
  margin-top: var(--sp-3);
}

.entry-facts dt {
  margin-top: var(--sp-3);
  font-size: var(--fs-2xs);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(11, 23, 23, 0.64);
}

.entry-facts dd {
  margin: var(--sp-2) 0 0;
}

.entry-sample {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-body);
}

.entry-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-4);
}

.mini-play {
  padding: var(--sp-2) var(--sp-4);
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: var(--fs-2xs);
  font-weight: 900;
  letter-spacing: 0.14em;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}

.mini-play:hover,
.mini-play.speaking {
  background: transparent;
  color: var(--ink);
}

.mini-play:active {
  background: transparent;
  color: var(--ink);
  transform: translateY(1px);
}

.mini-play.speaking {
  animation: audio-ring 1s ease-in-out infinite alternate;
  --accent: var(--cyan);
}

.mini-map {
  font-size: var(--fs-2xs);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-decoration: underline;
  text-decoration-color: rgba(11, 23, 23, 0.4);
  text-underline-offset: 3px;
}

.mini-map:hover {
  text-decoration-color: var(--ink);
}

/* ---- FAQ ---- */

.faq-list h3 {
  margin-top: var(--sp-6);
}

.faq-list h3:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  /* extra bottom padding keeps the credit line clear of the
     pinned sponsor card at page end */
  padding: var(--sp-8) clamp(var(--sp-5), 5vw, var(--sp-7)) calc(2 * var(--sp-9));
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  border-top: 1px solid var(--hair-paper);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: 900;
  letter-spacing: 0.22em;
}

.footer .brand-mark {
  width: 28px;
  height: 28px;
  background: var(--lime);
  color: var(--ink);
  font-size: var(--fs-md);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1000px) and (min-width: 681px) {
  .map-shell {
    height: auto;
    min-height: calc(100vh - var(--topbar-h));
    min-height: calc(100dvh - var(--topbar-h));
  }

  .stage {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
  }

  .map-wrap {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
  }

  .game-card {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
  }

  .map-wrap svg {
    width: 100%;
  }
}

@media (max-width: 680px) {
  :root {
    --topbar-h: 60px;
    /* full-creative strip: 1600x442 at 100vw -> 27.625vw tall + top border */
    --banner-h: calc(27.625vw + 1px);
  }

  .topbar {
    padding: 0 var(--sp-4);
  }

  .top-copy {
    display: none;
  }

  /* no-JS fallback: auto-height stage, card in flow after the map */
  .map-shell {
    height: auto;
    min-height: calc(100vh - var(--topbar-h));
    min-height: calc(100dvh - var(--topbar-h));
    padding: var(--sp-3) var(--sp-3) var(--sp-6);
  }

  /* with JS the card is a fixed bottom sheet — reserve its band */
  .js .map-shell {
    height: calc(100vh - var(--topbar-h));
    height: calc(100dvh - var(--topbar-h));
    min-height: 480px;
    padding-bottom: calc(216px + var(--banner-h) + var(--sp-2));
  }

  .map-head {
    margin-bottom: var(--sp-2);
  }

  .map-display {
    font-size: 1.75rem;
  }

  .map-tagline {
    margin-top: var(--sp-1);
    font-size: var(--fs-xs);
  }

  .stage {
    display: flex;
    flex-direction: column;
  }

  .map-wrap {
    order: 1;
    width: 100%;
  }

  .game-card {
    order: 2;
    width: 100%;
    max-width: 560px;
    margin: var(--sp-5) auto 0;
  }

  .map-wrap svg {
    width: min(100%, calc((100vh - 492px) * 1.55));
    width: min(100%, calc((100dvh - 492px) * 1.55));
  }

  .zoom-controls {
    right: var(--sp-2);
    bottom: var(--sp-2);
  }

  /* bottom-sheet card, fixed above the sponsor strip (JS only) */
  .js .game-card {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--banner-h);
    z-index: 40;
    max-width: none;
    max-height: min(48vh, 420px);
    margin: 0;
    overflow-y: auto;
    padding: var(--sp-2) var(--sp-5) var(--sp-4);
    border-top-width: 4px;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  }

  .js .sheet-toggle {
    display: block;
    width: 100%;
    padding: var(--sp-2);
    margin-bottom: var(--sp-1);
    font-size: var(--fs-2xs);
    font-weight: 900;
    letter-spacing: 0.2em;
    text-align: center;
    color: rgba(11, 23, 23, 0.64);
  }

  .js .game-card.collapsed #card-body {
    display: none;
  }

  /* keep the live region rendered while collapsed so
     announcements still reach assistive tech */
  .js .game-card.collapsed .audio-status {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .js .game-card.offstage {
    visibility: hidden;
    pointer-events: none;
  }

  .js .card-lead {
    display: none;
  }

  .card-display {
    margin: var(--sp-2) 0;
    font-size: 1.75rem;
  }

  .card-name {
    font-size: 1.75rem;
  }

  .listen-button {
    min-height: 60px;
  }

  .game-instruction {
    display: none;
  }

  .js .scroll-cue {
    bottom: calc(216px + var(--banner-h) - var(--sp-6));
  }

  /* sponsor strip — natural 1600/442 ratio, no cover-cropping,
     so the entire creative is visible */
  .patersonbet-banner {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    aspect-ratio: 1600 / 442;
    border: 0;
    border-top: 1px solid rgba(242, 239, 228, 0.4);
    border-radius: 0;
  }

  .patersonbet-banner img {
    width: 100%;
    height: auto;
  }

  body {
    padding-bottom: var(--banner-h);
  }

  .footer {
    padding-bottom: var(--sp-8);
  }

  .entries {
    grid-template-columns: minmax(0, 1fr);
  }

  .section {
    padding-top: var(--sp-8);
    padding-bottom: var(--sp-8);
  }

  .section-head {
    margin-bottom: var(--sp-6);
  }

  .entry-actions {
    flex-wrap: wrap;
  }

  /* small map: hover labels off (they render too small to read);
     answer/selection labels are scaled up instead */
  .marker text {
    font-size: calc(22px * var(--inv-k, 1));
  }

  .marker:hover text {
    opacity: 0;
  }

  .marker.selected text,
  .marker.answer-correct text {
    opacity: 1;
  }
}

@media (max-height: 760px) and (min-width: 681px) {
  .map-head {
    margin-bottom: var(--sp-2);
  }

  .map-display {
    font-size: 2rem;
  }

  .game-card {
    padding: var(--sp-4) var(--sp-5);
  }

  .card-display {
    font-size: 1.75rem;
  }
}

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .marker .pulse {
    animation: none !important;
    opacity: 0 !important;
  }

  .celebration {
    display: none;
  }

  .map-view.anim {
    transition: none;
  }
}
