/* The dock occupies its own final row, so every page ends above it. */
html { scroll-padding-bottom: calc(65px + env(safe-area-inset-bottom, 0px)); }
.gd-dock {
  --gd-edge: clamp(18px, 4.5vw, 82px);
  --gd-blue: #254dd8;
  --gd-border: #d5deeb;
  position: sticky;
  z-index: 60;
  bottom: 0;
  font-family: Inter, Arial, sans-serif;
  color: #172940;
  pointer-events: none;
}
.gd-home {
  background: #f9fbff;
  border-top: 1px solid #cbd7e7;
  box-shadow: 0 -4px 15px #142f5007;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  pointer-events: auto;
}
.gd-bar {
  max-width: 1720px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 3vw, 49px);
  padding: 0 var(--gd-edge);
}
.gd-inner .gd-bar { padding-block: 6px calc(10px + env(safe-area-inset-bottom, 0px)); }
.gd-chapters { display: flex; flex: 1; align-items: stretch; gap: clamp(10px, 1.5vw, 26px); }
.gd-chapters a {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 49px;
  padding-top: 19px;
  padding-bottom: 8px;
  font-size: .8125rem;
  font-weight: 530;
  line-height: 1.5;
  color: #455975;
  letter-spacing: .012em;
}
.gd-chapters a::before {
  content: '';
  position: absolute;
  top: 11px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gd-border);
  border-radius: 2px;
}
.gd-chapters a[aria-current] { color: #193fbb; font-weight: 690; }
.gd-chapters a[aria-current]::before { background: var(--gd-blue); }
.gd-chapters a[aria-current]::after {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gd-blue);
}
.gd-chapters a:hover, .gd-panel a:hover { color: #1638ac; text-decoration: underline; text-underline-offset: 3px; }
.gd-mobile-now { display: none; }
.gd-disclosure { flex: none; position: relative; pointer-events: auto; }
.gd-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 7px 12px;
  color: #193354;
  font-size: .875rem;
  font-weight: 610;
  line-height: 1.25;
  list-style: none;
  white-space: nowrap;
}
.gd-toggle::-webkit-details-marker { display: none; }
.gd-toggle svg { width: 18px; height: 18px; }
.gd-toggle i { width: 6px; height: 6px; margin: 4px 1px 0; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(-45deg); }
.gd-disclosure[open] .gd-toggle i { transform: rotate(135deg); margin-block: -3px 0; }
.gd-toggle-close, .gd-disclosure[open] .gd-toggle-open { display: none; }
.gd-disclosure[open] .gd-toggle-close { display: inline; }
.gd-toggle:hover, .gd-disclosure[open] .gd-toggle { color: var(--gd-blue); }
.gd-inner .gd-toggle { border: 1px solid #aebed3; border-radius: 6px; background: #fff; box-shadow: 0 4px 17px #142c4d18; }
.gd-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  width: min(535px, calc(100vw - 2 * var(--gd-edge)));
  max-height: min(73vh, 630px);
  max-height: min(73dvh, 630px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(16px, 2.1vw, 28px);
  border: 1px solid #becde0;
  border-radius: 9px;
  box-shadow: 0 12px 40px #10284d2b;
  background: white;
}
.gd-panel h2 { font-size: 1.125rem; font-weight: 645; letter-spacing: -.03em; line-height: 1.35; }
.gd-groups { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 24px; margin-block: 16px; }
.gd-group h3 { color: #3f5570; font-size: .8125rem; font-weight: 680; letter-spacing: .01em; line-height: 1.45; padding-bottom: 6px; border-bottom: 1px solid #e0e6ee; margin-bottom: 3px; }
.gd-group a { display: block; width: fit-content; color: #1c3555; font-size: .875rem; line-height: 1.35; padding: 5px 0; }
.gd-group a[aria-current] { color: #173baa; font-weight: 650; }
.gd-directory { display: block; padding-top: 12px; border-top: 1px solid #dce3ed; color: #234ac9; font-size: .875rem; font-weight: 615; }
.gd-local { border-bottom: 1px solid #dce3ed; padding-bottom: 13px; margin-bottom: 15px; }
.gd-local-links { display: flex; flex-wrap: wrap; gap: 4px 9px; margin-top: 8px; }
.gd-local-links a { color: #284364; font-size: .875rem; line-height: 1.4; border: 1px solid #d4ddeb; border-radius: 4px; padding: 4px 8px; }
.gd-local-links a[aria-current] { color: #153baf; border-color: #8ba7eb; background: #eef3ff; font-weight: 605; }
.gd-local-home { display: none; }
body:has(dialog[open]) .gd-dock { visibility: hidden; }
@media (max-width: 760px) {
  .gd-dock { --gd-edge: 14px; }
  .gd-home .gd-bar { justify-content: space-between; gap: 8px; min-height: 47px; }
  .gd-chapters { display: none; }
  .gd-home .gd-disclosure { margin-left: auto; }
  .gd-mobile-now:not([hidden]) { display: flex; align-items: baseline; gap: 8px; line-height: 1.3; }
  .gd-mobile-now span { color: #50637c; font-size: .75rem; }
  .gd-mobile-now b { font-size: .875rem; color: #173b99; font-weight: 610; }
  .gd-local-home { display: block; }
  .gd-inner .gd-bar { padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); }
  .gd-panel { max-height: min(69vh, 600px); max-height: min(69dvh, 600px); }
  .gd-panel a { min-height: 32px; }
  .gd-groups { gap: 18px 15px; }
  body:has(main :is(input, textarea, select):focus) .gd-dock { visibility: hidden; }
}
@media (max-height: 460px) { .gd-panel { max-height: 65vh; max-height: 65dvh; } }
@media print { .gd-dock { display: none; } }
