/* Text and grid children must be able to shrink when a desktop window narrows. */
body main :is(h1,h2,h3,h4,p,li,label) { overflow-wrap:anywhere; }
body main :is(h1,h2,h3,h4) { hyphens:auto; }
body main :is([class*="__grid"],[class$="-grid"],.ks-split,.kw-values) > * { min-width:0; }
body main :is(.kn-button,.kw-button,.ka-button,.ko-button,.ks-button,.kp-button,.kc-button) {
    max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:center;
}
body .ko-map-field,body .ko-map-picker__copy { min-width:0; }
body .ko-map-picker {
    grid-template-columns:48px minmax(0,1fr) 22px;
    min-width:0;max-width:100%;white-space:normal;
}
body .ko-map-picker__copy :is(strong,small) { white-space:normal;overflow-wrap:anywhere; }
@media(max-width:480px) {
    body .ko-map-picker { grid-template-columns:38px minmax(0,1fr) 16px;gap:10px;padding:13px 12px; }
    body .ko-map-picker__icon { width:38px;height:38px; }
}

/* Desktop profiles must remain scrollable even on short laptop screens. */
.ka-dialog__close:is(:hover,:focus-visible){background:#125428;color:#fff}
/* A transformed dialog traps its fixed mobile close button in the scrolling panel. */
.ka-dialog[open]{animation:kajoni-profile-fade .2s ease both}
@keyframes kajoni-profile-fade{from{opacity:0}to{opacity:1}}
@media(min-width:768px){
    .ka-dialog{max-height:calc(100dvh - 48px)}
    .ka-dialog__grid{height:min(720px,calc(100dvh - 48px));min-height:0}
    .ka-dialog__media{min-height:0}
    .ka-dialog__copy{min-height:0;overflow-y:auto;overscroll-behavior:contain}
}
/* Compact, fluid laptop layout. Large monitors and phone layouts retain their sizing. */
@media(min-width:1025px) and (max-width:1599px){
    body{
        --kj-laptop-shell:calc(40vw + 540px);
        --kj-laptop-space:clamp(72px,6vw,96px);
        --kj-laptop-gap:clamp(32px,3.5vw,56px);
        --kj-laptop-title:clamp(44px,4vw,64px);
        --kj-laptop-heading:clamp(34px,3.05vw,49px);
    }
    body :is(.kn-shell,.kw-shell,.ka-shell,.ko-shell,.kp-shell,.kpm-shell,.kjr-shell,.kc-shell,.kpo-shell){width:min(var(--kj-laptop-shell),calc(100% - 64px))!important}
    body .ks-main:not(.ks-theme-overview) .ks-shell{width:min(var(--kj-laptop-shell),calc(100% - 64px))}
    body main :is(.kn-section,.kw-section,.ka-section,.ko-section,.kp-intro,.kp-technology,.kp-final-cta,.kp-evaluation,.kp-fair,.kp-process,.kp-form-section,.kc-contact,.kc-paths,.kc-form-section,.kjr-section,.kpm-content,.kpm-updates,.kp-detail-overview,.kp-detail-gallery,.kp-detail-measures,.kp-detail-partners,.kp-detail-milestones,.kp-detail-local-value,.kp-detail-participation,.kp-detail-decommissioning,.kp-detail-cta){padding-block:var(--kj-laptop-space)!important}
    body .ks-main .ks-section:not(.ks-hero):not(.ks-overview){padding-block:clamp(70px,5.4vw,88px)}
    body .kp-directory>.kp-shell{padding-block:var(--kj-laptop-space)!important}
    body main :is(.kn-hero,.kw-hero,.ka-hero,.ko-hero,.kp-hero,.kc-hero,.kjr-hero,.ks-hero,.kp-detail-hero,.kpm-hero){min-height:clamp(580px,48vw,710px)!important}
    body main :is(.ks-hero,.ka-hero){padding-top:clamp(138px,11vw,176px);padding-bottom:64px}
    body main :is(.kp-hero__inner,.kc-hero__inner,.kp-detail-hero__inner,.kpm-hero__inner){padding-top:clamp(138px,11vw,176px)!important;padding-bottom:64px!important}
    body main :is(.kn-hero,.kw-hero,.ka-hero,.ko-hero,.kp-hero,.kc-hero,.kjr-hero,.ks-hero,.kp-detail-hero,.kpm-hero) h1{font-size:var(--kj-laptop-title)!important;line-height:1.12!important}
    body main :is(.kn-hero,.ka-hero) h1{font-size:clamp(40px,3.4vw,54px)!important}
    body .ka-hero__grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
    body main :is(.kn-heading,.kw-heading,.ka-heading,.ko-heading,.kp-heading,.kp-section-heading,.kc-heading,.kjr-heading,.kp-detail-copy) h2,
    body main :is(.ka-cta,.ko-cta,.kw-cta,.kp-final-cta,.kp-detail-cta,.kn-owner-copy) h2{font-size:var(--kj-laptop-heading)!important;line-height:1.16!important}
    body .ks-main:not(.ks-theme-overview) h2{font-size:clamp(32px,2.75vw,43px)}
    body main :is(.ks-lead,.ko-hero__lead,.ka-hero__copy>p:not(.ka-eyebrow),.kp-hero__copy>p:not(.kp-eyebrow),.kc-hero__inner>p:not(.kc-eyebrow)){font-size:clamp(16px,1.25vw,18px)!important}
    body main :is(.ks-card,.ks-card-body,.ks-value,.ks-steps,.ks-section-heading,.ks-split,.ka-heading,.ko-heading,.kw-heading,.kp-section-heading,.kc-heading) p:not([class*="eyebrow"]):not([class*="note"]):not([class*="label"]){font-size:15px;line-height:1.75}
    body main :is(.ks-card,.ks-card-body,.ks-value,.ks-steps,.kw-card,.kp-project-card) h3{font-size:20px}
    body main :is(.kn-service-card,.kn-project-slider,.ka-values__grid article,.ko-model-card,.kp-tech-grid article) h3{font-size:clamp(23px,2vw,29px)!important}
    body main :is(.ks-split,.ka-intro__grid,.ka-hero__grid,.ko-hero__inner,.kp-intro__grid,.kp-final-cta__inner,.kw-intro__grid,.kw-cta__grid,.kc-contact__grid,.kp-detail-overview__grid){gap:var(--kj-laptop-gap)!important}
    body main :is(.ks-card,.ks-card-body,.ks-value,.ka-values__grid article,.kp-tech-grid article,.kc-contact-card){padding:clamp(24px,2.1vw,32px)}
    body .ks-main .ks-intro-image{height:clamp(400px,35vw,520px)}
    body .ks-main .ks-cta-image{height:clamp(520px,42vw,650px)}
    body .ks-main .ks-steps li{padding:24px;gap:22px}
    body .ka-hero__portraits{height:clamp(400px,34vw,510px)}
    body .ka-hero__portrait--top{width:clamp(165px,14vw,210px);height:clamp(185px,15.6vw,235px)}
    body .ka-hero__portrait--bottom{width:clamp(175px,14.8vw,222px);height:clamp(195px,16.3vw,245px)}
    body :is(.ka-team-grid,.kn-services-grid,.kp-project-grid,.ks-audience-grid){gap:22px}
    body .ka-person__copy{padding:20px 21px 22px}
    body .ka-person__copy strong{font-size:20px}
    body .ka-facts article{padding:24px;min-height:190px}
    body .kn-service-card{min-height:460px}
    body .kn-service-card__body{padding:28px 30px 32px}
    body .kn-project-slider{height:460px;min-height:460px}
    body .kn-owner-card{height:260px;min-height:260px;padding:36px}
    body .kn-footer{padding-top:64px}
    body .ka-dialog{width:min(860px,calc(100% - 48px))}
    body .ka-dialog__grid{height:min(650px,calc(100dvh - 48px))}
    body .ka-dialog__copy{padding:64px 36px 36px}
    body .ka-dialog__copy h2{font-size:36px}
}
