/* One reading hierarchy across Home, Mortgages, Partners and their dialogs.
   The desktop Home canvas is zoomed. Divide its text tokens by that scale so
   body copy has the same rendered size as the unscaled journey pages. */
:root { --text-body:16px; --text-title:18px; --text-section:clamp(32px,2.5vw,36px); --text-ui:14px; --text-note:12px; --type-scale:1; }
@media (min-width:1055px) { .stage { --type-scale:calc(100vw / 1055px); } }
/* Keep the long, approved Home proposition inside its text column at the
   coordinate layout breakpoint. The instrument geometry remains unchanged. */
@media (min-width:1055px) {
  .stage .hero-copy { width:245px; }
  .stage .hero-copy h1 {
    width:100%; max-width:245px; white-space:normal;
  }
  html:not([dir=rtl]) .stage .hero-copy h1 { font-size:37px; }
  html[dir=rtl] .stage .hero-copy h1 { font-size:32px; }
}
body { font-size:var(--text-body); }
.hero-support, [dir=rtl] .hero-support,
.route-card .card-description, [dir=rtl] .route-card .card-description,
.approach-copy p, [dir=rtl] .approach-copy p,
.step-copy, [dir=rtl] .step-copy {
  font-size:calc(var(--text-body) / var(--type-scale));
  line-height:1.65; letter-spacing:0;
}
.hero-intro, .need-summary, .need-content p, .process-grid p,
.future-copy li, .question > p, .role-row p, .benefit-row p,
.company-signpost, .limits p, .contact-band > div > p:not(.eyebrow),
.editorial-copy, .future-copy .lead, .section-intro > p:not(.eyebrow) { font-size:var(--text-body); line-height:1.7; }
[dir=rtl] :is(.hero-support,.hero-intro,.card-description,.approach-copy p,.step-copy,
.need-summary,.need-content p,.process-grid p,.future-copy li,.question > p,.role-row p,.benefit-row p,.editorial-copy) { line-height:1.85; letter-spacing:0; }
.small-note, .boundary, .topic-label, .breadcrumb, .hero-figure figcaption,
.site-footer p, .contact-address,
.contact-action .small-note { font-size:var(--text-note) !important; line-height:1.65; }
.action, [dir=rtl] .action, .text-link, .language,
.site-nav, .site-footer nav { font-size:var(--text-ui); letter-spacing:0; }
.action > span:first-child { font-size:inherit; line-height:1.4; }
.action { min-height:44px; white-space:normal; }
.need-content h3, .process-grid h3, .role-row h3, .benefit-row h3,
[dir=rtl] .role-row h3, [dir=rtl] .benefit-row h3, .question summary {
  font-family:var(--sans); font-size:var(--text-title); font-weight:600; line-height:1.5; letter-spacing:0;
}
[dir=rtl] :is(.need-content h3,.process-grid h3,.role-row h3,.benefit-row h3,.question summary) { font-family:Arabic,Arial,sans-serif; line-height:1.65; }
.section-intro h2, .support-section > h2, .contact-band h2,
[dir=rtl] .section-intro h2, [dir=rtl] .support-section > h2, [dir=rtl] .contact-band h2 { font-size:var(--text-section); }
.eyebrow, .brand-note { font-size:var(--text-note); letter-spacing:.08em; }
[dir=rtl] .eyebrow, [dir=rtl] .brand-note { letter-spacing:0; }
.footer-legal, [dir=rtl] .footer-legal {
  display:block;
  font-size:calc(var(--text-note) / var(--type-scale));
  line-height:1.5;
  letter-spacing:0;
}
.site-header { flex-wrap:wrap; gap:16px; }
.site-nav { flex-wrap:wrap; gap:16px; }
.brand { gap:16px; }
.brand-note { max-width:130px; }
.header-contact { min-width:0; max-width:180px; }
@media (min-width:1041px) and (max-width:1250px) { .brand-note { display:none; } }

