.guide-directory,
.guide-page {
  --guide-rule: var(--line, #d5d2c2);
  --guide-text: var(--ink, #1b2b26);
  --guide-muted: var(--muted, #4d5c54);
  --guide-accent: var(--signal, #b33729);
  --guide-tint: #e9ede4;
  --guide-paper: var(--paper, #f7f4eb);
  --guide-card: #fffdf6;
  --guide-night: #16332e;
}

.guide-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  column-gap: 1.5rem;
  row-gap: .85rem;
  margin-bottom: clamp(1.15rem, 3vw, 2rem);
}

.guide-page-header h1 {
  color: var(--guide-text);
  font: 700 clamp(3.35rem, 8vw, 7rem)/var(--display-leading) var(--display, 'Barlow Condensed', 'Arial Narrow', sans-serif);
  letter-spacing: -.022em;
  text-wrap: balance;
}

.guide-page-header p:not(.eyebrow) {
  max-width: 44rem;
  margin-top: .9rem;
  color: var(--guide-muted);
  font-size: clamp(1rem, 1.45vw, 1.17rem);
}

.guide-quick-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 clamp(.75rem, 3.1vw, 2.2rem);
  margin-block: 1.25rem clamp(1.25rem, 3vw, 2.1rem);
  border-block: 1px solid var(--guide-rule);
}

.guide-quick-links a {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding-block: .48rem;
  color: var(--guide-text);
  font-size: .92rem;
  font-weight: 800;
  text-decoration: none;
}

.guide-quick-links a:hover {
  color: var(--guide-accent);
  text-decoration: underline;
}

.guide-directory .lead-guide {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  margin-block: 0 clamp(2rem, 6vw, 4.75rem);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #af3427;
  color: var(--guide-card);
}

.lead-guide-image {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  background: var(--guide-card);
}

.lead-guide-image img {
  flex: 1 0 23rem;
  width: 100%;
  height: 0;
  min-height: 23rem;
  object-fit: cover;
  object-position: center 62%;
}

.lead-guide-image figcaption {
  padding: .4rem .7rem;
  color: var(--guide-muted);
  font-size: .8rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.lead-guide-content {
  align-self: center;
  padding: clamp(1.35rem, 4.3vw, 4rem);
}

.guide-directory .lead-guide-content .eyebrow {
  color: #ffe3cc;
  font: 700 .875rem/1.45 var(--label, ui-monospace, monospace);
  letter-spacing: .055em;
}

.lead-guide h2 {
  max-width: 11ch;
  margin: .65rem 0 .9rem;
  font: 700 clamp(2.85rem, 6vw, 5.35rem)/var(--display-leading) var(--display, 'Barlow Condensed', 'Arial Narrow', sans-serif);
  letter-spacing: -.018em;
  text-wrap: balance;
}

.lead-guide h2 a { color: inherit; text-decoration: none; }
.lead-guide h2 a:hover { text-decoration: underline; }
.lead-guide-content p:not(.eyebrow) { max-width: 31ch; margin: 0 0 1.4rem; }

.guide-directory .lead-guide-content .button {
  border-color: var(--guide-card);
  background: var(--guide-card);
  color: var(--guide-text);
}

.guide-directory .lead-guide-content .button:hover {
  border-color: #f5e1d1;
  background: #f5e1d1;
}

.guide-topics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(1.35rem, 5vw, 4rem);
  row-gap: clamp(2rem, 4vw, 3.6rem);
}

.guide-topics .guide-topic {
  display: flex;
  flex-direction: column;
  padding-block: 1rem;
  border: 0;
  border-block-start: 3px solid var(--guide-text);
  border-radius: 0;
  background: transparent;
}

.guide-topics .guide-topic:target { border-color: var(--guide-accent); }
.guide-topic, .guide-prose section { scroll-margin-top: 6rem; }

.guide-topic h2,
.guide-next h2 {
  color: var(--guide-text);
  font: 700 clamp(1.85rem, 3.4vw, 2.95rem)/1 var(--display, 'Barlow Condensed', 'Arial Narrow', sans-serif);
  letter-spacing: 0;
}

.guide-topic h2 a { text-decoration: none; }
.guide-topic h2 a:hover { color: var(--guide-accent); text-decoration: underline; }
.guide-topic ul { padding: 0; margin: .65rem 0 1rem; list-style: none; }
.guide-topic li { border-bottom: 1px solid var(--guide-rule); }
.guide-topic li a { display: grid; gap: .16rem; padding: .73rem 0; text-decoration: none; }
.guide-topic li strong { color: var(--guide-text); font-weight: 800; }
.guide-topic li a:hover strong { color: var(--guide-accent); text-decoration: underline; }
.guide-topic li span { color: var(--guide-muted); font-size: .93rem; }

.guide-topic .guide-topic-all {
  align-self: flex-start;
  margin-top: auto;
  padding-block: .4rem;
  color: var(--guide-accent);
  font-size: .91rem;
  font-weight: 800;
}

.guide-masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .4rem 1.4rem;
  padding-top: .6rem;
  border-top: 1px solid var(--guide-rule);
}

.guide-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  padding: 0;
  margin: 0;
  color: var(--guide-muted);
  font: 650 .875rem/1.45 var(--label, ui-monospace, monospace);
  list-style: none;
}

.guide-breadcrumb li + li::before {
  margin-inline-end: .45rem;
  color: var(--guide-muted);
  content: '/';
}

.guide-breadcrumb a,
.guide-return {
  color: var(--guide-accent);
  text-underline-offset: .25em;
}

.guide-return {
  font-size: .88rem;
  font-weight: 800;
}

.guide-page .guide-article-header {
  display: block;
  margin-block: clamp(1.2rem, 3.2vw, 2.75rem) clamp(1.45rem, 4.7vw, 3rem);
}

.guide-article-header .eyebrow {
  margin-bottom: .48rem;
  color: var(--guide-accent);
  font: 700 .875rem/1.5 var(--label, ui-monospace, monospace);
  letter-spacing: .05em;
}

.guide-article-header h1 {
  max-width: 22ch;
  font-size: clamp(3rem, 7.6vw, 6.4rem);
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.guide-page-header .guide-deck {
  max-width: 63ch;
  margin: .9rem 0 0;
  font-size: clamp(1.05rem, 1.5vw, 1.24rem);
  line-height: 1.52;
}

.guide-reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14.5rem, .43fr);
  grid-template-areas: 'feature rail' 'story rail';
  column-gap: clamp(1.3rem, 3.75vw, 3.25rem);
  row-gap: 1.2rem;
  align-items: start;
}

