/* Glossary (glossary.html). Only what this page alone needs: the letter index (shown without JavaScript), the A to Z
   list of terms, the tools over it and the closing band. The opening, "In short", Keep exploring and the buttons
   come from site-2026.css. With page-glossary.js (v5, 2026-11-27) every letter folds to one row at every width,
   showing the names of its terms, and opens its definitions in place; nothing on the page jumps when clicked. */

/* Without JavaScript: one plain link for each letter that has terms, then every definition. */
.gl-index { padding: 20px 0 24px; background: var(--warm); border-bottom: 1px solid var(--line); }
.gl-index[hidden] { display: none; }
.gl-index-label { margin: 0 0 10px; font-size: 16px; font-weight: 500; color: var(--ink-2); }
.gl-index ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.gl-index a { display: grid; place-items: center; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font-size: 19px; font-weight: 600; color: var(--navy); text-decoration: none; }
.gl-index a:hover { border-color: var(--sky); color: var(--sky); }

/* The terms. Each letter is a section: a large letter, then its terms. */
.gl-body { padding: 4px 0 56px; background: var(--white); }
.gl-letter { padding: 28px 0 10px; border-top: 1px solid var(--line); }
.gl-letter:first-child { border-top: 0; }
.gl-letter[hidden], .gl-term[hidden] { display: none !important; }
.gl-letter h2 { font-size: 56px; line-height: 1; font-weight: 700; letter-spacing: -.03em; color: var(--navy); }
.gl-list { margin: 14px 0 0; }

.gl-term { margin: 0 -12px 4px; padding: 12px; border-radius: 14px; }
.gl-term dt { font-size: 21px; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; color: var(--navy); }
.gl-term dd { margin: 6px 0 0; max-width: 35em; font-size: 18px; line-height: 1.55; color: var(--ink-2); }
.gl-term dd a { color: var(--navy); font-weight: 500; text-decoration: underline; text-decoration-color: var(--sky-mid); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.gl-term dd a:hover { color: var(--sky); }
/* Where a definition came from: on its own line, tall enough to tap. */
.gl-term:not(.gl-see) dd > a { display: flex; align-items: center; width: fit-content; min-height: 44px; margin-top: 2px; padding-block: 6px; font-size: 16px; line-height: 1.4; }
/* A term someone followed a link to is marked with a pale wash behind it, never over the words. */
.gl-term:target { background: var(--sky-wash); }

/* A cross-reference ("SFHA: see Special Flood Hazard Area") sits on one line. */
.gl-see { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; padding-block: 12px; }
.gl-see dt { font-size: 19px; }
.gl-see dd { flex: 1 1 14em; margin: 0; font-size: 17px; }
/* Inline, so a long name wraps like text; the padding keeps the link 44 px tall to tap. */
.gl-see dd > a { padding: 12px 0; }

/* The definition a cross-reference points to, shown under it (page-glossary.js). */
.gl-see dd a[aria-expanded="true"] { background: var(--sky-wash); border-radius: 4px; }
.gl-ref { margin: 10px 0 4px; padding: 14px 18px 16px; border: 1px solid #C9D9E7; border-left: 4px solid var(--sky-mid); border-radius: 12px; background: #F7FAFD; }
.gl-ref-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gl-ref-title { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--navy); }
.gl-ref-close { flex: none; }
.gl-ref-text { margin: 6px 0 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.gl-ref-text a { display: flex; align-items: center; width: fit-content; min-height: 44px; font-size: 16px; }

.gl-note { margin: 36px 0 0; padding: 18px 20px; max-width: 46em; border-radius: 14px; background: var(--warm); font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.gl-note b { font-weight: 600; color: var(--navy); }

@media (min-width: 760px) {
  .gl-index ul { display: flex; flex-wrap: wrap; }
  .gl-index a { width: 48px; }
}
/* Without the script, a laptop shows the letter beside its terms, in two columns. */
@media (min-width: 900px) {
  .gl-body { padding-bottom: 80px; }
  .gl-letter { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 40px; align-items: start; padding: 44px 0 24px; }
  .gl-letter h2 { font-size: 80px; line-height: .9; }
  .gl-list { margin: 0 -16px; }
  .gl-term { margin: 0 0 6px; padding: 12px 16px; }
}
/* Two columns of terms on a wide screen. Only while shown: a hidden list keeps the browser's own hiding, which
   find-in-page can still search (hidden="until-found"). */
@media (min-width: 1100px) {
  .gl-list:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; align-items: start; }
}

/* ---------- With the script: tools, then one row per letter ---------- */
.gl-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px 16px; padding: 28px 0 18px; border-bottom: 2px solid var(--navy); }
.gl-find label { display: block; margin-bottom: 8px; font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--navy); }
.gl-find input { display: block; width: 100%; max-width: 520px; min-height: 54px; padding: 0 16px; border: 1.5px solid #B9C2CC; border-radius: 12px; background: var(--white); font: inherit; font-size: 18px; color: var(--navy); }
.gl-find input:focus-visible { outline-offset: 2px; border-color: var(--navy); }
.gl-all { min-height: 54px; }
.gl-status { grid-column: 1 / -1; margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); }

