/* One learning typography layer, loaded after module styles in Public and Student layouts.
   Page sizing is opt-in; card rules travel with the existing shared components. */
body:is(.sofl-dashboard-body,.sofl-front-page):is([data-learning-typography="listing"],[data-learning-typography="detail"]) {
    --learning-heading: var(--sofl-heading-color);
    --learning-body: var(--sofl-body-text-color);
    --learning-h1: 32px;
    --learning-h2: 22px;
}
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] { --learning-h2: 24px; }
body:is(.sofl-dashboard-body,.sofl-front-page):is([data-learning-typography="listing"],[data-learning-typography="detail"]) :is(.sofl-product-hero, .sofl-public-term-hero) {
    --learning-heading: #fff;
    --learning-body: #e5edf6;
}
body:is(.sofl-dashboard-body,.sofl-front-page):is([data-learning-typography="listing"],[data-learning-typography="detail"]) main h1,
body:is(.sofl-dashboard-body,.sofl-front-page):is([data-learning-typography="listing"],[data-learning-typography="detail"]) :is(.sofl-term-hero, .sofl-watch-content, .public-watch-info, .student-blog-reading-hero, .article-details-hero, .hlv-playlist-header, .sofl-public-term-hero, .sofl-product-hero) h1,
body:is(.sofl-dashboard-body,.sofl-front-page):is([data-learning-typography="listing"],[data-learning-typography="detail"]) .student-module-hero.student-module-hero h1,
body:is(.sofl-dashboard-body,.sofl-front-page):is([data-learning-typography="listing"],[data-learning-typography="detail"]) .module-availability h1 {
    font-family: var(--font-heading);
    font-size: var(--learning-h1);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.02em;
    color: var(--learning-heading);
    overflow-wrap: anywhere;
}
body:is(.sofl-dashboard-body,.sofl-front-page):is([data-learning-typography="listing"],[data-learning-typography="detail"]) main h1 :is(em,span) { font: inherit; color: inherit; }
body:is(.sofl-dashboard-body,.sofl-front-page):is([data-learning-typography="listing"],[data-learning-typography="detail"]) main h2:not(:where(.sofl-topbar *, .student-term-card *, .ms-card *, .hlv-video-card *, .public-article *, .fin-term-card *, .public-sample-term-card *, .hlv-reference-card *, .hlv-playlist-card *, .student-hlv-playlist-card *)) {
    font-family: var(--font-heading);
    font-size: var(--learning-h2);
    font-weight: 900;
    line-height: 1.4;
    letter-spacing: 0;
    color: var(--learning-heading);
    overflow-wrap: anywhere;
}
body:is(.sofl-dashboard-body,.sofl-front-page):is([data-learning-typography="listing"],[data-learning-typography="detail"]) main h3:not(:where(.student-term-card *, .ms-card *, .hlv-video-card *, .public-article *, .fin-term-card *, .public-sample-term-card *, .hlv-reference-card *, .hlv-playlist-card *, .student-hlv-playlist-card *)),
body:is(.sofl-dashboard-body,.sofl-front-page):is([data-learning-typography="listing"],[data-learning-typography="detail"]) main h4:not(:where(.student-term-card *, .ms-card *, .hlv-video-card *, .public-article *, .fin-term-card *, .public-sample-term-card *, .hlv-reference-card *, .hlv-playlist-card *, .student-hlv-playlist-card *)),
body:is(.sofl-dashboard-body,.sofl-front-page):is([data-learning-typography="listing"],[data-learning-typography="detail"]) main h5:not(:where(.student-term-card *, .ms-card *, .hlv-video-card *, .public-article *, .fin-term-card *, .public-sample-term-card *, .hlv-reference-card *, .hlv-playlist-card *, .student-hlv-playlist-card *)),
body:is(.sofl-dashboard-body,.sofl-front-page):is([data-learning-typography="listing"],[data-learning-typography="detail"]) main h6:not(:where(.student-term-card *, .ms-card *, .hlv-video-card *, .public-article *, .fin-term-card *, .public-sample-term-card *, .hlv-reference-card *, .hlv-playlist-card *, .student-hlv-playlist-card *)) {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.4;
    color: var(--learning-heading);
    overflow-wrap: anywhere;
}
body:is(.sofl-dashboard-body,.sofl-front-page):is([data-learning-typography="listing"],[data-learning-typography="detail"]) :is(.student-module-hero, .module-availability, .sofl-product-hero) p,
body:is(.sofl-dashboard-body,.sofl-front-page):is([data-learning-typography="listing"],[data-learning-typography="detail"]) :is(.student-blog-hero-copy, .article-details-hero, .sofl-term-hero, .sofl-public-term-hero) > p,
body:is(.sofl-dashboard-body,.sofl-front-page):is([data-learning-typography="listing"],[data-learning-typography="detail"]) :is(.student-blog-hero-copy, .article-details-hero header, .sofl-term-hero-main) > p {
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--learning-body);
}
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="listing"] :is(.public-section-description, .student-section-header p, .ms-section-heading p, .hlv-learning-cta-description, .student-empty-state p, .fin-why-intro) {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--learning-body);
}
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="listing"] :is(.student-module-hero, .sofl-product-hero) .public-section-description { font-size: 15px; }
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] :is(.sofl-watch-meta, .hlv-reference-sidebar > p, .student-blog-context-card > p, .student-blog-hero-copy > p, .article-details-summary) {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--learning-body);
}
/* The shared cards keep their existing type sizes, images, badges and metadata. */
:is(.sofl-dashboard-body, .sofl-front-page) :is(.student-term-card, .ms-card, .hlv-video-card, .public-article, .fin-term-card, .public-sample-term-card, .hlv-reference-card, .hlv-playlist-card, .student-hlv-playlist-card) :is(h2,h3),
:is(.sofl-dashboard-body, .sofl-front-page) :is(.student-term-card, .ms-card, .hlv-video-card, .public-article, .fin-term-card, .public-sample-term-card, .hlv-reference-card, .hlv-playlist-card, .student-hlv-playlist-card) :is(h2,h3) a {
    color: var(--sofl-heading-color);
    font-weight: 600;
}
:is(.sofl-dashboard-body, .sofl-front-page) :is(.ms-card-body, .hlv-video-card-copy, .public-article-body, .fin-card-copy, .public-sample-term-card, .hlv-video-body, .hlv-playlist-body, .student-hlv-card-body) > p,
:is(.sofl-dashboard-body, .sofl-front-page) :is(.student-term-summary, .sofl-fin-card-summary) {
    color: var(--sofl-body-text-color);
    font-weight: 500;
    font-size: 16px;

}
/* Reading typography is confined to real content containers, never player controls. */
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] :is(.sofl-reading-content, .sofl-blog-richtext, .article-reading-body, .sofl-article-content, .sofl-video-description, .public-watch-description) {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.75;
    color: var(--sofl-body-text-color);
    overflow-wrap: anywhere;
}
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] :is(.sofl-reading-content, .sofl-blog-richtext, .article-reading-body, .sofl-article-content, .sofl-video-description, .public-watch-description) :is(p,ul,ol,li,td) {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.75;
    color: var(--sofl-body-text-color);
}
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] :is(.sofl-reading-content, .sofl-blog-richtext, .article-reading-body, .sofl-article-content, .sofl-video-description, .public-watch-description) :is(p,ul,ol,blockquote,table) { margin-block: 0 1rem; }
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] :is(.sofl-reading-content, .sofl-blog-richtext, .article-reading-body, .sofl-article-content, .sofl-video-description, .public-watch-description) :is(h1,h2,h3,h4,h5,h6) {
    font-family: var(--font-heading);
    color: var(--sofl-heading-color);
    font-weight: 600;
    line-height: 1.4;
    margin-block: 1.5rem .75rem;
}
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] :is(.sofl-reading-content, .sofl-blog-richtext, .article-reading-body, .sofl-article-content, .sofl-video-description, .public-watch-description) :is(h1,h2) { font-size: var(--learning-h2); }
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] :is(.sofl-reading-content, .sofl-blog-richtext, .article-reading-body, .sofl-article-content, .sofl-video-description, .public-watch-description) h3 { font-size: 20px; }
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] :is(.sofl-reading-content, .sofl-blog-richtext, .article-reading-body, .sofl-article-content, .sofl-video-description, .public-watch-description) :is(h4,h5,h6) { font-size: 18px; }
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] :is(.sofl-reading-content, .sofl-blog-richtext, .article-reading-body, .sofl-article-content, .sofl-video-description, .public-watch-description) :is(ul,ol) { padding-inline-start: 1.5rem; }
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] :is(.sofl-reading-content, .sofl-blog-richtext, .article-reading-body, .sofl-article-content, .sofl-video-description, .public-watch-description) li { margin-block: .3rem; }
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] :is(.sofl-reading-content, .sofl-blog-richtext, .article-reading-body, .sofl-article-content, .sofl-video-description, .public-watch-description) strong { font-weight: 600; }
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] :is(.sofl-reading-content, .sofl-blog-richtext, .article-reading-body, .sofl-article-content, .sofl-video-description, .public-watch-description) blockquote { padding-inline-start: 1rem; border-inline-start: 3px solid #dce3eb; color: var(--sofl-body-text-color); }
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] :is(.sofl-reading-content, .sofl-blog-richtext, .article-reading-body, .sofl-article-content, .sofl-video-description, .public-watch-description) code { font-size: .9em; }
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] :is(.sofl-reading-content, .sofl-blog-richtext, .article-reading-body, .sofl-article-content, .sofl-video-description, .public-watch-description) table { max-width: 100%; font-size: 15px; line-height: 1.6; }
@media(max-width:575.98px) {
    body:is(.sofl-dashboard-body,.sofl-front-page):is([data-learning-typography="listing"],[data-learning-typography="detail"]) { --learning-h1: 28px; --learning-h2: 20px; }
}

