/* T07 representative discovery (remaining-168, 2026-09-15). Scoped under
 * body.rd-page. Service-first opening, one search panel (fields plus the
 * near-me option), a results bar with the live count and Clear search, then
 * even result cards. Behaviour stays in each page's own script.
 */
body.rd-page main .container { max-width: 1180px; }

/* Opening: title, fee note and search in one block. Wide screens put the
 * note beside the title with the search under both; phones put the search
 * straight under the title so it is usable in the first screen. */
body.rd-page .rd-top { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "search" "note"; gap: 1rem 2rem; margin: .25rem 0 1.25rem; }
body.rd-page .rd-head { grid-area: head; }
body.rd-page .rd-top > .acc-note { grid-area: note; margin: 0; max-width: none; }
body.rd-page .rd-top > .rd-search { grid-area: search; margin: 0; }
body.rd-page .rd-head h1 { font-size: var(--text-title-compact, 1.7rem); line-height: 1.2; margin: 0 0 .4rem; text-align: left; }
body.rd-page .rd-lead { margin: 0; color: var(--color-text-muted); font-size: 1rem; line-height: 1.55; max-width: 60ch; }
@media (min-width: 1024px) {
  body.rd-page .rd-top { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); grid-template-areas: "head note" "search search"; }
}

/* Search panel: fields on one row, the near-me option under a thin rule. */
body.rd-page .rd-search { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 1rem 1.25rem; margin: 0 0 1rem; }
body.rd-page .rd-search .filters-bar.filters-grid { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; max-width: none; }
@media (min-width: 768px) {
  body.rd-page .rd-search .filters-bar.filters-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .8fr); }
}
body.rd-page .rd-search .filter-group input,
body.rd-page .rd-search .filter-group select { min-height: 44px; font-size: 1rem; }
body.rd-page .rd-search .near-me-bar { margin: .9rem 0 0; padding-top: .9rem; border-top: 1px solid var(--color-border); }

/* Results bar: live count on the left, Clear search on the right. */
body.rd-page .rd-results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin: 0 0 1rem; min-height: 40px; scroll-margin-top: 90px; }
body.rd-page .rd-count { margin: 0; font-weight: 600; color: var(--color-text); }
body.rd-page .rd-results-bar .ctl-c-single[hidden] { display: none; }

/* Result cards: even rows, the action pinned to the bottom of each card. */
body.rd-page .rd-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 641px) { body.rd-page .rd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { body.rd-page .rd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
body.rd-page .rd-grid > .card { display: flex; flex-direction: column; margin: 0; }
body.rd-page .rd-grid > .card > .card-body { display: flex; flex-direction: column; flex: 1; }
body.rd-page .rd-grid .acc-reveal, body.rd-page .rd-grid .acc-contact { margin-top: auto; padding-top: 0; }
body.rd-page .rd-grid .acc-bits { margin-bottom: .75rem; }
body.rd-page .rd-grid .acc-reveal { align-self: flex-start; }
body.rd-page .acc-foot { margin: 2rem 0 0; max-width: none; }
body.rd-page .rd-grid .rep-name { font-weight: 700; font-size: 1.05rem; color: var(--color-text); }
body.rd-page .btn-near-me-cta { white-space: normal; max-width: 100%; text-align: center; }
@media (max-width: 767px) { body.rd-page .rd-search .filters-grid > .filter-group:first-child { grid-column: 1 / -1; } }

/* Four-field filter panels (directory): state, type, sort, order. */
@media (min-width: 768px) {
  body.rd-page .rd-search .filters-bar.filters-grid:has(> .filter-group:nth-child(4)) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
}
body.rd-page .rd-search .filter-group .btn { min-height: 44px; }
@media (max-width: 767px) { body.rd-page .rd-search .filters-grid:has(> .filter-group:nth-child(4)) > .filter-group:first-child { grid-column: auto; } }
/* A note-only opening (no search): note beside the title on wide screens. */
body.rd-page .rd-top--note { grid-template-areas: "head" "note"; }
@media (min-width: 1024px) { body.rd-page .rd-top--note { grid-template-areas: "head note"; } }
body.rd-page .rd-top > .choice-disclaimer { grid-area: note; margin: 0; }
body.rd-page .rd-grid .org-card .card-footer { margin-top: auto; }

/* get-help and online-resources: task groups under a gold rule. */
body.gh-page .choice-wrap, body.or-page .choice-wrap { max-width: 1180px; margin: 1.5rem auto 3rem; padding: 0 1rem; }
body.gh-page .choice-head { text-align: left; margin-bottom: 1.5rem; }
body.gh-page .choice-head p { margin: 0; max-width: 60ch; }
body.rd-page .gh-group { margin: 0 0 1.5rem; }
body.rd-page .gh-group-title { font-size: 1.2rem; line-height: 1.3; margin: 0 0 .75rem; padding-top: .75rem; border-top: 2px solid var(--color-accent); text-align: left; color: var(--color-text); }
body.gh-page #rate { scroll-margin-top: 90px; }
body.gh-page .gh-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 2.5rem; align-items: start; }
body.gh-page .gh-aside .verify-box { margin-top: 0; }
@media (min-width: 1024px) {
  body.gh-page .gh-layout { grid-template-columns: minmax(0, 1fr) 400px; }
  body.gh-page .gh-aside { position: sticky; top: 84px; }
}
body.or-page .choice-back { margin-bottom: .75rem; }
@media (min-width: 768px) { body.or-page .or-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
body.or-page .or-grid .choice-card { height: 100%; }
/* The automatic Related rail: same width as the page, five cards as 3 + 2 with no lone card. */
body.or-page .related-rail { max-width: 1180px; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; box-sizing: border-box; }
@media (min-width: 900px) {
  body.or-page .related-rail .rel-cards:has(> .rel-card:nth-child(5):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  body.or-page .related-rail .rel-cards:has(> .rel-card:nth-child(5):last-child) > .rel-card { grid-column: span 2; }
  body.or-page .related-rail .rel-cards:has(> .rel-card:nth-child(5):last-child) > .rel-card:nth-child(n+4) { grid-column: span 3; }
}
/* The fee / scope note (was inline on the two finders only). */
body.rd-page .acc-note { border-left: 4px solid var(--color-accent); background: rgba(232,181,74,.08); border-radius: var(--radius-sm); padding: .85rem 1.1rem; font-size: .92rem; line-height: 1.6; }
body.rd-page .acc-note strong { color: var(--color-primary); }
body.rd-page .acc-note a { color: var(--color-primary); font-weight: 600; }
