/* =========================================================
   Porto ⇄ Lisbon Trains — "The Golden Line"
   Palette sourced from the real corridor:
   calçada white = Lisbon/Porto limestone pavement   #FBF9F4
   tram yellow   = Lisbon Elétrico livery             #FDD853
   Douro gold    = port-wine terraces at dusk         #B9860F (decorative accents only, never text)
   warm ink      = all text, never blue-black         #232323
   ========================================================= */

:root {
  --white: #FBF9F4;
  --paper-dim: #F3ECDB;
  --line: #E3D9C1;
  --yellow: #FDD853;
  --gold: #B9860F;
  --ink: #232323;
  --ink-soft: #5B564C;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Space Mono", "Courier New", monospace;

  --maxw: 1120px;
  --spine-w: 5px;
  --spine-gutter: 30px;
  --header-h: 92px;

  /* scroll progress + warmth, driven by js/main.js */
  --progress: 0;
  --warmth: 0;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  padding-left: var(--spine-gutter);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background-color: color-mix(in srgb, var(--white) calc(100% - (var(--warmth) * 22%)), #F1D9A0 calc(var(--warmth) * 22%));
  transition: background-color 0.4s linear;
}
@supports not (background-color: color-mix(in srgb, red, blue)) {
  body { background-color: var(--white); }
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.18;
  margin: 0 0 0.5em;
  font-weight: 600;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); margin-top: 0; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink); }

p { margin: 0 0 1em; color: var(--ink); }
p.lede { color: var(--ink-soft); }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

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

/* ---------- the golden line spine ---------- */
.golden-spine {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--spine-w);
  height: 100vh;
  background: linear-gradient(to bottom, rgba(185,134,15,0.10), rgba(185,134,15,0.10));
  z-index: 900;
  pointer-events: none;
}
.golden-spine::before {
  content: "";
  position: absolute;
  left: 0; top: 0; width: 100%;
  height: calc(var(--progress) * 1%);
  background: linear-gradient(to bottom, var(--yellow), var(--gold));
  transition: height 0.05s linear;
}
.golden-spine .spine-dot {
  position: absolute;
  left: 50%;
  top: calc(var(--progress) * 1%);
  width: 13px; height: 13px;
  margin-left: -6px; margin-top: -6px;
  background: var(--yellow);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(243,194,48,0.25), 0 0 14px 3px rgba(185,134,15,0.65);
  transition: top 0.05s linear;
}
@media (max-width: 640px) {
  :root { --spine-w: 3px; --spine-gutter: 14px; }
  .golden-spine .spine-dot { width: 9px; height: 9px; margin-left: -4px; margin-top: -4px; }
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: rgba(251,249,244,0.94);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
  transform: translateZ(0);
  will-change: transform;
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 18px;
  height: var(--header-h);
}
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo-mark { height: 32px; width: auto; display: block; }

.main-nav { display: flex; justify-content: center; gap: 16px; font-size: 0.85rem; }
.main-nav a {
  color: var(--ink-soft); text-decoration: none; padding: 4px 0; position: relative; white-space: nowrap;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
  background: var(--gold); transition: right 0.2s ease;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { right: 0; }

.nav-cta {
  background: var(--yellow);
  color: var(--ink);
  border: none;
  padding: 9px 18px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.nav-cta:hover { filter: brightness(1.06); color: var(--ink); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 40px; height: 40px; padding: 0; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink); position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.nav-panel { display: none; }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-inner { grid-template-columns: auto 1fr auto; gap: 10px; }
  .header-inner .nav-cta:not(.nav-panel-cta) { display: none; }
  .nav-toggle { grid-column: 3; }
  .nav-panel {
    display: none;
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 18px;
  }
  .nav-panel.open { display: block; }
  .nav-panel .main-nav {
    display: flex; flex-direction: column; gap: 2px; font-size: 1rem;
  }
  .nav-panel .main-nav a { padding: 10px 0; color: var(--ink); }
  /* Real button, styled explicitly (not a plain .main-nav link), so it can't
     inherit the panel link list's styling regardless of specificity. */
  .nav-panel .nav-panel-cta {
    display: inline-flex; justify-content: center; margin-top: 14px; width: 100%;
  }
}

@media (max-width: 480px) {
  .logo-mark { height: 26px; }
  .nav-cta { padding: 8px 13px; font-size: 0.8rem; }
}

/* ---------- hero ---------- */
.hero { padding: 36px 0 28px; position: relative; }
.hero-top {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; }
.hero h1 { max-width: 26ch; margin: 0 0 0.4em; display: flex; flex-direction: column; }
.hl-line1 { color: var(--ink); font-size: 0.8em; white-space: nowrap; }
.hl-line2 {
  color: var(--ink);
  font-size: 0.72em;
  margin-top: 0.16em;
}
@media (max-width: 560px) {
  .hl-line1 { white-space: normal; }
}
.hero-sub { font-size: 1.02rem; color: var(--ink-soft); max-width: 58ch; margin-top: 14px; }
.hero-sub strong { color: var(--ink); font-weight: 700; }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 20px; }
.hero-cta {
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--sans); font-weight: 700; font-size: 0.98rem;
  padding: 14px 32px; border-radius: 999px; text-decoration: none;
  white-space: nowrap;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.hero-cta:hover { filter: brightness(1.06); color: var(--ink); transform: translateY(-1px); }