/* Override only legacy editor font sizing in reading text; preserve semantic emphasis and colors. */
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] :is(.sofl-reading-content, .sofl-blog-richtext, .article-reading-body, .sofl-article-content, .sofl-video-description, .public-watch-description) :is(p,li,td,span)[style*="font-size"] {
    font-size: 16px !important;
}
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] :is(.sofl-form-card-header,.sofl-term-section-header,.student-blog-content-header,.student-blog-context-card,.hlv-watch-panel) h2 {
    font-family: var(--font-heading);
    font-size: var(--learning-h2);
    font-weight: 600;
    color: var(--learning-heading);
    line-height: 1.4;
}
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] :is(.sofl-reading-content, .sofl-blog-richtext, .article-reading-body, .sofl-article-content, .sofl-video-description, .public-watch-description) :is(table,pre) {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

/* Public editorial templates use ID-scoped rules; keep their existing semantics and cascade. */
body.sofl-front-page:is([data-learning-typography="listing"],[data-learning-typography="detail"]) #public-main .public-section-title {
    font-family: var(--font-heading);
    font-size: var(--public-title-size, var(--learning-h2));
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 0;
    color: var(--learning-heading);
}
body.sofl-front-page:is([data-learning-typography="listing"],[data-learning-typography="detail"]) #public-main :is(.public-page-title,.sofl-public-term-hero h1,.article-details-hero h1) {
    font-family: var(--font-heading);
    font-size: var(--learning-h1);
    font-weight: 700;
    line-height: 1.25;
    color: var(--learning-heading);
}
body.sofl-front-page:is([data-learning-typography="listing"],[data-learning-typography="detail"]) #public-main .public-section-title em {
    font: inherit;
    color: var(--public-highlight-color);
}
body.sofl-front-page:is([data-learning-typography="listing"],[data-learning-typography="detail"]) #public-main .public-section-description {
    font-size: var(--public-description-size, 20px);
    font-weight: 500;
    line-height: 1.6;
    color: var(--learning-body);
}
body.sofl-front-page:is([data-learning-typography="listing"],[data-learning-typography="detail"]) #public-main .sofl-product-hero .public-section-description { font-size: 15px; }
body:is(.sofl-dashboard-body,.sofl-front-page):is([data-learning-typography="listing"],[data-learning-typography="detail"]) .public-account-cta {
    --learning-heading: #fff;
    --learning-body: #d5e0e8;
}
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="listing"] main p:not(:where(.sofl-topbar *, .student-term-card *, .ms-card *, .hlv-video-card *, .public-article *, .fin-term-card *, .public-sample-term-card *, .hlv-reference-card *, .hlv-playlist-card *, .student-hlv-playlist-card *)) {
    font-size: 20px;
    color: var(--learning-body);
    font-weight: 500;
    line-height: 1.6;
}
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] .sofl-watch-content > p {
    color: var(--sofl-body-text-color);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.75;
}
body:is(.sofl-dashboard-body,.sofl-front-page)[data-learning-typography="detail"] .public-watch-info > p {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.75;
    color: var(--sofl-body-text-color);
}
body.sofl-front-page[data-learning-typography="detail"] .sofl-public-term { --term-ink: var(--sofl-heading-color); }

