/* Real source screens, grouped by product function and native viewport. */
.portfolio-case .case-expanded{padding:clamp(56px,8vw,110px) var(--gutter);min-width:0}
.case-expanded .case-source-heading{margin-bottom:32px}
.case-expanded-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(28px,5vw,64px);align-items:start}
.case-expanded-grid figure{margin:0;min-width:0;align-self:start;background:transparent}
.case-expanded-grid img,.case-expanded-grid video{display:block;width:100%;height:auto;max-height:none;object-fit:contain;border-radius:clamp(12px,2vw,24px)}
.case-expanded-grid video{background:#06101c}
.case-expanded-grid figcaption{margin-top:12px;color:var(--muted);font-size:14px;line-height:1.45}
.case-expanded-mobile{grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));justify-items:center}
.case-expanded-mobile figure,.case-expanded-grid>figure.case-expanded-mobile{width:min(100%,300px);margin-inline:auto}
.case-expanded-tablet figure,.case-expanded-grid>figure.case-expanded-tablet{width:min(100%,744px);margin-inline:auto}
.case-expanded-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.25fr);gap:24px;align-items:start}
.case-expanded-pair .case-expanded-phone{width:100%;max-width:300px;justify-self:center}
.case-expanded-pair figcaption{background:transparent}
.startrack-updated .case-expanded-grid>figure>img{background:#030d1b}
.startrack-updated .case-source-heading p{max-width:40em}
.case-expanded .case-expanded-phone-video{max-width:300px;margin-inline:auto}
.miquel-case .case-cover-art{min-width:0;width:100%;max-width:100%;overflow:hidden}
.miquel-case .case-cover-copy{min-width:0}
.miquel-case .miquel-section{border-block:0}
.miquel-case .miquel-media{background:transparent;align-self:start;border-radius:0;overflow:visible}
.miquel-case .miquel-media img,.miquel-case .miquel-media video{border-radius:24px;object-fit:contain;height:auto;min-height:0;aspect-ratio:auto}
.miquel-case .miquel-media video{aspect-ratio:16/10}
.miquel-case .miquel-media figcaption{padding:14px 0 0;background:transparent}
.miquel-case .miquel-orbit h2{margin-bottom:24px}
.miquel-case .miquel-desktop-grid{align-items:start}
.miquel-case .miquel-desktop-grid .miquel-media:nth-child(2),.miquel-case .miquel-desktop-grid .miquel-media:nth-child(3){grid-column:1/-1}
body.portfolio-case main .project-info,body.portfolio-case main .public-case-intro,body.portfolio-case main .public-case-chapter,body.portfolio-case main .case-source-gallery{border-block:0!important}
body.portfolio-case main .project-tags>.f-body:nth-child(2){display:none}
body.portfolio-case main .case-role{border-block:0}
body.portfolio-case main .series-section,body.portfolio-case main .case-supplied-v52,body.portfolio-case main .case-shot-gallery,body.portfolio-case main .case-section{border-block:0!important}
@media(max-width:700px){
 .case-expanded-pair{grid-template-columns:minmax(0,1fr);gap:28px}
 .case-expanded-pair .case-expanded-phone{max-width:300px}
 .case-expanded-mobile{grid-template-columns:minmax(0,1fr)}
 .miquel-case .miquel-media img,.miquel-case .miquel-media video{border-radius:18px}
}

/* Konecta source chapters keep screenshots readable at their native ratio. */
.konecta-case-links{display:flex;flex-wrap:wrap;gap:16px 40px}.konecta-case-links a{display:inline-flex;align-items:center;min-height:44px}
.konecta-archive{margin:40px var(--gutter);min-width:0}.konecta-archive summary{min-height:44px;cursor:pointer;color:var(--muted);padding-block:12px}
.konecta-archive .project-slider{padding-inline:0!important;margin-top:28px}
.konecta-expanded{scroll-margin-top:130px}


/* Mago: complete content sections, with a bounded device scale and varied reading rhythm. */
.mago-section-grid{display:grid;gap:clamp(40px,5vw,72px);max-width:1280px;margin-inline:auto}
.mago-section-row{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:clamp(20px,2.5vw,36px);align-items:center}
.mago-section-row-balanced{grid-template-columns:repeat(2,minmax(0,1fr))}
.mago-section-grid figure{width:100%;max-width:none;margin:0;min-width:0}
.mago-section-grid .case-shot-media{background:#000;border-radius:clamp(14px,1.7vw,24px);overflow:hidden}
.mago-section-grid img{display:block;width:100%;height:auto;max-height:none;object-fit:contain;transform:none}
.mago-section-grid figcaption{margin-top:12px;color:var(--muted);font-size:14px;line-height:1.45}
.mago-section-grid .mago-section-feature{width:min(100%,960px);margin-inline:auto}
@media(max-width:1000px){.mago-section-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.mago-section-grid{gap:28px}.mago-section-row{grid-template-columns:minmax(0,1fr);gap:28px}.mago-section-grid .case-shot-media{border-radius:16px}}

/* Authored page sections preserve complete UI and the device hierarchy. */
.case-screen-tablets{grid-template-columns:repeat(2,minmax(0,1fr));justify-items:center}
.case-screen-tablets>figure{width:min(100%,744px)}
@media(max-width:700px){.case-screen-tablets{grid-template-columns:minmax(0,1fr)}}

.case-expanded-mobile>[data-screen-sequence]{grid-column:1/-1;width:100%}

.case-expanded-pair+[data-screen-sequence],.apeon-pair+[data-screen-sequence],.oisy-responsive-grid+[data-screen-sequence]{margin-top:clamp(28px,5vw,64px)}
.series-phones>[data-screen-sequence]{grid-column:1/-1;width:100%}

.fourmeta-mobile-sections>[data-screen-sequence]{grid-column:1/-1;width:100%;max-width:none}

/* Additional Miquel desktop states use the existing twelve-column grid. */
.miquel-case .miquel-desktop-grid>.miquel-media:nth-child(n+4){grid-column:span 6}
@media(max-width:820px){.miquel-case .miquel-desktop-grid>.miquel-media:nth-child(n+4){grid-column:1/-1}}

/* Complete legacy cover canvases fit the existing 650px stage; their mat fills the side room. */
body.portfolio-case main .case-cover-art[data-source-mat]>img{max-height:650px;aspect-ratio:inherit!important;object-fit:contain}