/* Home reading content grows in document flow; seven bands and image order stay intact. */
html:not([data-text-reflow=true]) .stage { height:auto; }
html:not([data-text-reflow=true]) .band { position:relative; top:auto; }
html:not([data-text-reflow=true]) .card-rail { height:auto; display:grid; gap:13px; padding:13px 21px; grid-template-columns:repeat(5,minmax(0,1fr)); }
html:not([data-text-reflow=true]) .route-card,
html:not([data-text-reflow=true])[dir=rtl] .route-card {
  position:relative; inset:auto; width:auto; height:auto; min-width:0;
  display:flex; flex-direction:column; align-items:stretch; padding-bottom:32px;
}
html:not([data-text-reflow=true]) .route-card .photo-slot { position:relative; inset:auto; height:174px; flex:none; }
html:not([data-text-reflow=true]) .route-card .card-icon { position:relative; inset:auto; margin:12px 14px 0; flex:none; }
html:not([data-text-reflow=true]) .route-card .card-title { position:static; margin:12px 14px 0; font-size:calc(var(--text-title) / var(--type-scale)); line-height:1.45; letter-spacing:0; text-transform:none; }
html:not([data-text-reflow=true]) .route-card .card-description { position:static; margin:10px 14px 12px; }
html:not([data-text-reflow=true]) .approach { height:auto; min-height:301px; }
html:not([data-text-reflow=true]) .approach-copy { padding-bottom:28px; }
html:not([data-text-reflow=true]) .approach-copy .outline-button { position:static; margin-top:24px; width:100%; min-height:44px; height:auto; padding:10px 12px; }
html:not([data-text-reflow=true]) .approach-photo { height:100%; min-height:301px; }
html:not([data-text-reflow=true]) .approach-steps { height:auto; padding-bottom:16px; }
html:not([data-text-reflow=true]) .approach-step { padding-block:12px; }
.step-title, [dir=rtl] .step-title { font-size:calc(var(--text-title) / var(--type-scale)); line-height:1.45; letter-spacing:0; text-transform:none; }
.outline-button, [dir=rtl] .outline-button { font-size:calc(var(--text-ui) / var(--type-scale)); line-height:1.4; letter-spacing:.02em; }
.lender-outro, [dir=rtl] .lender-outro,
.lender-intro, [dir=rtl] .lender-intro,
.lender-slot, [dir=rtl] .lender-slot { font-size:calc(var(--text-note) / var(--type-scale)); line-height:1.5; letter-spacing:0; }
html:not([data-text-reflow=true]) .lender-band { height:auto; min-height:88px; }
.lender-outro, [dir=rtl] .lender-outro { padding:12px; }
.footer-nav, [dir=rtl] .footer-nav { font-size:calc(var(--text-ui) / var(--type-scale)); flex-wrap:wrap; gap:12px 20px; }
.footer-signoff, [dir=rtl] .footer-signoff,
.footer .brand-descriptor, [dir=rtl] .footer .brand-descriptor { font-size:calc(var(--text-note) / var(--type-scale)); letter-spacing:.02em; }
html:not([data-text-reflow=true]) .footer { height:auto; min-height:110px; }
html:not([data-text-reflow=true]) .cta-band { height:auto; min-height:112px; }
.cta-copy, [dir=rtl] .cta-copy { font-size:calc(20px / var(--type-scale)); line-height:1.5; padding-block:20px; }
html:not([data-text-reflow=true]) .cta-image { height:100%; }
html:not([data-text-reflow=true]) .cta-action { display:flex; align-items:center; justify-content:center; padding:16px; }
html:not([data-text-reflow=true]) .cta-action .outline-button { position:static; margin:0; min-height:44px; height:auto; padding:12px 16px; width:100%; }

@media (min-width:1055px) {
  html:not([data-text-reflow=true]) .stage .hero-copy { top:28px; }
  .hero-subtitle { margin-top:14px; }
  .hero-rule { margin-top:16px; }
  .hero-support { margin-top:16px; }
  .hero-scroll { font-size:calc(var(--text-note) / var(--type-scale)); bottom:18px; }
}
@media (min-width:681px) and (max-width:1054px) {
  html:not([data-text-reflow=true]) .card-rail { grid-template-columns:repeat(6,minmax(0,1fr)); padding:22px; gap:16px; }
  html:not([data-text-reflow=true]) .route-card { grid-column:span 2; }
  html:not([data-text-reflow=true]) .route-card:nth-of-type(n+4) { grid-column:span 3; }
  html:not([data-text-reflow=true]) .approach-photo { min-height:350px; }
}
@media (max-width:680px) {
  html:not([data-text-reflow=true]) .card-rail { grid-template-columns:1fr; padding:20px 22px; gap:14px; }
  html:not([data-text-reflow=true]) .route-card { grid-column:auto; }
  html:not([data-text-reflow=true]) .route-card .photo-slot { height:210px; }
  html:not([data-text-reflow=true]) .route-card .card-title { font-size:18px; margin-inline:18px; }
  html:not([data-text-reflow=true]) .route-card .card-description { margin-inline:18px; }
  html:not([data-text-reflow=true]) .stage .hero-copy { min-height:0; margin-bottom:30px; }
  html:not([data-text-reflow=true]) .approach-photo { height:290px; min-height:0; }
  html:not([data-text-reflow=true]) .cta-action { padding:0 19px 23px; }
  .hero-actions .action, [dir=rtl] .hero-actions .action { font-size:14px; }
}

