#079 style mixed mobile: high Outdoor Expedition Journal

Sidetracked Expedition Journal

Topographical parchment and alpine-pine wilderness journal with compass-vermilion bearings, contour linework, and field dispatches.

Inspired by Sidetracked Magazine ↗

Download .html
Fullscreen ↗

WHY THIS AESTHETIC IS UNIQUE

Combines cartographic precision—contour elevation lines, GPS bearings, and expedition dossiers—with gripping editorial typography for human-powered wilderness stories.

BEST FOR

Expedition and adventure journalismAlpine clubs and conservation nonprofitsTrail and cartographic field guidesDocumentary photography dispatches

TAGS

COLOR PALETTE (CLICK TO COPY HEX)

TYPOGRAPHY

Display
Newsreader
Body
Inter
Mono
IBM Plex Mono
Scale
Authoritative expedition-narrative serifs paired with crisp cartographic monospace telemetry (lat/lon, elevation gain, expedition days).

Google Fonts Stylesheet ↗

ARCHITECTURE & MOBILE NOTES

LAYOUT

Dark alpine-pine topographical hero with SVG elevation contours above a parchment field-dispatch grid and interactive route dossier.

INTERACTION

Interactive Terrain Filter (Alpine, Polar, Desert, Ocean) and clickable Expedition Waypoint Log that highlights elevation markers on the SVG contour map.

MOBILE

Clean field-dispatch reading stack at 390px with >=44px terrain filter buttons and responsive SVG contour header.

AI AGENT GUARDRAILS

DO

  • Integrate subtle topographic contour lines and authentic lat/lon telemetry
  • Use Compass Vermilion sparingly for north markers, active waypoints, and issue numbers
  • Maintain high editorial contrast on both alpine-pine and map-parchment sections

DON'T

  • Do not use cartoonish outdoor badges or cliché distressed wood backgrounds
  • Do not let decorative map lines obscure body copy legibility
