/* Keep page width stable when the lead form locks body scrolling. */
html { scrollbar-gutter:stable; }

/* Shared form: preserve the desktop reference, compact only constrained viewports. */
.lead-modal .sheet { transform:translateY(48px); transition:transform .38s var(--ease); }
.lead-modal.open .sheet { transform:none; }
@media(max-width:1000px), (orientation:landscape) and (max-height:800px) {
 .lead-modal { padding:12px; }
 .lead-modal .sheet { display:block; width:min(680px,100%); max-height:calc(100dvh - 24px); overflow-y:auto; }
 .lead-modal .sheet .sheet-art { display:block; height:56px; min-height:0; }
 .lead-modal .sheet .sheet-body { max-height:none; overflow:visible; padding:20px 20px 12px; }
 .lead-modal .sheet #leadTitle { font-size:40px; line-height:1.05; margin:0 24px 8px 0; }
 .lead-modal .sheet #contactFields { display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:12px; margin:0 0 8px; }
 .lead-modal .sheet #contactFields .f { min-width:0; margin:0; }
 .lead-modal .sheet #contactFields input { width:100%; min-width:0; min-height:44px; font-size:16px; padding:8px 0; }
 .lead-modal .sheet .lead-branch-label { margin:8px 0; }
 .lead-modal .sheet .lead-branch-label > label { font-size:11px; margin-bottom:0; }
 .lead-modal .sheet .lead-branch-control { min-height:44px; padding:6px 12px; }
 .lead-modal .sheet #leadBranchValue { font-size:15px; line-height:1.2; }
 .lead-modal .sheet #chips { margin:0 0 8px; padding:0; }
 .lead-modal .sheet .direction-legend { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:44px; margin:0; gap:4px; }
 .lead-modal .sheet #directionTitle { font-size:15px; line-height:1.2; }
 .lead-modal .sheet #directionReset { min-height:44px; font-size:13px; }
 .lead-modal .sheet #chips .pick-row,
 .lead-modal .sheet #chips.has .pick-row { display:flex; flex-wrap:nowrap; justify-content:space-between; gap:0; padding:4px 0; margin:0; width:100%; overflow:visible; }
 .lead-modal .sheet #chips .pk { flex:0 0 44px; width:44px; height:44px; }
 .lead-modal .sheet #chips .pk label { display:flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; width:44px; height:44px; padding:0; }
 .lead-modal .sheet #chips .pk .choice-icon { width:40px; height:40px; flex:0 0 40px; outline-offset:2px; }
 .lead-modal .sheet #chips .pk label[data-ico] .choice-icon img { width:44px; height:44px; object-fit:contain; }
 .lead-modal .sheet #chips .pk input:checked+label .choice-icon { transform:scale(1.04); outline-offset:2px; }
 .lead-modal .sheet #leadForm .send { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(0,1fr); width:100%; margin:0; padding:0; gap:8px; }
 .lead-modal .sheet #leadForm .action-pane { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:50px minmax(44px,auto); min-width:0; gap:4px; }
 .lead-modal .sheet #leadForm .action-pane > .btn { grid-row:1; grid-column:1; width:100%; height:50px; min-height:50px; padding:6px 6px 6px 10px; gap:4px; font-size:clamp(11px,3.1vw,14px); }
 .lead-modal .sheet #leadForm .action-pane > .btn i { position:static; width:32px; height:32px; min-width:32px; flex:0 0 32px; transform:none; margin:0; }
 .lead-modal .sheet #leadForm .action-pane > .btn i svg { width:18px; height:18px; }
 .lead-modal .sheet #leadForm .lead-consent,
 .lead-modal .sheet #leadForm .lead-address { grid-row:2; grid-column:1; position:static; width:auto; margin:0; font-size:11px; line-height:14px; }
 .lead-modal .sheet #leadForm .lead-consent a,
 .lead-modal .sheet #leadForm .lead-address a { display:flex; align-items:center; min-height:44px; font-size:11px; line-height:14px; }
 .lead-modal .sheet .form-status:empty { display:none; }

}
@media(max-width:700px), (max-height:500px) and (pointer:coarse) {
 .lead-modal { align-items:end; padding:0; }
 .lead-modal .sheet { width:min(680px,calc(100% - 24px)); margin-bottom:calc(12px + env(safe-area-inset-bottom)); max-height:calc(100dvh - 24px - env(safe-area-inset-bottom)); border-radius:var(--tz-panel-radius); transform:translateY(calc(100% + 24px)); }
 .lead-modal.open .sheet { transform:none; }
 .lead-modal .sheet .sheet-body { padding:18px 16px 10px; }
}
@media(orientation:landscape) and (max-height:800px) {
 .lead-modal .sheet .sheet-art { display:none; }
 .lead-modal .sheet #leadTitle { font-size:32px; }
 .lead-modal .sheet .sheet-body { padding-top:16px; }
}
@media(prefers-reduced-motion:reduce) { .lead-modal .sheet { transition:none; } }
/* Keep both destinations together as the page narrows. */
@media(max-width:1000px) {
 .home-page .city-lines { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
}
@media(max-width:700px) {
 .home-page .city-line,.home-page .city-line+.city-line,.home-page .city-line:hover,.home-page .city-line:focus-visible,.home-page .city-line+.city-line:hover,.home-page .city-line+.city-line:focus-visible { display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; position:relative; padding:16px 12px 44px; gap:12px; min-height:210px; }
 .home-page .city-line .city-info { width:100%; min-width:0; }
 .home-page .city-line h3,.home-page .city-line:hover h3,.home-page .city-line:focus-visible h3 { font-size:clamp(23px,6vw,38px); }
 .home-page .city-line .city-overline { font-size:10px; line-height:1.3; letter-spacing:.03em; }
 .home-page .city-line p { font-size:12px; line-height:1.35; }
 .home-page .city-line .city-number { font-size:11px; }
 .home-page .city-line .city-arrow { position:absolute; bottom:12px; right:12px; width:28px; height:28px; min-width:28px; }
}
/* Compact branch supporting sections without removing their illustrations. */
body[data-city] .lesson-nudge { width:min(320px,calc(100% - 32px)); padding:20px; bottom:24px; }
body[data-city] .site-footer { padding-top:12px; padding-bottom:10px; row-gap:2px; }
body[data-city] .site-footer .footer-main { gap:16px; padding-bottom:8px; margin-bottom:2px; }
body[data-city] .site-footer .footer-brand { width:180px; }
body[data-city] .site-footer .footer-phone { font-size:19px; }
body[data-city] .site-footer .footer-email { font-size:12px; }
body[data-city] .site-footer .footer-details,
body[data-city] .site-footer .footer-bottom > span,
body[data-city] .site-footer .footer-bottom nav { font-size:11px; line-height:16px; gap:2px 12px; }
@media(max-width:1000px) {
 body[data-city] #env,body[data-city] #join { padding-top:36px; padding-bottom:32px; gap:20px; }
 body[data-city] #env .poster { position:relative; top:0; width:min(100%,280px); max-width:100%; justify-self:center; }
 body[data-city] #env .poster .tag { font-size:8px; padding:6px; left:6px; right:6px; bottom:6px; gap:4px; }
 body[data-city] #join .arch { width:min(100%,240px); justify-self:center; }
 body[data-city] .site-footer .footer-brand { width:130px; }
 body[data-city] .site-footer .footer-phone { font-size:18px; }
 body[data-city] .site-footer .footer-email { font-size:11px; }
 body[data-city] .site-footer .footer-details,
 body[data-city] .site-footer .footer-bottom > span,
 body[data-city] .site-footer .footer-bottom nav { font-size:10.5px; line-height:15px; }
}
@media(max-width:700px), (max-height:500px) and (pointer:coarse) {
}
@media(max-height:500px) and (min-width:701px) and (max-width:1000px) {
 body[data-city] #env,body[data-city] #join { grid-template-columns:minmax(0,1fr) 260px; gap:20px; padding-top:28px; padding-bottom:24px; }
 body[data-city] #env .poster { width:min(100%,260px); }
 body[data-city] #join .arch { width:min(100%,240px); }
}

/* Clear selection without enlarging or shifting the controls. */
.lead-modal .sheet #chips .pk input:checked+label .choice-icon { outline-width:3px; }
@media(max-width:1000px) {
 body[data-city] #env .kicker,body[data-city] #join .kicker { font-size:11px; margin-bottom:14px; }
 body[data-city] #env .h2,body[data-city] #join .h2 { margin-bottom:22px; }
 body[data-city] #env .path { padding-left:44px; }
 body[data-city] #env .path li { padding-bottom:22px; }
 body[data-city] #env .path li:last-child { padding-bottom:0; }
 body[data-city] #env .path li::before { left:-44px; }
 body[data-city] #env .path h3 { font-size:23px; margin-bottom:8px; }
 body[data-city] #env .path p,body[data-city] #join .lead { font-size:15px; line-height:1.4; }
 body[data-city] #join .lead { margin-bottom:24px; }
 body[data-city] #join > div:first-child { padding-bottom:0; }
 body[data-city] #join .addr { margin-top:28px; padding-top:20px; gap:16px; }
 body[data-city] #join .addr b { font-size:11px; }
 body[data-city] #join .addr span { font-size:15px; }
 body[data-city] #join .btn { min-height:50px; padding-top:6px; padding-bottom:6px; font-size:14px; }
 body[data-city] #join .btn i { width:38px; height:38px; }
}

/* One heading scale across branch sections. */
body[data-city] #dirs .h2,
body[data-city] #env .h2,
body[data-city] #how .h2,
body[data-city] #join .h2 { font-size:clamp(44px,6.6vw,108px); line-height:1.05; }
@media(max-width:1000px) {
 body[data-city] #env .path { padding-left:36px; }
 body[data-city] #env .path li::before { box-sizing:border-box; width:18px; height:18px; left:-33px; top:5px; }
 body[data-city] #env .path li.on::before { box-shadow:0 0 0 4px var(--ink),0 0 0 6px var(--bord); }
 body[data-city] #env .path h3 { font-size:20px; line-height:1.15; }
 body[data-city] #env .path p { font-size:14px; line-height:1.4; }
 body[data-city] #how .step::before { width:24px; height:24px; left:4px; top:4px; }
 body[data-city] #how .step::after { width:8px; height:8px; left:12px; top:12px; }
 body[data-city] #how .step.is-current::before { box-shadow:0 0 0 3px #9b3e4714; }
 body[data-city] #how .step .n { font-size:48px; margin-bottom:12px; }
 body[data-city] #how .step h3 { font-size:21px; margin-bottom:8px; }
 body[data-city] #how .step p { font-size:14px; line-height:1.4; }
}
@media(max-width:680px) {
 body[data-city] #how .step { padding-left:44px; }
 body[data-city] #how .step::before { top:10px; }
 body[data-city] #how .step::after { top:18px; }
}

/* Compact invitation on narrow viewports; no floating signup bar. */
@media(max-width:1000px) {
 body[data-city] .lesson-nudge { right:12px; bottom:calc(12px + env(safe-area-inset-bottom)); width:min(300px,calc(100% - 24px)); max-height:calc(100dvh - 24px); overflow:auto; padding:16px; }
 body[data-city] .lesson-nudge h2 { font-size:21px; margin:0 28px 8px 0; }
 body[data-city] .lesson-nudge p { font-size:14px; line-height:1.35; margin-bottom:12px; }
 body[data-city] .lesson-nudge .btn { font-size:13px; padding:6px 6px 6px 14px; gap:12px; }
 body[data-city] .lesson-nudge .btn i { width:30px; height:30px; }
}

/* Landscape phones need a shallow header even above the desktop width breakpoint. */
@media(orientation:landscape) and (max-height:650px) {
 body.home-page, body[data-city][data-city] { --header-height:54px; }
 body.home-page .home-header, body[data-city] #top {
  display:flex; align-items:center; justify-content:space-between; flex-wrap:nowrap;
  height:54px; min-height:54px; padding:0 clamp(12px,3vw,36px); gap:12px;
 }
 body.home-page .home-brand, body[data-city] #top .brand {
  width:180px; min-width:180px; max-width:180px; margin:0; flex:0 0 auto;
  transform:translateY(1.43px);
 }
 body[data-city] #top .header-identity { position:relative; display:flex; width:auto; height:auto; flex:1 1 auto; align-items:center; gap:16px; }
 body[data-city] #top .branch-current {
  position:static; display:flex; flex-direction:column; align-items:flex-start;
  width:auto; max-width:none; min-height:0; padding:0 0 0 12px; margin:0;
  border-left:1px solid #9b3e4740; font-size:12px; line-height:1.2; gap:2px;
 }
 body[data-city] #top .branch-current-address { font-size:11px; line-height:1.2; }
 body[data-city] #top .top-right, body.home-page .header-actions { display:flex; align-items:center; gap:8px; flex:0 0 auto; }
 body[data-city] #top .top-right > .btn,
 body.home-page .home-header .header-cta {
  height:40px; min-height:40px; width:156px; min-width:156px;
  padding:4px 38px 4px 12px; font-size:12px!important; line-height:1.2; gap:8px;
 }
 body[data-city] #top .header-enrol i, body[data-city] #top .header-enrol:hover i {
  position:absolute; top:50%; right:5px; width:30px; height:30px; flex-basis:30px; transform:translateY(-50%);
 }
 body[data-city] #top .header-enrol i svg { width:16px; height:16px; }
 body[data-city] #top .header-call { width:40px; height:40px; flex-basis:40px; }
 body[data-city] #top .header-call svg { width:20px; height:20px; }
 body.home-page .home-header .branch-btn { height:36px; min-height:36px; font-size:12px; }
 body[data-city][data-city] .hero { padding-top:calc(var(--header-height) + 24px); }
}
@media(orientation:landscape) and (max-height:650px) and (max-width:760px) {
 body.home-page .home-brand, body[data-city] #top .brand { width:144px; min-width:144px; max-width:144px; }
 body[data-city] #top .header-identity { gap:10px; }
}

