html,body{margin:0;width:100%;overflow-x:hidden}body{background:#141a23}.roof-demo{--navy:#153952;--navy-deep:#0f293b;--terra:#1c6491;font-family:Arial,sans-serif;border-radius:0}.roof-demo .model-stage{margin:0}.roof-demo footer{margin:0}.roof-demo .model-toolbar{flex-wrap:wrap}.roof-demo #motion{width:auto;max-width:none;white-space:normal}.roof-demo .model-note{padding-bottom:14px}@media(max-width:500px){.roof-demo .model-toolbar{gap:5px}.roof-demo .toolbar-group{flex-wrap:wrap}.roof-demo .phase-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}.roof-demo #model{min-height:245px}}
@media(min-width:785px){
  .roof-demo{display:grid;grid-template-columns:1.28fr 1fr}
  .roof-demo .model-stage{height:clamp(360px,35vw,455px)}
  .roof-demo .cover-panel{border-top:0;border-left:1px solid var(--line);padding:clamp(16px,2.3vw,32px);align-self:center}
  .roof-demo .phase-summary{align-items:flex-start;gap:8px}
  .roof-demo .phase-copy{min-width:0}
  .roof-demo .progress-readout{min-width:55px}
  .roof-demo .slider-heading{gap:8px;flex-wrap:wrap}
  .roof-demo .scrub-note{display:none}
  .roof-demo .model-note{grid-column:1/-1;border-top:1px solid var(--line);padding:10px 18px;gap:10px}
  .roof-demo .phase-buttons button{padding:7px}
  .roof-demo .model-toolbar{left:9px;right:9px;bottom:9px;gap:4px}
  .roof-demo .model-toolbar button{padding:8px}
}
.roof-demo #cover-progress::-webkit-slider-runnable-track{background:linear-gradient(to right,#153952,#298aba 65%,#add7ee)}
.roof-demo #cover-progress::-moz-range-track{background:linear-gradient(to right,#153952,#298aba 65%,#add7ee)}

/* Keep the house in its own unobstructed viewport. Header and tools size to their content. */
.roof-demo .model-stage{display:flex;flex-direction:column;height:auto;min-width:0}
.roof-demo .stage-header,.roof-demo .model-toolbar{position:static;inset:auto;flex:none}
.roof-demo .stage-header{padding:12px;min-height:0}
.roof-demo .model-toolbar{padding:6px 8px 10px}
.roof-demo #model{position:relative;inset:auto;width:100%;height:auto;min-height:0;aspect-ratio:1.65;flex:1 1 auto}
.roof-demo .range-ends{display:flex;justify-content:space-between;gap:12px;font-size:12px;font-weight:700}
.roof-demo #scrub-note{margin:0 0 9px;color:var(--muted);font-size:12px}
.roof-demo .phase-buttons{flex-direction:row}
.roof-demo .roof-stills,.roof-demo .roof-stills img{position:absolute;inset:0;width:100%;height:100%}
.roof-demo .roof-stills img{object-fit:contain;object-position:center}
.roof-demo .roof-still-covered{clip-path:inset(0 calc(100% - var(--cover,0%)) 0 0)}
.roof-demo #model[data-ready="true"] .roof-stills{display:none}
.roof-demo[data-mode="stills"] .model-toolbar,.roof-demo[data-mode="stills"] #cover-play,.roof-demo[data-mode="stills"] .phase-buttons,.roof-demo[data-mode="stills"] .model-note p:first-child{display:none}
@media(min-width:785px){
  .roof-demo .model-stage{min-height:clamp(390px,38vw,540px)}
  .roof-demo #model{aspect-ratio:auto}
}

@media(max-width:500px){
  .roof-demo #model{aspect-ratio:1.25}
}
