/* AutoPilot V25.43 — real mobile compare rail + visible selected cars */
@media (max-width:680px){
  html,body{width:100%!important;max-width:100%!important;overflow-x:hidden!important}
  body .page-main,body .compare-section,body .compare-section>.container,body .compare-result,
  body .compare-reference-shell-v2515{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
  body .compare-result,body .compare-reference-shell-v2515{overflow:visible!important}

  /* Selected cars are visible again. */
  body .compare-selection-meta{
    display:flex!important;align-items:flex-start!important;gap:8px!important;margin-top:10px!important;min-width:0!important
  }
  body .compare-selected{
    display:flex!important;flex:1 1 auto!important;min-width:0!important;gap:6px!important;
    overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important;
    -webkit-overflow-scrolling:touch!important;scrollbar-width:none!important;padding-bottom:2px!important;margin:0!important
  }
  body .compare-selected::-webkit-scrollbar{display:none!important}
  body .compare-chip{
    flex:0 0 auto!important;max-width:220px!important;border-radius:10px!important;padding:7px 7px 7px 10px!important;
    background:#11181d!important;border:1px solid #303b42!important
  }
  body .compare-chip span{display:block!important;max-width:170px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:11px!important}
  body .compare-chip button{flex:0 0 23px!important;width:23px!important;height:23px!important}
  body .compare-count{display:inline-flex!important;flex:0 0 auto!important;margin:0!important;padding:7px 9px!important;min-width:45px!important;font-size:11px!important}
  body .compare-hint{display:none!important}

  /* The page stays fixed. Only this viewport scrolls horizontally. */
  body .compare-table-wrap,
  body .compare-table-wrap-v2515{
    display:block!important;position:relative!important;width:100%!important;max-width:100%!important;min-width:0!important;
    overflow-x:scroll!important;overflow-y:visible!important;-webkit-overflow-scrolling:touch!important;
    touch-action:pan-x pan-y!important;overscroll-behavior-x:contain!important;
    border:1px solid #273138!important;border-radius:14px!important;background:#0a0f12!important;
    scrollbar-width:thin!important;scrollbar-color:#56616a #10161a!important;box-sizing:border-box!important;
    scroll-snap-type:x proximity!important
  }
  body .compare-table-wrap-v2515::-webkit-scrollbar{height:6px!important}
  body .compare-table-wrap-v2515::-webkit-scrollbar-track{background:#10161a!important}
  body .compare-table-wrap-v2515::-webkit-scrollbar-thumb{background:#56616a!important;border-radius:99px!important}

  /* IMPORTANT: current runtime table is v2515, not v241. */
  body .compare-table-v2515{
    display:table!important;width:max-content!important;min-width:max-content!important;max-width:none!important;
    table-layout:fixed!important;border-collapse:separate!important;border-spacing:0!important;margin:0!important
  }
  body .compare-table-v2515 th,body .compare-table-v2515 td{box-sizing:border-box!important}

  /* Sticky metric rail. */
  body .compare-table-v2515 .metric-head,
  body .compare-table-v2515 tbody>tr>th{
    position:sticky!important;left:0!important;z-index:8!important;width:138px!important;min-width:138px!important;max-width:138px!important;
    background:#0a1013!important;border-right:1px solid #2b353c!important
  }
  body .compare-table-v2515 .metric-head{z-index:12!important;padding:0!important;vertical-align:top!important}

  /* Every car keeps a readable fixed width; 3rd/4th cars stay off-screen until swiped. */
  body .compare-table-v2515 thead th:not(.metric-head),
  body .compare-table-v2515 tbody td{
    width:232px!important;min-width:232px!important;max-width:232px!important;scroll-snap-align:start!important
  }
  body .compare-table-v2515 thead th:not(.metric-head){padding:0!important;vertical-align:top!important;background:#0d1418!important}

  body .compare-intro-v2515{display:flex!important;min-height:214px!important;padding:20px 12px!important;justify-content:center!important;gap:8px!important}
  body .compare-intro-v2515 .eyebrow{display:none!important}
  body .compare-intro-v2515 strong{font-size:20px!important;line-height:1.22!important}
  body .compare-intro-v2515 small{font-size:11px!important;line-height:1.35!important}

  body .compare-car-head-v2515{position:relative!important;display:flex!important;flex-direction:column!important;align-items:center!important;min-height:214px!important;gap:4px!important;padding:0 10px 12px!important;text-align:center!important;overflow:hidden!important;background:#0d1418!important}
  body .compare-photo-v2515,body .compare-photo-placeholder-v2515{
    width:calc(100% + 20px)!important;height:128px!important;min-height:128px!important;margin:0 -10px 8px!important;border-radius:0!important;overflow:hidden!important
  }
  body .compare-photo-v2515 img{width:100%!important;height:100%!important;object-fit:cover!important}
  body .compare-car-copy-v2515{display:flex!important;flex-direction:column!important;align-items:center!important;gap:3px!important;width:100%!important;min-width:0!important}
  body .compare-car-copy-v2515 strong{width:100%!important;font-size:17px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  body .compare-car-copy-v2515 small{font-size:12px!important;color:#9aa5ac!important}
  body .compare-car-copy-v2515 a{margin-top:3px!important;color:#dfff35!important;font-size:12px!important;font-weight:850!important}
  body .compare-remove-v2515{position:absolute!important;top:8px!important;right:8px!important;z-index:4!important;width:34px!important;height:34px!important;border-radius:50%!important;background:rgba(8,13,16,.92)!important;color:#fff!important;border:1px solid rgba(255,255,255,.18)!important;font-size:20px!important}
  body .winner-badge{position:absolute!important;top:9px!important;left:9px!important;z-index:4!important;max-width:125px!important;padding:5px 8px!important;border:1px solid rgba(223,255,53,.65)!important;background:rgba(24,31,10,.84)!important;color:#dfff35!important;font-size:9px!important;white-space:nowrap!important}

  body .compare-table-v2515 tbody>tr>th{padding:11px 10px!important;color:#e0e6e9!important;font-size:11px!important;font-weight:800!important;line-height:1.2!important;white-space:normal!important}
  body .compare-table-v2515 tbody td{padding:11px 8px!important;background:#0d1418!important;color:#f2f5f6!important;font-size:12px!important;font-weight:700!important;line-height:1.25!important;text-align:center!important;overflow-wrap:anywhere!important;border-right:1px solid #293239!important}
  body .compare-table-v2515 .metric-winner{background:linear-gradient(90deg,rgba(110,154,25,.22),rgba(223,255,53,.08))!important;color:#e8ff5a!important}
  body .compare-table-v2515 .mini-win{display:inline-grid!important;place-items:center!important;width:18px!important;height:18px!important;margin-left:5px!important;border-radius:50%!important;background:#dfff35!important;color:#081012!important;font-size:10px!important}

  body .compare-add-more-v2515{width:100%!important;max-width:100%!important;margin-top:12px!important}
  body .compare-legend-v2515{font-size:10px!important;line-height:1.4!important}
}
