/* =========================================================
   New York ⇄ Boston Trains — "The Shoreline Run"
   Palette sourced from the real corridor:
   navy   = Acela livery body      #0a1f3d
   silver = Acela brushed-metal    #c9d2d8
   orange = accent, unified site-wide             #FB7D0D
   teal   = Long Island Sound water, used sparingly              #3d6b6b
   ========================================================= */

:root {
  --navy: #0a1f3d;
  --navy-deep: #071527;
  --silver: #c9d2d8;
  --silver-soft: #e8ecee;
  --brick: #FB7D0D;
  --brick-dark: #D9660A;
  --teal: #3d6b6b;
  --teal-light: #5c8c8c;
  --ink: #1c2126;
  --paper: #f7f6f3;
  --paper-dim: #eeece6;
  --line: #d9d5cc;
  --serif: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --maxw: 1120px;
  --spine-w: 64px;

  /* Unified with --brick — same orange, kept as its own name since
     these variables are used for header/hero button-specific rules. */
  --hero-orange: #FB7D0D;
  --hero-orange-dark: #D9660A;
  --hero-blue: #2f5fdb;
  --hero-navy: #0d2154;
  --hero-stats-bg: #aab9ea;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 108px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 0; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
a { color: var(--teal); }
a:hover { color: var(--brick); }

.container {
  max-width: none;
  margin: 0 auto;
  padding: 0 40px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: #fdfcfa;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  height: 108px;
}
.logo {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.logo-img {
  height: 80px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 0.92rem;
}
.main-nav a {
  color: #3a3f45;
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  font-weight: 500;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--hero-orange);
  transition: right 0.25s ease;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { right: 0; }
a.nav-cta-mobile { display: none; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.btn-header-cta {
  white-space: nowrap;
  font-size: 0.85rem;
  padding: 10px 18px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: filter 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--brick);
  color: #fff;
  padding: 11px 22px;
}
.btn-primary:hover { filter: brightness(1.08); color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--silver-soft);
  border-color: rgba(201,210,216,0.4);
  padding: 8px 16px;
  font-size: 0.85rem;
}
.btn-outline:hover { border-color: var(--silver-soft); color: #fff; }

.btn-orange {
  background: var(--hero-orange);
  color: #fff;
  border-radius: 24px;
  padding: 10px 22px;
  font-size: 0.88rem;
}
.btn-orange:hover { background: var(--hero-orange-dark); filter: none; color: #fff; }
.btn-orange-outline {
  background: #fff;
  color: var(--hero-navy);
  border-radius: 24px;
  padding: 13px 26px;
  font-weight: 700;
}
.btn-orange-outline:hover { filter: brightness(0.97); color: var(--hero-navy); }

/* ---------- coastline spine ---------- */
.coastline-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--spine-w);
  height: 100%;
  pointer-events: none;
  z-index: 5;
  display: none;
  overflow: hidden;
}
.coastline-layer svg { width: 100%; height: 100%; }
#coastline-path {
  fill: none;
  stroke: var(--silver);
  stroke-width: 2;
  opacity: 0.55;
}
#coastline-path-progress {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2.5;
}
.coastline-dot {
  fill: var(--brick);
  stroke: var(--paper);
  stroke-width: 2;
}
.coastline-station {
  fill: var(--navy-deep);
  stroke: var(--silver);
  stroke-width: 1.5;
}
.coastline-station.in-view {
  animation: pulse-station 1.6s ease-in-out infinite;
}
@keyframes pulse-station {
  0%, 100% { r: 5; opacity: 1; }
  50% { r: 7; opacity: 0.7; }
}

@media (min-width: 1180px) {
  .coastline-layer { display: block; }
  main, .site-header .container, .site-footer .container { margin-left: var(--spine-w); max-width: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-navy);
  padding: 64px 0 0;
}
.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  padding-bottom: 56px;
}
.hero-copy { max-width: 560px; }
.hero h1 {
  font-family: var(--sans);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: #fff;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero h1 .hl { color: var(--hero-orange); }
.hero-subline {
  color: #d7ddf0;
  font-family: var(--sans);
  max-width: 520px;
  margin: 0 0 28px;
  font-size: 1.02rem;
  line-height: 1.65;
}
.hero-photo-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  aspect-ratio: 16 / 11;
}
.hero-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-photo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--silver-soft);
  font-size: 0.85rem;
  background: linear-gradient(135deg, #16305e 0%, var(--hero-navy) 60%, #0a1830 100%);
  border: 1px dashed rgba(201,210,216,0.35);
}

.hero-shoreline-accent { display: none; }
.hero-train-svg { display: none; }

