/* The two photo edges frame the copy; they do not magnify the empty center. */
body[data-detail-selected] #viewing.buy5-visit {
  aspect-ratio:auto; min-height:260px; padding:0; display:grid; place-items:center;
}
body[data-detail-selected] #viewing .bordeaux-viewing-photo {
  inset:0 auto 0 0; width:31%; height:100%; object-fit:cover; object-position:left center;
  mask-image:linear-gradient(to right,#000 70%,transparent); opacity:1;
}
body[data-detail-selected] #viewing .bordeaux-viewing-photo-right {
  display:block; inset:0 0 0 auto; object-position:right center;
  mask-image:linear-gradient(to left,#000 70%,transparent);
}
body[data-detail-selected] #viewing .bordeaux-viewing-copy {
  width:44%; padding:20px 12px; gap:12px; text-align:center; background:transparent;
}
body[data-detail-selected] #viewing .bordeaux-viewing-copy h2 { font-size:clamp(26px,2.1vw,36px); line-height:1.1; }
body[data-detail-selected] #viewing .bordeaux-viewing-copy p { font-size:16px; line-height:1.45; max-width:42ch; margin:0; }
body[data-detail-selected] #viewing .bordeaux-viewing-copy .cta { min-inline-size:0; width:auto; max-width:100%; min-height:48px; padding:12px 20px; font-size:16px; }
/* At desktop sizes the viewing invitation and all four payment options share one screen. */
@media(min-width:1100px) and (min-height:700px) {
  body[data-detail-selected] #viewing.buy5-visit { min-height:280px; height:clamp(280px,34svh,440px); margin-top:0; }
  body[data-detail-selected] #purchase.buy5 { padding-block:40px 24px!important; }
  body[data-detail-selected] #purchase .buy5-panel { gap:24px; }
  body[data-detail-selected] #purchase #buy5-title { font-size:clamp(28px,2.2vw,40px)!important; line-height:1.1; }
  body[data-detail-selected] #purchase .buy5-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  body[data-detail-selected] #purchase .buy5-tile { min-height:clamp(200px,24svh,300px); padding:24px; gap:16px; }
  body[data-detail-selected] #purchase .buy5-tile > span { font-size:20px; line-height:1.25; }
  body[data-detail-selected] #purchase .buy5-tile > small { font-size:16px; line-height:1.4; }
  body[data-detail-selected] #purchase .ds-buy-foot .cta { min-height:50px; padding:12px 20px; font-size:16px; }
}
@media(max-width:760px) {
  body[data-detail-selected] #viewing.buy5-visit { min-height:0; display:flex; flex-direction:column; }
  body[data-detail-selected] #viewing .bordeaux-viewing-photo:not(.bordeaux-viewing-photo-right) {
    position:relative; z-index:0; width:100%; height:auto; aspect-ratio:3/1; object-fit:contain; mask-image:none;
  }
  body[data-detail-selected] #viewing .bordeaux-viewing-photo-right { display:none; }
  body[data-detail-selected] #viewing .bordeaux-viewing-copy { width:100%; padding:24px 20px; }
  body[data-detail-selected] #purchase .ds-buy-foot .cta { font-size:16px; line-height:1.35; min-height:56px; }
}
/* Theme switching must visibly affect the Hero's information band too. */
html[data-deco-theme="light"] body[data-detail-selected] #hero .v7-bar {
  background: var(--deco-paper) !important;
  color: var(--deco-ink);
  border-color: var(--deco-line);
}
html[data-deco-theme="light"] body[data-detail-selected] #hero .v7-bar :is(dt,.lh-catalog) {
  color: var(--deco-muted) !important;
}
html[data-deco-theme="light"] body[data-detail-selected] #hero .v7-bar dd {
  color: var(--atlas-red) !important;
}
html[data-deco-theme="light"] body[data-detail-selected] #hero .v7-cta {
  background: var(--atlas-sand) !important;
  color: var(--deco-ink) !important;
}
html[data-deco-theme="light"] body[data-detail-selected] #hero .v7-cta > span { color:var(--deco-ink)!important; }

