:root {
  --bg: #f5f1e4;
  --bg-soft: #efe8d5;
  --panel: rgba(255, 255, 255, 0.6);
  --panel-strong: rgba(255, 255, 255, 0.78);
  --text: #17361d;
  --muted: #47634d;
  --line: rgba(18, 63, 26, 0.12);
  --green: #123f1a;
  --green-bright: #09a53c;
  --green-soft: #a9cfaa;
  --shadow: 0 24px 60px rgba(18, 63, 26, 0.12);
  --radius: 28px;
  --header-anchor-offset: 50px;
}

section[id],
main[id],
[id].anchor-target {
  scroll-margin-top: var(--header-anchor-offset);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-anchor-offset);
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(169, 207, 170, 0.55), transparent 30%),
    radial-gradient(circle at top right, rgba(9, 165, 60, 0.08), transparent 22%),
    linear-gradient(180deg, #f5f1e4 0%, #f0eadb 100%);
}

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

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 36px;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 18px;
  margin-bottom: 28px;
  background: rgba(245, 241, 228, 0.8);
  border: 1px solid rgba(18, 63, 26, 0.08);
  border-radius: 999px;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(18, 63, 26, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.brand-name,
.brand-tag {
  display: block;
}

.brand-name {
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-tag {
  color: var(--muted);
  font-size: 0.93rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-nav a,
.footer-links a {
  color: var(--text);
  text-decoration: none;
}

.site-nav a:hover,
.footer-links a:hover,
.project-card a:hover {
  text-decoration: underline;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 26px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero-copy,
.hero-card,
.panel,
.project-card,
.contact-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.hero-copy {
  --hero-logo-space: clamp(250px, 34%, 390px);
  padding: 56px;
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(9, 165, 60, 0.18), transparent 70%);
  pointer-events: none;
}

.hero-copy > :not(.hero-logo-area) {
  position: relative;
  z-index: 2;
}

.hero-text,
.hero-actions {
  max-width: min(58ch, calc(100% - var(--hero-logo-space) - 26px));
}

.hero-logo-area {
  position: absolute;
  top: 40%;
  right: 10%;
  transform: translateY(-50%);
  width: min(42%, 360px);
  aspect-ratio: 3517 / 2022;
  z-index: 1;
}

.interactive-logo {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.24s ease, filter 0.24s ease;
}

.interactive-logo__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.interactive-logo__outline,
.interactive-logo__veins,
.interactive-logo__nodes {
  opacity: 0.96;
  filter: drop-shadow(0 18px 26px rgba(18, 63, 26, 0.12));
}

.interactive-logo__outline {
  inset: 0;
  z-index: 1;
}

.interactive-logo__veins {
  left: 0.2275%;
  top: 8.7043%;
  width: 94.5124%;
  height: 89.1197%;
  z-index: 2;
}

.interactive-logo__overlay {
  inset: 0;
  z-index: 3;
  overflow: visible;
}

.interactive-logo__nodes {
  left: 8.7575%;
  top: 6.2315%;
  width: 84.2195%;
  height: 86.3501%;
  z-index: 4;
}


.hero-copy:hover .interactive-logo {
  transform: translateY(-1px) scale(1.01);
}

.hero-copy:hover .interactive-logo__outline,
.hero-copy:hover .interactive-logo__veins,
.hero-copy:hover .interactive-logo__nodes {
  filter: drop-shadow(0 22px 34px rgba(18, 63, 26, 0.14));
}

.graph-edge {
  fill: none;
  stroke: rgba(2, 160, 52, 0.92);
  stroke-width: 34;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.16s ease, stroke-width 0.16s ease, filter 0.16s ease;
  filter: drop-shadow(0 0 6px rgba(9, 165, 60, 0.16));
}

.graph-edge.is-interrupted {
  opacity: 0;
}

.graph-edge-dynamic {
  stroke-width: 36;
  filter: drop-shadow(0 0 10px rgba(9, 165, 60, 0.28));
  animation: connectionGlow 2.8s ease-in-out infinite;
}

#interactiveConnections path {
  fill: none;
  stroke: rgba(9, 165, 60, 0.88);
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(9, 165, 60, 0.2));
  animation: connectionGlow 2.8s ease-in-out infinite;
}

#interactiveNodeHighlights {
  display: none;
}

