/* Version 3 release: shared typography, stable chrome and bounded editorial cards. */
html body .site-header:not([data-ready]){visibility:hidden!important;}
html body .site-header{color:var(--brand-plum)!important;background:var(--glass-light-surface)!important;border-color:var(--ds-glass-light-border)!important;backdrop-filter:blur(var(--ds-glass-light-blur))!important;-webkit-backdrop-filter:blur(var(--ds-glass-light-blur))!important;box-shadow:var(--ds-glass-light-shadow)!important;}
html body .site-header .v4-brand img{filter:none!important;}
html body .site-header .v4-header{color:var(--brand-plum)!important;}
html body .site-header[data-theme]{--nav-muted:color-mix(in srgb,var(--brand-plum) 65%,var(--brand-white));}
/* Geometry and timeline strokes settle together, without intermediate stretched rails. */
html body .site-header :is(.v4-desktop-rail,.v4-research-group,.v43-research-capsule,.v4-nav-node){transition-property:color,background-color,opacity!important;}
html body #mondo .journey-note.byat-note>p:first-child{flex-wrap:wrap!important;}
html body #mondo .journey-note.byat-note>p:first-child strong{font-size:var(--ds-editorial-title-size)!important;line-height:1.08!important;font-weight:var(--brand-heading-weight)!important;}
html body #mondo .journey-note.byat-note>p:first-child svg{width:1.6em!important;height:1.6em!important;}
.bayt-landscape-subtitle{flex-basis:100%;font-size:inherit;}
html body #interni .bayt-section-heading{font-size:var(--ds-editorial-title-size)!important;font-weight:var(--brand-heading-weight)!important;line-height:1.08!important;}
html body #interni .interior-editorial-intro[hidden]{display:none!important;}
html body #casa #interni .interior-editorial-subtitle,html body #palazzo-butera .project-subtitle{font-size:clamp(16px,1.4vw,22px)!important;font-weight:600!important;line-height:1.25!important;color:var(--brand-primary)!important;}
html body #palazzo-butera .butera-track>.butera-panel>.byat-copy .project-subtitle{font-size:clamp(16px,1.4vw,22px)!important;font-weight:600!important;line-height:1.25!important;}
html body #palazzo-butera .butera-track>.butera-panel>.byat-copy .project-place{font-size:var(--ds-editorial-caption-size)!important;line-height:1.4!important;letter-spacing:.06em!important;}
html body #casa.is-minimized #interni>.photo-gallery{display:none!important;}
html body #approccio .approach-image img,html body #palazzo-butera .butera-panel:first-child .photo-stage .photo-slide:first-child{object-fit:cover!important;width:100%!important;height:100%!important;}
html body #palazzo-butera .butera-track>.byat-panel{background:var(--glass-light-surface)!important;color:var(--brand-plum)!important;}
html body #palazzo-butera .byat-copy :is(h2,h3,p){color:var(--brand-plum)!important;}
html body #palazzo-butera .byat-copy .project-subtitle{color:var(--brand-primary)!important;}
/* Adapt copy before enabling overflow. The script respects a readable minimum. */
html body :is(#inizio,#mondo,#casa,#citta,#arredi,#palazzo-butera) [data-copy-fit]{overflow-y:hidden!important;scrollbar-width:thin!important;scrollbar-color:var(--brand-primary) transparent!important;}
html body :is(#inizio,#mondo,#casa,#citta,#arredi,#palazzo-butera) [data-copy-fit="overflow"]{overflow-y:auto!important;overscroll-behavior-y:contain;}
html body #inizio .journey-pin .hero-glass[data-copy-fit]{overflow-y:hidden!important;}
html body #inizio .journey-pin .hero-glass[data-copy-fit="overflow"]{overflow-y:auto!important;}
html body [data-copy-fit]::-webkit-scrollbar{width:5px;height:5px;}
html body [data-copy-fit]::-webkit-scrollbar-thumb{background:var(--brand-primary);border-radius:8px;}
html body [data-copy-fit]::-webkit-scrollbar-track{background:transparent;}
html body :is(#mondo,#casa,#citta,#arredi,#palazzo-butera) [data-copy-fit] :is(p,blockquote){font-size:calc(var(--fit-base-size) * var(--fit-scale,1))!important;line-height:var(--fit-line,var(--fit-base-line))!important;}
html body [data-copy-fit] p.render-kicker{letter-spacing:.035em!important;}
html body #chatbot-section-slot{padding-bottom:24px!important;}
html body #chatbot-section #chatbot-panel{flex:1;max-height:none!important;height:100%!important;}
html body #chatbot-section .chatbot-body{flex:1 1 0!important;min-height:0!important;}
html body #chatbot-section #chatbot-messages{height:100%!important;max-height:none!important;box-sizing:border-box;}
@media(min-width:901px){
 html body #mondo #byat .exterior-panel:first-child>.byat-copy{gap:10px!important;}
 html body :is(.exterior-track,.butera-track)>.byat-panel{box-sizing:border-box!important;flex-basis:calc(var(--viewport-width,100vw) - 2 * var(--ds-editorial-side))!important;width:calc(var(--viewport-width,100vw) - 2 * var(--ds-editorial-side))!important;}
 html body #casa:not(.is-minimized) #interni .byat-copy{gap:6px!important;padding:14px!important;}
}
@media(min-width:901px) and (max-width:1200px){
 html body :is(#byat,#casa,#palazzo-butera) .byat-panel{--ds-editorial-copy-width:42%;}
 html body #byat .exterior-panel:first-child{--ds-editorial-copy-width:46%;}
 html body .site-header .v43-research-capsule .v4-node-label{white-space:normal!important;font-size:9px!important;line-height:1.1!important;max-width:100%!important;}
}
@media(max-width:900px){
 html body :is(#byat .exterior-panel,#palazzo-butera .byat-panel){box-sizing:border-box!important;width:calc(100vw - 2 * var(--page-margin))!important;flex-basis:calc(100vw - 2 * var(--page-margin))!important;}
 html body #casa:not(.is-minimized) #interni{display:flex!important;flex-direction:column!important;padding:14px!important;gap:10px!important;}
 html body #casa:not(.is-minimized) #interni>.byat-copy{flex:1 1 auto!important;height:auto!important;max-height:none!important;min-height:0!important;padding:0!important;justify-content:safe center!important;}
 html body #interni :is(.interior-editorial-intro,.interior-editorial-scene) p{font-size:12px!important;line-height:1.4!important;}
 html body #casa:not(.is-minimized) #interni>.photo-gallery{flex:0 0 26%!important;height:26%!important;min-height:100px!important;width:100%!important;max-height:none!important;}
 html body #casa:not(.is-minimized) #interni[data-interior-photo="0"]>.photo-gallery{flex-basis:20%!important;height:20%!important;}
 html body #casa:not(.is-minimized) #interni .photo-stage{height:100%!important;min-height:0!important;max-height:none!important;flex:1!important;aspect-ratio:auto!important;}
 html body #casa:not(.is-minimized) #interni .photo-slide{width:100%!important;height:100%!important;object-fit:cover!important;}
 html body #interni .bayt-section-heading{font-size:28px!important;}
 html body #interni .interior-editorial-subtitle{font-size:16px!important;}
 html body #arredi .furniture-card.is-expanded{display:flex!important;flex-direction:column!important;overflow:hidden!important;}
 html body #arredi .furniture-card.is-expanded>.furniture-visual{flex:0 0 36%!important;height:36%!important;min-height:100px!important;}
 html body #arredi .furniture-card.is-expanded>.furniture-details{flex:1 1 auto!important;min-height:0!important;padding:14px!important;gap:8px!important;}
 html body #arredi .furniture-details h3{font-size:24px!important;margin:0!important;}
 html body #arredi .furniture-description{gap:8px!important;}
 html body #arredi .furniture-thumbnails{margin-top:0!important;padding-top:6px!important;min-height:44px;}
 html body #arredi .furniture-thumbnails button{height:44px!important;flex-basis:44px!important;}
 html body #chatbot-section-slot{padding-bottom:90px!important;}
}

@media(max-width:900px) and (max-height:720px){
 html body #inizio .journey-pin{padding:72px var(--page-margin) 82px!important;}
 html body #inizio .journey-pin .hero-glass{box-sizing:border-box!important;max-height:calc(100dvh - 154px)!important;padding:14px!important;align-self:center!important;}
 html body #inizio .hero-copy{gap:10px!important;}
 html body #inizio .hero-copy>.hero-final-body{font-size:12px!important;line-height:1.35!important;}
 html body #inizio .v4-hero-quote #hero-title{font-size:17px!important;line-height:1.1!important;}
 html body #inizio .v4-hero-quote{grid-template-columns:minmax(0,1fr) 60px!important;}
 html body #inizio .hero-attribution{font-size:11px!important;}
}
@media(max-width:900px) and (max-height:500px) and (orientation:landscape){
 html body #inizio .journey-pin .hero-glass{width:100%!important;max-width:none!important;}
 html body #inizio .hero-copy{display:grid!important;grid-template-columns:32% minmax(0,1fr)!important;gap:16px!important;}
 html body #inizio .hero-copy>.hero-final-body{grid-column:2!important;grid-row:1!important;}
 html body #inizio .hero-copy>.v4-hero-quote{grid-column:1!important;grid-row:1!important;}
 html body #inizio .v4-hero-quote{display:block!important;}
 html body #inizio .v4-hero-quote>.v4-mobile-profile{width:52px!important;margin-top:8px!important;}
 html body #casa:not(.is-minimized) #interni,
 html body #mondo #byat .exterior-track>.exterior-panel,
 html body #palazzo-butera .butera-track>.butera-panel{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;gap:10px!important;padding:10px!important;overflow:hidden!important;}
 html body #casa:not(.is-minimized) #interni>.byat-copy,
 html body #mondo #byat .exterior-track>.exterior-panel>.byat-copy,
 html body #palazzo-butera .butera-track>.butera-panel>.byat-copy{height:100%!important;max-height:none!important;min-height:0!important;grid-column:1!important;grid-row:1!important;padding:0!important;}
 html body #casa:not(.is-minimized) #interni>.photo-gallery,
 html body #casa:not(.is-minimized) #interni[data-interior-photo="0"]>.photo-gallery,
 html body #mondo #byat .exterior-track>.exterior-panel>.photo-gallery,
 html body #palazzo-butera .butera-track>.butera-panel>.photo-gallery{height:100%!important;max-height:none!important;min-height:0!important;grid-column:2!important;grid-row:1!important;}
 html body #mondo #byat .exterior-track>.exterior-panel .photo-stage{height:100%!important;min-height:0!important;}
 html body #arredi .furniture-card.is-expanded{display:grid!important;grid-template-columns:40% minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) 36px!important;}
 html body #arredi .furniture-card.is-expanded>.furniture-visual{grid-column:1!important;grid-row:1!important;height:100%!important;min-height:0!important;}
 html body #arredi .furniture-card.is-expanded>.furniture-details{grid-column:2!important;grid-row:1 / 3!important;}
 html body #arredi .furniture-card.is-expanded>.furniture-thumbnails{grid-column:1!important;grid-row:2!important;min-height:0!important;}
}


/* Compact desktop windows (including Full HD at OS scaling): typography only.
   Keep large desktop/mobile values and all carousel geometry/timing unchanged. */
@media (min-width:901px) and (max-width:1920px) and (max-height:1080px){
 html body main #mondo .world-copy,
 html body main #approccio .approach-copy{max-height:calc(100svh - 220px)!important;box-sizing:border-box;}
 html body #main :is(#mondo #byat,#casa #interni,#citta,#approccio,#mondo,#palazzo-butera,.parco-chapter) [data-copy-fit] :is(p,blockquote){
  font-size:calc(var(--fit-base-size) * var(--fit-scale,1))!important;
  line-height:var(--fit-line,var(--fit-base-line))!important;
 }
 html body #main :is(#mondo #byat,#casa #interni,#citta,#approccio,#mondo,#palazzo-butera,.parco-chapter) [data-copy-fit] :is(h2,h3){font-size:calc(var(--fit-heading-size) * var(--fit-scale,1))!important;}
 html body #main :is(.project-intro,.project-outro,.byat-copy,.world-copy,.approach-copy)[data-copy-fit]{padding-block:calc(var(--fit-padding-block) * (2 * var(--fit-scale,1) - 1))!important;row-gap:calc(var(--fit-gap) * (4 * var(--fit-scale,1) - 3))!important;}
}
