/* FOUNDATION / PAGE FRAMING */
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);line-height:var(--tyit-leading-body)}
button{cursor:pointer}
a{color:inherit}
.shell{--retro-route-rail:#7bd0b1;--retro-route-bus:#8dd8bd;--retro-route-car:#b0c7a6;--retro-route-expedition:#91c9dc;--retro-route-surface:#adc9a0;container:retros-shell/inline-size;max-width:1680px;margin:auto;padding:0 var(--tyit-page-gutter)}
.journeys-link{display:inline-flex;align-items:center;gap:8px;font-size:var(--tyit-type-small);font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--ink);text-decoration:none}
.sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* INTRODUCTION AND YEAR SELECTOR */
.hero{padding:var(--tyit-opening-inset) 0 var(--tyit-opening-content-gap)}
.kicker{font-variant:small-caps;font-family:var(--tyit-font-structural);font-size:var(--tyit-type-small);text-transform:uppercase;letter-spacing:.17em;color:var(--teal);font-weight:800}
.hero h1{font-family:var(--tyit-font-editorial);font-size:var(--tyit-type-display);line-height:.96;letter-spacing:-.055em;font-weight:500;margin:0 0 var(--tyit-opening-title-gap);max-width:800px}
.hero h1 em{font-style:italic;color:var(--clay);display:inline-block}
.hero p{max-width:880px;color:var(--muted);font-size:var(--tyit-type-standard);margin:0}
.yearbar{display:flex;align-items:center;--year-slot:56px;width:min(100%,430px);height:50px;padding:3px 0;margin:0 0 15px;border:1px solid var(--line);border-radius:var(--radius-control);background:var(--tyit-surface-warm);overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;user-select:none}
.yearbar::before,.yearbar::after{content:"";flex:0 0 calc((100% - var(--year-slot))/2)}
.yearbar .year-position{display:flex;align-items:center;justify-content:center;flex:0 0 var(--year-slot);scroll-snap-align:center;min-width:0;height:42px;border:0;background:transparent;padding:0;color:var(--muted);font-family:var(--tyit-font-structural);font-weight:400;white-space:nowrap;transition:color .15s,font-size .15s}
.yearbar .distance-0{font-size:var(--tyit-type-selector-active);font-weight:var(--tyit-weight-selector-active);color:var(--forest)}
.yearbar .distance-1{font-size:var(--tyit-type-selector-near)}
.yearbar .distance-2{font-size:var(--tyit-type-selector-far);color:var(--muted)}
.yearbar .distance-3{cursor:pointer}
.yearbar .year-dot{width:4px;height:4px;border-radius:50%;background:var(--muted)}
.yearbar button:hover{color:var(--forest)}
.yearbar button:hover .year-dot{background:var(--teal)}
.yearbar button:focus-visible{outline:2px solid var(--teal);outline-offset:-3px;border-radius:var(--radius-control)}
.yearbar .year-position.is-selected{color:var(--forest);font-weight:var(--tyit-weight-selector-active)}
.yearbar .year-position.is-selected .year-dot{background:var(--clay);width:6px;height:6px}