#interactiveCursorNode {
  fill: #225312;
  stroke: #225312;
  stroke-width: 16;
  filter: drop-shadow(0 0 10px rgba(9, 165, 60, 0.25));
  transition: opacity 0.18s ease;
  transform-box: fill-box;
  transform-origin: center;
  animation: cursorPulse 2.2s ease-in-out infinite;
  opacity: 0;
}

@keyframes connectionGlow {
  0%, 100% {
    stroke: rgba(2, 160, 52, 0.82);
    filter: drop-shadow(0 0 6px rgba(9, 165, 60, 0.14));
  }
  50% {
    stroke: rgba(2, 160, 52, 0.98);
    filter: drop-shadow(0 0 12px rgba(9, 165, 60, 0.28));
  }
}

@keyframes cursorPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(9, 165, 60, 0.18));
  }
  50% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 16px rgba(9, 165, 60, 0.3));
  }
}

.eyebrow,
.section-label,
.status-dot,
.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow,
.section-label,
.coming-soon {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(18, 63, 26, 0.08);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--green);
}

.hero h1,
.section-heading h2,
.panel h2,
.contact-panel h2 {
  margin: 18px 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(3.2rem, 8vw, 4.2rem);
  max-width: 9ch;
}

.hero-text,
.hero-card p,
.panel p,
.project-card p,
.site-footer p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-text {
  max-width: 58ch;
  margin: 22px 0 0;
  font-size: 1.07rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 14px 32px rgba(18, 63, 26, 0.22);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.7);
  color: var(--green);
  border: 1px solid rgba(18, 63, 26, 0.12);
}

.hero-card {
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.84), rgba(255,255,255,0.7)),
    linear-gradient(135deg, rgba(169, 207, 170, 0.55), rgba(255,255,255,0.1));
}

.hero-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 600;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #1cc84e;
  box-shadow: 0 0 0 6px rgba(28, 200, 78, 0.15);
}

.hero-card h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-top: 20px;
}

.signal-list,
.feature-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.signal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.signal-list li,
.feature-list li {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(18, 63, 26, 0.06);
  border: 1px solid rgba(18, 63, 26, 0.08);
}

.cover-strip {
  margin-bottom: 28px;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.cover-strip img {
  width: 100%;
  max-height: 190px;
  object-fit: cover;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 22px;
  margin-bottom: 28px;
}

.panel {
  padding: 28px;
  background: var(--panel-strong);
}

.panel-large {
  grid-column: span 1;
}

.panel h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.projects {
  margin-bottom: 28px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.project-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  padding: 28px;
  background: var(--panel-strong);
}

.project-card h3 {
  margin: 16px 0 0;
  font-size: 1.5rem;
}

.project-card a {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
  color: var(--green);
}

.project-card-muted {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.68)),
    linear-gradient(135deg, rgba(169, 207, 170, 0.25), rgba(255,255,255,0.05));
}

.contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(18, 63, 26, 0.93), rgba(9, 165, 60, 0.74));
  color: #fff;
}

.contact-panel .section-label {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.contact-panel h2 {
  margin-top: 14px;
  max-width: 12ch;
}

.contact-panel .button-primary {
  background: #fff;
  color: var(--green);
  box-shadow: none;
}

.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 4px 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-weight: 600;
}