.guide-feature { grid-area: feature; min-width: 0; }
.guide-story { grid-area: story; min-width: 0; }
.guide-feature figure, .guide-story figure { margin: 0; }
.guide-feature img, .guide-story img { display: block; width: 100%; object-fit: cover; }
.guide-hero > img {
  width: 100%;
  height: auto;
  max-height: 31rem;
  aspect-ratio: 1.84;
  object-position: 50% 60%;
}

.imported-guide .guide-hero > img { object-position: center; }

.guide-feature figcaption,
.guide-story figcaption {
  margin: .58rem 0 .1rem;
  color: var(--guide-muted);
  font-size: .79rem;
  line-height: 1.5;
}

.guide-feature figcaption a,
.guide-story figcaption a {
  color: var(--guide-accent);
  text-underline-offset: .19em;
}

.guide-prose {
  max-width: 65ch;
  padding-block: .5rem 0;
  color: var(--guide-text);
  font-size: clamp(1rem, 1.25vw, 1.075rem);
  line-height: 1.75;
}

.guide-prose h2,
.guide-prose h3 {
  color: var(--guide-text);
  font-family: var(--display, 'Barlow Condensed', 'Arial Narrow', sans-serif);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.05;
}

.guide-prose h2 { margin: 0 0 .62rem; font-size: clamp(1.85rem, 3.2vw, 2.8rem); }
.guide-prose h3 { margin-block: 1.2rem .38rem; font-size: clamp(1.4rem, 2.2vw, 1.85rem); }
.guide-prose p { margin: 0; }
.guide-prose p + p { margin-block-start: .82rem; }
.guide-prose section, .imported-guide .guide-prose h2:not(:first-child) { margin-block-start: 2.05rem; }
.guide-prose .guide-standfirst {
  padding-inline-start: .98rem;
  border-inline-start: 3px solid var(--guide-accent);
  font-size: clamp(1.1rem, 1.6vw, 1.24rem);
  line-height: 1.53;
}

.guide-prose .guide-inline-photo,
.imported-guide .guide-prose figure { margin-block: 1.2rem; }
.guide-inline-photo img { height: auto; aspect-ratio: 1.78; }

.guide-prose .walking-note {
  padding: 1.15rem 1.25rem;
  border: 0;
  border-inline-start: 3px solid var(--guide-accent);
  border-radius: 0;
  background: #eceee5;
}

.walking-note ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.walking-note li + li { margin-top: .4rem; }

