.cgb .guide-hero {
  display: grid;
  align-items: center;
  position: relative;
  isolation: isolate;
  min-height: clamp(390px, 41vw, 545px);
  color: #f7eee0;
  background: #15110f;
}
.guide-hero-art {
  position: absolute;
  inset: 0 0 0 32%;
  overflow: hidden;
  z-index: -1;
  background: #24201d;
}
.guide-hero-art img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 45% center;
}
.guide-hero-art::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, #15110f 0%, rgba(21, 17, 15, .97) 19%, rgba(21, 17, 15, .5) 44%, transparent 78%),
    linear-gradient(0deg, rgba(15, 12, 11, .61), transparent 35%);
}
.guide-hero-inner { padding-block: clamp(2rem, 6vw, 5.4rem); }
.cgb .guide-hero.guide-reference {
  min-height: 0;
  background: #15110f radial-gradient(ellipse at 80% 48%, #32291e, transparent 66%);
}
.guide-reference .guide-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(1.3rem, 5vw, 4rem);
}
.guide-reference-art img { width: 100%; height: auto; max-height: 360px; object-fit: contain; }
.cgb .guide-hero.guide-reference h1 { font-size: clamp(2.35rem, 4vw, 4.05rem); }
.guide-hero-text .guide-hero-inner { padding-block: 3.25rem; }
.cgb .guide-hero-text { min-height: 0; }
.cgb .guide-hero h1 {
  max-width: 17ch;
  margin-block: .56rem .3em;
  font-size: clamp(2.55rem, 5vw, 4.65rem);
  text-shadow: 0 2px 24px #110c08b3;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.cgb .guide-deck {
  max-width: 40ch;
  margin-bottom: 0;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  color: #ece0ce;
  text-shadow: 0 1px 7px #110c08;
}
.guide-crumb { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; font-size: .875rem; font-weight: 650; }
.cgb .guide-crumb a { color: #f3d399; }
.guide-archive .guide-hero a.cta { margin-top: 1.6rem; }
.cgb .guide-archive .guide-hero:not(.guide-hero-text) { min-height: clamp(390px, 36vw, 490px); }
.guide-hero :focus-visible { outline-color: #f3d399; }
.guide-layout,
.guide-archive-body { padding-block: clamp(2rem, 4.9vw, 4rem) 3.25rem; }
.guide-layout { max-width: 1040px; }
.guide-has-index { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 235px); gap: clamp(2rem, 5vw, 4.6rem); }
.guide-story { width: 100%; min-width: 0; padding-bottom: 0; font-size: clamp(1.03rem, 1.35vw, 1.125rem); line-height: 1.72; }
.guide-layout:not(.guide-has-index) .guide-story { max-width: 750px; }
.cgb .guide-story > :first-child:not(details), .cgb .guide-index-inline + :is(h2,p) { margin-top: 0; }
.cgb .guide-story h2 { font-size: clamp(1.55rem, 3.15vw, 2.28rem); margin-bottom: .56em; scroll-margin-top: 1.35rem; }
.guide-story > figure:not(:has(table)) img { border: 1px solid #dbcfba; }
.guide-story figure img { max-width: 100%; }
.guide-side { min-width: 0; }
.guide-index {
  color: #33291f;
  padding: 1rem 1.15rem;
  background: #efe5d5;
  border: 1px solid #dfd1ba;
  border-radius: .35rem;
  font-size: .88rem;
  line-height: 1.45;
}
.guide-index summary { cursor: pointer; font-weight: 740; }
.guide-index ol { margin: .8rem 0 0; padding-left: 1.15rem; }
.guide-index li + li { margin-top: .5rem; }
.guide-index-inline { display: none; margin-bottom: 1.8rem; }
.guide-index-side { position: sticky; top: 1.5rem; max-height: calc(100dvh - 3rem); overflow: auto; }
.guide-next { margin-top: 2.4rem; }
.cgb .guide-story .guide-next h2 { margin-top: 0; font-size: 1.35rem; }
.guide-topics h2, .guide-collection h2 { margin-bottom: .6em; }
.guide-topics { scroll-margin-top: 1.5rem; margin-top: clamp(1.75rem, 4vw, 3rem); padding-block: 1.65rem; border-block: 1px solid #ddd0bd; }
.guide-archive-body > :first-child { margin-top: 0; }
.guide-topics ul { display: flex; flex-wrap: wrap; gap: .55rem; list-style: none; margin: 0; padding: 0; }
.cgb .guide-topics a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border: 1px solid #d7c5ac;
  padding: .35rem .85rem;
  border-radius: .26rem;
  color: #553817;
  background: #fff9ef;
  text-decoration: none;
  font-weight: 640;
  font-size: .91rem;
}
.cgb .guide-topics a:hover { background: #efe0c5; }
.guide-collection { margin-top: clamp(1.75rem, 4vw, 3rem); }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(.95rem, 2vw, 1.4rem); }
.guide-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #ddcfbb;
  border-radius: .42rem;
  background: #fffbf3;
}
.guide-card:hover { border-color: #a98450; }
.guide-card:focus-within { outline: 3px solid #925c24; outline-offset: 3px; }
.guide-card-art { aspect-ratio: 16/9; overflow: hidden; background: #dfd0b9; }
.guide-card-art img { width: 100%; height: 100%; object-fit: cover; object-position: 35% center; }
.guide-reference .guide-card-art img { object-fit: contain; padding: .5rem; }
.guide-card-body { padding: 1.1rem 1.15rem 1.25rem; }
.cgb .guide-card-body h3 { font-size: clamp(1.25rem, 1.75vw, 1.55rem); margin: .25rem 0 .45rem; overflow-wrap: anywhere; }
.cgb .guide-card-body h3 a { text-decoration: none; color: #262017; }
.cgb .guide-card-body h3 a:hover { text-decoration: underline; }
.cgb .guide-card-topic { margin: 0; color: #715026; font-size: .78rem; font-weight: 700; }
.cgb .guide-card-body p:last-child { color: #4e4234; font-size: .94rem; margin-bottom: 0; }
.guide-pagination { margin-top: 1.9rem; }
.guide-pagination .nav-links { display: flex; flex-wrap: wrap; gap: .45rem; }
.guide-pagination .page-numbers {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .35rem .65rem;
  border: 1px solid #d7c5ac;
  border-radius: .26rem;
}
.guide-pagination [aria-current] { background: #eee0c7; font-weight: 710; }
@media (max-width: 940px) {
  .guide-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .guide-has-index { gap: 1.6rem; }
}
@media (max-width: 700px) {
  .cgb .guide-hero { min-height: 0; align-items: end; }
  .guide-hero-inner { padding-block: clamp(9.4rem, 38vw, 15.5rem) 1.8rem; }
  .guide-hero-text .guide-hero-inner { padding-block: 2rem; }
  .guide-hero-art { inset: 0; }
  .guide-hero-art img { height: clamp(210px, 71vw, 370px); object-position: 32% center; }
  .guide-hero-art::after { background: linear-gradient(0deg, #15110f 12%, #15110f 22%, #15110fef 42%, #15110f82 64%, #15110f00 92%); }
  .cgb .guide-archive .guide-hero:not(.guide-hero-text) { min-height: 0; }
  .guide-reference .guide-hero-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "art" "title";
    gap: 1.2rem;
    padding-block: 1rem 1.75rem;
  }
  .guide-reference-art { grid-area: art; }
  .guide-reference-art img { max-height: 245px; }
  .guide-reference .guide-hero-copy { grid-area: title; }
  .guide-has-index { display: block; }
  .guide-index-inline { display: block; }
  .guide-side { display: none; }
}
@media (max-width: 620px) {
  .guide-grid { grid-template-columns: 1fr; }
}
