:root {
  --navy: #111e42;
  --navy-deep: #0b1530;
  --white: #ffffff;
  --blue: #78bde4;
  --blue-soft: rgba(120, 189, 228, 0.14);
  --text-dim: rgba(226, 232, 243, 0.9);
  --header-h: 62px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    "Manrope",
    "Avenir Next",
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
  background: var(--navy);
  color: var(--white);
  overflow-x: hidden;
}

/* ---------- Accessibility helpers ---------- */

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 16px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Header / navigation ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled,
.site-header.menu-open {
  background: rgba(13, 22, 48, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.nav-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0;
  white-space: nowrap;
}

.nav-brand img {
  width: 30px;
  height: 30px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 7px 11px;
  border-radius: 4px;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-links a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.nav-links a.active {
  color: var(--blue);
}

.nav-cta {
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 4px;
  background: var(--white);
  color: var(--navy) !important;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.nav-cta:hover {
  background: #f5f8fb !important;
  color: var(--navy);
}

/* About dropdown */

.nav-dropdown {
  position: relative;
}

/* Invisible bridge over the gap between the button and the menu, so
   hover isn't lost while the cursor travels down to the menu. */
.nav-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 14px;
}

.nav-drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 7px 11px;
  border-radius: 4px;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-drop-btn:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.nav-drop-btn.active {
  color: var(--blue);
}

.nav-drop-btn svg {
  width: 13px;
  height: 13px;
  transition: transform 0.18s ease;
}

.nav-dropdown.open .nav-drop-btn svg {
  transform: rotate(180deg);
}

.nav-drop-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 190px;
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  background: rgba(13, 22, 48, 0.97);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

.nav-dropdown.open .nav-drop-menu {
  display: flex;
}

@media (hover: hover) and (min-width: 921px) {
  .nav-dropdown:hover .nav-drop-menu,
  .nav-dropdown:focus-within .nav-drop-menu {
    display: flex;
  }
}

.nav-drop-menu a {
  border-radius: 3px;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.menu-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 18px 18px;
    background: rgba(13, 22, 48, 0.97);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
    display: none;
  }

  .menu-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 14px 16px;
    font-size: 1.05rem;
    border-radius: 3px;
  }

  .nav-cta {
    margin: 8px 0 0;
    justify-content: center;
    padding: 14px 22px;
  }

  /* In the mobile panel the dropdown flattens into plain links */
  .nav-dropdown {
    display: contents;
  }

  .nav-drop-btn {
    display: none;
  }

  .nav-drop-menu {
    display: contents;
  }
}

/* ---------- Hero ---------- */

.page {
  min-height: 74vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 32px) 24px 56px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--navy);
}

.page::before {
  content: "";
  position: absolute;
  inset: -4%;
  z-index: -2;
  background:
    linear-gradient(rgba(17, 30, 66, 0.86), rgba(17, 30, 66, 0.93)),
    url("/assets/img/backdrops/backdrop-1920.webp") center center / cover no-repeat,
    var(--navy);
}

@media (prefers-reduced-motion: no-preference) {
  .page::before {
    animation: bg-drift 46s ease-in-out infinite alternate;
  }

  @keyframes bg-drift {
    from {
      transform: scale(1) translateY(0);
    }
    to {
      transform: scale(1.07) translateY(-1.2%);
    }
  }
}

.page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      circle at center,
      rgba(17, 30, 66, 0.02) 0%,
      rgba(17, 30, 66, 0.16) 55%,
      rgba(6, 13, 31, 0.44) 100%
    );
  pointer-events: none;
}

.page main {
  width: min(1080px, 100%);
  text-align: center;
}

/* Block-level so the wordmark keeps its own line above the headline.
   As inline-flex it sat beside the h1 once both got smaller. */
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-bottom: 26px;
}

.logo {
  width: clamp(96px, 9vw, 128px);
  height: auto;
  display: block;
}

.brand-text {
  text-align: left;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  line-height: 1.25;
  letter-spacing: 0.01em;
  font-weight: 600;
}