/* Public listing selectors include their existing page ID specificity. */
body.sofl-front-page #public-main :is(.public-article,.public-sample-term-card,.hlv-reference-card,.hlv-playlist-card) :is(h2,h3),
body.sofl-front-page #public-main :is(.public-article,.public-sample-term-card,.hlv-reference-card,.hlv-playlist-card) :is(h2,h3) a {
    color: var(--sofl-heading-color);
    font-weight: 600;
}
body.sofl-front-page #public-main :is(.public-article-body,.public-sample-term-card,.hlv-video-body,.hlv-playlist-body) > p {
    color: var(--sofl-body-text-color);
    font-weight: 400;
}

/* Approved Student module hero title size (including the shared heading wrapper). */
body.sofl-dashboard-body .student-module-hero .student-module-hero-content > .student-module-hero-heading > h1,
body.sofl-dashboard-body .student-module-hero .student-module-hero-content > .student-module-hero-heading > div > h1 {
    font-size:64px;
}

/* Article detail card headers share a compact hierarchy; rich-text headings stay independent. */
body.sofl-dashboard-body[data-learning-typography="detail"] .student-blog-detail :is(.student-blog-content-header,.student-blog-context-card,.blog-subscription-context) h2,
body.sofl-dashboard-body[data-learning-typography="detail"] .student-blog-detail .sofl-blog-related > .sofl-section-heading h2 {
    font-size:18px;
}

/* Approved FinLexicon term details hero title size. */
body.sofl-dashboard-body[data-learning-typography="detail"] .sofl-student-term-page .sofl-term-learning-hero > .sofl-term-hero-copy > h1 {
    font-size:44px;
}

