/* One-screen desktop fit.
   Every desktop page should fit the window without scrolling, including short
   laptop windows (e.g. 1440 × 707 in Chrome on a 13" MacBook). Phones are
   unaffected. Loaded last. The script at the top of index.html scales the page
   to each screen and sets --fit; window-height units are divided by --fit so
   they still match the real window. */
:root{--fit:1}

@media (min-width:761px){
 /* The decorative world map behind every page must never extend the page. */
 body::before{max-height:calc(calc(100svh / var(--fit, 1)) - 48px)}
 /* The spam trap stays inside its form instead of stretching the page. */
 .lead-form{position:relative}
 .lead-trap{top:0}
 /* Home: the video area plus header and footer add up to exactly the window. */
 #landing.home{height:calc(calc(100svh / var(--fit, 1)) - 58px - var(--footer-height,45px))}
 /* FAQ: two columns, one answer open at a time; a long answer scrolls inside the list. */
 .prospect-faq .faq-list{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px;align-items:start;max-height:calc(calc(100svh / var(--fit, 1)) - 330px);overflow-y:auto;overscroll-behavior:contain;padding-right:4px}
 .prospect-faq .faq-list details{margin:0;padding:12px 16px}
 .prospect-faq .faq-list details p{margin:10px 0 2px}
}

/* The same "short window" adjustments the other stylesheets make below 800px tall,
   applied when the page is scaled up on a bigger screen (class set by the fit script). */
@media (min-width:761px){
 :where(html.fit-short) .us-final-review .us-top h1{font-size:23px}
 :where(html.fit-short) .us-final-review .us-top{margin-bottom:4px}
 :where(html.fit-short) .us-review-split{min-height:0}
 :where(html.fit-short) .us-review-split .us-combined{padding-top:8px}
 :where(html.fit-short) .us-review-split .us-combined-head h2{font-size:20px}
 :where(html.fit-short) .us-review-split .us-combined-total{padding:8px 0}
 :where(html.fit-short) .us-review-split .us-combined-total strong{font-size:32px}
 :where(html.fit-short) .us-review-split .us-summary-grid{padding:9px 0;gap:6px 16px;margin-bottom:9px}
 :where(html.fit-short) .us-review-split .us-review-details{margin-top:4px}
 :where(html.fit-short) .us-review-split .us-combined-bottom .us-actions{margin-top:8px}
 :where(html.fit-short) body:has(.us-final-review:not([hidden])) footer{padding:12px 0}
 :where(html.fit-short) .us-review-split .us-lead .lead-form{padding:18px 20px 16px}
 :where(html.fit-short) .us-review-split .us-lead .lead-intro{margin-bottom:8px}
 :where(html.fit-short) .us-review-split .us-lead .lead-fields label{margin:6px 0}
 :where(html.fit-short) .us-review-split .us-lead .lead-fields input{padding:10px 12px}
 :where(html.fit-short) .us-review-split .us-lead .lead-actions{margin-top:12px}
 :where(html.fit-short) .gd-choice{min-height:84px;padding:13px;gap:7px}
 :where(html.fit-short) .gd-map{height:240px}
 :where(html.fit-short) .gd-head{margin-bottom:12px}
 :where(html.fit-short) .gd-panel h2{font-size:21px!important}
 :where(html.fit-short) .gd-info{padding:12px 15px}
 :where(html.fit-short) .gd-info p{font-size:10px}
 :where(html.fit-short) .gd-actions{margin-top:12px}
 :where(html.fit-short) .gd-price{padding:18px}
 :where(html.fit-short) .gd-price li{padding:5px 0}
 :where(html.fit-short) .gd-mobility .gd-head{margin-bottom:20px}
 :where(html.fit-short) .gd-mobility .gd-grid{min-height:430px}
 :where(html.fit-short) .gd-mobility .gd-grid>aside{min-height:420px}
 :where(html.fit-short) .gd-mobility .gd-ring{width:78px;height:78px}
 :where(html.fit-short) .gd-mobility .gd-finding{margin:8px 0}
 :where(html.fit-short) .gd-mobility .gd-report p{font-size:11px}
 :where(html.fit-short) .gd-mobility .gd-map{top:45px}
 :where(html.fit-short) .mr-block{margin:7px 0}
 :where(html.fit-short) .mr-block p{font-size:10px!important}
 :where(html.fit-short) .gd-mobility .gd-grid,:where(html.fit-short) .gd-mobility .gd-grid>aside{min-height:470px}
 :where(html.fit-short) .mr-profile{margin-bottom:7px}
 :where(html.fit-short) .gd-mobility .gd-report p{line-height:1.5}
 :where(html.fit-short) .mr-budget{margin-top:8px}
 :where(html.fit-short) .mr-access{margin-top:12px}
 :where(html.fit-short) .mr-final .gd-grid{height:calc(calc(100svh / var(--fit, 1)) - 235px);min-height:0}
 :where(html.fit-short) .mr-final .mr-report-header{padding:15px 18px 0}
 :where(html.fit-short) .mr-final .mr-report-header h2{font-size:25px!important}
 :where(html.fit-short) .mr-final .mr-report-header p{margin:6px 0 10px;font-size:16px}
 :where(html.fit-short) .mr-final .mr-report-header .gd-tabs{padding-bottom:12px}
 :where(html.fit-short) .mr-final .gd-ring{height:86px;width:86px}
 :where(html.fit-short) .mr-final .gd-gauges{gap:12px}
 :where(html.fit-short) .mr-final .mr-access{margin-top:15px}
 :where(html.fit-short) .mr-final .gd-info .gd-data-note{font-size:10px!important}
 :where(html.fit-short) .gd-mobility .gd-choice{min-height:88px;padding:12px;gap:6px}
 :where(html.fit-short) .gd-mobility .gd-hint{margin-bottom:12px}
 :where(html.fit-short) .gd-mobility .gd-map[data-view="840"]{height:245px}
 :where(html.fit-short) .gd-mobility-intro .gd-map{min-height:350px}
 :where(html.fit-short) .gd-mobility-intro .gd-panel h2{font-size:26px!important;margin:12px 0}
 :where(html.fit-short) .gd-mobility-intro .gd-benefits{margin:16px 0 20px}
 :where(html.fit-short) .gd-mobility-intro .gd-benefits li{padding-top:10px;padding-bottom:10px}
 :where(html.fit-short) .gd-mobility-intro .gd-benefits li::before{top:19px}
}