/* Keep the paired scenes and copy at a readable scale on large desktop displays. */
@media(min-width:1800px) {
 body[data-detail-selected] #viewing.buy5-visit { max-width:2100px; margin-inline:auto; }
 body[data-detail-selected] #purchase.buy5 { max-width:2260px; margin-inline:auto; padding-inline:80px; }
 body[data-detail-selected] #viewing .bordeaux-viewing-copy p { font-size:20px; }
 body[data-detail-selected] #viewing .bordeaux-viewing-copy .cta,
 body[data-detail-selected] #purchase .ds-buy-foot .cta { font-size:18px; }
 body[data-detail-selected] #purchase .buy5-tile > span { font-size:24px; }
 body[data-detail-selected] #purchase .buy5-tile > small { font-size:20px; }
}

/* A real section boundary between the catalogue and the viewing invitation. */
body[data-detail-selected] .deco-plans-break {
 margin-block:clamp(40px,5svh,72px);
}
body[data-detail-selected] .deco-plans-break + #viewing.buy5-visit { margin-top:0; }
@media(min-width:1100px) and (min-height:700px) and (max-height:799px) {
 body[data-detail-selected] #viewing.buy5-visit { min-height:256px; height:256px; }
 body[data-detail-selected] #purchase.buy5 { padding-block:28px 16px!important; }
 body[data-detail-selected] #purchase .buy5-panel { gap:16px; }
 body[data-detail-selected] #purchase .buy5-tile { min-height:180px; padding:20px; gap:12px; }
}
@media(max-width:760px) {
 body[data-detail-selected] .deco-plans-break { margin-block:36px; }
}

body[data-detail-selected] #expert .exv-body section {
  margin-block: clamp(28px, 3.5vh, 36px) 0;
}

body[data-detail-selected] #expert .exv-body h3 {
  margin: 0 0 14px;
  font-family: var(--bordeaux-text);
  font-size: var(--type-subtitle);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.01em;
  text-transform: none;
}

/* Hero facts and actions use the approved lighter text hierarchy. */
body[data-detail-selected] #hero :is(.v7-bar dt, .v7-actions > .v7-pdf, .v7-actions > .v7-cta) {
  font-weight: 400 !important;
}
body[data-detail-selected] #hero .v7-bar dd {
  font-family: Atlas, "Golos Text", Arial, sans-serif !important;
  font-weight: 350 !important;
}

/* Approved Savvinskaya 27 mobile layout. */
@media (max-width: 760px) {
  html body[data-detail-selected] #hero .v7-bar .v7-actions {
    width: 100% !important;
    margin-inline: 0 !important;
    align-items: stretch;
  }
  html body[data-detail-selected] #hero .v7-bar .v7-actions > :is(.v7-cta, .v7-pdf) {
    width: 100% !important;
  }
  body[data-detail-selected] #hero .v7-cta.ds-split-action > span {
    padding-inline: 5px;
    white-space: nowrap;
  }
  body[data-detail-selected] #about .av-tabs {
    width: 100%;
    justify-self: stretch;
  }
  html body[data-detail-selected] #related .related-inner .projects {
    gap: 12px !important;
  }
  html body[data-detail-selected] #related .related-inner .projects:has(> .cc-card:not([hidden]) ~ .cc-card:not([hidden])) > .cc-card {
    flex: 0 0 calc((100% - 12px) / 1.12) !important;
  }
}
@media (max-width: 360px) {
  html body[data-detail-selected] #hero .v7-bar .v7-actions > .v7-cta {
    --split-size: 38px !important;
    padding-inline: 3px !important;
    gap: 0 !important;
  }
  html body[data-detail-selected] #hero .v7-bar .v7-cta > span:first-child {
    padding-inline: 0 !important;
  }
  html body[data-detail-selected] #hero .v7-bar .v7-cta .demo-pill-icon {
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
  }
}

#purchase-lead .purchase-comment {
  display: none;
}
#purchase-lead .purchase-comment small {
  font: inherit;
  opacity: .78;
}
#purchase-lead .purchase-comment textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 72px;
  padding: 10px 14px;
  border: 1px solid #5a5246;
  background: #0c0b09;
  color: #f5f2ed;
  font: inherit;
  font-size: 16px;
  resize: vertical;
}
#purchase-lead .purchase-comment textarea:focus-visible {
  outline: 1px solid #c9ad7c;
  outline-offset: -1px;
}

