:root {
  --paper: #efe3c9;
  --paper-soft: #f8efd9;
  --paper-deep: #d7c39c;
  --ink: #232016;
  --ink-soft: #595242;
  --trail: #784b24;
  --green: #46563b;
  --blue: #5d786f;
  --line: rgba(35, 32, 22, .2);
  --shadow: rgba(35, 32, 22, .18);
  --hand: "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
  --plain: Verdana, Geneva, Tahoma, sans-serif;
  --mark: "Lucida Console", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(120, 75, 36, .08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(120, 75, 36, .08) 1px, transparent 1px),
    var(--paper);
  background-size: 74px 74px;
  color: var(--ink);
  font-family: var(--plain);
  line-height: 1.45;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }

h1, h2, h3, p, b, small, a, span, label, input, select, button {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

p, h1, h2, h3 {
  text-wrap: pretty;
}

.route-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(14px, 3vw, 34px);
  min-height: 72px;
  padding: 10px clamp(18px, 4vw, 58px);
  background: rgba(248, 239, 217, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.rail-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid var(--trail);
  color: var(--trail);
  font-family: var(--mark);
  font-weight: 700;
}

.rail-nav {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: clamp(16px, 3vw, 38px);
  font-family: var(--mark);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.rail-action {
  padding: 14px 18px;
  background: var(--trail);
  color: #fff;
  font-family: var(--mark);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  border: 1px solid var(--trail);
}

.route-cover {
  position: relative;
  min-height: min(850px, 94vh);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #1a2118;
}

.cover-photo,
.cover-shade {
  position: absolute;
  inset: 0;
}

.cover-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  filter: saturate(.9) contrast(1.04);
}

.cover-shade {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .02), rgba(0, 0, 0, .28)),
    linear-gradient(90deg, rgba(239, 227, 201, .96) 0 36%, rgba(239, 227, 201, .55) 54%, rgba(239, 227, 201, .08) 82%);
}