/* Compact spacing on every desktop screen (it is the layout that gets scaled). */
@media (min-width:761px){
 /* Shared page frame: header 58px + footer ~45px leave the rest for content. */
 body:not(.is-home) .inner{margin-top:12px}
 body:not(.is-home) main.inner{margin-bottom:0}
 body:not(.is-home) main.inner.global-demo{margin-bottom:0!important}
 .gd-mobility:not(.mr-final) .gd-grid{min-height:0}

 /* ---- The American Market ---- */
 .us-config .us-top{margin-bottom:10px}
 .us-config .us-top h1{font-size:24px}
 .us-config .us-map svg,.us-setup-layout .us-map svg{max-height:165px}
 .us-config .us-map-caption{margin-bottom:8px}
 .us-config .us-price{padding:14px 18px}
 .us-config .us-total{font-size:34px;margin:4px 0}
 .us-config .us-price .fine{margin:3px 0}
 .us-config .us-question h2{font-size:22px;margin:6px 0 4px}
 .us-config .us-question .hint{margin-bottom:12px}
 .us-config .us-options{gap:8px}
 .us-config .us-options .us-option{padding:13px 18px;min-height:0}
 .us-config .us-options .num::after{margin-top:6px}
 .us-config .us-actions{margin-top:14px}
 .us-config .us-form-fields .field{margin:6px 0}
 .us-config .us-form-fields input{padding:9px 12px}
 .us-config .us-form-fields textarea{padding:9px 12px;height:64px;min-height:0}
 .us-config .us-intro{margin:8px 0}
 .us-config .us-inclusions{margin:12px 0;gap:6px}
 .us-config .us-inclusions li{min-height:84px;padding:11px 12px;gap:6px}
 .us-config .us-notice{margin-top:12px;line-height:1.6}
 .us-config .us-faq-toggle{margin-top:10px;padding:11px 18px}
 .us-setup-layout{row-gap:8px}
 .us-setup-layout .us-question .hint{margin-bottom:8px}
 .us-setup-layout .us-service-options{gap:5px}
 .us-setup-layout .us-service-options .us-option{min-height:46px;padding:6px 14px;gap:1px}
 .us-setup-layout .us-notice{line-height:1.5}
 .us-setup-layout .us-state-grid button{padding:9px 5px}
 .us-setup-layout .us-price .us-estimate-notes li+li{margin-top:2px}
 .us-setup-layout .us-price .us-estimate-notes{margin:4px 0 0;line-height:1.45}

 /* ---- Offshore, residency and pricing (shared layout) ---- */
 .global-demo .gd-head{margin-bottom:8px}
 .global-demo .gd-head h1{font-size:24px}
 .global-demo:not(.gd-mobility) .gd-map,.global-demo:not(.gd-mobility) .gd-map[data-view]{height:170px}
 .global-demo .gd-country{margin-top:8px}
 .global-demo .gd-map-sub{margin-bottom:8px}
 .global-demo .gd-info{padding:10px 14px}
 .global-demo .gd-info h3{margin:4px 0 6px}
 .global-demo .gd-info .row{padding:6px 0}
 .global-demo .gd-panel h2{margin:8px 0 6px}
 .global-demo .gd-hint{margin-bottom:12px}
 .global-demo .gd-choices{gap:8px}
 .global-demo .gd-choice{min-height:0;padding:11px 13px}
 .global-demo .gd-choices:has(>:nth-child(5)){grid-template-columns:repeat(3,minmax(0,1fr))}
 .global-demo .gd-benefits{margin:12px 0}
 .global-demo .gd-benefits li{padding:7px 0}
 .global-demo .gd-note{margin:8px 0}
 .global-demo details{margin-top:8px;padding-top:11px;padding-bottom:11px}

 /* Residency questions */
 .gd-mobility .gd-head{margin-bottom:10px}
 .gd-mobility:not(.mr-final) .gd-panel h2{font-size:22px;line-height:1.25}
 .gd-mobility:not(.mr-final) .gd-hint{font-size:13px;line-height:1.45;margin-bottom:8px}
 .gd-mobility .gd-choice{padding:8px 11px}
 .gd-mobility .mr-budget{margin-top:6px;gap:6px 10px}
 .gd-mobility .mr-budget label{font-size:12px}
 .gd-mobility .mr-budget input,.gd-mobility .mr-budget select{padding:8px 10px}
 .gd-mobility .mr-budget small{font-size:10px}
 .gd-mobility .gd-actions{margin-top:10px}
 .gd-mobility:not(.mr-final) .gd-map,.gd-mobility:not(.mr-final) .gd-map[data-view]{height:260px}

 /* Pricing */
 .global-demo .gd-prices{gap:14px}
 .global-demo .gd-price{padding:14px 16px}
 .global-demo .gd-price h2{margin:8px 0;font-size:15px!important}
 .global-demo .gd-price .amount{margin:4px 0;font-size:24px}
 .global-demo .gd-price p{margin:6px 0}
 .global-demo .gd-price ul{margin:8px 0}
 .global-demo .gd-price li{padding:4px 0}
 .global-demo>.gd-hint{margin-bottom:10px}

 .prospect-faq .content-label{margin-top:10px}
 .prospect-faq h1{margin:8px 0 6px}
 .prospect-faq .faq-intro{margin:6px 0}
 .prospect-faq .fine{margin:6px 0 12px}

 /* ---- Consultation request form ---- */
 .lead-form{padding:18px 20px 16px}
 .lead-intro{margin-bottom:8px}
 .lead-fields label{margin:6px 0}
 .lead-fields input{padding:10px 12px}
 .lead-check{margin-top:8px}
 .lead-actions{margin-top:12px}
}