.gl-fold .gl-letter { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 16px; align-items: start; padding: 0; border-top: 0; border-bottom: 1px solid var(--line); }
.gl-fold .gl-letter h2 { grid-column: 1; grid-row: 1; font-size: 40px; line-height: 1; }
.gl-toggle { appearance: none; display: flex; align-items: flex-start; width: 100%; min-height: 76px; margin: 0; padding: 14px 0 0; border: 0; background: none; font: inherit; letter-spacing: inherit; color: inherit; text-align: left; cursor: pointer; }
/* A tap anywhere on the row, the letter or the names beside it, opens or closes it. */
.gl-toggle::before { content: ""; position: absolute; inset: 0 0 auto; height: 76px; }
.gl-letter:not(.is-open) .gl-toggle::before { height: auto; bottom: 0; }
.gl-toggle:focus-visible { outline: none; }
.gl-toggle:focus-visible::before { outline: 3px solid var(--focus); outline-offset: -2px; border-radius: 10px; }
.gl-plus { position: absolute; right: 2px; top: 20px; width: 36px; height: 36px; border-radius: 50%; background: var(--sky-wash); transition: background-color .2s; }
.gl-plus::before, .gl-plus::after { content: ""; position: absolute; left: 11px; top: 17px; width: 14px; border-top: 2px solid var(--navy); transition: transform .2s ease, border-color .2s; }
.gl-plus::after { transform: rotate(90deg); }
.gl-letter:hover .gl-plus { background: #D6E6F2; }
.gl-letter.is-open .gl-plus { background: var(--navy); }
.gl-letter.is-open .gl-plus::before, .gl-letter.is-open .gl-plus::after { border-color: var(--white); }
.gl-letter.is-open .gl-plus::after { transform: rotate(0deg); }
.gl-peek { grid-column: 2; grid-row: 1; margin: 0; padding: 24px 56px 22px 0; font-size: 18px; line-height: 1.45; color: var(--navy); pointer-events: none; }
.gl-letter:hover .gl-peek { color: var(--sky); }
.gl-letter.is-open .gl-peek { color: var(--ink-2); }
.gl-fold .gl-list { grid-column: 1 / -1; margin: 0 0 0 72px; padding: 0 0 24px; }
.gl-fold .gl-list[hidden] { margin-top: 0; margin-bottom: 0; padding: 0; }
@media (min-width: 900px) {
  .gl-fold .gl-letter { grid-template-columns: 112px minmax(0, 1fr); column-gap: 24px; }
  .gl-fold .gl-letter h2 { font-size: 46px; }
  .gl-toggle { padding-top: 10px; }
  .gl-fold .gl-list { margin-left: 120px; margin-right: -16px; }
  .gl-peek { font-size: 19px; }
}
@media (max-width: 759px) {
  .gl-tools { grid-template-columns: minmax(0, 1fr); padding-top: 20px; }
  .gl-all { justify-self: start; }
  .gl-fold .gl-letter { grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; }
  .gl-fold .gl-letter h2 { font-size: 32px; }
  .gl-toggle { min-height: 68px; padding-top: 14px; }
  .gl-toggle::before { height: 68px; }
  .gl-plus { top: 18px; width: 32px; height: 32px; }
  .gl-plus::before, .gl-plus::after { left: 9px; top: 15px; }
  .gl-peek { padding: 20px 44px 18px 0; font-size: 17px; }
  .gl-fold .gl-list { margin-left: 0; padding-bottom: 16px; }
  .gl-term dt { font-size: 20px; }
  .gl-term dd { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .gl-plus, .gl-plus::before, .gl-plus::after { transition: none; } }

/* The closing band, as on the other pages. */
.fc-end { background: var(--navy-deep); color: var(--white); padding: 72px 0; text-align: center; }
.fc-end h2 { max-width: 20em; margin-inline: auto; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -.025em; font-weight: 700; color: var(--white); }
.fc-end-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
@media (max-width: 640px) {
  .fc-end { padding: 44px 0; }
  .fc-end-actions { flex-direction: column; }
  .fc-end-actions .btn { justify-content: center; }
}

/* Keep exploring: on a tablet the icon sits over the title; an odd last link spans the row on a phone. */
@media (min-width: 760px) and (max-width: 1023px) {
  .next-band .next-list.has-ic a { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
  .next-band .next-list.has-ic .next-ic { grid-row: auto; }
  .next-band .next-list.has-ic b, .next-band .next-list.has-ic span { grid-column: 1; }
}
@media (max-width: 759px) {
  .next-band .next-list.has-ic > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (forced-colors: active) {
  .gl-index a { border-color: CanvasText; }
  .gl-term:target { outline: 2px solid Highlight; }
  .gl-plus { border: 1px solid CanvasText; }
  .gl-plus::before, .gl-plus::after { border-color: CanvasText !important; }
  .gl-tools { border-bottom-color: CanvasText; }
  .gl-ref { border-color: CanvasText; }
  .gl-toggle:focus-visible::before { outline-color: Highlight; }
}
@media print { .gl-tools, .gl-plus, .gl-peek, .gl-ref { display: none !important; } }

/* The way back in the opening (Home) is a 44 px place to tap. */
.ph .crumbs a { padding-inline: 4px; margin-inline: -4px; }
