/* gf-r5-pages.css: advisory, about, contact, insights, article, listing and
   legal pages in the Revision 5 website design. Builds on gf-r5.css tokens and
   components. Navy-led, Newsreader headlines, Hanken Grotesk text, soft corners
   from --gf-r, no shadows, no gradients, photographs in true colour. Lists and
   figures are ruled, never boxed. Linked after gf-r5.css. */

.r5 main { display: block; padding-top: var(--nav-h); background: var(--white); color: var(--ink); font-family: var(--font); }
.r5 main p { margin: 0; }
.r5 main a { text-underline-offset: 4px; }
.actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: clamp(26px, 3vw, 40px); }

/* ── Page hero: navy panel, photograph beside it ─────────────────── */
.pg-hero { background: var(--navy); color: var(--white); }
.pg-hero-in { max-width: var(--measure); margin: 0 auto; padding: clamp(48px, 7vw, 104px) var(--gutter); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.pg-hero--plain .pg-hero-in { grid-template-columns: minmax(0, 1fr); padding-bottom: clamp(40px, 5vw, 72px); }
.pg-hero--plain .pg-hero-text { max-width: 62rem; }
.r5 .pg-hero .label { color: var(--sky); }
.r5 .pg-hero h1 { color: var(--white); font-size: clamp(40px, 5.6vw, 84px); line-height: 1.02; margin-top: clamp(14px, 1.6vw, 22px); }
.r5 .pg-hero--article h1 { font-size: clamp(36px, 4.6vw, 68px); line-height: 1.05; }
.pg-hero .lede { color: var(--sky); margin-top: clamp(18px, 2vw, 28px); }
.pg-hero .btn { background: var(--white); color: var(--navy) !important; }
.pg-hero .btn:hover { background: var(--sky); }
.pg-hero .link { color: var(--white) !important; border-color: var(--sky); }
.pg-hero .link:hover { color: var(--sky) !important; }
.pg-hero-photo { aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--gf-r); background: var(--navy); max-height: 78svh; justify-self: end; width: 100%; }
.pg-hero-photo--wide { aspect-ratio: 5 / 4; }
.pg-hero-photo img { width: 100%; height: 100%; object-fit: cover; animation: pg-settle 9s cubic-bezier(.2,.7,.2,1) both; }
.pg-meta { display: flex; gap: 8px 28px; flex-wrap: wrap; margin-top: clamp(20px, 2.4vw, 32px) !important; padding-top: 18px; border-top: 1px solid rgba(169,193,234,.4); font-size: 17px; color: var(--sky); }
.pg-meta b { font-weight: 500; color: var(--white); }
.crumbs { font-size: 16px; color: var(--sky); margin-bottom: clamp(18px, 2vw, 28px) !important; }
.crumbs a { color: var(--sky); text-decoration: none; }
.crumbs a:hover { color: var(--white); }
.pg-hero a:focus-visible { outline-color: var(--sky); }
@keyframes pg-settle { from { transform: scale(1.07); } to { transform: none; } }
@media (max-width: 860px) {
  .pg-hero-in { grid-template-columns: minmax(0, 1fr); }
  .pg-hero-photo { aspect-ratio: 5 / 4; max-height: none; order: -1; }
}

/* ── Two columns: a heading beside its text ──────────────────────── */
.duo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 6vw, 96px); align-items: start; }
.duo > :last-child > * + * { margin-top: 1.1em; }
.duo p, .copy p { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.6; color: var(--slate); max-width: 36em; }
.band--navy .duo p, .band--navy .copy p { color: var(--sky); }
.copy > * + * { margin-top: 1.1em; }
@media (max-width: 860px) { .duo { grid-template-columns: minmax(0, 1fr); } }

