/* v102: contrast/readability pass
   Goal: normal text >= WCAG AA 4.5:1 on light surfaces. */
:root{
  --read-ink:#111827;
  --read-body:#334155;
  --read-muted:#475569;
  --read-link:#1d4ed8;
  --read-link-hover:#1e40af;
  --read-soft:#f8fafc;
  --read-selected:#eff6ff;
  --read-line:#cbd5e1;
  --read-danger:#991b1b;
}

/* Base text hierarchy */
body.site-modernized{color:var(--read-ink)!important}
body.site-modernized :where(h1,h2,h3,h4,h5,h6,strong,b){color:var(--read-ink)}
body.site-modernized main :where(p,li,dd,dt,figcaption,label,small),
body.site-modernized :where(.note,.caption,.compare-note,.policy-lead){
  color:var(--read-muted)!important;
}

/* Never let legacy light-on-dark hero colors survive after heroes became white. */
body.site-modernized :where(
  .hero,.compare-hero,.recommend-hero,.bike-hero,.bike-rec-hero,.bike-goods-hero,
  .goods-hero,.feedback-hero,.insurance-hero,.sg-hero,.vg-hero,.rank-hero,
  .shell>.hero,.guide-hero,.seo-hero,.vehicle-hero
) :where(p,small,span,li){
  color:var(--read-muted)!important;
}
body.site-modernized :where(
  .hero,.compare-hero,.recommend-hero,.bike-hero,.bike-rec-hero,.bike-goods-hero,
  .goods-hero,.feedback-hero,.insurance-hero,.sg-hero,.vg-hero,.rank-hero,
  .shell>.hero,.guide-hero,.seo-hero,.vehicle-hero
) :where(h1,h2,h3,strong,b){
  color:var(--read-ink)!important;
}
body.site-modernized .hero h1 em,
body.site-modernized .bike-clean-page .clean-bike-hero h1 em{
  color:var(--read-ink)!important;
  font-style:normal!important;
}
body.site-modernized :where(.eyebrow,.rec-eyebrow,.result-label){
  color:var(--read-link)!important;
}
body.site-modernized .hero-pr,
body.site-modernized .result .caption,
body.site-modernized .result .note{
  color:var(--read-muted)!important;
}

/* Remove old dark strips / fades that can sit over light v101 heroes. */
body.site-modernized .recommend-hero::before,
body.site-modernized .compare-hero::before,
body.site-modernized .goods-hero::before,
body.site-modernized .bike-hero::before,
body.site-modernized .bike-rec-hero::before,
body.site-modernized .bike-goods-hero::before,
body.site-modernized .feedback-hero::before,
body.site-modernized .insurance-hero::before,
body.site-modernized .sg-hero::before,
body.site-modernized .vg-hero::before,
body.site-modernized .rank-hero::before,
body.site-modernized .recommend-hero::after,
body.site-modernized .compare-hero::after,
body.site-modernized .goods-hero::after,
body.site-modernized .bike-hero::after,
body.site-modernized .bike-rec-hero::after,
body.site-modernized .bike-goods-hero::after{
  display:none!important;
}

/* Accent blue: replace the older #0875ee that is slightly weak for small text. */
body.site-modernized :where(
  .timing-status,.timing-secondary,.favorites-bar-title em,
  .compare-number,.add-third-btn,.rec-step-badge,.question-block h3>span,
  .rec-result-head>span,.rec-score b,.rec-car button,
  .goods-tag,.ranking-head small,.ranking-head>a,.product-score,.product-sub-link,
  .quick-good>small,.conversion-copy small
){
  color:var(--read-link)!important;
}
body.site-modernized main a:not(.primary):not(.secondary-v6):not(.conversion-primary):not(.product-main-link):not(.rakuten-buy){
  text-decoration-color:currentColor;
}
body.site-modernized :where(.product-sub-link,.ranking-head>a){color:var(--read-link)!important}
body.site-modernized :where(.product-sub-link,.ranking-head>a):hover{color:var(--read-link-hover)!important}

/* Home and calculator supporting copy */
body.site-modernized :where(
  .head p,.section-title p,.info-grid p,.model-card span,
  .period-title p,.period-card .gross,.period-card .net-label,.period-card .monthly,
  .timing-copy small,.timing-copy p,.timing-stats span,.timing-note,
  .main-metric-label,.money-line span
){
  color:var(--read-muted)!important;
}