h1 {
  display: inline-block;
  margin: 0;
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 .line {
  display: block;
}

h1 .line-two {
  margin-top: 0.02em;
}

h1 .accent {
  color: var(--blue);
}

/* Hero entrance (CSS-only, works without JS) */
@media (prefers-reduced-motion: no-preference) {
  .hero-fade {
    opacity: 0;
    transform: translateY(16px);
    animation: hero-in 0.7s ease forwards;
  }

  .hero-fade.d1 { animation-delay: 0.08s; }
  .hero-fade.d2 { animation-delay: 0.2s; }
  .hero-fade.d3 { animation-delay: 0.34s; }
  .hero-fade.d4 { animation-delay: 0.46s; }

  @keyframes hero-in {
    to {
      opacity: 1;
      transform: none;
    }
  }
}

.buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}

/* On pages whose body copy is left-aligned, the button row should be too */
.buttons.start {
  justify-content: flex-start;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 20px;
  border-radius: 4px;
  background: var(--white);
  color: var(--navy);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.button:hover {
  background: #dce6f2;
}

.button.ghost {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: none;
}

.button.ghost:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.socials {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
}

.social {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}

.social:hover {
  opacity: 0.82;
}

.social img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

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

.scroll-cue svg {
  width: 18px;
  height: 18px;
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-cue svg {
    animation: cue-bob 1.8s ease-in-out infinite;
  }

  @keyframes cue-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
  }
}

/* ---------- Content sections ---------- */

.section {
  padding: 58px 24px;
  position: relative;
}

.section-inner {
  width: min(1080px, 100%);
  margin: 0 auto;
}

.section.alt {
  background: var(--navy-deep);
}

.section h2 {
  margin: 0 0 14px;
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: 0;
  font-weight: 700;
}

.section h2 .accent {
  color: var(--blue);
}

.lede {
  margin: 0;
  max-width: 38rem;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text-dim);
}

.lede + .lede {
  margin-top: 18px;
}

.lede.centered {
  margin-left: auto;
  margin-right: auto;
}

/* Research cards */

.section h2.centered {
  text-align: center;
}

.research-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 44px;
}

@media (max-width: 900px) {
  .research-cards {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
}

.research-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
  text-align: left;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.research-card:hover {
  border-color: rgba(120, 189, 228, 0.6);
  background: rgba(120, 189, 228, 0.05);
}

.research-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}

.research-card-body {
  padding: 20px 12px 12px;
}

.research-card h3 {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.research-card h3 a {
  color: inherit;
  text-decoration: none;
}

.research-card h3 a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.research-card .card-media {
  display: block;
}

.card-tag {
  display: inline-block;
  margin: 0 0 12px;
  font-style: italic;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
}

/* Metadata that is deliberately NOT a link (author, date, session
 * number). Kept visually distinct from the tag pills above so the
 * pills can mean "clickable" and nothing else. */
.card-meta {
  margin: 0 0 12px;
  color: var(--text-dim);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Genre tag: a filled token with a leading dot, so it reads as a
 * selectable category rather than italic caption text. Filling solid
 * on hover previews what clicking does (it becomes the active chip). */
a.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 9px;
  border: 1px solid rgba(120, 189, 228, 0.5);
  border-radius: 4px;
  background: rgba(120, 189, 228, 0.12);
  color: #a9d8f2;
  font-style: normal;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

a.card-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

a.card-tag:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--navy);
}

.see-all {
  margin: 30px 0 0;
  text-align: center;
}

/* Research/Posts index filters + search */

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 30px 0 0;
}

.search-input {
  width: min(340px, 100%);
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  transition: border-color 0.18s ease;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.search-input:focus {
  outline: none;
  border-color: var(--blue);
}

.no-results {
  margin-top: 26px;
}

.filter-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-label {
  margin-right: 2px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chip {
  display: inline-block;
  padding: 6px 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.chip:hover {
  color: var(--white);
  border-color: rgba(120, 189, 228, 0.65);
  background: rgba(120, 189, 228, 0.14);
}

.chip.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--navy);
}

.research-card.hidden {
  display: none;
}

.research-card .desc {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.6;
  font-size: 0.98rem;
}

/* Research detail pages */

.research-detail {
  padding-top: calc(var(--header-h) + 40px);
  min-height: 60vh;
}

.section-inner.narrow {
  width: min(720px, 100%);
}

/* ---------- Links ----------
 *
 * Three deliberate levels, so a reader can always tell what is
 * clickable without the page turning into a sea of blue:
 *   1. .button / .button.ghost  — primary actions
 *   2. prose links              — underlined, tinted, inside body text
 *   3. tokens (.chip, .card-tag) and .back-link — pill-shaped controls
 */

/* 2. Prose links. Underline sits low enough to stay readable, and the
 *    hover adds a tint so the target is obvious before the click. */
.lede a,
.see-all a,
.post-article p a,
.post-article li a,
.post-article figcaption a,
.research-card .desc a,
.step-list p a,
.fact span a,
.schedule td a,
.embed-caption a,
.atlas-description a,
.atlas-credits a,
.wall-caption a,
.gis-hint a,
.member-meta a,
.paper p a,
.paper li a,
.paper figcaption a,
.facts dd a,
.footer-note a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(120, 189, 228, 0.55);
  border-radius: 3px;
  transition:
    color 0.15s ease,
    text-decoration-color 0.15s ease,
    background 0.15s ease;
}