/* Quieter signup actions on phones/tablets and short landscape screens. */
@media(max-width:1000px), (orientation:landscape) and (max-height:650px) {
 body[data-city] main .btn.openForm,
 body[data-city] #join .btn.openForm { height:44px; min-height:44px; padding:6px 6px 6px 18px; font-size:13px; gap:12px; }
 body[data-city] main .btn.openForm i,
 body[data-city] #join .btn.openForm i { width:32px; height:32px; }
 body[data-city] main .btn.openForm i svg { width:16px; height:16px; }
 body[data-city] .lesson-nudge .btn { min-height:44px; }
 .lead-modal .sheet #leadForm .action-pane { grid-template-rows:44px minmax(44px,auto); }
 .lead-modal .sheet #leadForm .action-pane > .btn { height:44px; min-height:44px; font-size:12px; }
}

/* Compact form supporting copy and outlines in either phone orientation. */
@media(max-width:1100px), (max-height:650px), (pointer:coarse) {
 .lead-modal .sheet #chips .pk .choice-icon { outline-width:1px; }
 .lead-modal .sheet #chips .pk input:checked+label .choice-icon { outline-width:2px; }
 .lead-modal .sheet.has-wrapped-address .lead-reassurance .reassurance-break { display:block; }
}

@media(min-width:500px) {
 .lead-modal .sheet.has-wrapped-address .lead-reassurance .reassurance-break { display:none; }
 .lead-modal .sheet .lead-reassurance > span { white-space:nowrap; }
}

