/* MIDAS v22 — unified responsive header, Stage 1 dark theme, dark maps */

/* ---------- Unified header scaling on every public page ---------- */
@media (min-width:901px){
  .midas-header-v6{
    min-width:0!important;
    overflow:hidden!important;
  }
  .midas-header-inner{
    width:min(1490px,calc(100% - 32px))!important;
    max-width:1490px!important;
    height:78px!important;
    margin:0 auto!important;
    padding:0!important;
    display:grid!important;
    grid-template-columns:clamp(96px,12.4vw,190px) minmax(0,1fr) clamp(228px,23vw,350px)!important;
    gap:clamp(7px,1.8vw,28px)!important;
    align-items:center!important;
    min-width:0!important;
  }
  .midas-brand-v6{min-width:0!important;height:64px!important;display:flex!important;align-items:center!important;overflow:hidden!important}
  .midas-brand-v6 img{
    display:block!important;
    width:clamp(92px,10.1vw,155px)!important;
    max-width:100%!important;
    height:auto!important;
    max-height:55px!important;
    object-fit:contain!important;
    object-position:left center!important;
  }
  .midas-nav-v6{
    min-width:0!important;
    display:flex!important;
    height:100%!important;
    align-items:center!important;
    justify-content:center!important;
    gap:clamp(5px,1.75vw,27px)!important;
    white-space:nowrap!important;
    overflow:visible!important;
  }
  .midas-nav-v6 a{
    min-width:0!important;
    height:100%!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    font-size:clamp(8.2px,.91vw,14px)!important;
    line-height:1!important;
    font-weight:600!important;
    letter-spacing:0!important;
    white-space:nowrap!important;
    flex:0 1 auto!important;
  }
  .midas-actions-v6{
    min-width:0!important;
    width:100%!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:clamp(4px,.58vw,9px)!important;
    overflow:visible!important;
  }
  .social-circle{
    flex:0 0 auto!important;
    width:clamp(23px,2.08vw,32px)!important;
    height:clamp(23px,2.08vw,32px)!important;
    border-radius:clamp(6px,.59vw,9px)!important;
  }
  .social-circle.tg svg{width:60%!important;height:60%!important}
  .social-circle.max img{width:100%!important;height:100%!important}
  .social-circle.avito img{width:69%!important;height:69%!important}
  .phone-btn-v6{
    flex:0 1 clamp(148px,15.75vw,242px)!important;
    width:clamp(148px,15.75vw,242px)!important;
    min-width:0!important;
    max-width:242px!important;
    height:clamp(42px,3.65vw,56px)!important;
    padding:0 clamp(7px,.9vw,14px)!important;
    border-radius:8px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    align-items:flex-start!important;
    overflow:hidden!important;
    white-space:nowrap!important;
  }
  .phone-btn-v6:has(.phone-icon-ref){
    display:grid!important;
    grid-template-columns:clamp(19px,1.82vw,28px) minmax(0,1fr)!important;
    column-gap:clamp(5px,.65vw,10px)!important;
    align-items:center!important;
  }
  .phone-btn-v6 .phone-icon-ref{width:clamp(19px,1.82vw,28px)!important;height:clamp(19px,1.82vw,28px)!important}
  .phone-btn-v6 .phone-copy-ref{min-width:0!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important}
  .phone-btn-v6 strong{font-size:clamp(9.5px,1.05vw,16px)!important;line-height:1.05!important;white-space:nowrap!important}
  .phone-btn-v6 span{font-size:clamp(6.8px,.68vw,10px)!important;line-height:1.05!important;margin-top:clamp(2px,.32vw,5px)!important;white-space:nowrap!important}

  /* No element keeps a stale inline zoom size. */
  .midas-header-inner,.midas-brand-v6,.midas-brand-v6 img,.midas-nav-v6,.midas-nav-v6 a,
  .midas-actions-v6,.social-circle,.phone-btn-v6,.phone-btn-v6 strong,.phone-btn-v6 span{
    transition:none!important;
    transform:none!important;
  }
}

/* Match the home page's responsive collapse when zoom makes the CSS viewport narrow. */
@media (max-width:900px){
  .midas-header-v6{overflow:visible!important}
  .midas-header-inner{
    width:calc(100% - 24px)!important;
    height:70px!important;
    grid-template-columns:clamp(118px,24vw,155px) minmax(0,1fr) auto!important;
    gap:8px!important;
    padding:0!important;
  }
  .midas-brand-v6 img{width:clamp(112px,22vw,145px)!important;height:auto!important}
  .midas-menu-btn{display:inline-flex!important;grid-column:3!important;grid-row:1!important;align-items:center!important;justify-content:center!important}
  .midas-nav-v6{display:none!important}
  .midas-nav-v6.open{
    display:flex!important;position:absolute!important;top:70px!important;left:12px!important;right:12px!important;height:auto!important;
    flex-direction:column!important;align-items:stretch!important;gap:0!important;background:#09090b!important;
    border:1px solid rgba(255,255,255,.11)!important;border-radius:12px!important;padding:8px!important;z-index:10000!important;
  }
  .midas-nav-v6.open a{height:auto!important;font-size:14px!important;padding:12px!important}
  .midas-actions-v6{grid-column:2!important;grid-row:1!important;justify-self:end!important;margin:0!important;gap:5px!important;min-width:0!important}
  .midas-actions-v6 .social-circle{width:26px!important;height:26px!important}
  .midas-actions-v6 .phone-btn-v6{display:none!important}
}
@media(max-width:560px){
  .midas-actions-v6{display:none!important}
}

