/*
 * TOS Indicators fixes found by tools/audit.js (2026-10-09).
 *
 * Color rules are scoped to html.ks-a11y-colors (preview with ?a11y-colors=1)
 * until approved. The bright brand green #4caf50 under white text is 2.8:1;
 * the replacement #3a7329 is the same family, a step darker, 5.7:1.
 */

/* ---------- layout (always on) ---------- */

/* Links inside paragraphs were told apart from the text by color alone
   (1.05:1, WCAG 1.4.1): underline them */
.tos-footer-disclaimer a,
.tos-footer-cftc a,
.tos-faq-answer-content a {
    text-decoration: underline !important;
}

/* ---------- colors (preview until approved) ---------- */

/* Brand green variables, wherever the templates define them */
html.ks-a11y-colors,
html.ks-a11y-colors [class*="-pillar"],
html.ks-a11y-colors .lib-page,
html.ks-a11y-colors .mr-page,
html.ks-a11y-colors .tos-cart,
html.ks-a11y-colors .tos-checkout {
    --green: #3a7329 !important;
    --green-dark: #2f5e21 !important;
    --tos-green: #3a7329 !important;
    --primary-green: #3a7329 !important;
}

/* Green buttons, number chips and badges with white text: 2.8 > 5.7:1 */
html.ks-a11y-colors .tos-landing .tos-btn-primary:not(.tos-btn-white),
html.ks-a11y-colors .tos-free-content .tos-btn-primary:not(.tos-btn-white),
html.ks-a11y-colors .ind-btn-primary,
html.ks-a11y-colors .ts-btn-primary,
html.ks-a11y-colors .ts-series-num,
html.ks-a11y-colors button[onclick^="copyTsCode"],
html.ks-a11y-colors .ind-featured-badge,
html.ks-a11y-colors .tos-platform-badge,
html.ks-a11y-colors button:has(> .btn-text) {
    background: #3a7329 !important;
    background-image: none !important;
    color: #fff !important;
}
html.ks-a11y-colors .tos-landing .tos-btn-primary:not(.tos-btn-white):hover,
html.ks-a11y-colors .ind-btn-primary:hover,
html.ks-a11y-colors .ts-btn-primary:hover,
html.ks-a11y-colors button[onclick^="copyTsCode"]:hover,
html.ks-a11y-colors .contact-form button[type="submit"]:hover,
html.ks-a11y-colors input[type="submit"]:hover {
    background: #2f5e21 !important;
    color: #fff !important;
}

/* Bundle highlight green #1f9d55: 3.5 > 5.4:1 */
html.ks-a11y-colors .tos-bundle-highlight-cta,
html.ks-a11y-colors .tos-bundle-pill,
html.ks-a11y-colors a.tos-bundle-cta {
    background: #18794e !important;
    color: #fff !important;
}
html.ks-a11y-colors .tos-bundle-divider .txt b {
    color: #18794e !important;
}

/* Green text: eyebrows, links, card actions (2.7 to 4.4 > 4.9 to 5.7:1) */
html.ks-a11y-colors .tos-eyebrow,
html.ks-a11y-colors .courses-hero-badge,
html.ks-a11y-colors .tos-course-meta,
html.ks-a11y-colors .tos-featured-col > strong,
html.ks-a11y-colors .tos-testimonial-author *:not([class*="avatar"]),
html.ks-a11y-colors .tos-testimonial-card-scroll *:not([class*="avatar"]),
html.ks-a11y-colors .ind-featured-link,
html.ks-a11y-colors .tos-related__link,
html.ks-a11y-colors .tos-related__action,
html.ks-a11y-colors .apbct-email-encoder,
html.ks-a11y-colors .tos-nav a:hover {
    color: #3a7329 !important;
}
/* Light green eyebrow on the dark sections: 4.4 > 8:1 */
html.ks-a11y-colors .tos-eyebrow-light {
    color: #8fd17a !important;
}

/* Green heading words on the dark navy heroes stay bright (the --green
   variable change above would have darkened them) */
html.ks-a11y-colors [class*="-pillar"] h1 > span {
    color: #5cb85f !important;
}