.lede a:hover,
.see-all a:hover,
.post-article p a:hover,
.post-article li a:hover,
.post-article figcaption a:hover,
.research-card .desc a:hover,
.step-list p a:hover,
.fact span a:hover,
.schedule td a:hover,
.embed-caption a:hover,
.atlas-description a:hover,
.atlas-credits a:hover,
.wall-caption a:hover,
.gis-hint a:hover,
.member-meta a:hover,
.paper p a:hover,
.paper li a:hover,
.paper figcaption a:hover,
.facts dd a:hover,
.footer-note a:hover {
  color: #a9d8f2;
  text-decoration-color: currentColor;
  background: rgba(120, 189, 228, 0.14);
  box-shadow: 0 0 0 3px rgba(120, 189, 228, 0.14);
}

/* Standalone "go somewhere" link, e.g. Browse all research */
.see-all a {
  font-weight: 700;
}

/* Headline links inside numbered step cards */
.step-list h3 a {
  color: var(--white);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(120, 189, 228, 0.65);
  transition: color 0.15s ease;
}

.step-list h3 a:hover {
  color: var(--blue);
}

/* 3. Back navigation: a pill, so it never reads as body text */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 28px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.back-link:hover {
  color: var(--white);
  border-color: rgba(120, 189, 228, 0.65);
  background: rgba(120, 189, 228, 0.12);
}

.research-detail h1 {
  display: block;
  margin: 0 0 18px;
  font-size: clamp(1.6rem, 2.3vw, 2.05rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 700;
  text-shadow: none;
}

.detail-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin: 32px 0;
}

.research-detail h2 {
  margin: 36px 0 12px;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

/* Get involved */

.cta-panel {
  margin-top: 8px;
  text-align: center;
}

.cta-panel .buttons {
  margin-top: 34px;
}

.cta-panel .socials {
  margin-top: 30px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  background: var(--navy-deep);
  padding: 44px 24px 36px;
}

.footer-inner {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
}

.footer-brand img {
  width: 34px;
  height: 34px;
}

.footer-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: 4px;
  transition: color 0.18s ease, background 0.18s ease;
}

.footer-links a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
}

.footer-note {
  width: 100%;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.86rem;
  text-align: center;
}

/* ---------- Responsive hero tweaks ---------- */

@media (max-width: 900px) {
  h1 {
    max-width: 820px;
  }
}

