/* Shared publication rules. Page components use the tokens in main.css. */
@import url('./media-components.css');
:root{--text-h3:1.3rem;--radius:4px;--content-card-padding:1.5rem;--content-section-gap:3.5rem;--video-width:800px;--model-height:460px}
:where(main,section,article,aside,figure,.wrap,.content-body,.content-update-grid>*,.form-layout>*){min-width:0}
main p,main li{overflow-wrap:break-word}
main :where(h1,h2,h3){text-wrap:balance}
.body-copy,.content-section>p{max-width:70ch}
.content-section :where(p,li),.detail-cards p,.content-update-cards p{font-size:1rem;line-height:1.65}
.content-section h2{font-size:clamp(1.8rem,2.7vw,2.55rem);line-height:1.15}
.content-section h3,.detail-cards h3,.content-update h3{font-size:var(--text-h3);line-height:1.3;letter-spacing:-.02em}
.detail-cards>article,.related-card{border-radius:var(--radius)}
.detail-cards>article{display:flex;flex-direction:column;align-items:start}
.content-aside{align-self:start}
.content-aside nav{max-height:calc(100dvh - var(--header-height) - 3rem);overflow:auto}
.nav-group:has(a[aria-current="page"])>details>summary{color:var(--color-blue);text-decoration:underline;text-underline-offset:.5em}
.button,.qc-hero__cta{min-height:48px;line-height:1.4;border-radius:var(--radius);white-space:normal;text-align:center}
.button:focus-visible,.qc-hero__cta:focus-visible,summary:focus-visible{outline:3px solid var(--color-focus);outline-offset:4px}
.process-video>.wrap{max-width:840px}.process-video__frame,.media-support,.story-video,.process-video video{width:100%;max-width:var(--video-width);margin-inline:auto}
.process-video__frame{aspect-ratio:16/9;border-radius:var(--radius)}
.process-video__frame iframe,.media-support video,.story-video video{width:100%;aspect-ratio:16/9;border:0;object-fit:contain}
.process-video__launch{min-height:100%;font-size:1rem}.process-video__launch span{max-width:90%;padding:.8rem 1rem}
.process-video__note,.video-summary{font-size:.9375rem;line-height:1.6}
figure>picture{display:block}figure>picture img{max-width:100%}
.eng-model-stage{position:relative;min-height:var(--model-height);border-radius:var(--radius);overflow:hidden}
.eng-model-stage model-viewer{height:var(--model-height);width:100%;background:var(--color-paper)}
.model-poster{width:100%;max-height:310px;object-fit:contain}
.model-progress{width:min(320px,85%);height:8px;accent-color:var(--color-blue);margin:1rem auto;display:block}
.model-controls{display:flex;flex-wrap:wrap;gap:1rem;align-items:center}
.form-panel input,.form-panel select,.form-panel textarea{scroll-margin-top:calc(var(--header-height) + 2rem)}
.contact-email{overflow-wrap:anywhere;display:inline-block;min-height:44px}
.enquiry-contact>.button{max-width:100%}
@media(max-width:950px){:root{--content-section-gap:2.75rem}.content-aside{display:none}.eng-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){:root{--model-height:320px;--content-section-gap:2.5rem}.eng-gallery{grid-template-columns:1fr}.eng-model-stage{padding:.75rem}.model-poster{max-height:215px}.process-video__launch span{font-size:.9rem}.content-section h2{font-size:1.85rem}.content-update-grid{gap:1.5rem}.content-section .button,.enquiry-contact>.button{width:100%}.table-scroll{max-width:100%;overscroll-behavior-inline:contain}}
@media(max-width:360px){:root{--page-gutter:1rem}.brand img{width:128px;height:32px}.brand span{font-size:.65rem}.header-inner{gap:.5rem}.qc-hero__copy h1{font-size:2.1rem}.qc-hero__intro{font-size:1rem}.steps{grid-template-columns:1fr}.form-panel{padding:1rem}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Final responsive review: use one measured grid and spacing rhythm. */
:root{--content-width:1200px;--section-space:clamp(3rem,5vw,4.5rem)}
.content-update-grid:not(:has(>figure)){grid-template-columns:minmax(0,1fr)}
.content-update-grid:not(:has(>figure)) .content-update-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:1.5rem}
.content-update-cards>article{padding:1.5rem;background:var(--color-paper);border-top:2px solid var(--color-line);border-radius:var(--radius)}
.content-update-cards>article>:last-child{margin-bottom:0}
.hero-promises .promise-strip b{display:block;color:#fff;font-size:1rem}
.hero-promises .promise-strip span{display:block;color:var(--color-dark-muted);font-size:.875rem}
.hero-promises .promise-strip{margin-top:0}
.detail-cards:has(>article:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}
.story-photo>picture,.project-card>picture,.kit-photo>picture{display:block;width:100%}
.story-photo>picture img,.project-card>picture img{width:100%;aspect-ratio:4/3;object-fit:cover;height:auto}
.material-figure>picture img{width:100%;height:auto;max-height:430px;object-fit:contain}
body .qc-hero__eyebrow{font-size:.875rem}
body .qc-hero h1{line-height:1.1}
.table-scroll:focus-visible{outline:3px solid var(--color-focus);outline-offset:4px}
.site-header .nav-wrap{min-width:0}
@media(max-width:950px){.content-update-grid:not(:has(>figure)) .content-update-cards{grid-template-columns:1fr}.detail-cards:has(>article:nth-child(3):last-child){grid-template-columns:1fr}.nav-wrap.is-open{max-height:calc(100dvh - var(--header-height));overflow-y:auto;overscroll-behavior:contain}}
@media(max-width:600px){body .qc-hero{padding-inline:var(--page-gutter)}body .qc-hero h1{font-size:clamp(2rem,8vw,2.4rem)}body .qc-hero__eyebrow{font-size:.8125rem}.content-update-cards>article{padding:1.25rem}.qc-hero__cta{max-width:100%}.eng-model-stage{min-height:320px}}

/* Navigation cleanup: one optional index and one visible primary CTA. */
.content-layout.content-layout--focused{grid-template-columns:minmax(0,1fr);max-width:960px;gap:0}
.page-contents{border-block:1px solid var(--color-line,#d4e0e5);padding:1rem 0;margin-block:1.5rem 2rem}
.page-contents summary{cursor:pointer;color:var(--color-blue,#0074ae);font-weight:600;min-height:44px;align-content:center}
.page-contents summary:focus-visible{outline:2px solid currentColor;outline-offset:4px}
.page-contents ol{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem 2rem;padding-left:1.5rem;margin-block:1rem .5rem}
.page-contents li{margin:0;padding-left:.25rem}
.page-contents a{display:inline-block;padding:.5rem 0;line-height:1.5}

@media(max-width:640px){.page-contents ol{grid-template-columns:1fr}}
@media print{.page-contents{display:none}}

/* RTA kit hero: wider assembly context instead of fixing detail. */
.qc-hero--rta-overview .qc-hero__picture img{object-position:50% 56%}
@media(max-width:600px){.qc-hero--rta-overview .qc-hero__picture img{object-position:48% 55%}}

/* Homepage project references: scoped to avoid changing other page cards. */
.project-showcase{scroll-margin-top:110px}.project-showcase__actions{margin:0 0 2.5rem;align-items:center}
.project-showcase__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2rem}
.project-showcase__case{background:#fff;border:1px solid var(--color-line);border-radius:8px;overflow:hidden;min-width:0}
.project-showcase__case picture{display:block;aspect-ratio:16/10}.project-showcase__case img{width:100%;height:100%;object-fit:cover}
.project-showcase__copy{padding:1.75rem}.project-showcase h3{font-size:clamp(1.4rem,2.2vw,1.8rem);line-height:1.2;margin:0 0 1rem}
.project-showcase p{max-width:70ch}.project-showcase dl{margin:1.5rem 0 0}.project-showcase dl>div{padding:.6rem 0;border-top:1px solid var(--color-line)}.project-showcase dt{font-weight:600}.project-showcase dd{margin:.3rem 0 0;color:var(--color-muted)}
.project-showcase__caption{font-size:.875rem;color:var(--color-muted);line-height:1.6}
.project-showcase__reference{display:grid;grid-template-columns:1fr 1.7fr 1fr;gap:2rem;align-items:center;padding:2rem 0;margin:2rem 0;border-block:1px solid var(--color-line)}
.project-model{display:grid;grid-template-columns:.8fr 1.2fr;gap:3rem;align-items:start;margin:3.5rem 0}.project-model__viewer{min-width:0}.project-model__stage{background:#eaf0f3;border:1px solid #c7d5dd;border-radius:8px;min-height:340px;overflow:hidden;display:grid;place-items:center}.project-model__placeholder{text-align:center;padding:2rem;display:grid;gap:1rem;justify-items:center}.project-model__placeholder strong{font-size:1.35rem}.project-model__placeholder p{margin:0}.project-model model-viewer{width:100%;height:380px;background:#eaf0f3}.project-model progress{width:100%;margin-top:1rem}.project-model__controls{display:flex;gap:1rem;flex-wrap:wrap;align-items:center}.project-model [role=status]{font-size:.875rem;margin:1rem 0}.project-model [hidden]{display:none!important}
.project-showcase__scope{border-top:1px solid var(--color-line);padding-top:2rem}.project-showcase__scope p{max-width:85ch}
@media(max-width:950px){.project-showcase__reference{grid-template-columns:1fr 1.5fr}.project-showcase__reference>a{grid-column:2}.project-model{grid-template-columns:1fr;gap:1.5rem}.project-model__viewer{width:100%;max-width:760px}.project-model__intro p{max-width:70ch}}
@media(max-width:640px){.project-showcase__grid,.project-showcase__reference{grid-template-columns:1fr;gap:1.5rem}.project-showcase__reference>a{grid-column:auto}.project-showcase__copy{padding:1.25rem}.project-model__stage{min-height:300px}.project-model model-viewer{height:300px}.project-showcase__actions{gap:1.25rem}}
@media(max-width:950px){.project-showcase .section-heading{display:block}.project-showcase .section-heading>p{margin-top:1.5rem;max-width:70ch}.project-showcase .section-heading h2{max-width:24ch}}
.project-showcase{scroll-margin-top:0}

@media(max-width:950px){.project-showcase .section-heading{display:block}.project-showcase .section-heading>p{margin-top:1.25rem}.project-showcase .section-heading h2{max-width:25ch}}

/* Inline project models: three columns, with automatic loading near the viewport. */
.model-gallery{margin-block:3.5rem}.model-gallery__intro{max-width:760px;margin-bottom:2rem}.model-gallery__intro h3{font-size:clamp(1.8rem,3vw,2.5rem)}
.model-gallery__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.5rem}
.model-card{min-width:0;overflow:hidden;background:#fff;border:1px solid var(--color-line,#d4e0e5);border-radius:8px}
.model-card__heading{padding:1.25rem 1.25rem 1rem}.model-card__heading h4{font-size:1.1rem;line-height:1.3;margin:0 0 .4rem}.model-card__heading p{font-size:.78rem;line-height:1.4;margin:0;color:var(--color-muted);overflow-wrap:anywhere}
.model-card__stage{position:relative;height:290px;background:#062447}.model-card model-viewer{display:block;width:100%;height:100%;background:#062447;--progress-bar-height:3px;--progress-bar-color:#4ac3ef}
.model-card__loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1rem;padding:1.5rem;color:#fff;text-align:center;font-size:.875rem;pointer-events:none}
.model-card__spinner{width:28px;height:28px;border:2px solid #7690aa;border-top-color:#fff;border-radius:50%;animation:model-spin 1s linear infinite}@keyframes model-spin{to{transform:rotate(360deg)}}
.model-card__controls{padding:1rem 1.25rem;display:flex;gap:.5rem 1rem;flex-wrap:wrap;align-items:center}.model-card__controls span{font-size:.75rem;color:var(--color-muted)}.model-card__controls button{font:inherit;font-size:.8rem;font-weight:600;color:#006b9f;background:transparent;border:0;text-decoration:underline;cursor:pointer;min-height:44px;padding:.25rem 0}.model-card__controls button:disabled{opacity:.45;cursor:default}.model-card__controls button:focus-visible{outline:2px solid #0074ae;outline-offset:4px}.model-card [hidden]{display:none!important}.model-card.is-error .model-card__spinner{display:none}
@media(max-width:950px){.model-gallery__grid{grid-template-columns:repeat(2,minmax(0,1fr))}.model-card__stage{height:280px}}
@media(max-width:640px){.model-gallery__grid{grid-template-columns:1fr;gap:1.5rem}.model-card__stage{height:300px}.model-gallery{margin-block:2.5rem}}
@media(prefers-reduced-motion:reduce){.model-card__spinner{animation:none}}

/* SIP technology final review: compact component detail, isolated from shared pages. */
body[data-page="sip-technology-explained"] .visit-media{max-width:320px}
body[data-page="sip-technology-explained"] .content-body{min-width:0}
body[data-page="sip-technology-explained"] .technical-review-table{max-width:100%;overscroll-behavior-inline:contain}

/* Verified SIP page fixes: equal panel cards and separated contact actions. */
body[data-page="sip-technology-explained"] #section-1 .detail-cards > article{grid-column:auto}
body[data-page="sip-technology-explained"] .enquiry-contact{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}

/* SIP technical media: source proportions preserve the visible details. */
body[data-page="sip-technology-explained"] .sip-media-split{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:2rem;align-items:start;margin-top:1.5rem}
body[data-page="sip-technology-explained"] .sip-media-split .body-copy{margin-top:0}
.sip-media{margin:0;min-width:0}.sip-media__zoom{display:block;position:relative;background:#edf1f2;border-radius:4px;overflow:hidden}.sip-media__zoom picture{display:block}.sip-media__zoom img{display:block;width:100%;height:auto;object-fit:contain}.sip-media__hint{position:absolute;right:.5rem;bottom:.5rem;padding:.35rem .65rem;background:#142f3a;color:white;font-size:.8125rem;line-height:1.4;border-radius:3px}.sip-media figcaption{margin-top:.75rem;font-size:.875rem;line-height:1.6;color:#50636c}.sip-media__zoom:focus-visible{outline:3px solid #c96109;outline-offset:4px}
.sip-media-pair{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr);gap:1.5rem;margin-top:2rem;align-items:start}.sip-media-pair .sip-media:nth-child(2){max-width:280px;justify-self:end}
.sip-process-film{margin:2rem auto 0;max-width:680px}.sip-process-film h3{font-size:1.3rem;margin-bottom:1rem}.sip-process-film__stage{aspect-ratio:16/9;background:#142f3a;border-radius:4px;overflow:hidden}.sip-process-film__load{position:relative;display:block;width:100%;height:100%;padding:0;border:0;cursor:pointer;background:#142f3a;color:white}.sip-process-film__load img{width:100%;height:100%;object-fit:contain;display:block}.sip-process-film__load span{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:.85rem 1rem;background:#142f3a;border:1px solid white;border-radius:3px;font-size:.95rem;white-space:nowrap}.sip-process-film video{display:block;width:100%;height:100%;object-fit:contain}.sip-process-film__load:focus-visible,.sip-process-film video:focus-visible{outline:3px solid #ffcb66;outline-offset:-4px}.sip-process-film figcaption,.sip-process-film__status{font-size:.875rem;line-height:1.6;margin:.75rem 0 0}
.sip-lightbox{width:min(1100px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:1rem;border:0;border-radius:6px;color:#172e39;background:#fff;overflow:auto}.sip-lightbox::backdrop{background:rgba(8,27,36,.88)}.sip-lightbox__bar{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.sip-lightbox__bar h2{font-size:1.15rem;margin:0}.sip-lightbox__close{min-height:44px;padding:.5rem 1rem;font:inherit;border:1px solid #50636c;border-radius:3px;background:#fff;color:#142f3a;cursor:pointer}.sip-lightbox__close:focus-visible{outline:3px solid #c96109;outline-offset:3px}.sip-lightbox__image{display:block;width:100%;height:auto;max-height:65dvh;object-fit:contain}.sip-lightbox__caption{font-size:.875rem;margin:1rem 0 0;line-height:1.5}
@media(max-width:640px){body[data-page="sip-technology-explained"] .sip-media-split,.sip-media-pair{grid-template-columns:1fr;gap:1.25rem}.sip-media-split .sip-media{max-width:460px}.sip-media-pair .sip-media:nth-child(2){max-width:280px;justify-self:center}.sip-lightbox__bar h2{font-size:1rem}}

body[data-page="sip-technology-explained"] .visit-media.sip-media{margin:2rem auto}

/* Sustainability media: retain full image proportions and the established page rhythm. */
body[data-page="sustainability-energy-efficiency"] .sustainability-media-row{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:2rem;align-items:start;margin-top:1.5rem}
body[data-page="sustainability-energy-efficiency"] .sustainability-media-row .body-copy:first-child{margin-top:0}
body[data-page="sustainability-energy-efficiency"] .sustainability-media-row--portrait{grid-template-columns:minmax(0,1fr) 260px}
body[data-page="sustainability-energy-efficiency"] .sustainability-photo--compact{max-width:360px;margin:2rem auto 0}
body[data-page="sustainability-energy-efficiency"] .content-body{min-width:0}
@media(max-width:640px){body[data-page="sustainability-energy-efficiency"] .sustainability-media-row{grid-template-columns:1fr;gap:1.25rem}body[data-page="sustainability-energy-efficiency"] .sustainability-media-row--portrait .sustainability-photo{max-width:260px;justify-self:center}}
body[data-page="sustainability-energy-efficiency"] #section-2 .detail-cards>article{grid-column:auto}

/* Technical content expansion, scoped to the Passive House page. */
body[data-page="passive-house"] .technical-context-photo{max-width:520px;margin:1.75rem auto 0}
body[data-page="passive-house"] #section-1 .detail-cards>article{grid-column:auto}
body[data-page="sip-technology-explained"] .content-section>h3,body[data-page="sustainability-energy-efficiency"] .content-section>h3,body[data-page="passive-house"] .content-section>h3{margin-top:2rem}

/* Four-page refinement: no effect outside the explicitly marked pages. */
.technical-refined{--content-section-gap:2rem}
.technical-refined .content-layout{padding-block:2rem}
.technical-refined .content-section{padding-bottom:2rem;margin-bottom:2rem}
.technical-refined .content-section>h2{margin-bottom:1.25rem}
.technical-refined .content-section .body-copy{margin-top:1.1rem}
.technical-refined .content-section> :last-child{margin-bottom:0}
.technical-refined .review-media-row{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:2rem;align-items:start;margin-top:1.25rem}
.technical-refined .review-media-row>div>p:first-child{margin-top:0}
.technical-refined .review-media-row .review-photo{margin:0;max-width:none}
.technical-refined .review-photo--portrait{max-width:260px;justify-self:end}
.technical-refined .sip-process-film{max-width:560px;margin:1.5rem 0}
.technical-refined .technical-next{margin-bottom:0}
.technical-refined .page-contents{margin-top:0;margin-bottom:1.75rem}
.technical-refined[data-page="faqs"] .content-section{padding-bottom:1.25rem;margin-bottom:1.5rem}
.technical-refined[data-page="faqs"] .technical-faq{padding-block:.65rem}
.technical-refined[data-page="faqs"] .faq-search{padding-block:1.5rem}
@media(max-width:640px){.technical-refined .review-media-row{grid-template-columns:1fr;gap:1rem}.technical-refined .content-section{padding-bottom:1.5rem;margin-bottom:1.5rem}.technical-refined .review-photo--portrait{justify-self:center}.technical-refined .content-layout{padding-block:1.5rem}}

.technical-refined[data-page="sip-technology-explained"] #section-1 .sip-media-split{grid-template-columns:minmax(0,1fr) 260px}
.technical-refined .review-panel-copy .detail-cards{display:block;margin-top:1rem}
.technical-refined .review-panel-copy .detail-cards article{display:block;background:none;border-top:1px solid var(--color-line);padding:.8rem 0}
.technical-refined .review-panel-copy .detail-cards h3{margin-bottom:.4rem}
@media(max-width:640px){.technical-refined[data-page="sip-technology-explained"] #section-1 .sip-media-split{grid-template-columns:1fr}}