/* Tool type badges, colored text on a pale tint of the same color: 2.0 to 4.0 > 5.8:1+ */
html.ks-a11y-colors .tos-badge-indicator { color: #3a7329 !important; }
html.ks-a11y-colors .tos-badge-scan { color: #1d4ed8 !important; }
html.ks-a11y-colors .tos-badge-dashboard { color: #be185d !important; }
html.ks-a11y-colors .tos-badge-tutorial { color: #92400e !important; }
html.ks-a11y-colors .tos-badge-backtester { color: #6d28d9 !important; }

/* Orange "PRO" tags, white on #f59e0b: 2.1 > 5.0:1 */
html.ks-a11y-colors .pro,
html.ks-a11y-colors .ind-card-pro {
    background: #b45309 !important;
    color: #fff !important;
}

/* Grey "On this page" labels and counts: 2.4 to 4.4 > 7:1 */
html.ks-a11y-colors .ind-toc-label,
html.ks-a11y-colors .ts-toc-label,
html.ks-a11y-colors .ind-category-count {
    color: #4b5563 !important;
}

/* Bottom call-to-action band: the brighter green stop of the animated
   gradient left white text and the outline button at 2.9 to 4.4:1 */
html.ks-a11y-colors .tos-landing .tos-cta-background {
    background-image: linear-gradient(-45deg, #2d5a32, #356629, #2f5e26, #1f4a24) !important;
}
html.ks-a11y-colors .tos-cta-content > p {
    color: #fff !important;
}

/* Footer text on navy: slate #64748b / #475569 were 2.1 to 3.5:1 > 6.9:1 */
html.ks-a11y-colors .tos-footer-copyright p,
html.ks-a11y-colors .tos-footer-legal a,
html.ks-a11y-colors .tos-footer-disclaimer p,
html.ks-a11y-colors .tos-footer-disclaimer a,
html.ks-a11y-colors .tos-footer-cftc,
html.ks-a11y-colors .tos-footer p {
    color: #94a3b8 !important;
}

/* "Developers: get API access" line (ks-api-waitlist mu-plugin, faded to 75%) */
html.ks-a11y-colors div:has(> a[href$="/api"][style*="color:inherit"]),
html.ks-a11y-colors div:has(> a[href$="/api/"][style*="color:inherit"]) {
    opacity: 1 !important;
}
html.ks-a11y-colors a[href$="/api"][style*="color:inherit"],
html.ks-a11y-colors a[href$="/api/"][style*="color:inherit"] {
    color: #595959 !important;
}

/* Contact form field edges, 1.4:1 against the page (1.4.11 needs 3:1) */
html.ks-a11y-colors .contact-form input,
html.ks-a11y-colors .contact-form textarea,
html.ks-a11y-colors form input[name="name"],
html.ks-a11y-colors form input[name="email"],
html.ks-a11y-colors form input[name="subject"],
html.ks-a11y-colors form input[name="website_url"],
html.ks-a11y-colors form textarea[name="message"],
html.ks-a11y-colors form select {
    border-color: #6b757b !important;
}

/* ---------- tutorials, research and Beaver Builder pages (sitemap crawl 2026-10-10) ---------- */
html.ks-a11y-colors .tut-badge-skill,
html.ks-a11y-colors .res-badge { color: #006b12 !important; }
/* Green buttons with white text (#4caf50 / #5ba745 / #5bac45: 2.8 to 3.0:1).
   Only the ones the crawl found; other builder buttons keep their colors. */
html.ks-a11y-colors .tut-download-btn,
html.ks-a11y-colors a[href$="pricing"] > button,
html.ks-a11y-colors a.fl-button[href*="/download/"],
html.ks-a11y-colors a.fl-button[href*="volatility-box"] { background-color: #3a7329 !important; border-color: #3a7329 !important; color: #fff !important; }
html.ks-a11y-colors a.fl-button[href*="/download/"] .fl-button-text,
html.ks-a11y-colors a.fl-button[href*="volatility-box"] .fl-button-text { color: #fff !important; }
html.ks-a11y-colors button[data-tab] { color: #4b5563 !important; }
html.ks-a11y-colors .tut-container > p { color: #fff !important; }
/* Beaver Builder grey body text #757575 on tinted panels (4.0 to 4.4:1) */
html.ks-a11y-colors .fl-rich-text p,
html.ks-a11y-colors .fl-rich-text p > span,
html.ks-a11y-colors .fl-callout-text p,
html.ks-a11y-colors .fl-cta-text-content p,
html.ks-a11y-colors .uabb-toc-heading,
html.ks-a11y-colors a[title^="Module "] { color: #595959 !important; }
html.ks-a11y-colors #uabb-toc-wrapper a,
html.ks-a11y-colors .uabb-toc-wrapper a,
html.ks-a11y-colors .fl-callout-text a { color: #3a7329 !important; }
html.ks-a11y-colors input[name="s"] { border-color: #6b757b !important; }
html.ks-a11y-colors .btn-text { background: transparent !important; }
html.ks-a11y-colors .res-container > p { color: #fff !important; }
html.ks-a11y-colors .uabb-subheading > p { color: #595959 !important; }