.widget-section {
  position: relative;
  z-index: 3;
  padding: 26px 0 30px;
}
.widget-wrap {
  max-width: 1120px;
  margin: 0 auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(10,20,50,0.16);
  padding: 16px 24px;
}
#firebird-search-widget { min-height: 60px; }
/* The widget's own internal layout responds to the browser viewport width,
   not to this wrap's width. On wide viewports it renders a single-row
   desktop layout that needs more room than 1120px, so fields overlap/clip.
   Widen the card on desktop, capped so it never exceeds the viewport. */
@media (min-width: 761px) {
  .widget-wrap { max-width: min(1380px, calc(100vw - 48px)); }
}

/* ---------- quick facts ---------- */
.quickfacts {
  background: var(--hero-stats-bg);
  padding: 30px 0 26px;
}
.quickfacts-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  text-align: left;
}
.qf { border-left: 1px solid rgba(13,33,84,0.18); padding-left: 18px; }
.qf:first-child { border-left: none; padding-left: 0; }
.qf-label {
  display: block;
  color: var(--hero-navy);
  opacity: 0.7;
  font-size: 0.72rem;
  line-height: 1.35;
  min-height: 2.7em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  font-weight: 600;
}
.qf-value {
  display: block;
  font-family: var(--sans);
  color: var(--hero-navy);
  font-size: 1.25rem;
  font-weight: 700;
}

/* ---------- generic section ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--paper-dim); }
.section-intro { max-width: 720px; color: #454a4f; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brick);
  font-weight: 600;
  margin-bottom: 10px;
}
.stat-num { display: inline-block; }

/* ---------- route map ---------- */
.routemap-photo-wrap {
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0 20px;
}
.routemap-photo-wrap img {
  width: 100%;
  height: auto;
  display: block;
}
.routemap-photo-fallback {
  width: 100%;
  aspect-ratio: 21 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: #6b6f73;
  font-size: 0.85rem;
  background: var(--paper-dim);
  border: 1px dashed var(--line);
  border-radius: 10px;
}

/* ---------- video banner ---------- */
.video-banner {
  position: relative;
  height: 62vh;
  min-height: 380px;
  max-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-banner-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.video-banner-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,21,39,0.55) 0%, rgba(7,21,39,0.35) 45%, rgba(7,21,39,0.75) 100%);
  z-index: 1;
}
.video-banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 680px;
}
.video-banner-content h2 {
  color: #fff;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  margin-bottom: 16px;
}
.video-banner-content p {
  color: var(--silver-soft);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 26px;
}