@media(min-width:1101px) and (min-height:651px) {
}

/* Give the greeting breathing room after removing the extra introductory line. */
.lead-modal .sheet #leadForm #leadTitle { margin-top:20px; }
@media(max-height:800px) and (orientation:landscape) {
 .lead-modal .sheet .sheet-art { display:none; }
 .lead-modal .sheet #leadForm #leadTitle { margin-top:14px; }
}


/* Below 500px keep the 500px form composition; JS scales the complete panel. */
@media(max-width:499px) {
 .lead-modal .sheet.has-wrapped-address .lead-reassurance .reassurance-break { display:none; }
 .lead-modal .sheet .lead-reassurance > span { white-space:nowrap; }
}

@media(max-height:500px) {
 .lead-modal .sheet .sheet-art { display:none; }
 .lead-modal .sheet { border-radius:var(--tz-panel-radius); }
 .lead-modal .sheet, .lead-modal .sheet * { animation:none!important; transition:none!important; }
}

[data-scaled-phone] .lead-modal .sheet #leadForm .action-pane { grid-template-rows:calc(48px * var(--touch-ui-factor)) minmax(44px,auto); }
[data-scaled-phone] .lead-modal .sheet #leadForm .action-pane > .btn { height:calc(48px * var(--touch-ui-factor)); min-height:calc(48px * var(--touch-ui-factor)); font-size:calc(12px * var(--touch-ui-factor)); }
[data-scaled-phone] .lead-modal .sheet .lead-close { width:calc(44px * var(--touch-ui-factor)); height:calc(44px * var(--touch-ui-factor)); }