/* Short windows (720px or less, after scaling): a second, tighter step.
   The class is set by the fit script in index.html. */
@media (min-width:761px){ html.fit-tight .us-config .us-question h2{font-size:20px}
 html.fit-tight .us-config .us-map svg,html.fit-tight .us-setup-layout .us-map svg{max-height:140px}
 html.fit-tight .us-config .us-price{padding:12px 16px}
 html.fit-tight .us-config .us-total{font-size:30px}
 html.fit-tight .us-setup-layout .us-service-options .us-option{min-height:42px;padding:5px 14px}
 html.fit-tight .us-setup-layout .us-service-options .option-sub{line-height:1.4}
 html.fit-tight .us-setup-layout .us-state-grid button{padding:7px 5px}
 html.fit-tight .global-demo .gd-head{margin-bottom:6px}
 html.fit-tight .global-demo .gd-head h1{font-size:22px}
 html.fit-tight .global-demo:not(.gd-mobility) .gd-map,html.fit-tight .global-demo:not(.gd-mobility) .gd-map[data-view]{height:150px}
 html.fit-tight .global-demo .gd-info .row{padding:4px 0}
 html.fit-tight .global-demo .gd-choice{padding:9px 12px}
 html.fit-tight .gd-mobility:not(.mr-final) .gd-map,html.fit-tight .gd-mobility:not(.mr-final) .gd-map[data-view]{height:230px}
 html.fit-tight .gd-mobility .mr-budget small{display:none}
 html.fit-tight .global-demo .gd-price{padding:12px 14px}
 html.fit-tight .global-demo .gd-price .n{font-size:15px}
 html.fit-tight .global-demo .gd-price h2{margin:6px 0}
 html.fit-tight .global-demo .gd-price li{padding:3px 0}
 html.fit-tight .global-demo .gd-price p{margin:4px 0}
 html.fit-tight .lead-form{padding:14px 18px 12px}
 html.fit-tight .lead-title{font-size:19px}
 html.fit-tight .lead-fields input{padding:8px 12px}
 html.fit-tight .lead-check,html.fit-tight .lead-notice{margin-top:6px}
 html.fit-tight .lead-actions{margin-top:10px}
}
