/* Shared editorial spacing, readable details and responsive containment. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media screen {
  :root { --section-space: clamp(66px, 7.5vw, 108px); }
  h1, h2, h3 { text-wrap: balance; overflow-wrap: break-word; }
  p { text-wrap: pretty; }
  .section { padding-block: var(--section-space); }
  main > .section.wrap + .section.wrap { padding-top: 0; }
  .eyebrow { font-size: 10px; }
  .button, .text-link { max-width: 100%; }
  .button span, .text-link span, summary > span { flex-shrink: 0; }

  /* Grid items must be allowed to shrink around text and scrollable tables. */
  .section-heading > *, .life-intro > *, .life-stories > *,
  .service-grid > *, .audience-tabs > *, .process-grid > *,
  .guides-grid > *, .split > *, .group-grid > *, .footer-main > *,
  .closing-inner > *, .detail-layout > *, .contact-layout > *,
  .article-layout > *, .mini-builder > *, .wb-layout > *,
  .wb-summary > *, .wb-income-metrics > *, .wb-goal > *,
  .why-hero-heading > *, .why-section-intro > *, .why-values-grid > * {
    min-width: 0;
  }
  .section-heading h2, .life-intro h2, .split h2,
  .why-section-intro h2, .closing h2 { line-height: 1.16; }
  .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .service-card { padding: 32px; }
  .service-card h3 { font-size: clamp(25px, 2.1vw, 29px); line-height: 1.2; }
  .service-card > p { font-size: 14px; line-height: 1.7; }
  .card-index > span { font-size: 9px; }
  .card-more { font-size: 11px; }
  .service-note, .filter-count { font-size: 12px; }
  .filter-bar button { min-height: 44px; }
  .audience-panel > p:not(.eyebrow), .process-grid p,
  .guide-card > p:not(.eyebrow) { font-size: 14px; line-height: 1.75; }
  .tick-list li { font-size: 13px; }
  .related-tags a { font-size: 11px; padding: 9px 11px; }
  .guide-cover { min-height: 215px; }
  .guide-cover strong { max-width: calc(100% - 18px); }
  .guide-card { display: flex; flex-direction: column; align-items: flex-start; }
  .guide-cover { width: 100%; }
  .guide-card > p:not(.eyebrow) { margin-bottom: 18px; }
  .guide-card > .text-link { margin-top: auto; font-size: 11px; }
  .life-story p { font-size: 13px; line-height: 1.65; padding-right: 25px; }
  .life-story > div > span { font-size: 10px; }
  .life-story:after { background: linear-gradient(0deg, #0b1b2bf5 0%, #0b1b2b80 42%, transparent 86%); }
  .entry-inner { flex-wrap: wrap; gap: 24px 36px; }
  .entry-inner strong { white-space: nowrap; }
  .entry-inner > p { margin: 0; }
  .mini-inputs label { font-size: 12px; display: flow-root; }
  .mini-inputs label strong { margin-left: 12px; }
  .mini-total { font-size: clamp(38px, 4.6vw, 66px); overflow-wrap: anywhere; }
  .mini-breakdown { flex-wrap: wrap; gap: 16px 32px; }
  .mini-breakdown b { overflow-wrap: anywhere; }
  .mini-inputs input { height: 24px; margin-top: 12px; }
  .mini-assumptions { font-size: 12px !important; }
  .builder-risk { font-size: 12px; }

  /* Keep the existing blue closing palette and make footer details readable. */
  .closing-inner { gap: clamp(32px, 5vw, 80px); }
  .closing h2 { font-size: clamp(36px, 4.2vw, 54px); }
  .footer-label { font-size: 10px; margin-bottom: 18px; }
  .footer-main > div > a:not(.brand),
  .footer-main > div > p:not(.footer-label):not(.footer-statement) {
    font-size: 12px;
    overflow-wrap: anywhere;
  }
  .footer-main > div > a:not(.brand) { padding-block: 4px; margin-bottom: 4px; }
  .legal-foot > p { font-size: 11px; line-height: 1.8; }
  .footer-bottom { font-size: 10px; gap: 20px; }
  .footer-bottom > div { flex-wrap: wrap; gap: 12px 24px; }
  .footer-bottom a { padding-block: 6px; }
  .group-card .eyebrow { font-size: 10px; line-height: 1.6; min-height: 32px; }
  .group-card.current .eyebrow, .group-card.current > span { color: #d1bc96; }
  .group-card > span { color: #786447; font-size: 12px; }
  .group-card p:not(.eyebrow) { font-size: 14px; }
  .menu-button { min-height: 44px; padding-inline: 4px; }
  .mobile-nav a[aria-current="page"] { color: #0f2133; font-weight: 600; }
  .contact-form label { font-size: 12px; }
  .contact-form .check-label { font-size: 12px; }
  .form-heading > p:last-child, .small-copy { font-size: 12px; }
  .contact-form .button { white-space: normal; }
  .form-status > a { display: inline-block; margin: 12px 0 0; }
  .copy-draft { margin-right: 14px; }

  /* Long calculator values and annual tables stay within their panels. */
  .wb-main, .wb-table-details, .wb-table-scroll { min-width: 0; max-width: 100%; }
  .wb-table-scroll { overscroll-behavior-x: contain; }
  .wb-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wb-summary b, .wb-headline > strong, .wb-comparison strong,
  .wb-income-metrics strong, .wb-goal > div > strong { overflow-wrap: anywhere; }
  .wb-summary b, .wb-income-metrics strong { font-variant-numeric: tabular-nums; }
  .wb-field { font-size: 12px; }
  .wb-field small, .wb-control-note, .wb-local-note, .wb-chart-caption,
  .wb-small, .wb-summary span, .wb-headline > p:not(.eyebrow) { font-size: 11px; }
  .wb-field small, .wb-control-note { color: #5b6c60; }
  .wb-chart-caption, .wb-small { color: #596c60; }
  .wb-chart-title { flex-wrap: wrap; }
  .wb-toggle button, .wb-toolbar select, .wb-toolbar button { min-height: 40px; }
  .wb-toggle button { font-size: 11px; }
  .wb-income-metrics > div > span { font-size: 11px; }
  .wb-comparison p:not(.eyebrow) { font-size: 13px; }
  .wb-comparison .wb-small { font-size: 11px !important; }

  @media (max-width: 1100px) {
    .why-values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
  }
  @media (max-width: 1000px) {
    .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .process-grid:not(.three-steps) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
    .service-card { padding: 28px; }
    .life-story > div { left: 22px; right: 22px; }
    .life-story h3 { font-size: 27px; }
    .wb-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wb-summary > div:last-child { grid-column: 1 / -1; }
  }
  @media (max-width: 900px) {
    .why-section-intro { grid-template-columns: 1fr; gap: 26px; }
    .why-section-intro > div:nth-child(2), .why-section-intro > p { padding-top: 0; }
    .why-people { grid-template-columns: 1fr; gap: 40px; }
    .why-people-photo { height: 480px; }
    .group-grid { grid-template-columns: 1fr; }
    .group-card .eyebrow { min-height: 0; }
    .wb-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .wb-chart-title { flex-direction: row; align-items: center; }
    .wb-comparison { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 760px) {
    .page-intro h1 { font-size: clamp(36px, 7.8vw, 54px); line-height: 1.12; }
    .page-intro { padding-block: 52px; }
    .life-hero { height: auto; min-height: 690px; }
    .life-hero-content { padding-block: 180px 55px; }
    .life-hero .hero-link { font-size: 11px; }
    .life-story h3 { font-size: clamp(31px, 7vw, 39px); }
    .life-story > div { left: 28px; right: 28px; }
    .life-story p { max-width: 300px; }
    .guide-cover { min-height: 220px; }
    .mini-total { font-size: clamp(36px, 8vw, 58px); }
    .mini-results .button { font-size: 11px; gap: 16px; }
    .audience-tabs [role="tab"] { font-size: 12px; min-height: 44px; }
    .why-people-photo { height: 430px; }
    .why-people { padding-top: var(--section-space); }
    .why-values-grid { grid-template-columns: 1fr; }
    .why-values-grid h3 br { display: none; }
    .why-hero-heading h1 { font-size: clamp(35px, 7.6vw, 49px); }
    .contact-form input:not([type="checkbox"]), .contact-form select,
    .contact-form textarea, .wb-toolbar select { font-size: 16px; }
    .wb-comparison { grid-template-columns: minmax(0, 1fr); }
    .wb-headline > strong { font-size: clamp(36px, 8.5vw, 55px); }
    .wb-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wb-summary > div:last-child { grid-column: 1 / -1; }
    .wb-income-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wb-income-metrics strong { font-size: clamp(23px, 5.5vw, 30px); }
    .wb-goal > div > strong { font-size: clamp(34px, 8vw, 49px); }
    .wb-chart { margin-inline: 0; }
  }
  @media (max-width: 600px) {
    .service-grid { grid-template-columns: minmax(0, 1fr); }
    .service-card { min-height: 250px; padding: 28px; }
    .service-card h3 { font-size: 29px; max-width: 330px; }
    .process-grid:not(.three-steps) { grid-template-columns: minmax(0, 1fr); gap: 30px; }
    .process-grid h3 { margin-block: 16px 12px; }
    .entry-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .entry-inner > p { max-width: none; font-size: 18px; }
    .entry-inner strong { font-size: 34px; }
    .entry-inner strong > span { font-size: 11px; }
    .why-section-intro h2, .why-people-copy h2, .why-international-copy h2 {
      font-size: clamp(34px, 8.5vw, 39px);
    }
    .closing h2 br, .life-intro h2 br, .why-hero-heading h1 br { display: none; }
    .form-status > a { display: block; }
    .wb-income-metrics { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .wb-income-metrics strong { font-size: 30px; }
  }
}
