/* =============================================
   scotlands.info — Core Stylesheet
   ============================================= */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --navy:    #1a2744;
  --teal:    #2a7d6f;
  --purple:  #7b4f8a;
  --amber:   #d4a03c;
  --bg:      #f4f5f7;
  --stone:   #e8e6e1;
  --text:    #2c2c2c;
  --muted:   #6b7280;
  --white:   #ffffff;
  --max-w:   1200px;
  --radius:  8px;
  --shadow:  0 2px 16px rgba(26,39,68,.10);
  --shadow-md: 0 4px 24px rgba(26,39,68,.14);
}

/* --- Skip Navigation Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--amber);
  color: var(--navy);
  font-weight: 700;
  font-size: .9rem;
  padding: .6rem 1.2rem;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 9999;
  transition: top .15s;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* --- Screen-Reader Only --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.25;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Underline links in body content — colour must not be the only visual indicator (WCAG 1.4.1) */
.stat-card-source a,
.stat-card-desc a,
.source a,
.geo-prose a,
.section-content p a,
.section-content li a,
.heritage-list a,
.privacy-section a,
.sources-table a,
.privacy-table a { text-decoration: underline; }

/* External links: visual new-tab indicator for sighted users */
.section-content a[target="_blank"]::after,
.stat-card-source a[target="_blank"]::after,
.sources-table a[target="_blank"]::after,
.privacy-table a[target="_blank"]::after,
.source a[target="_blank"]::after {
  content: "\00a0\2197"; /* non-breaking space + ↗ */
  font-size: .7em;
  vertical-align: super;
  line-height: 1;
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}
img { max-width: 100%; display: block; }

/* --- Focus Styles --- */
:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}
.site-nav :focus-visible { outline-color: var(--amber); }
.nav-toggle:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }
main:focus { outline: none; }

/* --- Layout Utilities --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* =============================================
   NAVIGATION
   ============================================= */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.nav-wordmark {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -.5px;
}
.nav-wordmark span { color: var(--amber); }
.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  align-items: center;
}
.nav-links a {
  color: rgba(255,255,255,.82);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .02em;
  transition: color .2s;
}
.nav-links a:hover { color: var(--white); text-decoration: none; }
.nav-links a.active { color: var(--amber); }
/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   HERO
   ============================================= */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #253567 55%, #1e3a50 100%);
  color: var(--white);
  padding: 5rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 60px,
    rgba(255,255,255,.018) 60px,
    rgba(255,255,255,.018) 61px
  );
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}
.hero-label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  color: var(--white);
  margin-bottom: 1rem;
  max-width: 700px;
}
.hero h1 em { color: var(--amber); font-style: normal; }
.hero-tagline {
  font-size: 1.15rem;
  color: rgba(255,255,255,.78);
  max-width: 580px;
  margin-bottom: 2rem;
  font-weight: 300;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  margin-bottom: 2.5rem;
}
.hero-meta-item { font-size: .9rem; color: rgba(255,255,255,.68); }
.hero-meta-item strong { color: var(--white); font-weight: 600; }
.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.hero-stat-box {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: 1.1rem 1.5rem;
  backdrop-filter: blur(4px);
  /* width is now fixed by the grid track — no content-driven sizing */
}
.hero-stat-box .num {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  letter-spacing: -.02em;
  white-space: nowrap; /* prevent wrapping mid-animation */
}
.hero-stat-box .unit { font-size: .78rem; color: var(--amber); font-weight: 600; margin-bottom: .2rem; }
.hero-stat-box .label { font-size: .78rem; color: rgba(255,255,255,.65); margin-top: .25rem; }

/* =============================================
   SECTION BANNERS
   ============================================= */