/* ---------- comparison table ---------- */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.95rem;
}
caption { text-align: left; font-size: 0.85rem; color: #6b6f73; padding-bottom: 8px; }
th, td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
thead th {
  background: var(--navy);
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.92rem;
}
tbody tr {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
tbody tr.row-in { opacity: 1; transform: translateY(0); }
tbody tr:nth-child(even) { background: var(--paper-dim); }
.fare-dots { letter-spacing: 2px; color: var(--brick); font-weight: 700; }

/* compare-table palette: 1A202C / 486284 / FB7D0D */
.compare-table {
  border: 1px solid #486284;
  border-radius: 6px;
  overflow: hidden;
}
.compare-table thead th {
  background: #1A202C;
  color: #fff;
  border-bottom: 3px solid #FB7D0D;
}
.compare-table tbody th[scope="row"] {
  background: #486284;
  color: #fff;
  font-weight: 700;
}
.compare-table tbody td {
  background: #fff;
  color: #1A202C;
}
.compare-table tbody tr:nth-child(even) td { background: #eef1f5; }
.compare-table tbody th, .compare-table tbody td {
  border-bottom: 1px solid #d7dde5;
}
.compare-table tbody tr:hover th[scope="row"] { background: #3a4d68; }
.compare-table tbody tr:hover td { background: rgba(251, 125, 13, 0.08); }

/* ---------- train classes gallery ---------- */
.subheading {
  font-family: var(--serif);
  color: var(--navy);
  border-bottom: 2px solid var(--brick);
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.classgroup {
  margin-top: 44px;
  background: linear-gradient(135deg, #0A1F3D 0%, #12294f 55%, #1a3767 100%);
  border-radius: 12px;
  padding: 32px;
}
.classgroup:first-of-type { margin-top: 36px; }
.classgroup .subheading { color: #fff; border-bottom-color: var(--brick); }
.classgroup .section-intro { color: var(--silver-soft); }
.classcard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 18px;
}
.classcard-grid-4 { grid-template-columns: repeat(4, 1fr); }
.classcard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.classcard img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.classcard-body { padding: 16px 18px 20px; }
.classcard-train {
  display: block;
  color: var(--teal);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 6px;
}
.classcard-body h4 { margin-bottom: 10px; }
.classcard-features {
  margin: 0;
  padding: 0;
  list-style: none;
}
.classcard-features li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
  color: #454a4f;
  font-size: 0.88rem;
  line-height: 1.45;
}
.classcard-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brick);
}
.classcard-features li:last-child { margin-bottom: 0; }

/* ---------- stations guide ---------- */
.stations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.station-badge {
  display: block;
  height: 200px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto 24px;
}
.station-item { margin-bottom: 16px; }
.station-item h4 { margin-bottom: 3px; }
.station-item p { margin: 0; color: #454a4f; font-size: 0.95rem; }

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

/* ---------- split-flap departure board ---------- */
.splitflap-wrap {
  background: linear-gradient(180deg, #08090b 0%, #101317 100%);
  border: 1px solid #2b2f36;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(201, 210, 216, 0.06), 0 24px 50px rgba(0, 0, 0, 0.35);
  padding: 18px 20px 20px;
  font-family: "SF Mono", "DB LCD Temp", ui-monospace, "Courier New", monospace;
}
.splitflap-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(201, 210, 216, 0.12);
}
.splitflap-live {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--brick);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brick);
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(251, 125, 13, 0.5); }
  50% { opacity: 0.45; box-shadow: 0 0 0 4px rgba(251, 125, 13, 0); }
}
.splitflap-clock {
  color: var(--silver);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-left: auto;
  opacity: 0.85;
}
.splitflap-mute {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(201, 210, 216, 0.2);
  background: transparent;
  color: var(--silver);
  opacity: 0.7;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.splitflap-mute:hover { opacity: 1; background: rgba(201, 210, 216, 0.08); }
.splitflap-mute[aria-pressed="true"] { color: var(--teal-light); opacity: 1; border-color: var(--teal-light); }

.splitflap-board { display: flex; flex-direction: column; overflow-x: auto; }
.splitflap-row {
  display: grid;
  grid-template-columns: 145px 1fr 1fr 18px;
  align-items: center;
  gap: 14px;
  padding: 10px 6px;
  border-bottom: 1px solid rgba(201, 210, 216, 0.08);
  cursor: pointer;
  transition: background 0.15s ease;
  min-width: 420px;
}
.splitflap-row:last-of-type { border-bottom: none; }
.splitflap-row:hover, .splitflap-row:focus-visible {
  background: rgba(201, 210, 216, 0.05);
  outline: none;
}
.splitflap-colheads {
  cursor: default;
  padding-top: 0;
  padding-bottom: 8px;
}
.splitflap-colheads .sf-col {
  color: var(--silver);
  opacity: 0.55;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--sans);
}
.splitflap-colheads:hover { background: none; }

.sf-col { display: flex; gap: 3px; flex-wrap: nowrap; }
.sf-col-window { font-size: 1.05rem; }
.sf-col-caret {
  color: var(--silver);
  opacity: 0.5;
  font-size: 1.1rem;
  text-align: center;
  transition: transform 0.2s ease;
}
.splitflap-row[aria-expanded="true"] .sf-col-caret { transform: rotate(90deg); }

.sf-tile {
  position: relative;
  display: inline-block;
  width: 0.92em;
  height: 1.35em;
  line-height: 1.35em;
  text-align: center;
  background: linear-gradient(180deg, #1c2026 0%, #14171b 100%);
  color: var(--silver-soft);
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(201, 210, 216, 0.08), 0 1px 0 rgba(0, 0, 0, 0.6);
  overflow: hidden;
  perspective: 60px;
}
.sf-tile::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.55);
  transform: translateY(-0.5px);
}
.sf-tile-inner {
  display: block;
  transform-style: flat;
  transition: transform 90ms linear;
  will-change: transform;
}
.sf-tile-inner.sf-flip { transform: rotateX(90deg); }
.sf-tile.sf-space { background: transparent; box-shadow: none; }
.sf-tile.sf-space::after { display: none; }

.splitflap-detail {
  grid-column: 1 / -1;
  max-height: 0;
  overflow: hidden;
  color: var(--silver);
  opacity: 0.85;
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.5;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 6px;
}
.splitflap-row[aria-expanded="true"] .splitflap-detail {
  max-height: 80px;
  padding: 8px 6px 4px;
}

.splitflap-note {
  margin: 14px 2px 0;
  color: #6b6f73;
  font-family: var(--sans);
  font-size: 0.82rem;
}