/* Favorites / utility bar */
body.site-modernized :where(
  .favorites-bar-title small,.favorite-empty,.favorite-chip small,.favorite-chip button,
  .favorites-bar-actions>button,.favorites-compare.disabled,.mini-favorite-btn
){
  color:var(--read-muted)!important;
}
body.site-modernized .favorites-bar-title>span{color:var(--read-danger)!important}
body.site-modernized .favorites-compare.disabled{
  background:#f1f5f9!important;
  border-color:var(--read-line)!important;
  opacity:1!important;
}

/* Compare page */
body.site-modernized :where(
  .compare-result-card small,.compare-result-card p,.compare-result-card>span,
  .compare-winner p,.compare-note,.fuel-price-head small,.fuel-price-panel>p,
  .fuel-source-note,.compare-count-switch button>small,.compare-subheading span,
  .slot-title button
){
  color:var(--read-muted)!important;
}
body.site-modernized .compare-count-switch button.active,
body.site-modernized .period-switch button.active,
body.site-modernized .brand-chip.active,
body.site-modernized .goods-filter button.active,
body.site-modernized .choice-grid input:checked+span{
  color:var(--read-link)!important;
  background:var(--read-selected)!important;
  border-color:#93c5fd!important;
}

/* Recommendation page */
body.site-modernized :where(
  .recommend-intro p,.rec-result-head p,.rec-placeholder,.rec-placeholder p,
  .rec-car small,.rec-reasons span,.recommend-next p
){
  color:var(--read-muted)!important;
}
body.site-modernized .rec-placeholder b{color:var(--read-body)!important}
body.site-modernized .rec-car button{
  color:var(--read-link)!important;
  background:#fff!important;
  border-color:#93c5fd!important;
}

/* Goods / affiliate supporting copy */
body.site-modernized :where(
  .goods-card p,.goods-card small,.goods-car-select p,.affiliate-note p,
  .affiliate-flow b,.rank-product>small,.rank-product p,.demo-link-note
){
  color:var(--read-muted)!important;
}
body.site-modernized .affiliate-flow b{font-weight:700!important}
body.site-modernized .demo-link-note{font-size:10px!important}
body.site-modernized .goods-card small,
body.site-modernized .rank-product>small{font-size:10px!important}