/* ── Points: ruled items in two, three or four columns ───────────── */
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 80px); border-top: 2px solid var(--navy); list-style: none; margin: 0; padding: 0; }
.points--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.points--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.point { padding: clamp(22px, 2.6vw, 34px) 0; border-bottom: 1px solid var(--line); }
.point .label { display: block; margin-bottom: 12px; }
.point .n { display: block; font-family: var(--display); font-size: clamp(26px, 2.4vw, 34px); line-height: 1; color: var(--blue); font-variant-numeric: lining-nums; margin-bottom: 14px; }
.r5 .point h3 { font-size: clamp(22px, 2vw, 28px); line-height: 1.15; }
.point p { margin-top: 12px !important; font-size: 18px; line-height: 1.55; color: var(--slate); }
.point .link { margin-top: 18px; }
.band--navy .points { border-top-color: var(--sky); }
.band--navy .point { border-bottom-color: rgba(169,193,234,.3); }
.band--navy .point p { color: var(--sky); }
.band--navy .point .n { color: var(--sky); }
@media (max-width: 1020px) { .points--3, .points--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .points, .points--3, .points--4 { grid-template-columns: minmax(0, 1fr); } }

/* ── Figures: the number carries the line ────────────────────────── */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 clamp(24px, 4vw, 64px); border-top: 2px solid var(--navy); margin: 0; }
.figures div { padding: 22px 0 26px; border-bottom: 1px solid var(--line); }
.figures dt { font-family: var(--display); font-size: clamp(40px, 4.6vw, 68px); line-height: 1; letter-spacing: -0.02em; color: var(--navy); font-variant-numeric: lining-nums; }
.figures dd { margin: 10px 0 0; font-size: 18px; color: var(--slate); }
.band--navy .figures { border-top-color: var(--sky); }
.band--navy .figures div { border-bottom-color: rgba(169,193,234,.3); }
.band--navy .figures dt { color: var(--white); }
.band--navy .figures dd { color: var(--sky); }

/* ── Reading list rows may carry a summary line ──────────────────── */
.read span { display: block; margin-top: 8px; font-family: var(--font); font-size: 18px; font-weight: 400; letter-spacing: 0; line-height: 1.5; color: var(--slate); }
.band--navy .read span { color: var(--sky); }

/* ── Closing band ────────────────────────────────────────────────── */
.close { max-width: 46rem; }
.close .lede { margin-top: 22px; }
.close-lines { margin-top: 30px !important; font-size: 18px; color: var(--sky); }
.close-lines a { color: var(--white); text-decoration: none; border-bottom: 1px solid var(--sky); }
.close-lines a:hover { color: var(--sky); }

/* ── Questions ───────────────────────────────────────────────────── */
.faq { border-top: 2px solid var(--navy); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 24px 0; cursor: pointer; list-style: none; font-family: var(--display); font-size: clamp(22px, 2vw, 28px); line-height: 1.2; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font); font-size: 28px; line-height: 1; color: var(--blue); transition: transform .25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > :not(summary) { padding: 0 0 26px; max-width: 40em; font-size: 18px; line-height: 1.6; color: var(--slate); }

/* ── Prose: articles and legal pages ─────────────────────────────── */
.prose { max-width: 44rem; margin: 0 auto; font-size: clamp(18px, 1.45vw, 20px); line-height: 1.7; color: var(--ink); }
.prose--wide { max-width: 56rem; }
.prose > * + * { margin-top: 1.15em !important; }
.r5 .prose h2 { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.1; margin-top: 1.9em !important; padding-top: .9em; border-top: 2px solid var(--navy); }
.r5 .prose h3 { font-size: clamp(23px, 2.1vw, 29px); line-height: 1.18; margin-top: 1.7em !important; }
.r5 .prose > h2:first-child { margin-top: 0 !important; }
.prose p, .prose li { color: var(--ink); }
.prose a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; }
.prose a:hover { color: var(--blue); }
.prose a.btn, .prose a.link { text-decoration: none; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--blue); }
.prose li + li { margin-top: .5em; }
.prose strong { font-weight: 600; color: var(--navy); }
.prose blockquote, .prose .pull { margin: 1.8em 0 !important; padding: 0 0 0 clamp(18px, 2.4vw, 32px); border-left: 3px solid var(--blue); font-family: var(--display); font-size: clamp(24px, 2.4vw, 34px); line-height: 1.25; color: var(--navy); }
.prose figure { margin: 2em 0 !important; }
.prose figure img { width: 100%; height: auto; border-radius: var(--gf-r); }
.prose figcaption { margin-top: 10px; font-size: 16px; color: var(--slate); }
.prose .note { padding: clamp(20px, 2.4vw, 30px); background: var(--mist); border-left: 3px solid var(--navy); border-radius: 0 var(--gf-r) var(--gf-r) 0; }
.prose .note > * + * { margin-top: .8em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0 !important; }

