/* Study + Daily, desktop light-family reading ink.
   Phase 2 closes half of the gap left AFTER phase 1, in OKLab lightness.
   #0F1111 approximates the supplied reference; it is not sampled source ink.
   Only these two pages opt in. Dark modes and phone layouts keep their
   existing palettes. Fonts, weights, spacing and surfaces stay page-owned. */
@media (min-width: 769px) {
    html:not(.dark-mode):not(.parchment-off) body[data-reading-page]:not(.is-mobile) {
        --reading-reference-ink: #0F1111;
        --reading-primary-phase1: color-mix(in oklab, #111111 50%, var(--reading-reference-ink));
        --reading-primary: color-mix(in oklab, var(--reading-primary-phase1) 50%, var(--reading-reference-ink));
        --reading-explanatory: color-mix(in oklab, var(--reading-primary) 80%, #5D6470);
        --reading-supporting: color-mix(in oklab, var(--reading-primary) 55%, #5D6470);
        --reading-metadata: #625F59;
        --reading-link: #80602B;
        --reading-quote-reference: #80602B;
    }

    html.parchment-off:not(.dark-mode) body[data-reading-page]:not(.is-mobile) {
        --reading-reference-ink: #0F1111;
        --reading-primary-phase1: color-mix(in oklab, #302F2D 50%, var(--reading-reference-ink));
        --reading-primary: color-mix(in oklab, var(--reading-primary-phase1) 50%, var(--reading-reference-ink));
        --reading-explanatory: color-mix(in oklab, var(--reading-primary) 80%, #5F6A7A);
        --reading-supporting: color-mix(in oklab, var(--reading-primary) 55%, #5F6A7A);
        --reading-metadata: #5F6875;
        --reading-link: #3F5680;
        --reading-quote-reference: #80602B;
    }

    /* Bridge the existing semantic consumers and the two deliberate
       parchment verse/text-fill exceptions without changing shared palettes. */
    html:not(.dark-mode) body[data-reading-page]:not(.is-mobile) {
        --study-reading-scripture: var(--reading-primary);
        --study-reading-commentary: var(--reading-explanatory);
    }

    html:not(.dark-mode) body[data-reading-page]:not(.is-mobile) :is(main.content-area, .easy-nav-content, .devotion-column) {
        --kv-scripture: var(--reading-primary);
        --kv-text-body: var(--reading-explanatory);
        --kvb-light-text-body: var(--reading-explanatory);
        --daily-light-body: var(--reading-primary);
        --daily-light-text: var(--reading-primary);
    }

    /* Match the legacy cascade prefix: component prose has several older
       important rules. Keep this override limited to named reading roles. */
    html:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page]:not(.is-mobile) :is(
        .summary-content, .summary-content p, .summary-p-wrapper,
        .summary-content li, .insight-snippet, .reference-desc,
        .christ-ref-text, .christ-ref-item, .christ-ref-bullet,
        .christ-ref-overview, .kv-overview,
        .annot-detail-body p, .annot-detail-body li,
        .key-verse-card > p, .key-verse-card li,
        .chapter-primary-atlas-children .chapter-primary-atlas-title
    ) {
        color: var(--reading-explanatory) !important;
        -webkit-text-fill-color: currentColor !important;
    }

    html:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page]:not(.is-mobile) :is(
        .study-insights-subtitle, .note-sub, .ref-description
    ) {
        color: var(--reading-supporting) !important;
        -webkit-text-fill-color: currentColor !important;
    }

    /* Delicate devotional paragraphs use primary ink, like Scripture.
       Quote boxes retain their italic treatment, surfaces and gold cites.
       ::first-letter/drop-cap styling remains with the original rules. */
    html:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page="daily"]:not(.is-mobile) .devotion-column :is(
        .devotion-text, .devotion-content, .devotion-body,
        p:not(.liturgical-title):not(.liturgical-ref):not(.devotion-topic):not(.devotion-date),
        .liturgical-verse, .theme-verse-p
    ) {
        color: var(--reading-primary) !important;
    }

    /* Topic Devotion uses separate cards and curated/timeline templates;
       their legacy rules also set WebKit fill, so update both properties.
       Share the same roles in timeline and ordinary list presentations. */
    html:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page="daily"]:not(.is-mobile) :is(
        .topical-detail-paragraph, .topical-reference-copy
    ) {
        color: var(--reading-primary) !important;
        -webkit-text-fill-color: currentColor !important;
    }

    html:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page="daily"]:not(.is-mobile) :is(
        .topical-topic-meta, .topical-detail-summary
    ) {
        color: var(--reading-explanatory) !important;
        -webkit-text-fill-color: currentColor !important;
    }

    html:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page="daily"]:not(.is-mobile) .topical-reading-section-description {
        color: var(--reading-supporting) !important;
        -webkit-text-fill-color: currentColor !important;
    }

    html:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page]:not(.is-mobile) :is(
        .chapter-primary-atlas-ref, .note-range, .note-refs-label,
        .devotion-column .devotion-date, .devotion-column .devotion-date-inline
    ) {
        color: var(--reading-metadata) !important;
        -webkit-text-fill-color: currentColor !important;
        opacity: 1 !important;
    }

    /* Reading citations only: leave decorative gold, section headings,
       badges, buttons and their active/disabled states alone. */
    html:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page]:not(.is-mobile) :is(
        .summary-content a, .reference-cite, .reference-cite a,
        .reference-row .verse-ref-link, .note-refs a
    ) {
        color: var(--reading-link) !important;
        -webkit-text-fill-color: currentColor !important;
    }

    html:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page="daily"]:not(.is-mobile) .devotion-column :is(
        .liturgical-ref, .liturgical-ref a, .liturgical-verse cite,
        .theme-verse-ref, .inline-verse-ref, .verse-ref-link, .reference-footer a
    ) {
        color: var(--reading-quote-reference) !important;
        -webkit-text-fill-color: currentColor !important;
        opacity: 1 !important;
    }
}
