/* NOUNUniversity Theme 17.1.3 — TMA service + exam-store visibility repair
 *
 * Why this layer exists:
 * Theme 17 intentionally contains high-authority public readability rules and
 * a generic badge/pill contract. The current Student Portal also contains
 * deliberately dark/inverse areas. On the TMA service hero and the exam-store
 * hero label those two contracts collided, leaving dark text on dark green.
 *
 * This file is deliberately route-scoped and loaded after 17.1.2. It changes
 * foreground ownership only where required and leaves Portal forms, pricing,
 * payment, cart and fulfilment behaviour untouched.
 */

/* -------------------------------------------------------------------------
 * Shared page-context action: the green "Open Student Workspace" control must
 * never inherit the ordinary green link foreground from the public theme.
 * The selectors deliberately require button/CTA/workspace semantics so plain
 * text links elsewhere on the page are not turned white on a light surface.
 * ---------------------------------------------------------------------- */
html body.ns17:is(.ns17-tma-service-page,.ns17-exam-store-page)
:is(.nsp-public-page,.nsp-public-experience,[class*="public"])
a[href*="/spfle/"]:is([class*="btn"],[class*="button"],[class*="cta"],[class*="workspace"]),
html body.ns17:is(.ns17-tma-service-page,.ns17-exam-store-page)
:is([class*="context"],[class*="page-head"],[class*="page-intro"],[class*="service-head"])
a[href*="/spfle/"] {
    color:#ffffff !important;
    -webkit-text-fill-color:#ffffff !important;
    opacity:1 !important;
    text-shadow:none !important;
}

/* -------------------------------------------------------------------------
 * TMA service hero.
 * Covers both the current Portal naming and retained/legacy TMA hero names.
 * Only inverse-hero typography is repainted; white CTA buttons keep their own
 * dark foreground and the readable light-green "Professional TMA Help" pill
 * remains untouched.
 * ---------------------------------------------------------------------- */
html body.ns17.ns17-tma-service-page
:is(.tma-hero,.nsp-tma-hero,.nsp-tma-service-hero,.nsp-service-hero,.nsp-tma-service__hero,[class*="tma"][class*="hero"])
:is(h1,h2,h3),
html body.ns17.nsp-tma-page
:is(.tma-hero,.nsp-tma-hero,.nsp-tma-service-hero,.nsp-service-hero,.nsp-tma-service__hero,[class*="tma"][class*="hero"])
:is(h1,h2,h3) {
    color:#ffffff !important;
    -webkit-text-fill-color:#ffffff !important;
    opacity:1 !important;
    text-shadow:none !important;
}

html body.ns17.ns17-tma-service-page
:is(.tma-hero,.nsp-tma-hero,.nsp-tma-service-hero,.nsp-service-hero,.nsp-tma-service__hero,[class*="tma"][class*="hero"]) > p,
html body.ns17.ns17-tma-service-page
:is(.tma-hero,.nsp-tma-hero,.nsp-tma-service-hero,.nsp-service-hero,.nsp-tma-service__hero,[class*="tma"][class*="hero"]) :is(.nsp-tma-hero-copy,.nsp-tma-hero-content,.tma-hero-inner) > p,
html body.ns17.nsp-tma-page
:is(.tma-hero,.nsp-tma-hero,.nsp-tma-service-hero,.nsp-service-hero,.nsp-tma-service__hero,[class*="tma"][class*="hero"]) > p,
html body.ns17.nsp-tma-page
:is(.tma-hero,.nsp-tma-hero,.nsp-tma-service-hero,.nsp-service-hero,.nsp-tma-service__hero,[class*="tma"][class*="hero"]) :is(.nsp-tma-hero-copy,.nsp-tma-hero-content,.tma-hero-inner) > p {
    color:#dbe9e2 !important;
    -webkit-text-fill-color:#dbe9e2 !important;
    opacity:1 !important;
}

/* Supporting trust/meta line below the main TMA CTA. */
html body.ns17.ns17-tma-service-page
:is(.tma-hero,.nsp-tma-hero,.nsp-tma-service-hero,.nsp-service-hero,.nsp-tma-service__hero,[class*="tma"][class*="hero"])
:is([class*="trust"],[class*="meta"],[class*="features"],[class*="proof"],[class*="secure"]),
html body.ns17.nsp-tma-page
:is(.tma-hero,.nsp-tma-hero,.nsp-tma-service-hero,.nsp-service-hero,.nsp-tma-service__hero,[class*="tma"][class*="hero"])
:is([class*="trust"],[class*="meta"],[class*="features"],[class*="proof"],[class*="secure"]) {
    color:#c9ded4 !important;
    -webkit-text-fill-color:#c9ded4 !important;
    opacity:1 !important;
}
html body.ns17.ns17-tma-service-page
:is(.tma-hero,.nsp-tma-hero,.nsp-tma-service-hero,.nsp-service-hero,.nsp-tma-service__hero,[class*="tma"][class*="hero"])
:is([class*="trust"],[class*="meta"],[class*="features"],[class*="proof"],[class*="secure"]) :is(span,small,strong),
html body.ns17.nsp-tma-page
:is(.tma-hero,.nsp-tma-hero,.nsp-tma-service-hero,.nsp-service-hero,.nsp-tma-service__hero,[class*="tma"][class*="hero"])
:is([class*="trust"],[class*="meta"],[class*="features"],[class*="proof"],[class*="secure"]) :is(span,small,strong) {
    color:inherit !important;
    -webkit-text-fill-color:currentColor !important;
    opacity:1 !important;
}