.cover-stamp {
  position: absolute;
  top: 42px;
  left: clamp(22px, 5vw, 72px);
  z-index: 2;
  padding: 8px 12px;
  color: var(--trail);
  background: rgba(248, 239, 217, .72);
  border: 1px solid rgba(120, 75, 36, .36);
  font-family: var(--mark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.cover-copy {
  position: relative;
  z-index: 2;
  width: min(850px, 94vw);
  padding: 150px clamp(20px, 6vw, 88px) 70px;
}

.cover-copy h1 {
  max-width: 11ch;
  margin: 0;
  font-family: var(--hand);
  font-size: clamp(54px, 8vw, 128px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.cover-copy p {
  max-width: 650px;
  margin: 28px 0 0;
  color: #332d20;
  font-size: clamp(18px, 1.7vw, 25px);
  font-weight: 700;
}

.cover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.ink-action,
.paper-action,
.route-form button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 2px solid var(--ink);
  cursor: pointer;
  font-family: var(--plain);
  font-weight: 800;
}

.ink-action,
.route-form button {
  background: var(--ink);
  color: var(--paper-soft);
}

.paper-action {
  background: rgba(248, 239, 217, .78);
  color: var(--ink);
}

.cover-note {
  position: absolute;
  right: clamp(20px, 5vw, 78px);
  bottom: clamp(30px, 5vw, 76px);
  z-index: 3;
  width: min(360px, 32vw);
  padding: 22px;
  background: rgba(248, 239, 217, .9);
  border: 2px solid rgba(35, 32, 22, .3);
  box-shadow: 0 22px 70px var(--shadow);
  transform: rotate(-1.2deg);
}

.cover-note span,
.cover-note small,
.small-label {
  display: block;
  color: var(--trail);
  font-family: var(--mark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.cover-note b {
  display: block;
  margin: 12px 0;
  font-family: var(--hand);
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1.08;
}

.cover-note small {
  color: var(--ink-soft);
}

section:not(.route-cover) {
  padding: clamp(64px, 8vw, 128px) clamp(20px, 5vw, 80px);
}

h2 {
  max-width: 16ch;
  margin: 0;
  font-family: var(--hand);
  font-size: clamp(40px, 5.4vw, 92px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-family: var(--hand);
  line-height: 1.06;
  letter-spacing: 0;
}

.sheet-intro p,
.pace-copy p,
.pack-head p,
.request-card p {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.45vw, 22px);
  font-weight: 700;
}

.route-sheet {
  background: var(--paper-soft);
}

.sheet-intro {
  width: min(1060px, 100%);
  margin: 0 auto 42px;
}

.map-spread {
  position: relative;
  width: min(1220px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 360px);
  align-items: end;
  gap: 22px;
}

.route-photo,
.wide-photo,
.weather-photo {
  margin: clamp(26px, 5vw, 54px) auto 0;
  width: min(1220px, 100%);
  background: var(--paper-soft);
  border: 2px solid rgba(35, 32, 22, .26);
  box-shadow: 0 24px 70px var(--shadow);
}

.route-photo img,
.wide-photo img,
.weather-photo img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.route-photo figcaption,
.wide-photo figcaption,
.weather-photo figcaption {
  padding: 13px 18px;
  color: var(--ink-soft);
  font-family: var(--mark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.45;
}

.tea-photo {
  transform: rotate(-.4deg);
}

.route-photo + .map-spread {
  margin-top: clamp(28px, 5vw, 58px);
}

.hand-map {
  min-width: 0;
  padding: clamp(14px, 2.4vw, 28px);
  background:
    linear-gradient(90deg, rgba(120, 75, 36, .1) 1px, transparent 1px),
    linear-gradient(0deg, rgba(120, 75, 36, .1) 1px, transparent 1px),
    #eadcc0;
  background-size: 48px 48px;
  border: 2px solid rgba(35, 32, 22, .28);
  box-shadow: 0 26px 70px var(--shadow);
}

.hand-map svg {
  width: 100%;
  min-height: 430px;
}

.ridge {
  fill: none;
  stroke: rgba(70, 86, 59, .2);
  stroke-width: 22;
  stroke-linecap: round;
}

.ridge-two {
  stroke-width: 10;
  stroke: rgba(70, 86, 59, .16);
}

.road-thread {
  fill: none;
  stroke: var(--trail);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 3 16;
}

.map-node circle {
  fill: var(--paper-soft);
  stroke: var(--green);
  stroke-width: 5;
  cursor: pointer;
}

.map-node.is-active circle {
  fill: var(--trail);
  stroke: var(--trail);
}

.map-node text,
.camp-symbol text,
.weather-symbol text,
.bearing-symbol text {
  fill: var(--green);
  font-family: var(--mark);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
}

.camp-symbol path,
.camp-symbol line,
.weather-symbol path,
.bearing-symbol circle,
.bearing-symbol path {
  fill: none;
  stroke: var(--green);
  stroke-width: 4;
}

.weather-symbol path {
  fill: rgba(93, 120, 111, .12);
}

.map-log {
  padding: 24px;
  background: var(--paper);
  border: 2px solid rgba(35, 32, 22, .32);
  box-shadow: 0 18px 45px var(--shadow);
  transform: rotate(1.5deg);
}

.map-log span,
.note-page mark,
.weather-slips span,
.route-form span {
  display: block;
  color: var(--trail);
  background: transparent;
  font-family: var(--mark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.map-log h3 {
  margin: 12px 0;
  font-size: clamp(32px, 3vw, 46px);
}

.map-log p,
.note-page p,
.weather-slips p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 700;
}

.field-notes {
  display: grid;
  grid-template-columns: minmax(260px, .66fr) 1.34fr;
  gap: clamp(32px, 6vw, 92px);
  background: #d9c8a8;
}

.field-notes .wide-photo {
  grid-column: 1 / -1;
}

.note-stack {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.note-page {
  grid-column: span 3;
  min-height: 260px;
  padding: 24px;
  background: var(--paper-soft);
  border: 2px solid rgba(35, 32, 22, .24);
  box-shadow: 0 18px 48px rgba(35, 32, 22, .12);
  transform: rotate(-1deg);
}

.note-page:nth-child(2) {
  transform: rotate(1deg);
}

.note-page-wide {
  grid-column: span 6;
}

.note-page h3 {
  margin: 18px 0 12px;
  font-size: clamp(36px, 4vw, 64px);
}

.pace-board {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  background: #ecdfc4;
}

.road-photo {
  margin: 0;
  background: var(--paper-soft);
  border: 2px solid rgba(35, 32, 22, .26);
  box-shadow: 0 26px 70px var(--shadow);
}

.road-photo figcaption {
  padding: 13px 18px;
  color: var(--ink-soft);
  font-family: var(--mark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.pace-slider {
  display: grid;
  gap: 16px;
  margin-top: 30px;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(248, 239, 217, .12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(248, 239, 217, .1) 1px, transparent 1px),
    var(--green);
  background-size: 38px 38px;
  color: #fff;
  border: 2px solid var(--green);
}

.pace-slider span,
.pace-slider output {
  font-family: var(--mark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.pace-slider input {
  width: 100%;
  accent-color: var(--trail);
}

.weather-window {
  background: #2a3025;
  color: var(--paper-soft);
}

.weather-title h2 {
  max-width: 14ch;
}

.weather-photo {
  background: #151915;
  border-color: rgba(248, 239, 217, .26);
}

.weather-photo figcaption {
  color: rgba(248, 239, 217, .78);
  background: #151915;
}

.weather-slips {
  display: grid;
  grid-template-columns: 1.1fr .8fr 1fr;
  gap: 18px;
  margin-top: 46px;
}

.weather-slips article {
  min-height: 245px;
  padding: 24px;
  background: rgba(248, 239, 217, .9);
  color: var(--ink);
  border: 2px solid rgba(35, 32, 22, .3);
}

.weather-slips article:nth-child(2) {
  margin-top: 42px;
}

.weather-slips b {
  display: block;
  margin: 18px 0 12px;
  font-family: var(--hand);
  font-size: clamp(32px, 3vw, 50px);
  line-height: 1.05;
}

.pack-ledger {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) 1fr;
  gap: clamp(32px, 6vw, 90px);
  background: var(--paper-soft);
}

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

.pack-chip {
  min-width: 0;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px 16px;
  align-items: start;
  width: 100%;
  padding: 18px;
  color: var(--ink);
  background: transparent;
  border: 2px dashed rgba(35, 32, 22, .36);
  text-align: left;
  cursor: pointer;
}

.pack-chip svg {
  grid-row: span 2;
  width: 46px;
  height: 46px;
  stroke: var(--green);
  stroke-width: 3;
  fill: none;
}

.pack-chip b {
  font-family: var(--hand);
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1;
}

.pack-chip small {
  color: var(--ink-soft);
  font-weight: 700;
}

.pack-chip.is-checked {
  background: #d5c6a9;
  border-style: solid;
}

.route-request {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: clamp(32px, 6vw, 86px);
  background: #d4bd90;
}

.request-card {
  align-self: start;
  padding: clamp(24px, 4vw, 42px);
  background: rgba(248, 239, 217, .62);
  border: 2px solid rgba(35, 32, 22, .26);
}

.route-form {
  display: grid;
  gap: 14px;
  align-self: start;
  padding: 24px;
  background: var(--paper-soft);
  border: 2px solid rgba(35, 32, 22, .3);
  box-shadow: 0 26px 70px var(--shadow);
}

.route-form label {
  display: grid;
  gap: 8px;
}

.route-form input,
.route-form select {
  width: 100%;
  min-width: 0;
  padding: 15px;
  color: var(--ink);
  background: #fffaf0;
  border: 2px solid rgba(35, 32, 22, .28);
  border-radius: 0;
}

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

@media (max-width: 1100px) {
  .route-bar {
    min-height: 64px;
    grid-template-columns: auto 1fr auto;
    justify-items: stretch;
    align-items: center;
    padding: 9px 14px;
  }

  .rail-nav {
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .rail-nav::-webkit-scrollbar { display: none; }

  .cover-note {
    display: none;
  }

  .map-spread,
  .field-notes,
  .pace-board,
  .pack-ledger,
  .route-request {
    grid-template-columns: 1fr;
  }

  .weather-slips {
    grid-template-columns: 1fr;
  }

  .weather-slips article:nth-child(2) {
    margin-top: 0;
  }
}

@media (max-width: 620px) {
  .route-bar {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
  }

  .rail-mark {
    width: 42px;
    height: 42px;
  }

  .rail-action {
    display: none;
  }

  .rail-nav {
    justify-content: flex-start;
    gap: 14px;
    font-size: 11px;
  }

  .route-cover {
    min-height: 680px;
  }

  .cover-photo {
    object-position: 55% bottom;
  }

  .cover-shade {
    background:
      linear-gradient(180deg, rgba(239, 227, 201, .9), rgba(239, 227, 201, .48) 50%, rgba(239, 227, 201, .08) 80%),
      linear-gradient(90deg, rgba(239, 227, 201, .9), rgba(239, 227, 201, .22));
  }

  .cover-stamp {
    top: 22px;
    left: 18px;
  }

  .cover-copy {
    width: 100%;
    padding: 110px 18px 42px;
  }

  .cover-copy h1 {
    max-width: 9.5ch;
    font-size: clamp(44px, 13vw, 66px);
    line-height: 1.04;
  }

  .cover-copy p {
    max-width: 28ch;
    font-size: 16px;
  }

  .cover-actions {
    display: grid;
  }

  .ink-action,
  .paper-action,
  .route-form button {
    width: 100%;
  }

  section:not(.route-cover) {
    padding: 54px 18px;
  }

  h2 {
    max-width: 8.6ch;
    font-size: clamp(32px, 9vw, 42px);
    line-height: 1.14;
  }

  .sheet-intro p,
  .pace-copy p,
  .pack-head p,
  .request-card p {
    max-width: 28ch;
    font-size: 16px;
  }

  .map-log p,
  .note-page p,
  .weather-slips p {
    max-width: 28ch;
  }

  .route-photo figcaption,
  .wide-photo figcaption,
  .weather-photo figcaption,
  .road-photo figcaption {
    font-size: 11px;
    line-height: 1.45;
    white-space: normal;
  }

  .hand-map {
    padding: 10px;
  }

  .hand-map svg {
    min-height: 350px;
  }

  .map-node text,
  .camp-symbol text,
  .weather-symbol text,
  .bearing-symbol text {
    font-size: 19px;
  }

  .map-log {
    transform: none;
  }

  .note-stack {
    grid-template-columns: 1fr;
  }

  .note-page,
  .note-page-wide {
    grid-column: auto;
    min-height: 0;
    transform: none;
  }

  .note-page h3 {
    font-size: clamp(30px, 8.4vw, 40px);
  }

  .weather-window {
    background-attachment: scroll;
  }

  .weather-slips b {
    font-size: clamp(29px, 8vw, 38px);
  }

  .pack-grid {
    grid-template-columns: 1fr;
  }

  .pack-chip {
    grid-template-columns: 46px 1fr;
    padding: 15px;
  }

  .pack-chip svg {
    width: 40px;
    height: 40px;
  }

  .pack-chip b {
    font-size: clamp(27px, 7.4vw, 36px);
  }
}
