@import "../assets/public-site/banner-tone.css";
.guide-directory {
  --ink: #1e3647;
  --green: #38543e;
  --line: #d3d6c8;
  color: var(--ink);
  background: #f5f5ee;
}
.guide-directory ::selection { color: #182e38; background: #f6d596; }
.guide-directory :is(a, input, select):focus-visible { outline: 3px solid #9b671e; outline-offset: 2px; }
.guide-directory header {
  background: url(/assets/banners/public/04-guides.webp) center 48% / cover;
  border-bottom: 4px solid #d2aa5d;
}
.guide-directory header > div {
  padding-block: 30px 32px;
  display: grid; grid-template-columns: 1fr minmax(270px, 440px); align-items: end;
}
.guide-directory .word {
  grid-column: 1; color: #f5d691; text-transform: uppercase;
  font: 700 .84rem/1.4 Chakra, sans-serif; letter-spacing: .09em;
}
.guide-directory h1 { grid-column: 1; color: #fffaf0; font-size: clamp(38px, 4.4vw, 72px); margin: 8px 0 0; }
.guide-directory .guide-search { grid-column: 2; grid-row: 1 / 3; position: relative; margin: 0; padding: 0; }
.guide-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.guide-directory .guide-search input {
  border: 1px solid #c1bfaa; background: #fffef6; border-radius: 6px; color: var(--ink);
  padding: 12px 14px 12px 44px; min-height: 48px; box-shadow: 0 3px 12px #182f3426;
}
.guide-search input::placeholder { color: #506256; }
.guide-search::before, .guide-search::after { content: ''; position: absolute; pointer-events: none; }
.guide-search::before { width: 12px; height: 12px; border: 2px solid var(--green); border-radius: 50%; left: 15px; top: calc(50% - 10px); }
.guide-search::after { width: 8px; height: 2px; background: var(--green); left: 27px; top: calc(50% + 5px); transform: rotate(45deg); }
.guide-directory main { padding-block: 28px 52px; }
.guide-directory #status:empty, .guide-directory #results:empty { display: none; }
.guide-directory #volumes:not([hidden]) { display: grid; grid-template-columns: clamp(205px, 17vw, 275px) minmax(0, 1fr); gap: clamp(24px, 3.2vw, 64px); align-items: start; }
.chapter-nav { position: sticky; top: 18px; }
.chapter-nav h2 { margin: 0 0 9px; font: 700 1.3rem/1.2 Chakra, sans-serif; }
.chapter-nav a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 11px 6px; border-bottom: 1px solid var(--line); font-size: .93rem;
  line-height: 1.35; font-weight: 570; text-decoration: none; color: var(--green);
}
.chapter-nav a small { font-size: .8rem; font-variant-numeric: tabular-nums; }
.chapter-nav a:is(:hover,[aria-current]) { background: #e5eadc; color: #203c30; }
.chapter-picker { display: none; }
.guide-group {
  display: grid; grid-template-columns: minmax(200px, 30%) minmax(0, 1fr); gap: clamp(16px, 2vw, 36px);
  border-bottom: 1px solid var(--line); padding-bottom: 25px; margin-bottom: 25px; scroll-margin-top: 12px;
}
.chapter-cover { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: end; color: white; overflow: hidden; min-height: 188px; padding: clamp(16px, 1.6vw, 28px); border-radius: 7px; background: #294237; }
.chapter-cover img, .chapter-cover::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.chapter-cover img { z-index: -2; object-fit: cover; }
.chapter-cover::after { content: ''; z-index: -1; background: linear-gradient(0deg,#0f252ef5, #152b30c9 32%,transparent 79%); }
.chapter-cover small { color: #fbdfa7; font-weight: 650; }
.chapter-cover h2 { margin: 5px 0 0; font: 700 clamp(1.35rem,1.65vw,1.95rem)/1.12 Chakra,sans-serif; text-wrap: balance; }
.chapter-guides { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 20px; align-content: center; }
.chapter-guides li { display: flex; border-bottom: 1px solid var(--line); }
.guide-link {
  display: flex; align-items: center; gap: 11px; flex: 1; padding: 12px 3px; min-height: 62px;
  color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.36; font-size: .98rem;
}
.guide-link img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.guide-link::after { content: ''; width: 6px; height: 6px; border-right: 2px solid #74846c; border-top: 2px solid #74846c; transform: rotate(45deg); margin: 0 4px 0 auto; flex: none; }
.guide-link:hover { background: #e9ede3; color: #284c34; }
.guide-directory .result { background: transparent; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); margin: 0; }
.guide-directory .result:hover { box-shadow: none; background: #e9ede3; }
.guide-directory #results:not(:empty) { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(320px,100%),1fr)); column-gap: 30px; }
@media (min-width: 821px) and (max-width: 1200px) {
  .guide-group { grid-template-columns: minmax(170px, 34%) minmax(0, 1fr); }
  .chapter-guides { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .guide-directory #volumes:not([hidden]) { display: block; }
  .chapter-nav { position: static; margin: 0 0 18px; }
  .chapter-nav a, .chapter-nav h2 { display: none; }
  .chapter-picker { display: block; width: 100%; padding: 11px; border: 1px solid #9aa796; border-radius: 5px; background: #fffef6; font: inherit; color: var(--green); }
}
@media (max-width: 620px) {
  .guide-directory header > div { display: block; padding-block: 19px; }
  .guide-directory .guide-search { margin-top: 17px; max-width: none; }
  .guide-directory main { padding-top: 16px; }
  .guide-group { display: block; padding-bottom: 16px; margin-bottom: 18px; }
  .chapter-cover { min-height: 114px; padding: 15px; }
  .chapter-cover h2 { font-size: 1.45rem; }
  .chapter-guides { grid-template-columns: 1fr; }
  .guide-link { min-height: 55px; padding-block: 8px; }
  .guide-link img { width: 34px; height: 34px; }
}

header > div, main {
  width: min(76rem, calc(100% - 2 * clamp(1.5rem, 4.5vw, 4.5rem)));
  max-width: none; margin-inline: auto; padding-inline: 0;
}
header :is(.word, h1, p), .guide-directory header :is(.word, h1) {
  color: white;
}
header p { max-width: 60ch; }
header h1, .guide-directory header h1 {
  font-size: clamp(2.4rem, 3.4vw, 3.9rem); line-height: 1.04;
}
@media (max-width: 767px) {
  header > div, main { width: calc(100% - 2rem); }
}

.guide-directory-link + .guide-directory-link { margin-block-start: .55rem; }