.section-banner {
  padding: 3rem 1.5rem 2.5rem;
  position: relative;
}
.section-banner.navy-bg  { background: linear-gradient(135deg, var(--navy) 0%, #253567 100%); }
.section-banner.teal-bg  { background: linear-gradient(135deg, #1d5c53 0%, var(--teal) 100%); }
.section-banner.purple-bg { background: linear-gradient(135deg, #5a3668 0%, var(--purple) 100%); }
.section-banner.amber-bg { background: linear-gradient(135deg, #b8862e 0%, var(--amber) 100%); }
.section-banner.stone-bg { background: linear-gradient(135deg, #d6d2cb 0%, var(--stone) 100%); }
.section-banner.dark-teal-bg { background: linear-gradient(135deg, #154a43 0%, #2a7d6f 100%); }
.section-banner.mid-navy-bg { background: linear-gradient(135deg, #1e2f5e 0%, #2d4080 100%); }
.section-banner h1,
.section-banner h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--white);
  max-width: 760px;
  margin: 0 0 .5rem;
}
.section-banner p {
  color: rgba(255,255,255,.75);
  font-size: 1rem;
  max-width: 640px;
}
/* Light banner variant */
.section-banner.light {
  background: var(--stone);
}
.section-banner.light h2 { color: var(--navy); }
.section-banner.light p  { color: var(--text); }

/* =============================================
   SECTION CONTENT AREAS
   ============================================= */
.section-content {
  padding: 2.5rem 1.5rem 3rem;
  background: var(--white);
}
.section-content.alt-bg { background: var(--bg); }
.section-content > .container { max-width: var(--max-w); margin: 0 auto; }

/* =============================================
   STAT CARDS
   ============================================= */
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem 1.2rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--navy);
  position: relative;
  overflow: hidden;
  /* Flex column so source is always pinned to the bottom
     and card height is governed by the grid row, not content */
  display: flex;
  flex-direction: column;
}
.stat-card.teal   { border-left-color: var(--teal); }
.stat-card.purple { border-left-color: var(--purple); }
.stat-card.amber  { border-left-color: var(--amber); }
.stat-card.navy   { border-left-color: var(--navy); }
.stat-card-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: .4rem;
}
.stat-card-num {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: .5rem;
  letter-spacing: -.02em;
  min-height: 3rem;    /* reserve the full line height so "0" never collapses it */
  white-space: nowrap; /* prevent wrapping mid-animation — stops height reflow */
  /* no overflow:hidden — that was clipping the numbers */
}
.stat-card-num .unit {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: .15rem;
}
.stat-card-desc {
  font-size: .82rem;
  color: var(--text);
  flex: 1; /* grow to fill available space, pushing source to the bottom */
}
.stat-card-source {
  font-size: .7rem;
  color: var(--muted);
  border-top: 1px solid var(--stone);
  padding-top: .4rem;
  margin-top: auto; /* always pinned to the card bottom regardless of desc length */
}
.stat-card-source a { color: var(--teal); }

/* On alt backgrounds */
.alt-bg .stat-card { background: var(--white); }

/* =============================================
   CHART CONTAINERS
   ============================================= */
.chart-wrap {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.chart-wrap h3 {
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 1rem;
}
.chart-wrap .chart-source {
  font-size: .7rem;
  color: var(--muted);
  margin-top: .75rem;
}
canvas { max-height: 280px; }

/* =============================================
   GEOGRAPHY PROSE
   ============================================= */
.geo-prose {
  font-size: .95rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 740px;
}
.geo-prose strong { color: var(--navy); }

/* =============================================
   INDUSTRY SPOTLIGHT CARDS
   ============================================= */
.industry-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--teal);
  display: flex;
  flex-direction: column;
}
.industry-card.amber-top  { border-top-color: var(--amber); }
.industry-card.navy-top   { border-top-color: var(--navy); }
.industry-card.purple-top { border-top-color: var(--purple); }
.industry-card.teal-top   { border-top-color: var(--teal); }
.industry-icon {
  font-size: 2rem;
  margin-bottom: .75rem;
  line-height: 1;
}
.industry-card h3 {
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: .85rem;
  min-height: 3.5rem; /* reserves space for 2-line headings so stat sections align */
}
.industry-stat {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  margin-bottom: .75rem;
  min-height: 4rem; /* reserves height for big number + context line so descriptions align */
}
.industry-stat .big {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -.02em;
  min-height: 2.2rem;
  white-space: nowrap;
}
.industry-stat .context { font-size: .82rem; color: var(--muted); }
.industry-card p {
  font-size: .85rem;
  color: var(--text);
  line-height: 1.65;
  flex: 1; /* grows to fill available space, pushing source to the bottom */
}
.industry-card .source {
  font-size: .7rem;
  color: var(--muted);
  border-top: 1px solid var(--stone);
  padding-top: .5rem;
  margin-top: auto; /* always pinned to the card bottom regardless of description length */
}
.industry-card .source a { color: var(--teal); }

/* =============================================
   TIMELINE (History)
   ============================================= */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--teal), var(--purple));
}
.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 1.25rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.45rem;
  top: .35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--teal);
}
.timeline-item:nth-child(even)::before { background: var(--purple); box-shadow: 0 0 0 2px var(--purple); }
.timeline-year {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--teal);
  margin-bottom: .2rem;
}
.timeline-item:nth-child(even) .timeline-year { color: var(--purple); }
.timeline-item h3 {
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: .3rem;
}
.timeline-item p {
  font-size: .88rem;
  color: var(--text);
  line-height: 1.65;
}

/* =============================================
   UNESCO & HERITAGE LISTS
   ============================================= */
.heritage-list { list-style: none; }
.heritage-list li {
  padding: .75rem 1rem;
  border-left: 3px solid var(--amber);
  background: var(--bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: .5rem;
  font-size: .9rem;
}
.heritage-list li strong { color: var(--navy); display: block; margin-bottom: .15rem; }
.heritage-list li span  { color: var(--muted); font-size: .8rem; }

/* =============================================
   LANGUAGE & CULTURE CARDS
   ============================================= */
.culture-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}
.culture-card h3 { font-size: 1rem; color: var(--navy); margin-bottom: .5rem; }
.culture-card p  { font-size: .87rem; color: var(--text); }

/* =============================================
   NATIONAL SYMBOLS GRID
   ============================================= */
.symbol-grid { display: flex; flex-wrap: wrap; gap: 1rem; }
.symbol-chip {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: .6rem 1.1rem;
  font-size: .85rem;
}
.symbol-chip strong { color: var(--amber); display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }

/* =============================================
   SOURCES TABLE
   ============================================= */
.sources-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.sources-table th {
  background: var(--navy);
  color: var(--white);
  padding: .65rem 1rem;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: .78rem;
  letter-spacing: .04em;
}
.sources-table td {
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--stone);
  vertical-align: top;
}
.sources-table tr:nth-child(even) td { background: var(--bg); }
.sources-table td a { color: var(--teal); word-break: break-all; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.65);
  padding: 2.5rem 1.5rem;
  margin-top: 0;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
}
.footer-links a {
  color: rgba(255,255,255,.6);
  font-size: .83rem;
  transition: color .2s;
}
.footer-links a:hover { color: var(--amber); text-decoration: none; }
.footer-wordmark {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--white);
}
.footer-wordmark strong { color: var(--white); }
.footer-copy { font-size: .8rem; }
.footer-copy strong { color: var(--white); }
.footer-disclaimer {
  font-size: .75rem;
  color: rgba(255,255,255,.45);
  margin-top: .35rem;
  font-style: italic;
}

