/* ==========================================================================
   Frontline Earth — design tokens & base styles
   Palette: deep blue, forest green, sand, terracotta, warm white.
   ========================================================================== */

:root {
  --color-deep-blue: #10324f;
  --color-deep-blue-700: #0c2740;
  --color-deep-blue-500: #184568;
  --color-forest: #1f4d3c;
  --color-forest-600: #163a2d;
  --color-forest-400: #2a6650;
  --color-sand: #e8dcc3;
  --color-sand-100: #f6f1e4;
  --color-sand-200: #efe4cd;
  --color-terracotta: #b5563a;
  --color-terracotta-600: #9c4830;
  --color-terracotta-200: #e9c3af;
  --color-warm-white: #fbf8f2;
  --color-ink: #1c2622;
  --color-ink-soft: #4b584f;
  --color-ink-faint: #76806f;
  --color-line: #ddd3bc;
  --color-line-strong: #c7bb9e;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --shadow-xs: 0 1px 2px rgba(16, 24, 20, 0.06);
  --shadow-sm: 0 2px 6px -2px rgba(16, 24, 20, 0.12), 0 1px 2px rgba(16,24,20,0.06);
  --shadow-md: 0 10px 24px -10px rgba(16, 50, 79, 0.28), 0 2px 8px -2px rgba(16,24,20,0.1);
  --shadow-lg: 0 24px 48px -16px rgba(16, 50, 79, 0.32);

  --max-width: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --focus-ring: 3px solid var(--color-terracotta);
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-warm-white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--color-deep-blue);
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 3.4vw + 1.2rem, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 1.4vw + 1.1rem, 2.1rem); font-weight: 600; letter-spacing: -0.005em; }
h3 { font-size: 1.28rem; font-weight: 600; letter-spacing: -0.005em; }

p { margin: 0 0 1.1em; max-width: 68ch; }

a { color: var(--color-deep-blue-500); text-decoration-thickness: 1.5px; text-underline-offset: 0.15em; }
a:hover { color: var(--color-terracotta); }

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

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
  border-radius: 3px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-deep-blue);
  color: #fff;
  padding: 0.6em 1em;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-terracotta);
  margin-bottom: 0.75em;
}
.eyebrow::before {
  content: "";
  width: 1.5em;
  height: 2px;
  background: currentColor;
  display: inline-block;
}

/* ---- contour texture: an actual topographic pattern, used deliberately ---- */
.contour-bg {
  position: relative;
  background-color: var(--color-sand-100);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill='none' stroke='%2310324f' stroke-opacity='0.055' stroke-width='1.2'%3E%3Ccircle cx='40' cy='30' r='26'/%3E%3Ccircle cx='40' cy='30' r='46'/%3E%3Ccircle cx='40' cy='30' r='66'/%3E%3Ccircle cx='190' cy='170' r='30'/%3E%3Ccircle cx='190' cy='170' r='54'/%3E%3Ccircle cx='190' cy='170' r='78'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
}

.texture-band {
  height: 14px;
  background-image: repeating-linear-gradient(135deg, var(--color-line) 0 2px, transparent 2px 14px);
  opacity: 0.6;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  background: var(--color-deep-blue);
  color: var(--color-sand-100);
  position: relative;
  z-index: 50;
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}
.brand__mark { color: var(--color-terracotta); }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -0.01em;
}

.primary-nav { flex: 1; display: none; }
.primary-nav ul {
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.primary-nav a {
  color: var(--color-sand-100);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.94rem;
  padding: 0.35rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--color-terracotta);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.search-shortcut {
  display: none;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-sand-100);
  text-decoration: none;
  font-size: 0.9rem;
  border: 1px solid rgba(251,248,242,0.28);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.9rem;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease);
}
.search-shortcut:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,0.06); }

.nav-toggle {
  background: none;
  border: 1px solid rgba(251,248,242,0.4);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1.5rem 1rem;
  background: var(--color-deep-blue-700);
}
.mobile-nav a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