.hero-media { position: relative; margin: 0; text-align: center; }
.hero-media img { width: auto; max-width: 100%; height: auto; max-height: 400px; display: inline-block; }
@media (max-width: 900px) {
  .hero-top { grid-template-columns: 1fr; gap: 4px; }
  .hero-media { order: 2; }
  .hero-media img { max-height: 320px; }
}

.widget-wrap { padding: 28px 24px 40px; max-width: 1400px; }
.widget-frame h2 { margin: 0; }

/* ---------- quick facts ---------- */
.quickfacts { background: linear-gradient(135deg, var(--yellow), var(--gold)); padding: 0; }
.quickfacts .container {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0;
  padding-top: 22px; padding-bottom: 22px;
}
.fact { text-align: center; padding: 0 10px; border-left: 1px solid rgba(35,35,35,0.16); display: flex; flex-direction: column; gap: 6px; }
.fact:first-child { border-left: none; }
.fact .label {
  font-size: 0.76rem; color: rgba(35,35,35,0.72); text-transform: uppercase; letter-spacing: 0.04em; order: -1;
  line-height: 1.3; min-height: 2.08em;
  display: flex; align-items: center; justify-content: center;
}
.fact .num {
  font-family: var(--mono); font-size: clamp(1.15rem, 1.8vw, 1.5rem); font-weight: 700;
  color: var(--ink); display: block; font-variant-numeric: tabular-nums;
}
@media (max-width: 860px) {
  .quickfacts .container { grid-template-columns: repeat(3, 1fr); gap: 18px 0; }
  .fact { border-left: none; padding: 4px 8px; }
  .fact .label { min-height: 0; }
}
@media (max-width: 480px) {
  .quickfacts .container { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- section shell ---------- */
section { padding: 64px 0; scroll-margin-top: var(--header-h); }
section > .container > .section-head { max-width: 68ch; margin-bottom: 34px; }
.section-head h4 { margin-bottom: 8px; }
.eyebrow {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); display: block; margin-bottom: 8px;
}
.alt-bg { background: var(--paper-dim); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- route map ---------- */
.route-map { padding: 20px 0 72px; }
.route-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  margin: 40px 0 10px;
}
.route-line::before {
  content: "";
  position: absolute;
  left: 6%; right: 6%; top: 11px; height: 3px;
  background: repeating-linear-gradient(to right, var(--gold) 0 10px, transparent 10px 16px);
}
.stop { text-align: center; position: relative; padding-top: 0; }
.stop-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--gold);
  margin: 0 auto 14px;
  position: relative; z-index: 2;
}
.route-line.in-view .stop-dot { animation: pulse-dot 2.2s ease-in-out infinite; }
.route-line.in-view .stop:nth-child(1) .stop-dot { animation-delay: 0s; }
.route-line.in-view .stop:nth-child(2) .stop-dot { animation-delay: 0.3s; }
.route-line.in-view .stop:nth-child(3) .stop-dot { animation-delay: 0.6s; }
.route-line.in-view .stop:nth-child(4) .stop-dot { animation-delay: 0.9s; }
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(185,134,15,0.45); }
  50% { box-shadow: 0 0 0 8px rgba(185,134,15,0); }
}
@media (prefers-reduced-motion: reduce) {
  .route-line.in-view .stop-dot { animation: none; }
}
.stop .city { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; }
.stop .station { font-size: 0.85rem; color: var(--ink-soft); }
.stop .km { font-family: var(--mono); font-size: 0.78rem; color: var(--ink); margin-top: 4px; }
@media (max-width: 700px) {
  .route-line { grid-template-columns: 1fr; gap: 28px; text-align: left; padding-left: 30px; }
  .route-line::before { left: 17px; top: 0; bottom: 0; right: auto; width: 3px; height: auto; background: repeating-linear-gradient(to bottom, var(--gold) 0 10px, transparent 10px 16px); }
  .stop { text-align: left; padding-left: 30px; }
  .stop-dot { position: absolute; left: 6px; top: 2px; margin: 0; }
}