/* Forms: labels, placeholders, disabled states must remain readable. */
body.site-modernized label{color:var(--read-body)!important}
body.site-modernized input::placeholder,
body.site-modernized textarea::placeholder{color:#64748b!important;opacity:1!important}
body.site-modernized :where(input,select,textarea):disabled,
body.site-modernized :where(input,select,textarea)[readonly]{
  color:var(--read-body)!important;
  background:#f1f5f9!important;
  opacity:1!important;
}
body.site-modernized option{color:var(--read-ink)!important;background:#fff!important}

/* Tables */
body.site-modernized :where(table,th,td){color:var(--read-body)!important}
body.site-modernized th{
  color:var(--read-body)!important;
  background:var(--read-soft)!important;
  font-weight:800!important;
}
body.site-modernized td{background:#fff!important}
body.site-modernized table :where(small,span){color:var(--read-muted)!important}

/* Badges / chips: dark text on very light fills. */
body.site-modernized :where(
  .pill,.rec-step-badge,.catalog-badge,.best-period-badge,.best-label,.goods-tag,
  .product-score,.fuel-live-badge,.data-quality,.rec-reasons span,.affiliate-flow span,
  .badge,.chip,.tag
){
  color:var(--read-body)!important;
  background:var(--read-soft)!important;
}
body.site-modernized :where(.fuel-live-badge.live,.status-ok,.is-success){
  color:#166534!important;
  background:#f0fdf4!important;
}
body.site-modernized :where(.status-warn,.warning,.best-period-badge){
  color:#854d0e!important;
  background:#fffbeb!important;
}

/* Buttons and any text inside them keep high contrast. */
body.site-modernized :where(
  .primary,.calc,.compare-run-btn,.recommend-btn,.recommend-submit,
  button[type="submit"],.valuation a,.recommend-next a,.goods-car-box button,
  .vehicle-goods-box button,.conversion-actions .conversion-primary,
  .product-main-link,.rakuten-buy,.product-sticky-cta a
){
  background:var(--read-link)!important;
  border-color:var(--read-link)!important;
  color:#fff!important;
}
body.site-modernized :where(
  .primary,.calc,.compare-run-btn,.recommend-btn,.recommend-submit,
  button[type="submit"],.valuation a,.recommend-next a,.goods-car-box button,
  .vehicle-goods-box button,.conversion-actions .conversion-primary,
  .product-main-link,.rakuten-buy,.product-sticky-cta a
) :where(span,small,b,strong){
  color:#fff!important;
}
body.site-modernized .secondary-v6{
  background:#fff!important;
  border-color:#94a3b8!important;
  color:var(--read-body)!important;
}

/* Footer */
body.site-modernized footer{color:var(--read-muted)!important;background:#fff!important}
body.site-modernized footer :where(span,small,p){color:var(--read-muted)!important}
body.site-modernized footer :where(b,strong){color:var(--read-ink)!important}
body.site-modernized footer a{color:var(--read-link)!important}

/* Selection / focus visibility */
body.site-modernized ::selection{background:#dbeafe;color:var(--read-ink)}
body.site-modernized :where(a,button,input,select,textarea,summary):focus-visible{
  outline:3px solid #93c5fd!important;
  outline-offset:2px!important;
}

/* Mobile: do not shrink important supporting text into unreadable sizes. */
@media(max-width:680px){
  body.site-modernized main :where(p,li,dd,dt,figcaption){font-size:max(12px,1em)}
  body.site-modernized :where(.note,.caption,.compare-note,.demo-link-note){font-size:10px!important;line-height:1.6!important}
  body.site-modernized :where(.goods-card small,.rank-product>small,.rec-car small,.fuel-price-head small){font-size:10px!important}
}


/* integrated v103 white background = black text */
:root{
  --white-text-black:#111111;
}

/* Page canvas */
body.site-modernized{
  background:#fff!important;
  color:var(--white-text-black)!important;
}

/* White surfaces: all readable copy becomes black. */
body.site-modernized :where(
  header,.site-global-header,.clean-header,
  main,section,article,aside,
  .panel,.result,.recommend-form,.recommend-result,
  .compare-controls,.compare-results-section,.compare-slot,.common-condition-card,
  .compare-result-card,.compare-winner,
  .goods-section,.goods-card,.rank-product,.ranking-head,.goods-car-select,
  .goods-upgrade-panel,.vehicle-goods-section,.affiliate-note,
  .guide-card,.shell .card,.period-block,.period-card,.best-period-card,
  .money-summary,.fuel-price-panel,.conversion-inner,
  .home-shortcut,.model-card,.rec-car,.quick-good,.goods-summary-card,
  .product-sticky-cta,.site-global-more-panel,.clean-more-panel,
  footer
){
  color:var(--white-text-black)!important;
}

/* Text inside white surfaces */
body.site-modernized :where(
  header,.site-global-header,.clean-header,
  main,section,article,aside,
  .panel,.result,.recommend-form,.recommend-result,
  .compare-controls,.compare-results-section,.compare-slot,.common-condition-card,
  .compare-result-card,.compare-winner,
  .goods-section,.goods-card,.rank-product,.ranking-head,.goods-car-select,
  .goods-upgrade-panel,.vehicle-goods-section,.affiliate-note,
  .guide-card,.shell .card,.period-block,.period-card,.best-period-card,
  .money-summary,.fuel-price-panel,.conversion-inner,
  .home-shortcut,.model-card,.rec-car,.quick-good,.goods-summary-card,
  .product-sticky-cta,.site-global-more-panel,.clean-more-panel,
  footer
) :where(
  h1,h2,h3,h4,h5,h6,p,span,small,b,strong,em,label,li,dd,dt,
  figcaption,summary,.note,.caption,.compare-note,.policy-lead
){
  color:var(--white-text-black)!important;
}

/* Links on white backgrounds are black and obvious by underline/weight. */
body.site-modernized :where(
  header,.site-global-header,.clean-header,
  main,section,article,aside,
  footer,.site-global-more-panel,.clean-more-panel
) a:not(
  .primary,.secondary-v6,.conversion-primary,.product-main-link,.rakuten-buy,
  .compare-run-btn,.recommend-btn,.recommend-submit,.valuation a,.recommend-next a
){
  color:var(--white-text-black)!important;
  text-decoration-color:#111!important;
}

/* Inputs/selects are white surfaces too. */
body.site-modernized :where(input,select,textarea){
  background:#fff!important;
  color:#111!important;
}
body.site-modernized :where(input,textarea)::placeholder{
  color:#333!important;
  opacity:1!important;
}
body.site-modernized option{
  background:#fff!important;
  color:#111!important;
}

/* Tables: white cells = black text. */
body.site-modernized :where(table,tbody,tr,td){
  color:#111!important;
}
body.site-modernized td,
body.site-modernized td :where(span,small,b,strong,a){
  color:#111!important;
}
body.site-modernized th{
  color:#111!important;
}

/* Hero was converted to white in v101, so force all hero copy black. */
body.site-modernized :where(
  .hero,.compare-hero,.recommend-hero,.bike-hero,.bike-rec-hero,.bike-goods-hero,
  .goods-hero,.feedback-hero,.insurance-hero,.sg-hero,.vg-hero,.rank-hero,
  .shell>.hero,.guide-hero,.seo-hero,.vehicle-hero
) :where(h1,h2,h3,p,span,small,b,strong,em,a){
  color:#111!important;
}

/* Keep colored/background controls readable. */
body.site-modernized :where(
  .primary,.calc,.compare-run-btn,.recommend-btn,.recommend-submit,
  button[type="submit"],.valuation a,.recommend-next a,.goods-car-box button,
  .vehicle-goods-box button,.conversion-actions .conversion-primary,
  .product-main-link,.rakuten-buy,.product-sticky-cta a
){
  background:#1d4ed8!important;
  border-color:#1d4ed8!important;
  color:#fff!important;
  text-decoration:none!important;
}
body.site-modernized :where(
  .primary,.calc,.compare-run-btn,.recommend-btn,.recommend-submit,
  button[type="submit"],.valuation a,.recommend-next a,.goods-car-box button,
  .vehicle-goods-box button,.conversion-actions .conversion-primary,
  .product-main-link,.rakuten-buy,.product-sticky-cta a
) :where(span,small,b,strong){
  color:#fff!important;
}

/* Selected states use a tinted background, so dark blue text remains clear. */
body.site-modernized :where(
  .choice-grid input:checked+span,.compare-count-switch button.active,
  .period-switch button.active,.brand-chip.active,.goods-filter button.active
){
  background:#eff6ff!important;
  color:#1e3a8a!important;
}
body.site-modernized :where(
  .choice-grid input:checked+span,.compare-count-switch button.active,
  .period-switch button.active,.brand-chip.active,.goods-filter button.active
) :where(span,small,b,strong){
  color:#1e3a8a!important;
}

/* Neutral secondary buttons on white remain black. */
body.site-modernized .secondary-v6,
body.site-modernized :where(.conversion-actions a,.rec-car button,.add-third-btn){
  background:#fff!important;
  color:#111!important;
  border-color:#94a3b8!important;
}
body.site-modernized :where(.conversion-actions a,.rec-car button,.add-third-btn) :where(span,small,b,strong){
  color:#111!important;
}


/* PAGE 1 HOME: hard override white-surface text */
body.site-modernized.site-car.home-page > .clean-header,
body.site-modernized.site-car.home-page > .hero,
body.site-modernized.site-car.home-page > .home-shortcuts,
body.site-modernized.site-car.home-page main,
body.site-modernized.site-car.home-page footer{
  color:#111!important;
}
body.site-modernized.site-car.home-page > .clean-header :is(a,span,small,b,strong,summary),
body.site-modernized.site-car.home-page > .hero :is(h1,h2,h3,p,a,span,small,b,strong,em),
body.site-modernized.site-car.home-page > .home-shortcuts :is(a,b,small,span),
body.site-modernized.site-car.home-page main :is(h1,h2,h3,h4,p,a,span,small,b,strong,label,summary,li,td,th),
body.site-modernized.site-car.home-page footer :is(a,span,small,b,strong,p){
  color:#111!important;
  opacity:1!important;
}
body.site-modernized.site-car.home-page > .hero .hero-sub-actions a,
body.site-modernized.site-car.home-page > .hero .hero-pr,
body.site-modernized.site-car.home-page > .hero .eyebrow,
body.site-modernized.site-car.home-page > .hero .hero-count span{
  color:#111!important;
  opacity:1!important;
}
body.site-modernized.site-car.home-page > .clean-header .clean-mode a{
  color:#111!important;
  opacity:1!important;
}
body.site-modernized.site-car.home-page > .hero .primary,
body.site-modernized.site-car.home-page main .calc,
body.site-modernized.site-car.home-page main .valuation-primary{
  color:#fff!important;
}
body.site-modernized.site-car.home-page > .hero .primary :is(span,small,b,strong),
body.site-modernized.site-car.home-page main .calc :is(span,small,b,strong),
body.site-modernized.site-car.home-page main .valuation-primary :is(span,small,b,strong){
  color:#fff!important;
}



/* PAGE 2 CAR COMPARE */
body.site-modernized.compare-page :is(.compare-hero,.compare-controls,.compare-results-section,.compare-slot,.common-condition-card,.compare-winner,.compare-result-card,.fuel-price-panel,.conversion-inner)
:is(h1,h2,h3,h4,p,a,span,small,b,strong,label,li,td,th){
  color:#111!important;opacity:1!important;
}
body.site-modernized.compare-page .compare-run-btn,
body.site-modernized.compare-page .conversion-primary{color:#fff!important}

/* PAGE 3 CAR RECOMMEND */
body.site-modernized.recommend-page :is(.recommend-hero,.recommend-section,.recommend-form,.recommend-result,.rec-car,.recommend-next,.conversion-inner)
:is(h1,h2,h3,h4,p,a,span,small,b,strong,label,li){
  color:#111!important;opacity:1!important;
}
body.site-modernized.recommend-page :is(.recommend-btn,.recommend-submit,.conversion-primary){color:#fff!important}

/* PAGE 4 CAR GOODS */
body.site-modernized.goods-page.site-car :is(.goods-hero,.goods-summary-strip,.goods-upgrade-section,.goods-section,.goods-popular,.vehicle-goods-section,.affiliate-note,.conversion-inner)
:is(h1,h2,h3,h4,p,a,span,small,b,strong,em,label,summary,li){
  color:#111!important;opacity:1!important;
}
body.site-modernized.goods-page.site-car :is(.goods-car-box button,.vehicle-goods-box button,.product-main-link,.rakuten-buy,.conversion-primary){
  color:#fff!important;
}

/* PAGE 5 BIKE HOME */
body.site-modernized.site-bike.bike-clean-page :is(.clean-header,.bike-hero,.home-shortcuts,main,.valuation,footer)
:is(h1,h2,h3,h4,p,a,span,small,b,strong,em,label,summary,li,td,th){
  color:#111!important;opacity:1!important;
}
body.site-modernized.site-bike.bike-clean-page :is(.primary,.calc,.valuation-primary){color:#fff!important}

/* PAGE 6 BIKE COMPARE */
body.site-modernized.site-bike.bike-compare-page :is(.compare-hero,.compare-controls,.compare-results-section,.compare-slot,.common-condition-card,.compare-winner,.compare-result-card,.fuel-price-panel,.conversion-inner)
:is(h1,h2,h3,h4,p,a,span,small,b,strong,label,li,td,th){
  color:#111!important;opacity:1!important;
}
body.site-modernized.site-bike.bike-compare-page :is(.compare-run-btn,.conversion-primary){color:#fff!important}

/* PAGE 7 BIKE RECOMMEND */
body.site-modernized.site-bike.bike-recommend-page :is(.bike-rec-hero,.recommend-section,.recommend-form,.recommend-result,.rec-car,.recommend-next,.conversion-inner)
:is(h1,h2,h3,h4,p,a,span,small,b,strong,label,li){
  color:#111!important;opacity:1!important;
}
body.site-modernized.site-bike.bike-recommend-page :is(.recommend-btn,.recommend-submit,.conversion-primary){color:#fff!important}

/* PAGE 8 BIKE GOODS */
body.site-modernized.goods-page.site-bike :is(.bike-goods-hero,.goods-summary-strip,.goods-upgrade-section,.goods-section,.goods-popular,.vehicle-goods-section,.affiliate-note,.conversion-inner)
:is(h1,h2,h3,h4,p,a,span,small,b,strong,em,label,summary,li){
  color:#111!important;opacity:1!important;
}
body.site-modernized.goods-page.site-bike :is(.vehicle-goods-box button,.product-main-link,.rakuten-buy,.conversion-primary){
  color:#fff!important;
}



/* PAGE 9 COST GUIDES */
body.site-modernized.cost-guides-page .shell :is(.group,.card,.coverage-panel,.back)
:is(h1,h2,h3,h4,p,a,span,small,b,strong,li){
  color:#111!important;opacity:1!important;
}
body.site-modernized.cost-guides-page .shell .card,
body.site-modernized.cost-guides-page .shell .card *{
  color:#111!important;opacity:1!important;
}

/* PAGE 10 COMPARISON GUIDE HUB */
body.site-modernized.compare-guides-page .shell :is(.intro,.group,.card,.note)
:is(h1,h2,h3,h4,p,a,span,small,b,strong,li){
  color:#111!important;opacity:1!important;
}
body.site-modernized.compare-guides-page .shell .card,
body.site-modernized.compare-guides-page .shell .card *{
  color:#111!important;opacity:1!important;
}

/* PAGE 11 INSURANCE */
body.site-modernized.insurance-page :is(.insurance-wrap,.insurance-section,.insurance-card,.insurance-tool,.insurance-result,.insurance-table-wrap)
:is(h1,h2,h3,h4,p,a,span,small,b,strong,label,li,td,th){
  color:#111!important;opacity:1!important;
}
body.site-modernized.insurance-page :is(.insurance-btn.primary,button[type="submit"]){
  color:#fff!important;
}

/* PAGE 12 SELL GUIDE: white article cards only */
body.site-modernized.sell-guide-page :is(
  .sg-section,.sg-tool,.sg-result,.sg-table-wrap,.sg-check-grid article,
  .sg-warning-grid article,.sg-faq details,.sg-related a,.sg-note
) :is(h1,h2,h3,h4,p,a,span,small,b,strong,em,label,li,td,th,summary){
  color:#111!important;opacity:1!important;
}
body.site-modernized.sell-guide-page :is(.sg-btn-primary,.affiliate-slot-link){
  color:#fff!important;
}

/* PAGE 13 PRODUCT */
body.site-modernized.product-page :is(.product-detail-shell,.product-detail-card,.live-goods-card,.product-detail-related)
:is(h1,h2,h3,h4,p,a,span,small,b,strong,em,label,li){
  color:#111!important;opacity:1!important;
}
body.site-modernized.product-page :is(.rakuten-buy,.product-main-link,.product-sticky-cta a){
  color:#fff!important;
}

/* PAGE 14 FEEDBACK */
body.site-modernized.feedback-page :is(
  .feedback-main,.feedback-summary-card,.feedback-compose-section,.feedback-form,
  .feedback-board-section,.feedback-card,.feedback-controls
) :is(h1,h2,h3,h4,p,a,span,small,b,strong,label,summary,li){
  color:#111!important;opacity:1!important;
}
body.site-modernized.feedback-page button[type="submit"]{color:#fff!important}

/* PAGE 15 POLICY */
body.site-modernized.policy-page-body .policy-page,
body.site-modernized.policy-page-body .policy-page :is(h1,h2,h3,h4,p,a,span,small,b,strong,li){
  color:#111!important;opacity:1!important;
}

/* VEHICLE DETAIL TEMPLATES: white cards and article surfaces */
body.site-modernized :is(
  .vehicle-content,.vehicle-main,.vehicle-detail,.vehicle-summary,.vehicle-cost-card,
  .vehicle-info-card,.vehicle-data-card,.vehicle-related,.vehicle-faq,
  .seo-content,.seo-section,.seo-card,.article-card
) :is(h1,h2,h3,h4,p,a,span,small,b,strong,label,li,td,th){
  color:#111!important;opacity:1!important;
}

/* RANKING TEMPLATES: white result/list cards */
body.site-modernized :is(
  .ranking-section,.ranking-card,.rank-card,.ranking-list,.ranking-table-wrap,
  .ranking-result,.rank-item
) :is(h1,h2,h3,h4,p,a,span,small,b,strong,label,li,td,th){
  color:#111!important;opacity:1!important;
}