STANDALONE SOURCE · demos/sidetracked-expedition-log.html (23.9 KB)
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Sidetracked — Volume 31: Expedition Journal &amp; Field Dossier</title>
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Inter:wght@400;500;600&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,600;1,6..72,400&display=swap" rel="stylesheet">
  <style>
    :root {
      --canvas: #F3EFE6;
      --surface: #16211D;
      --surface-elev: #1E2C27;
      --ink: #181C19;
      --ink-light: #F3EFE6;
      --accent: #C83E2B;
      --muted: #666C65;
      --muted-light: #9EA8A2;
      --rule-dark: rgba(243, 239, 230, 0.14);
      --rule-light: rgba(24, 28, 25, 0.14);
      --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
      --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
    }

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

    html {
      background: var(--canvas);
      color: var(--ink);
      scroll-behavior: smooth;
    }

    body {
      font-family: var(--font-body);
      font-size: 0.9375rem;
      line-height: 1.65;
      background: var(--canvas);
      color: var(--ink);
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    button {
      font: inherit;
      color: inherit;
      background: none;
      border: none;
      cursor: pointer;
    }

    .wrap {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 clamp(18px, 4vw, 44px);
    }

    /* Dark Alpine Pine Header */
    .masthead {
      position: sticky;
      top: 0;
      z-index: 50;
      background: var(--surface);
      color: var(--ink-light);
      border-bottom: 1px solid var(--rule-dark);
    }

    .masthead-bar {
      height: 68px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .brand-title {
      font-family: var(--font-display);
      font-size: 1.375rem;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .issue-badge {
      font-family: var(--font-mono);
      font-size: 0.6875rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--accent);
      border: 1px solid rgba(200, 62, 43, 0.55);
      padding: 3px 8px;
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 26px;
    }

    .nav-links a {
      font-family: var(--font-mono);
      font-size: 0.75rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--muted-light);
      transition: color 0.2s ease;
    }

    .nav-links a:hover {
      color: var(--ink-light);
    }

    .mobile-btn {
      display: none;
      min-width: 44px;
      min-height: 44px;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--rule-dark);
      padding: 0 12px;
      font-family: var(--font-mono);
      font-size: 0.75rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--ink-light);
    }

    .mobile-drawer {
      display: none;
      background: var(--surface-elev);
      border-top: 1px solid var(--rule-dark);
      padding: 12px clamp(18px, 4vw, 44px) 20px;
    }

    .mobile-drawer.is-open {
      display: block;
    }

    .mobile-drawer a {
      display: flex;
      justify-content: space-between;
      align-items: center;
      min-height: 48px;
      border-bottom: 1px solid var(--rule-dark);
      font-family: var(--font-mono);
      font-size: 0.75rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--ink-light);
    }

    /* Dark Alpine Pine Hero & Topographic Waypoint Map */
    .alpine-band {
      background: var(--surface);
      color: var(--ink-light);
      padding: clamp(36px, 5vw, 68px) 0 clamp(48px, 6vw, 80px);
      border-bottom: 3px solid var(--accent);
    }

    .hero-top {
      display: grid;
      grid-template-columns: 1.15fr 0.85fr;
      gap: clamp(24px, 4vw, 56px);
      align-items: end;
      margin-bottom: 36px;
    }

    .kicker-dark {
      font-family: var(--font-mono);
      font-size: 0.75rem;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 14px;
    }

    .alpine-band h1 {
      font-family: var(--font-display);
      font-size: clamp(2.25rem, 4.8vw, 3.75rem);
      font-weight: 400;
      line-height: 1.08;
      letter-spacing: -0.01em;
    }

    .alpine-band h1 em {
      font-style: italic;
      color: #D7D1C4;
    }

    .hero-standfirst {
      color: var(--muted-light);
      font-size: 0.9375rem;
      line-height: 1.7;
      border-left: 2px solid var(--accent);
      padding-left: 18px;
    }

    /* Interactive Contour Dossier */
    .contour-dossier {
      display: grid;
      grid-template-columns: 1.3fr 0.7fr;
      border: 1px solid var(--rule-dark);
      background: var(--surface-elev);
    }

    .map-pane {
      padding: 20px;
      border-right: 1px solid var(--rule-dark);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 14px;
    }

    .map-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      font-family: var(--font-mono);
      font-size: 0.6875rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--muted-light);
    }

    .map-pane svg {
      display: block;
      width: 100%;
      height: auto;
      background: #121B18;
      border: 1px solid var(--rule-dark);
    }

    .wp-dot {
      cursor: pointer;
      transition: r 0.2s ease;
    }

    .telemetry-strip {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 10px;
      padding-top: 12px;
      border-top: 1px solid var(--rule-dark);
      font-family: var(--font-mono);
    }

    .tele-cell span {
      display: block;
      font-size: 0.625rem;
      color: var(--muted-light);
      text-transform: uppercase;
      letter-spacing: 0.1em;
    }

    .tele-cell strong {
      font-size: 0.8125rem;
      font-weight: 500;
      color: var(--ink-light);
    }

    .waypoint-pane {
      padding: 20px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 16px;
    }

    .waypoint-list {
      list-style: none;
      border-top: 1px solid var(--rule-dark);
    }

    .waypoint-btn {
      width: 100%;
      min-height: 54px;
      padding: 12px 10px;
      border-bottom: 1px solid var(--rule-dark);
      display: grid;
      grid-template-columns: 44px 1fr auto;
      align-items: center;
      gap: 10px;
      text-align: left;
      color: var(--muted-light);
      transition: background 0.2s ease, color 0.2s ease;
    }

    .waypoint-btn:hover {
      background: rgba(243, 239, 230, 0.05);
      color: var(--ink-light);
    }

    .waypoint-btn.is-active {
      background: rgba(200, 62, 43, 0.18);
      color: var(--ink-light);
    }

    .wp-code {
      font-family: var(--font-mono);
      font-size: 0.6875rem;
      color: var(--accent);
      font-weight: 500;
    }

    .wp-name {
      font-family: var(--font-display);
      font-size: 1.0625rem;
    }

    .wp-elev {
      font-family: var(--font-mono);
      font-size: 0.6875rem;
    }

    .active-note-box {
      background: #121B18;
      border-left: 2px solid var(--accent);
      padding: 14px;
      font-size: 0.84375rem;
      line-height: 1.6;
      color: #DDD7CB;
    }

    /* Parchment Field Dispatches Section */
    .parchment-band {
      padding: clamp(52px, 6vw, 88px) 0;
    }

    .dispatch-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      flex-wrap: wrap;
      gap: 20px;
      padding-bottom: 24px;
      border-bottom: 1px solid var(--rule-light);
      margin-bottom: 32px;
    }

    .kicker-light {
      font-family: var(--font-mono);
      font-size: 0.75rem;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 8px;
    }

    .dispatch-header h2 {
      font-family: var(--font-display);
      font-size: clamp(1.875rem, 3.6vw, 2.75rem);
      font-weight: 400;
      line-height: 1.15;
    }

    .terrain-filters {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .terrain-btn {
      min-height: 44px;
      padding: 0 16px;
      border: 1px solid rgba(24, 28, 25, 0.25);
      font-family: var(--font-mono);
      font-size: 0.75rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--muted);
      transition: all 0.2s ease;
    }

    .terrain-btn:hover {
      border-color: var(--ink);
      color: var(--ink);
    }

    .terrain-btn.is-active {
      background: var(--surface);
      border-color: var(--surface);
      color: var(--canvas);
    }

    .dispatch-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 28px;
    }

    .dispatch-card {
      border-top: 2px solid var(--ink);
      padding-top: 20px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 16px;
    }

    .dispatch-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-family: var(--font-mono);
      font-size: 0.6875rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .dispatch-terrain {
      color: var(--accent);
      font-weight: 500;
    }

    .dispatch-title {
      font-family: var(--font-display);
      font-size: 1.625rem;
      font-weight: 400;
      line-height: 1.22;
      margin: 10px 0 8px;
    }

    .dispatch-excerpt {
      color: var(--muted);
      font-size: 0.9rem;
      line-height: 1.7;
    }

    .dispatch-stats {
      display: flex;
      flex-wrap: wrap;
      gap: 18px;
      padding-top: 12px;
      border-top: 1px solid var(--rule-light);
      font-family: var(--font-mono);
      font-size: 0.6875rem;
      color: var(--ink);
      letter-spacing: 0.06em;
    }

    .footer {
      border-top: 1px solid var(--rule-light);
      padding: 32px 0 52px;
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 16px;
      font-family: var(--font-mono);
      font-size: 0.6875rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--muted);
    }

    @media (max-width: 920px) {
      .hero-top,
      .contour-dossier,
      .dispatch-grid {
        grid-template-columns: 1fr;
      }
      .map-pane {
        border-right: none;
        border-bottom: 1px solid var(--rule-dark);
      }
    }

    @media (max-width: 680px) {
      .nav-links,
      .issue-badge {
        display: none;
      }
      .mobile-btn {
        display: inline-flex;
      }
      .telemetry-strip {
        grid-template-columns: repeat(2, 1fr);
      }
    }
  </style>