@media (min-width: 880px) {
  .primary-nav { display: block; }
  .search-shortcut { display: flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.breadcrumbs-bar {
  background: var(--color-sand-100);
  border-bottom: 1px solid var(--color-line);
}
.breadcrumbs {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.84rem;
  color: var(--color-ink-faint);
}
.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: var(--color-line-strong);
}
.breadcrumbs a { color: var(--color-ink-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-terracotta); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  background: linear-gradient(175deg, var(--color-deep-blue-700) 0%, var(--color-deep-blue) 48%, var(--color-forest-600) 100%);
  color: var(--color-sand-100);
  padding: clamp(3rem, 9vw, 7rem) 1.5rem clamp(4rem, 10vw, 8rem);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='none' stroke='%23fbf8f2' stroke-opacity='0.06' stroke-width='1.2'%3E%3Ccircle cx='60' cy='50' r='34'/%3E%3Ccircle cx='60' cy='50' r='60'/%3E%3Ccircle cx='60' cy='50' r='86'/%3E%3Ccircle cx='210' cy='210' r='40'/%3E%3Ccircle cx='210' cy='210' r='68'/%3E%3C/g%3E%3C/svg%3E");
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 42%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 240' preserveAspectRatio='none'%3E%3Cpath d='M0 240 L0 150 L90 95 L170 160 L260 70 L340 150 L430 110 L520 170 L610 60 L700 140 L790 100 L880 165 L970 90 L1060 150 L1150 115 L1200 160 L1200 240 Z' fill='%23183c2e' fill-opacity='0.9'/%3E%3Cpath d='M0 240 L0 190 L120 150 L230 200 L330 140 L440 195 L560 130 L670 190 L780 150 L900 205 L1020 145 L1130 195 L1200 170 L1200 240 Z' fill='%23102a21'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: bottom;
  z-index: 0;
  opacity: 0.9;
}
.hero__inner { position: relative; z-index: 1; max-width: var(--max-width); margin: 0 auto; }
.hero h1 { color: #fff; max-width: 18ch; }
.hero p.lead {
  color: var(--color-sand-100);
  font-size: 1.2rem;
  max-width: 46ch;
  opacity: 0.92;
}
.hero .eyebrow { color: var(--color-terracotta-200); }
.hero .eyebrow::before { background: var(--color-terracotta-200); }

.section { padding: clamp(2.5rem, 5vw, 4.5rem) 1.5rem; }
.section__inner { max-width: var(--max-width); margin: 0 auto; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }
.section-heading h2 { margin-bottom: 0; }
.section-heading a { font-size: 0.92rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.section-heading a:hover { text-decoration: underline; }

/* ==========================================================================
   Process tiles (home)
   ========================================================================== */

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.1rem;
}
.process-tile {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.3rem;
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}
.process-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-terracotta-200);
}
.process-tile__icon {
  width: 2.75rem; height: 2.75rem;
  border-radius: var(--radius-sm);
  background: var(--color-sand-100);
  color: var(--color-terracotta-600);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.process-tile__icon svg { width: 1.5rem; height: 1.5rem; }
.process-tile h3 { margin: 0; font-size: 1.05rem; color: var(--color-deep-blue); }
.process-tile p { margin: 0; color: var(--color-ink-soft); font-size: 0.88rem; }

/* ==========================================================================
   Buttons / form controls
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.96rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.btn svg { transition: transform 0.15s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--color-terracotta); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--color-terracotta-600); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-secondary:hover { background: rgba(255,255,255,0.12); color: #fff; border-color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--color-deep-blue); color: var(--color-deep-blue); }
.btn-outline:hover { background: var(--color-deep-blue); color: #fff; }
.btn-ghost { background: transparent; color: var(--color-ink-soft); border-color: var(--color-line-strong); }
.btn-ghost:hover { border-color: var(--color-terracotta); color: var(--color-terracotta); }

input[type="text"], input[type="email"], input[type="search"], select, textarea {
  font-family: var(--font-body);
  font-size: 0.96rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-ink);
  width: 100%;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
input:focus, select:focus, textarea:focus { border-color: var(--color-deep-blue-500); box-shadow: 0 0 0 3px rgba(16,69,104,0.14); }
label { font-weight: 600; font-size: 0.9rem; display: block; margin-bottom: 0.4rem; color: var(--color-ink-soft); }
fieldset { border: 1px solid var(--color-line); border-radius: var(--radius-md); padding: 1rem; margin: 0; }
legend { font-family: var(--font-display); font-weight: 600; padding: 0 0.4rem; }

/* ==========================================================================
   Cards (formation library)
   ========================================================================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}

.formation-card {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  position: relative;
}
.formation-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.formation-card__media {
  aspect-ratio: 4 / 3;
  background: var(--color-sand);
  overflow: hidden;
  position: relative;
}
.formation-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.formation-card:hover .formation-card__media img { transform: scale(1.06); }
.formation-card__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(185deg, transparent 55%, rgba(16,24,20,0.18) 100%);
  pointer-events: none;
}
.formation-card__body { padding: 1.25rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.formation-card__tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--color-sand-100);
  color: var(--color-forest-400);
  border: 1px solid var(--color-line);
}
.tag--process { background: rgba(181,86,58,0.1); color: var(--color-terracotta-600); border-color: rgba(181,86,58,0.22); }
.formation-card h3 { margin-bottom: 0.1rem; font-size: 1.12rem; }
.formation-card h3 a { color: var(--color-deep-blue); text-decoration: none; }
.formation-card h3 a::after { content: ""; position: absolute; inset: 0; }
.formation-card h3 a:hover { color: var(--color-terracotta); }
.formation-card p { font-size: 0.92rem; color: var(--color-ink-soft); margin-bottom: 0.3rem; }
.formation-card__meta { font-size: 0.8rem; color: var(--color-ink-faint); margin-top: auto; }
.formation-card__link { position: relative; z-index: 1; font-size: 0.88rem; font-weight: 600; text-decoration: none; }

.no-results {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--color-ink-soft);
  background: var(--color-sand-100);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--color-line-strong);
}

/* ==========================================================================
   Filters (Explorer / Library)
   ========================================================================== */

.filters {
  background: var(--color-sand-100);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.filters form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.1rem;
  align-items: end;
}
.filters .filters__actions {
  display: flex;
  gap: 0.6rem;
}
.filters__status { font-size: 0.86rem; color: var(--color-ink-soft); margin-top: 0.9rem; }

/* ==========================================================================
   Glossary / A-Z index
   ========================================================================== */

.az-nav { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }
.az-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem; height: 2.1rem;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--color-deep-blue);
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.az-nav a:hover { background: var(--color-deep-blue); color: #fff; }
.az-group h2 { border-bottom: 2px solid var(--color-line); padding-bottom: 0.4rem; margin-top: 2.5rem; }
.az-list { list-style: none; margin: 0; padding: 0; }
.az-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--color-line); }

