/* ── guide.css ────────────────────────────────────────────────────────────────
   Long-form public guides (trips/guides/*.html). Loaded on top of main.css and
   either public.css or app.css, both of which define --nav-height.
   Mobile first: one reading column; from 1100px the contents become a sticky sidebar.
   ────────────────────────────────────────────────────────────────────────── */

.guide-page {
  background: var(--c-white);
}

.guide {
  --guide-gutter: 16px;
  --guide-measure: 760px;
  --guide-toc-bar: 3.25rem;  /* height of the sticky "Jump to a step" bar on phones */
  --guide-anchor-offset: calc(var(--nav-height) + var(--guide-toc-bar) + 1rem);
}

/* ── Reading progress (scroll-driven; simply absent where unsupported) ── */
.guide-progress {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  height: 3px;
  background: var(--c-accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 999;
  pointer-events: none;
}

@supports (animation-timeline: scroll()) {
  .guide-progress {
    animation: guide-progress linear both;
    animation-timeline: scroll(root);
  }
}

@keyframes guide-progress {
  to { transform: scaleX(1); }
}

/* ── Hero ────────────────────────────────────────────────────────── */
.guide-hero {
  position: relative;
  min-height: clamp(440px, 72vh, 660px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--c-primary-dark);
  color: var(--c-white);
}

.guide-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}

.guide-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--c-primary-dark) 94%, transparent) 0%,
    color-mix(in srgb, var(--c-primary-dark) 60%, transparent) 42%,
    color-mix(in srgb, var(--c-primary-dark) 8%, transparent) 78%,
    color-mix(in srgb, var(--c-primary-dark) 35%, transparent) 100%
  );
}

.guide-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 7rem var(--guide-gutter) 3.25rem;
}

.guide-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  list-style: none;
  font-size: .8rem;
  color: color-mix(in srgb, var(--c-white) 78%, transparent);
  margin-bottom: 1.25rem;
}

.guide-breadcrumb li + li::before {
  content: '/';
  margin-right: .35rem;
  opacity: .6;
}

.guide-breadcrumb a {
  color: var(--c-white);
  text-decoration: none;
}
.guide-breadcrumb a:hover { text-decoration: underline; }

.guide-hero__eyebrow {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-summit-gold);
  margin-bottom: .75rem;
}

.guide-hero__title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(2.15rem, 6vw, 3.9rem);
  line-height: 1.08;
  max-width: 17ch;
  text-wrap: balance;
  margin-bottom: 1.25rem;
}

.guide-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .6rem;
  font-size: .9rem;
  color: color-mix(in srgb, var(--c-white) 82%, transparent);
}

.guide-hero__credit {
  position: absolute;
  z-index: 1;
  right: var(--guide-gutter);
  bottom: .6rem;
  font-size: .68rem;
  color: color-mix(in srgb, var(--c-white) 60%, transparent);
}
.guide-hero__credit a { color: inherit; }

/* ── Layout ──────────────────────────────────────────────────────── */
.guide-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--guide-gutter);
}

.guide-body {
  max-width: var(--guide-measure);
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--c-text);
}

.guide-body p,
.guide-body ul,
.guide-body ol {
  margin-bottom: 1.15rem;
}

.guide-body a {
  color: var(--c-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
.guide-body a:hover { color: var(--c-primary-light); }

/* External links get a small arrow, silent to screen readers where supported */
.guide-ext::after {
  content: '\2197';
  content: '\2197' / '';
  font-size: .75em;
  margin-left: .12em;
  text-decoration: none;
  display: inline-block;
}

.guide-highlight {
  font-weight: 600;
  background: color-mix(in srgb, var(--c-summit-gold) 24%, transparent);
  padding: 0 .2em;
  border-radius: 3px;
}

/* ── Contents ────────────────────────────────────────────────────── */
/* Phones: a sticky bar under the navbar that opens into the step list */
.guide-toc {
  position: sticky;
  top: var(--nav-height);
  z-index: 50;
  margin: 0 calc(var(--guide-gutter) * -1);
  background: var(--c-white);
  border-bottom: 1.5px solid var(--c-grey-light);
}

.guide-toc__summary {
  display: flex;
  align-items: center;
  gap: .6rem;
  height: var(--guide-toc-bar);
  padding: 0 var(--guide-gutter);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--c-primary);
  cursor: pointer;
  list-style: none;
}
.guide-toc__summary::-webkit-details-marker { display: none; }
.guide-toc__summary .ti { font-size: 1.15rem; }

.guide-toc__chevron {
  margin-left: auto;
  transition: transform .2s ease;
}
.guide-toc[open] .guide-toc__chevron { transform: rotate(180deg); }

.guide-toc__list {
  list-style: none;
  max-height: min(65vh, 520px);
  overflow-y: auto;
  padding: .25rem var(--guide-gutter) 1rem;
}

.guide-toc__list a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem .6rem;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  line-height: 1.35;
  color: var(--c-text-muted);
  text-decoration: none;
  transition: color .15s, background .15s;
}
.guide-toc__list a:hover {
  color: var(--c-text);
  background: var(--c-snow);
}
.guide-toc__list a.is-current {
  color: var(--c-primary);
  background: var(--c-snow);
  font-weight: 600;
}

