/* One content measure on full-width canvases. Existing sections that already
   use --deco-pad, --hero-edge or --sp-edge inherit this same rail. */
body.deco-site[data-fusion], body.deco-site[data-fusion]:not(.deco-home) {
  --content-max: 1560px;
  --page-edge: max(clamp(16px, 3.52vw, 64px), calc((100% - var(--content-max)) / 2));
  --deco-pad: var(--page-edge);
  --hero-edge: var(--page-edge);
  --sp-edge: var(--page-edge);
  --section-space: clamp(36px, 4.4vw, 76px);
  --copy-space: clamp(12px, 1vw, 18px);
  --rule-paper: #d2cac0;
  --card-paper: #bab0a4;
  --control-paper: #7c7066;
  --rule-dark: #504b44;
  --card-dark: #6d655d;
  --control-dark: #a49a8d;
}
body[data-fusion] :is(.deco-mast,.bd-page-tools,.deco-footer),
body[data-fusion].deco-home :is(.section-wrap,.space-studio.compact,.company-intro.section-wrap,.deco-scene-bar),
body[data-fusion] main > :is(.band,.projects-index),
body[data-fusion].page-materials-v3 .library,
body[data-fusion] .partition-page > section {
  box-sizing: border-box;
  max-width: none;
  padding-inline: var(--page-edge);
}
body[data-fusion] .bd-page-tools { border-color: var(--rule-paper); }
body[data-fusion].deco-home .section-wrap:not(.contact),
body[data-fusion] main > .band { padding-block: var(--section-space); }
body[data-fusion] .partition-page .partition-content,
body[data-fusion] .partition-page .partition-source,
body[data-fusion] .partition-page .partition-hero { padding-inline: var(--page-edge); padding-block: var(--section-space); }
body[data-fusion] .deco-footer { border-block-start: 1px solid var(--rule-dark); }
body[data-fusion] :is(.deco-header,.deco-foot-base) { border-color: var(--rule-dark); }
body[data-fusion].deco-home .product-index .family-card { border-color: var(--card-dark); }
body[data-fusion].deco-home .product-index .product-direct,
body[data-fusion] .deco-footer .fusion-foot-contact-icon { border-color: var(--control-dark); }
body[data-fusion] :is(#glass-dialog-close,#crystal-dialog-close) { width: 44px; height: 44px; }
body[data-fusion] .partition-page .partition-grid,
body[data-fusion] .partition-page .partition-grid article { border-color: var(--rule-paper); }
body[data-fusion] .partition-page .partition-grid article { padding-inline-end: 1.25rem; }
body[data-fusion] .bd-page-tools a,
body[data-fusion] .partition-page :is(.partition-actions,.partition-source) a,
body[data-fusion].deco-home .deco-scene-reference a,
body[data-fusion].page-catalogs .cl-actions a {
  color: inherit; border: 0; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 4px;
}
body[data-fusion] :is(.bd-page-tools,.partition-actions,.partition-source,.cl-actions) a:hover {
  text-decoration-thickness: 2px;
}
body[data-fusion] :where(a,button,input,select):focus-visible {
  outline: 2px solid currentColor; outline-offset: 3px;
}
.b2b-arrow, .b2b-corner-link::after, #hero-scene-link::after {
  content: ""; display: inline-block; width: 1em; height: 1em;
  flex-shrink: 0; vertical-align: -.12em; margin-inline-start: .22em;
  background: currentColor; mask: url('/deco/icon-corner.svg') center / contain no-repeat;
  -webkit-mask: url('/deco/icon-corner.svg') center / contain no-repeat;
}
#hero-scene-link .b2b-arrow { display: none; }
.b2b-arrow:dir(rtl), .b2b-corner-link:dir(rtl)::after, #hero-scene-link:dir(rtl)::after { transform: scaleX(-1); }
body[data-fusion].page-materials-v3 .base-material-card::after { display: none; }
body[data-fusion].page-materials-v3 .base-material-caption strong {
  display: inline-block; position: relative; width: fit-content; max-width: 100%;
}
body[data-fusion].page-materials-v3 .base-material-card[aria-selected="true"] .base-material-caption strong::after {
  content: ""; position: absolute; inset-inline: 0; top: calc(100% + 4px);
  height: 2px; background: currentColor; pointer-events: none;
}

