/* v6.13 - full-width map and information panel only.
   Keeps the rest of Nepal Hi Tea v6.12 unchanged. */
:root { --nht-trail-edge: clamp(16px, 3vw, 54px); }

/* Standalone Origin page: use the available viewport, not an editorial column. */
body.nht-reference.nht-origin-page .nht-origin-trail {
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  padding-left: var(--nht-trail-edge) !important;
  padding-right: var(--nht-trail-edge) !important;
}
body.nht-reference.nht-origin-page .nht-origin-trail > .nht-origin-shell {
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
body.nht-reference.nht-origin-page .nht-origin-trail-head,
body.nht-reference.nht-origin-page .nht-origin-trail-board {
  width: 100%;
  max-width: none !important;
  box-sizing: border-box;
}
body.nht-reference.nht-origin-page .nht-origin-trail-board {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) !important;
  gap: clamp(22px, 3.2vw, 64px) !important;
  padding: clamp(18px, 2.4vw, 38px) !important;
}
body.nht-reference.nht-origin-page .nht-origin-trail-head > p {
  max-width: 56ch !important;
  font-size: clamp(13px, 1.1vw, 17px) !important;
}

/* Homepage version: this panel is nested in the Origin wrapper.
   Let only the trail section extend out to the site gutters. */
body.nht-reference .nht-v610-home-origin .nht-trail {
  box-sizing: border-box;
  width: calc(100vw - 2 * var(--nht-trail-edge)) !important;
  max-width: none !important;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-left: 0 !important;
  margin-right: 0 !important;
}
body.nht-reference .nht-v610-home-origin .nht-trail-head,
body.nht-reference .nht-v610-home-origin .nht-trail-board {
  width: 100%;
  max-width: none !important;
  box-sizing: border-box;
}
body.nht-reference .nht-v610-home-origin .nht-trail-board {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) !important;
  gap: clamp(22px, 3.2vw, 64px) !important;
  padding: clamp(18px, 2.4vw, 38px) !important;
}
body.nht-reference .nht-v610-home-origin .nht-trail-head > p {
  max-width: 56ch !important;
  font-size: clamp(13px, 1.1vw, 17px) !important;
}
/* Both variants keep the interactive route diagram scalable and prevent clipping. */
body.nht-reference .nht-origin-trail-board > *,
body.nht-reference .nht-v610-home-origin .nht-trail-board > * { min-width: 0; }
body.nht-reference .nht-origin-trail-board .nht-route-diagram svg,
body.nht-reference .nht-v610-home-origin .nht-trail-board .nht-route-diagram svg {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 800px) {
  body.nht-reference.nht-origin-page .nht-origin-trail-board,
  body.nht-reference .nht-v610-home-origin .nht-trail-board {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
  }
  body.nht-reference.nht-origin-page .nht-origin-trail-head,
  body.nht-reference .nht-v610-home-origin .nht-trail-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px;
  }
  body.nht-reference.nht-origin-page .nht-origin-trail-head > p,
  body.nht-reference .nht-v610-home-origin .nht-trail-head > p {
    max-width: 100% !important;
  }
}
@media (max-width: 540px) {
  :root { --nht-trail-edge: 16px; }
  body.nht-reference.nht-origin-page .nht-origin-trail-board,
  body.nht-reference .nht-v610-home-origin .nht-trail-board {
    padding: 16px 12px !important;
  }
  body.nht-reference.nht-origin-page .nht-origin-trail .nht-route-options,
  body.nht-reference .nht-v610-home-origin .nht-route-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