.guide-toc__num {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 600;
  border: 1.5px solid var(--c-grey-light);
  color: var(--c-text-muted);
}
.guide-toc__list a.is-current .guide-toc__num {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: var(--c-white);
}

/* Wide screens: a sticky sidebar beside the reading column */
@media (min-width: 1100px) {
  .guide { --guide-anchor-offset: calc(var(--nav-height) + 1.5rem); }

  .guide-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, var(--guide-measure));
    justify-content: center;
    gap: 4rem;
  }

  .guide-toc {
    top: calc(var(--nav-height) + 2rem);
    align-self: start;
    margin: 2.5rem 0 0;
    border-bottom: 0;
    max-height: calc(100vh - var(--nav-height) - 4rem);
    overflow-y: auto;
  }

  .guide-toc__summary {
    height: auto;
    padding: 0 .6rem .75rem;
    cursor: default;
    pointer-events: none;
  }

  .guide-toc__chevron { display: none; }

  .guide-toc__list {
    max-height: none;
    padding: 0;
  }

  .guide-toc__list a { font-size: .875rem; padding: .35rem .6rem; }
}

/* ── Lede, sections and headings ─────────────────────────────────── */
.guide-lede {
  font-size: clamp(1.15rem, 2.4vw, 1.32rem);
  line-height: 1.6;
  color: var(--c-text);
  padding-bottom: 1.75rem;
  border-bottom: 1.5px solid var(--c-grey-light);
  margin-bottom: 0 !important;
}

.guide-section,
.guide-step {
  padding-top: 2.75rem;
  margin-top: 2.75rem;
  border-top: 1.5px solid var(--c-grey-light);
  scroll-margin-top: var(--guide-anchor-offset);
}
.guide-lede + .guide-section {
  border-top: 0;
  margin-top: 0;
}

.guide-section__heading,
.guide-step__heading {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(1.65rem, 3.8vw, 2.25rem);
  line-height: 1.18;
  color: var(--c-text);
  margin-bottom: 1.25rem;
  text-wrap: balance;
}

.guide-step__heading {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
}

