/* Dark-mode adjustments shared by the CTL home, faculty support, and development pages. */
@media (prefers-color-scheme: dark) {
    /* CTL reading surfaces that still have fixed light backgrounds in styles.css. */
    main .ctl-home-intro,
    main .ctl-most-used-resources-section,
    main .ctl-resource-section,
    main .ctl-ai-certificate {
        background: #102b49;
        color: var(--utm-text);
    }

    main .ctl-micro-grants,
    main .ctl-quote-section,
    main .ctl-quote-section .callout-quote {
        background: #0b2341;
        color: var(--utm-text);
    }

    main .ctl-home-intro h2,
    main .ctl-ai-certificate :is(h2, h3),
    main .ctl-micro-grants :is(h2, h3) {
        color: var(--utm-text) !important;
    }

    main :is(.ctl-home-intro, .ctl-ai-certificate, .ctl-micro-grants) :is(p, li, strong) {
        color: var(--utm-text);
    }

    main :is(.ctl-home-intro, .ctl-ai-certificate, .ctl-micro-grants) a,
    main .ctl-most-used-resources__list a {
        color: #8ac8ff;
        text-decoration-color: currentColor;
    }

    main .ctl-home-intro .ctl-home-intro__eyebrow,
    main .ctl-ai-certificate .ctl-ai-certificate__eyebrow,
    main .ctl-micro-grants .ctl-micro-grants__eyebrow {
        color: #ffbd75;
    }

    main .ctl-most-used-resources .card {
        background: #183856 !important;
        border-color: var(--utm-border);
    }

    main .ctl-most-used-resources .card-content {
        background: transparent;
        color: var(--utm-text);
    }

    main .ctl-most-used-resources .card :is(h3, p, li) {
        color: var(--utm-text) !important;
    }

    /* The factory's light section headers and service cards need matching ink. */
    main .join-organizations:is(.--white, .--light) {
        --section-header-divider: #ffbd75;
        background: #102b49;
        color: var(--utm-text);
    }

    main .join-organizations:is(.--white, .--light)
        :is(h2, h3, h4, p, .callout-cta-split-title-mini, .section-lead) {
        color: var(--utm-text) !important;
    }

    main .join-organizations:is(.--white, .--light) a {
        color: #8ac8ff;
    }

    main .ctl-service-section--light {
        background: #102b49;
        color: var(--utm-text);
    }

    main .ctl-service-section--light > .--container-normal > h3 {
        color: var(--utm-text) !important;
    }

    main .ctl-service-section--light .ctl-service-card {
        background: #183856;
        border-color: var(--utm-border);
        border-top-color: #ffbd75;
    }

    main .ctl-service-section--light .ctl-service-card :is(h3, p) {
        color: var(--utm-text) !important;
    }

    main .ctl-inverted,
    main .join-organizations.ctl-inverted {
        --utm-text: #0b2341;
        --utm-heading: #0b2341;
        --utm-text-on-dark: #0b2341;
        --utm-muted: #344b64;
        --utm-accent-text: #974600;
        --section-header-divider: #974600;
        background: #e7edf4;
        color: #0b2341;
    }

    main .ctl-inverted :is(h2, h3, h4, p, li, span, strong, a) {
        color: #0b2341 !important;
    }

    main .ctl-inverted .callout-cta-split-title-mini {
        color: #974600 !important;
    }

    main .ctl-inverted .ctl-sotl-list li {
        background: #fff;
        border-color: #bac7d6;
    }

    main .ctl-inverted a.button {
        background: #0b2341;
        border-color: #0b2341;
        color: #fff !important;
    }

    main .ctl-inverted a.button:is(:hover, :focus-visible) {
        background: #24476b;
        border-color: #24476b;
    }

    main .ctl-inverted a:focus-visible {
        outline: 3px solid #974600;
        outline-offset: 4px;
    }
}