/* =============================================
   MISC UTILITIES
   ============================================= */
.section-divider {
  height: 1px;
  background: var(--stone);
  margin: 0;
}
.text-muted  { color: var(--muted); }
.text-navy   { color: var(--navy); }
.text-amber  { color: var(--amber); }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.font-serif { font-family: 'Playfair Display', serif; }
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.three-col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .three-col-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    gap: 0;
    padding: .5rem 0 1rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
    align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: .65rem 1.5rem; }
  .nav-toggle { display: flex; }
  .site-nav { position: sticky; }
  .nav-inner { position: relative; }

  .hero { padding: 3rem 1.5rem 2.5rem; }
  .hero-stats-row { gap: 1rem; grid-template-columns: repeat(2, 1fr); }
  .hero-stat-box { padding: .85rem 1rem; }
  .hero-stat-box .num { font-size: 1.9rem; }

  .grid-2  { grid-template-columns: 1fr; }
  .grid-3  { grid-template-columns: 1fr; }
  .grid-4  { grid-template-columns: repeat(2, 1fr); }
  .two-col-grid   { grid-template-columns: 1fr; }
  .three-col-grid { grid-template-columns: 1fr; }

  .section-content { padding: 2rem 1.5rem; }
  canvas { max-height: 220px; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .hero-stats-row { gap: .75rem; grid-template-columns: repeat(2, 1fr); }
  .hero-stat-box { }
}

/* =============================================
   SCOTLAND COUNCIL MAP
   ============================================= */
.map-section { }

.map-outer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  position: relative; /* tooltip anchor */
}
@media (max-width: 900px) {
  .map-outer { grid-template-columns: 1fr; }
}

.map-svg-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f0f7f6;
  border: 1px solid var(--stone);
  padding: .75rem; /* breathing room so regions near edges have clear space */
}

#scotland-map {
  display: block;
  width: 100%;
  height: auto;
}

.map-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  color: var(--muted);
  font-size: .85rem;
  gap: .75rem;
}
.map-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--stone);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .map-spinner { animation: none; }
}

.map-region {
  transition: fill .15s, opacity .15s;
  outline: none;
}
.map-region:hover,
.map-region:focus-visible {
  fill: #1a2744 !important;
  opacity: .92;
}
.map-region.map-active {
  fill: #1a2744 !important;
}

.map-tooltip {
  display: none;
  position: absolute;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: .55rem .9rem;
  max-width: 200px;
  pointer-events: none;
  z-index: 60;
  box-shadow: var(--shadow-md);
  font-size: .8rem;
  line-height: 1.5;
  white-space: nowrap;
}
.map-tip-name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: .5rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
  padding-bottom: .4rem;
}
.map-tip-row {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .2rem;
}
.map-tip-label {
  color: rgba(255,255,255,.6);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}
.map-tip-val {
  color: var(--white);
  font-weight: 600;
  text-align: right;
}
.map-tip-fact {
  font-size: .74rem;
  color: rgba(255,255,255,.7);
  margin-top: .5rem;
  padding-top: .4rem;
  border-top: 1px solid rgba(255,255,255,.12);
  line-height: 1.5;
}