/* Dialogs use the same reading scale, including the logo About panel. */
dialog p:not(.eyebrow), .about-copy > p:not(.eyebrow), dialog ul,
dialog .contact-options button, dialog dl > div { font-size:var(--text-body); line-height:1.7; }
dialog .preview-note, dialog .small-note, dialog .dialog-note { font-size:var(--text-note) !important; }
dialog .button, dialog .action, [dir=rtl] dialog .button, [dir=rtl] dialog .action { font-size:var(--text-ui); line-height:1.5; letter-spacing:0; }
[dir=rtl] dialog p:not(.eyebrow) { line-height:1.85; }
/* Keep controls readable without changing their destinations or interaction model. */
.primary-nav > a, .primary-nav > button,
[dir=rtl] .primary-nav > a, [dir=rtl] .primary-nav > button,
.header-action .outline-button, [dir=rtl] .header-action .outline-button,
.instrument-cta, [dir=rtl] .instrument-cta,
.header-language { font-size:calc(var(--text-ui) / var(--type-scale)); letter-spacing:0; }
.header-action .outline-button, [dir=rtl] .header-action .outline-button { line-height:1.3; min-height:44px; height:auto; padding-block:5px; }
.instrument-secondary, [dir=rtl] .instrument-secondary { font-size:calc(var(--text-note) / var(--type-scale)); letter-spacing:0; line-height:1.5; }
.header .brand-descriptor { font-size:calc(10px / var(--type-scale)); letter-spacing:.04em; }
@media (min-width:681px) and (max-width:1054px) {
  html:not([data-text-reflow=true]) .header { flex-wrap:wrap; padding-block:10px; }
  html:not([data-text-reflow=true]) .header-brand { margin-inline-end:auto; }
  html:not([data-text-reflow=true]) .primary-nav,
  html:not([data-text-reflow=true])[dir=rtl] .primary-nav { order:4; flex:1 1 100%; flex-wrap:wrap; justify-content:space-between; gap:4px 14px; margin:0; padding:0; }
}
/* Arabic font metrics must not inflate a decorative arrow into the copy above it. */
.card-arrow, [dir=rtl] .card-arrow { line-height:1; }
dialog .contact-address { font-size:var(--text-body) !important; }
/* Extra-wide letter spacing and doubled text may make one word wider than a phone card. */
html[data-text-reflow=true] .route-card .card-description { overflow-wrap:anywhere; }

/* Approved longer English copy must reserve room for the existing approach link.
   Only the text column determines extra height; the instrument geometry stays fixed. */
@media (min-width:1055px) {
  html:not([dir=rtl]):not([data-text-reflow=true]) .stage .hero { height:auto; min-height:482px; }
  html:not([dir=rtl]):not([data-text-reflow=true]) .stage .hero-copy {
    position:relative; top:0; padding-block:28px 78px;
  }
  html:not([dir=rtl]):not([data-text-reflow=true]) .stage .hero-photo { height:100%; }
}
/* The Arabic Home title takes one extra line at the base desktop width. */
@media (min-width:1055px) and (max-width:1375px) {
  html[dir=rtl]:not([data-text-reflow=true]) .stage .hero { height:clamp(482px, calc(825.75px - 25vw), 562px); }
  html[dir=rtl]:not([data-text-reflow=true]) .stage .hero-photo { height:100%; }
}
/* Keep long operational labels within their available space at enlarged text sizes. */
html[data-text-reflow=true] .route-card .card-title { overflow-wrap:anywhere; }
.hero-actions .action { min-width:0; max-width:100%; overflow-wrap:anywhere; }
.hero-actions .action > span:first-child { min-width:0; }

/* Content-led spacing: keep the architectural bands, without fixed empty
   space below short text. The circular instrument and its controls are untouched. */
html:not([data-text-reflow=true]) .approach-copy,
html:not([data-text-reflow=true])[dir=rtl] .approach-copy { min-height:0; padding-block:28px; }
.approach-copy h2, [dir=rtl] .approach-copy h2 {
  font-size:calc(var(--text-section) / var(--type-scale)); line-height:1.2;
}
[dir=rtl] .approach-copy h2 { line-height:1.5; }
.approach-copy p, [dir=rtl] .approach-copy p { margin-top:18px; }
html:not([data-text-reflow=true]) .approach-copy .outline-button { margin-top:18px; }
html:not([data-text-reflow=true]) .approach-step { grid-template-columns:30px minmax(0,1fr); }
/* The decorative square image must not impose its intrinsic height on this band. */
html:not([data-text-reflow=true]) .cta-image { contain:size; }
.section-grid { padding-block:52px; gap:48px; }
.section-intro > p:not(.eyebrow) { margin-block-start:18px; }
.support-section { padding-block:48px 32px; }
.process-grid { margin-block-start:28px; }
.process-grid h3 { margin-block:14px 10px; }
.role-row, .benefit-row { padding-block:20px; }
.role-row p, .benefit-row p { margin-block-start:10px; }
.contact-band { padding-block:44px; gap:56px; }
.site-footer { padding-block:28px; }
.about-copy { padding-block:44px 30px; }
.about-copy #about-copy p + p { margin-top:16px; }