.glossary-term { border-bottom: 1px solid var(--color-line); padding: 1.1rem 0; }
.glossary-term dt { font-family: var(--font-display); font-weight: 700; color: var(--color-deep-blue); font-size: 1.05rem; }
.glossary-term dd { margin: 0.35rem 0 0; color: var(--color-ink-soft); }

/* ==========================================================================
   Article / formation page
   ========================================================================== */

.article-header { background: linear-gradient(180deg, var(--color-sand-100), #fff); border-bottom: 1px solid var(--color-line); padding: 2.5rem 1.5rem; }
.article-header__inner { max-width: var(--max-width); margin: 0 auto; }
.article-header__tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 0.85rem; color: var(--color-ink-faint); margin-top: 1.25rem; }
.article-meta span { display: inline-flex; align-items: center; }
.article-meta span:not(:last-child)::after { content: "•"; margin-left: 1.5rem; color: var(--color-line-strong); position: relative; }

.article-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 960px) {
  .article-layout { grid-template-columns: minmax(0, 2.2fr) minmax(240px, 1fr); }
}

.article-body figure { margin: 2rem 0; }
.article-body figure img { box-shadow: var(--shadow-md); }
.hero-figure {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-md);
}
.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}
.article-body figcaption { font-size: 0.85rem; color: var(--color-ink-faint); margin-top: 0.6rem; }
.article-body img, .article-body svg { border-radius: var(--radius-md); border: 1px solid var(--color-line); }
.article-body h2 { margin-top: 2.75rem; padding-top: 0.25rem; }
.article-body h2::before {
  content: "";
  display: block;
  width: 2.5rem; height: 3px;
  background: var(--color-terracotta);
  margin-bottom: 0.9rem;
  border-radius: 2px;
}
.article-body ul, .article-body ol { max-width: 68ch; padding-left: 1.3rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body > p:first-of-type { font-size: 1.1rem; color: var(--color-ink); }

.note-box {
  background: var(--color-sand-100);
  border-left: 4px solid var(--color-terracotta);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.4rem;
  margin: 1.6rem 0;
}
.note-box p:last-child { margin-bottom: 0; }

.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-card {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  box-shadow: var(--shadow-xs);
}
.sidebar-card h2 { font-size: 1rem; margin-bottom: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-ink-soft); font-family: var(--font-body); font-weight: 700; }
.sidebar-card dl { margin: 0; font-size: 0.9rem; }
.sidebar-card dt { font-weight: 600; color: var(--color-ink-faint); margin-top: 0.85rem; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
.sidebar-card dt:first-child { margin-top: 0; }
.sidebar-card dd { margin: 0.2rem 0 0; color: var(--color-ink); }

.related-grid { display: grid; gap: 1.1rem; }
.related-grid > div { padding-bottom: 1.1rem; border-bottom: 1px solid var(--color-line); }
.related-grid > div:last-child { padding-bottom: 0; border-bottom: none; }

/* ==========================================================================
   Map
   ========================================================================== */

.map-wrap { position: relative; border: 1px solid var(--color-line); border-radius: var(--radius-lg); overflow: hidden; background: var(--color-deep-blue-700); box-shadow: var(--shadow-md); }
#world-map { width: 100%; height: auto; display: block; }
.map-marker { cursor: pointer; }
.map-marker .pin-head { fill: var(--color-terracotta); stroke: #fff; stroke-width: 1.4; transition: fill 0.15s var(--ease); }
.map-marker:hover .pin-head, .map-marker:focus .pin-head { fill: #ffd27a; }
.map-popup {
  position: absolute;
  max-width: 270px;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.1rem;
  font-size: 0.88rem;
  display: none;
}
.map-popup.is-open { display: block; }
.map-popup h3 { font-size: 0.98rem; margin-bottom: 0.3rem; }
.map-popup p { margin-bottom: 0.5rem; }
.map-popup a { font-weight: 600; text-decoration: none; }
.map-popup a:hover { text-decoration: underline; }

.location-list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); }
.location-card { border: 1px solid var(--color-line); border-radius: var(--radius-md); padding: 1.1rem; background: #fff; box-shadow: var(--shadow-xs); transition: box-shadow 0.15s var(--ease), transform 0.15s var(--ease); }
.location-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.location-card h3 { font-size: 1rem; margin-bottom: 0.2rem; }
.location-card p { font-size: 0.88rem; margin-bottom: 0.3rem; color: var(--color-ink-soft); }

/* ==========================================================================
   Static page prose
   ========================================================================== */

.prose { max-width: 76ch; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
.prose h1 { margin-bottom: 1rem; }
.prose h2 { margin-top: 2.25rem; }
.prose > p:first-of-type { font-size: 1.12rem; color: var(--color-ink-soft); }

/* ==========================================================================
   404
   ========================================================================== */

.error-page { text-align: center; padding: 6rem 1.5rem; }
.error-page h1 { font-size: clamp(2.5rem, 8vw, 4rem); }

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

.site-footer { background: var(--color-deep-blue-700); color: var(--color-sand-100); margin-top: 4rem; }
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2.5rem;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1.4fr repeat(3, 1fr);
}
.site-footer__brand p { color: rgba(251,248,242,0.7); font-size: 0.92rem; max-width: 30ch; }
.site-footer__col h2 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(251,248,242,0.55); font-family: var(--font-body); margin-bottom: 1rem; }
.site-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.site-footer__col a { color: rgba(251,248,242,0.85); text-decoration: none; font-size: 0.92rem; }
.site-footer__col a:hover { color: #fff; text-decoration: underline; }
.site-footer__bottom {
  border-top: 1px solid rgba(251,248,242,0.12);
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(251,248,242,0.55);
}
.site-footer__bottom a { color: rgba(251,248,242,0.75); }
@media (max-width: 760px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Tables -> cards on mobile
   ========================================================================== */

.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td { text-align: left; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--color-line); vertical-align: top; }
.compare-table th { background: var(--color-sand-100); font-family: var(--font-display); font-weight: 600; color: var(--color-deep-blue); }

@media (max-width: 640px) {
  .compare-table thead { display: none; }
  .compare-table, .compare-table tbody, .compare-table tr, .compare-table td { display: block; width: 100%; }
  .compare-table tr { margin-bottom: 1rem; border: 1px solid var(--color-line); border-radius: var(--radius-md); overflow: hidden; }
  .compare-table td { border-bottom: 1px solid var(--color-line); }
  .compare-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-ink-faint);
    margin-bottom: 0.2rem;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
