/* SecureVPN Readability V4.1 — 2026-10-18 (non-destructive rebased overlay)
   V2 + V3 only. Corrects contrast with restrained selectors.
   DO NOT style .hm-cell, .hm-* performance buckets, data thresholds, QC states.
   WordPress selectors deliberately scoped to rankings, never site-wide Elementor. */
:root{
  --sv4-ink:#0c2942;--sv4-muted:#496675;--sv4-green:#0b765c;
  --sv4-green-hover:#085945;--sv4-border:#d6e9e2;--sv4-soft:#f4fbf7;
  --sv4-focus:#6bd4ad;
}

/* Plain content and dashboard typography, including future API-rendered nodes */
body.svpn-v2 .svpn-v2-content{color:var(--sv4-ink);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif}
body.svpn-v2 .svpn-v2-content :is(.card,.summary-card,.detail-card,.qc4,.qc4-side,.analytics-panel,.analytics-card,.suite-card,.hub-card,.provider-card,.protocol-card,.report-card,.speed-explain-card,.history-stats){color:var(--sv4-ink)!important}
body.svpn-v2 .svpn-v2-content :is(.card,.summary-card,.detail-card,.qc4,.qc4-side,.analytics-panel,.analytics-card,.suite-card,.hub-card,.provider-card,.protocol-card,.report-card,.speed-explain-card,.history-stats) :is(h2,h3,h4){color:var(--sv4-ink)!important}
body.svpn-v2 .svpn-v2-content :is(.summary-n,.summary-value,.suite-stat strong,.history-stats strong,.detail-card dd,.r4-value){color:#123c47!important}
body.svpn-v2 .svpn-v2-content :is(.summary-card p,.detail-title,.detail-card dt,.qc4-help,.qc4-head p,.c4-method,.metric-note,.helper-text,.suite-stat p,.history-stats p,.speed-estimator-status){color:var(--sv4-muted)!important}

/* V2/V3 renders these specific introductory panels ON WHITE.
   Never turn these titles white: previous V1 regression. */
body.svpn-v2 .svpn-v2-content :is(.analytics-hero-suite,.c4-landing-hero,.page-intro,.section-intro){background:#fff!important;background-image:none!important;color:var(--sv4-ink)!important}
body.svpn-v2 .svpn-v2-content :is(.analytics-hero-suite,.c4-landing-hero,.page-intro,.section-intro) :is(h1,h2,h3,h4,p,small,strong,li){color:var(--sv4-ink)!important}
body.svpn-v2 .svpn-v2-content :is(.analytics-hero-suite,.c4-landing-hero,.page-intro,.section-intro) :is(.eyebrow,.c4-kicker,.suite-kicker,.section-kicker){color:#0b765c!important}

/* Only the true dark hero gets light foreground. Keep nav and footer native. */
body.svpn-v2 .svpn-v2-intro{color:#fff!important}
body.svpn-v2 .svpn-v2-intro :is(h1,h2,h3,p,li,strong){color:#fff!important}
body.svpn-v2 .svpn-v2-intro :is(.svpn-v2-note,.svpn-v2-points,.svpn-v2-kicker){color:#d9f6e7!important}

/* Actual primary actions. Excludes heatmap cells, close icons, tabs and QC badges. */
body.svpn-v2 .svpn-v2-content :is(#update-btn,#update,#speed-test-btn,.update-btn,.qc4-run,.r4-update,.c4-run,.primary-button,.primary-btn),
body.svpn-v2 .svpn-v2-content :is(.buyer-offer-cta,.geo-worker-cta){background:var(--sv4-green)!important;background-image:none!important;border-color:var(--sv4-green)!important;color:#fff!important;box-shadow:0 5px 16px rgba(11,118,92,.14)!important}
body.svpn-v2 .svpn-v2-content :is(#update-btn,#update,#speed-test-btn,.update-btn,.qc4-run,.r4-update,.c4-run,.primary-button,.primary-btn,.buyer-offer-cta,.geo-worker-cta):hover{background:var(--sv4-green-hover)!important;border-color:var(--sv4-green-hover)!important;color:#fff!important}
body.svpn-v2 .svpn-v2-content :is(#update-btn,#update,#speed-test-btn,.update-btn,.qc4-run,.r4-update,.c4-run,.primary-button,.primary-btn,.buyer-offer-cta,.geo-worker-cta) :is(span,strong,small){color:#fff!important}

/* Interactive secondary actions, tabs and selected states */
body.svpn-v2 .svpn-v2-content :is(.vpn-goal-tab,.qc4-template,.analytics-subnav a,.provider-tabs a,.protocol-tabs a){background:var(--sv4-soft)!important;color:#185945!important;border:1px solid #c8e2d6!important;box-shadow:none!important}
body.svpn-v2 .svpn-v2-content :is(.vpn-goal-tab,.qc4-template,.analytics-subnav a,.provider-tabs a,.protocol-tabs a):hover{background:#e5f5eb!important;color:#084e3b!important}
body.svpn-v2 .svpn-v2-content :is(.vpn-goal-tab.active,.vpn-goal-tab[aria-selected="true"],.analytics-subnav a[aria-current="page"],.provider-tabs a[aria-current="page"],.protocol-tabs a[aria-current="page"]){background:var(--sv4-green)!important;border-color:var(--sv4-green)!important;color:#fff!important}
body.svpn-v2 .svpn-v2-content :is(.vpn-goal-tab.active,.vpn-goal-tab[aria-selected="true"]) :is(span,strong){color:#fff!important}
body.svpn-v2 .svpn-v2-content :is(button.secondary,a.secondary,#speed-isp-btn){background:#fff!important;border:1px solid #bcd9cd!important;color:#145f4b!important}

/* Toolbar icon ink and informational note -- never affect heatmap data colors. */
body.svpn-v2 #heatmap>.sidebar .filter-group label .ico{color:var(--sv4-green)!important}
body.svpn-v2 #heatmap>.sidebar .qc-note{background:#f0f8f4!important;border:1px solid #d1e7dc!important;border-left:3px solid var(--sv4-green)!important;color:#315a50!important}

/* Forms, headings and tables on light backgrounds */
body.svpn-v2 .svpn-v2-content :is(select,input:not([type="checkbox"]):not([type="radio"]),textarea){background:#fff!important;color:var(--sv4-ink)!important;border:1px solid #bfd8cf!important}
body.svpn-v2 .svpn-v2-content :is(select,input,textarea)::placeholder{color:#647d88!important;opacity:1}
body.svpn-v2 .svpn-v2-content :is(.filter-group label,.qc4-controls label,.c4-field label,.control-group label){color:#345967!important}
body.svpn-v2 .svpn-v2-content :is(table:not(.heatmap-table)) thead th{background:#edf7f1!important;color:#315765!important}
body.svpn-v2 .svpn-v2-content :is(.detail-card dl>div,.qc4-side,.qc4-summary,.speed-explain-card){background:#f8fcfa!important;color:var(--sv4-ink)!important;border-color:var(--sv4-border)!important}
body.svpn-v2 .svpn-v2-content :is(.detail-card dd,.qc4-summary strong,.qc4-side strong){color:#16483e!important}

/* WordPress rankings tools, scoped: site-wide Elementor buttons untouched */
body .svpn-v19-rankings :is(#ranking-update,.r4-update){background:var(--sv4-green)!important;border:1px solid var(--sv4-green)!important;color:#fff!important}
body .svpn-v19-rankings :is(#ranking-update,.r4-update):hover{background:var(--sv4-green-hover)!important;border-color:var(--sv4-green-hover)!important}
body .svpn-v19-rankings :is(.r4-status-note,.r4-help,.r4-sub,.r4-history-section p){color:var(--sv4-muted)!important}
body .svpn-v19-rankings :is(.r4-history-section,.r4-panel){color:var(--sv4-ink)!important}

/* Focus and small-screen readability */
body.svpn-v2 .svpn-v2-content :is(a,button,input,select,textarea,summary):focus-visible,
body .svpn-v19-rankings :is(a,button,input,select,textarea,summary):focus-visible{outline:3px solid var(--sv4-focus)!important;outline-offset:3px!important}
@media(max-width:640px){
 body.svpn-v2 .svpn-v2-content :is(#update-btn,#update,#speed-test-btn,.qc4-run,.buyer-offer-cta,.geo-worker-cta){max-width:100%;white-space:normal;text-align:center}
}