/* Give the market-reference names and calculator labels enough presence to
   read at desktop and tablet sizes without changing the compact mobile dial. */
.lender-slot, [dir=rtl] .lender-slot {
  font-size:calc(var(--text-ui) / var(--type-scale));
  line-height:1.5;
  overflow-wrap:anywhere;
}
.lender-outro, [dir=rtl] .lender-outro {
  font-size:calc(11px / var(--type-scale));
  line-height:1.5;
}
@media (min-width:681px) {
  .instrument-control label, [dir=rtl] .instrument-control label {
    font-size:calc(11px / var(--type-scale));
    line-height:1.25;
  }
  .number-line > span, [dir=rtl] .number-line > span {
    font-size:calc(9px / var(--type-scale));
  }
}
@media (max-width:680px) {
  .lender-slot, [dir=rtl] .lender-slot { font-size:var(--text-ui); }
  .lender-outro, [dir=rtl] .lender-outro { font-size:11px; }
}

.route-card[data-card="lenders"] .photo-slot img {
  filter:sepia(.055) saturate(.94);
}
@media (min-width:701px) {
  .journey-hero, .hero-figure { min-height:520px; }
}
@media (max-width:700px) {
  .section-grid { padding-block:32px; }
  .section-grid > .section-intro { margin-block-end:24px; }
  .support-section { padding-block:32px 24px; }
  .contact-band { padding-block:32px; }
  .process-grid article, .process-grid article:first-child, .process-grid article:last-child { padding-block:18px; }
  .contact-action { margin-block-start:24px; }
  .about-copy { padding-block:20px 26px; }
  .about-logo { padding-block:24px 14px; }
}

/* Release fixes: preserve Home geometry while separating the journey text column. */
.footer .footer-legal { grid-column:1 / -1; margin:0; padding:8px 36px 20px; }
.footer .footer-brand { min-height:78px; }
@media (min-width:1055px) {
  body[data-page="partners"] .journey-hero h1 { max-width:none; width:auto; }
}
@media (max-width:680px) {
  html[dir=rtl] .stage .hero-copy h1 { font-size:clamp(38px,10vw,44px); line-height:1.4; }
  .footer .footer-legal { padding-inline:22px; }
}
.route-card:disabled, #assumptions-button:disabled { cursor:default; }
.error-page { min-height:100vh; display:grid; place-items:center; padding:24px; }
.error-page main { max-width:640px; }
.error-page h1 { font-size:clamp(32px,6vw,56px); }
.error-page p { font-size:18px; line-height:1.8; }
.error-page nav { display:flex; flex-wrap:wrap; gap:24px; margin-top:24px; }
/* Recover internal row padding at the narrowest size, without moving cell borders.
   Keep the full eight-digit value and the Arabic number/unit gap readable. */
@media (max-width:360px) {
  html:not([data-text-reflow=true]) .number-line { margin-inline:-3px; }
  .number-line > span { font-size:clamp(9px, calc(6.5px + (100vw - 320px) * .14), 10px); }
  [dir=rtl] .number-line > span { font-size:clamp(8.5px, calc(6.5px + (100vw - 320px) * .14), 10px); }
}
@media (min-width:681px) {
  .number-line > span, [dir=rtl] .number-line > span { font-size:calc(11px / var(--type-scale)); }
}
/* Narrow rows reach the shaded cell edge; use the existing number ink for units. */
.number-line > span { color:#3c362d; }

/* Approved retention summary, outside the scaled Home canvas; native disclosure. */
.privacy-retention {
  max-width:1440px; margin:0 auto; padding:16px 24px 24px;
  color:#3e4545; font-size:16px; line-height:1.7;
}
.privacy-retention > summary { cursor:pointer; min-height:44px; padding-block:10px; font-size:16px; font-weight:600; }
.privacy-retention-copy { max-width:78ch; }
.privacy-retention-copy p { margin:0 0 16px; font-size:16px; line-height:1.7; }
.privacy-retention a { text-decoration:underline; text-underline-offset:3px; overflow-wrap:anywhere; }
.privacy-retention a:focus-visible, .privacy-retention > summary:focus-visible { outline:2px solid currentColor; outline-offset:3px; }
[dir=rtl] .privacy-retention, [dir=rtl] .privacy-retention-copy p { line-height:1.85; }

.privacy-retention-copy h2 { font:inherit; font-size:18px; font-weight:600; margin:24px 0 10px; line-height:1.5; }
.privacy-entry { margin-top:16px; font-size:14px; line-height:1.7; }
.privacy-entry a { text-decoration:underline; text-underline-offset:3px; }
