/* The guide and footer share the guide-card text inset, including its border. */
:where(#home-end, .home-footer-scope) .wrap {
  --guide-card-inset: clamp(18px, 1.7vw, 24px);
  --guide-text-offset: calc(var(--guide-card-inset) + 1px);
}


.guide, .home-footer-scope { --footer-heading-ink: #eee; }
.guide .guide-title { color: var(--footer-heading-ink); }

/* Keep the lower footer neutral, including focus and hover states. */
.home-footer-scope {
  --dark-paper: #e8e8e8;
  --dark-secondary: #bfbfbf;
  --footer-floor: #181818;
  --charcoal: #222222;
  --gold-light: var(--footer-heading-ink);
  --gold-fill: #aaaaaa;
  --gold-keyline: #757575;
  --gold-divider: #4b4b4b;
}

.foot .option:is(:hover, :focus-visible) { background: #313131; }
.foot .directory .links { min-inline-size: 0; padding-inline: var(--guide-text-offset) 5px; }
.foot .directory .links::before { content: none; }
.foot .directory .links h2 { text-wrap: balance; }
.foot .directory .links a { max-inline-size: 100%; overflow-wrap: anywhere; }

@media (max-width: 805px) {
  .foot .directory {
    --menu-step: calc((100% + var(--gutter)) / 4);
    grid-template-columns: repeat(2, var(--menu-step)) minmax(0, 1fr);
    column-gap: 0;
    row-gap: 26px;
  }
  .foot .directory .identity { grid-column: 1 / -1; }
  .foot .directory .links:last-child { grid-column: auto; }
}

@media (max-width: 660px) {
  :where(#home-end, .home-footer-scope) .wrap { --guide-card-inset: 14px; }
  .foot .directory .links { padding-inline-end: 0; }
}

@media (max-width: 370px) {
  :where(#home-end, .home-footer-scope) .wrap { --guide-card-inset: 12px; }
}

#guide-source, #guide-fit { scroll-margin-top: 24px; }

