:root {
  --ink: #102d35;
  --ink-soft: #29464c;
  --lichen: #c9d65b;
  --orange: #f26a3d;
  --fog: #f2f5f1;
  --granite: #a9b5b1;
  --white: #fcfdf9;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Atkinson Hyperlegible", Arial, sans-serif;
  --font-data: "IBM Plex Mono", Consolas, monospace;
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --measure: 68ch;
  --page-pad: clamp(1rem, 4vw, 5rem);
  --border: 1px solid var(--granite);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .22em; }
button, input, textarea, select { font: inherit; font-size: 1rem; }
button, a { -webkit-tap-highlight-color: transparent; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}

h1, h2, h3, p, figure, dl { margin-top: 0; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: .94;
  letter-spacing: -.025em;
  overflow-wrap: break-word;
  hyphens: auto;
}
h1 { font-size: clamp(3.8rem, 15vw, 8.8rem); }
h2 { font-size: clamp(2.8rem, 10vw, 6.4rem); }
h3 { font-size: clamp(2rem, 7vw, 3.4rem); }
p { max-width: var(--measure); }

.skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  padding: .8rem 1rem;
  background: var(--white);
  color: var(--ink);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: .65rem var(--page-pad);
  border-bottom: 1px solid rgba(252,253,249,.24);
  background: var(--ink);
  color: var(--white);
}

.brand {
  display: grid;
  grid-template-columns: 30px auto;
  grid-template-rows: auto auto;
  align-items: center;
  min-height: 44px;
  color: inherit;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}
.brand small {
  grid-column: 2;
  font-family: var(--font-data);
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: .04em;
  opacity: .72;
  text-transform: none;
}
.brand-mark {
  grid-row: 1 / span 2;
  display: flex;
  width: 20px;
  height: 32px;
  align-items: flex-end;
  gap: 3px;
}
.brand-mark i { display: block; width: 4px; background: var(--lichen); transform: skewY(-35deg); }
.brand-mark i:nth-child(1) { height: 13px; }
.brand-mark i:nth-child(2) { height: 22px; }
.brand-mark i:nth-child(3) { height: 31px; background: var(--orange); }

.menu-toggle {
  display: flex;
  min-width: 76px;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
}
.menu-bars, .menu-bars::before {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  content: "";
  transition: transform .2s ease;
}
.menu-bars::before { transform: translateY(6px); }
.menu-toggle[aria-expanded="true"] .menu-bars { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: rotate(-90deg); }

.primary-nav {
  position: fixed;
  inset: 64px 0 0;
  display: none;
  padding: var(--space-4) var(--page-pad);
  background: var(--ink);
  color: var(--white);
}
.primary-nav.is-open { display: flex; flex-direction: column; }
.primary-nav a {
  display: flex;
  min-height: 52px;
  align-items: center;
  border-bottom: 1px solid rgba(252,253,249,.18);
  font-family: var(--font-display);
  font-size: 1.6rem;
  text-decoration: none;
}
.primary-nav .nav-action { color: var(--lichen); }

.hero {
  position: relative;
  display: grid;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}
.hero-copy { padding: var(--space-5) var(--page-pad) var(--space-4); }
.route-stamp, .section-index, .dispatch-meta, .route-km, .route-position, .ledger-bearing {
  font-family: var(--font-data);
  font-size: .75rem;
  letter-spacing: .03em;
}
.route-stamp { display: flex; align-items: center; gap: .8rem; color: var(--granite); }
.route-stamp span { padding: .25rem .45rem; background: var(--lichen); color: var(--ink); }
.hero h1 { max-width: 9ch; margin: 0 0 var(--space-3); }
.hero-intro { max-width: 54ch; color: #dbe2dd; font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; margin-top: var(--space-4); }
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: .72rem 1.15rem;
  border: 2px solid transparent;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}