</head>
<body>
  <header class="masthead">
    <div class="wrap masthead-bar">
      <a href="#top" class="brand">
        <span class="brand-title">Sidetracked</span>
        <span class="issue-badge">Vol. 31</span>
      </a>
      <nav class="nav-links" aria-label="Primary">
        <a href="#dossier">Route Dossier</a>
        <a href="#dispatches">Field Dispatches</a>
        <a href="#colophon">Print Archive</a>
      </nav>
      <button class="mobile-btn" id="mobileBtn" aria-expanded="false" aria-controls="mobileDrawer">Menu</button>
    </div>
    <nav class="mobile-drawer" id="mobileDrawer" aria-label="Mobile Navigation">
      <a href="#dossier" class="m-link"><span>01 / Route Dossier</span><span>&rarr;</span></a>
      <a href="#dispatches" class="m-link"><span>02 / Field Dispatches</span><span>&rarr;</span></a>
      <a href="#colophon" class="m-link"><span>03 / Print Archive</span><span>&rarr;</span></a>
    </nav>
  </header>

  <section class="alpine-band" id="top">
    <div class="wrap">
      <div class="hero-top">
        <div>
          <div class="kicker-dark">Expedition Dispatch 31.04 &mdash; Pamir-Alay Traverse</div>
          <h1>Across the <em>White Ridges</em> of the Western Karakoram</h1>
        </div>
        <p class="hero-standfirst">
          Twenty-two days on foot and ski across unmapped glacial saddles, carrying six-day food caches and barometric logs through late-autumn katabatic storms.
        </p>
      </div>

      <div class="contour-dossier" id="dossier">
        <div class="map-pane">
          <div class="map-bar">
            <span>TOPOGRAPHIC SECTOR 38N &middot; CONTOUR INTERVAL 100M</span>
            <span style="color: var(--accent);">N &uarr; 004&deg; MAG</span>
          </div>

          <svg id="topoSvg" viewBox="0 0 640 330" role="img" aria-label="Interactive topographic contour map with four clickable expedition waypoints">
            <!-- Topographic Contour Lines -->
            <g fill="none" stroke="#9EA8A2" stroke-opacity="0.22" stroke-width="1">
              <path d="M-20 270 C90 220, 160 250, 260 190 C360 130, 460 155, 660 80"/>
              <path d="M-20 235 C80 185, 170 210, 270 155 C370 100, 470 120, 660 52"/>
              <path d="M-20 198 C95 150, 185 168, 285 118 C385 68, 495 92, 660 26"/>
              <path d="M40 340 C150 280, 240 295, 340 232 C440 169, 540 195, 660 140"/>
              <path d="M130 340 C240 295, 320 285, 420 245 C510 208, 575 225, 660 190"/>
              <ellipse cx="468" cy="112" rx="88" ry="42" transform="rotate(-14 468 112)"/>
              <ellipse cx="472" cy="110" rx="54" ry="24" transform="rotate(-14 472 110)"/>
              <ellipse cx="176" cy="186" rx="74" ry="34" transform="rotate(-10 176 186)"/>
            </g>
            <!-- Grid ticks -->
            <g stroke="#F3EFE6" stroke-opacity="0.08" stroke-width="1">
              <line x1="160" y1="0" x2="160" y2="330"/>
              <line x1="320" y1="0" x2="320" y2="330"/>
              <line x1="480" y1="0" x2="480" y2="330"/>
              <line x1="0" y1="110" x2="640" y2="110"/>
              <line x1="0" y1="220" x2="640" y2="220"/>
            </g>
            <!-- Expedition Route Line -->
            <polyline points="92,256 226,192 384,142 512,96" fill="none" stroke="#F3EFE6" stroke-width="1.6" stroke-dasharray="5 5" opacity="0.75"/>
            <!-- Waypoint Nodes (interactive via JS) -->
            <g id="wpNodes"></g>
          </svg>

          <div class="telemetry-strip">
            <div class="tele-cell">
              <span>Coordinates</span>
              <strong id="teleCoords">36.412° N, 74.881° E</strong>
            </div>
            <div class="tele-cell">
              <span>Elevation</span>
              <strong id="teleElev">3,420 m</strong>
            </div>
            <div class="tele-cell">
              <span>Bearing</span>
              <strong id="teleBearing">058° ENE</strong>
            </div>
            <div class="tele-cell">
              <span>Dawn Temp</span>
              <strong id="teleTemp">-8° C</strong>
            </div>
          </div>
        </div>

        <div class="waypoint-pane">
          <div>
            <div class="map-bar" style="margin-bottom: 12px;">
              <span>EXPEDITION WAYPOINT LOG</span>
              <span>DAYS 01 &ndash; 22</span>
            </div>
            <ul class="waypoint-list" id="waypointList"></ul>
          </div>
          <div class="active-note-box" id="wpFieldNote"></div>
        </div>
      </div>
    </div>
  </section>

  <main class="parchment-band" id="dispatches">
    <div class="wrap">
      <div class="dispatch-header">
        <div>
          <div class="kicker-light">Human-Powered Dispatches</div>
          <h2>Field Stories &amp; Cartography</h2>
        </div>
        <div class="terrain-filters" role="group" aria-label="Filter expeditions by terrain">
          <button class="terrain-btn is-active" data-terrain="All">All Terrain</button>
          <button class="terrain-btn" data-terrain="Alpine">Alpine</button>
          <button class="terrain-btn" data-terrain="Polar">Polar</button>
          <button class="terrain-btn" data-terrain="Desert">Desert</button>
          <button class="terrain-btn" data-terrain="Ocean">Ocean</button>
        </div>
      </div>

      <div class="dispatch-grid" id="dispatchGrid"></div>
    </div>
  </main>

  <footer class="wrap" id="colophon">
    <div class="footer">
      <span>Sidetracked &mdash; Adventure &amp; Exploration Journal</span>
      <span>Printed on Uncoated 140gsm Offset Stock</span>
      <span>53.3811&deg; N, 1.4701&deg; W</span>
    </div>
  </footer>

  <script>
    const WAYPOINTS = [
      {
        id: 'wp1',
        code: 'WP-01',
        name: 'Shimshal Base Moraine',
        x: 92,
        y: 256,
        coords: '36.412° N, 74.881° E',
        elev: '3,420 m',
        bearing: '058° ENE',
        temp: '-4° C',
        note: 'Day 03: Sorted six-day rations on flat granite boulders beside the braided meltwater channel. Barometer steady at 1014 hPa.'
      },
      {
        id: 'wp2',
        code: 'WP-02',
        name: 'Yazghil Icefall Camp',
        x: 226,
        y: 192,
        coords: '36.449° N, 74.962° E',
        elev: '4,280 m',
        bearing: '042° NE',
        temp: '-11° C',
        note: 'Day 09: Roped traversal across blue-ice crevasse bridges before sunrise. Snow anchors held cleanly against 45 km/h spindrift.'
      },
      {
        id: 'wp3',
        code: 'WP-03',
        name: 'High Saddle Bivouac',
        x: 384,
        y: 142,
        coords: '36.487° N, 75.044° E',
        elev: '5,190 m',
        bearing: '064° ENE',
        temp: '-18° C',
        note: 'Day 15: Dug wind-wall shelter into wind-scoured firn. Melted snow for two hours to refill thermos flasks ahead of the ridge push.'
      },
      {
        id: 'wp4',
        code: 'WP-04',
        name: 'North Ridge Col',
        x: 512,
        y: 96,
        coords: '36.521° N, 75.118° E',
        elev: '5,640 m',
        bearing: '012° NNE',
        temp: '-21° C',
        note: 'Day 19: Reached the col at 07:40 under cobalt sky. Clear line of sight north across thirty kilometers of unnamed glaciated valleys.'
      }
    ];

    const DISPATCHES = [
      {
        terrain: 'Alpine',
        issue: 'VOL. 31 / NO. 01',
        title: 'Granite Spires of the Southern Patagonian Ice Field',
        excerpt: 'Waiting fourteen days in a storm-bound snow cave for a single eighteen-hour high-pressure window on Cerro Torre’s western flank.',
        distance: '118 KM',
        days: '24 DAYS',
        coords: '49.293° S, 73.098° W'
      },
      {
        terrain: 'Polar',
        issue: 'VOL. 31 / NO. 02',
        title: 'Svalbard Sea Ice: A Winter Pulk Crossing of Nordaustlandet',
        excerpt: 'Navigating polar twilight by compass bearing alone as pressure ridges groan beneath forty-kilogram expedition sledges.',
        distance: '340 KM',
        days: '31 DAYS',
        coords: '79.821° N, 22.410° E'
      },
      {
        terrain: 'Desert',
        issue: 'VOL. 31 / NO. 03',
        title: 'Salt Flats & Sandstone Arches of the Ennedi Plateau',
        excerpt: 'Tracing ancient caravan waterholes across Chad’s eastern Sahara with camels, paper topo sheets, and hand-drawn geological sketches.',
        distance: '410 KM',
        days: '19 DAYS',
        coords: '17.042° N, 21.815° E'
      },
      {
        terrain: 'Ocean',
        issue: 'VOL. 31 / NO. 04',
        title: 'Tidal Fjords of East Greenland by Folding Sea Kayak',
        excerpt: 'Paddling three hundred miles among tabular icebergs and basalt cliffs where summer pack ice opens for barely six weeks.',
        distance: '485 KM',
        days: '27 DAYS',
        coords: '65.613° N, 37.636° W'
      }
    ];

    let activeWpId = 'wp2';
    let activeTerrain = 'All';

    const wpNodesEl = document.getElementById('wpNodes');
    const wpListEl = document.getElementById('waypointList');
    const wpFieldNote = document.getElementById('wpFieldNote');
    const teleCoords = document.getElementById('teleCoords');
    const teleElev = document.getElementById('teleElev');
    const teleBearing = document.getElementById('teleBearing');
    const teleTemp = document.getElementById('teleTemp');
    const dispatchGrid = document.getElementById('dispatchGrid');

    function renderWaypoints() {
      const active = WAYPOINTS.find(w => w.id === activeWpId) || WAYPOINTS[0];

      wpNodesEl.innerHTML = WAYPOINTS.map(wp => {
        const isSel = wp.id === active.id;
        return `
          <g class="wp-dot" data-wp="${wp.id}" tabindex="0" role="button" aria-label="Select ${wp.name}">
            ${isSel ? `<circle cx="${wp.x}" cy="${wp.y}" r="16" fill="none" stroke="#C83E2B" stroke-width="1.5" opacity="0.8"/>` : ''}
            <circle cx="${wp.x}" cy="${wp.y}" r="${isSel ? 7 : 5}" fill="${isSel ? '#C83E2B' : '#F3EFE6'}" stroke="#121B18" stroke-width="1.5"/>
            <text x="${wp.x + 12}" y="${wp.y - 8}" fill="${isSel ? '#F3EFE6' : '#9EA8A2'}" font-family="IBM Plex Mono, monospace" font-size="10">${wp.code}</text>
          </g>
        `;
      }).join('');

      wpListEl.innerHTML = WAYPOINTS.map(wp => {
        const isSel = wp.id === active.id;
        return `
          <li>
            <button class="waypoint-btn ${isSel ? 'is-active' : ''}" data-wp="${wp.id}" aria-pressed="${isSel}">
              <span class="wp-code">${wp.code}</span>
              <span class="wp-name">${wp.name}</span>
              <span class="wp-elev">${wp.elev}</span>
            </button>
          </li>
        `;
      }).join('');

      teleCoords.textContent = active.coords;
      teleElev.textContent = active.elev;
      teleBearing.textContent = active.bearing;
      teleTemp.textContent = active.temp;
      wpFieldNote.textContent = active.note;

      document.querySelectorAll('[data-wp]').forEach(el => {
        el.addEventListener('click', () => {
          activeWpId = el.dataset.wp;
          renderWaypoints();
        });
      });
    }

    function renderDispatches() {
      const list = activeTerrain === 'All'
        ? DISPATCHES
        : DISPATCHES.filter(d => d.terrain === activeTerrain);

      dispatchGrid.innerHTML = list.map(d => `
        <article class="dispatch-card">
          <div>
            <div class="dispatch-meta">
              <span class="dispatch-terrain">${d.terrain}</span>
              <span>${d.issue}</span>
            </div>
            <h3 class="dispatch-title">${d.title}</h3>
            <p class="dispatch-excerpt">${d.excerpt}</p>
          </div>
          <div class="dispatch-stats">
            <span>DIST: ${d.distance}</span>
            <span>DUR: ${d.days}</span>
            <span>${d.coords}</span>
          </div>
        </article>
      `).join('');
    }

    document.querySelectorAll('.terrain-btn').forEach(btn => {
      btn.addEventListener('click', () => {
        document.querySelectorAll('.terrain-btn').forEach(b => b.classList.remove('is-active'));
        btn.classList.add('is-active');
        activeTerrain = btn.dataset.terrain;
        renderDispatches();
      });
    });

    const mobileBtn = document.getElementById('mobileBtn');
    const mobileDrawer = document.getElementById('mobileDrawer');
    mobileBtn.addEventListener('click', () => {
      const open = mobileDrawer.classList.toggle('is-open');
      mobileBtn.setAttribute('aria-expanded', String(open));
      mobileBtn.textContent = open ? 'Close' : 'Menu';
    });
    document.querySelectorAll('.m-link').forEach(a => {
      a.addEventListener('click', () => {
        mobileDrawer.classList.remove('is-open');
        mobileBtn.setAttribute('aria-expanded', 'false');
        mobileBtn.textContent = 'Menu';
      });
    });

    renderWaypoints();
    renderDispatches();
  </script>
</body>
</html>