/* ---------- Stage 1: black/red/white visual system ---------- */
body.stage-v11,
body.stage-v11 main,
body.stage-v11 .stage-v11-hero,
body.stage-v11 .stage-results-section,
body.stage-v11 .stage-description-after,
body.stage-v11 section,
body.stage-v11 .section,
body.stage-v11 .section.alt,
body.stage-v11 .wrap,
body.stage-v11 .contactbox{
  background-color:#050506!important;
  color:#f3f3f5!important;
}
body.stage-v11 .stage-v11-hero{
  background:
    linear-gradient(90deg,rgba(3,3,4,.96) 0%,rgba(3,3,4,.76) 46%,rgba(3,3,4,.30) 100%),
    url("midas-hero-wide.png") center/cover no-repeat!important;
}
body.stage-v11 .stage-top-selector h1{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
body.stage-v11 .stage-top-selector .eyebrow,
body.stage-v11 .stage-result-heading,
body.stage-v11 .stage-result-heading .eyebrow,
body.stage-v11 .stage-summary-copy .eyebrow,
body.stage-v11 h3,
body.stage-v11 .card h3,
body.stage-v11 .step h3,
body.stage-v11 .stage-benefits-panel h3,
body.stage-v11 .stage-benefits-column h4{
  color:#e50918!important;
}
body.stage-v11 h1,body.stage-v11 h2,
body.stage-v11 p,body.stage-v11 li,body.stage-v11 .lead,
body.stage-v11 .stage-summary-copy p,body.stage-v11 .stage-summary-copy li,
body.stage-v11 .stage-engine-card p,body.stage-v11 .stage-engine-card li{
  color:#f1f1f3!important;
}

/* Brand/model selectors: dark idle state, red persistent selection. */
body.stage-v11 .stage-brand-grid,
body.stage-v11 .stage-brand-panel:not(:empty){
  background:rgba(7,8,10,.48)!important;
  border-color:rgba(255,255,255,.12)!important;
}
body.stage-v11 .stage-brand-grid .stage-brand,
body.stage-v11 .stage-model-button{
  color:#eee!important;
  -webkit-text-fill-color:#eee!important;
  background:linear-gradient(180deg,#34363a 0%,#18191c 52%,#0d0e10 100%)!important;
  border:1px solid rgba(255,255,255,.15)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 0 0 1px rgba(229,9,24,.04)!important;
}
body.stage-v11 .stage-brand-grid .stage-brand:hover,
body.stage-v11 .stage-brand-grid .stage-brand.active,
body.stage-v11 .stage-brand-grid .stage-brand[aria-selected="true"],
body.stage-v11 .stage-model-button:hover,
body.stage-v11 .stage-model-button.active,
body.stage-v11 .stage-model-button[aria-selected="true"]{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  background:linear-gradient(180deg,#c60d19 0%,#8f0710 58%,#5f060b 100%)!important;
  border-color:#f32131!important;
  box-shadow:0 0 11px rgba(229,9,24,.42),inset 0 1px 0 rgba(255,255,255,.13)!important;
}

/* Every Stage card/panel must stay black/graphite; no white canvas behind cards. */
body.stage-v11 .card,
body.stage-v11 .step,
body.stage-v11 .notice,
body.stage-v11 .contactbox,
body.stage-v11 .stage-vehicle-result,
body.stage-v11 .stage-result-card,
body.stage-v11 .stage-model-summary,
body.stage-v11 .stage-engine-card,
body.stage-v11 .stage-full-data,
body.stage-v11 .stage-benefits-panel,
body.stage-v11 .stage-comparison-table,
body.stage-v11 .stage-table-head,
body.stage-v11 .stage-table-row,
body.stage-v11 .stage-growth-chart,
body.stage-v11 .stage-related-media,
body.stage-v11 .related-media-item{
  background:#0c0d10!important;
  background-color:#0c0d10!important;
  color:#f0f0f2!important;
  border-color:rgba(255,255,255,.10)!important;
}
body.stage-v11 .stage-table-head,
body.stage-v11 .stage-table-row,
body.stage-v11 .stage-full-row,
body.stage-v11 .stage-full-data-grid>div{
  background-color:#121317!important;
  color:#ececef!important;
  border-color:rgba(255,255,255,.08)!important;
}
body.stage-v11 .stage-model-summary img{background:#111216!important}
body.stage-v11 .stage-engine-meta span,
body.stage-v11 .stage-data-status,
body.stage-v11 small{color:#c3c5ca!important}

/* ---------- Yandex maps: actual dark widget request + dark fallback ---------- */
.contact-map-v13{background:#07080a!important}
iframe[src*="yandex.ru/map-widget"]{
  background:#07080a!important;
  filter:brightness(.48) contrast(1.28) saturate(.55)!important;
  color-scheme:dark!important;
}