@media (max-width: 640px) {
  .splitflap-row { grid-template-columns: 108px 1fr 1fr 16px; gap: 8px; }
  .sf-col-window { font-size: 0.9rem; }
  .sf-tile { width: 0.78em; }
  .splitflap-clock { display: none; }
}

/* ---------- journey details ---------- */
.journey-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 24px;
}
.journey-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(10, 31, 61, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.journey-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(10, 31, 61, 0.14);
}
.journey-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}
.journey-card h4 { margin: 18px 22px 8px; }
.journey-card p { color: #454a4f; font-size: 0.95rem; margin: 0 22px 20px; }

/* ---------- fares ---------- */
.fares-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px 30px;
}
.fares-note {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  font-size: 0.92rem;
  color: #454a4f;
}

/* ---------- alternatives ---------- */
.alt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 20px;
}
.alt-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(10, 31, 61, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.alt-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(10, 31, 61, 0.14);
}
.alt-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}
.alt-card-body { padding: 16px 18px; }
.alt-card.is-train { border-top: 3px solid var(--brick); }
.alt-card h4 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--teal); margin-bottom: 10px; }
.alt-card dl { margin: 0; font-size: 0.88rem; }
.alt-card dt { color: #6b6f73; margin-top: 8px; }
.alt-card dd { margin: 0; font-weight: 600; }

/* ---------- future rail ---------- */
.future-box {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--silver-soft);
  border-radius: 6px;
  padding: 30px 32px;
}
.future-box h2 { color: #fff; }
.future-box a { color: var(--teal-light); }
.future-tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(251,125,13,0.25);
  border: 1px solid var(--brick);
  color: var(--silver-soft);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}

/* ---------- FAQ ---------- */
.accordion details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.accordion summary {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  color: var(--navy);
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.3rem;
  color: var(--brick);
}
.accordion details[open] summary::after { content: "\2212"; }
.accordion p { margin-top: 12px; color: #454a4f; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: var(--silver);
  padding: 40px 0 28px;
  font-size: 0.88rem;
}
.site-footer p { color: var(--silver); }
.site-footer a { color: var(--silver-soft); text-decoration: underline; }
.footer-brand {
  font-family: var(--serif);
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.footer-legal p { max-width: 820px; }

/* ---------- count-up ---------- */
.count-target { display: inline-block; }

/* ---------- coastline path bend markers (zero-height position anchors) ---------- */
.shoreline-anchor { display: block; height: 0; margin: 0; padding: 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo-wrap { order: -1; aspect-ratio: 16/9; }
  .quickfacts-grid { grid-template-columns: repeat(3, 1fr); row-gap: 20px; }
  .qf:nth-child(3n+1) { border-left: none; padding-left: 0; }
  .qf:not(:nth-child(3n+1)) { border-left: 1px solid rgba(13,33,84,0.18); padding-left: 18px; }
  .stations-grid { grid-template-columns: 1fr; }
  .journey-grid { grid-template-columns: 1fr; }
  .alt-grid { grid-template-columns: repeat(2, 1fr); }
  .classcard-grid { grid-template-columns: 1fr; }
  .classcard-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .main-nav {
    position: absolute;
    top: 108px;
    left: 0;
    right: 0;
    background: var(--navy-deep);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 16px;
    display: none;
    border-bottom: 1px solid rgba(201,210,216,0.15);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; width: 100%; color: var(--silver-soft); }
  .main-nav a:hover { color: #fff; }
  .main-nav a.nav-cta-mobile {
    display: inline-block;
    width: auto;
    margin-top: 14px;
    padding: 11px 24px;
    background: var(--hero-orange);
    color: #fff;
    border-radius: 24px;
    font-weight: 600;
  }
  .main-nav a.nav-cta-mobile:hover { background: var(--hero-orange-dark); color: #fff; }
  .header-actions .btn-header-cta { display: none; }
  .nav-toggle { display: flex; }
  .quickfacts-grid { grid-template-columns: repeat(2, 1fr); }
  .qf:nth-child(3n+1) { border-left: 1px solid rgba(13,33,84,0.18); padding-left: 18px; }
  .qf:nth-child(odd) { border-left: none; padding-left: 0; }
  .qf:nth-child(even) { border-left: 1px solid rgba(13,33,84,0.18); padding-left: 18px; }
  .alt-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .quickfacts-grid { grid-template-columns: 1fr 1fr; }
  .alt-grid { grid-template-columns: 1fr; }
  .classcard-grid-4 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #hero-trace, tbody tr, .coastline-station.in-view { transition: none; animation: none; }
}