@media (max-width: 980px) {
  .hero,
  .content-grid,
  .project-cards {
    grid-template-columns: 1fr;
  }

  .contact-panel,
  .site-footer,
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-copy {
    --hero-logo-space: 0px;
    padding: 34px;
  }

  .hero-text,
  .hero-actions {
    max-width: 58ch;
  }

  .hero-logo-area {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    width: min(340px, 72%);
    margin: 26px auto 0;
  }

  .signal-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 12px;
  }

  .site-header {
    padding: 16px;
    border-radius: 28px;
  }

  .site-nav {
    gap: 12px;
  }

  .hero-copy,
  .hero-card,
  .panel,
  .project-card,
  .contact-panel {
    padding: 22px;
  }

  .hero-logo-area {
    width: min(300px, 86%);
    margin-top: 22px;
  }

  .signal-list {
    grid-template-columns: 1fr;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }
}

.landsat-wordmark {
  margin: 26px 0 34px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.landsat-name {
  display: flex;
  width: 100%;
  gap: 10px;
  align-items: stretch;
  justify-content: center;
}

.landsat-row {
  display: contents;
}

.landsat-letter {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: clamp(118px, 14vw, 170px);
  margin: 0;
  overflow: visible;
  border: 0;
  background: rgba(18, 63, 26, 0.08);
  box-shadow: 0 18px 42px rgba(18, 63, 26, 0.14);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.landsat-letter:first-child {
  border-radius: 34px 0 0 34px;
}

.landsat-letter:last-child {
  border-radius: 0 34px 34px 0;
}

.landsat-letter:hover {
  filter: saturate(1.06) contrast(1.03);
}

.landsat-letter:focus-visible,
.landsat-letter.is-active {
  z-index: 5;
  transform: translateY(-2px);
  box-shadow: 0 24px 52px rgba(18, 63, 26, 0.2);
  outline: 3px solid rgba(9, 165, 60, 0.34);
  outline-offset: 4px;
}

.landsat-letter img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.landsat-letter:first-child img {
  border-radius: 34px 0 0 34px;
}

.landsat-letter:last-child img {
  border-radius: 0 34px 34px 0;
}

.landsat-row-obliqua .landsat-letter:last-child,
.landsat-row-data .landsat-letter:first-child,
.landsat-row-obliqua .landsat-letter:last-child img,
.landsat-row-data .landsat-letter:first-child img {
  border-radius: 0;
}

.landsat-letter figcaption {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  width: max-content;
  max-width: min(240px, 72vw);
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(18, 63, 26, 0.14);
  border-radius: 16px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 34px rgba(18, 63, 26, 0.18);
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}

.landsat-letter figcaption::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid rgba(18, 63, 26, 0.14);
  border-bottom: 1px solid rgba(18, 63, 26, 0.14);
  transform: translate(-50%, -6px) rotate(45deg);
}

.landsat-letter.is-active figcaption {
  opacity: 1;
  transform: translate(-50%, 0);
}

.landsat-letter figcaption strong {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.landsat-letter figcaption span {
  font-size: 0.78rem;
  line-height: 1.3;
}

.footer-credit {
  max-width: 62ch;
  font-size: 0.78rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .landsat-name {
    flex-direction: column;
    gap: 8px;
  }

  .landsat-row {
    display: flex;
    gap: 8px;
    width: 100%;
  }

  .landsat-letter {
    height: clamp(92px, 22vw, 130px);
  }

  .landsat-row-obliqua .landsat-letter:first-child,
  .landsat-row-data .landsat-letter:first-child,
  .landsat-row-obliqua .landsat-letter:first-child img,
  .landsat-row-data .landsat-letter:first-child img {
    border-radius: 26px 0 0 26px;
  }

  .landsat-row-obliqua .landsat-letter:last-child,
  .landsat-row-data .landsat-letter:last-child,
  .landsat-row-obliqua .landsat-letter:last-child img,
  .landsat-row-data .landsat-letter:last-child img {
    border-radius: 0 26px 26px 0;
  }

  .landsat-letter figcaption {
    bottom: calc(100% + 9px);
  }
}

@media (max-width: 440px) {
  .landsat-name,
  .landsat-row {
    gap: 5px;
  }

  .landsat-letter {
    height: clamp(76px, 22vw, 98px);
  }
}

#focus {
  display: flex;
  flex-direction: column;
}

#focus .feature-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

#focus .feature-list li {
  flex: 1;
  display: flex;
  align-items: center;
}