/* ---------- compare (high-contrast highlight block) ---------- */
.compare-highlight { background: var(--yellow); }
.compare-highlight .eyebrow { color: var(--ink); opacity: 0.68; }
.compare-highlight .lede { color: rgba(35,35,35,0.78); }
.compare-highlight .note { color: rgba(35,35,35,0.78); }
.compare-highlight .table-wrap {
  border-color: rgba(35,35,35,0.1);
  box-shadow: 0 20px 40px -18px rgba(35,35,35,0.4);
}

/* ---------- comparison table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 560px; }
thead th {
  text-align: left; font-family: var(--sans); font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--ink-soft); padding: 14px 16px; border-bottom: 2px solid var(--line);
}
tbody td { padding: 14px 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-variant-numeric: tabular-nums; }
tbody td:first-child { font-family: var(--sans); font-weight: 700; }
tbody tr:last-child td { border-bottom: none; }
.js tbody tr {
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.js tbody tr.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .js tbody tr { opacity: 1; transform: none; transition: none; }
}

.note { font-size: 0.92rem; color: var(--ink-soft); margin-top: 16px; }

/* ---------- route cities ---------- */
.route-cities { margin-top: 44px; }
.route-cities h3 { font-size: 1.25rem; margin-bottom: 6px; }
.route-cities .lede { color: var(--ink-soft); margin-bottom: 24px; }
.city-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.city-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px; display: flex; flex-direction: column; gap: 8px;
}
.city-card picture { display: block; }
.city-card img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 7px; }
.city-card-body h4 {
  color: var(--ink); text-transform: none; letter-spacing: 0; font-family: var(--serif);
  font-size: 0.95rem; margin-bottom: 5px;
}
.city-highlights { margin: 0; padding-left: 14px; color: var(--ink-soft); font-size: 0.74rem; line-height: 1.45; }
.city-highlights li { margin-bottom: 3px; }
.city-highlights li:last-child { margin-bottom: 0; }
@media (max-width: 860px) {
  .city-cards { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .city-card { padding: 16px; gap: 14px; }
  .city-card-body h4 { font-size: 1.1rem; }
  .city-highlights { font-size: 0.88rem; }
}
@media (max-width: 480px) {
  .city-cards { grid-template-columns: 1fr; }
}

/* ---------- top activities ---------- */
.activity-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.activity-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 10px 24px -16px rgba(35,35,35,0.2);
}
.activity-card img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.activity-card-body { padding: 18px 20px 20px; }
.activity-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--yellow); color: var(--ink); font-family: var(--mono); font-weight: 700; font-size: 0.9rem;
  margin-bottom: 10px;
}
.activity-card-body h3 { font-size: 1.1rem; margin-bottom: 8px; }
.activity-card-body p { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 0; }
@media (max-width: 900px) {
  .activity-cards { grid-template-columns: 1fr; }
}