.map-info-panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--teal);
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: sticky;
  top: 88px; /* clears the fixed nav */
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.map-info-placeholder {
  text-align: center;
  padding: 1rem;
}
.map-panel-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--teal);
}
.map-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  margin-bottom: 1rem;
}
.map-panel-stat {
  background: var(--bg);
  border-radius: 6px;
  padding: .6rem .75rem;
}
.map-panel-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  display: block;
  margin-bottom: .2rem;
}
.map-panel-val {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}
.map-panel-row {
  margin-bottom: .75rem;
}
.map-panel-text {
  font-size: .9rem;
  color: var(--text);
  line-height: 1.7;
  margin-top: .3rem;
}
.map-legend {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .75rem;
  font-size: .72rem;
  color: var(--muted);
}
.map-legend-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #c8e5e2, #4a9b93, #1a3d6e);
  max-width: 180px;
}
.map-legend-item {
  display: flex;
  align-items: center;
  gap: .25rem;
  color: var(--muted);
  font-size: .72rem;
  white-space: nowrap;
}

/* Pop-class fills (choropleth by population) */
.pop-1 { fill: #daf0ec; }
.pop-2 { fill: #9fd4cc; }
.pop-3 { fill: #59a89f; }
.pop-4 { fill: #2e7d75; }
.pop-5 { fill: #1a3d6e; }

/* =============================================
   CONTACT FORM
   ============================================= */
.contact-wrap {
  max-width: 640px;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .4rem;
}
.form-group label .req {
  color: #c0392b;
  margin-left: .15rem;
  font-size: .8rem;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .65rem .85rem;
  border: 1.5px solid var(--stone);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42,125,111,.15);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-group.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
}
.form-group.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: .15rem;
  accent-color: var(--teal);
  cursor: pointer;
}
.form-group.checkbox-group label {
  font-size: .83rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0;
  cursor: pointer;
}
.form-submit-btn {
  background: var(--teal);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  padding: .75rem 2rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s, transform .1s;
  letter-spacing: .02em;
}
.form-submit-btn:hover { background: #225f54; }
.form-submit-btn:active { transform: scale(.98); }
.form-submit-btn:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}
.contact-email-block {
  background: var(--bg);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin-top: 2rem;
  font-size: .9rem;
}
.contact-email-block strong { color: var(--navy); display: block; margin-bottom: .3rem; }
.contact-email-block a { font-weight: 600; }
.form-success {
  display: none;
  background: rgba(42,125,111,.1);
  border: 1.5px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  color: var(--teal);
  font-weight: 600;
  font-size: .95rem;
  margin-top: 1rem;
}

/* =============================================
   PRIVACY POLICY
   ============================================= */
.privacy-wrap {
  max-width: 780px;
}
.privacy-intro {
  background: var(--bg);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}
.privacy-intro p {
  font-size: .95rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: .75rem;
}
.privacy-intro p:last-child { margin-bottom: 0; }
.privacy-section {
  margin-bottom: 2.25rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--stone);
}
.privacy-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.privacy-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .75rem;
}
.privacy-section h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--navy);
  margin: 1.25rem 0 .4rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .78rem;
}
.privacy-section p {
  font-size: .92rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: .75rem;
}
.privacy-section p:last-child { margin-bottom: 0; }
.privacy-section ul {
  margin: .5rem 0 .75rem 1.25rem;
  padding: 0;
}
.privacy-section ul li {
  font-size: .92rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: .35rem;
}
.privacy-section a { color: var(--teal); }
.privacy-section a:hover { text-decoration: underline; }
.privacy-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--stone);
}
.privacy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.privacy-table thead {
  background: var(--navy);
  color: var(--white);
}
.privacy-table th {
  padding: .75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
.privacy-table td {
  padding: .85rem 1rem;
  vertical-align: top;
  line-height: 1.6;
  border-bottom: 1px solid var(--stone);
  color: var(--text);
}
.privacy-table tbody tr:last-child td { border-bottom: none; }
.privacy-table tbody tr:nth-child(even) { background: var(--bg); }
.privacy-table a { color: var(--teal); }
.privacy-table code {
  font-family: 'Courier New', Courier, monospace;
  font-size: .82rem;
  background: var(--bg);
  border: 1px solid var(--stone);
  border-radius: 3px;
  padding: .1em .35em;
  color: var(--navy);
  white-space: nowrap;
}

/* =============================================
   COUNT-UP ANIMATION STATES
   ============================================= */
.stat-card-num[data-target],
.hero-stat-box .num[data-target] {
  transition: opacity .2s;
}
.counting { opacity: .82; }