html {
  overflow-x: clip;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

/* CookieYes banner: match theme */
.cky-consent-container,
.cky-consent-container * {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.cky-consent-container .cky-consent-bar {
  background: var(--card) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 24px !important;
  box-shadow: var(--shadow) !important;
  backdrop-filter: blur(22px) !important;
}

.cky-consent-container .cky-title,
.cky-consent-container .cky-notice-des,
.cky-consent-container [data-cky-tag="powered-by"] {
  color: var(--text) !important;
}

.cky-consent-container .cky-notice-des p,
.cky-consent-container [data-cky-tag="powered-by"] {
  color: var(--muted) !important;
}

.cky-consent-container .cky-btn {
  border-radius: 16px !important;
  font-weight: 700 !important;
  padding: 12px 16px !important;
}

.cky-consent-container .cky-btn-accept {
  background: linear-gradient(135deg, #5b9440, #3f7d2f) !important;
  border-color: transparent !important;
  color: #f8fbf3 !important;
}

.cky-consent-container .cky-btn-customize,
.cky-consent-container .cky-btn-reject {
  background: var(--chip-bg) !important;
  border-color: var(--chip-border) !important;
  color: var(--text) !important;
}

.cky-consent-container .cky-banner-btn-close {
  background: var(--chip-bg) !important;
  border: 1px solid var(--chip-border) !important;
  border-radius: 999px !important;
}

.cky-consent-container .cky-banner-btn-close img {
  filter: invert(22%) sepia(21%) saturate(1125%) hue-rotate(61deg) brightness(92%) contrast(87%) !important;
}

/* Light theme */
.cky-modal .cky-preference-center,
.cky-modal .cky-footer-wrapper {
  background: rgba(252, 248, 239, 0.97) !important;
  border-color: rgba(50, 95, 34, 0.14) !important;
}

.cky-modal .cky-accordion,
.cky-modal .cky-audit-table {
  background: rgba(255, 251, 243, 0.82) !important;
  border-color: rgba(50, 95, 34, 0.14) !important;
}

.cky-modal .cky-btn-accept,
.cky-modal .cky-btn-preferences {
  background: linear-gradient(135deg, #5b9440, #3f7d2f) !important;
  color: #f8fbf3 !important;
}

.cky-modal .cky-policy,
.cky-modal .cky-show-desc-btn {
  color: #3f7d2f !important;
}

.cky-modal .cky-btn-close img {
  filter: invert(22%) sepia(21%) saturate(1125%) hue-rotate(61deg) brightness(92%) contrast(87%) !important;
}

.cky-modal .cky-footer-shadow {
  background: linear-gradient(180deg, rgba(252, 248, 239, 0), rgba(252, 248, 239, 0.97) 100%) !important;
}

.cky-modal .cky-preference-center,
.cky-modal .cky-footer-wrapper {
  background: rgba(252, 248, 239, 0.97) !important;
  border-color: rgba(50, 95, 34, 0.14) !important;
}

.cky-modal .cky-accordion,
.cky-modal .cky-audit-table {
  background: rgba(255, 251, 243, 0.82) !important;
  border-color: rgba(50, 95, 34, 0.14) !important;
}

.cky-modal .cky-btn-accept,
.cky-modal .cky-btn-preferences {
  background: linear-gradient(135deg, #5b9440, #3f7d2f) !important;
  color: #f8fbf3 !important;
}

.cky-modal .cky-policy,
.cky-modal .cky-show-desc-btn {
  color: #3f7d2f !important;
}

.cky-modal .cky-btn-close img {
  filter: invert(22%) sepia(21%) saturate(1125%) hue-rotate(61deg) brightness(92%) contrast(87%) !important;
}

.cky-modal .cky-footer-shadow {
  background: linear-gradient(180deg, rgba(252, 248, 239, 0), rgba(252, 248, 239, 0.97) 100%) !important;
}

.cky-modal {
  background: transparent !important;
}

.cky-switch input[type="checkbox"]:checked {
    background-color: #47634d !important;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.footer-logo {
  width: 100px;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

@media (max-width: 640px) {
  .footer-logo {
    width: 100px;
    height: auto;
  }
}



/* Hide the real cursor only while the logo is acting as the cursor node. */
.hero-copy.is-logo-active,
.hero-copy.is-logo-active *,
.hero-copy.is-logo-active a,
.hero-copy.is-logo-active button,
.hero-copy.is-logo-active [role="button"] {
  cursor: none !important;
}

body {
  cursor: url("./assets/cursor.png") 0 0, auto;
}

a,
button,
[role="button"],
.landsat-letter {
  cursor: url("./assets/click.png") 0 0, pointer;
}


/* Project cards can now hold research case studies as well as web projects. */
.project-cards {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Rail network project page styles */
:root {
  --rail-blue: #335c67;
  --rail-gold: #c99534;
  --rail-red: #9d3f36;
  --rail-ink: #17361d;
}

.rail-shell .site-header {
  margin-bottom: 26px;
}

.rail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 26px;
  margin-bottom: 28px;
}

.rail-hero__copy,
.rail-hero__card,
.map-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.rail-hero__copy {
  min-height: 520px;
  padding: 56px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.76), rgba(255,255,255,0.44)),
    radial-gradient(circle at 78% 18%, rgba(9, 165, 60, 0.16), transparent 28%),
    linear-gradient(160deg, rgba(18,63,26,0.08), rgba(201,149,52,0.10));
  overflow: hidden;
  position: relative;
}

.rail-hero__copy::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -120px;
  width: 420px;
  height: 420px;
  border: 2px solid rgba(18, 63, 26, 0.12);
  border-radius: 50%;
  box-shadow: inset 0 0 0 30px rgba(18, 63, 26, 0.035);
}

.rail-hero__copy > * {
  position: relative;
  z-index: 1;
}

.rail-hero h1,
.framework-panel h2,
.map-heading h2,
.result-summary h2,
.next-panel h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.rail-hero h1 {
  max-width: 11ch;
  margin: 18px 0 0;
  font-size: clamp(3.1rem, 7vw, 5.8rem);
}

.rail-hero__card {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.68)),
    linear-gradient(135deg, rgba(169, 207, 170, 0.42), rgba(201,149,52,0.14));
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.metric-grid div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(18,63,26,0.06);
  border: 1px solid rgba(18,63,26,0.08);
}

.metric-grid strong {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: -0.04em;
  color: var(--green);
}

.metric-grid span,
.rail-hero__card p,
.step-grid p,
.map-heading p,
.result-summary p,
.next-grid p {
  color: var(--muted);
  line-height: 1.65;
}

.rail-intro {
  margin-bottom: 28px;
}

.framework-panel,
.map-section,
.results-grid,
.next-panel {
  margin-bottom: 28px;
}

.framework-panel,
.next-panel {
  padding: 30px;
  background: var(--panel-strong);
}

.compact-heading h2,
.map-heading h2,
.next-panel h2,
.result-summary h2 {
  margin: 16px 0 0;
  font-size: clamp(2.25rem, 4.8vw, 4rem);
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.step-grid article,
.next-grid article {
  padding: 20px;
  border-radius: 22px;
  background: rgba(18,63,26,0.055);
  border: 1px solid rgba(18,63,26,0.08);
}

.step-grid span {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.step-grid h3,
.next-grid h3 {
  margin: 16px 0 8px;
  font-size: 1.08rem;
}

.map-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.45fr);
  align-items: end;
  gap: 24px;
  margin-bottom: 18px;
}

.map-card {
  overflow: hidden;
  background: rgba(255,255,255,0.78);
}

.rail-map {
  width: 100%;
  height: min(76vh, 720px);
  min-height: 520px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #e8eadf;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  padding: 16px 18px;
  border-top: 1px solid rgba(18,63,26,0.10);
  color: var(--muted);
  font-size: 0.9rem;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-line {
  display: inline-block;
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: var(--green);
}

.legend-line.backbone,
.legend-line.spoke,
.legend-line.augment { background: #123f1a; }
.map-legend.rail-colors-enabled .legend-line.backbone { background: #123f1a; }
.map-legend.rail-colors-enabled .legend-line.spoke { background: #5b9440; }
.map-legend.rail-colors-enabled .legend-line.augment { background: #c99534; }
.legend-line.flight-good { background: #246b45; }
.legend-line.flight-okay { background: #b57422; }
.legend-line.flight-poor { background: #9d3f36; }
.legend-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #123f1a;
  box-shadow: 0 0 0 5px rgba(18,63,26,0.15);
}

.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1fr);
  gap: 22px;
}

.result-summary,
.corridor-panel {
  background: var(--panel-strong);
}

.corridor-panel__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

#corridorFilter {
  min-height: 42px;
  border: 1px solid rgba(18,63,26,0.14);
  border-radius: 14px;
  background: rgba(255,255,255,0.78);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
  font-weight: 700;
}

.corridor-table-wrap {
  max-height: 430px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(18,63,26,0.10);
}

.corridor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.corridor-table th,
.corridor-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(18,63,26,0.08);
}

.corridor-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f5f1e4;
  color: var(--green);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-width: 62px;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.badge.good { background: rgba(36,107,69,0.13); color: #246b45; }
.badge.okay { background: rgba(181,116,34,0.15); color: #8a5617; }
.badge.poor { background: rgba(157,63,54,0.14); color: #8d3029; }

.next-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.next-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rail-contact h2 {
  max-width: 16ch;
}

.leaflet-control-layers,
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  font-family: Inter, system-ui, sans-serif;
}

.leaflet-control-layers {
  border: 0 !important;
  border-radius: 18px !important;
  box-shadow: 0 16px 34px rgba(18,63,26,0.16) !important;
}

.leaflet-popup-content-wrapper {
  border-radius: 18px;
}

.map-popup-title {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
  font-weight: 800;
}

@media (max-width: 980px) {
  .rail-hero,
  .map-heading,
  .results-grid,
  .next-panel {
    grid-template-columns: 1fr;
  }

  .step-grid,
  .next-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rail-hero__copy {
    min-height: auto;
    padding: 34px;
  }
}

@media (max-width: 640px) {
  .rail-hero__copy,
  .rail-hero__card,
  .framework-panel,
  .next-panel {
    padding: 22px;
  }

  .metric-grid,
  .step-grid,
  .next-grid {
    grid-template-columns: 1fr;
  }

  .rail-map {
    min-height: 480px;
  }

  .corridor-panel__top {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Page-specific navigation kept outside the shared site header. */
.project-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -12px 0 24px;
}

.project-subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(18, 63, 26, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.project-subnav a:hover {
  text-decoration: underline;
}

/* Leaflet fallback styles.
   These make the map render correctly even if the external Leaflet CSS is blocked,
   slow to load, or previewed in an environment that strips CDN styles. */
.rail-map.leaflet-container {
  position: relative;
  overflow: hidden;
  outline: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: #e8eadf;
}

.rail-map .leaflet-pane,
.rail-map .leaflet-map-pane,
.rail-map .leaflet-tile-pane,
.rail-map .leaflet-overlay-pane,
.rail-map .leaflet-shadow-pane,
.rail-map .leaflet-marker-pane,
.rail-map .leaflet-tooltip-pane,
.rail-map .leaflet-popup-pane {
  position: absolute;
  left: 0;
  top: 0;
}

.rail-map .leaflet-map-pane,
.rail-map .leaflet-tile,
.rail-map .leaflet-marker-icon,
.rail-map .leaflet-marker-shadow,
.rail-map .leaflet-tile-container,
.rail-map .leaflet-pane > svg,
.rail-map .leaflet-pane > canvas,
.rail-map .leaflet-zoom-box,
.rail-map .leaflet-image-layer,
.rail-map .leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}

.rail-map .leaflet-tile,
.rail-map .leaflet-image-layer {
  border: 0;
  max-width: none !important;
  max-height: none !important;
}

.rail-map .leaflet-tile {
  width: 256px;
  height: 256px;
  user-select: none;
}

.rail-map .leaflet-tile-container {
  pointer-events: none;
}

.rail-map .leaflet-control-container .leaflet-top,
.rail-map .leaflet-control-container .leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}

.rail-map .leaflet-top { top: 0; }
.rail-map .leaflet-right { right: 0; }
.rail-map .leaflet-bottom { bottom: 0; }
.rail-map .leaflet-left { left: 0; }

.rail-map .leaflet-control {
  position: relative;
  z-index: 1000;
  pointer-events: auto;
  float: left;
  clear: both;
  margin: 10px;
}

.rail-map .leaflet-right .leaflet-control { float: right; }
.rail-map .leaflet-top .leaflet-control { margin-top: 10px; }
.rail-map .leaflet-bottom .leaflet-control { margin-bottom: 10px; }
.rail-map .leaflet-left .leaflet-control { margin-left: 10px; }
.rail-map .leaflet-right .leaflet-control { margin-right: 10px; }

.rail-map .leaflet-control-layers,
.rail-map .leaflet-bar {
  border: 1px solid rgba(18, 63, 26, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(18, 63, 26, 0.16);
}

.rail-map .leaflet-bar a {
  display: block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  text-decoration: none;
  color: var(--green);
  font-weight: 800;
}

.rail-map .leaflet-control-layers {
  padding: 10px 12px;
  color: var(--text);
  line-height: 1.45;
}

.rail-map .leaflet-control-layers label {
  display: block;
  margin: 3px 0;
}

.rail-map .rail-color-toggle {
  padding: 8px 12px;
  color: var(--text);
  line-height: 1.35;
}

.rail-map .rail-color-toggle label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  white-space: nowrap;
  font-weight: 600;
}

.rail-map .rail-color-toggle input {
  accent-color: #8a7a55;
}

.rail-map .leaflet-popup {
  position: absolute;
  text-align: center;
  margin-bottom: 20px;
}

.rail-map .leaflet-popup-content-wrapper {
  padding: 1px;
  text-align: left;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(18, 63, 26, 0.18);
}

.rail-map .leaflet-popup-content {
  margin: 13px 18px;
  line-height: 1.45;
}

.rail-map .leaflet-popup-tip-container {
  width: 40px;
  height: 20px;
  position: absolute;
  left: 50%;
  margin-left: -20px;
  overflow: hidden;
  pointer-events: none;
}

.rail-map .leaflet-popup-tip {
  width: 17px;
  height: 17px;
  padding: 1px;
  margin: -10px auto 0;
  transform: rotate(45deg);
  background: #fff;
  box-shadow: 0 12px 32px rgba(18, 63, 26, 0.18);
}

.rail-map .leaflet-interactive {
  cursor: pointer;
}

.rail-map .leaflet-control-attribution {
  padding: 4px 8px;
  background: rgba(255,255,255,0.82);
  font-size: 11px;
}

/* Leaflet pane stacking fix. Required when the local fallback styles are used,
   otherwise basemap tiles can sit above vector rail layers. */
.rail-map .leaflet-tile-pane { z-index: 200; }
.rail-map .leaflet-overlay-pane { z-index: 400; }
.rail-map .leaflet-shadow-pane { z-index: 500; }
.rail-map .leaflet-marker-pane { z-index: 600; }
.rail-map .leaflet-tooltip-pane { z-index: 650; }
.rail-map .leaflet-popup-pane { z-index: 700; }
.rail-map .leaflet-control-container { position: absolute; inset: 0; z-index: 1000; pointer-events: none; }
.rail-map .leaflet-control { pointer-events: auto; }