/* ---------- train classes ---------- */
.class-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.class-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 10px 24px -16px rgba(35,35,35,0.2);
  display: flex; flex-direction: column;
}
.class-card-media { position: relative; }
.class-card-media img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.class-card-badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(35,35,35,0.78); color: #fff;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; white-space: nowrap;
}
.class-card-body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; }
.class-card-body h4 {
  color: var(--ink); text-transform: none; letter-spacing: 0; font-family: var(--serif);
  font-size: 0.95rem; margin-bottom: 6px;
}
.class-card-body ul { margin: 0; padding-left: 14px; color: var(--ink-soft); font-size: 0.74rem; line-height: 1.45; }
.class-card-body li { margin-bottom: 3px; }
.class-card-body li::marker { color: var(--gold); }
.class-card-body li:last-child { margin-bottom: 0; }
.class-card-cta {
  display: inline-block; align-self: flex-start; margin-top: auto;
  background: var(--yellow); color: var(--ink);
  font-family: var(--sans); font-weight: 700; font-size: 0.76rem;
  padding: 8px 16px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.class-card-cta:hover { filter: brightness(1.06); color: var(--ink); transform: translateY(-1px); }
@media (max-width: 860px) {
  .class-cards { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .class-card-body { padding: 18px 20px 20px; }
  .class-card-body h4 { font-size: 1.1rem; margin-bottom: 10px; }
  .class-card-body ul { font-size: 0.92rem; }
  .class-card-badge { font-size: 0.68rem; padding: 5px 11px; }
  .class-card-cta { font-size: 0.86rem; padding: 10px 20px; }
}
@media (max-width: 480px) {
  .class-cards { grid-template-columns: 1fr; }
}

/* ---------- stations guide: interactive map ---------- */
.station-map { position: relative; max-width: 100%; margin-top: 12px; }
.station-map img { width: 100%; height: auto; display: block; }
.station-pin {
  position: absolute;
  width: 34px; height: 34px;
  margin-left: -17px; margin-top: -17px;
  border-radius: 50%;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  animation: pulse-dot 2.4s ease-in-out infinite;
}
.station-pin:hover, .station-pin:focus-visible { animation: none; }
.station-pin:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .station-pin { animation: none; }
}

.station-tip {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(280px, 78vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 14px 30px -14px rgba(35,35,35,0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
  text-align: left;
  z-index: 5;
  pointer-events: none;
}
.station-pin:hover .station-tip,
.station-pin:focus .station-tip { opacity: 1; visibility: visible; }
.station-pin.tip-below .station-tip { top: 26px; }
.station-pin.tip-above .station-tip { bottom: 26px; }
.station-tip h4 { display: block; font-family: var(--serif); text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 0.98rem; color: var(--ink); margin: 0 0 4px; }
.station-tip span { display: block; font-size: 0.82rem; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 560px) {
  .station-pin { width: 28px; height: 28px; margin-left: -14px; margin-top: -14px; }
  .station-tip { max-width: 68vw; padding: 10px 12px; }
}

/* ---------- timetable: split-flap Solari board ---------- */
.solari-board {
  --board-bg: #14110d;
  --board-edge: #2a231a;
  --flap-bg: #1c1712;
  --amber: var(--yellow);
  --amber-dim: var(--gold);
  --amber-glow: rgba(253,216,83,0.35);
  --green: #7cb668;
  --hairline: rgba(253,216,83,0.14);
  background: linear-gradient(180deg, var(--board-bg), #0b0906);
  border: 1px solid var(--board-edge);
  border-radius: 14px;
  padding: 18px 18px 22px;
  margin-top: 8px;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.55), 0 24px 50px -24px rgba(0,0,0,0.55);
  font-family: var(--mono);
  color: var(--amber);
}
.solari-header {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 2px 4px 14px; margin-bottom: 14px;
  border-bottom: 2px solid var(--amber-dim);
}
.solari-title {
  color: var(--amber); font-size: 1rem; letter-spacing: 0.14em; text-transform: uppercase;
  text-shadow: 0 0 8px var(--amber-glow); font-weight: 700;
}
.solari-sub { color: var(--amber-dim); font-size: 0.68rem; letter-spacing: 0.08em; margin-top: 4px; }
.solari-header-right { display: flex; align-items: center; gap: 12px; }
.solari-sound {
  background: none; border: 1px solid rgba(253,216,83,0.3); color: var(--amber-dim);
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; flex-shrink: 0;
}
.solari-sound[aria-pressed="true"] { color: var(--amber); border-color: var(--amber); }
.solari-sound-wave { opacity: 0.3; }
.solari-sound[aria-pressed="true"] .solari-sound-wave { opacity: 1; }
.solari-clock {
  color: var(--amber); font-size: 1.2rem; letter-spacing: 0.12em; font-weight: 700;
  text-shadow: 0 0 8px var(--amber-glow); font-variant-numeric: tabular-nums;
  animation: solari-flicker 14s infinite;
}
@keyframes solari-flicker { 0%, 96%, 100% { opacity: 1; } 97% { opacity: 0.45; } }

.solari-table { overflow-x: auto; }
.solari-fallback { width: 100%; border-collapse: collapse; margin-top: 8px; font-family: var(--mono); font-size: 0.82rem; color: var(--amber); }
.solari-fallback th, .solari-fallback td { padding: 8px; border-bottom: 1px solid var(--hairline); text-align: left; }
.solari-fallback th { color: var(--amber-dim); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.08em; }
.js .solari-fallback { display: none; }
.solari-colheads, .solari-row {
  display: grid; grid-template-columns: 92px 1fr 66px 56px 108px; gap: 6px; align-items: center;
  min-width: 620px;
}
.solari-colheads {
  padding: 8px 8px; color: var(--amber-dim); font-size: 0.62rem; letter-spacing: 0.12em;
  text-transform: uppercase; border-bottom: 1px solid var(--hairline);
}
.solari-rows { display: flex; flex-direction: column; }
.solari-row-group { border-bottom: 1px solid var(--hairline); }
.solari-row-group:last-child { border-bottom: none; }
.solari-row { padding: 9px 8px; cursor: pointer; background: none; border: none; color: inherit; text-align: left; width: 100%; font-family: inherit; }
.solari-row:hover { background: rgba(253,216,83,0.05); }

.solari-cell { display: flex; gap: 3px; flex-wrap: nowrap; }

.flap { position: relative; width: 15px; height: 22px; flex-shrink: 0; }
.flap-panel {
  position: absolute; inset: 0; background: var(--flap-bg); border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  color: var(--amber); font-size: 13px; font-weight: 700; letter-spacing: 0.3px;
  text-shadow: 0 0 6px var(--amber-glow);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
}
.flap-panel::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,0.55); }
.flap-inner { width: 100%; height: 100%; animation: flap-cycle 0.5s steps(1) 1 both; animation-delay: var(--d, 0s); }
@keyframes flap-cycle { 0% { transform: rotateX(0); } 15% { transform: rotateX(-90deg); } 30% { transform: rotateX(0); } 100% { transform: rotateX(0); } }

.solari-status {
  font-size: 0.62rem; letter-spacing: 0.08em; padding: 3px 7px; border-radius: 3px;
  text-transform: uppercase; display: inline-block; font-family: var(--mono);
}
.solari-status.ontime { color: var(--green); border: 1px solid rgba(124,182,104,0.4); }
.solari-status.boarding { color: var(--amber); border: 1px solid rgba(253,216,83,0.4); animation: solari-pulse 3.6s ease-in-out infinite; }
@keyframes solari-pulse { 0%, 100% { box-shadow: 0 0 2px var(--amber-glow); opacity: 1; } 50% { box-shadow: 0 0 8px var(--amber-glow); opacity: 0.82; } }

.solari-expand { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.25s ease, opacity 0.2s ease; padding: 0 8px; }
.solari-row-group.is-open .solari-expand { max-height: 220px; opacity: 1; padding-top: 10px; padding-bottom: 12px; }
.solari-expand-inner { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.68rem; color: var(--amber-dim); min-width: 480px; }
.solari-expand-stop { padding: 3px 8px; border: 1px solid rgba(253,216,83,0.25); border-radius: 999px; white-space: nowrap; }
.solari-expand-arrow { color: rgba(253,216,83,0.4); }
.solari-expand-note { flex-basis: 100%; margin-top: 6px; font-size: 0.68rem; color: rgba(253,216,83,0.55); line-height: 1.5; }

.solari-footnote { color: var(--ink-soft); font-size: 0.85rem; margin-top: 16px; margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  .flap-inner { animation: none !important; }
  .solari-clock { animation: none; }
  .solari-status.boarding { animation: none; }
}

@media (max-width: 560px) {
  .solari-board { padding: 14px 12px 18px; }
  .solari-title { font-size: 0.85rem; letter-spacing: 0.1em; }
  .solari-clock { font-size: 1rem; }
  .flap { width: 11px; height: 16px; }
  .flap-panel { font-size: 10px; }
}

/* ---------- journey details ---------- */
.details-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.detail-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.detail-card h4 { color: var(--ink); text-transform: none; letter-spacing: 0; font-family: var(--serif); font-size: 1.1rem; margin-bottom: 8px; }
.detail-card p { color: var(--ink-soft); font-size: 0.93rem; margin: 0; }
@media (max-width: 860px) { .details-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .details-grid { grid-template-columns: 1fr; } }

/* ---------- fares: quick facts + video CTA ---------- */
.fare-facts { margin-bottom: 28px; }
.fare-quick-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fare-quick-list li { display: flex; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.fare-quick-list .t { font-weight: 700; }
.fare-quick-list .p { font-family: var(--mono); color: var(--ink); }
@media (max-width: 560px) { .fare-quick-list { grid-template-columns: 1fr; } }

.video-cta {
  position: relative; width: 100%; border-radius: 16px; overflow: hidden;
  aspect-ratio: 16 / 9; max-height: 560px;
  box-shadow: 0 20px 50px -24px rgba(35,35,35,0.4);
  background: #000;
}
.video-cta-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-cta-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 36px; color: #fff;
  background: linear-gradient(180deg, rgba(20,17,13,0) 32%, rgba(15,12,9,0.84) 100%);
}
.video-cta-overlay h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 2.1rem); max-width: 20ch; margin-bottom: 10px; }
.video-cta-overlay p { color: rgba(255,255,255,0.88); max-width: 52ch; margin-bottom: 20px; font-size: 1rem; }
.video-cta-btn {
  align-self: flex-start;
  background: var(--yellow); color: var(--ink); font-family: var(--sans); font-weight: 700; font-size: 0.98rem;
  padding: 14px 32px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.video-cta-btn:hover { filter: brightness(1.06); color: var(--ink); transform: translateY(-1px); }
.video-cta-toggle {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.4);
  background: rgba(20,17,13,0.5); color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
}
.video-cta-toggle:hover { background: rgba(20,17,13,0.7); }
@media (max-width: 700px) {
  .video-cta { aspect-ratio: 3 / 4; max-height: none; }
  .video-cta-overlay { padding: 22px; }
}