/* The lead photograph retains the original scene switcher and real images. */
body[data-fusion].deco-home main .deco-home-opening[data-deco-hero][data-hero-backdrop][data-hero-backdrop] [data-hero-copy] {
  width: min(550px, 49%) !important; padding: clamp(24px, 2.4vw, 38px) !important;
  margin: 0 !important; margin-inline-start: var(--page-edge) !important;
  margin-block-end: clamp(24px, 3.4vw, 54px) !important;
  background: rgb(248 245 239 / 94%) !important; box-shadow: none;
}
body[data-fusion].deco-home main .deco-home-opening[data-deco-hero][data-hero-backdrop][data-hero-backdrop] [data-hero-title] {
  max-width: none !important; font-size: clamp(38px, 4vw, 62px) !important;
  line-height: 1.07 !important; overflow-wrap: anywhere !important;
}
body[data-fusion].deco-home main .deco-home-opening[data-deco-hero][data-hero-backdrop][data-hero-backdrop] [data-hero-summary] {
  max-width: 46ch !important; margin-block-start: var(--copy-space) !important;
}
body[data-fusion].deco-home main .deco-home-opening[data-deco-hero] [data-hero-actions] > a {
  font-size: 14px !important; min-height: 44px;
}
body[data-fusion].deco-home main .fusion-social {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; justify-content: start;
  box-sizing: border-box; width: 100%; max-width: none; justify-self: stretch;
  margin: 0; padding: 2px var(--page-edge); box-shadow: none;
  background: var(--fusion-paper); border: 0; border-bottom: 1px solid var(--rule-paper);
  border-radius: 0; color: #4a433e;
}
body[data-fusion].deco-home main .fusion-social-label { flex-basis: auto; margin: 0; }
body[data-fusion].deco-home main .fusion-social a {
  padding: 0; border: 0; font-size: 13px; min-height: 44px; color: inherit;
}
body[data-fusion].deco-home main .fusion-social .b2b-arrow { display: none; }

