/* Listing guide reader. Scoped under .gd-. Uses brand tokens from brand.css. */
.bar nav a[aria-current="true"]{text-decoration:underline; text-decoration-color:var(--brass); text-underline-offset:0.6em;}

.gd-head{ background:var(--blue); color:var(--white); padding:calc(var(--bar-top-h) + 12px) var(--gutter) 18px; }
.gd-head-in{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,36rem); align-items:end; column-gap:clamp(2rem,5vw,5rem); max-width:90rem; margin:0 auto; }
.gd-head .kf-crumb{ margin-bottom:10px; }
.gd-head h1{ font-weight:300; font-size:clamp(1.9rem,3.2vw,2.6rem); line-height:1.1; color:var(--cream); }
.gd-lede{ font-size:var(--fs-body-sm); line-height:1.55; color:var(--fade); padding-bottom:4px; }

.gd-reader{ --gd-a:0.772727; --gd-pw:300px; --gd-ph:388px; background:var(--blue); color:var(--white); padding:6px var(--gutter) 40px; scroll-margin-top:var(--bar-compact-h); }
.gd-reader:fullscreen{ display:flex; flex-direction:column; justify-content:center; padding:12px 16px; overflow:hidden; }
.gd-reader:-webkit-full-screen{ display:flex; flex-direction:column; justify-content:center; padding:12px 16px; overflow:hidden; }

.gd-stage{ position:relative; width:100%; height:var(--gd-ph); margin:0 auto; overflow:hidden; touch-action:pan-y pinch-zoom; outline:none; -webkit-tap-highlight-color:transparent; }
.gd-stage:focus-visible{ outline:2px solid var(--cream); outline-offset:4px; }
.gd-stage.gd-zoomed{ overflow:auto; touch-action:pan-x pan-y pinch-zoom; overscroll-behavior:contain; cursor:grab; }
.gd-stage.gd-zoomed:active{ cursor:grabbing; }