[data-scaled-phone] .lesson-nudge .btn { min-height:calc(48px * var(--touch-ui-factor)); font-size:calc(12px * var(--touch-ui-factor)); }

/* Keep home header actions finger-sized at the compensated phone scale. */
[data-scaled-phone] body.home-page { --header-height:calc(60px * var(--touch-ui-factor)); }
[data-scaled-phone] body.home-page .home-header .header-cta { height:calc(48px * var(--touch-ui-factor)); min-height:calc(48px * var(--touch-ui-factor)); font-size:calc(12px * var(--touch-ui-factor))!important; }
[data-scaled-phone] body.home-page .home-header .branch-btn { height:calc(48px * var(--touch-ui-factor)); min-height:calc(48px * var(--touch-ui-factor)); font-size:calc(12px * var(--touch-ui-factor)); }

/* Keep text at a readable device size when the phone viewport is scaled. */
[data-scaled-phone] .lead-modal .sheet #contactFields { grid-template-columns:minmax(0,1fr); gap:8px; }
[data-scaled-phone] .lead-modal .sheet #contactFields input { min-height:calc(48px * var(--touch-ui-factor)); font-size:calc(16px * var(--touch-ui-factor)); line-height:1.4; }
[data-scaled-phone] body.home-page .home-header .branch-btn { min-width:calc(48px * var(--touch-ui-factor)); }

@media(pointer:coarse) {
 body.home-page button { -webkit-appearance:none; appearance:none; -webkit-text-size-adjust:100%; text-size-adjust:100%; }
 body.home-page .home-header .header-cta { display:grid; grid-template-columns:minmax(0,1fr) 28px; align-items:center; gap:6px; padding:6px; line-height:1.2; }
 body.home-page .home-header .header-cta > span { display:block; min-width:0; white-space:nowrap; text-align:center; padding-top:1px; }
 body.home-page .home-header .header-cta > svg.header-cta-icon { position:static; width:28px; height:28px; margin:0; transform:none; }
 body.home-page .home-header .branch-btn { display:grid; grid-template-columns:minmax(0,1fr) 8px; align-items:center; padding:6px; gap:4px; line-height:1.2; }
 body.home-page .home-header .branch-btn > span { display:block; text-align:center; padding-top:1px; }
 body.home-page .home-header .branch-btn > svg { position:static; margin:0; }
}
[data-scaled-phone] body.home-page { --narrow-logo:calc(90px * var(--touch-ui-factor)); --narrow-gutter:calc(20px * var(--touch-ui-factor)); }
[data-scaled-phone] body.home-page .home-header .header-cta { width:calc(138px * var(--touch-ui-factor)); min-width:calc(138px * var(--touch-ui-factor)); grid-template-columns:minmax(0,1fr) calc(28px * var(--touch-ui-factor)); font-size:calc(11px * var(--touch-ui-factor))!important; }
[data-scaled-phone] body.home-page .home-header .header-cta > svg.header-cta-icon { width:calc(28px * var(--touch-ui-factor)); height:calc(28px * var(--touch-ui-factor)); }