.reading-rail {
  grid-area: rail;
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.reading-rail .panel {
  padding: clamp(1rem, 2vw, 1.38rem);
  border-radius: 0;
}

.reading-rail h2 {
  color: inherit;
  font: 700 clamp(1.55rem, 2.6vw, 2.2rem)/1.05 var(--display, 'Barlow Condensed', 'Arial Narrow', sans-serif);
  letter-spacing: 0;
}

.reading-rail .walk-overview,
.reading-rail .imported-facts {
  border-color: var(--guide-night);
  border-top: 4px solid #ee795b;
  background: var(--guide-night);
  color: var(--guide-card);
}

.walk-overview dl { margin: .82rem 0 .96rem; }
.walk-overview dl div {
  display: grid;
  grid-template-columns: 1fr 1.03fr;
  column-gap: .6rem;
  padding-block: .55rem;
  border-top: 1px solid #587169;
  font-size: .875rem;
}

.walk-overview dt { color: #c6d9d0; }
.walk-overview dd { margin: 0; color: var(--guide-card); font-weight: 800; overflow-wrap: anywhere; }
.walk-overview .button { width: 100%; justify-content: center; text-align: center; }
.walk-overview a.button.primary {
  border-color: var(--guide-card);
  color: var(--guide-night);
  background: var(--guide-card);
}
.walk-overview a.button.primary:hover { background: #f3decf; }
.walk-overview .imported-plan-actions a { color: var(--guide-card); }
.walk-overview .imported-plan-actions [aria-pressed='true'] { color: var(--guide-night); }

.reading-rail .article-contents {
  border-width: 1px 0 0;
  background: transparent;
  padding-inline: 0;
}

.article-contents ol, .mobile-contents ol {
  display: grid;
  gap: .42rem;
  margin: .65rem 0 0;
  padding-left: 1.4rem;
  color: var(--guide-muted);
  font-size: .91rem;
  font-variant-numeric: tabular-nums;
}

.article-contents li, .mobile-contents li { padding-inline-start: .14rem; }
.article-contents a, .mobile-contents a { color: var(--guide-accent); text-underline-offset: .23em; }
.mobile-contents { display: none; }

.guide-page .guide-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .95rem 1.5rem;
  margin-block: 2.75rem 0;
  padding: clamp(1rem, 2.3vw, 1.55rem);
  border: 0;
  border-top: 3px solid var(--guide-night);
  border-radius: 0;
  background: var(--guide-tint);
}

.guide-next p { margin: .38rem 0 0; color: var(--guide-muted); font-size: .95rem; }
.guide-next > div:last-child { display: flex; align-items: center; flex-wrap: wrap; gap: .58rem; }

.imported-guide .guide-prose a { color: var(--guide-accent); text-underline-offset: .22em; }
.imported-guide .guide-prose img { height: auto; }
.imported-guide .guide-prose figure:has(table) { overflow-x: auto; }
.imported-guide .guide-prose table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.imported-guide .guide-prose :is(th, td) { border: 1px solid var(--guide-rule); padding: .5rem .65rem; text-align: start; }
.imported-guide .guide-prose th { background: var(--guide-tint); }
.imported-guide .article-sources { margin-block-start: 1.65rem; border-top: 1px solid var(--guide-rule); padding-top: .68rem; }
.imported-guide summary { cursor: pointer; }
.imported-facts p, .imported-facts dl { margin: .5rem 0; font-size: .92rem; color: #dfebe4; }
.imported-facts .eyebrow, .imported-facts dt { font-weight: 800; color: var(--guide-card); }
.imported-facts dt { margin-top: .5rem; padding-block-start: .42rem; border-top: 1px solid #587169; }
.imported-facts dd { margin: .1rem 0 .6rem; }
.imported-facts a { color: var(--guide-card); }
.imported-plan-actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; margin-top: .7rem; }
.imported-plan-saved, .imported-plan-actions [aria-pressed='true'] .imported-plan-add { display: none; }
.imported-plan-actions [aria-pressed='true'] .imported-plan-saved { display: inline; }
.imported-plan-actions a, .imported-source a { color: var(--guide-accent); font-size: .88rem; }
.imported-source { margin-block: 1rem 0; }

@media (min-width: 951px) {
  .guide-reading-layout:not(.imported-layout) .reading-rail { position: sticky; top: 5.8rem; }
}

@media (max-width: 950px) {
  .guide-reading-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'feature' 'rail' 'story';
    row-gap: .9rem;
  }
  .reading-rail { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
  .reading-rail .article-contents { display: none; }
  .mobile-contents { display: block; margin: 0 0 1rem; padding: .67rem .9rem; border-radius: 0; }
  .mobile-contents summary { cursor: pointer; font-size: .95rem; font-weight: 800; }
}

@media (max-width: 640px) {
  .guide-directory .lead-guide, .guide-topics { grid-template-columns: minmax(0, 1fr); }
  .lead-guide-image img { flex: none; height: auto; min-height: 0; aspect-ratio: 1.63; }
  .lead-guide h2 { max-width: 15ch; }
  .guide-page-header h1 { max-width: none; }
  .guide-hero > img { aspect-ratio: 1.55; }
  .guide-prose { line-height: 1.65; }
}