#construction .build-periods {
  --build-period-font: 18px;
  display: flex;
  align-items: center;
  gap: 8px 16px;
}
#construction .build-periods label {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  font-size: var(--build-period-font);
}
#construction .build-periods select {
  min-height: 44px;
  padding-inline: 12px;
  border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  border-radius: 0;
  color: inherit;
  background: var(--canvas);
  font: inherit;
}
#construction .build-periods .build-months {
  min-width: 0;
  gap: 4px 20px;
}
html[data-deco-theme] body[data-detail-selected] #construction .build-periods .build-months button {
  font-size: var(--build-period-font);
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
html[data-deco-theme] body[data-detail-selected] #construction .build-periods .build-months button[aria-selected="true"] {
  border-bottom-color: currentColor;
  color: var(--atlas-sand, #c9ad7c);
}
html[data-deco-theme="light"] body[data-detail-selected] #construction .build-periods .build-months button[aria-selected="true"] {
  color: #6b512e;
}
#construction .build-photo[hidden] { display: none !important; }
body[data-detail-selected] #construction .bordeaux-build-photos {
  display: block;
}
body[data-detail-selected] #construction .bordeaux-build-photos .build-photo {
  width: 100%;
  aspect-ratio: 3 / 1;
  max-height: min(510px, 58svh);
  border: 0;
  border-radius: 0;
}
body[data-detail-selected] #construction .bordeaux-build-photos .build-photo img {
  object-fit: cover;
  border-radius: 0;
}
body[data-detail-selected] #construction .bordeaux-build-photos .build-photo .photo-open {
  inset: auto 12px 12px auto;
  border-radius: 0;
  background: #080808dc;
  color: #f5f2ed;
}
#construction .build-cover-caption {
  position: absolute;
  inset: auto auto 12px 12px;
  padding: 8px 10px;
  background: #080808dc;
  color: #f5f2ed;
  font-size: 14px;
}
@media (max-width: 760px) {
  #construction .build-periods { --build-period-font: 16px; flex-direction: column; align-items: stretch; }
  body[data-detail-selected] #construction .bordeaux-build-photos .build-photo {
    aspect-ratio: 16 / 9;
    max-height: 38svh;
  }
  #construction .build-periods .build-months {
    column-gap: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 3px;
    scrollbar-width: thin;
  }
  #construction .build-periods .build-months button { flex: none; }
}

@media (max-width: 760px) {
  #purchase-lead[data-contact-drawer] .purchase-comment { display: grid; }
  body[data-detail-selected] .lab-header .lhd-top {
    grid-template-columns: auto minmax(0, 1fr) max-content;
  }
  body[data-detail-selected] .lab-header .lhd-deco {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body[data-detail-selected] > .lab-header {
    position: absolute;
  }
  body[data-detail-selected] #scroll-root > .lab-header[data-mobile-sticky] {
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    inset-inline: auto;
    bottom: auto;
  }
  body[data-detail-selected] .lab-header[data-mobile-sticky] .lhd-sections {
    position: absolute;
    inset: 100% 0 auto;
    max-height: min(65vh, 24rem);
    overflow-y: auto;
    background: inherit;
  }
  body[data-detail-selected] .lab-header[data-mobile-sticky].open .lhd-sections {
    height: auto;
  }
  html[data-deco-theme] body[data-detail-selected] #scroll-root .lab-header[data-mobile-sticky] .lhd-contact[data-demo-pill] {
    box-sizing: border-box;
    min-height: 44px;
    padding: 0 12px !important;
    border: 1px solid color-mix(in srgb, currentColor 45%, transparent) !important;
    background: transparent !important;
    color: inherit !important;
    transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease !important;
  }
  html[data-deco-theme] body[data-detail-selected] #scroll-root .lab-header[data-mobile-sticky][data-pinned] .lhd-contact[data-demo-pill] {
    border-color: var(--atlas-red) !important;
    background: var(--atlas-red) !important;
    color: #fff !important;
  }
  body[data-detail-selected] #scroll-root .lab-header[data-mobile-sticky] .lhd-contact .demo-pill-icon {
    display: none !important;
  }
  @media (prefers-reduced-motion: reduce) {
    html[data-deco-theme] body[data-detail-selected] #scroll-root .lab-header[data-mobile-sticky] .lhd-contact[data-demo-pill] {
      transition: none !important;
    }
  }
}

.about-v .av-open:disabled { cursor: default; }
