/* R15: align references to the RELATED QUESTION cards, never center an 820px silo. */
/* Inherit the exact page-specific .wrap width and gutters (1120/1180 and mobile). */
.hfh-guide-reference-appendix.wrap {
  box-sizing: border-box;
  margin-top: 0;
  margin-bottom: 0;
  display: grid;
  gap: 12px;
}
.hfh-guide-reference-appendix.wrap > section,
.hfh-shared-guide-reference-footer .furnace-sources-inner > section,
.hfh-legacy-guide-reference-appendix > section {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  max-width: none;
  margin: 0 !important;
  padding: 0 !important;
}
/* Beat pre-existing mobile ID rules declaring padding-top/bottom !important. */
.hfh-guide-reference-appendix.wrap > section#library,
.hfh-guide-reference-appendix.wrap > section#ledger,
.hfh-guide-reference-appendix.wrap > section#evidence,
.hfh-guide-reference-appendix.wrap > section#guide-methodology,
.hfh-legacy-guide-reference-appendix > section#library,
.hfh-legacy-guide-reference-appendix > section#ledger,
.hfh-legacy-guide-reference-appendix > section#evidence,
.hfh-legacy-guide-reference-appendix > section#guide-methodology,
.hfh-shared-guide-reference-footer .furnace-sources-inner > section#library,
.hfh-shared-guide-reference-footer .furnace-sources-inner > section#evidence {
  margin: 0 !important;
  padding: 0 !important;
}
.hfh-guide-reference-appendix.wrap > section > details,
.hfh-shared-guide-reference-footer .furnace-sources-inner > section > details,
.hfh-legacy-guide-reference-appendix > section > details {
  box-sizing: border-box;
  width: 100%;
  margin: 0 !important;
}
.hfh-legacy-guide-reference-appendix {
  display: grid;
  gap: 12px;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
}
.hfh-shared-guide-reference-footer.furnace-sources-footer {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.hfh-shared-guide-reference-footer .furnace-sources-inner {
  display: grid;
  gap: 12px;
}
/* Tighten only the final related section when immediately followed by disclosures. */
.related-section:has(+ .hfh-guide-reference-appendix),
.related-section:has(+ .hfh-legacy-guide-reference-appendix),
.related-section:has(+ .hfh-shared-guide-reference-footer) {
  padding-bottom: 12px !important;
}
/* Remove unrelated old footer margins when references finish the guide. */
.hfh-guide-reference-appendix + .site-footer,
.hfh-shared-guide-reference-footer + .site-footer,
body:has(.hfh-legacy-guide-reference-appendix) .site-footer {
  margin-top: 0 !important;
}

/* Legacy guides do not consistently use .related-section on their last block. */
#related-hvac:has(+ .hfh-legacy-guide-reference-appendix),
#related-questions:has(+ .hfh-legacy-guide-reference-appendix) {
  padding-bottom: 12px !important;
}
/* The short-cycling guide has flush related cards even on desktop. */
.hfh-reference-desktop-flush.hfh-guide-reference-appendix.wrap {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
/* Pages with full-bleed related cards at phone widths also use full-bleed source cards. */
@media (max-width: 760px) {
  .hfh-reference-phone-bleed.hfh-guide-reference-appendix.wrap,
  .hfh-reference-phone-bleed.hfh-shared-guide-reference-footer.furnace-sources-footer {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}
