/* Guides: the index (guides.html) and each guide. Loaded after site-2026.css and page-legal.css,
   which supply the opening, the contents list and the article column (.ph-read, .rd, .pl-*). This file
   holds what goes inside a guide (the notes, the steps, the tables, the checklists) and the index rows.
   Vendor management, the examiners page, the fact sheet and the manual page use some of these parts too. */
.gd-check svg, .gd-cta-list svg { flex: none; fill: none; stroke: var(--sky); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* "General information, not legal advice" */
.gd-note { margin-top: 28px; max-width: 46em; padding: 16px 20px; border: 1px solid var(--line); border-left: 4px solid var(--sky-mid); border-radius: 12px; background: var(--white); font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.gd-note b { color: var(--navy); font-weight: 600; }

/* The short answer */
.gd-summary { margin-top: 18px; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--warm); }
.gd-summary ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.gd-summary li { padding-left: 4px; }
.gd-summary li::marker { color: var(--sky); font-weight: 600; }
.gd-summary b { color: var(--navy); font-weight: 600; }

/* The steps, in order */
.gd-steps { list-style: none; margin: 22px 0 0; padding: 0; counter-reset: gd-step; display: grid; gap: 16px; }
.gd-steps > li { counter-increment: gd-step; position: relative; padding: 20px 22px 22px 70px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.gd-steps > li::before { content: counter(gd-step); position: absolute; left: 20px; top: 20px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: var(--white); font-weight: 600; font-size: 15px; line-height: 1; }
.pl-doc .gd-steps h3 { margin-top: 0; scroll-margin-top: 96px; }
.gd-when { display: inline-block; margin-top: 8px; padding: 3px 12px; border-radius: 999px; background: var(--sky-wash); color: var(--navy); font-size: 14px; font-weight: 500; line-height: 20px; }
.gd-steps p { margin-top: 10px; }
.gd-steps .pl-list { margin-top: 8px; }

/* "With FloodCaliber" note at the end of a step */
.gd-fc { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 16px !important; padding: 12px 14px; border-radius: 10px; background: var(--warm); font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.gd-fc img { width: 24px; height: 24px; margin-top: 1px; }
.gd-fc b { color: var(--navy); font-weight: 600; }

/* "Example. Fictional loan files." label above a worked example */
.pl-doc .gd-example-tag { display: inline-block; margin-top: 12px; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--warm); color: var(--navy); font-size: 14px; font-weight: 500; line-height: 20px; }

/* Worked examples: the short answer, the file's facts, number columns and totals */
.gd-summary.gd-answer p { margin: 0; }
.gd-facts { margin: 14px 0 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.gd-facts > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 4px 16px; padding: 12px 16px; font-size: 16px; line-height: 1.5; }
.gd-facts > div + div { border-top: 1px solid var(--line); }
.gd-facts dt { font-weight: 600; color: var(--navy); }
.gd-facts dd { margin: 0; color: var(--ink-2); }
.gd-table.gd-num td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.gd-table tr.gd-total > * { font-weight: 600; color: var(--navy); background: var(--warm); }

/* Small citation under a point, and the inline "Q&A" references */
.gd-src { display: block; margin-top: 2px; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.pl-doc .gd-src a:not(.btn) { font-weight: 400; color: var(--ink-2); }

/* Tables: regulators, and flood against Regulation X. On wide screens a table may run wider
   than the text column; on tablets it scrolls sideways inside its own frame; on phones each
   row becomes a card, so nothing scrolls sideways. */
.gd-table-wrap { margin-top: 20px; border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; background: var(--white); }
.gd-table-wrap:focus-visible { outline-offset: 2px; }
.gd-table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.gd-table caption { padding: 12px 16px; text-align: left; font-size: 15px; font-weight: 600; line-height: 22px; color: var(--navy); background: var(--warm); border-bottom: 1px solid var(--line); }
.gd-table th, .gd-table td { padding: 12px 16px; text-align: left; vertical-align: top; }
.gd-table thead th { font-size: 14px; font-weight: 600; line-height: 20px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--line); }
/* A wide screen without the column beside the text: a table may run a little wider than the text. */
@media (min-width: 1081px) { .rd:not(.has-aside) .pl-doc .gd-table-wrap { margin-right: -120px; } }
.gd-table tbody tr + tr > * { border-top: 1px solid var(--line); }
.gd-table tbody th { font-weight: 600; color: var(--navy); }
.gd-table td small { display: block; margin-top: 2px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.gd-table td a { white-space: nowrap; }
/* A link in a row heading wraps between words, never inside one. */
.pl-doc .gd-table tbody th a:not(.btn) { overflow-wrap: normal; }
.gd-table th small { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; line-height: 20px; color: var(--ink-2); }
.gd-table.gd-compare thead th:not(:first-child), .gd-table.gd-compare td { width: 40%; }

/* Checklist: the borrower notice */
.gd-check { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.gd-check li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; }
.gd-check svg { width: 22px; height: 22px; margin-top: 3px; stroke-width: 2.25; }
.gd-check b { color: var(--navy); font-weight: 600; }
.pl-doc .gd-subhead { margin-top: 32px; font-size: 19px; line-height: 1.4; }

/* A highlighted quotation from a rule */
.gd-quote { margin: 16px 0 0; padding: 14px 18px; border-left: 3px solid var(--sky-mid); background: var(--warm); border-radius: 0 12px 12px 0; color: var(--navy); }
.gd-quote p { margin: 0; }
.gd-quote cite { display: block; margin-top: 6px; font-style: normal; font-size: 15px; color: var(--ink-2); }

/* How FloodCaliber tracks it */
.gd-cta { margin-top: 18px; padding: 24px; border-radius: var(--radius); background: var(--navy); color: rgba(255,255,255,.92); }
.gd-cta p { margin: 0; }
.gd-cta-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.gd-cta-list li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; }
.gd-cta-list svg { width: 20px; height: 20px; margin-top: 4px; stroke: var(--sky-mid); }
.gd-cta-list b { color: var(--white); font-weight: 600; }
.gd-cta .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.pl-doc .gd-cta a.gd-light { color: var(--white); text-decoration-color: var(--sky-mid); }
.pl-doc .gd-cta a.gd-light:hover { color: var(--sky-light); }

/* Sources */
.gd-sources { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 10px; font-size: 17px; line-height: 1.55; }
.gd-sources li::marker { color: var(--sky); }

/* Closing band: one line and two buttons, the same on every page */
.closer.cta-band { padding: 64px 0; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.cta-band h2 { max-width: 17em; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.12; }
.closer.cta-band .actions { margin-top: 0; }

@media (max-width: 640px) {
  .gd-note { padding: 14px 16px; font-size: 15px; }
  .gd-summary { padding: 16px 18px; }
  .gd-steps > li { padding: 16px 14px 16px 52px; }
  .gd-steps > li::before { left: 12px; top: 16px; width: 28px; height: 28px; font-size: 13px; }
  .gd-cta { padding: 20px 18px; }
  .gd-cta .actions .btn { width: 100%; justify-content: center; text-align: center; }
  .closer.cta-band { padding: 44px 0; }
  .cta-band h2 { font-size: 28px; }
  .cta-band .actions { width: 100%; }

  /* Each table row becomes a card: the row heading first, then each cell with its column name. */
  .gd-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .gd-table, .gd-table tbody, .gd-table tr, .gd-table th, .gd-table td { display: block; width: auto; }
  .gd-table.gd-compare thead th:not(:first-child), .gd-table.gd-compare td { width: auto; }
  .gd-table caption { display: block; }
  .gd-table tbody tr { padding: 14px 16px; }
  .gd-table tbody tr + tr { border-top: 1px solid var(--line); }
  .gd-table tbody tr + tr > * { border-top: 0; }
  .gd-table th, .gd-table td { padding: 0; }
  .gd-table td { margin-top: 8px; }
  .gd-facts > div { grid-template-columns: minmax(0, 1fr); padding: 10px 14px; }
  .gd-table-wrap { overflow-x: visible; }
  .gd-table { font-size: 16px; }
  .gd-when, .pl-doc .gd-example-tag { font-size: 14px; }
  .gd-table.gd-num td { white-space: normal; }
  .gd-table td:empty { display: none; }
  /* The column's name runs in before the value, so a short answer (Yes, No, $250,000) takes one line. */
  .gd-table td[data-label]::before { content: attr(data-label); display: inline; margin-right: 8px; font-size: 14px; font-weight: 600; line-height: 20px; letter-spacing: .05em; text-transform: uppercase; color: var(--slate); }
  .gd-table td[data-label] > small { display: block; }
}

.gd-cta .gd-fine { margin-top: 16px; font-size: 15px; line-height: 22px; color: rgba(255,255,255,.9); }
.gd-cta-list + p { margin-top: 16px; }

/* ==========================================================================================================
   v4: inside a guide's article (.rd, page-legal.css) the parts follow the text size: 19 px on a laptop,
   17 px on a phone. A citation of an Interagency Q&A item links to the agencies' own words for it.
   ========================================================================================================== */
.rd .gd-summary { margin-top: 20px; padding: 24px 28px; }
.rd .gd-summary ol, .rd .gd-summary ul { gap: 12px; }
.rd .gd-note { font-size: 16px; }
.rd .gd-table, .rd .gd-facts > div, .rd .gd-fc { font-size: 17px; }
.rd .gd-sources { font-size: 17px; }
.rd .gd-src { font-size: 16px; line-height: 1.5; }
.rd .gd-check { gap: 14px; }
.rd .gd-steps > li { padding: 24px 26px 26px 76px; }
.rd .gd-steps > li::before { left: 24px; top: 24px; }
.rd .gd-cta { padding: 30px 32px; border-radius: 20px; font-size: 18px; line-height: 1.6; }
.rd .pl-doc .gd-cta p { margin-top: 0; }
.rd .pl-doc .gd-cta .gd-cta-list + p, .rd .pl-doc .gd-cta .gd-fine { margin-top: 16px; }
.rd .gd-cta .btn { min-height: 48px; }
.pl-doc a.qa-ref:not(.btn) { font-weight: 400; text-decoration-thickness: 1px; }
/* A lone item number in a list of citations ("3, 4 and 5"): a wider place to tap than one character. */
.pl-doc a.qa-ref-n:not(.btn) { padding: 6px 5px; margin: -6px -5px; }
/* On a touch screen a citation link is a taller and, for a lone number, wider place to tap than its text; the
   padding is taken back by the margin, so no line moves. */
@media (pointer: coarse) {
  .pl-doc a.qa-ref:not(.btn) { padding-block: 12px; }
  .pl-doc a.qa-ref-n:not(.btn) { padding: 12px 15px; margin: 0 -15px; }
  .pl-doc a.qa-ref-more:not(.btn) { padding-inline: 8px; margin-inline: -8px; }
}
@media (max-width: 640px) {
  .rd .gd-summary { padding: 18px 18px; }
  .rd .gd-note { font-size: 16px; }
  .rd .gd-table { font-size: 17px; }
  .rd .gd-steps > li { padding: 16px 14px 16px 52px; }
  .rd .gd-steps > li::before { left: 12px; top: 16px; }
  .rd .gd-cta { padding: 22px 18px; font-size: 17px; }
}

/* ==========================================================================================================
   v4: the guides index (guides.html). Four topics, each a heading beside its guides; every guide is one row:
   the question it answers and one line. On a phone the heading sits above its rows.
   ========================================================================================================== */
.gx { padding: 28px 0 72px; }
.gx-group { display: grid; grid-template-columns: minmax(0, 290px) minmax(0, 1fr); gap: 24px 60px; padding: 40px 0; scroll-margin-top: 96px; }
.gx-group + .gx-group { border-top: 1px solid var(--line); }
.gx-head h2 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.1; font-weight: 700; letter-spacing: -.025em; color: var(--navy); }
.gx-head p { margin-top: 10px; font-size: 17px; line-height: 1.5; color: var(--ink-2); }
/* Each guide: its picture, the question it answers, one line, and an arrow. */
.gx-list { list-style: none; margin: -14px 0 0; padding: 0; }
.gx-list li + li { border-top: 1px solid var(--line); }
.gx-list a { display: grid; grid-template-columns: minmax(0, 1fr) 20px; gap: 4px 18px; align-items: start; min-height: 64px; padding: 18px 0; color: inherit; text-decoration: none; }
.gx-list.has-ic a { grid-template-columns: 48px minmax(0, 1fr) 20px; }
.gx-ic { grid-column: 1; grid-row: 1 / span 2; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--sky-wash); transition: background-color .2s; }
.gx-ic svg { width: 24px; height: 24px; fill: none; stroke: var(--sky); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }
.gx-list b { grid-column: 1; padding-top: 2px; font-size: 21px; line-height: 1.25; font-weight: 600; letter-spacing: -.012em; color: var(--navy); }
.gx-list a > span { grid-column: 1; font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.gx-list a::after { content: ""; grid-column: 2; grid-row: 1; justify-self: end; width: 10px; height: 10px; margin: 12px 4px 0 0; border-top: 2px solid var(--sky); border-right: 2px solid var(--sky); transform: rotate(45deg); }
.gx-list.has-ic b, .gx-list.has-ic a > span { grid-column: 2; }
.gx-list.has-ic a::after { grid-column: 3; }
.gx-list a:hover b { color: var(--sky); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.gx-list a:hover .gx-ic { background: var(--sky); }
.gx-list a:hover .gx-ic svg { stroke: var(--white); }
.gx-list a:focus-visible { outline-offset: 2px; border-radius: 8px; }
.gx-tag { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: var(--sky-wash); color: var(--navy); font-size: 14px; font-weight: 600; line-height: 20px; letter-spacing: 0; vertical-align: 2px; white-space: nowrap; }
.gx .gd-note { margin-top: 8px; max-width: none; }
/* A wide screen: two guides a row, so a topic reads as a set of doors. */
@media (min-width: 1100px) {
  .gx .gx-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 44px; }
  .gx .gx-list li { border-top: 1px solid var(--line); }
  .gx .gx-list li:nth-child(-n+2) { border-top: 0; }
}

/* The manual: every guide in one PDF. */
.gx-manual .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 56px; }
.gx-manual .v4-head { margin-bottom: 0; max-width: 40em; }
.gx-manual .btn { min-height: 54px; padding-inline: 26px; font-size: 17px; }
.gx-manual .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
main > section.v4-sec.gx-manual { padding: 72px 0; }

@media (max-width: 900px) {
  .gx-group { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 32px 0; }
  .gx-list { margin-top: 0; }
}
@media (max-width: 760px) {
  .gx { padding: 4px 0 28px; }
  .gx-group { padding: 20px 0 6px; }
  .gx-head p { margin-top: 4px; font-size: 16px; }
  .gx .gd-note { font-size: 15px; }
  .gx-manual .v4-head h2 { font-size: 28px; }
  .gx-list a { grid-template-columns: minmax(0, 1fr) 14px; gap: 2px 14px; padding: 12px 0; }
  .gx-list.has-ic a { grid-template-columns: 40px minmax(0, 1fr) 14px; }
  .gx-ic { width: 40px; height: 40px; border-radius: 12px; }
  .gx-ic svg { width: 22px; height: 22px; }
  .gx-list b { padding-top: 0; font-size: 18px; }
  .gx-list a > span { font-size: 16px; line-height: 1.45; }
  .gx-list a::after { width: 9px; height: 9px; margin-top: 8px; }
  main > section.v4-sec.gx-manual { padding: 36px 0; }
  .gx .gd-note { margin-top: 4px; }
  .gx-manual .btn { width: 100%; justify-content: center; }
}
@media (forced-colors: active) { .gx-list a::after { border-color: CanvasText; } .gx-tag, .gx-ic { border: 1px solid CanvasText; } .gx-ic svg { stroke: CanvasText; } }
@media (prefers-reduced-motion: reduce) { .gx-ic, .gx-ic svg { transition: none; } }


/* ==========================================================================================================
   v5 (2026-11-27): the citations in tables, source lists and quotations are 44 px places to click or tap (the
   padding is taken back by the line, so nothing moves); the product card is tighter on a phone; and an odd last
   quick link spans the row on a phone, so "Keep exploring" never ends on a lone tile.
   ========================================================================================================== */
.pl-doc .gd-table td a:not(.btn), .pl-doc .gd-table th a:not(.btn), .pl-doc .gd-sources a:not(.btn), .pl-doc .gd-src a:not(.btn), .pl-doc cite a:not(.btn) { padding-block: 12px; }
.rd.has-folds .rd-after { margin-top: 40px; padding-top: 0; border-top: 0; }
@media (max-width: 640px) {
  .rd .gd-cta { padding: 22px 18px 24px; font-size: 16px; line-height: 1.55; }
  .rd .gd-cta-list { gap: 10px; }
  .rd .gd-cta .gd-fine { font-size: 14px; }
}
@media (max-width: 759px) {
  .next-band .next-list.has-ic > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
/* On a tablet, three quick links a row are narrow: the icon sits over the title instead of beside it. */
@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 (forced-colors: active) { .gd-cta, .gd-summary, .gd-steps > li, .gd-table-wrap { border: 1px solid CanvasText; } }
