/* Project detail layout: wide artwork with a vertical reading stack. */
html:has(.case-page){scroll-padding-top:0;scroll-behavior:auto}
.final-preview .case-layout{display:block}
.final-preview .case-body{min-width:0}
.final-preview .case-page{--max:var(--pf-layout-detail-max)}
.final-preview .case-intro h1{max-width:18ch;font-size:var(--yhy-type-display-project)}
.final-preview .case-section h2{font-size:var(--yhy-type-heading-xl)}
.final-preview .case-lead{font-size:var(--yhy-type-body);line-height:var(--yhy-leading-body)}
.final-preview .next-project h2{font-size:var(--yhy-type-display-next)}
.final-preview .case-section-heading{display:block;max-width:var(--pf-layout-reading-max);margin:0 0 var(--ds-content-space)}
.final-preview .case-section-heading :is(.eyebrow,.label){margin:0 0 var(--ds-eyebrow-section-gap)}
.final-preview .case-section-heading h2{max-width:none;margin:0}
.final-preview .case-section-heading>p:last-child:not(.eyebrow):not(.label){margin:var(--ds-group-space) 0 0;max-width:100%}
.final-preview .case-section-heading+*{margin-top:0}
.final-preview #main .figure-grid.phones{padding-block:0}
.final-preview .case-section-heading:has(+.fp-delivery){margin-bottom:var(--ds-group-space)}
.final-preview .fp-delivery{max-width:var(--pf-layout-reading-max);margin-bottom:var(--ds-content-space)}
.final-preview #reflection>.eyebrow{margin:0 0 var(--ds-eyebrow-section-gap)}
.final-preview #reflection>h2{margin:0}
.final-preview #reflection>h2+p{margin-top:var(--ds-group-space);max-width:var(--pf-layout-reading-max)}
/* Reading roles and proximity stay separate from artwork sizing. */
.final-preview .case-body{--detail-reading:var(--pf-type-reading);--detail-subsection:var(--pf-type-subsection)}
.final-preview .case-body :is(.case-section-heading>p:last-child:not(.eyebrow):not(.label),.case-section>p,.case-subhead+p,.rv-riot-comparison>p,.fp-delivery,.fp-more-content>p:not(.fp-related),.case-note-items dd,.case-date-notes dd){font-size:var(--detail-reading);line-height:var(--pf-type-reading-line)}
.final-preview .case-body :is(.case-subhead,.case-related-screens h3,.fp-more-content h3){font-size:var(--detail-subsection);font-weight:500;line-height:var(--pf-type-heading-line)}
.final-preview .case-body .case-flow h3{font-size:var(--pf-type-panel-title);line-height:var(--pf-type-heading-line)}
.final-preview .case-body .case-subhead{margin:var(--ds-block-space) 0 var(--ds-group-space)}
.final-preview .case-body .case-subhead+p{max-width:var(--pf-layout-reading-max);margin:0 0 var(--ds-content-space)}
.final-preview .case-body .case-subhead:not(:has(+p)){margin-bottom:var(--ds-content-space)}
.final-preview .case-body .case-related-screens h3{margin:var(--ds-block-space) 0 var(--ds-content-space)}
.final-preview .case-body .fp-more-content h3{margin:0 0 var(--ds-group-space)}
.final-preview .case-body .fp-more-content>p:not(.fp-related){max-width:var(--pf-layout-reading-max);margin:0 0 var(--ds-content-space)}
.final-preview .case-body :is(.case-note-items dt,.case-date-notes dt){margin-bottom:var(--yhy-space-2)}
.final-preview .case-body .case-date-notes>div+div{margin-top:var(--ds-content-space)}
/* Paris artwork fills the content column; controls remain a smaller centred group. */
.final-preview .fp-content-types{max-width:none}
.final-preview .pm3{--pm3-top:var(--ds-anchor-offset)}
.final-preview #main .pm3--content-row .pm3__state-controls{width:min(100%,max(320px,var(--pm3-controls-width,46%)));justify-self:center;margin-inline:auto}
.final-preview #main .pm3--content-row :is(.pm3__viewport,.pm3__footer,.pm3__footer--segments .pm3__copy){width:100%;justify-self:start;margin-inline:0}
.final-preview #main .pm3--content-row .pm3__panel .fp-paris-grid{width:100%;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:auto;gap:48px;align-content:start;margin:0}
.final-preview #main .pm3--content-row .fp-paris-grid figcaption{margin-top:var(--yhy-space-2,8px)}
@media(max-width:700px){
  .final-preview #main .pm3--content-row .pm3__panel .fp-paris-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--yhy-space-4,16px)}
  .final-preview #main .pm3--content-row .pm3__state-picker{grid-template-columns:auto auto auto auto;gap:2px;padding:3px}
  .final-preview #main .pm3--content-row .pm3__state-button{height:var(--yhy-sm-height,44px);min-height:var(--yhy-sm-height,44px);padding:0 var(--yhy-space-3,12px);font:var(--yhy-weight-medium,500) var(--yhy-sm-font,14px)/1.5 var(--yhy-font);border-radius:calc(var(--yhy-control-radius) - 3px)}
}
@media(max-width:360px){
  .final-preview #main .pm3--content-row .pm3__state-button{padding-inline:var(--yhy-space-2,8px)}
}
/* Keep the date-picker artwork and its notes together at the left edge. */
.final-preview .case-page[data-detail-project=riot] .case-date-feature{grid-template-columns:minmax(0,290px) minmax(0,480px);gap:var(--ds-block-space);justify-content:start;align-items:center;padding:0}
.final-preview .case-page[data-detail-project=riot] .case-date-feature figure{margin-inline:0;justify-self:start}
.final-preview .case-page[data-detail-project=riot] .case-date-notes{text-align:left;max-width:480px}
@media(min-width:761px){
  /* Captions have their own row: notes centre on the artwork, not its caption. */
  .final-preview .case-page[data-detail-project=riot] .case-date-feature{grid-template-rows:auto auto;row-gap:0}
  .final-preview .case-page[data-detail-project=riot] .case-date-feature figure{display:grid;grid-template-rows:subgrid;grid-column:1;grid-row:1 / span 2}
  /* A definite artwork width lets Firefox size subgrid rows from the rendered image. */
  .final-preview .case-page[data-detail-project=riot] .case-date-feature img{width:290px;max-width:100%}
  .final-preview .case-page[data-detail-project=riot] .case-date-notes{grid-column:2;grid-row:1;align-self:center}
}
@media(min-width:1024px){
  .final-preview .figure-grid.screens{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
  .final-preview .figure-grid.screens>figure:only-child{grid-column:1/-1}
  .final-preview .case-intro{max-width:1040px}
}
@media(max-width:760px){
  .final-preview .case-section h2{font-size:var(--yhy-type-heading-xl-mobile)}
  .final-preview .case-lead{font-size:var(--yhy-type-body-large-mobile)}
  .final-preview .next-project h2{font-size:var(--yhy-type-display-next-mobile)}
  .final-preview .case-body{--detail-reading:var(--pf-type-reading-mobile);--detail-subsection:var(--pf-type-subsection-mobile)}
  .final-preview .case-page[data-detail-project=riot] .case-date-feature{grid-template-columns:minmax(0,1fr)}
  .final-preview .case-page{padding-top:var(--ds-block-space)}
  .final-preview .case-section-heading{max-width:none}
  .final-preview .case-intro h1{font-size:var(--yhy-type-display-project-mobile)}
}