/* ── Tables: ruled, figures aligned right ────────────────────────── */
.r5 .table-wrap { overflow-x: auto; margin: 1.8em 0 !important; }
.r5 table.data { width: 100%; border-collapse: collapse; font-size: 18px; line-height: 1.4; font-variant-numeric: tabular-nums lining-nums; }
.r5 table.data th { text-align: left; font-size: 14px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); padding: 0 16px 12px 0; border-bottom: 2px solid var(--navy); vertical-align: bottom; }
.r5 table.data td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink); }
.r5 table.data td:first-child { color: var(--navy); font-weight: 500; }
.r5 table.data .r { text-align: right; padding-right: 0; }

/* ── Forms on a light band ───────────────────────────────────────── */
.r5 .form-label { display: block; font-size: 16px; font-weight: 500; color: var(--navy); margin-bottom: 8px; }
.band--navy .form-label { color: var(--sky); }
.r5 .form-note { font-size: 16px; line-height: 1.5; color: var(--slate); }
.band--navy .form-note { color: var(--sky); }
.r5 .form-note a { color: inherit; }
.r5 .form-check { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; line-height: 1.45; }
.r5 .form-check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--blue); flex: none; }
.r5 [hidden] { display: none !important; }

/* ── People ──────────────────────────────────────────────────────── */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(28px, 4vw, 56px) clamp(24px, 3vw, 44px); }
.person-photo { aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--gf-r); background: var(--wash); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.r5 .person h3 { margin-top: 18px; font-size: clamp(22px, 2vw, 28px); }
.person .label { display: block; margin-top: 8px; }
.person p { margin-top: 12px !important; font-size: 18px; color: var(--slate); }

/* ── Photo gallery (listing page) ────────────────────────────────── */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gallery > * { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--gf-r); background: var(--wash); margin: 0; }
.gallery > :first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) { .pg-hero-photo img { animation: none; } }

/* label sits clear of the heading it introduces */
.r5 .label + h2, .r5 .label + h3 { margin-top: 14px; }

/* MLS search (Matrix frameable IDX) */
.idx-band { padding-top: 0; }
.idx-wrap { max-width: 1480px; }
.idx-frame { border-radius: var(--gf-r); overflow: hidden; border: 1px solid rgba(14,42,90,.14); background: #fff; height: max(760px, 88vh); }
.idx-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.idx-note { margin-top: 18px; font-size: 14px; line-height: 1.6; color: rgba(14,42,90,.72); max-width: 70ch; }
.idx-note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 700px) { .idx-wrap { padding-left: 0; padding-right: 0; } .idx-frame { border-radius: 0; border-left: 0; border-right: 0; height: 86vh; } .idx-note { padding: 0 20px; } }
.idx-h { font-family: var(--display); font-weight: 400; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.15; color: #0E2A5A; margin: 0 0 20px; }
.idx-frame + .idx-h { margin-top: 64px; }
.idx-frame--gf { height: 660px; }
@media (max-width: 700px) { .idx-h { padding: 0 20px; } .idx-frame--gf { height: 76vh; } }
.idx-band { padding-top: 72px; }