.gd-spread{ position:absolute; top:0; bottom:0; left:0; right:0; margin:auto; height:var(--gd-ph); display:flex; justify-content:center; will-change:transform; }
.gd-zoomed .gd-spread{ position:relative; margin:0; will-change:auto; }
.gd-slot{ width:var(--gd-pw); height:var(--gd-ph); flex:0 0 auto; position:relative; }
.gd-slot.gd-empty{ visibility:hidden; }
.gd-page{ position:absolute; inset:0; background:#1a2833; box-shadow:0 0 0 1px rgb(203 220 230 / 0.10); overflow:hidden; }
.gd-page img{ display:block; width:100%; height:100%; object-fit:fill; opacity:0; transition:opacity .25s ease; user-select:none; -webkit-user-drag:none; }
.gd-page.gd-ready img{ opacity:1; }
/* a faint gutter shading where two pages meet, kept very subtle */
.gd-slot.gd-l .gd-page::after, .gd-slot.gd-r .gd-page::after{ content:""; position:absolute; top:0; bottom:0; width:6%; pointer-events:none; }
.gd-slot.gd-l .gd-page::after{ right:0; background:linear-gradient(90deg, rgb(19 29 36 / 0), rgb(19 29 36 / 0.10)); }
.gd-slot.gd-r .gd-page::after{ left:0; background:linear-gradient(270deg, rgb(19 29 36 / 0), rgb(19 29 36 / 0.10)); }

.gd-bar{ display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px 20px; max-width:90rem; margin:18px auto 0; }
.gd-links{ display:flex; flex-wrap:wrap; gap:4px 22px; align-items:center; }
.gd-link{ display:inline-flex; align-items:center; min-height:44px; font-size:var(--fs-label-sm); color:var(--fade); text-decoration:none; border-bottom:1px solid transparent; }
.gd-link:hover{ color:var(--cream); text-decoration:underline; text-decoration-color:var(--brass); text-underline-offset:0.5em; }
.gd-link:focus-visible, .gd-btn:focus-visible{ outline:2px solid var(--cream); outline-offset:3px; }

.gd-ctl{ display:none; align-items:center; }
.gd-js .gd-ctl{ display:flex; }
.gd-nav{ gap:16px; justify-content:center; }
.gd-tools{ gap:10px; justify-content:flex-end; }
.gd-count{ margin:0; min-width:11.5em; text-align:center; font-size:var(--fs-label); color:var(--cream); font-variant-numeric:tabular-nums; }
.gd-btn{ appearance:none; -webkit-appearance:none; font:inherit; color:var(--cream); background:transparent; border:1px solid var(--line-field); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; transition:border-color .2s ease, color .2s ease; }
.gd-btn:hover:not(:disabled){ border-color:var(--brass); color:var(--white); }
.gd-btn:disabled{ opacity:.35; cursor:default; }
.gd-arrow{ width:44px; height:44px; border-radius:50%; padding:0; }
.gd-text{ min-height:44px; padding:0 18px; border-radius:22px; font-size:var(--fs-label-sm); }
.gd-text[hidden]{ display:none; }
.gd-text[aria-pressed="true"]{ border-color:var(--brass); color:var(--brass); }
.gd-noscript{ margin:24px auto; max-width:40rem; color:var(--fade); text-align:center; }
.gd-noscript a{ color:var(--cream); }

@media (max-width:899px){
  .gd-head-in{ grid-template-columns:1fr; row-gap:10px; }
  .gd-head{ padding-bottom:14px; }
  .gd-reader{ padding-left:16px; padding-right:16px; padding-top:4px; }
  .gd-bar{ grid-template-columns:minmax(0, 1fr); justify-items:center; gap:4px; margin-top:12px; }
  .gd-nav{ order:1; } .gd-tools{ order:2; justify-content:center; } .gd-links{ order:3; justify-content:center; }
  .gd-js .gd-tools:not(:has(.gd-text:not([hidden]))){ display:none; }
  .gd-nav{ justify-self:stretch; }
  .gd-count{ min-width:min(9.5em, calc(100% - 120px)); }  /* zoomfix: shrinks only when the row cannot hold it (enlarged text); 9.5em as before otherwise */
}
@media (prefers-reduced-motion:reduce){
  .gd-page img{ transition:none; }
  .gd-btn{ transition:none; }
}
:fullscreen .gd-bar{ margin-top:10px; }

/* Inline mode (About page): additive, selected by .gd-inline[data-inline]. Standalone rules above are untouched. */
.gd-inline{ --gd-pw:300px; --gd-ph:388px; color:var(--white); }
.gd-inline:fullscreen{ max-width:none; margin:0; display:flex; flex-direction:column; justify-content:center; padding:12px 16px; overflow:hidden; background:var(--blue); }
.gd-inline:-webkit-full-screen{ max-width:none; margin:0; display:flex; flex-direction:column; justify-content:center; padding:12px 16px; overflow:hidden; background:var(--blue); }
.gd-inline .gd-stage:focus-visible{ outline:2px solid var(--brass); outline-offset:6px; }
.gd-inline .gd-stage.gd-zoomed{ overscroll-behavior:auto; }
.gd-inline .gd-bar{ max-width:none; }
.gd-inline .gd-tools{ flex-wrap:wrap; gap:4px 18px; }
@media (max-width:899px){ .gd-inline .gd-tools{ justify-content:center; } .gd-inline .gd-bar{ margin-top:10px; } }
/* zoomfix: phone width, enlarged text. Below 899px the bar is a plain block; when it is narrower than 14rem (254px at 320px wide normal size is 15.9rem) links wrap to centered lines with room between them. */
@media (max-width:899px){ .gd-bar{ container: gd-bar / inline-size; } }
@container gd-bar (max-width:14rem){
  .gd-link, .gd-text, .gd-inline .gd-link, .gd-inline .gd-text{ line-height:1.3; padding-top:0.3rem; padding-bottom:0.3rem; text-align:center; max-width:100%; }
  .gd-links, .gd-tools{ row-gap:0.25rem; }
}