.button-primary { background: var(--orange); color: var(--ink); }
.button-dark { background: var(--ink); color: var(--white); }
.button-outline { border-color: var(--ink); }
.text-link { display: inline-flex; min-height: 44px; align-items: center; font-weight: 700; }
.hero-visual { position: relative; margin: 0; }
.hero-visual img { width: 100%; min-height: 360px; object-fit: cover; }
.hero-visual figcaption, .offset-figure figcaption, .bell-feature figcaption {
  padding: .65rem var(--page-pad);
  font-family: var(--font-data);
  font-size: .68rem;
}
.hero-visual figcaption span { color: var(--lichen); }
.hero-field-note { padding: 0 var(--page-pad) var(--space-4); }
.hero-field-note dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid rgba(252,253,249,.24); }
.hero-field-note dl div { padding: 1rem .55rem; border-right: 1px solid rgba(252,253,249,.24); }
.hero-field-note dl div:last-child { border-right: 0; }
.hero-field-note dt { font-family: var(--font-data); font-size: .62rem; color: var(--granite); }
.hero-field-note dd { margin: .3rem 0 0; font-family: var(--font-display); font-size: 1.3rem; line-height: 1; }

.route-section, .dispatch-section { padding: var(--space-6) var(--page-pad); }
.section-heading { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.section-heading h2 { max-width: 10ch; margin-bottom: 0; }
.section-heading > p { align-self: end; margin-bottom: 0; }
.section-index { margin-bottom: .75rem; color: #557077; }
.direction-control { display: grid; grid-template-columns: 1fr 1fr; max-width: 520px; margin-bottom: var(--space-4); border: 2px solid var(--ink); }
.direction-control button { min-height: 48px; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-weight: 700; }
.direction-control button.is-active { background: var(--ink); color: var(--white); }
.route-workbench { border-top: 2px solid var(--ink); }
.route-ribbon { position: relative; padding: var(--space-3) 0; }
.route-ribbon::before { position: absolute; top: 0; bottom: 0; left: 17px; width: 3px; background: var(--granite); content: ""; }
.route-stop {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  width: 100%;
  min-height: 64px;
  align-items: center;
  gap: .75rem;
  padding: .55rem 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.route-stop-dot { position: relative; z-index: 1; width: 18px; height: 18px; margin-left: 9px; border: 4px solid var(--fog); background: var(--ink); transform: rotate(45deg); }
.route-stop-name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.route-stop-km { font-family: var(--font-data); font-size: .67rem; }
.route-stop.is-active .route-stop-dot { width: 24px; height: 24px; margin-left: 6px; background: var(--orange); }
.route-stop.is-active .route-stop-name { color: #b93817; }
.route-leaf { position: relative; padding: var(--space-4); background: var(--lichen); }
.route-leaf-head { display: flex; justify-content: space-between; gap: 1rem; }
.route-leaf h3 { max-width: 12ch; margin: var(--space-2) 0; }
.route-leaf > p { max-width: 52ch; }
.route-cues { display: flex; flex-wrap: wrap; gap: .5rem; margin: var(--space-3) 0; }
.route-cues span { padding: .35rem .55rem; border: 1px solid var(--ink); font-family: var(--font-data); font-size: .66rem; }
.image-slot {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  background-color: var(--ink-soft);
  background-image: linear-gradient(128deg, transparent 0 35%, rgba(201,214,91,.45) 35% 52%, transparent 52%), repeating-linear-gradient(165deg, transparent 0 28px, rgba(252,253,249,.09) 29px 30px);
}
.image-slot::before {
  position: absolute;
  top: 1rem;
  left: 1rem;
  max-width: calc(100% - 2rem);
  padding: .35rem .5rem;
  background: var(--fog);
  color: var(--ink);
  content: "IMAGE SLOT";
  font-family: var(--font-data);
  font-size: .65rem;
}
.image-slot::after { position: absolute; right: 1rem; bottom: 1rem; color: var(--white); content: attr(data-image-brief); font-size: .72rem; line-height: 1.3; max-width: 28ch; }
.image-slot:has(img) { background: none; }
.image-slot:has(img)::before, .image-slot:has(img)::after { content: none; }
.image-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.image-slot-route { min-height: 190px; margin: var(--space-4) calc(var(--space-4) * -1) calc(var(--space-4) * -1); }

.split-feature { display: grid; background: var(--white); }
.split-copy { padding: var(--space-6) var(--page-pad); }
.split-copy h2 { max-width: 10ch; }
.offset-figure { margin: 0; background: var(--ink); color: var(--white); }
.image-slot-portrait { min-height: 480px; }

.community-ledger { padding: var(--space-4) var(--page-pad) var(--space-6); background: var(--white); }
.ledger-row { display: grid; grid-template-columns: 38px 1fr; gap: .5rem 1rem; padding: var(--space-3) 0; border-top: var(--border); }
.ledger-row:last-child { border-bottom: var(--border); }
.ledger-number { display: grid; width: 38px; height: 44px; place-items: center; background: var(--ink); color: var(--white); font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.ledger-row-active .ledger-number { background: var(--orange); color: var(--ink); }
.ledger-copy h3 { margin: 0; font-size: 2.2rem; }
.ledger-copy h3 a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; }
.ledger-copy p { margin: .45rem 0; }
.image-slot-thumb { grid-column: 2; min-height: 180px; }
.ledger-bearing { grid-column: 2; color: #557077; }

.dispatch-section { background: var(--ink); color: var(--white); }
.dispatch-section .section-index { color: var(--lichen); }
.dispatch-section .section-heading > p { color: #dbe2dd; }
.dispatch-list { display: grid; gap: var(--space-5); }
.dispatch { border-top: 1px solid rgba(252,253,249,.3); padding-top: var(--space-2); }
.dispatch h3 { margin-bottom: .8rem; }
.dispatch h3 a { text-decoration-color: var(--orange); }
.dispatch-meta { color: var(--lichen); }
.image-slot-wide, .image-slot-landscape { margin-bottom: var(--space-3); }

.planning-band { display: grid; }
.planning-intro { padding: var(--space-6) var(--page-pad) var(--space-4); }
.planning-intro h2 { max-width: 8ch; }
.image-slot-planning { min-height: 360px; }
.planning-ledger { padding: 0 var(--page-pad) var(--space-6); }
.planning-ledger a { display: grid; min-height: 108px; align-content: center; padding: 1rem 0; border-bottom: 1px solid var(--ink); text-decoration: none; }
.planning-ledger span, .planning-ledger small { font-family: var(--font-data); font-size: .7rem; }
.planning-ledger strong { font-family: var(--font-display); font-size: 1.55rem; }
.planning-ledger small { color: #557077; }

.bell-feature { display: grid; padding: var(--space-6) var(--page-pad); background: var(--lichen); }
.bell-feature figure { margin: 0 0 var(--space-4); }
.image-slot-bell { min-height: 450px; }
.bell-feature figcaption { padding-left: 0; }
.bell-feature h2 { max-width: 9ch; }

.final-route { position: relative; min-height: 520px; background: var(--ink); color: var(--white); }
.image-slot-panorama { position: absolute; inset: 0; min-height: 100%; opacity: .55; }
.final-route-copy { position: relative; z-index: 1; padding: var(--space-7) var(--page-pad); }
.final-route-copy h2 { max-width: 8ch; }

.site-footer { display: grid; gap: var(--space-4); padding: var(--space-5) var(--page-pad); background: var(--ink); color: var(--white); }
.brand-footer { display: inline-grid; }
.footer-brand p { color: var(--granite); }
.image-slot-footer { width: 180px; min-height: 0; aspect-ratio: 1 / 1; }
.site-footer nav { display: grid; }
.site-footer nav a { display: flex; min-height: 44px; align-items: center; border-bottom: 1px solid rgba(252,253,249,.2); }
.footer-note { font-size: .85rem; color: var(--granite); }

/* Interior pages */
.interior-header { border-bottom-color: rgba(16,45,53,.2); background: var(--fog); color: var(--ink); }
.interior-header .menu-toggle { color: var(--ink); }
.breadcrumb { padding: 1rem var(--page-pad); border-bottom: var(--border); font-family: var(--font-data); font-size: .7rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { margin-right: .5rem; content: "/"; color: #557077; }
.breadcrumb a { display: inline-flex; min-height: 44px; align-items: center; }
.place-masthead { display: grid; }
.place-title { padding: var(--space-5) var(--page-pad); }
.place-title h1 { margin-bottom: var(--space-2); }
.place-kicker { font-family: var(--font-data); color: #557077; }
.place-deck { font-size: 1.16rem; }
.place-hero { margin: 0; background: var(--ink); color: var(--white); }
.place-hero .image-slot { min-height: 480px; }
.place-hero figcaption { padding: .8rem var(--page-pad); font-family: var(--font-data); font-size: .7rem; }
.fact-ledger { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: var(--space-3) var(--page-pad); background: var(--ink); color: var(--white); }
.fact-ledger div { padding: 1rem; border: 1px solid rgba(252,253,249,.22); }
.fact-ledger dt { font-family: var(--font-data); font-size: .65rem; color: var(--granite); }
.fact-ledger dd { margin: .3rem 0 0; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.05; }
.arrival-strip { padding: var(--space-5) var(--page-pad); background: var(--white); }
.arrival-track { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: var(--space-3); }
.arrival-track::before { position: absolute; top: 13px; right: 10%; left: 10%; height: 3px; background: var(--granite); content: ""; }
.arrival-stop { position: relative; z-index: 1; text-align: center; font-family: var(--font-data); font-size: .66rem; }
.arrival-stop i { display: block; width: 26px; height: 26px; margin: 0 auto .7rem; border: 5px solid var(--white); background: var(--ink); transform: rotate(45deg); }
.arrival-stop.is-current i { background: var(--orange); }
.story-band { display: grid; padding: var(--space-6) var(--page-pad); }
.story-band:nth-of-type(even) { background: var(--white); }
.story-copy h2 { max-width: 10ch; }
.story-copy p { font-size: 1.05rem; }
.story-figure { margin: var(--space-4) 0 0; }
.story-figure .image-slot { min-height: 380px; }
.story-figure figcaption { margin-top: .6rem; font-family: var(--font-data); font-size: .68rem; }
.callout { margin: var(--space-3) 0; padding: var(--space-3); border-left: 6px solid var(--orange); background: var(--fog); }
.callout h3 { font-size: 1.8rem; }
.practical-section { padding: var(--space-6) var(--page-pad); background: var(--ink); color: var(--white); }
.practical-section h2 { max-width: 9ch; }
.practical-table { width: 100%; border-collapse: collapse; margin: var(--space-4) 0; }
.practical-table th, .practical-table td { display: block; padding: .6rem 0; text-align: left; }
.practical-table tr { display: block; padding: .75rem 0; border-top: 1px solid rgba(252,253,249,.28); }
.practical-table th { font-family: var(--font-data); font-size: .7rem; color: var(--lichen); }
.practical-figure { margin: var(--space-4) 0 0; }
.practical-figure .image-slot { min-height: 300px; }
.adjacent-guides { display: grid; }
.adjacent-guide { min-height: 220px; padding: var(--space-4) var(--page-pad); text-decoration: none; }
.adjacent-guide:first-child { background: var(--lichen); }
.adjacent-guide:last-child { background: var(--orange); }
.adjacent-guide span { font-family: var(--font-data); font-size: .7rem; }
.adjacent-guide strong { display: block; max-width: 10ch; margin-top: .8rem; font-family: var(--font-display); font-size: 2.6rem; line-height: .95; }
.source-note { padding: var(--space-4) var(--page-pad); border-top: var(--border); font-size: .88rem; }

@media (min-width: 48rem) {
  .section-heading { grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); }
  .hero { grid-template-columns: 44% 56%; grid-template-rows: 1fr auto; }
  .hero-copy { align-self: center; padding-top: var(--space-7); padding-bottom: var(--space-7); }
  .hero-visual { grid-column: 2; grid-row: 1 / span 2; }
  .hero-visual img { height: 100%; min-height: 760px; }
  .hero-field-note { grid-column: 1; grid-row: 2; }
  .route-workbench { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(400px, 1.2fr); }
  .route-ribbon { padding-right: var(--space-4); }
  .split-feature { grid-template-columns: 58% 42%; }
  .offset-figure { margin-top: var(--space-7); }
  .ledger-row { grid-template-columns: 48px minmax(230px, 1fr) minmax(220px, .65fr) 100px; align-items: center; }
  .ledger-number { width: 44px; }
  .image-slot-thumb, .ledger-bearing { grid-column: auto; }
  .dispatch-list { grid-template-columns: 1fr 1fr; }
  .dispatch-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.35fr .65fr; gap: var(--space-4); }
  .dispatch-wide .image-slot { margin-bottom: 0; }
  .planning-band { grid-template-columns: 1fr 1fr; }
  .planning-intro { grid-column: 1; }
  .image-slot-planning { grid-column: 2; grid-row: 1 / span 2; min-height: 650px; }
  .planning-ledger { grid-column: 1; }
  .bell-feature { grid-template-columns: .8fr 1.2fr; align-items: center; gap: var(--space-6); }
  .bell-feature figure { margin-bottom: 0; }
  .site-footer { grid-template-columns: 1.2fr .6fr .9fr; }
  .footer-note { grid-column: 1 / -1; }
  .place-masthead { grid-template-columns: 42% 58%; }
  .place-title { align-self: center; }
  .place-hero .image-slot { min-height: 680px; }
  .fact-ledger { grid-template-columns: repeat(4, 1fr); }
  .story-band { grid-template-columns: minmax(280px, .75fr) minmax(360px, 1.25fr); gap: var(--space-6); align-items: center; }
  .story-band.story-reverse .story-copy { order: 2; }
  .story-band.story-reverse .story-figure { order: 1; }
  .story-figure { margin: 0; }
  .practical-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--space-5); }
  .practical-table th, .practical-table td { display: table-cell; padding: 1rem; }
  .practical-table tr { display: table-row; }
  .adjacent-guides { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 70rem) {
  .menu-toggle { display: none; }
  .primary-nav { position: static; display: flex; align-items: center; gap: .2rem; padding: 0; }
  .primary-nav a { min-height: 44px; padding: .3rem .75rem; border-bottom: 0; font-family: var(--font-body); font-size: .94rem; }
  .primary-nav .nav-action { margin-left: .5rem; border: 1px solid currentColor; }
  .interior-header .primary-nav { background: transparent; color: var(--ink); }
  .hero-copy { padding-left: max(var(--page-pad), calc((100vw - 1440px) / 2)); }
  .route-section, .dispatch-section, .community-ledger, .planning-band, .bell-feature, .story-band, .practical-section { padding-left: max(var(--page-pad), calc((100vw - 1440px) / 2)); padding-right: max(var(--page-pad), calc((100vw - 1440px) / 2)); }
  .route-heading { grid-template-columns: 1fr .55fr; }
  .split-copy { padding-left: max(var(--page-pad), calc((100vw - 1440px) / 2)); }
  .dispatch-list { grid-template-columns: 1.3fr .85fr .85fr; }
  .dispatch-wide { grid-column: auto; display: block; }
  .dispatch-wide .image-slot { margin-bottom: var(--space-3); }
  .planning-band { grid-template-columns: .8fr .85fr 1.15fr; padding-top: var(--space-7); padding-bottom: var(--space-7); }
  .planning-intro { grid-column: 1; padding: 0 var(--space-4) 0 0; }
  .image-slot-planning { grid-column: 2; grid-row: 1; min-height: 620px; }
  .planning-ledger { grid-column: 3; padding: 0 0 0 var(--space-4); }
  .place-title { padding-left: max(var(--page-pad), calc((100vw - 1440px) / 2)); }
}

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