/* MAP / ROUTES / STATISTICS */
.atlas-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:13px;align-items:start}
.map-column{min-width:0;display:flex;flex-direction:column;gap:0}
.mapwrap{background:var(--forest);border-radius:var(--radius-control);overflow:hidden;position:relative}
.maptop{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;color:var(--tyit-text-on-dark);padding:clamp(12px,2vw,22px) clamp(17px,2vw,25px) 7px}
.maptop h2{font:500 clamp(22px,1.7vw,25px) var(--tyit-font-editorial);margin:0}
.mapbox{height:auto;min-height:0;aspect-ratio:2/1}
.mapbox svg{width:100%;height:100%;display:block}
.ocean{fill:#1a3232}
.land{fill:#a9b9a9;stroke:#d0d9ca;stroke-width:.6;opacity:.85}
.grid{fill:none;stroke:#496460;stroke-width:1;stroke-dasharray:2 5;opacity:.6}
.route{fill:none;stroke:#f0aa68;stroke-width:1.45;opacity:.57;stroke-linecap:round}
.route.active{stroke:#fff5d9;stroke-width:2.7;opacity:1}
.dot{fill:#f5bb7d;stroke:#173230;stroke-width:1.4}
.dot.active{fill:#fff7de;stroke:#de9154;stroke-width:2}
.mapcaption{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:0 clamp(17px,2vw,25px) clamp(15px,2vw,20px);color:#c7d5cd;font-size:clamp(11px,.7vw,12px)}
.mapcaption strong{color:var(--tyit-text-on-dark);font-weight:700}
.route-mode-count{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.route-mode-count svg{overflow:visible}
.route-mode-count .route{opacity:1;stroke-width:2}
#world-map .route.rail,.tripmini .route.rail{stroke:var(--retro-route-rail);stroke-dasharray:none}
#world-map .route.bus,.tripmini .route.bus{stroke:var(--retro-route-bus);stroke-dasharray:5 3}
#world-map .route.car,.tripmini .route.car{stroke:var(--retro-route-car);stroke-dasharray:6 3}
#world-map .route.expedition,.tripmini .route.expedition{stroke:var(--retro-route-expedition);stroke-dasharray:2 4}
#world-map .route.surface,.tripmini .route.surface{stroke:var(--retro-route-surface);stroke-dasharray:7 3}
#world-map .route.active{stroke-width:2.7;opacity:1}
#world-map .transfer-anchor{fill:none;stroke:var(--retro-route-expedition);stroke-width:2;stroke-dasharray:2 2;pointer-events:visiblePainted}
#world-map .expedition-itinerary,.tripmini .expedition-itinerary{fill:none;stroke:var(--retro-route-expedition);stroke-width:1.8;stroke-dasharray:3 4;stroke-linecap:round;opacity:.88;pointer-events:visibleStroke}
#world-map .expedition-itinerary.active{stroke-width:2.8;opacity:1}
#world-map .expedition-waypoint{fill:#d5f0f3;stroke:#527f88;stroke-width:1.5;pointer-events:visiblePainted}
.route-mode-count .route.rail{stroke:var(--retro-route-rail);stroke-dasharray:none}
.route-mode-count .route.bus{stroke:var(--retro-route-bus);stroke-dasharray:5 3}
.route-mode-count .route.car{stroke:var(--retro-route-car);stroke-dasharray:6 3}
.route-mode-count .route.expedition{stroke:var(--retro-route-expedition);stroke-dasharray:2 4}
.route-mode-count .route.surface{stroke:var(--retro-route-surface);stroke-dasharray:7 3}
.map-column .stats{margin:10px 0 0;gap:10px;width:100%;max-width:100%;box-sizing:border-box;grid-template-columns:repeat(3,minmax(0,1fr))}
.map-column .stats[hidden]{display:none}
.map-column .stat{min-width:0}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:19px 0 12px}
.stat{background:var(--tyit-surface-warm);border:1px solid var(--line);border-radius:var(--radius-surface);padding:15px 17px}
.stat strong{font:500 30px/1 var(--tyit-font-editorial);display:block}
.stat span{font-size:var(--tyit-type-small);color:var(--muted);display:block;margin-top:6px}

/* HIGHLIGHTS / INTERACTIVE SELECTION */
.spotlight-section{margin:0 0 20px;padding:clamp(13px,1.5vw,15px) clamp(13px,1.5vw,17px) 17px;background:color-mix(in srgb,var(--paper) 76%,var(--sage));border:1px solid var(--line);border-radius:var(--radius-surface)}
.keytrips{margin:0;min-height:0;height:auto;display:flex;flex-direction:column}
.spotlights-heading{flex:none;margin:0 5px 8px;font:var(--tyit-structural-weight) var(--tyit-type-structural)/1.4 var(--tyit-font-structural);letter-spacing:var(--tyit-structural-tracking);text-transform:uppercase;color:var(--forest)}
.spotlights{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:9px}
.keytrips .spotlights{flex:1;min-height:0;align-content:start;padding:5px 8px 12px 5px;scrollbar-width:thin}
.spotlight-entry{display:flex;min-width:0;cursor:pointer;align-items:center;gap:8px;padding-right:8px;border:1px solid var(--line);border-radius:var(--radius-control);background:var(--paper);transition:border-color .16s}
.spotlight-entry:hover,.spotlight-entry.is-active{border-color:var(--teal)}
.spotlight-entry>.spotlight{flex:1;min-width:0;width:auto;border:0;border-radius:0;background:transparent;padding:11px 0 11px 13px}
.spotlight-entry>.spotlight:hover,.spotlight-entry>.spotlight[aria-pressed="true"]{border-color:transparent}
.spotlight-entry>.nav-arrow{color:var(--forest)}
.spotlight{appearance:none;width:100%;min-width:0;display:flex;align-items:center;gap:12px;text-align:left;padding:11px 13px;border:1px solid var(--line);border-radius:var(--radius-control);background:var(--paper);color:var(--ink);transition:border-color .16s}
.spotlight:hover,.spotlight[aria-pressed="true"]{border-color:var(--teal)}
.spotlight:focus-visible{outline:3px solid var(--teal);outline-offset:2px}
.spotlight-number{flex:0 0 38px;height:38px;border-radius:var(--radius-surface);display:grid;place-items:center;font:600 18px/1 var(--tyit-font-editorial);color:var(--tyit-text-on-dark)}
.spotlight-copy{min-width:0}
.spotlight-title{display:block;font:500 16px/1.15 var(--tyit-font-editorial);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.spotlight-more{display:flex;align-items:center;gap:13px;padding:7px 4px;color:var(--muted);font:600 10px/1.4 var(--tyit-font-structural);letter-spacing:.15em;text-transform:uppercase}
.spotlight-more::before,.spotlight-more::after{content:"";flex:1;height:1px;background:var(--line)}
.spotlight-number,.triphead .n.top-trip-rank{background:var(--retro-accent);color:var(--retro-foreground,var(--tyit-text-on-dark))}

/* JOURNEYS / ARCHIVE / MINI-MAPS */
.archive-section{max-width:var(--tyit-structured-max);margin-inline:auto;padding-bottom:clamp(36px,5vw,72px)}
.sectionhead{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:var(--tyit-editorial-section-gap) 0 var(--tyit-heading-content-gap)}
.sectionhead .kicker{margin:0}
.search{width:min(280px,100%);padding:10px 15px}
.tripgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,332px),1fr));column-gap:13px;row-gap:13px}
.trip{cursor:pointer;background:var(--tyit-surface-warm);border:1px solid var(--line);border-radius:var(--radius-control);padding:19px;min-height:0;display:grid;grid-row:span 4;grid-template-rows:subgrid;row-gap:0;align-self:stretch}
.trip:nth-child(even){background:var(--paper)}
.trip:focus-visible{outline:3px solid var(--teal);outline-offset:3px}
.triphead{display:flex;justify-content:space-between;align-items:center;gap:10px;color:var(--forest);font-weight:800;font-size:var(--tyit-type-small);text-transform:uppercase;letter-spacing:.1em}
.triphead .n{background:var(--sage);color:var(--forest);border-radius:999px;padding:4px 9px;letter-spacing:0}
.triphead .n.top-trip-rank{border-radius:999px;white-space:nowrap}
.trip h3{font:500 var(--tyit-type-subheading)/1.14 var(--tyit-font-editorial);letter-spacing:-.02em;margin:8px 0 7px}
.tripmini{height:80px;position:relative;overflow:hidden;border:1px solid var(--line);border-radius:var(--radius-surface);margin:0 0 11px;background:var(--forest)}
.tripmini svg{width:100%;height:100%;display:block}
.tripmini .land{stroke-width:.45;opacity:.82}
.tripmini .route{opacity:.85;stroke-linecap:round}
.tripmini .route.active{opacity:1}
.tripmini .dot{stroke-width:1.2}
.tripbutton{all:unset;cursor:pointer;display:grid;grid-row:span 3;grid-template-rows:subgrid;row-gap:0;min-width:0}
.tripbutton:focus-visible{outline:3px solid var(--teal);outline-offset:4px;border-radius:var(--radius-control)}
.trip-editorial{display:flex;flex-direction:column;gap:8px;position:relative;min-height:44px;margin:0;padding:7px 14px 9px;font-size:var(--tyit-type-standard);line-height:1.6;color:var(--ink)}
.trip-editorial>.nav-arrow{align-self:flex-end;margin-top:auto;position:relative;display:inline-flex;color:var(--forest)}
.empty{grid-column:1/-1;border:1px dashed var(--line);padding:30px;border-radius:var(--radius-surface);color:var(--muted);text-align:center}

/* SHARED PREVIEW PLACEMENT / NO DUPLICATE CARD RENDERER */
button.nav-arrow.retros-journey-trigger{appearance:none;cursor:pointer;font:400 18px/1 var(--tyit-font-structural)}
.retros-journey-trigger.is-preview-open{border-color:var(--forest);background:var(--paper);color:var(--forest)}
.retros-journey-trigger:focus-visible{outline:3px solid var(--teal);outline-offset:3px}

/* Inline preview only when the archive is one column; shared journey CSS still draws the card. */
.trip-editorial>.retros-preview--inline{width:100%;margin-top:8px}
.trip-editorial:has(>.retros-preview--inline)>.retros-journey-trigger{display:none}
.retros-preview.retros-preview--inline{position:static;inset:auto;z-index:auto;max-height:none;overflow:visible}

/* The sole page-layout breakpoint: map + Highlights side by side when they fit. */
@container retros-shell (min-width:757px){
  .atlas-layout{grid-template-columns:minmax(0,1fr) minmax(270px,340px)}
  .keytrips .spotlights{overflow-y:hidden;overscroll-behavior:contain}
}

/* Compact text and spacing follow the same narrow layout, preserving mobile approval. */
@container retros-shell (max-width:756.9px){
  .hero p{font-size:clamp(14px,1.8vw,16px);line-height:1.45}
  .spotlight-title{font-size:clamp(14px,2vw,16px)}
  .trip-editorial{font-size:14px}
  .trip h3{font-size:22px}
}