/* Light paper gives the complete technical drawing a continuous surface. */
body[data-fusion] .partition-page .partition-hero {
  grid-template-columns: minmax(0,1.08fr) minmax(0,1fr);
  gap: clamp(20px,3.4vw,56px); background: var(--fusion-paper); color: var(--fusion-ink);
  border-bottom: 1px solid var(--rule-paper);
}
body[data-fusion] .partition-page .partition-hero h1 {
  max-width: none; font-size: clamp(36px,3.7vw,62px); line-height: 1.06;
  margin: 12px 0 var(--copy-space); text-wrap: balance; overflow-wrap: anywhere;
}
body[data-fusion] .partition-hero :is(.partition-kicker,figcaption),
body[data-fusion] .partition-page .partition-hero p:not(.partition-kicker) { color: #574c43; }
body[data-fusion] .partition-hero figure img, body[data-fusion] .partition-source figure img {
  max-height: 28rem; object-fit: contain; mix-blend-mode: multiply;
}
body[data-fusion] .partition-page .partition-actions { gap: 4px 24px; margin-block-start: 16px; }
body[data-fusion] .partition-page .partition-actions a { min-height: 44px; }

/* The search input belongs to the filter form in all layouts. */
body[data-fusion].page-catalogs .cl-library > :not(form,script),
body[data-fusion].page-catalogs .cl-form > :not([data-deco-hero]) {
  width: calc(100% - var(--page-edge) * 2); max-width: var(--content-max); margin-inline: auto;
}
body[data-fusion].deco-site.page-catalogs main .deco-opening-catalogs[data-deco-hero][data-deco-hero] {
  display: block !important; min-height: 0 !important; padding: clamp(22px,2.3vw,40px) var(--page-edge) 18px !important;
  border-bottom: 0; background: var(--fusion-paper) !important;
}
body[data-fusion].deco-site.page-catalogs main .deco-opening-catalogs[data-deco-hero] [data-hero-copy],
body[data-fusion].deco-site.page-catalogs main .deco-opening-catalogs[data-deco-hero][data-deco-hero] [data-hero-title] {
  width: 100% !important; max-width: none !important;
}
body[data-fusion].deco-site.page-catalogs main .deco-opening-catalogs[data-deco-hero][data-deco-hero] [data-hero-title] {
  font-size: clamp(32px, 3.4vw, 56px) !important; line-height: 1.1 !important; text-wrap: initial;
}
body[data-fusion].deco-site.page-catalogs main .deco-opening-catalogs[data-deco-hero] [data-hero-label] { margin-bottom: 6px !important; }
body[data-fusion].deco-site.page-catalogs main .deco-opening-catalogs[data-deco-hero][data-deco-hero] [data-hero-summary] {
  max-width: 85ch !important; margin-top: 8px !important;
}
body[data-fusion].page-catalogs .cl-toolbar { align-items: center; }
body[data-fusion].page-catalogs .cl-filters { flex: 1; gap: 8px; }
body[data-fusion].page-catalogs .cl-filters > .cl-search {
  flex: 1 1 17rem; width: auto; min-width: 0; max-width: 26rem; min-height: 44px;
  background: #faf8f4; color: #312c29; border: 1px solid var(--control-paper);
}
body[data-fusion].page-catalogs .cl-search input { color: #292522; background: transparent; }
body[data-fusion].page-catalogs .cl-search input::placeholder { color: #5a514b; }
body[data-fusion].page-catalogs .cl-filters select { min-height: 44px; max-width: 100%; width: auto; }
body[data-fusion].page-catalogs .cl-grid .cl-poster { border-color: var(--card-paper); }
body[data-fusion].page-catalogs .cl-actions { opacity: 1; visibility: visible; }
body[data-fusion].page-catalogs .cl-poster[data-partition-cover] .cl-photo { background: #201f1d; }

@media (min-width:1024px) {
  body[data-fusion].page-catalogs .cl-grid .cl-poster {
    width: 100%; height: clamp(160px, calc(100svh - 560px), 290px); aspect-ratio: auto;
  }
}

/* At desktop sizes only the details column scrolls. Below the split breakpoint
   the entire sheet scrolls once, with the close control pinned above it. */
html:has(#sample-dialog[open]) { overflow: hidden; }
@media (min-width:681px) {
  body[data-fusion] #sample-dialog { overflow: hidden; }
  body[data-fusion] #sample-dialog .dialog-shell { height: 100%; overflow: hidden; }
  body[data-fusion] #sample-dialog .dialog-content { max-height: 100%; overflow: auto; }
}
@media (max-width:680px) {
  body[data-fusion] #sample-dialog { height: auto; max-height: calc(100dvh - 20px); overflow: hidden; }
  body[data-fusion] #sample-dialog .dialog-shell {
    position: static; display: block; max-height: calc(100dvh - 22px); height: auto; overflow-y: auto;
  }
  body[data-fusion] #sample-dialog .dialog-close {
    position: absolute; top: 8px; right: 8px; z-index: 3; width: 44px; height: 44px;
  }
  body[data-fusion] #sample-dialog .dialog-content { overflow: visible; max-height: none; scrollbar-gutter: auto; }
}
@media (max-width:760px) {
  body[data-fusion].deco-home main .deco-home-opening[data-deco-hero][data-hero-backdrop][data-hero-backdrop] [data-hero-copy] {
    width: 100% !important; margin: 0 !important; padding: 24px var(--page-edge) !important;
    border-radius: 0 !important; background: var(--fusion-paper) !important;
  }
  body[data-fusion] .partition-page .partition-hero { grid-template-columns: minmax(0,1fr); }
  body[data-fusion] .partition-page .partition-hero h1 { font-size: clamp(32px, 8.5vw, 44px); }
  body[data-fusion].deco-home main .fusion-social { gap: 0 12px; }
  body[data-fusion].deco-home main .fusion-social-label { display: none; }
}
@media (max-width:900px) {
  body[data-fusion].page-catalogs .cl-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; }
  body[data-fusion].page-catalogs .cl-filters .cl-search { grid-column: 1 / -1; width: 100%; max-width: none; }
  body[data-fusion].page-catalogs .cl-filters select { width: 100%; }
  body[data-fusion].page-catalogs .cl-toolbar { display: grid; grid-template-columns: minmax(0,1fr); gap: 4px; }
  body[data-fusion].page-catalogs .cl-views { justify-self: end; }
}
@media print { body[data-fusion].deco-home .fusion-social { display: none; } }

/* Case headlines sit on solid paper beside the photograph, and above it on a phone. */
body.deco-site[data-fusion] main[data-deco-inner] .project-case .project-case-hero[data-deco-hero] {
  grid-template-columns: minmax(0,.95fr) minmax(0,1.05fr) !important;
  align-items: center; gap: clamp(22px,3.5vw,58px);
  height: auto !important; padding: clamp(24px,3vw,50px) var(--page-edge) !important;
  background: var(--fusion-paper) !important; color: #282522;
}
body.deco-site[data-fusion] main[data-deco-inner] .project-case .project-case-hero[data-deco-hero]::before,
body.deco-site[data-fusion] main[data-deco-inner] .project-case .project-case-hero[data-deco-hero]::after {
  content: none !important;
}
body.deco-site[data-fusion] main[data-deco-inner] .project-case-hero[data-deco-hero] [data-hero-copy] {
  position: static !important; width: 100% !important; max-width: none !important; pointer-events: auto;
}
body.deco-site[data-fusion] main[data-deco-inner] .project-case-hero[data-deco-hero] [data-hero-title] {
  color: #282522 !important; font-size: clamp(32px,3.2vw,55px) !important;
  max-width: none !important; line-height: 1.1 !important;
}
body.deco-site[data-fusion] main[data-deco-inner] .project-case-hero[data-deco-hero] :is([data-hero-label],[data-hero-summary],[data-hero-caption]) {
  color: #514943 !important; text-shadow: none;
}
body.deco-site[data-fusion] main[data-deco-inner] .project-case-hero[data-deco-hero] [data-hero-actions] > a {
  min-height: 44px !important; color: #332e29 !important; border-color: var(--control-paper) !important;
}
body.deco-site[data-fusion] main[data-deco-inner] .project-case-hero[data-deco-hero] [data-hero-actions] > a:is(:first-child,:hover) {
  background: #704833 !important; color: white !important; border-color: #704833 !important;
}
body.deco-site[data-fusion] main[data-deco-inner] .project-case .project-case-hero[data-deco-hero] [data-hero-media] {
  display: block !important; position: static !important; height: auto !important;
  width: 100% !important; overflow: visible !important;
}
body.deco-site[data-fusion] main[data-deco-inner] .project-case-hero[data-deco-hero] [data-hero-fit]:not([hidden]) {
  height: auto !important; width: 100%; aspect-ratio: var(--shot-ratio) !important;
  max-height: 52vh !important; background: #24211e !important;
}
body.deco-site[data-fusion] main[data-deco-inner] .project-case .project-case-hero[data-deco-hero] [data-hero-image] {
  position: absolute !important; inset: 0 !important; height: 100% !important;
  width: 100% !important; object-fit: contain !important;
}
body.deco-site[data-fusion] main[data-deco-inner] .project-case .project-case-hero[data-deco-hero] [data-hero-caption] {
  position: static !important; width: auto !important; height: auto !important; padding: 7px 0 0 !important;
  clip-path: none; overflow: visible; font-size: 13px !important; line-height: 1.4;
}
@media (max-width:820px) {
  body.deco-site[data-fusion] main[data-deco-inner] .project-case .project-case-hero[data-deco-hero] {
    grid-template-columns: minmax(0,1fr) !important; grid-template-rows: auto auto !important;
    gap: 18px; align-items: start;
  }
  body.deco-site[data-fusion] main[data-deco-inner] .project-case .project-case-hero[data-deco-hero] [data-hero-media] {
    grid-area: 2 / 1 !important;
  }
}