/* Retained legacy hero structure places the paragraph directly below an inner
 * wrapper. This exact selector closes that case without touching CTA labels. */
html body.ns17:is(.ns17-tma-service-page,.nsp-tma-page) .tma-hero > div > p {
    color:#dbe9e2 !important;
    -webkit-text-fill-color:#dbe9e2 !important;
    opacity:1 !important;
}
html body.ns17:is(.ns17-tma-service-page,.nsp-tma-page) .tma-hero-features,
html body.ns17:is(.ns17-tma-service-page,.nsp-tma-page) .tma-hero-features :is(span,small,strong) {
    color:#c9ded4 !important;
    -webkit-text-fill-color:#c9ded4 !important;
    opacity:1 !important;
}

/* -------------------------------------------------------------------------
 * Exam summaries / past-questions store hero label.
 * The generic Theme 17 badge/pill contract can own the label foreground while
 * the Portal owns a darker green background. Give the hero label one complete
 * palette instead of allowing those layers to mix.
 * ---------------------------------------------------------------------- */
html body.ns17.ns17-exam-store-page
:is(.nsp-store-kicker,.nsp-store-badge,.nsp-store-eyebrow,.nsp-public-kicker,
    [class*="store"][class*="kicker"],[class*="store"][class*="badge"],[class*="store"][class*="eyebrow"],
    [class*="material"][class*="kicker"],[class*="material"][class*="badge"],[class*="material"][class*="eyebrow"]),
html body.ns17.nsp-store-page
:is(.nsp-store-kicker,.nsp-store-badge,.nsp-store-eyebrow,.nsp-public-kicker,
    [class*="store"][class*="kicker"],[class*="store"][class*="badge"],[class*="store"][class*="eyebrow"],
    [class*="material"][class*="kicker"],[class*="material"][class*="badge"],[class*="material"][class*="eyebrow"]) {
    background:#246848 !important;
    border-color:#246848 !important;
    color:#ffffff !important;
    -webkit-text-fill-color:#ffffff !important;
    opacity:1 !important;
    text-shadow:none !important;
}
html body.ns17:is(.ns17-exam-store-page,.nsp-store-page)
:is(.nsp-store-kicker,.nsp-store-badge,.nsp-store-eyebrow,.nsp-public-kicker,
    [class*="store"][class*="kicker"],[class*="store"][class*="badge"],[class*="store"][class*="eyebrow"],
    [class*="material"][class*="kicker"],[class*="material"][class*="badge"],[class*="material"][class*="eyebrow"]) :is(span,strong,small,svg) {
    color:inherit !important;
    -webkit-text-fill-color:currentColor !important;
    opacity:1 !important;
}

/* Store hero variant where the label is only identifiable inside the hero. */
html body.ns17:is(.ns17-exam-store-page,.nsp-store-page)
:is(.nsp-store-hero,.nsp-exam-store-hero,.nsp-materials-hero,[class*="store"][class*="hero"],[class*="material"][class*="hero"])
:is([class*="kicker"],[class*="badge"],[class*="eyebrow"],[class*="pill"]) {
    background:#246848 !important;
    border-color:#246848 !important;
    color:#ffffff !important;
    -webkit-text-fill-color:#ffffff !important;
    opacity:1 !important;
}

/* Explicit dark-mode ownership: the inverse text remains readable when the
 * shared platform preference is Dark; only the store label surface deepens. */
html[data-theme="dark"] body.ns17:is(.ns17-exam-store-page,.nsp-store-page)
:is(.nsp-store-kicker,.nsp-store-badge,.nsp-store-eyebrow,.nsp-public-kicker,
    [class*="store"][class*="kicker"],[class*="store"][class*="badge"],[class*="store"][class*="eyebrow"],
    [class*="material"][class*="kicker"],[class*="material"][class*="badge"],[class*="material"][class*="eyebrow"]) {
    background:#1c573d !important;
    border-color:#4b8c6e !important;
    color:#ffffff !important;
    -webkit-text-fill-color:#ffffff !important;
}

@media (forced-colors:active) {
    html body.ns17:is(.ns17-tma-service-page,.nsp-tma-page,.ns17-exam-store-page,.nsp-store-page)
    :is(.tma-hero,.nsp-tma-hero,.nsp-tma-service-hero,.nsp-service-hero,.nsp-tma-service__hero,
        .nsp-store-kicker,.nsp-store-badge,.nsp-store-eyebrow,.nsp-public-kicker) {
        forced-color-adjust:auto !important;
    }
}