/* Home: one school chooser and a quiet reading area. */
body.home-page .page-pattern { opacity:.16; mask-image:linear-gradient(to bottom,#000 0%,#000 60%,transparent 100%); }
body.home-page .intro-copy h1 { margin-bottom:20px; }
body.home-page .intro-description { max-width:32em; margin:0; font-size:clamp(18px,1.6vw,24px); line-height:1.5; }
body.home-page .intro-panel { padding-bottom:28px; }
body.home-page .choice-heading h2 { max-width:34em; font-size:clamp(19px,1.6vw,24px); line-height:1.4; font-weight:400; }
body.home-page .home-header .home-branch .branch-btn { width:180px; min-width:180px; height:54px; min-height:54px; font-size:15px; white-space:nowrap; }
@media(max-width:1000px) {
 body.home-page .home-header .home-branch .branch-btn { width:170px; min-width:170px; height:48px; min-height:48px; font-size:14px; }
 body.home-page .intro-panel { padding-bottom:20px; }
}
[data-scaled-phone] body.home-page .home-header .home-branch .branch-btn { width:calc(154px * var(--touch-ui-factor)); min-width:calc(154px * var(--touch-ui-factor)); height:calc(48px * var(--touch-ui-factor)); min-height:calc(48px * var(--touch-ui-factor)); font-size:calc(13px * var(--touch-ui-factor)); }
[data-scaled-phone] body.home-page .intro-description { font-size:calc(17px * var(--touch-ui-factor)); }

body.home-page .intro-copy { background:var(--cream); box-shadow:0 0 28px 24px var(--cream); }
body.home-page .page-pattern .nd { transition:transform 1.8s cubic-bezier(.45,0,.55,1); }
@media(prefers-reduced-motion:reduce) { body.home-page .page-pattern .nd { transition:none; } }

body.home-page .intro-copy #home-title { white-space:nowrap; font-size:clamp(28px,5.4vw,64px); }

/* Compact home copy and balanced phone navigation. */
body.home-page .home-gateway { gap:8px; }
body.home-page .home-gateway .intro-panel { padding-bottom:0; }
body.home-page .intro-description,
body.home-page .choice-heading h2 { font-size:clamp(16px,1.25vw,19px); line-height:1.4; }
body.home-page .choice-heading { margin-bottom:16px; }
@media(max-width:700px) {
 body.home-page .city-line,
 body.home-page .city-line+.city-line,
 body.home-page .city-line:hover,
 body.home-page .city-line:focus-visible,
 body.home-page .city-line+.city-line:hover,
 body.home-page .city-line+.city-line:focus-visible { min-height:160px; padding:14px 12px 40px; gap:8px; }
}
[data-scaled-phone] body.home-page { --narrow-logo:calc(128px * var(--touch-ui-factor)); }
[data-scaled-phone] body.home-page .home-header .home-branch .branch-btn { width:calc(118px * var(--touch-ui-factor)); min-width:calc(118px * var(--touch-ui-factor)); height:calc(44px * var(--touch-ui-factor)); min-height:calc(44px * var(--touch-ui-factor)); font-size:calc(11px * var(--touch-ui-factor)); background:transparent; border-color:#d8c7b8; }
[data-scaled-phone] body.home-page .intro-description,
[data-scaled-phone] body.home-page .choice-heading h2 { font-size:calc(13px * var(--touch-ui-factor)); line-height:1.4; }

@media(max-width:700px) { body.home-page .intro-copy #home-title { font-size:clamp(28px,8.4vw,42px); } }

/* A quiet two-line home footer; proprietor details have their own page. */
body:is(.home-page,[data-city]) > .home-footer { display:flex; flex-direction:column; align-items:flex-start; gap:2px; padding-top:14px; padding-bottom:14px; color:#756258; }
body:is(.home-page,[data-city]) .home-footer .footer-tagline { margin:0; font-size:14px; line-height:1.4; }
body:is(.home-page,[data-city]) .home-footer .footer-meta { display:flex; flex-wrap:wrap; align-items:center; gap:4px 16px; font-size:11px; line-height:1.5; }
body:is(.home-page,[data-city]) .home-footer .footer-meta nav { display:flex; flex-wrap:wrap; gap:4px 14px; }
body:is(.home-page,[data-city]) .home-footer .footer-meta a { display:inline-flex; align-items:center; min-height:24px; text-underline-offset:3px; }
body:is(.home-page,[data-city]) .home-footer .footer-meta a:hover { color:var(--bord); text-decoration:underline; }
[data-scaled-phone] body:is(.home-page,[data-city]) .home-footer .footer-tagline { font-size:calc(13px * var(--touch-ui-factor)); }
[data-scaled-phone] body:is(.home-page,[data-city]) .home-footer .footer-meta { font-size:calc(10px * var(--touch-ui-factor)); gap:4px 12px; }

/* The main page and Troitsk share the same compact footer and gutters. */
body:is(.home-page,[data-city]) > .home-footer { padding-left:max(clamp(24px,5vw,72px),calc((100% - var(--home-content,1440px))/2)); padding-right:max(clamp(24px,5vw,72px),calc((100% - var(--home-content,1440px))/2)); }
@media(max-width:1000px) { body:is(.home-page,[data-city]) > .home-footer { padding-left:24px; padding-right:24px; } }

/* Shared form fields, CTA colors and compact confirmation. */
.lead-modal .sheet #leadForm .send { grid-template-columns:repeat(2,minmax(0,1fr)); }
.lead-modal { --form-scale:1; }
[data-scaled-phone] .lead-modal { --form-scale:var(--touch-ui-factor); }
.lead-modal .sheet #contactFields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 24px; }
.lead-modal .sheet #contactFields #fPhone { grid-column:1/-1; }
.lead-modal .sheet #contactFields input { color:var(--ink); padding:14px 0 3px; line-height:1.35; }
.lead-modal .sheet #contactFields input::placeholder { color:#998d83; opacity:1; }
.lead-modal .sheet #directionTitle,.lead-modal .sheet #directionReset { font-size:15px; }
.lead-modal .sheet .lead-submit { --cta-bg:var(--accent); --cta-text:var(--accent-on); --cta-circle-bg:var(--accent-on); --cta-icon-color:var(--accent); --cta-hover:var(--accent); --cta-transition:none; }
.lead-modal .sheet .lead-call { --cta-bg:#e7ded4; --cta-text:var(--ink); --cta-circle-bg:var(--cream); --cta-icon-color:var(--ink); --cta-hover:#ddd1c5; width:100%!important; }
.lead-modal .sheet .action-pane { grid-template-rows:56px minmax(42px,auto); }
.lead-modal.is-success { align-items:center!important; justify-content:center; }
.lead-modal.is-success .sheet { width:min(560px,100%)!important; margin:0!important; transform:none!important; transition:none!important; animation:none!important; }
.lead-modal.is-success .sheet .sheet-body { padding:60px 40px 40px; }
.lead-modal.is-success .sheet #doneText { font-size:48px; line-height:1.04; margin:0 0 20px; }
.lead-modal.is-success .sheet #doneText em { background:none; padding:0; color:var(--bord); font-style:normal; }
.lead-modal.is-success .sheet .success-followup { font-size:17px; line-height:1.45; margin:0 0 28px; }
.lead-modal .success-confirm { background:var(--bord); color:var(--cream); border:0; border-radius:999px; padding:0 28px; height:48px; font:400 15px var(--brand-font); cursor:pointer; }
.lead-modal .success-confirm:focus-visible { outline:2px solid var(--ink); outline-offset:4px; }
.lead-modal.is-success .sheet .lead-close,.lead-modal.is-success .sheet .lead-close:hover { background:transparent; border:0; border-radius:0; color:var(--ink); width:44px; height:44px; }
@media(max-width:1000px) {
 .lead-modal { padding:calc(12px * var(--form-scale)); }
 .lead-modal .sheet { margin-bottom:0; max-height:calc(100dvh - 24px * var(--form-scale) - env(safe-area-inset-bottom)); }
 .lead-modal .sheet .sheet-art { display:none!important; }
 .lead-modal .sheet .sheet-body { padding:calc(38px * var(--form-scale)) calc(12px * var(--form-scale)) calc(16px * var(--form-scale)); max-height:none; overflow:visible; }
 .lead-modal .sheet #leadForm #leadTitle { margin-top:0; }
 .lead-modal .sheet #contactFields { grid-template-columns:minmax(0,1fr); gap:8px; }
 .lead-modal .sheet #contactFields input { font-size:calc(16px * var(--form-scale)); min-height:calc(44px * var(--form-scale)); padding:calc(14px * var(--form-scale)) 0 calc(3px * var(--form-scale)); }
 .lead-modal .sheet #directionTitle,.lead-modal .sheet #directionReset { font-size:calc(14px * var(--form-scale)); }
 .lead-modal .sheet #chips .pick-row { gap:0; justify-content:space-between; }
 .lead-modal .sheet #chips .pk,.lead-modal .sheet #chips .pk label,.lead-modal .sheet #chips .pk .choice-icon {
  width:calc(44px * var(--form-scale)); height:calc(44px * var(--form-scale)); min-width:0; min-height:0; flex:0 0 calc(44px * var(--form-scale)); padding:0;
 }
 .lead-modal .sheet #chips .pk label[data-ico] .choice-icon img { width:100%; height:100%; }
 .lead-modal .sheet #leadForm .send { grid-template-columns:minmax(0,1fr); gap:8px; }
 .lead-modal .sheet #leadForm .action-pane { grid-template-rows:calc(48px * var(--form-scale)) auto; gap:4px; }
 .lead-modal .sheet #leadForm .action-pane > .tz-cta { --cta-height:48px; --cta-circle:34px; --cta-inset:7px; --cta-leading:18px; --cta-gap:10px; --cta-font:14px; --cta-min-width:0px; --cta-arrow:20px; }
 .lead-modal .sheet #leadForm .lead-consent,.lead-modal .sheet #leadForm .lead-address,.lead-modal .sheet #leadForm .lead-consent a,.lead-modal .sheet #leadForm .lead-address a { font-size:calc(12px * var(--form-scale)); line-height:1.4; min-height:calc(28px * var(--form-scale)); }
 .lead-modal .sheet #leadForm .lead-reassurance > span { white-space:normal; }
 .lead-modal .sheet .lead-close,.lead-modal .sheet .lead-close:hover { background:transparent; border:0; border-radius:0; color:var(--ink); width:calc(44px * var(--form-scale)); height:calc(44px * var(--form-scale)); top:0; right:0; }
 .lead-modal .sheet .lead-close svg { width:calc(18px * var(--form-scale)); height:calc(18px * var(--form-scale)); }
 .lead-modal.is-success .sheet { width:min(calc(400px * var(--form-scale)),100%)!important; }
 .lead-modal.is-success .sheet .sheet-body { padding:calc(52px * var(--form-scale)) calc(20px * var(--form-scale)) calc(24px * var(--form-scale)); }
 .lead-modal.is-success .sheet #doneText { font-size:calc(32px * var(--form-scale)); line-height:1.04; margin-bottom:calc(16px * var(--form-scale)); }
 .lead-modal.is-success .sheet .success-followup { font-size:calc(15px * var(--form-scale)); margin-bottom:calc(24px * var(--form-scale)); }
 .lead-modal.is-success .success-confirm { height:calc(44px * var(--form-scale)); width:100%; font-size:calc(14px * var(--form-scale)); }
 .lead-modal.is-success .sheet .lead-close { width:calc(44px * var(--form-scale)); height:calc(44px * var(--form-scale)); }
}

@media(max-width:1000px) {
 .lead-modal:not(.is-success) .sheet { width:100%!important; }
 .lead-modal { top:var(--form-viewport-top,0px); bottom:auto; height:var(--form-viewport-height,100dvh); }
 .lead-modal .sheet { max-height:calc(var(--form-viewport-height,100dvh) - 24px * var(--form-scale) - env(safe-area-inset-bottom)); }
}

@media(max-width:1000px) {
 .lead-modal .sheet #chips .pk .choice-icon { outline-offset:-1px; }
 .lead-modal .sheet #chips .pk input:checked+label .choice-icon { outline-offset:-2px; transform:none; }
}

/* Compact desktop composition and readable native input values. */
@media(min-width:1001px) {
 .lead-modal:not(.is-success) .sheet { width:min(980px,100%); grid-template-columns:264px minmax(0,1fr); }
 .lead-modal:not(.is-success) .sheet .sheet-body { padding:96px 35px 31px; }
 .lead-modal .sheet #leadTitle { font-size:60px; margin-bottom:10px; }
 .lead-modal .sheet #contactFields { gap:14px 21px; margin-bottom:24px; }
 .lead-modal .sheet #directionTitle,.lead-modal .sheet #directionReset { font-size:16px; }
 .lead-modal .sheet #chips .choice-icon { width:53px; height:53px; flex-basis:53px; }
 .lead-modal .sheet #chips .choice-icon img { width:53px; height:53px; }
 .lead-modal .sheet #leadForm .action-pane { grid-template-rows:50px minmax(36px,auto); gap:10px; }
 .lead-modal .sheet #leadForm .action-pane > .tz-cta { --cta-height:50px; --cta-circle:36px; --cta-inset:7px; --cta-leading:20px; --cta-gap:10px; --cta-font:15px; --cta-min-width:0px; --cta-arrow:20px; }
}
.lead-modal .sheet #contactFields input {
 color:var(--ink); -webkit-text-fill-color:var(--ink); caret-color:var(--ink);
}
.lead-modal .sheet #contactFields input::placeholder { color:#998d83; -webkit-text-fill-color:#998d83; opacity:1; }
.lead-modal .sheet #contactFields input:autofill,
.lead-modal .sheet #contactFields input:-webkit-autofill {
 color:var(--ink)!important; -webkit-text-fill-color:var(--ink)!important; caret-color:var(--ink);
 box-shadow:inset 0 0 0 1000px var(--cream); -webkit-box-shadow:inset 0 0 0 1000px var(--cream);
}
@media(max-width:1000px) {
 .lead-modal .sheet #contactFields input { font-size:calc(16px * var(--form-scale))!important; }
 .lead-modal .sheet #leadForm .send { gap:calc(11px * var(--form-scale)); }
 .lead-modal .sheet #leadForm .action-pane { display:contents; }
 .lead-modal .sheet #leadForm .send .lead-submit { grid-row:1; grid-column:1; }
 .lead-modal .sheet #leadForm .send .lead-call { grid-row:2; grid-column:1; }
 .lead-modal .sheet #leadForm .send .lead-consent { grid-row:3; grid-column:1; }
 .lead-modal .sheet #leadForm .send .lead-address { grid-row:4; grid-column:1; margin:0; }
}

/* Compact, centered mobile form footer and a naturally wrapping confirmation title. */
.lead-modal .lead-address-short { display:none; }
.lead-modal.is-success .sheet { width:min(640px,100%)!important; }
.lead-modal.is-success .sheet .sheet-body { padding-top:70px; }
.lead-modal.is-success .sheet #doneText {
 display:flex; flex-wrap:wrap; align-items:baseline; gap:.14em .18em; line-height:1.1;
}
.lead-modal.is-success .sheet #doneText em {
 display:inline-block; white-space:nowrap; background:var(--bord); color:var(--cream);
 padding:0 .1em .06em; line-height:1.1;
}
.lead-modal.is-success .sheet .success-followup { font-size:16px; }
@media(max-width:1000px) {
 .lead-modal:not(.is-success) .sheet .sheet-body {
  padding-bottom:calc(16px * var(--form-scale)); min-height:0; height:auto;
 }
 .lead-modal .sheet #leadForm .send { gap:0; padding-bottom:0; margin-bottom:0; }
 .lead-modal .sheet #leadForm .send .lead-call { margin-top:calc(11px * var(--form-scale))!important; }
 .lead-modal .sheet #leadForm .send .lead-consent,
 .lead-modal .sheet #leadForm .send .lead-address {
  display:block; height:auto; min-height:0; padding:0; margin:0; text-align:center; color:#786c62;
  font-size:calc(12px * var(--form-scale)); line-height:1.4;
 }
 .lead-modal .sheet #leadForm .send .lead-consent { margin-top:calc(12px * var(--form-scale)); }
 .lead-modal .sheet #leadForm .send .lead-address { margin-top:calc(5px * var(--form-scale)); }
 .lead-modal .sheet #leadForm .send :is(.lead-consent,.lead-address) a {
  display:block; width:100%; min-height:0; height:auto; margin:0; padding:0;
  text-align:center; color:#786c62; font-size:calc(12px * var(--form-scale)); line-height:1.4;
 }
 .lead-modal .sheet #leadForm .send .lead-consent a { text-decoration:underline; }
 .lead-modal .sheet #leadForm .send .lead-address a { text-decoration:none; }
 .lead-modal .sheet #leadForm .send .lead-reassurance svg,
 .lead-modal .sheet #leadForm .send .reassurance-break,
 .lead-modal .sheet #leadForm .lead-address-full { display:none; }
 .lead-modal .sheet #leadForm .lead-address-short { display:inline; }
 .lead-modal.is-success .sheet { width:min(calc(400px * var(--form-scale)),100%)!important; }
 .lead-modal.is-success .sheet .sheet-body { padding-top:calc(62px * var(--form-scale)); }
 .lead-modal.is-success .sheet .success-followup { font-size:calc(14px * var(--form-scale)); }
}

