/* v6: Search filter rail folds too. v5: mobile-filters-v2.js folds sticky filter panels visually (no height or scroll change); Markets filters match Guides. */
/* Mobile readability pass (Oct 14, 2026). Phone widths only: every rule sits inside max-width:700px,
   and the stylesheet link also carries media="(max-width:700px)", so desktop rendering is untouched. */
@media (max-width:700px){
 /* Article reading columns: comfortable 20px side gutters instead of the inherited 96vw. */
 .line-article .line-article-columns.page-width,
 .feature-reading.page-width{width:auto!important;max-width:none!important;margin-left:20px!important;margin-right:20px!important;box-sizing:border-box}
 .guide-full-assessment.page-width{width:100%!important;padding-left:20px!important;padding-right:20px!important;box-sizing:border-box}

 /* Car names on market cards (home carousel, Markets): scaled for phones, full title, no clipping. */
 .market-show-card .market-show-title .model,
 .catalog-grid .catalog-card.catalog-card .market-show-title .model,
 .catalog-card .market-show-title .model{font-size:clamp(28px,8vw,36px)!important;line-height:1.02!important;display:block!important;-webkit-line-clamp:unset!important;overflow:visible!important;max-width:100%!important;overflow-wrap:break-word}
 .catalog-grid .catalog-card.catalog-card .market-show-title,
 .market-show-card .market-show-title{height:auto!important;overflow:visible!important}

 /* Market record tables: readable cells, table keeps its own horizontal scroll. */
 .v123-table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
 .evidence-table-record td{font-size:13px!important;line-height:1.4!important}
 .evidence-table-record th{font-size:12px!important}
 .evidence-table-record td small{font-size:11.5px!important;line-height:1.35!important}

 /* Newsletter: one column, full-width readable button. Presentation only. */
 .email-form{grid-template-columns:minmax(0,1fr)!important;row-gap:12px!important}
 .email-form>*{grid-column:1/-1!important}
 .email-form input[type=email]{width:100%!important;box-sizing:border-box;min-height:48px}
 .email-form button{width:100%!important;min-height:48px!important;font-size:14px!important;letter-spacing:.08em;margin:0!important}
 .email-form [role=status]{font-size:14px!important;line-height:1.45!important;margin:0!important}

 /* Small info controls: 44px touch area via an invisible hit box; the icon stays the same size. */
 .rc-tip,.v125-graph-info summary{position:relative}
 .rc-tip::after,.v125-graph-info summary::after{content:"";position:absolute;left:50%;top:50%;width:44px;height:44px;transform:translate(-50%,-50%)}

 /* Search: Era and Collection side by side, Content full width; no truncated selects or overlapping count. */
 .site-search .search-discovery{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px 16px!important;align-items:end}
 .site-search .search-discovery>.rc-rail-search{grid-column:1/-1}
 .site-search .search-discovery .taxonomy-filter-row{display:contents!important}
 .site-search .search-discovery .taxonomy-filter-row>label{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:6px!important;min-width:0!important;width:auto!important;font-size:11px!important}
 .site-search .search-discovery .taxonomy-filter-row select{width:100%!important;min-width:0!important;min-height:44px;font-size:14px!important}
 .site-search .search-discovery .search-type-control{grid-column:1/-1}
 .site-search .search-discovery>.rc-rail-count{grid-column:1/-1;position:static!important;justify-self:end;font-size:12px!important}
 /* Search cards: score line and link readable. */
 .site-search.site-search .search-mixed-grid .search-guide:is(*,:hover) .search-card-foot :is(small,span){font-size:13px!important;line-height:1.4!important}
 .site-search.site-search .search-mixed-grid .search-guide:is(*,:hover) .search-card-kicker{font-size:12px!important}

 /* Guide page hero: never clip the car or the handwritten note; note sits above the car. */
 [data-surface]>.taxonomy-hero,.guide-page .taxonomy-hero{max-height:none!important;display:flex!important;flex-direction:column!important;justify-content:flex-start!important}
 /* Same clip on guide/market heroes built on .market-hero (Defender, market pages). */
 [data-surface]>.market-hero,.market-page>.market-hero{max-height:none!important;height:auto!important}
 .guide-page .taxonomy-hero>.rc-hero-line{order:2;margin:18px 12px 4px!important;align-self:center;transform:rotate(-3deg)!important}
 .guide-page .taxonomy-hero>img{order:3;align-self:center;width:100%!important;height:auto!important;max-height:200px!important;margin:-12px 0 0!important}

 /* David Luk (PR #47) phone layout fixes, CSS only. Origin-story garage photos as a grid. */
 .intro-editorial .editorial-margin:has(.owned-car-note){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 20px;align-items:start;width:100%;min-width:0}
 .intro-editorial .editorial-margin>b,.intro-editorial .editorial-margin>span,.intro-editorial .editorial-margin>a{grid-column:1/-1;margin:0}
 .intro-editorial .editorial-margin .owned-car-note{width:100%!important;min-width:0;max-width:none!important;margin:0!important}
 .intro-editorial .editorial-margin .owned-car-note img{width:100%!important;max-width:100%!important;height:100px!important;margin:0;object-fit:contain}
 .intro-editorial .editorial-margin .owned-car-note figcaption{font-size:18px;line-height:1.35;margin:12px 0 0;transform:none;overflow-wrap:break-word}
 .intro-editorial .editorial-margin .owned-car-note>i{top:12px;height:65px}
 /* Weekly story shortcuts: two-column, even phone targets. */
 .weekly-story .editorial-jumps{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:0!important;width:100%;margin:0;padding:0;border:0}
 .weekly-story .editorial-jumps a{display:flex;align-items:center;justify-content:center;min-width:0;min-height:52px;box-sizing:border-box;padding:12px 14px!important;font-size:14px!important;line-height:1.35!important;text-align:center;white-space:normal!important;overflow-wrap:break-word;border:0!important;border-bottom:1px solid #ffffff30!important}
 .weekly-story .editorial-jumps a:nth-child(odd){border-right:1px solid #ffffff30!important}
 .weekly-story .editorial-jumps a:focus-visible{outline:2px solid #ff2c86;outline-offset:-3px}
 /* Weekly stories: hide the duplicate "In this story" side nav (the shortcut bar already covers it). */
 .weekly-story .editorial-reading-margin{display:none!important}
 /* Footer (David, Oct 14 round 21): 90px badge centred across the full footer, less space above it, ~30px before the
    colour strip; legal links sit closer together but each stays a 44px-tall tap target. Wordmark and copy untouched. */
 footer.footer-v42 .footer-badge{grid-column:1/-1!important;justify-self:center!important;margin:-14px 0 0!important}
 footer.footer-v42 nav{row-gap:0!important;gap:0!important}
 footer.footer-v42 nav>a,footer.footer-v42 nav>button{min-height:44px!important;margin-top:0!important;margin-bottom:0!important;display:flex!important;align-items:center!important}
 /* Home / Markets "Featured cars" cards: car centred between the title and the score band. */
 .market-showcase .market-show-card{display:flex!important;flex-direction:column!important;padding-bottom:150px!important}
 .market-showcase .market-show-card>.market-show-title{flex:0 0 auto}
 .market-showcase .market-show-card>.market-show-car{margin-top:auto!important;margin-bottom:auto!important;align-self:center!important;flex:0 0 auto}

 /* v5 sticky filter panels (assets/mobile-filters-v2.js). Folding is visual only: the panel keeps its full size in
    the page; clip-path shows just the top bar and visibility hides the controls, so page height and scroll never change. */
 [data-rc-mf2]{--rc-mf2-h:52px}
 [data-rc-mf2] .rc-mf2-bar{position:absolute;z-index:5;top:0;left:0;right:0;height:var(--rc-mf2-h);display:flex;align-items:center;gap:10px;margin:0;padding:0 20px;border:0;border-bottom:1px solid #17232b;border-radius:0;background:#f2ecdf;color:#17232b;font:600 14px/1 var(--sans);letter-spacing:.02em;text-align:left;cursor:pointer;-webkit-appearance:none;appearance:none;visibility:hidden;pointer-events:none;opacity:0;-webkit-tap-highlight-color:transparent}
 .site-search .search-discovery[data-rc-mf2] .rc-mf2-bar{background:#f1eee6}
 .market-page .v123-filters[data-rc-mf2] .rc-mf2-bar{left:calc(50% - 50vw);right:auto;width:100vw;background:#ede9de} /* CSS full-bleed: correct on first paint, no JS measurement (Oct 16 fix, reapplied) */
 [data-rc-mf2] .rc-mf2-label{flex:0 0 auto}
 [data-rc-mf2] .rc-mf2-count:not(:empty){display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#c9236c;color:#fff;font:700 12px/1 var(--sans);box-sizing:border-box}
 [data-rc-mf2] .rc-mf2-chev{margin-left:auto;width:10px;height:10px;border-right:1.5px solid #17232b;border-bottom:1.5px solid #17232b;transform:translateY(-3px) rotate(45deg)}
 [data-rc-mf2] .rc-mf2-bar:focus:not(:focus-visible){outline:none}
 [data-rc-mf2] .rc-mf2-bar:focus-visible{outline:2px solid #c62177;outline-offset:-3px}
 [data-rc-mf2]{-webkit-clip-path:inset(-40px -100vw -300vh -100vw);clip-path:inset(-40px -100vw -300vh -100vw);transition:none!important} /* no animated reveal: an iOS flash-open used to show as a blank box mid-transition */
 [data-rc-mf2=folded]{-webkit-clip-path:inset(0 -100vw calc(100% - var(--rc-mf2-h)) -100vw);clip-path:inset(0 -100vw calc(100% - var(--rc-mf2-h)) -100vw);pointer-events:none}
 [data-rc-mf2=folded]>*:not(.rc-mf2-bar){visibility:hidden}
 [data-rc-mf2=folded] .rc-mf2-bar{visibility:visible;pointer-events:auto;opacity:1}
 .evidence-filters.evidence-sticky[data-rc-mf2] .rc-mf2-bar{background:var(--paper,#f2ecdf)}
 dialog [data-rc-mf2]{-webkit-clip-path:none!important;clip-path:none!important;pointer-events:auto!important}
 dialog [data-rc-mf2]>*:not(.rc-mf2-bar){visibility:inherit!important}
 dialog [data-rc-mf2] .rc-mf2-bar{display:none!important}

 /* Markets filter panel matches Guides: full-width Make/Era selects, same "More filters" size, Collection box styled like a select. */
 .catalog-filters .discovery-main>label{width:100%!important;min-width:0!important}
 .catalog-filters .discovery-main>label select{width:100%!important;min-width:0!important;height:44px!important;min-height:44px!important}
 .catalog-filters .discovery-main>label{letter-spacing:.08em!important}
 .catalog-filters [data-filter-expand]{font-size:13px!important;padding:8px 10px!important}
 .catalog-filters .collection-picker>summary{font-size:13px!important}
 .catalog-filters .collection-picker>summary:after{content:""!important;border:0!important;transform:translateY(-50%)!important;top:50%!important;right:4px!important;width:9px!important;height:14px!important;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='14' viewBox='0 0 9 14'%3E%3Cpath d='M1 5l3.5-3.5L8 5M1 9l3.5 3.5L8 9' fill='none' stroke='%2317232b' stroke-width='1.5'/%3E%3C/svg%3E") center/9px 14px no-repeat!important}

 /* Market record filters: "Show" gets the full row so its value isn't truncated. */
 .market-page .v123-filters>label:has([data-v123-filter=view]){grid-column:1/-1!important}
 .market-page .v123-filters>label:has([data-v123-filter=view]) select{width:100%!important}
}

/* v8 (phones, with assets/mobile-filters-v2.js v3): the market "Listings, sales & bids" heading sticks right under the
   folded Filters bar instead of under the panel's full (invisible) height, stays inside its own section, and folds to
   a one-line bar while stuck. Its box keeps its height (set inline by the script), so rows never shift. */
@media (max-width:700px){
 .v127-market .v128-record-panel>.evidence-heading{top:var(--rc-mf2-stack,123px)!important;transition:none!important}
 .v127-market .v128-record-panel>.evidence-heading[data-rc-rec=folded]{clip-path:inset(0 0 calc(100% - 50px) 0);align-items:flex-start!important;padding-top:8px!important;padding-bottom:0!important}
 .v127-market .v128-record-panel>.evidence-heading[data-rc-rec=folded]>*{margin-top:0!important}
 .v127-market .v128-record-panel>.evidence-heading[data-rc-rec=folded]:before,.v127-market .v128-record-panel>.evidence-heading[data-rc-rec=folded]:after,.v127-market .v128-record-panel>.evidence-heading[data-rc-rec=folded] .v132-record-accent{visibility:hidden}
 .v127-market .v128-record-panel>.evidence-heading[data-rc-rec=folded] h2{font-size:21px!important;line-height:34px!important;margin:0!important}
 .v127-market .v128-record-panel>.evidence-heading[data-rc-rec=folded] h2~*{visibility:hidden}
 .v127-market .v128-record-panel>.evidence-heading[data-rc-rec=folded] .v128-records-open{padding-top:6px!important;padding-bottom:6px!important}
 .v127-market .v128-record-panel>.evidence-heading[data-rc-rec]{transform:translateZ(0)}
 [data-rc-mf2]{-webkit-transform:translateZ(0)}
}
