/* Shared catalogue tokens; scoped to the residential-complex detail page. */
.complex { min-width: 0; }
.complex .detail-hero { gap: 30px; padding: 30px; background: var(--panel); border-radius: var(--radius); }
.complex .detail-heading { }
.complex .detail-heading h1 { margin: 0 0 12px; }
.complex .detail-status { margin: 0 0 12px; padding: 5px 10px; border-radius: 4px; background: var(--accent-soft); line-height: 1.4; }
.complex .detail-address { margin: 0 0 10px; height: auto; }
.complex .detail-address a { align-items: flex-start; min-height: 0; height: auto; }
.complex .detail-address span { white-space: normal; overflow: visible; text-overflow: clip; }
.complex .detail-heading .detail-address a > span { white-space: normal; overflow: visible; text-overflow: clip; }
.complex .detail-address .icon { margin-top: 3px; }
.complex .detail-developer { margin: 12px 0 0; white-space: normal; overflow-wrap: anywhere; }
.complex .detail-heading .detail-developer > a, .complex .detail-heading .detail-developer > strong { max-width: none; white-space: normal; overflow: visible; text-overflow: clip; }
.complex .hero-facts { gap: 16px 24px; margin: 20px 0 0; padding: 18px 0; }
.complex .hero-facts > div { }
.complex .hero-facts dt { }
.complex .hero-facts dd {  overflow-wrap: anywhere; }
.complex .hero-facts dd.k-muted { font-size: 16px; font-weight: 400; }
.complex .hero-more { margin: 12px 0 18px; }
.complex .hero-more .text-link { min-height: 32px; display: inline-flex; align-items: center; }
.complex .price-note { margin: 12px 0 0; font-size: 11px; line-height: 1.6; }
.complex .detail-actions { gap: 10px; }
.complex .detail-actions :is(.primary, .detail-contact-link, .favorite-button) { min-height: 44px; }
.complex .detail-contact-link { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); font-size: 13px; }
.complex .detail-media { gap: 8px; }
.complex .hero-photo-primary, .complex .hero-photo-secondary, .complex .hero-map-link { border-radius: var(--radius); }
.complex .hero-photo-primary img { height: 100%; }
.complex .location-plate { padding: 20px; }
.complex .location-plate .location-city { font-size: 26px; }
.complex .location-plate .location-district { font-size: 14px; }
.complex .detail-nav { position: sticky; z-index: 20; gap: 4px; padding: 8px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.complex .detail-nav a { padding: 8px 14px; border-radius: 4px; border: 0; text-decoration: none; }
.complex .detail-nav a:hover { background: var(--bg); }
.complex .detail-nav a[aria-current="location"] { background: var(--accent-soft); color: var(--accent); }
.complex > section { padding: 28px 30px; margin: 0 0 20px; border: 0; border-radius: var(--radius); background: var(--panel); scroll-margin-top: calc(var(--site-header-height, 0px) + 90px); min-width: 0; }
.complex > section h2 { margin: 0 0 20px; font-size: 24px; line-height: 1.3; }
.complex > section .eyebrow { margin-bottom: 8px; }
.complex > section h3 { font-size: 17px; line-height: 1.4; }
.complex .lots-head { margin-bottom: 18px; }
.complex .lots-head h2 { margin: 0; }
.complex .room-summary { gap: 12px; }
.complex .room-summary-link { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--panel); }
.complex .room-summary-link:hover { border-color: var(--accent); background: var(--accent-soft); }
.complex .room-summary-price { font-size: 21px; }
.complex .room-summary-explanation { font-size: 12px; line-height: 1.6; }
.complex .apartment-controls { gap: 16px; }
.complex .apartment-controls select { min-height: 40px; }
.complex .lots-filter { gap: 8px; margin-block: 16px; }
.complex .lots-chip { min-height: 44px; padding: 8px 16px; }
.complex .lot { padding: 18px 0; background: transparent; border-top: 1px solid var(--line); }
.complex .lots { border: 0; border-radius: 0; }
.complex .lot-main { gap: 8px 20px; font-size: 13px; }
.complex .lot-rooms { font-size: 15px; }
.complex .lot-area { font-size: 19px; }
.complex .lot-price b { font-size: 20px; }
.complex .section-empty { margin: 0; padding: 16px 18px; border-radius: 4px; background: var(--bg); font-size: 14px; line-height: 1.7; }
.complex .below { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; }
.complex .below > div { min-width: 0; }
.complex .description { max-width: 76ch; font-size: 15px; line-height: 1.75; }
.complex .description p:first-child { margin-top: 0; }
.complex .description p:last-child { margin-bottom: 0; }
.complex .factbox { margin: 0; font-size: 13px; }
.complex .factbox > div { grid-template-columns: minmax(100px, 35%) minmax(0, 1fr); gap: 14px; padding-block: 10px; }
/* Длинная подпись («Энергоэффективность») не влезала в 35 % и наезжала на
   значение: в тексте получалось «ЭнергоэффективностьB». */