/* Freeze only the background while the modal owns all scrolling. */
html.lead-scroll-locked { overscroll-behavior:none; }
html.lead-scroll-locked .lead-page-frame {
 height:var(--lead-frame-height)!important; min-height:var(--lead-frame-height)!important; max-height:var(--lead-frame-height)!important;
}
/* visualViewport is the modal's frame; its outer shell never scrolls. */
.lead-modal.viewport-managed {
 position:fixed; inset:auto; top:var(--form-viewport-top,0px); left:var(--form-viewport-left,0px);
 width:var(--form-viewport-width,100%); height:var(--form-viewport-height,100svh);
 overflow:hidden; overscroll-behavior:none;
 padding-top:max(calc(12px * var(--form-scale)),env(safe-area-inset-top));
 padding-bottom:max(calc(12px * var(--form-scale)),env(safe-area-inset-bottom));
}
.lead-modal.viewport-managed .sheet {
 max-height:100%; min-height:0; margin:0; overflow:hidden; grid-template-rows:minmax(0,1fr);
}
.lead-modal.viewport-managed .sheet .sheet-body {
 min-height:0; max-height:100%; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain;
 -webkit-overflow-scrolling:touch; overflow-anchor:none;
 scroll-padding-top:calc(52px * var(--form-scale)); scroll-padding-bottom:calc(12px * var(--form-scale));
}
.lead-modal.viewport-managed .sheet .lead-close { z-index:20; }
@media(max-width:1000px) {
 .lead-modal.viewport-managed .sheet { display:flex; flex-direction:column; }
 .lead-modal.viewport-managed .sheet .sheet-body { flex:0 1 auto; max-height:none; }
}
