/* Interagency Q&A reference: the index of the 144 questions and each question's page.
   Loaded after site-2026.css, page-legal.css and page-guides.css, which supply the opening (.ph-read), the
   article column (.rd, .pl-doc), the notes and the sources list. The pages are written by
   scripts/build-questions.mjs; the agencies' words are never restyled into anything they did not say. */

/* ---------- The index: the filter and what this page is beside the agencies' 19 sections, each folded into one
   row. On a phone: the filter, the sections, then what this page is. ---------- */
.qa-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 28px 0 64px; }
.qa-side { display: contents; }
.qa-filter { order: 1; }
.qa-doc { order: 2; max-width: 860px; }
.qa-side .qa-about { order: 3; }

.qa-filter { padding: 20px 22px 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--warm); }
.qa-filter label { display: block; font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; color: var(--navy); }
/* The search box: a magnifier inside it, then the searches offered as buttons (owner's note, November 27, 2026: the
   page should be friendlier). */
.qa-field { position: relative; margin-top: 12px; }
.qa-glass { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; margin-top: -10px; fill: none; stroke: var(--slate); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.qa-filter input { display: block; width: 100%; min-height: 54px; padding: 0 16px 0 46px; border: 1.5px solid #B9C2CC; border-radius: 12px; background: var(--white); font: inherit; font-size: 17px; color: var(--navy); }
.qa-filter input::placeholder { color: var(--slate); opacity: 1; }
.qa-filter input:focus-visible { outline-offset: 2px; border-color: var(--navy); }
.qa-try-h { margin: 16px 0 8px; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--navy); }
.qa-try { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.qa-try button { min-height: 44px; padding: 0 16px; border: 1.5px solid #C9D6E2; border-radius: 999px; background: var(--white); font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; color: var(--navy); cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.qa-try button:hover { border-color: var(--sky); color: var(--sky); }
.qa-try button[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: var(--white); }
/* A tick on the chosen search, so it shows without colour too (Windows high contrast). */
.qa-try button[aria-pressed="true"]::before { content: "\2713"; margin-right: 7px; font-weight: 700; }
.qa-try button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.qa-filter-status { margin-top: 14px; min-height: 24px; font-size: 16px; font-weight: 500; line-height: 1.5; color: var(--navy); }
.qa-filter-note { margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }

.pl-doc section.qa-sec { margin: 0; padding: 0; border: 0; scroll-margin-top: 104px; }
.pl-doc section.qa-sec + section.qa-sec { margin-top: 8px; padding-top: 0; border-top: 0; }
/* The sources fold into a row of their own after the note (questions.js leaves them out of the filter). */
.pl-doc .gd-note + section.qa-sources { margin-top: 24px; padding-top: 0; border-top: 0; }
.qa-sources-body { padding: 0 22px 18px; }
.qa-sources-body .gd-sources { margin-top: 0; }
.pl-doc .qa-sources-body p { margin-top: 12px; font-size: 16px; }
/* Filtered out: the attribute wins over any display rule. */
.qa-list li[hidden], .pl-doc section[hidden] { display: none; }
.qa-fold { border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.qa-fold[open] { border-color: #C9C3B8; }
/* A topic's row: its name and the agencies' title on the left; on the right, side by side and centred on each other,
   how many questions it has and the plus that opens it (owner's note, November 27, 2026: "align the numbers better
   next to each plus button"). */
.qa-fold > summary { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px 14px; align-items: center; min-height: 68px; padding: 12px 18px 12px 22px; cursor: pointer; list-style: none; border-radius: 16px; }
.qa-fold > summary::-webkit-details-marker { display: none; }
/* The plus that turns into a minus, drawn with borders so Windows high contrast keeps it. */
.qa-pm { position: relative; grid-column: 3; grid-row: 1 / span 2; align-self: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sky-wash); transition: background-color .2s; }
.qa-pm::before, .qa-pm::after { content: ""; position: absolute; left: 10px; top: 16px; width: 14px; border-top: 2px solid var(--navy); transition: transform .2s ease, border-color .2s; }
.qa-pm::after { transform: rotate(90deg); }
.qa-fold[open] > summary .qa-pm { background: var(--navy); }
.qa-fold[open] > summary .qa-pm::before, .qa-fold[open] > summary .qa-pm::after { border-color: var(--white); }
.qa-fold[open] > summary .qa-pm::after { transform: rotate(0deg); }
@media (prefers-reduced-motion: reduce) { .qa-pm, .qa-pm::before, .qa-pm::after { transition: none; } }
.qa-fold > summary:focus-visible { outline-offset: 2px; }
.pl-doc .qa-fold h2 { grid-column: 1; font-size: 21px; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; color: var(--navy); }
.qa-fold > summary:hover h2 { color: var(--sky); }
.qa-sec-title { grid-column: 1; font-size: 16px; line-height: 1.45; color: var(--ink-2); }
.qa-count { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 15px; font-weight: 500; line-height: 1.3; color: var(--ink-2); white-space: nowrap; }

/* The questions in a section: how each is cited, then the question in the agencies' words. */
.qa-list { list-style: none; margin: 0; padding: 0 10px 10px; display: grid; gap: 0; }
.qa-list li + li { border-top: 1px solid var(--line); }
.pl-doc .qa-list a { display: grid; gap: 3px; padding: 14px 12px; border-radius: 10px; font-weight: 400; color: var(--ink-2); text-decoration: none; overflow-wrap: break-word; }
.pl-doc .qa-list a:hover { background: var(--warm); color: var(--navy); }
.pl-doc .qa-list a:hover .qa-id { text-decoration: underline; text-underline-offset: 3px; }
.qa-id { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--sky); }
.qa-q { font-size: 17px; line-height: 1.5; color: var(--ink); }
.qa-doc > .gd-note { margin: 36px 0 0; max-width: none; font-size: 16px; }
.pl-doc.qa-doc section.qa-sec + section:not(.qa-sec) { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line); }

@media (min-width: 1081px) {
  .qa-wrap { grid-template-columns: 320px minmax(0, 820px); column-gap: 64px; align-items: start; padding: 48px 0 88px; }
  .qa-side { display: grid; gap: 20px; grid-column: 1; grid-row: 1; align-content: start; }
  .qa-doc { grid-column: 2; grid-row: 1; }
}
@media (max-width: 640px) {
  .qa-wrap { padding: 20px 0 44px; gap: 16px; }
  .qa-filter { padding: 16px 16px 14px; }
  .qa-filter label { font-size: 18px; }
  .qa-fold > summary { min-height: 64px; padding: 14px 14px 14px 16px; gap: 4px 10px; }
  .qa-pm { grid-row: 1; width: 34px; height: 34px; }
  .pl-doc .qa-fold h2 { font-size: 19px; }
  /* A phone shows the number alone; the word stays for screen readers. */
  .qa-count { grid-row: 1; align-self: center; min-width: 34px; padding: 5px 10px; border-radius: 999px; background: var(--sky-wash); color: var(--navy); font-size: 14px; font-weight: 600; text-align: center; }
  .qa-count span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .qa-sec-title { grid-column: 1 / -1; }
  .qa-list { padding: 0 6px 8px; }
  .pl-doc .qa-list a { padding: 12px 10px; }
}
@media (forced-colors: active) { .qa-pm { border: 1px solid CanvasText; } .qa-pm::before, .qa-pm::after { border-color: CanvasText !important; } .qa-fold, .qa-filter, .qa-about { border-color: CanvasText; } }

/* ---------- A question's page: the question is the title, and the agencies' answer follows at once ---------- */
/* The question is set smaller than a guide's title: some run to several lines. */
.qa-item .ph-read h1 { max-width: 30em; font-size: clamp(23px, 5.4vw, 30px); line-height: 1.24; letter-spacing: -.015em; font-weight: 600; }
.qa-item .ph-read .ph-grid { padding-bottom: 24px; }
@media (min-width: 900px) {
  .qa-item .ph-read h1 { max-width: 29em; font-size: clamp(27px, 2.5vw, 36px); line-height: 1.2; }
  .qa-item .ph-read .ph-grid.solo { padding: 22px 0 40px; }
}

/* Beside the answer on a wide screen (to its right, at its top; it doesn't follow the page), after it on a phone:
   how to cite the item, and whose words these are. */
@media (min-width: 1081px) {
  .rd.qa-read { display: grid; grid-template-columns: minmax(0, 760px) minmax(280px, 320px); justify-content: space-between; column-gap: 56px; align-items: start; }
  .qa-read .pl-col { grid-column: 1; grid-row: 1; }
  .qa-rail { grid-column: 2; grid-row: 1; }
}
.qa-rail { align-self: start; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.qa-rail h2 { font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; color: var(--navy); }
.qa-rail dl { margin: 12px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.qa-rail dl > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.qa-rail dt { font-size: 15px; line-height: 1.4; color: var(--slate); }
.qa-rail dd { margin: 2px 0 0; font-size: 16px; line-height: 1.45; color: var(--navy); }
.qa-rail 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; }
.qa-rail a:hover { color: var(--sky); }
/* Each link in the list is a 44 px place to click or tap; the padding is taken back by the margin. */
.qa-rail dd a { display: inline-block; padding: 11px 0; margin: -11px 0; }
.qa-rail-note a { padding-block: 13px; }
.qa-rail-note { margin-top: 16px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.qa-rail-note b { color: var(--navy); font-weight: 600; }
@media (max-width: 1080px) {
  .qa-rail { max-width: 760px; margin-top: 40px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--warm); }
  .qa-rail dl { border-top-color: #D9D3C8; }
  .qa-rail dl > div { border-bottom-color: #D9D3C8; }
}

/* Footnote markers in the answer, and the footnotes */
.qa-fn { line-height: 0; }
/* A footnote marker is a 44 px place to click; the margins give the space back, so the line does not move. */
.pl-doc .qa-fn a { display: inline-block; min-width: 44px; padding: 14px 6px; margin: -14px -10px -14px -8px; font-weight: 600; line-height: 16px; text-align: center; text-decoration: none; }
.pl-doc .qa-fn a:hover { text-decoration: underline; }
.qa-footnotes { margin: 14px 0 0; padding-left: 26px; display: grid; gap: 10px; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.qa-footnotes li { padding-left: 4px; scroll-margin-top: 104px; }
.qa-footnotes li::marker { color: var(--sky); font-weight: 600; }
.qa-footnotes li:target { background: var(--sky-wash); border-radius: 6px; }

/* Previous and next question */
.qa-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.pl-doc .qa-pager a { display: grid; align-content: start; gap: 4px; min-height: 64px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); font-weight: 400; color: var(--ink-2); text-decoration: none; }
.pl-doc .qa-pager a:hover { border-color: var(--sky); }
.qa-pager a span { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--slate); }
.qa-pager a b { font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--navy); }
.qa-pager a small { font-size: 16px; line-height: 1.45; color: var(--ink-2); }
.qa-pager .qa-next { grid-column: 2; }
@media (max-width: 640px) {
  .qa-pager { grid-template-columns: minmax(0, 1fr); margin-top: 40px; padding-top: 24px; }
  .qa-pager .qa-next { grid-column: auto; }
}
@media (forced-colors: active) { .qa-pager a, .qa-rail { border-color: CanvasText; } }

/* Long addresses in the agencies' footnotes and answers wrap instead of widening the page on a phone. */
.qa-footnotes li, .pl-doc p, .pl-doc li { overflow-wrap: anywhere; }

/* The index explains itself beside its list (after it on a phone): who wrote it, why it matters and how to use
   it, then the way to our plain-English guide. */
.qa-about { padding: 20px 22px 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
.qa-about h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; color: var(--navy); }
.qa-about dl { margin: 10px 0 0; }
.qa-about dl > div + div { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.qa-about dt { font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--navy); }
.qa-about dd { margin: 2px 0 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.qa-about .text-link { margin-top: 16px; font-size: 16px; }
.qa-about .text-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.qa-topics-title { margin: 0 0 14px; font-size: 17px; font-weight: 600; color: var(--ink-2); }
