/* CarPath Premium 0.5.0 RC7.0.2 — Pixel-Perfect Reference Pass
   Calibration source: approved Stage 8.x homepage/reference crops.
   This layer intentionally overrides presentation only; Business Core remains untouched. */

/* Reference desktop shell + chrome */
@media (min-width:1121px){
  .cp-theme-final:not(.cp-system-page){--cp-shell:1600px;--cp-header-stack-runtime:98px}
  .cp-theme-final:not(.cp-system-page) .wrap{width:min(1600px,calc(100% - 64px))}
  .cp-theme-final:not(.cp-system-page) .header{background:#061828;color:#fff;box-shadow:none}
  .cp-theme-final:not(.cp-system-page) .topbar{height:58px;min-height:58px;background:#061828;grid-template-columns:170px 200px 175px minmax(250px,1fr) auto auto auto;gap:12px}
  .cp-theme-final:not(.cp-system-page) .logo{width:170px;height:48px;overflow:hidden}
  .cp-theme-final:not(.cp-system-page) .logo img{width:166px;height:46px;object-fit:contain;object-position:left center}
  .cp-theme-final:not(.cp-system-page) .top-contact{color:#fff;display:grid;grid-template-columns:18px minmax(0,1fr);gap:7px;align-items:center}
  .cp-theme-final:not(.cp-system-page) .top-contact .icon{color:#dbe7f0;width:15px;height:15px}
  .cp-theme-final:not(.cp-system-page) .top-contact b{color:#fff;font-size:12px}
  .cp-theme-final:not(.cp-system-page) .top-contact small{color:#aebdca;font-size:9px}
  .cp-theme-final:not(.cp-system-page) .cp-head-search{height:38px;display:grid;grid-template-columns:17px minmax(0,1fr);gap:8px;align-items:center;padding:0 11px;border:1px solid #21445e;border-radius:6px;background:#0b2235;color:#d4e0ea;min-width:0}
  .cp-theme-final:not(.cp-system-page) .cp-head-search .icon{width:15px;height:15px}
  .cp-theme-final:not(.cp-system-page) .cp-head-search input{width:100%;min-width:0;height:36px;padding:0;border:0;outline:0;background:transparent;color:#fff;font-size:11px}
  .cp-theme-final:not(.cp-system-page) .cp-head-search input::placeholder{color:#9fb0bf;opacity:1}
  .cp-theme-final:not(.cp-system-page) .socials{gap:5px}
  .cp-theme-final:not(.cp-system-page) .socials a,.cp-theme-final:not(.cp-system-page) .socials span{width:26px;height:26px;background:#0f2d46;color:#fff;border-radius:5px}
  .cp-theme-final:not(.cp-system-page) .socials .icon{top:6px;width:13px;height:13px}
  .cp-theme-final:not(.cp-system-page) .top-actions{gap:7px}
  .cp-theme-final:not(.cp-system-page) .header-action{color:#dbe6ef;min-width:30px}
  .cp-theme-final:not(.cp-system-page) .header-action small{font-size:8px;color:#c2d0db}
  .cp-theme-final:not(.cp-system-page) .header-action .icon{width:17px;height:17px}
  .cp-theme-final:not(.cp-system-page) .top-cta{height:38px;min-height:38px;padding:0 14px;border:1px solid #a4dd10;background:transparent;color:#b8f52b;font-size:10px;border-radius:6px}
  .cp-theme-final:not(.cp-system-page) .top-cta:hover{background:#b8f52b;color:#0a1b29}
  .cp-theme-final:not(.cp-system-page) .nav-shell{height:40px;background:#0a1d2d;border-top:1px solid rgba(255,255,255,.03)}
  .cp-theme-final:not(.cp-system-page) .nav{height:40px;min-height:40px;justify-content:center}
  .cp-theme-final:not(.cp-system-page) .nav>a,.cp-theme-final:not(.cp-system-page) .nav-button,.cp-theme-final:not(.cp-system-page) .mega-toggle{height:40px;padding:0 19px;font-size:11px;font-weight:650}
  .cp-theme-final:not(.cp-system-page) .nav .catalog-red{padding-inline:20px}
  .cp-theme-final:not(.cp-system-page) .languages{height:40px}
  .cp-theme-final:not(.cp-system-page) .languages a{font-size:10px;padding:4px 6px}

  /* Mega menu: reference density and depth */
  .cp-theme-final:not(.cp-system-page) .mega-backdrop{top:98px;inset-inline:0;bottom:0;background:rgba(2,16,28,.58)}
  .cp-theme-final:not(.cp-system-page) .mega{top:98px;width:min(1600px,calc(100% - 64px));padding:24px 26px 18px;grid-template-columns:300px minmax(0,1fr) 390px;gap:24px;border:1px solid #dbe5ef;border-top:0;border-radius:0 0 14px 14px;box-shadow:0 26px 58px rgba(3,18,31,.24)}
  .cp-theme-final:not(.cp-system-page) .mega-side>a{min-height:44px;padding:6px 8px;font-size:12px}
  .cp-theme-final:not(.cp-system-page) .mega-main h2{font-size:21px}
  .cp-theme-final:not(.cp-system-page) .mega-brands{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
  .cp-theme-final:not(.cp-system-page) .mega-brands>a{min-height:74px;font-size:11px}
  .cp-theme-final:not(.cp-system-page) .mega-brands img{max-height:38px;object-fit:contain}
  .cp-theme-final:not(.cp-system-page) .mega-promo{min-height:300px;border-radius:12px}
  .cp-theme-final:not(.cp-system-page) .mega-promo h2{font-size:26px;line-height:1.1}
  .cp-theme-final:not(.cp-system-page) .mega-promo p{font-size:11px;line-height:1.35}
  .cp-theme-final:not(.cp-system-page) .mega-services{grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}
  .cp-theme-final:not(.cp-system-page) .mega-services>a{min-height:54px;font-size:10px}

  /* Home first screen — exact reference rhythm */
  .cp-theme-final.page-home .cp-home-hero{height:390px;min-height:390px;margin:0}
  .cp-theme-final.page-home .hero-background{object-position:center center}
  .cp-theme-final.page-home .hero-shade{background:linear-gradient(90deg,rgba(2,15,26,.90) 0%,rgba(2,15,26,.73) 30%,rgba(2,15,26,.30) 48%,rgba(2,15,26,.04) 65%,rgba(2,15,26,0) 100%)}
  .cp-theme-final.page-home .hero-content{padding:34px 0 112px}
  .cp-theme-final.page-home .hero .kicker{font-size:12px;letter-spacing:.035em;text-transform:none;color:#fff}
  .cp-theme-final.page-home .hero h1{max-width:720px;font-size:52px;line-height:1.01;letter-spacing:-1.7px;margin:8px 0 10px;font-weight:820}
  .cp-theme-final.page-home .hero-content>p{max-width:600px;font-size:17px;line-height:1.2;margin-bottom:15px;color:#fff}
  .cp-theme-final.page-home .hero .actions .btn{height:44px;min-height:44px;padding:0 18px;font-size:11px;border-radius:6px}
  .cp-theme-final.page-home .stats{padding:10px 0 42px;background:linear-gradient(180deg,rgba(6,27,43,.74),rgba(6,27,43,.94))}
  .cp-theme-final.page-home .stats>.wrap{gap:24px}
  .cp-theme-final.page-home .stats>.wrap>div{gap:9px}
  .cp-theme-final.page-home .stats .icon{width:28px;height:28px}
  .cp-theme-final.page-home .stats strong{font-size:15px}
  .cp-theme-final.page-home .stats small{font-size:9px}

  /* Search overlap */
  .cp-theme-final.page-home .search-panel{margin-top:-52px;min-height:132px;padding:0 12px 12px;border:1px solid #dce6ef;border-radius:11px;box-shadow:0 10px 32px rgba(20,49,78,.11)}
  .cp-theme-final.page-home .search-tabs{height:50px;min-height:50px;margin-bottom:10px;gap:0}
  .cp-theme-final.page-home .search-tabs>span,.cp-theme-final.page-home .search-tabs>a{height:50px;padding:0 16px;font-size:11px}
  .cp-theme-final.page-home .search-primary{grid-template-columns:1.05fr 1.05fr .82fr .82fr .92fr .92fr 1.15fr;gap:10px}
  .cp-theme-final.page-home .search-form label{font-size:8px;font-weight:650}
  .cp-theme-final.page-home .search-form input,.cp-theme-final.page-home .search-form select{height:34px;margin-top:3px;font-size:10px;padding:0 8px}
  .cp-theme-final.page-home .search-primary .btn{height:39px;min-height:39px;font-size:10px}
  .cp-theme-final.page-home .search-secondary{margin-top:8px;min-height:20px;gap:9px}
  .cp-theme-final.page-home .search-secondary .filter-label,.cp-theme-final.page-home .filter-check span{font-size:9px}

  /* Home section rhythm */
  .cp-theme-final.page-home .section{margin-top:28px}
  .cp-theme-final.page-home .section-head{margin-bottom:10px}
  .cp-theme-final.page-home .section-head h2{font-size:22px;letter-spacing:-.45px}
  .cp-theme-final.page-home .section-head>a{font-size:10px}
  .cp-theme-final.page-home .home-brands{margin-top:24px}
  .cp-theme-final.page-home .brand-strip{grid-template-columns:repeat(8,minmax(0,1fr));gap:7px}
  .cp-theme-final.page-home .brand-strip>a{height:88px;min-height:88px;padding:6px 4px;border-radius:6px;font-size:10px;gap:3px}
  .cp-theme-final.page-home .brand-strip img{height:34px;width:75px;margin:0 auto 3px}
  .cp-theme-final.page-home .categories{gap:10px}
  .cp-theme-final.page-home .category{min-height:176px;border-radius:7px}
  .cp-theme-final.page-home .category h3{font-size:18px}
  .cp-theme-final.page-home .category p{font-size:10px}
  .cp-theme-final.page-home .home-vehicles .vehicle-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
  .cp-theme-final.page-home .vehicle{border-radius:7px;box-shadow:0 4px 16px rgba(14,36,54,.09)}
  .cp-theme-final.page-home .vehicle-photo{height:150px}
  .cp-theme-final.page-home .vehicle-body{padding:9px 10px 10px}
  .cp-theme-final.page-home .vehicle h3{font-size:13px}
  .cp-theme-final.page-home .vehicle p,.cp-theme-final.page-home .vehicle-meta{font-size:9px}
  .cp-theme-final.page-home .vehicle strong{font-size:16px;margin:4px 0 7px}
  .cp-theme-final.page-home .vehicle .btn{min-height:31px;font-size:10px;padding:6px 10px}

  /* Why */
  .cp-theme-final .home-benefits-band{min-height:136px}
  .cp-theme-final .home-benefits-inner{min-height:136px;padding:14px 0 16px}
  .cp-theme-final .home-benefits-band .section-head{margin-bottom:8px}
  .cp-theme-final .home-benefits-band .section-head h2{font-size:22px}
  .cp-theme-final .home-benefits-band .benefits{grid-template-columns:repeat(5,1fr);gap:9px}
  .cp-theme-final .home-benefits-band .benefits>div{min-height:70px;padding:10px 11px;border-radius:7px}
  .cp-theme-final .home-benefits-band .benefits .icon{width:28px;height:28px}
  .cp-theme-final .home-benefits-band .benefits h3{font-size:11px;margin-bottom:3px}
  .cp-theme-final .home-benefits-band .benefits p{font-size:8.5px;line-height:1.22}

  /* Process */
  .cp-theme-final.page-home .home-process{min-height:142px;padding-top:12px;padding-bottom:12px}
  .cp-theme-final.page-home .home-process .steps{grid-template-columns:repeat(8,minmax(0,1fr));gap:0}
  .cp-theme-final.page-home .home-process .steps li{padding:0 5px}
  .cp-theme-final.page-home .home-process .steps li:not(:last-child):after{left:calc(50% + 21px);right:calc(-50% + 21px);top:17px}
  .cp-theme-final.page-home .home-process .steps i{width:34px;height:34px;margin:0 auto 5px;box-shadow:0 0 0 4px #fff}
  .cp-theme-final.page-home .home-process .steps span{font-size:10px;margin:1px 0}
  .cp-theme-final.page-home .home-process .steps h3{font-size:10px;line-height:1.1;white-space:nowrap}
  .cp-theme-final.page-home .home-process .steps p{font-size:8px;line-height:1.15;max-width:132px}

  /* Ready CTA */
  .cp-theme-final .home-ready-band{min-height:116px}
  .cp-theme-final .home-ready-inner{min-height:116px;grid-template-columns:minmax(0,1.35fr) minmax(300px,.8fr) auto;gap:24px;padding:12px 0}
  .cp-theme-final .home-ready-inner h2{font-size:24px;margin:2px 0 4px}
  .cp-theme-final .home-ready-inner p{font-size:10px;line-height:1.3}
  .cp-theme-final .home-ready-inner .kicker{font-size:9px}
  .cp-theme-final .home-ready-stats{gap:4px}
  .cp-theme-final .home-ready-stats span{padding:5px 8px}
  .cp-theme-final .home-ready-stats b{font-size:12px}
  .cp-theme-final .home-ready-stats small{font-size:7px}
  .cp-theme-final .home-ready-cta{height:38px;min-height:38px;font-size:10px;border-radius:6px}

  /* Calculator */
  .cp-theme-final.page-home .calculator-band{min-height:250px;margin-top:28px}
  .cp-theme-final.page-home .calculator-grid{min-height:250px;grid-template-columns:minmax(0,1fr) 360px;gap:52px;padding:16px 0}
  .cp-theme-final.page-home .calculator-copy{max-width:520px}
  .cp-theme-final.page-home .calculator-copy h2{font-size:34px;line-height:1.03;margin:4px 0 8px}
  .cp-theme-final.page-home .calculator-copy>p{font-size:12px;max-width:440px}
  .cp-theme-final.page-home .calc-card{padding:13px 15px;border-radius:7px}
  .cp-theme-final.page-home .calc-card h3{font-size:15px}
  .cp-theme-final.page-home .calc-card>label{font-size:10px;margin:5px 0}
  .cp-theme-final.page-home .calc-card input,.cp-theme-final.page-home .calc-card select{height:31px;font-size:10px}
  .cp-theme-final.page-home .calc-card output{font-size:24px}

  /* Team, news and SEO */
  .cp-theme-final .home-team-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}
  .cp-theme-final .home-team-card{height:104px;display:grid;grid-template-columns:74px minmax(0,1fr);align-items:center;border:1px solid #dce5ef;border-radius:7px;box-shadow:none}
  .cp-theme-final .home-team-card img{width:62px;height:62px;margin-left:9px;border-radius:50%;object-fit:cover}
  .cp-theme-final .home-team-card>div{padding:8px 8px 8px 4px;min-width:0}
  .cp-theme-final .home-team-card h3{font-size:11px;line-height:1.1;margin:0 0 3px}
  .cp-theme-final .home-team-card p{font-size:8px;line-height:1.18;margin:2px 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .cp-theme-final.page-home .home-news .news-grid{gap:10px}
  .cp-theme-final.page-home .home-news .news-grid article{min-height:104px;border-radius:7px}
  .cp-theme-final.page-home .home-news .news-grid h3{font-size:11px;line-height:1.2}
  .cp-theme-final .home-seo-band{min-height:96px}
  .cp-theme-final .home-seo-inner{min-height:96px;grid-template-columns:minmax(0,1fr) 180px;gap:20px;padding:12px 0}
  .cp-theme-final .home-seo-image{width:42%;-webkit-mask-image:linear-gradient(90deg,transparent,#000 28%);mask-image:linear-gradient(90deg,transparent,#000 28%)}
  .cp-theme-final .home-seo-inner h2{font-size:17px;margin:0 0 4px}
  .cp-theme-final .home-seo-inner p{font-size:8.5px;line-height:1.3;max-width:700px}
  .cp-theme-final .home-seo-inner .kicker{font-size:8px}
  .cp-theme-final .home-seo-inner .btn{height:36px;min-height:36px;font-size:9px}

  /* Compact reference footer */
  .cp-theme-final .cp-final-footer{min-height:144px;padding:15px 0 0;background:#061827}
  .cp-theme-final .cp-final-footer__bg{opacity:.52;object-position:right center}
  .cp-theme-final .cp-final-footer__shade{background:linear-gradient(90deg,rgba(4,18,30,.99) 0%,rgba(4,18,30,.93) 48%,rgba(4,18,30,.45) 100%)}
  .cp-theme-final .footer-grid{min-height:108px;grid-template-columns:1.2fr .75fr .8fr .8fr 1.15fr;gap:22px;padding-bottom:10px}
  .cp-theme-final .footer-logo{width:150px;height:42px}
  .cp-theme-final .footer h3{font-size:9px;margin-bottom:5px}
  .cp-theme-final .footer a,.cp-theme-final .footer p{font-size:8px;line-height:1.35;margin-bottom:4px}
  .cp-theme-final .footer-contact .btn{height:34px;min-height:34px;font-size:9px}
  .cp-theme-final .footer-bottom{min-height:36px;margin-top:0;padding:8px 0;border-top:1px solid rgba(255,255,255,.08);font-size:8px;align-items:center}
}

/* Reference tablet: switch to mobile shell before desktop chrome becomes cramped */
@media (min-width:761px) and (max-width:1120px){
  .cp-theme-final.page-home .cp-home-hero{height:520px;min-height:520px}
  .cp-theme-final.page-home .hero h1{font-size:44px;line-height:1.02}
  .cp-theme-final.page-home .search-panel{margin-top:-35px}
  .cp-theme-final.page-home .brand-strip{grid-template-columns:repeat(4,minmax(0,1fr))}
  .cp-theme-final.page-home .home-vehicles .vehicle-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .cp-theme-final.page-home .home-process .steps{grid-template-columns:repeat(4,minmax(0,1fr));row-gap:18px}
  .cp-theme-final .home-team-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* Mobile keeps RC7 accessibility, but follows approved Stage 8 vertical rhythm */
@media (max-width:760px){
  .cp-theme-final.page-home .cp-home-hero{height:610px;min-height:610px}
  .cp-theme-final.page-home .hero-content{padding:24px 0 248px}
  .cp-theme-final.page-home .hero h1{font-size:34px;line-height:1.04;letter-spacing:-1px}
  .cp-theme-final.page-home .hero-content>p{font-size:14px;line-height:1.25;max-width:92%}
  .cp-theme-final.page-home .search-panel{margin-top:-35px}
  .cp-theme-final.page-home .search-tabs{height:48px;min-height:48px}
  .cp-theme-final.page-home .search-tabs>span,.cp-theme-final.page-home .search-tabs>a{height:48px;padding-inline:13px}
  .cp-theme-final.page-home .brand-strip{grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}
  .cp-theme-final.page-home .home-vehicles .vehicle-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cp-theme-final .home-benefits-band .benefits{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cp-theme-final.page-home .home-process .steps{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cp-theme-final .home-team-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cp-theme-final .home-team-card{height:112px;grid-template-columns:78px minmax(0,1fr)}
  .cp-theme-final .home-team-card img{width:64px;height:64px}
}
@media (max-width:430px){
  .cp-theme-final.page-home .hero h1{font-size:31px}
  .cp-theme-final.page-home .home-vehicles .vehicle-grid{grid-template-columns:1fr}
  .cp-theme-final .home-benefits-band .benefits{grid-template-columns:1fr}
  .cp-theme-final .home-team-grid{grid-template-columns:1fr}
  .cp-theme-final .home-team-card{height:104px}
}