.guide-step__num {
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  margin-top: .05em;
  border-radius: 50%;
  background: var(--c-primary);
  color: var(--c-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.guide-subheading {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1.25;
  color: var(--c-text);
  margin: 2rem 0 .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  scroll-margin-top: var(--guide-anchor-offset);
}
.guide-subheading .ti {
  font-size: 1.3rem;
  color: var(--c-primary);
}

/* ── Lists ───────────────────────────────────────────────────────── */
.guide-list {
  padding-left: 1.3rem;
}
.guide-list li { margin-bottom: .55rem; padding-left: .2rem; }
.guide-list li::marker { color: var(--c-primary); }

/* ── Card grids (rules, features, hidden costs, decisions) ───────── */
.guide-rules,
.guide-features,
.guide-costs,
.guide-decision {
  display: grid;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

@media (min-width: 640px) {
  .guide-rules,
  .guide-features,
  .guide-costs,
  .guide-decision { grid-template-columns: 1fr 1fr; }
}

.guide-rule,
.guide-feature,
.guide-cost {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: 1.1rem 1.2rem;
  border: 1.5px solid var(--c-grey-light);
  border-radius: var(--radius-md);
  background: var(--c-white);
  font-size: .97rem;
  line-height: 1.65;
}
.guide-rule { background: var(--c-snow); }

.guide-rule p,
.guide-feature p,
.guide-cost p { margin: 0 !important; }

.guide-rule__icon,
.guide-feature__icon,
.guide-cost__icon {
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--c-primary);
  background: color-mix(in srgb, var(--c-primary) 10%, transparent);
}

.guide-cost__icon {
  color: var(--c-warning);
  background: color-mix(in srgb, var(--c-warning) 13%, transparent);
}

/* ── Plan at a glance ────────────────────────────────────────────── */
.guide-plan {
  list-style: none;
  padding: 0;
  border: 1.5px solid var(--c-grey-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.guide-plan__item + .guide-plan__item { border-top: 1px solid var(--c-grey-light); }

.guide-body .guide-plan__link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .8rem 1.1rem;
  color: var(--c-text);
  text-decoration: none;
  transition: background .15s;
}
.guide-body .guide-plan__link:hover { background: var(--c-snow); }

.guide-plan__num {
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1.5px solid var(--c-primary);
  color: var(--c-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 600;
}
.guide-plan__link:hover .guide-plan__num {
  background: var(--c-primary);
  color: var(--c-white);
}

.guide-plan__text {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}
.guide-plan__name { font-weight: 600; font-size: 1rem; }
.guide-plan__summary { font-size: .9rem; color: var(--c-text-muted); }

/* ── Figures ─────────────────────────────────────────────────────── */
.guide-figure {
  margin: 2rem 0;
}

.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  background: var(--c-snow);
}

.guide-figure__caption {
  margin-top: .6rem;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--c-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: .15rem .6rem;
}

.guide-figure__credit {
  font-size: .75rem;
  color: var(--c-grey-mid);
}
.guide-body .guide-figure__credit a { color: inherit; }

@media (min-width: 900px) {
  .guide-figure--wide {
    margin-left: -3rem;
    margin-right: -3rem;
  }
  .guide-figure--wide .guide-figure__caption { padding: 0 3rem; }
}

/* ── "On GatherThePack" call-outs ────────────────────────────────── */
.guide-app-tip {
  margin: 1.75rem 0;
  padding: 1.15rem 1.25rem .5rem;
  background: var(--c-snow);
  border: 1.5px solid color-mix(in srgb, var(--c-primary) 22%, var(--c-grey-light));
  border-radius: var(--radius-md);
  font-size: .97rem;
  line-height: 1.65;
}

.guide-app-tip__label {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: .7rem !important;
}

.guide-app-tip__logo {
  width: 28px;
  height: 28px;
}

.guide-app-tip ul {
  list-style: none;
  padding: 0;
}

.guide-app-tip li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: .55rem;
}

.guide-app-tip li::before {
  content: '';
  position: absolute;
  left: .2rem;
  top: .62em;
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: var(--c-primary);
}

/* ── Distance-to-slopes tiers ────────────────────────────────────── */
.guide-tiers {
  list-style: none;
  padding: 0;
}

.guide-tier {
  display: flex;
  align-items: baseline;
  gap: .9rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--c-grey-light);
}
.guide-tier:last-child { border-bottom: 0; }
.guide-tier p { margin: 0 !important; }

.guide-tier__badge {
  flex: none;
  min-width: 3.2rem;
  text-align: center;
  padding: .15rem .5rem;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--c-primary);
}
.guide-tier__badge--high { background: color-mix(in srgb, var(--c-primary) 20%, transparent); }
.guide-tier__badge--mid  { background: color-mix(in srgb, var(--c-primary) 12%, transparent); }
.guide-tier__badge--low  { background: color-mix(in srgb, var(--c-primary) 6%, transparent); }

/* ── Go / no-go ──────────────────────────────────────────────────── */
.guide-decision__card {
  padding: 1.1rem 1.25rem .4rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--c-grey-light);
  font-size: .97rem;
  line-height: 1.65;
}

.guide-decision__card--go {
  background: color-mix(in srgb, var(--c-accent) 6%, var(--c-white));
  border-color: color-mix(in srgb, var(--c-accent) 30%, var(--c-grey-light));
}

.guide-decision__card--no-go {
  background: var(--c-snow);
}

.guide-decision__label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  margin-bottom: .5rem !important;
}
.guide-decision__card--go .guide-decision__label { color: var(--c-accent); }
.guide-decision__card--no-go .guide-decision__label { color: var(--c-grey-dark); }
.guide-decision__label .ti { font-size: 1.2rem; }

.guide-decision__card ul { padding-left: 1.2rem; }
.guide-decision__card li { margin-bottom: .45rem; }

/* ── Pull-outs and warnings ──────────────────────────────────────── */
.guide-pullout {
  margin: 2rem 0 !important;
  padding: 1.25rem 0;
  border-top: 1.5px solid var(--c-grey-light);
  border-bottom: 1.5px solid var(--c-grey-light);
  font-size: clamp(1.12rem, 2.2vw, 1.25rem);
  font-weight: 500;
  line-height: 1.55;
  color: var(--c-primary-dark);
  text-align: center;
  text-wrap: balance;
}

