@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Libre+Caslon+Display&display=swap");

:root {
  --ink: #1f342d;
  --forest: #1f5b47;
  --forest-deep: #153f34;
  --moss: #728b65;
  --sage: #dce5d6;
  --mist: #dce9eb;
  --sky: #6e9da3;
  --clay: #bb7159;
  --ochre: #c49a55;
  --paper: #f7f4ec;
  --white: #fffdf8;
  --muted: #66716d;
  --line: rgba(31, 52, 45, 0.15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at 6% 10%, rgba(114, 139, 101, 0.12), transparent 28rem), var(--paper);
  color: var(--ink);
  font-family: "DM Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, [role="button"]:focus-visible { outline: 3px solid rgba(110, 157, 163, 0.6); outline-offset: 3px; }

.site-header {
  min-height: 76px;
  padding: 0 4vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  color: var(--forest-deep);
  text-decoration: none;
  font-family: "Libre Caslon Display", Georgia, serif;
  font-size: 2rem;
  letter-spacing: -0.06em;
}
.wordmark span { color: var(--clay); }
.header-note { color: var(--muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }

.page-shell { width: min(1480px, 92vw); margin: 0 auto; padding: 48px 0 34px; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 36px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 10px; color: var(--forest); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.17em; text-transform: uppercase; }
h1, h2 { margin: 0; color: var(--forest-deep); font-family: "Libre Caslon Display", Georgia, serif; font-weight: 400; letter-spacing: -0.035em; }
h1 { font-size: clamp(2.75rem, 5.6vw, 5.6rem); line-height: 0.98; }
h2 { font-size: clamp(2.2rem, 3.4vw, 3.65rem); line-height: 1; }
.subtitle { margin: 16px 0 0; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.16rem); }
.legend { display: flex; gap: 22px; padding-bottom: 8px; color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend-line { display: inline-block; width: 30px; height: 5px; border-radius: 999px; background: var(--forest); }
.legend-line.muted { height: 3px; background: rgba(31, 52, 45, 0.22); }

.experience {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(470px, 0.9fr);
  min-height: 660px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.73);
  box-shadow: 0 28px 80px rgba(48, 57, 50, 0.09);
}
.map-column { min-width: 0; padding: 20px 20px 18px; border-right: 1px solid var(--line); }
.map-wrap { position: relative; width: 100%; aspect-ratio: 1000 / 640; overflow: hidden; border-radius: 17px; }
.rail-map { display: block; width: 100%; height: 100%; }
.map-paper { fill: #eef1e8; }
.countries path { fill: rgba(255, 253, 248, 0.66); stroke: rgba(31, 52, 45, 0.16); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.country-labels { fill: rgba(31, 52, 45, 0.28); font-family: "DM Sans", Arial, sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 4px; }

.route {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 9;
  vector-effect: non-scaling-stroke;
  transition: opacity 260ms ease, stroke-width 260ms ease, filter 260ms ease;
}
.route-common { stroke: var(--forest-deep); }
.route-france { stroke: var(--ochre); }
.route-spain { stroke: var(--clay); }
.route-italy { stroke: var(--sky); }
.route.is-active { opacity: 1; stroke-width: 10; filter: drop-shadow(0 3px 4px rgba(31, 52, 45, 0.15)); }
.route.is-dimmed { opacity: 0.17; stroke-width: 6; }

.station { cursor: pointer; transition: opacity 240ms ease; }
.station.is-dimmed { opacity: 0.38; }
.station-hit { fill: transparent; }
.station-dot { fill: var(--white); stroke: var(--ink); stroke-width: 4; vector-effect: non-scaling-stroke; transition: r 180ms ease, fill 180ms ease, stroke 180ms ease; }
.station:hover .station-dot { r: 12; }
.station.is-active .station-dot { stroke: var(--forest); }
.station.is-selected .station-dot { fill: var(--forest); stroke: var(--white); r: 12; }

.map-labels { position: absolute; inset: 0; pointer-events: none; }
.map-label, .london-label { position: absolute; left: var(--x); top: var(--y); transform: translate(var(--dx, -50%), var(--dy, -50%)); }
.origin-callout {
  position: absolute;
  left: 40%;
  top: 1.4%;
  display: flex;
  align-items: flex-start;
  color: var(--forest);
  pointer-events: none;
}
.origin-callout svg { width: clamp(48px, 6.3vw, 88px); height: auto; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.origin-callout span { margin: 1px 0 0 6px; font-family: "Libre Caslon Display", Georgia, serif; font-size: clamp(0.68rem, 1vw, 0.9rem); line-height: 1.18; white-space: nowrap; }
.map-label {
  pointer-events: auto;
  border: 1px solid rgba(31, 52, 45, 0.2);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  padding: 0.42rem 0.72rem;
  font-size: clamp(0.72rem, 1.1vw, 0.9rem);
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(31, 52, 45, 0.07);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border 180ms ease;
}
.map-label:hover { transform: translate(var(--dx), calc(var(--dy) - 2px)); border-color: var(--forest); }
.map-label.is-selected { background: var(--forest-deep); color: var(--white); border-color: var(--forest-deep); }
.london-label { transform: translate(-5.7rem, .85rem); color: var(--forest-deep); text-align: right; font-size: clamp(0.75rem, 1.1vw, 0.94rem); font-weight: 600; line-height: 1.05; }
.london-label small { display: block; margin-top: 3px; color: var(--muted); font-size: 0.66em; font-weight: 500; }

.destination-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.destination-tabs button { min-height: 38px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); padding: 7px 15px; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: color 180ms ease, background 180ms ease, border 180ms ease; }
.destination-tabs button:hover { color: var(--forest); border-color: rgba(31, 91, 71, 0.45); }
.destination-tabs button.is-selected { background: var(--forest-deep); color: var(--white); border-color: var(--forest-deep); }

.comparison-panel { display: flex; flex-direction: column; padding: clamp(28px, 3.4vw, 52px); background: var(--white); }
.panel-topline { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.country-tag { border: 1px solid var(--line); border-radius: 999px; color: var(--muted); padding: 5px 10px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.route-summary { margin: 13px 0 30px; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.measurement-heading { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.67rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.carbon-info-wrap { position: relative; display: inline-flex; align-items: center; gap: 6px; letter-spacing: 0; text-transform: none; }
.info-button { display: inline-grid; place-items: center; width: 21px; height: 21px; padding: 0; border: 1px solid rgba(31, 91, 71, 0.35); border-radius: 50%; background: transparent; color: var(--forest); font-family: Georgia, serif; font-size: 0.72rem; font-weight: 600; cursor: pointer; }
.info-button:hover { background: var(--sage); }
.carbon-tooltip { position: absolute; z-index: 20; top: calc(100% + 9px); right: 0; display: none; width: min(290px, 78vw); padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--forest-deep); color: var(--white); box-shadow: 0 12px 30px rgba(31, 52, 45, 0.18); font-size: 0.72rem; font-weight: 400; letter-spacing: 0; line-height: 1.5; text-transform: none; }
.carbon-info-wrap:hover .carbon-tooltip, .carbon-info-wrap:focus-within .carbon-tooltip, .carbon-info-wrap.is-open .carbon-tooltip { display: block; }
.time-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; border-top: 1px solid var(--line); }
.time-block { display: flex; min-width: 0; flex-direction: column; padding: 23px 0; border-bottom: 1px solid var(--line); }
.mode-heading { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.mode-icon { display: inline-grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; color: var(--white); font-size: 0.92rem; }
.rail-icon { background: var(--forest); }
.flight-icon { background: var(--sky); }
.flight-equation { display: grid; grid-template-columns: 1fr auto 1.35fr; align-items: center; gap: 13px; margin-top: 17px; }
.flight-equation div { display: flex; flex-direction: column; gap: 2px; }
.flight-equation strong { color: var(--ink); font-family: "Libre Caslon Display", Georgia, serif; font-size: 1.85rem; font-weight: 400; line-height: 1; }
.flight-equation span { color: var(--muted); font-size: 0.68rem; line-height: 1.35; }
.flight-equation b { color: var(--clay); font-size: 1.4rem; font-weight: 400; }
.rail-equation b { color: var(--moss); }
.rail-equation strong.allowance-value { font-size: 1.55rem; white-space: nowrap; }
.flight-total { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 12px 15px; border-radius: 10px; background: var(--mist); }
.flight-total span { color: var(--muted); font-size: 0.72rem; }
.flight-total strong { color: var(--forest-deep); font-family: "Libre Caslon Display", Georgia, serif; font-size: 1.55rem; font-weight: 400; white-space: nowrap; }
.rail-total { background: var(--sage); }
.emissions-readout { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-top: auto; padding-top: 17px; border-top: 1px dashed rgba(31, 52, 45, 0.18); }
.carbon-days-value { display: flex; flex-direction: column; gap: 2px; }
.carbon-days-value strong { color: var(--forest-deep); font-family: "Libre Caslon Display", Georgia, serif; font-size: 1.6rem; font-weight: 400; line-height: 1; }
.carbon-days-value strong.data-required { font-family: "DM Sans", Arial, sans-serif; font-size: 0.9rem; font-weight: 600; letter-spacing: 0.01em; }
.carbon-days-value span { color: var(--muted); font-size: 0.68rem; }
.co2e-support { max-width: 125px; color: var(--muted); font-size: 0.68rem; line-height: 1.4; text-align: right; }
.carbon-comparison { padding: 23px 0; border-bottom: 1px solid var(--line); }
.section-kicker { margin: 0 0 11px; color: var(--muted); font-size: 0.67rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.carbon-saving-headline { display: block; color: var(--forest-deep); font-family: "Libre Caslon Display", Georgia, serif; font-size: 1.45rem; font-weight: 400; line-height: 1.2; }
.carbon-saving-copy { margin: 6px 0 0; color: var(--muted); font-size: 0.74rem; line-height: 1.45; }
.carbon-bars { margin-top: 16px; }
.carbon-bar-row { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 9px; margin-top: 8px; color: var(--muted); font-size: 0.67rem; }
.carbon-bar-row i { display: block; height: 6px; overflow: hidden; border-radius: 999px; background: var(--paper); }
.carbon-bar-row b { display: block; width: var(--bar-width); height: 100%; border-radius: inherit; transition: width 260ms ease; }
.rail-bar { background: var(--forest); }
.flight-bar { background: var(--sky); }
.carbon-data-status { display: flex; align-items: flex-start; gap: 11px; }
.carbon-data-status > span { flex: 0 0 9px; width: 9px; height: 9px; margin-top: 5px; border: 2px solid var(--ochre); border-radius: 50%; }
.carbon-data-status div { display: flex; flex-direction: column; gap: 4px; }
.carbon-data-status strong { color: var(--ink); font-size: 0.82rem; font-weight: 600; }
.carbon-data-status p { margin: 0; color: var(--muted); font-size: 0.7rem; line-height: 1.45; }
.difference { display: flex; gap: 12px; align-items: center; margin-top: 22px; }
.difference-marker { width: 8px; height: 42px; border-radius: 999px; background: var(--moss); }
.difference-longer .difference-marker { background: var(--ochre); }
.difference div { display: flex; flex-direction: column; gap: 3px; }
.difference span { color: var(--muted); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.difference strong { color: var(--forest-deep); font-size: 0.98rem; font-weight: 600; }
.sustainability-note { display: flex; align-items: flex-start; gap: 11px; margin-top: auto; padding-top: 28px; color: var(--forest); }
.sustainability-note svg { flex: 0 0 24px; width: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sustainability-note p { margin: 0; font-family: "Libre Caslon Display", Georgia, serif; font-size: 1.06rem; line-height: 1.45; }
.methodology { margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); }
.methodology summary { color: var(--muted); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.methodology > div { padding-top: 10px; }
.methodology ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.68rem; line-height: 1.5; }
.methodology li + li { margin-top: 7px; }
.methodology a { color: var(--forest); text-underline-offset: 2px; }
.journey-method { margin-top: 14px; padding-top: 13px; border-top: 1px dashed rgba(31, 52, 45, 0.18); color: var(--muted); }
.journey-method h3 { margin: 0 0 8px; color: var(--ink); font-size: 0.71rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.journey-method p { margin: 6px 0 0; font-size: 0.68rem; line-height: 1.5; }
.journey-method p strong { color: var(--ink); font-weight: 600; }
.source-links { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 10px; }
.source-links a { font-size: 0.66rem; line-height: 1.4; }

footer { display: flex; justify-content: space-between; gap: 30px; padding: 20px 4px 0; color: var(--muted); font-size: 0.72rem; line-height: 1.5; }
footer p { max-width: 760px; margin: 0; }
footer span { color: var(--forest); font-family: "Libre Caslon Display", Georgia, serif; font-size: 0.95rem; white-space: nowrap; }

@media (max-width: 1150px) {
  .experience { grid-template-columns: 1fr; }
  .map-column { border-right: 0; border-bottom: 1px solid var(--line); }
  .comparison-panel { display: block; }
  .time-comparison { gap: 32px; }
  .time-block { min-width: 0; }
  .sustainability-note { margin-top: 8px; }
}

@media (max-width: 700px) {
  .site-header { min-height: 66px; padding: 0 20px; }
  .header-note { display: none; }
  .page-shell { width: min(100% - 24px, 620px); padding-top: 32px; }
  .intro { display: block; }
  .legend { margin-top: 20px; flex-wrap: wrap; gap: 14px; }
  .experience { border-radius: 18px; }
  .map-column { padding: 8px 8px 15px; }
  .map-wrap { border-radius: 12px; }
  .country-labels { display: none; }
  .route { stroke-width: 7; }
  .route.is-active { stroke-width: 8; }
  .route.is-dimmed { stroke-width: 4; }
  .map-label { padding: 0.34rem 0.52rem; font-size: 0.67rem; }
  .origin-callout { top: .8%; }
  .origin-callout span { margin-left: 3px; font-size: 0.59rem; }
  .london-label { transform: translate(-4.1rem, .55rem); font-size: 0.68rem; }
  .comparison-panel { display: block; padding: 28px 24px; }
  .time-comparison { display: block; margin-top: 4px; }
  .sustainability-note { margin-top: 8px; }
  footer { display: block; padding-bottom: 14px; }
  footer span { display: block; margin-top: 12px; }
}

@media (max-width: 430px) {
  h1 { font-size: 2.75rem; }
  .destination-tabs { gap: 6px; }
  .destination-tabs button { min-height: 36px; padding: 6px 11px; }
  .map-label { padding: 0.28rem 0.43rem; font-size: 0.61rem; }
  .flight-equation { grid-template-columns: 1fr auto 1.25fr; gap: 9px; }
  .emissions-readout { align-items: flex-start; }
  .carbon-tooltip { right: -8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