@media (max-width: 760px) {
  .page {
    padding: calc(var(--header-h) + 14px) 18px 64px;
  }

  .page::before {
    background:
      linear-gradient(rgba(17, 30, 66, 0.88), rgba(17, 30, 66, 0.94)),
      url("/assets/img/backdrops/backdrop-960.webp") center center / cover no-repeat,
      var(--navy);
  }

  .brand {
    flex-direction: column;
    gap: 14px;
    margin-bottom: 26px;
  }

  .brand-text {
    text-align: center;
    font-size: clamp(1.7rem, 8vw, 2.35rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
  }

  .logo {
    width: clamp(145px, 45vw, 190px);
  }

  h1 {
    font-size: clamp(2.5rem, 10.8vw, 4rem);
    line-height: 1;
    letter-spacing: -0.04em;
  }

  h1 .line-two {
    margin-top: 0.04em;
  }

  .buttons {
    margin-top: 32px;
    gap: 14px;
  }

  .button {
    width: min(100%, 330px);
    min-width: 0;
    min-height: 64px;
    font-size: 1.35rem;
  }

  .socials {
    margin-top: 24px;
  }

  .social {
    width: 42px;
    height: 42px;
  }

  .section {
    padding: 72px 18px;
  }
}

@media (max-width: 430px) {
  .page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-text {
    font-size: 1.7rem;
  }

  .logo {
    width: 145px;
  }

  h1 {
    font-size: 2.45rem;
  }

  .button {
    min-height: 60px;
    font-size: 1.22rem;
  }
}

/* ---------- Atlas ---------- */

.atlas-shell {
  display: flex;
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  margin-top: var(--header-h);
}

.atlas-panel {
  width: 340px;
  flex-shrink: 0;
  overflow-y: auto;
  background: var(--navy-deep);
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  padding: 26px 24px 34px;
}

.atlas-panel h1 {
  display: block;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 4px 0 8px;
  text-shadow: none;
}

.atlas-subtitle {
  margin: 0 0 8px;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.55;
}

.atlas-panel-label {
  margin: 22px 0 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.layer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin: 0 -10px;
  border-radius: 3px;
  cursor: pointer;
  user-select: none;
}

.layer-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.layer-row input {
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.layer-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.layer-swatch.small {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.layer-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.layer-legend {
  margin: 2px 0 6px 36px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.layer-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: capitalize;
}

.atlas-description {
  margin: 18px 0 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.6;
}

.atlas-credits {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
  line-height: 1.5;
}

.atlas-map {
  flex: 1;
  min-height: 320px;
  background: var(--navy-deep);
  position: relative;
}

.atlas-fallback {
  padding: 24px;
  color: var(--text-dim);
}

@media (max-width: 820px) {
  .atlas-shell {
    flex-direction: column;
    height: auto;
  }

  .atlas-panel {
    width: 100%;
    max-height: 44vh;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  }

  .atlas-map {
    height: 62vh;
  }
}

/* Map embedded inside a Post */
.atlas-embed {
  height: 480px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
  margin: 32px 0 10px;
}

.embed-caption {
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.86rem;
  line-height: 1.5;
}

/* MapLibre chrome, re-themed to the brand */
.maplibregl-popup-content {
  background: #16224e;
  color: var(--white);
  border-radius: 3px;
  border: 1px solid rgba(120, 189, 228, 0.4);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  padding: 12px 16px;
  font-family: inherit;
}

.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
  border-top-color: #16224e;
}

.maplibregl-popup-anchor-top .maplibregl-popup-tip {
  border-bottom-color: #16224e;
}

.maplibregl-popup-anchor-left .maplibregl-popup-tip {
  border-right-color: #16224e;
}

.maplibregl-popup-anchor-right .maplibregl-popup-tip {
  border-left-color: #16224e;
}

.maplibregl-popup-close-button {
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  padding: 2px 8px;
}

.atlas-popup strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.atlas-popup div {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.atlas-popup-label {
  font-weight: 700;
  color: var(--white);
}

.maplibregl-ctrl-group {
  background: #16224e;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.maplibregl-ctrl-group button + button {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.maplibregl-ctrl button .maplibregl-ctrl-icon {
  filter: invert(1);
}

.maplibregl-ctrl-attrib {
  background: rgba(11, 21, 48, 0.75);
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
}

.maplibregl-ctrl-attrib a {
  color: rgba(255, 255, 255, 0.8);
}

.maplibregl-ctrl-scale {
  background: rgba(11, 21, 48, 0.6);
  color: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ---------- Posts ---------- */

.post-article {
  width: min(760px, 100%);
  margin: 0 auto;
}

.post-meta {
  margin: 0 0 14px;
  color: var(--blue);
  font-weight: 700;
  font-size: 0.92rem;
}

.post-meta .post-date {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}

.post-article h1 {
  display: block;
  margin: 0 0 18px;
  font-size: clamp(1.7rem, 2.6vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-shadow: none;
}

.post-article .lede {
  max-width: none;
}

.post-article h2 {
  margin: 40px 0 14px;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.post-article p {
  color: var(--text-dim);
  line-height: 1.75;
  font-size: 1.05rem;
  margin: 0 0 20px;
}

.post-article figure {
  margin: 32px 0;
}

.post-article figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.post-article figcaption {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.86rem;
}

.post-article a:not(.button) {
  color: var(--blue);
}

.post-article .buttons {
  margin-bottom: 14px;
}

/* p.selector needed: .post-article p would otherwise out-rank these */
.post-article p.post-signoff,
.post-signoff {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
}

/* ---------- Homepage explore band ---------- */

.explore-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 8px;
}

@media (max-width: 900px) {
  .explore-band {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
}

.explore-tile {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  padding: 30px 28px;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.explore-tile:hover {
  border-color: rgba(120, 189, 228, 0.6);
  background: rgba(120, 189, 228, 0.05);
}

.explore-tile h3 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--blue);
}

.explore-tile p {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.6;
  font-size: 0.98rem;
}

.explore-tile .go {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
  color: var(--white);
  font-size: 0.95rem;
}

/* ---------- Members ---------- */

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  border: 1.5px solid rgba(120, 189, 228, 0.5);
  color: var(--blue);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar.large {
  width: 92px;
  height: 92px;
  font-size: 1.9rem;
}

/* Byline (article author line) */

.byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 8px;
}

.byline .avatar {
  width: 42px;
  height: 42px;
  font-size: 0.92rem;
}

.post-article .byline p {
  margin: 0;
}

.post-article .byline p.byline-date {
  margin-top: 2px;
}

.byline-name {
  margin: 0;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--white);
}

.byline-name a {
  color: var(--white);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(120, 189, 228, 0.75);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.byline-name a:hover {
  color: var(--blue);
  text-decoration-color: currentColor;
}

.byline-date {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.86rem;
}

/* Member profile page */

.member-head {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 22px;
}

.member-head h1 {
  display: block;
  margin: 0 0 6px;
  font-size: clamp(1.6rem, 2.4vw, 2.05rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-shadow: none;
}

.member-meta {
  margin: 0;
  color: var(--blue);
  font-weight: 700;
  font-size: 0.95rem;
}

.member-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 0;
}

.member-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.member-links a:hover {
  color: var(--white);
  border-color: var(--blue);
}

.work-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.work-list a {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  padding: 11px 14px;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.work-list a:hover {
  border-color: rgba(120, 189, 228, 0.55);
  background: rgba(120, 189, 228, 0.06);
}

.work-list strong {
  display: block;
  color: var(--blue);
  font-size: 0.98rem;
  letter-spacing: 0;
  margin-bottom: 2px;
}

.work-list span {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---------- Map Wall ---------- */

.wall-grid {
  columns: 3;
  column-gap: 22px;
  margin-top: 44px;
}

@media (max-width: 1000px) {
  .wall-grid {
    columns: 2;
  }
}

@media (max-width: 680px) {
  .wall-grid {
    columns: 1;
  }
}

.wall-item {
  break-inside: avoid;
  margin: 0 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.wall-item img {
  width: 100%;
  height: auto;
  display: block;
}

.wall-item-body {
  padding: 14px 16px 16px;
}

.wall-item-body strong {
  display: block;
  font-size: 1rem;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.wall-maker {
  color: var(--blue);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

a.wall-maker {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(120, 189, 228, 0.55);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a.wall-maker:hover {
  color: #a9d8f2;
  text-decoration-color: currentColor;
}

.wall-caption {
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 0.86rem;
  line-height: 1.5;
}

/* ---------- Error page ---------- */

.error-page main {
  text-align: center;
}

.error-code {
  font-size: clamp(5rem, 16vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 0 0 10px;
  color: var(--blue);
}

/* ---------- GIS explainer ---------- */

/* The stack is rotated in 3D, so its painted area is much taller than the
   340x240 box it reserves. The top padding is clearance for that overhang. */
.gis-stack-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
  padding: 130px 0 40px;
  perspective: 1200px;
}

.gis-stack {
  position: relative;
  width: min(340px, 68vw);
  height: 240px;
  transform-style: preserve-3d;
  transform: rotateX(56deg) rotateZ(-42deg);
}

.gis-plane {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  border: 1.5px solid;
  background: rgba(17, 30, 66, 0.6);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.35);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.gis-plane svg,
.gis-plane img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.gis-plane.pl-points { border-color: rgba(255, 209, 0, 0.7); transform: translateZ(135px); }
.gis-plane.pl-lines  { border-color: rgba(229, 22, 54, 0.7); transform: translateZ(90px); }
.gis-plane.pl-areas  { border-color: rgba(120, 189, 228, 0.8); transform: translateZ(45px); }
.gis-plane.pl-base   { border-color: rgba(255, 255, 255, 0.35); transform: translateZ(0); }

.gis-stack:hover .pl-points,
.gis-stack:focus-within .pl-points { transform: translateZ(195px); }
.gis-stack:hover .pl-lines,
.gis-stack:focus-within .pl-lines { transform: translateZ(130px); }
.gis-stack:hover .pl-areas,
.gis-stack:focus-within .pl-areas { transform: translateZ(65px); }
.gis-stack:hover .pl-base,
.gis-stack:focus-within .pl-base { transform: translateZ(-5px); }

.gis-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gis-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.95rem;
}

.gis-hint {
  margin: 26px 0 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
}

/* Numbered step cards */

.step-list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  counter-reset: step;
}

@media (max-width: 820px) {
  .step-list {
    grid-template-columns: 1fr;
  }
}

.step-list li {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  padding: 24px 24px 24px 86px;
}

.step-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 24px;
  top: 22px;
  width: 42px;
  height: 42px;
  border-radius: 3px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  border: 1.5px solid rgba(120, 189, 228, 0.5);
  color: var(--blue);
  font-weight: 800;
  font-size: 1.25rem;
}

.step-list h3 {
  margin: 0 0 6px;
  font-size: 1.12rem;
  letter-spacing: -0.015em;
}

.step-list p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}

.step-list a {
  color: var(--blue);
}

/* ---------- Join page ---------- */

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 36px;
}

@media (max-width: 820px) {
  .fact-grid {
    grid-template-columns: 1fr;
  }
}

.fact {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  padding: 22px;
}

.fact strong {
  display: block;
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}

.fact span {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.55;
}

.schedule {
  width: 100%;
  margin-top: 30px;
  border-collapse: collapse;
}

.schedule th {
  text-align: left;
  padding: 0 14px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.schedule td {
  padding: 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  font-size: 0.98rem;
  line-height: 1.55;
  vertical-align: top;
}

.schedule td:first-child {
  color: var(--blue);
  font-weight: 700;
  white-space: nowrap;
}

.schedule .tbd {
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
}

/* One step up from a normal button, for the single primary action on a
   page. Not a billboard. */
.button.xl {
  min-height: 46px;
  font-size: 1.02rem;
  padding: 12px 26px;
}

.gis-legend li:nth-child(1) .layer-swatch { background: #ffd100; }
.gis-legend li:nth-child(2) .layer-swatch { background: #e51636; }
.gis-legend li:nth-child(3) .layer-swatch { background: #78bde4; }
.gis-legend li:nth-child(4) .layer-swatch { background: rgba(255, 255, 255, 0.7); }

/* ---------- Long-form / paper layout ---------- */

.paper {
  width: min(720px, 100%);
  margin: 0 auto;
}

.paper h1 {
  margin: 0 0 20px;
}

/* First rule under the title would double up with the h1's own spacing */
.paper > h2:first-of-type {
  margin-top: 30px;
}

.paper .back-link {
  margin-bottom: 22px;
}

.paper p {
  margin: 0 0 16px;
  color: var(--text-dim);
  font-size: 1.02rem;
  line-height: 1.72;
}

.paper h2 {
  margin: 36px 0 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(226, 232, 243, 0.72);
}

.paper h3 {
  margin: 22px 0 8px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.paper ul,
.paper ol {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 1.02rem;
  line-height: 1.72;
}

.paper li {
  margin-bottom: 7px;
}

/* Abstract-style opening question */
.abstract {
  margin: 0 0 22px;
  padding: 16px 18px;
  border-left: 2px solid var(--blue);
  background: rgba(120, 189, 228, 0.06);
}

.abstract p {
  margin: 0;
  color: var(--white);
  font-size: 1.05rem;
  line-height: 1.65;
}

/* Key-value block for project metadata */
.facts {
  margin: 0 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.facts div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.93rem;
}

.facts div:last-child {
  border-bottom: 0;
}

.facts dt {
  margin: 0;
  color: rgba(226, 232, 243, 0.6);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.75rem;
  padding-top: 2px;
}

.facts dd {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.55;
}

@media (max-width: 620px) {
  .facts div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

/* Numbered source list */
.sources {
  margin: 0 0 16px;
  padding-left: 22px;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--text-dim);
}

.sources li {
  margin-bottom: 10px;
}

.sources .pub {
  color: rgba(226, 232, 243, 0.62);
}

.note {
  margin: 0 0 16px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 3px;
  color: rgba(226, 232, 243, 0.72);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Figure with caption and source credit */
.paper figure {
  margin: 24px 0;
}

.paper figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 3px;
}

.paper figcaption {
  margin-top: 8px;
  color: rgba(226, 232, 243, 0.62);
  font-size: 0.85rem;
  line-height: 1.55;
}

.paper figcaption b {
  color: var(--text-dim);
  font-weight: 700;
}