.guide-warning {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--c-warning) 10%, var(--c-white));
  border: 1.5px solid color-mix(in srgb, var(--c-warning) 35%, var(--c-grey-light));
  font-size: .97rem;
}
.guide-warning .ti {
  flex: none;
  font-size: 1.3rem;
  color: var(--c-warning);
  margin-top: .1rem;
}

/* ── Packing checklist ───────────────────────────────────────────── */
.guide-checklist {
  list-style: none;
  padding: 0;
  display: grid;
  gap: .5rem 1.5rem;
}

@media (min-width: 640px) {
  .guide-checklist { grid-template-columns: 1fr 1fr; }
}

.guide-checklist li {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  line-height: 1.5;
}

.guide-checklist li::before {
  content: '';
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: .2rem;
  border: 2px solid var(--c-accent);
  border-radius: 4px;
}

/* ── Tables ──────────────────────────────────────────────────────── */
.guide-table-wrap {
  margin: 1.25rem 0 2rem;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  line-height: 1.5;
}

.guide-table thead th {
  text-align: left;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--c-grey-dark);
  padding: .6rem .75rem;
  border-bottom: 2px solid var(--c-grey-light);
}

.guide-table tbody th,
.guide-table tbody td {
  text-align: left;
  vertical-align: top;
  padding: .7rem .75rem;
  border-bottom: 1px solid var(--c-grey-light);
}

.guide-table tbody th { font-weight: 600; color: var(--c-text); }
.guide-table tbody td { color: var(--c-text); }
.guide-table tbody tr:nth-child(even) { background: var(--c-snow); }

.guide-table--two tbody th { width: 34%; }

/* Phones: each row becomes a labelled card */
@media (max-width: 700px) {
  .guide-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .guide-table,
  .guide-table tbody,
  .guide-table tr,
  .guide-table tbody th,
  .guide-table tbody td {
    display: block;
    width: 100% !important;
  }

  .guide-table tbody tr,
  .guide-table tbody tr:nth-child(even) {
    background: var(--c-white);
    border: 1.5px solid var(--c-grey-light);
    border-radius: var(--radius-md);
    padding: .85rem 1rem;
    margin-bottom: .75rem;
  }

  .guide-table tbody th {
    padding: 0 0 .45rem;
    border: 0;
    font-size: .98rem;
  }

  .guide-table tbody td {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: .75rem;
    padding: .25rem 0;
    border: 0;
  }

  .guide-table tbody td::before {
    content: attr(data-label);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--c-text-muted);
    padding-top: .2rem;
  }

  .guide-table .guide-table__empty { display: none; }
}

/* ── Appendix region chips ───────────────────────────────────────── */
.guide-appendix__jump {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}

.guide-body .guide-chip {
  display: inline-flex;
  align-items: center;
  padding: .3rem .8rem;
  border-radius: 999px;
  border: 1.5px solid var(--c-grey-light);
  font-size: .85rem;
  color: var(--c-primary);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.guide-body .guide-chip:hover {
  border-color: var(--c-primary);
  background: var(--c-snow);
}

/* ── Closing call to action ──────────────────────────────────────── */
.guide-cta {
  margin: 3.5rem 0 1rem;
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--c-primary-dark) 0%, var(--c-primary) 100%);
  color: var(--c-white);
  text-align: center;
}

.guide-cta__logo {
  width: 72px;
  height: 72px;
  margin-bottom: .75rem;
}

.guide-cta__heading {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  line-height: 1.2;
  margin-bottom: .75rem;
}

.guide-cta__sub {
  color: color-mix(in srgb, var(--c-white) 78%, transparent);
  max-width: 46ch;
  margin: 0 auto 1.5rem !important;
  font-size: 1rem;
  line-height: 1.6;
}

.guide-body .guide-cta .btn { color: var(--c-white); white-space: normal; }

/* ── Author footer ───────────────────────────────────────────────── */
.guide-author {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1.5px solid var(--c-grey-light);
}

.guide-author__logo {
  width: 56px;
  height: 56px;
  flex: none;
}

.guide-author p { margin: 0 !important; line-height: 1.5; }
.guide-author__name { font-weight: 600; }
.guide-author__bio { font-size: .95rem; color: var(--c-text-muted); }
.guide-author__dates { font-size: .82rem; color: var(--c-grey-mid); }

.guide-body .guide-author__top {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .88rem;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .guide-toc__chevron,
  .guide-plan__link,
  .guide-toc__list a { transition: none; }
}
