/* Regular-light Study only. Separate from shared reading ink so Daily,
   parchment and dark modes retain their existing appearance. Color and
   surface roles work across desktop, tablet and phone; each layout keeps
   its own typography metrics, dimensions and spacing. Loaded last. */
html.parchment-off:not(.dark-mode):not(#_#_) body[data-reading-page="study"] {
    --study-light-page: #FFFFFF;
    --study-light-section: #F8F8F7;
    --study-light-card: #FFFFFF;
    --study-light-border: #E8E6E2;
    --study-light-ink: #151515;
    --study-light-prose: #2B2B2B;
    --study-light-secondary: #4B4B4B;
    --study-light-muted: #686868;
    --study-light-heading: #24344F;
    --study-light-verse-number: #606060;
    --study-light-annotation-secondary: #414141;
    --study-light-annotation-label: #606060;

    --reading-primary: var(--study-light-ink);
    --reading-explanatory: var(--study-light-prose);
    --reading-supporting: var(--study-light-secondary);
    --reading-metadata: var(--study-light-muted);
    --kv-bg-deep: var(--study-light-page);
    --kv-bg: var(--study-light-page);
    --kv-surface: var(--study-light-card);
    --kv-surface-strong: var(--study-light-section);
    --kv-surface-ref: var(--study-light-card);
    --kv-toolbar: var(--study-light-section);
    --kv-control: var(--study-light-card);
    --kv-row-hover: var(--study-light-section);
    --kv-border: var(--study-light-border);
    --kv-border-faint: var(--study-light-border);
    --kv-ref-border: var(--study-light-border);
    --kv-control-border: var(--study-light-border);
    --kv-text-primary: var(--study-light-heading);
    --kv-section-title: var(--study-light-heading);
    --kv-text-body: var(--study-light-prose);
    --kv-text-secondary: var(--study-light-secondary);
    --kv-text-muted: var(--study-light-muted);
    --kv-text-control: var(--study-light-secondary);
    --kv-scripture: var(--study-light-ink);
    --kv-verse-number: var(--study-light-verse-number);
    --kv-card-glow: transparent;
    --kv-shadow-card: 0 2px 8px rgba(25, 25, 25, 0.025);
    --kvb-light-annotation: var(--study-light-card);
    --kvb-light-annotation-deep: var(--study-light-card);
    --kvb-light-annotation-border: var(--study-light-border);
    --kvb-light-text-primary: var(--study-light-heading);
    --kvb-light-text-secondary: var(--study-light-secondary);
    --study-page-bg: var(--study-light-page);
    --study-card-bg: var(--study-light-card);
    --study-card-border: var(--study-light-border);
    --study-ref-card-border: var(--study-light-border);
    --study-divider: var(--study-light-border);
}

/* The existing theme rules already consume body-local palette tokens.
   These explicit surfaces settle older gradients and section overrides. */
html.parchment-off:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page="study"] :is(
    .detached-summary-section, .reference-groups-container,
    .chapter-primary-atlas-list, .insight-card.study-card,
    .christ-ref-section, .key-verse-card
) {
    background-color: var(--study-light-card) !important;
    background-image: none !important;
    border-color: var(--study-light-border) !important;
    box-shadow: var(--kv-shadow-card) !important;
}

/* A near-white panel replaces the broad blue-gray field. No added frame
   or geometry: the existing margins and heading hierarchy do the work. */
html.parchment-off:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page="study"] #explore-section-wrapper.insight-section {
    background: var(--study-light-section) !important;
    border-color: var(--study-light-border) !important;
    box-shadow: none !important;
}

/* Keep annotation accent rules and their separate gold/navy roles. */
html.parchment-off:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page="study"] :is(.christ-ref-section, .key-verse-card) {
    --reading-supporting: var(--study-light-annotation-secondary);
    --reading-metadata: var(--study-light-annotation-label);
    --kv-text-muted: var(--study-light-annotation-label);
    --kv-text-secondary: var(--study-light-annotation-secondary);
    --kvb-light-text-secondary: var(--study-light-annotation-secondary);
    border-left-color: var(--kv-christ-accent) !important;
    box-shadow: inset 2px 0 0 var(--kvb-note-accent-rule) !important;
}

/* Reference context is reading copy; keep the linked citations' existing
   navy/gold colors, underlines and hover/focus treatment independent. */
html.parchment-off:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page="study"] .annot-card .note-refs-list {
    color: var(--study-light-annotation-secondary) !important;
    -webkit-text-fill-color: currentColor !important;
}

/* Off is still available: remove the parchment toggle's inline opacity
   wash without making genuinely disabled buttons look enabled. Theme
   accents and pressed-state colors continue to come from existing rules. */
html.parchment-off:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page="study"] .font-btn:not(:disabled):not([aria-disabled="true"]):not(.disabled) {
    opacity: 1 !important;
}

html.parchment-off:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page="study"] .key-verse-card {
    border-left-color: var(--kv-keyverse-accent) !important;
}

/* Neutralize lower-section chrome without altering active mood chips,
   verse highlights, capsules, focus rings or the branded navy hero. */
html.parchment-off:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page="study"] :is(
    .study-insights-mood-filter, .insight-icon,
    .chapter-primary-atlas-row:hover, .insight-card.study-card:hover
) {
    background: var(--study-light-section) !important;
    border-color: var(--study-light-border) !important;
}

/* Ordinary reading copy must not inherit an opacity wash. This excludes
   metadata, decorative marks, disabled controls and all heading elements. */
html.parchment-off:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page="study"] :is(
    .verse-text, .summary-content p, .insight-snippet, .reference-desc,
    .christ-ref-text, .christ-ref-overview, .kv-overview,
    .annot-detail-body p, .annot-detail-body li, .note-sub
) {
    opacity: 1 !important;
}

/* Phones do not use the desktop reading-ink overrides. Apply the same
   neutral color roles here without changing their edge-to-edge sections. */
@media (max-width: 768px) {
    html.parchment-off:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page="study"] :is(
        .summary-content p, .insight-snippet, .reference-desc,
        .christ-ref-text, .christ-ref-overview, .kv-overview,
        .annot-detail-body p, .annot-detail-body li
    ) {
        color: var(--study-light-prose) !important;
        -webkit-text-fill-color: currentColor !important;
    }

    /* Preserve the phone layout's frameless sections. */
    html.parchment-off:not(.dark-mode):not(#_#_):not(.kv-w):not(.kv-x):not(.kv-y):not(.kv-z) body[data-reading-page="study"] .detached-summary-section {
        box-shadow: none !important;
    }
}