/* ---------- alternatives ---------- */
.alt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.alt-card { border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: #fff; }
.alt-card h4 { color: var(--ink); text-transform: none; letter-spacing: 0; font-family: var(--serif); font-size: 1.1rem; }
.alt-card ul { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 0.92rem; }
.alt-card li { margin-bottom: 4px; }
@media (max-width: 860px) { .alt-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 10px; max-width: 78ch; margin: 0 auto; }
.faq-item { border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 16px 20px; font-family: var(--serif);
  font-weight: 600; font-size: 1.02rem; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary h3 {
  margin: 0; font-family: inherit; font-weight: inherit; font-size: inherit; color: inherit; line-height: inherit;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--sans); font-size: 1.3rem; color: var(--gold); flex-shrink: 0; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-a { padding: 0 20px 18px; color: var(--ink-soft); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #d8d2c4; padding: 44px 0 26px; margin-top: 20px; }
.site-footer .container { max-width: var(--maxw); }
.site-footer p { color: #b9b3a4; font-size: 0.9rem; max-width: 78ch; }
.site-footer a { color: var(--yellow); }
.site-footer a:hover { color: #fff; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.85rem; color: #8f897a; margin-top: 24px; padding-top: 18px; border-top: 1px solid #3a382f; }

/* ---------- count-up numbers ---------- */
[data-countup] { display: inline-block; }

/* ---------- section-head shared ---------- */
.section-head p.lede { font-size: 1rem; }

.affiliate-clk { }

.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;
}