.complex .factbox dt { min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.complex .factbox dd { margin: 0; overflow-wrap: anywhere; }
.complex .complex-source-details summary { display: list-item; min-height: 44px; padding: 10px 0; cursor: pointer; color: var(--accent); font-size: 14px; line-height: 1.6; }
.complex .complex-source-details summary:hover { color: var(--accent-hover); }
.complex .complex-source-details summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.complex .complex-source-content { padding-top: 16px; border-top: 1px solid var(--line); }
.complex .source-facts { max-width: 880px; }
.complex .source-buildings { margin-top: 20px; }
.complex .source-buildings th, .complex .source-buildings td { padding: 12px; font-size: 12px; line-height: 1.6; }
.complex .source-buildings thead { background: var(--bg); }
.complex .complex-source-content > .muted { margin-bottom: 0; font-size: 12px; line-height: 1.7; }
.complex .building-cards { gap: 16px; }
.complex .building-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.complex .building-card h3 { margin-bottom: 8px; }
.complex .building-addr { margin-bottom: 16px; font-size: 12px; line-height: 1.6; }
.complex .building-facts dt { font-size: 11px; }
.complex .building-facts dd { font-size: 14px; line-height: 1.5; }
.complex .layouts { gap: 16px; }
.complex .layout { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.complex .layout figcaption { margin-top: 0; padding: 16px; }
.complex .layout-no-image { height: 140px; min-height: 0; background: var(--bg); }
.complex .layout-no-image .placeholder-art { height: 100%; max-height: 110px; opacity: .7; }
.complex .layout-no-image > span { font-size: 11px; }
.complex .layout-area { font-size: 23px; }
.complex .media-empty { display: flex; align-items: center; gap: 20px; min-height: 0; padding: 18px; }
.complex .media-empty .placeholder-art { flex: 0 0 110px; width: 110px; height: 80px; margin: 0; }
.complex .media-empty p { margin: 0; max-width: 65ch; min-width: 0; flex: 1 1 160px; }
.complex .location-map-heading { gap: 16px; margin-bottom: 20px; }
.complex .location-map-heading h2 { margin: 0; }
.complex .map-single { height: 420px; border-radius: var(--radius); }
.complex .map-open-fullscreen { min-height: 44px; }
.complex .dev-card { gap: 28px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.complex .dev-name { font-size: 21px; line-height: 1.4; overflow-wrap: anywhere; }
.complex .dev-facts > div { grid-template-columns: minmax(100px, 35%) minmax(0, 1fr); }
.complex .dev-facts dd { overflow-wrap: anywhere; }
.complex .documents-list li { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.complex .documents-list p { font-size: 12px; line-height: 1.6; }
.complex .sales-contacts { gap: 30px; }
.complex .sales-contact-phone { font-size: 24px; }
.complex .sales-contact-phone a { display: inline-flex; align-items: center; min-height: 44px; }
/* Серая линия слева от контактов убрана (решение владельца 11.10.2026): без неё
   кнопки и контакты занимают всю ширину колонки и центрируются по ней. */
.complex .source { margin: 24px 0 0; font-size: 12px; line-height: 1.7; }
@media (max-width: 1000px) {
  .complex .detail-hero { gap: 24px; padding: 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .complex .detail-media { height: 380px; }
  .complex > section { padding: 24px; }
  .complex .below { gap: 24px; }
  .complex .building-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .complex .detail-hero { grid-template-columns: minmax(0, 1fr); }
  .complex .detail-media { height: 320px; }
  .complex .below, .complex .sales-contacts, .complex .dev-card { grid-template-columns: minmax(0, 1fr); }
  .complex .dev-card { gap: 20px; }
  .complex .detail-nav { margin-bottom: 16px; }
}
@media (max-width: 600px) {
  .complex .detail-hero { padding: 20px 18px; gap: 20px; margin-bottom: 16px; }
  .complex .detail-heading h1 { font-size: 28px; }
  .complex .detail-status { font-size: 11px; }
  .complex .detail-address { font-size: 12px; }
  .complex .hero-facts { gap: 14px 18px; margin-top: 16px; padding-block: 16px; }
  .complex .hero-facts dd { font-size: 18px; }
  .complex .hero-facts dd.k-muted { font-size: 15px; }
  .complex .detail-actions { display: flex; flex-wrap: wrap; }
  .complex .detail-actions .primary { flex: 1 1 auto; }
  .complex .detail-contact-link { padding-inline: 10px; font-size: 12px; }
  .complex .detail-media { height: 250px; gap: 6px; }
  .complex .detail-nav { padding: 4px; }
  .complex .detail-nav a { padding-inline: 12px; font-size: 12px; }
  .complex > section { padding: 20px 18px; margin-bottom: 16px; scroll-margin-top: calc(var(--site-header-height, 0px) + 76px); }
  .complex > section h2 { font-size: 22px; margin-bottom: 16px; }
  .complex .description { font-size: 14px; }
  .complex .factbox > div { grid-template-columns: minmax(90px, 35%) minmax(0, 1fr); gap: 12px; }
  .complex .building-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .complex .building-card { padding: 16px; }
  .complex .layouts { grid-template-columns: minmax(0, 1fr); }
  .complex .layout-no-image { height: 120px; }
  .complex .layout figcaption { padding: 14px; }
  .complex .layout-area { font-size: 22px; }
  .complex .media-empty { gap: 12px; padding: 14px; font-size: 13px; }
  .complex .media-empty .placeholder-art { flex-basis: 64px; width: 64px; height: 64px; }
  .complex .map-single { height: 340px; }
  .complex .location-map-heading { gap: 12px; margin-bottom: 16px; }
  .complex .location-map-heading h2 { margin-bottom: 0; }
  .complex .map-open-fullscreen { padding-inline: 10px; font-size: 11px; }
  .complex .dev-card { padding: 16px; }
  .complex .dev-name { font-size: 19px; }
  .complex .documents-list li { padding: 16px; }
  .complex .documents-list h3 { font-size: 15px; }
  .complex .complex-source-details summary { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.complex) { scroll-behavior: auto; }
}
