/*
 * Public site design system: home pages, course catalogue, course page, footer pages, footer.
 *
 * Loaded last by main.html. Everything is namespaced "s-" and lives inside .s-page (page
 * content), .s-footer (footer of every LMS page) or body.site-page (header polish on the
 * public pages only), so the learner dashboard, courseware and Control Hub are not touched.
 *
 * Contents
 *   1. Tokens            colours come from the site's brand colour (--primary-color)
 *   2. Base              reset inside .s-page, container, sections, type
 *   3. Components        buttons, chips, badges, search, cards, stats, carousel, FAQ…
 *   4. Home              hero, topics, features, video, call to action
 *   5. Catalogue         filters, result bar, pagination
 *   6. Course page       hero, enrol card, outline, instructors
 *   7. Article pages     footer pages, static pages
 *   8. Footer
 *   9. Header            (body.site-page only)
 *  10. Motion, right-to-left, small screens, print
 *
 * Text is never smaller than 1rem. Layout uses logical properties (inline-start/end), so
 * Arabic and other right-to-left languages need no second stylesheet.
 */

/* ---------------------------------------------------------------- 1. Tokens */

:root {
    --s-primary: var(--primary-color, #2b2399);
    --s-primary-strong: color-mix(in srgb, var(--s-primary) 78%, #000);
    /* The primary color as text: the same in light mode, lightened on dark surfaces. */
    --s-primary-ink: var(--s-primary);
    --s-primary-deep: color-mix(in srgb, var(--s-primary) 45%, #060818);
    --s-primary-soft: color-mix(in srgb, var(--s-primary) 9%, #fff);
    --s-primary-line: color-mix(in srgb, var(--s-primary) 22%, #fff);
    --s-accent: #f5a524;
    --s-ink: #0f172a;
    --s-text: #334155;
    --s-muted: #5b6678;
    --s-line: #e3e8f0;
    --s-surface: #fff;
    --s-tint: #f5f7fb;
    --s-card: #fff;
    --s-success: #0f8a5f;
    --s-danger: #c62828;
    --s-radius: 18px;
    --s-radius-sm: 12px;
    --s-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .06);
    --s-shadow-lift: 0 2px 4px rgba(15, 23, 42, .06), 0 18px 40px rgba(15, 23, 42, .12);
    --s-width: 1200px;
    --s-gutter: clamp(16px, 4vw, 32px);
    --s-space: clamp(56px, 8vw, 96px);
    /* The theme's fonts (theme configuration page) when the page can load them, else Inter. */
    --s-font: var(--s-theme-font, var(--s-font-default));
    --s-font-headings: var(--s-theme-font-headings, var(--s-font));
    --s-font-default: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", "Noto Sans Devanagari", sans-serif;
}

/* ---------------------------------------------------------------- 2. Base */

body.site-page .content-wrapper {
    background: var(--s-surface);
    padding: 0;
    max-width: none;
}

body.site-page .course-breadcrumb-wrapper {
    display: none;
}

.s-page,
.s-footer {
    font-family: var(--s-font);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--s-text);
    text-align: start;
    -webkit-font-smoothing: antialiased;
}

.s-page {
    display: block;
    /* The header lays its menus out with floats that reach below it. */
    clear: both;
    background: var(--s-surface);
    overflow-x: clip;
}

.s-page:focus {
    outline: none;
}

.s-page *,
.s-footer * {
    box-sizing: border-box;
}

.s-page h1, .s-page h2, .s-page h3, .s-page h4, .s-page p, .s-page ul, .s-page ol,
.s-page dl, .s-page dd, .s-page dt, .s-page li, .s-page blockquote, .s-page figure,
.s-footer h2, .s-footer p, .s-footer ul, .s-footer li {
    margin: 0;
    padding: 0;
    font-family: inherit;
    letter-spacing: normal;
    text-transform: none;
    text-align: inherit;
}

.s-page ul, .s-page ol, .s-footer ul {
    list-style: none;
}

.s-page h1, .s-page h2, .s-page h3, .s-page h4 {
    font-family: var(--s-font-headings);
    color: var(--s-ink);
    font-weight: 700;
    line-height: 1.2;
}

.s-page p, .s-page li, .s-page dd, .s-page dt {
    font-size: 1rem;
    color: inherit;
    line-height: inherit;
}

/* The platform forces one link colour with !important (tab.css). We answer once, here, and
   every component sets --s-link instead of fighting that rule again. */
.s-page a, .s-footer a,
.s-page a:any-link, .s-footer a:any-link {
    color: var(--s-link, var(--s-primary)) !important;
    text-decoration: none;
    font-size: inherit;
    transition: color .15s ease;
}

.s-page a:hover {
    --s-link: var(--s-primary-strong);
}

.s-page img {
    max-width: 100%;
    display: block;
}

.s-page :focus-visible,
.s-footer :focus-visible {
    outline: 3px solid color-mix(in srgb, var(--s-primary) 55%, #fff);
    outline-offset: 2px;
    border-radius: 6px;
}

.s-icon {
    flex: none;
    vertical-align: -0.2em;
}

.s-container {
    width: 100%;
    max-width: calc(var(--s-width) + 2 * var(--s-gutter));
    margin-inline: auto;
    padding-inline: var(--s-gutter);
}

.s-container--narrow {
    max-width: calc(820px + 2 * var(--s-gutter));
}

.s-section {
    padding-block: var(--s-space);
}

.s-section--tint {
    background: var(--s-tint);
}

.s-section--tight {
    padding-block: calc(var(--s-space) * .55);
}

.s-section--flush {
    padding-block: 28px 0;
}

.s-head {
    display: flex;
    gap: 16px 32px;
    margin-block-end: clamp(28px, 4vw, 44px);
}

.s-head--center {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.s-head--center .s-head__text {
    max-width: 680px;
}

.s-head--split {
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
}

.s-page .s-eyebrow {
    color: var(--s-primary-ink);
    font-weight: 600;
    margin-block-end: 8px;
}

.s-page .s-title {
    font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
    letter-spacing: -.02em;
}

.s-page .s-lead {
    font-size: 1.125rem;
    color: var(--s-muted);
    margin-block-start: 12px;
}

.s-page .s-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    white-space: nowrap;
}

.s-link .s-icon {
    transition: transform .2s ease;
}

.s-link:hover .s-icon {
    transform: translateX(4px);
}

.s-page .s-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--s-muted);
    background: var(--s-tint);
    border-radius: var(--s-radius);
    border: 1px dashed var(--s-line);
}

.s-notice {
    background: #fff7e6;
    color: #7a4b00;
    padding-block: 12px;
    border-block-end: 1px solid #f3dfb5;
}

/* ---------------------------------------------------------------- 3. Components */

/*
 * Buttons use the MFE (Paragon) button design tokens, so a button looks and reacts the same on
 * LMS pages and in the MFEs: control-hub resolves the tokens of the brand CSS and of the theme
 * configuration page into --s-btn-* (ui_configuration/api.py get_button_css, printed by
 * main.html for light and dark mode). The values after the commas are used only when that
 * could not be read. Variants:
 *   --primary                 MFE "primary"
 *   --secondary, --outline    MFE "outline-primary"
 *   --tertiary                MFE "tertiary"
 *   --light, --accent         on a colored hero: the inverse of primary
 *   --ghost, --outline-light  on a colored hero: the inverse of outline
 * No button moves or grows a shadow on hover: only the token colors change, as in the MFEs.
 */
.s-btn,
a.s-btn,
.s-page .s-btn,
.s-page a.s-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 0;
    padding: var(--s-btn-padding-y, .5625rem) var(--s-btn-padding-x, 1rem);
    border: var(--s-btn-border-width, 1px) solid transparent;
    border-radius: var(--s-btn-radius, .375rem);
    font: var(--s-btn-font-weight, 400) 1rem/var(--s-btn-line-height, 1.3333) var(--s-font);
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    text-shadow: none;
    box-shadow: none;
    background-image: none;
    cursor: pointer;
    white-space: nowrap;
    transform: none;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
}

/*
 * The legacy platform CSS (lms-main-v1.css) styles every <button>: a green gradient on hover
 * (button:hover:not(:disabled), which outweighs .s-btn:hover) and an inset shadow on focus and
 * press. A <button class="s-btn"> must look like a link button, so these states are reset with
 * selectors of at least that weight, and every variant below repeats its hover / active colors
 * for button.s-btn--x:...:not(:disabled).
 */
.s-btn:hover,
.s-page .s-btn:hover,
.s-btn:focus,
.s-btn:active,
button.s-btn:hover:not(:disabled),
button.s-btn:focus:not(:disabled),
button.s-btn:active:not(:disabled) {
    transform: none;
    box-shadow: none;
    background-image: none;
    text-decoration: none;
}

.s-btn:focus-visible,
.s-page .s-btn:focus-visible {
    outline: var(--s-btn-focus-width, 2px) solid var(--s-btn-primary-focus, var(--s-primary));
    outline-offset: var(--s-btn-focus-gap, 2px);
}

.s-btn--primary,
a.s-btn--primary,
.s-page .s-btn--primary,
.s-page a.s-btn--primary {
    background-color: var(--s-btn-primary-bg, var(--s-primary));
    border-color: var(--s-btn-primary-border, var(--s-primary));
    color: var(--s-btn-primary-text, #fff);
    --s-link: var(--s-btn-primary-text, #fff);
}

button.s-btn--primary:hover:not(:disabled),
.s-btn--primary:hover,
.s-btn--primary:focus-visible,
.s-page .s-btn--primary:hover,
.s-page a.s-btn--primary:hover,
.s-page .s-btn--primary:focus-visible {
    background-color: var(--s-btn-primary-hover-bg, var(--s-primary-strong));
    border-color: var(--s-btn-primary-hover-border, var(--s-primary-strong));
    color: var(--s-btn-primary-hover-text, #fff);
    --s-link: var(--s-btn-primary-hover-text, #fff);
}

button.s-btn--primary:active:not(:disabled),
.s-btn--primary:active,
.s-page .s-btn--primary:active {
    background-color: var(--s-btn-primary-active-bg, var(--s-primary-strong));
    border-color: var(--s-btn-primary-active-border, var(--s-primary-strong));
    color: var(--s-btn-primary-active-text, #fff);
    --s-link: var(--s-btn-primary-active-text, #fff);
}

.s-btn--secondary,
a.s-btn--secondary,
.s-btn--outline,
a.s-btn--outline,
.s-page .s-btn--secondary,
.s-page a.s-btn--secondary,
.s-page .s-btn--outline,
.s-page a.s-btn--outline {
    background-color: var(--s-btn-outline-bg, transparent);
    border-color: var(--s-btn-outline-border, var(--s-primary));
    color: var(--s-btn-outline-text, var(--s-primary));
    --s-link: var(--s-btn-outline-text, var(--s-primary));
}

button.s-btn--secondary:hover:not(:disabled),
.s-btn--secondary:hover,
a.s-btn--secondary:hover,
a.s-btn--secondary:focus,
button.s-btn--outline:hover:not(:disabled),
.s-btn--outline:hover,
a.s-btn--outline:hover,
.s-btn--secondary:focus-visible,
.s-btn--outline:focus-visible,
.s-page .s-btn--secondary:hover,
.s-page a.s-btn--secondary:hover,
.s-page a.s-btn--secondary:focus,
.s-page .s-btn--outline:hover,
.s-page a.s-btn--outline:hover {
    background-color: var(--s-btn-outline-hover-bg, var(--s-primary-soft, rgba(235, 89, 57, 0.12)));
    border-color: var(--s-btn-outline-hover-border, var(--s-primary-strong));
    color: var(--s-btn-outline-hover-text, var(--s-primary-strong)) !important;
    --s-link: var(--s-btn-outline-hover-text, var(--s-primary-strong));
    text-decoration: none !important;
    background-image: none !important;
    box-shadow: none !important;
}

button.s-btn--secondary:active:not(:disabled),
.s-btn--secondary:active,
a.s-btn--secondary:active,
button.s-btn--outline:active:not(:disabled),
.s-btn--outline:active,
a.s-btn--outline:active,
.s-page .s-btn--secondary:active,
.s-page a.s-btn--secondary:active,
.s-page .s-btn--outline:active {
    background-color: var(--s-btn-outline-active-bg, var(--s-primary-soft, rgba(235, 89, 57, 0.18)));
    border-color: var(--s-btn-outline-active-border, var(--s-primary-strong));
    color: var(--s-btn-outline-active-text, var(--s-primary-strong)) !important;
    --s-link: var(--s-btn-outline-active-text, var(--s-primary-strong));
    text-decoration: none !important;
}

.s-btn--tertiary,
.s-page .s-btn--tertiary,
.s-page a.s-btn--tertiary {
    background-color: var(--s-btn-tertiary-bg, transparent);
    border-color: var(--s-btn-tertiary-border, transparent);
    color: var(--s-btn-tertiary-text, var(--s-ink));
    --s-link: var(--s-btn-tertiary-text, var(--s-ink));
}

button.s-btn--tertiary:hover:not(:disabled),
.s-btn--tertiary:hover,
.s-btn--tertiary:focus-visible,
.s-page .s-btn--tertiary:hover,
.s-page a.s-btn--tertiary:hover {
    background-color: var(--s-btn-tertiary-hover-bg, var(--s-tint));
    border-color: var(--s-btn-tertiary-hover-border, transparent);
    color: var(--s-btn-tertiary-hover-text, var(--s-ink));
    --s-link: var(--s-btn-tertiary-hover-text, var(--s-ink));
}

/* In dark mode the neutral "tertiary" tokens of the brand may be dark-on-dark here: use the page's ink. */
html[data-theme="dark"] .s-btn--tertiary {
    color: var(--s-ink);
    --s-link: var(--s-ink);
}

html[data-theme="dark"] .s-btn--tertiary:hover {
    background-color: var(--s-tint);
    color: var(--s-ink);
    --s-link: var(--s-ink);
}

/* On a colored hero: the inverse pair (same sizes and behaviour, colors turned around). */
.s-btn--light,
.s-btn--accent,
.s-page .s-btn--light,
.s-page a.s-btn--light,
.s-page .s-btn--accent,
.s-page a.s-btn--accent {
    background-color: #fff;
    border-color: #fff;
    color: var(--s-btn-primary-hover-bg, var(--s-primary-strong));
    --s-link: var(--s-btn-primary-hover-bg, var(--s-primary-strong));
}

button.s-btn--light:hover:not(:disabled),
.s-btn--light:hover,
button.s-btn--accent:hover:not(:disabled),
.s-btn--accent:hover,
.s-btn--light:focus-visible,
.s-btn--accent:focus-visible,
.s-page .s-btn--light:hover,
.s-page .s-btn--accent:hover {
    background-color: color-mix(in srgb, #fff 88%, var(--s-primary));
    border-color: color-mix(in srgb, #fff 88%, var(--s-primary));
    color: var(--s-btn-primary-active-bg, var(--s-primary-strong));
    --s-link: var(--s-btn-primary-active-bg, var(--s-primary-strong));
}

.s-btn--ghost,
.s-btn--outline-light,
.s-page .s-btn--ghost,
.s-page a.s-btn--ghost,
.s-page .s-btn--outline-light,
.s-page a.s-btn--outline-light {
    background-color: transparent;
    border-color: #fff;
    color: #fff;
    --s-link: #fff;
}

button.s-btn--ghost:hover:not(:disabled),
.s-btn--ghost:hover,
button.s-btn--outline-light:hover:not(:disabled),
.s-btn--outline-light:hover,
.s-btn--ghost:focus-visible,
.s-btn--outline-light:focus-visible,
.s-page .s-btn--ghost:hover,
.s-page .s-btn--outline-light:hover {
    background-color: rgba(255, 255, 255, .16);
    border-color: #fff;
    color: #fff;
    --s-link: #fff;
}

.s-btn--light:focus-visible,
.s-btn--accent:focus-visible,
.s-btn--ghost:focus-visible,
.s-btn--outline-light:focus-visible {
    outline-color: #fff;
}

.s-btn--sm,
.s-page .s-btn--sm {
    padding: var(--s-btn-padding-y-sm, .4375rem) var(--s-btn-padding-x-sm, .75rem);
    border-radius: var(--s-btn-radius-sm, .25rem);
}

.s-page .s-btn--block {
    width: 100%;
}

.s-btn[disabled],
.s-btn.disabled,
.s-page .s-btn[disabled],
.s-page .s-btn.disabled {
    opacity: .65;
    cursor: not-allowed;
    pointer-events: none;
}

.s-page .s-iconbtn {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1.5px solid var(--s-line);
    border-radius: 50%;
    background: var(--s-surface);
    background-image: none;
    box-shadow: none;
    color: var(--s-ink);
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

.s-page .s-iconbtn:hover {
    border-color: var(--s-primary);
    color: var(--s-primary-ink);
    background: var(--s-primary-soft);
}

.s-page .s-iconbtn[disabled] {
    opacity: .4;
    cursor: default;
}

.s-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--s-primary-soft);
    color: var(--s-primary-strong);
    font-weight: 600;
    line-height: 1.5;
}

.s-chip--quiet {
    background: var(--s-tint);
    color: var(--s-muted);
}

.s-chip--onDark {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

.s-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 700;
    line-height: 1.4;
}

/* Price / "Free" tag on a course picture: the primary button's colors, so it reads in both modes. */
.s-badge--solid {
    background: var(--s-btn-primary-bg, var(--s-primary));
    color: var(--s-btn-primary-text, #fff);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}

.s-badge--live {
    background: var(--s-danger);
    color: #fff;
}

.s-page .s-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    color: var(--s-muted);
}

.s-page .s-meta li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Search field with its button inside. */
.s-page .s-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    padding-inline-start: 18px;
    background: var(--s-card);
    border: 1.5px solid var(--s-line);
    /* The button's radius plus the field's padding, so the two curves stay parallel. */
    border-radius: calc(var(--s-btn-radius, .375rem) + 6px);
    color: var(--s-muted);
    box-shadow: var(--s-shadow);
    margin: 0;
}

.s-page .s-search:focus-within {
    border-color: var(--s-primary);
}

.s-page .s-search input[type="search"],
.s-page .s-search input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 8px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    outline: none;
    font: 400 1rem var(--s-font);
    color: var(--s-ink);
}

.s-page .s-search .s-btn {
    min-height: 44px;
}

/* Grids */
.s-grid {
    display: grid;
    gap: clamp(16px, 2.4vw, 28px);
}

.s-grid--courses {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

.s-grid--features {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}

.s-grid--events {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}

.s-grid--posts {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

/* Course card */
.s-course,
.s-event,
.s-post {
    display: flex;
    flex-direction: column;
    background: var(--s-surface);
    border: 1px solid var(--s-line);
    border-radius: var(--s-radius);
    overflow: hidden;
    position: relative;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.s-course:hover,
.s-event:hover,
.s-post:hover {
    transform: translateY(-4px);
    box-shadow: var(--s-shadow-lift);
    border-color: var(--s-primary-line);
}

.s-course__media,
.s-event__media,
.s-post__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--s-tint);
    overflow: hidden;
}

.s-page .s-course__media img,
.s-page .s-event__media img,
.s-page .s-post__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.s-course:hover .s-course__media img,
.s-event:hover .s-event__media img,
.s-post:hover .s-post__media img {
    transform: scale(1.05);
}

.s-course__media .s-badge,
.s-event__media .s-badge {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-end: 12px;
}

.s-course__body,
.s-event__body,
.s-post__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    flex: 1;
}

.s-page .s-course__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 30px;
}

.s-page .s-course__title,
.s-page .s-event__body h3,
.s-page .s-post__body h3 {
    font-size: 1.1875rem;
    line-height: 1.35;
}

.s-page .s-course__title a,
.s-page .s-event__body h3 a,
.s-page .s-post__body h3 a {
    color: var(--s-ink);
    --s-link: var(--s-ink);
}

/* The whole card is the link. */
.s-course__title a::after,
.s-event__body h3 a::after,
.s-post__body h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.s-course:hover .s-course__title a,
.s-event:hover h3 a,
.s-post:hover h3 a {
    color: var(--s-primary-ink);
    --s-link: var(--s-primary-ink);
}

.s-page .s-course__org {
    color: var(--s-muted);
}

.s-page .s-course__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-block-start: auto;
    padding-block-start: 14px;
    border-block-start: 1px solid var(--s-line);
    font-weight: 600;
    color: var(--s-ink);
}

.s-course__foot > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.s-course__go {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--s-primary-soft);
    color: var(--s-primary-ink);
    transition: background-color .2s ease, color .2s ease;
}

.s-course:hover .s-course__go {
    background: var(--s-primary);
    color: #fff;
}

/* Event card */
.s-event__date {
    position: absolute;
    inset-block-end: 12px;
    inset-inline-start: 12px;
    display: grid;
    justify-items: center;
    min-width: 58px;
    padding: 6px 10px;
    border-radius: var(--s-radius-sm);
    background: var(--s-card);
    color: var(--s-ink);
    line-height: 1.2;
    box-shadow: var(--s-shadow);
}

.s-event__date strong {
    font-size: 1.375rem;
}

/* Blog card */
.s-page .s-post__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    color: var(--s-muted);
}

.s-page .s-post__summary {
    color: var(--s-muted);
}

/* Numbers */
.s-page .s-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 40px;
}

.s-stats__item {
    display: flex;
    flex-direction: column-reverse;
}

.s-page .s-stats dd {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: var(--s-ink);
}

.s-page .s-stats dt {
    color: var(--s-muted);
    font-weight: 400;
}

.s-page .s-stats--band {
    justify-content: space-around;
    padding: clamp(24px, 4vw, 40px);
    border-radius: var(--s-radius);
    background: var(--s-primary-soft);
    text-align: center;
}

.s-page .s-stats--band dd {
    font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem);
    color: var(--s-primary-strong);
}

/* Testimonials */
.s-carousel {
    position: relative;
}

.s-page .s-carousel__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(100%, 380px);
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-block: 8px 20px;
    scrollbar-width: none;
}

.s-carousel__track::-webkit-scrollbar {
    display: none;
}

.s-page .s-quote {
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 28px;
    background: var(--s-surface);
    border: 1px solid var(--s-line);
    border-radius: var(--s-radius);
    box-shadow: var(--s-shadow);
}

.s-page .s-quote blockquote {
    position: relative;
    flex: 1;
    border: 0;
    font-size: 1.0625rem;
    color: var(--s-ink);
    quotes: "\201C" "\201D";
}

.s-page .s-quote blockquote::before {
    content: open-quote;
    display: block;
    font-size: 3rem;
    line-height: .8;
    color: var(--s-primary-ink);
    font-family: Georgia, serif;
}

.s-quote__by {
    display: flex;
    align-items: center;
    gap: 12px;
}

.s-page .s-quote__by img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.s-page .s-quote__by p {
    display: grid;
    line-height: 1.4;
}

.s-quote__by strong {
    color: var(--s-ink);
}

.s-quote__by span {
    color: var(--s-muted);
}

.s-carousel__nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-block-start: 12px;
}

/* Questions */
.s-faq {
    display: grid;
    gap: 12px;
}

.s-faq details {
    border: 1px solid var(--s-line);
    border-radius: var(--s-radius-sm);
    background: var(--s-surface);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.s-faq details[open] {
    border-color: var(--s-primary-line);
    box-shadow: var(--s-shadow);
}

.s-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    font-weight: 600;
    color: var(--s-ink);
    cursor: pointer;
    list-style: none;
}

.s-faq summary::-webkit-details-marker {
    display: none;
}

.s-faq summary .s-icon {
    transition: transform .2s ease;
}

.s-faq details[open] summary .s-icon {
    transform: rotate(180deg);
}

.s-page .s-faq details > p,
.s-page .s-faq details > ul {
    padding: 0 22px 20px;
    color: var(--s-text);
}

/* ---------------------------------------------------------------- 4. Home */

.s-hero {
    position: relative;
    isolation: isolate;
    padding-block: clamp(56px, 9vw, 112px);
    color: #fff;
    background:
        radial-gradient(900px 500px at 85% -10%, color-mix(in srgb, var(--s-primary) 55%, #7dd3fc) 0%, transparent 60%),
        radial-gradient(700px 500px at -10% 110%, color-mix(in srgb, var(--s-primary) 70%, #c084fc) 0%, transparent 60%),
        linear-gradient(135deg, var(--s-primary-deep), var(--s-primary));
    overflow: hidden;
}

.s-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    opacity: .16;
    mix-blend-mode: luminosity;
}

.s-hero__inner {
    display: grid;
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}

.s-hero--media .s-hero__inner {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
}

.s-hero__copy {
    display: grid;
    gap: 22px;
    justify-items: start;
    max-width: 680px;
}

.s-page .s-hero .s-eyebrow {
    margin: 0;
    padding: 4px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

/* The banner text is written by the administrator: style whatever heading they used. */
.s-page .s-hero__copy h1,
.s-page .s-hero__copy h2,
.s-page .s-hero__copy .title {
    font-size: clamp(2.25rem, 1.3rem + 3.6vw, 3.75rem);
    line-height: 1.08;
    letter-spacing: -.03em;
    color: #fff;
    margin: 0;
}

.s-page .s-hero__copy .desc,
.s-page .s-hero__copy .desc p,
.s-page .s-hero__copy > p:not(.s-eyebrow) {
    font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem);
    color: rgba(255, 255, 255, .86);
    max-width: 58ch;
}

.s-hero .s-search {
    width: min(100%, 540px);
    border-color: transparent;
}

.s-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.s-page .s-hero .s-stats {
    padding-block-start: 22px;
    border-block-start: 1px solid rgba(255, 255, 255, .2);
    width: 100%;
}

.s-page .s-hero .s-stats dd {
    color: #fff;
}

.s-page .s-hero .s-stats dt {
    color: rgba(255, 255, 255, .78);
}

.s-hero__course {
    position: relative;
    display: grid;
    gap: 12px;
}

.s-hero__course::before {
    content: "";
    position: absolute;
    inset: 40px -18px -18px 18px;
    border-radius: var(--s-radius);
    background: rgba(255, 255, 255, .14);
    transform: rotate(3deg);
    z-index: -1;
}

.s-page .s-hero__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: start;
    padding: 4px 14px;
    border-radius: 999px;
    background: var(--s-accent);
    color: #1f1300;
    font-weight: 700;
}

.s-hero__course .s-course {
    border: 0;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

/* Centred hero */
.s-hero--center .s-hero__copy {
    justify-items: center;
    text-align: center;
    margin-inline: auto;
    max-width: 820px;
}

.s-hero--center .s-hero__actions,
.s-hero--center .s-stats {
    justify-content: center;
}

/* Light hero */
.s-hero--light {
    color: var(--s-text);
    background:
        radial-gradient(800px 420px at 90% 0%, var(--s-primary-soft) 0%, transparent 70%),
        linear-gradient(180deg, #fff, var(--s-tint));
    border-block-end: 1px solid var(--s-line);
}

.s-page .s-hero--light .s-eyebrow {
    background: var(--s-primary-soft);
    color: var(--s-primary-strong);
}

.s-page .s-hero--light .s-hero__copy h1,
.s-page .s-hero--light .s-hero__copy .title {
    color: var(--s-ink);
}

.s-page .s-hero--light .s-hero__copy .desc,
.s-page .s-hero--light .s-hero__copy .desc p {
    color: var(--s-muted);
}

.s-page .s-hero--light .s-search {
    border-color: var(--s-line);
}

/* On a light hero the pair is the ordinary primary / outline. */
.s-page .s-hero--light .s-btn--accent {
    background-color: var(--s-btn-primary-bg, var(--s-primary));
    border-color: var(--s-btn-primary-border, var(--s-primary));
    color: var(--s-btn-primary-text, #fff);
    --s-link: var(--s-btn-primary-text, #fff);
}

.s-page .s-hero--light .s-btn--accent:hover {
    background-color: var(--s-btn-primary-hover-bg, var(--s-primary-strong));
    border-color: var(--s-btn-primary-hover-border, var(--s-primary-strong));
    color: var(--s-btn-primary-hover-text, #fff);
    --s-link: var(--s-btn-primary-hover-text, #fff);
}

.s-page .s-hero--light .s-btn--ghost {
    background-color: var(--s-btn-outline-bg, transparent);
    border-color: var(--s-btn-outline-border, var(--s-primary));
    color: var(--s-btn-outline-text, var(--s-primary));
    --s-link: var(--s-btn-outline-text, var(--s-primary));
}

.s-page .s-hero--light .s-btn--ghost:hover {
    background-color: var(--s-btn-outline-hover-bg, transparent);
    border-color: var(--s-btn-outline-hover-border, var(--s-primary-strong));
    color: var(--s-btn-outline-hover-text, var(--s-primary-strong));
    --s-link: var(--s-btn-outline-hover-text, var(--s-primary-strong));
}

.s-page .s-hero--light .s-stats {
    border-color: var(--s-line);
}

.s-page .s-hero--light .s-stats dd {
    color: var(--s-ink);
}

.s-page .s-hero--light .s-stats dt {
    color: var(--s-muted);
}

.s-hero--light .s-hero__course::before {
    background: var(--s-primary-soft);
}

.s-hero--light .s-hero__course .s-course {
    box-shadow: var(--s-shadow-lift);
    border: 1px solid var(--s-line);
}

/* Topics */
.s-page .s-topics {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.s-page .s-topics__label {
    font-weight: 600;
    color: var(--s-ink);
    margin-inline-end: 6px;
}

.s-page .s-topic {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1.5px solid var(--s-line);
    border-radius: 999px;
    color: var(--s-ink);
    --s-link: var(--s-ink);
    font-weight: 500;
    background: var(--s-surface);
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.s-page .s-topic:hover {
    border-color: var(--s-primary);
    background: var(--s-primary-soft);
    color: var(--s-primary-strong);
    --s-link: var(--s-primary-strong);
}

.s-topic span {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    padding-inline: 6px;
    border-radius: 999px;
    background: var(--s-tint);
    color: var(--s-muted);
    font-weight: 600;
}

/* Features */
.s-page .s-feature {
    display: grid;
    gap: 10px;
    align-content: start;
    padding: 28px;
    border-radius: var(--s-radius);
    background: var(--s-surface);
    border: 1px solid var(--s-line);
    transition: transform .2s ease, box-shadow .2s ease;
}

.s-page .s-feature:hover {
    transform: translateY(-3px);
    box-shadow: var(--s-shadow);
}

.s-feature__icon {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--s-primary-soft);
    color: var(--s-primary-ink);
    margin-block-end: 6px;
}

.s-page .s-feature h3 {
    font-size: 1.1875rem;
}

.s-page .s-feature p {
    color: var(--s-muted);
}

/* Text next to a picture */
.s-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}

.s-page .s-checks {
    display: grid;
    gap: 10px;
    margin-block-start: 22px;
    color: var(--s-ink);
    font-weight: 500;
}

.s-page .s-checks li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.s-checks .s-icon {
    margin-block-start: 4px;
    padding: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--s-primary-soft);
    color: var(--s-primary-ink);
}

.s-page .s-video {
    position: relative;
    display: block;
    border-radius: var(--s-radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    box-shadow: var(--s-shadow-lift);
    background: var(--s-primary-deep);
}

.s-page .s-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.s-video:hover img {
    transform: scale(1.04);
}

.s-video__play {
    position: absolute;
    inset: 0;
    margin: auto;
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--s-card);
    color: var(--s-primary-ink);
    box-shadow: 0 0 0 12px rgba(255, 255, 255, .28);
    transition: transform .2s ease;
}

.s-video__play .s-icon {
    fill: currentColor;
    margin-inline-start: 4px;
}

.s-video:hover .s-video__play {
    transform: scale(1.08);
}

/* Call to action */
.s-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px 40px;
    padding: clamp(28px, 5vw, 56px);
    border-radius: calc(var(--s-radius) + 8px);
    color: #fff;
    background:
        radial-gradient(600px 300px at 100% 0%, color-mix(in srgb, var(--s-primary) 55%, #7dd3fc) 0%, transparent 65%),
        linear-gradient(135deg, var(--s-primary-deep), var(--s-primary));
}

.s-page .s-cta h2 {
    color: #fff;
    font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem);
    letter-spacing: -.02em;
}

.s-page .s-cta p {
    color: rgba(255, 255, 255, .85);
    margin-block-start: 8px;
    max-width: 52ch;
}

.s-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ---------------------------------------------------------------- 5. Catalogue and inner page title */

.s-pagehero {
    padding-block: clamp(36px, 6vw, 64px);
    background:
        radial-gradient(700px 300px at 95% 0%, var(--s-primary-soft) 0%, transparent 70%),
        var(--s-tint);
    border-block-end: 1px solid var(--s-line);
}

.s-page .s-pagehero__title {
    font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem);
    letter-spacing: -.025em;
}

.s-page .s-pagehero__lead {
    font-size: 1.125rem;
    color: var(--s-muted);
    margin-block-start: 10px;
    max-width: 62ch;
}

.s-pagehero .s-search {
    margin-block-start: 24px;
    max-width: 620px;
}

.s-page .s-crumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-block-end: 14px;
    color: var(--s-muted);
}

.s-page .s-crumbs li + li::before {
    content: "/";
    margin-inline-end: 8px;
    opacity: .6;
}

.s-page .s-crumbs a {
    color: var(--s-muted);
    --s-link: var(--s-muted);
}

.s-page .s-crumbs a:hover {
    color: var(--s-primary-ink);
    --s-link: var(--s-primary-ink);
}

.s-catalog {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: clamp(24px, 3vw, 40px);
    align-items: start;
    padding-block: clamp(28px, 4vw, 48px) var(--s-space);
}

.s-filters {
    position: sticky;
    inset-block-start: 112px;
    padding: 22px;
    border: 1px solid var(--s-line);
    border-radius: var(--s-radius);
    background: var(--s-surface);
}

.s-filters__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-block-end: 8px;
}

.s-page .s-filters__head h2 {
    font-size: 1.1875rem;
}

/* Match Browse Courses “Clear all”: brand text link (never Open edX teal button). */
.s-page .s-filters__clear,
.s-page .s-filters__head #clear-filters,
.s-page .s-filters__head #clear-program-filters,
.s-page a.s-filters__clear,
.s-page button.s-filters__clear {
    appearance: none;
    -webkit-appearance: none;
    display: inline;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    letter-spacing: normal !important;
    color: var(--s-primary) !important;
    font: 600 0.9375rem/1.3 var(--s-font) !important;
    cursor: pointer;
    text-decoration: none !important;
    vertical-align: baseline;
}

.s-page .s-filters__clear:hover,
.s-page .s-filters__clear:focus,
.s-page .s-filters__clear:active,
.s-page .s-filters__head #clear-filters:hover,
.s-page .s-filters__head #clear-filters:focus,
.s-page .s-filters__head #clear-program-filters:hover,
.s-page .s-filters__head #clear-program-filters:focus,
.s-page a.s-filters__clear:hover,
.s-page a.s-filters__clear:focus,
.s-page button.s-filters__clear:hover,
.s-page button.s-filters__clear:focus {
    color: var(--s-primary-strong) !important;
    text-decoration: underline !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
}

.s-page .s-empty--filtered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
}

.s-page .s-empty__title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--s-ink);
}

.s-page .s-filters .hidden {
    display: none;
}

.s-page .s-filters fieldset {
    border: 0;
    margin: 0;
    padding: 16px 0 0;
    min-width: 0;
}

.s-page .s-filters fieldset + fieldset {
    margin-block-start: 16px;
    border-block-start: 1px solid var(--s-line);
}

.s-page .s-filters legend {
    float: none;
    width: auto;
    padding: 0;
    margin: 0 0 8px;
    border: 0;
    font: 600 1rem var(--s-font);
    color: var(--s-ink);
}

.s-page .s-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    margin: 0 -8px;
    border-radius: 8px;
    cursor: pointer;
    font: 400 1rem var(--s-font);
    color: var(--s-text);
}

.s-page .s-check:hover {
    background: var(--s-tint);
}

.s-page .s-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--s-primary);
    flex: none;
}

.s-check__count {
    margin-inline-start: auto;
    color: var(--s-muted);
    font-variant-numeric: tabular-nums;
}

.s-catalog__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-block-end: 20px;
    min-height: 48px;
}

.s-page .s-catalog__bar p {
    color: var(--s-muted);
}

.s-page .s-filters__toggle {
    display: none;
}

.s-catalog__results {
    transition: opacity .15s ease;
}

.s-catalog__results[aria-busy="true"] {
    opacity: .45;
    pointer-events: none;
}

.s-page .s-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-block-start: 36px;
}

.s-page .s-pagination a,
.s-page .s-pagination span {
    display: inline-grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    padding-inline: 12px;
    border: 1.5px solid var(--s-line);
    border-radius: 12px;
    color: var(--s-ink);
    --s-link: var(--s-ink);
    font-weight: 600;
    background: var(--s-surface);
}

.s-page .s-pagination a:hover {
    border-color: var(--s-primary);
    color: var(--s-primary-ink);
    --s-link: var(--s-primary-ink);
}

.s-page .s-pagination [aria-current="page"] {
    background: var(--s-primary);
    border-color: var(--s-primary);
    color: #fff;
}

.s-page .s-pagination .is-disabled {
    opacity: .4;
}

/* ---------------------------------------------------------------- 6. Course page */

.s-coursehero {
    position: relative;
    isolation: isolate;
    padding-block: clamp(36px, 6vw, 72px);
    color: #fff;
    background: linear-gradient(120deg, var(--s-primary-deep) 15%, color-mix(in srgb, var(--s-primary) 82%, #000));
    overflow: hidden;
}

.s-coursehero__bg {
    position: absolute;
    inset: -20px;
    z-index: -1;
    background-size: cover;
    background-position: center;
    filter: blur(18px);
    opacity: .22;
}

.s-coursehero__inner {
    display: grid;
    gap: 16px;
    max-width: 760px;
}

.s-page .s-coursehero .s-crumbs ol {
    margin: 0;
    color: rgba(255, 255, 255, .75);
}

.s-page .s-coursehero .s-crumbs a {
    color: rgba(255, 255, 255, .75);
    --s-link: rgba(255, 255, 255, .75);
}

.s-page .s-coursehero .s-crumbs a:hover {
    color: #fff;
    --s-link: #fff;
}

.s-page .s-coursehero h1 {
    color: #fff;
    font-size: clamp(2rem, 1.3rem + 2.8vw, 3.125rem);
    letter-spacing: -.025em;
}

.s-page .s-coursehero__lead {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, .88);
}

.s-page .s-coursehero .s-meta {
    color: rgba(255, 255, 255, .88);
    gap: 8px 24px;
}

.s-coursehero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.s-courselayout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
    padding-block: clamp(28px, 4vw, 48px) var(--s-space);
}

.s-enroll {
    position: sticky;
    inset-block-start: 112px;
    margin-block-start: clamp(-150px, -12vw, -80px);
    border: 1px solid var(--s-line);
    border-radius: var(--s-radius);
    background: var(--s-surface);
    box-shadow: var(--s-shadow-lift);
    /* visible so currency info tooltip is not clipped */
    overflow: visible;
    z-index: 2;
}

.s-page .s-enroll__media {
    aspect-ratio: 16 / 9;
    width: 100%;
    object-fit: cover;
    background: var(--s-tint);
    border-radius: var(--s-radius) var(--s-radius) 0 0;
    display: block;
}

/* Course introduction video: play button over the course image, video in a dialog (js/site.js). */
.s-page .s-enroll__video {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.s-page .s-enroll__video .s-enroll__media {
    display: block;
    transition: filter .2s ease;
}

.s-page .s-enroll__play {
    position: absolute;
    inset: 50% auto auto 50%;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--s-primary);
    color: #fff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .3);
    transform: translate(-50%, -50%);
    transition: transform .2s ease;
}

[dir="rtl"] .s-page .s-enroll__play {
    transform: translate(50%, -50%);
}

.s-page .s-enroll__play .s-icon {
    margin-inline-start: 4px; /* the triangle looks centred */
    fill: currentColor;
}

.s-page .s-enroll__video:hover .s-enroll__media,
.s-page .s-enroll__video:focus-visible .s-enroll__media {
    filter: brightness(.8);
}

.s-page .s-enroll__video:hover .s-enroll__play {
    transform: translate(-50%, -50%) scale(1.08);
}

[dir="rtl"] .s-page .s-enroll__video:hover .s-enroll__play {
    transform: translate(50%, -50%) scale(1.08);
}

.s-page .s-enroll__video:focus-visible {
    outline: 3px solid var(--s-primary);
    outline-offset: -3px;
}

.s-video-modal {
    width: min(960px, calc(100vw - 32px));
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: var(--s-radius);
    background: #000;
    overflow: visible;
}

.s-video-modal::backdrop {
    background: rgba(0, 0, 0, .75);
}

.s-video-modal__frame {
    aspect-ratio: 16 / 9;
    border-radius: var(--s-radius);
    overflow: hidden;
}

.s-video-modal__frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.s-video-modal__close {
    position: absolute;
    inset-block-start: -44px;
    inset-inline-end: 0;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.s-video-modal__close:hover,
.s-video-modal__close:focus-visible {
    background: rgba(255, 255, 255, .3);
}

.s-enroll__body {
    display: grid;
    gap: 18px;
    padding: 22px;
}

.s-page .s-enroll__price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--s-ink);
    line-height: 1.1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4em;
}

.s-page .s-enroll__price del {
    font-size: 0.65em;
    font-weight: 500;
    color: var(--s-muted);
}

.s-page .s-enroll__currency {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

.s-page .s-enroll__currency-control {
    position: relative;
    display: inline-flex;
    max-width: 100%;
}

.s-page .s-enroll__currency-info {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.s-page .s-enroll__currency-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    border: 1.5px solid #d7dde8;
    border-radius: 999px;
    background: #fff;
    color: #64748b;
    cursor: help;
    line-height: 0;
}

.s-page .s-enroll__currency-info-btn:hover,
.s-page .s-enroll__currency-info-btn:focus,
.s-page .s-enroll__currency-info-btn:focus-visible,
.s-page .s-enroll__currency-info-btn.is-active {
    border-color: var(--s-primary);
    background: var(--s-primary-soft, #fff4ed);
    color: var(--s-primary);
    outline: none;
}

/* Floating tip is attached to <body> by JS — never inline next to the icon. */
.s-currency-tip-pop {
    position: fixed;
    z-index: 10000;
    max-width: 220px;
    margin: 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
    pointer-events: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.s-currency-tip-pop.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.s-currency-tip-pop::after {
    content: "";
    position: absolute;
    top: 100%;
    left: var(--tip-arrow-left, 50%);
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: #111827;
}

/*
 * Legacy LMS styles every <button> with a green gradient on hover. Beat that
 * with the same weight (button…:hover:not(:disabled)) and kill background-image.
 */
button.s-currency-btn,
.s-page button.s-currency-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 12px 8px 14px;
    border: 2px solid var(--s-primary);
    border-radius: 999px;
    background-color: #fff;
    background-image: none;
    box-shadow: none;
    color: var(--s-primary);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-shadow: none;
}

button.s-currency-btn:hover:not(:disabled),
button.s-currency-btn:focus:not(:disabled),
button.s-currency-btn:active:not(:disabled),
button.s-currency-btn[aria-expanded="true"],
.s-page button.s-currency-btn:hover:not(:disabled),
.s-page button.s-currency-btn:focus:not(:disabled),
.s-page button.s-currency-btn:active:not(:disabled),
.s-page button.s-currency-btn[aria-expanded="true"] {
    background-color: var(--s-primary);
    background-image: none;
    box-shadow: none;
    border-color: var(--s-primary);
    color: #fff;
    text-shadow: none;
}

.s-page .s-currency-btn__chevron {
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.s-page .s-currency-btn[aria-expanded="true"] .s-currency-btn__chevron {
    transform: rotate(180deg);
}

.s-page .s-currency-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 30;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    min-width: 11rem;
    max-height: 16rem;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--s-line, #e3e8f0);
    border-radius: 12px;
    box-shadow: var(--s-shadow-lift);
}

.s-page .s-currency-menu [role="option"] {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--s-ink);
}

.s-page .s-currency-menu [role="option"]:hover,
.s-page .s-currency-menu [role="option"].is-active {
    background: var(--s-primary-soft);
    color: var(--s-primary);
}

.s-page .s-enroll__ref {
    margin: 0;
    font-size: 0.85rem;
    color: var(--s-muted);
}

.s-page .s-enroll__promo {
    display: grid;
    gap: 10px;
    width: 100%;
}

.s-page .s-enroll__promo-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
    width: 100%;
}

.s-page .s-enroll__promo-row input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--s-line, #e3e8f0);
    border-radius: var(--s-radius-sm);
    background: #fff;
    color: var(--s-ink);
    font: inherit;
    font-size: 0.95rem;
}

.s-page .s-enroll__promo-row input:focus {
    outline: 2px solid color-mix(in srgb, var(--s-primary) 45%, #fff);
    outline-offset: 1px;
    border-color: var(--s-primary);
}

.s-page .s-enroll__promo-row .s-btn {
    min-height: 44px;
    padding-inline: 1.1rem;
    white-space: nowrap;
}

.s-page .s-enroll__promo .s-block__note {
    margin: 0;
}

.s-enroll__action {
    display: grid;
    gap: 10px;
}

.s-page .s-enroll__action .register.disabled,
.s-page .s-enroll__status {
    display: block;
    padding: 12px 16px;
    border-radius: var(--s-radius-sm);
    background: var(--s-tint);
    color: var(--s-muted);
    font-weight: 600;
    text-align: center;
}

.s-page #register_error,
.s-page .s-enroll__error {
    display: none;
    color: var(--s-danger);
    font-weight: 500;
}

.s-page .s-facts {
    display: grid;
}

.s-page .s-facts > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-block: 11px;
    border-block-start: 1px solid var(--s-line);
}

.s-page .s-facts dt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--s-muted);
    font-weight: 400;
}

.s-page .s-facts dd {
    color: var(--s-ink);
    font-weight: 600;
    text-align: end;
}

.s-share {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-block-start: 16px;
    border-block-start: 1px solid var(--s-line);
}

.s-page .s-share p {
    margin-inline-end: auto;
    color: var(--s-muted);
}

.s-page .s-share a {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--s-line);
    color: var(--s-ink);
    --s-link: var(--s-ink);
}

.s-page .s-share a:hover {
    border-color: var(--s-primary);
    color: var(--s-primary-ink);
    --s-link: var(--s-primary-ink);
    background: var(--s-primary-soft);
}

.s-page .s-subnav {
    position: sticky;
    /* Sit flush under the site header so scrolled content cannot peek through a gap. */
    inset-block-start: 64px;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-block-end: 28px;
    padding: 8px;
    border: 1px solid var(--s-line);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    overflow-x: auto;
    scrollbar-width: none;
    width: fit-content;
    max-width: 100%;
}

html[data-theme="dark"] .s-page .s-subnav {
    background: var(--s-surface, #0f172a);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.s-page .s-subnav a {
    padding: 8px 18px;
    border-radius: 999px;
    color: var(--s-text);
    --s-link: var(--s-text);
    font-weight: 600;
    white-space: nowrap;
}

.s-page .s-subnav a:hover,
.s-page .s-subnav a.is-active {
    background: var(--s-primary-soft);
    color: var(--s-primary-strong);
    --s-link: var(--s-primary-strong);
}

.s-block {
    scroll-margin-block-start: 150px;
}

/* Prerequisite notice of the course about page: the courses to finish first. */
.s-page .s-prereq {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-block-end: 28px;
    padding: 16px 20px;
    border: 1px solid var(--s-primary-line);
    border-inline-start: 4px solid var(--s-primary);
    border-radius: var(--s-radius);
    background: var(--s-primary-soft);
    color: var(--s-ink);
}

.s-page .s-prereq > .s-icon {
    flex: none;
    color: var(--s-primary);
}

.s-page .s-prereq p {
    margin: 0;
}

.s-page .s-prereq p + p {
    margin-block-start: 6px;
}

.s-page .s-prereq .s-prereq__title {
    font-weight: 700;
}

.s-page .s-prereq a {
    font-weight: 600;
}

.s-block + .s-block {
    margin-block-start: clamp(36px, 5vw, 56px);
}

.s-page .s-block > h2 {
    font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
    letter-spacing: -.02em;
    margin-block-end: 18px;
}

.s-page .s-block__note {
    color: var(--s-muted);
    margin-block: -10px 18px;
}

/* Meet your instructors (program about page). */
.s-page .s-instructors {
    border: 1px solid var(--s-line, #e5e7eb);
    border-radius: var(--s-radius, 12px);
    background: #fff;
    padding: 0;
}
.s-page .s-instructors > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    cursor: pointer;
}
.s-page .s-instructors > summary::-webkit-details-marker { display: none; }
.s-page .s-instructors > summary h2 {
    margin: 0;
    font-size: 1.15rem;
    letter-spacing: -.01em;
}
.s-page .s-instructors > summary .s-icon {
    color: var(--s-muted, #64748b);
    transition: transform .2s ease;
}
.s-page .s-instructors[open] > summary .s-icon {
    transform: rotate(180deg);
}
.s-page .s-instructors__list {
    list-style: none;
    margin: 0;
    padding: 0 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.s-page .s-instructors__card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--s-line, #e5e7eb);
    border-radius: 10px;
    background: #fff;
}
.s-page .s-instructors__photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    background: #e2e8f0;
}
.s-page .s-instructors__photo--empty {
    display: inline-block;
}
.s-page .s-instructors__copy {
    min-width: 0;
}
.s-page .s-instructors__copy strong {
    display: block;
    color: var(--s-ink, #0f172a);
    font-size: 1rem;
    line-height: 1.3;
}
.s-page .s-instructors__copy span {
    display: block;
    margin-top: 0.2rem;
    color: var(--s-muted, #64748b);
    font-size: 0.9rem;
    line-height: 1.35;
}

/* Sample program certificate (Certificate Manager template preview). */
.s-page .s-cert-preview {
    margin-block-start: 8px;
    padding: 16px;
    border: 1px solid var(--s-line, #e5e7eb);
    border-radius: var(--s-radius, 12px);
    background: var(--s-tint, #f8fafc);
    overflow: auto;
}

.s-page .s-cert-preview .tc-cert {
    width: min(100%, 720px);
    margin-inline: auto;
    container-type: inline-size;
}

/* Program progress page */
.s-page .s-prog {
    display: grid;
    gap: 2rem;
    padding-block: 2rem 3rem;
}

.s-page.s-prog .s-prog__wrap {
    display: grid;
    gap: 1.5rem;
    padding-block: 1.5rem 3rem;
    max-width: 52rem;
}

.s-page.s-prog .s-prog__title {
    margin: 0;
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
    font-weight: 600;
    color: var(--s-muted, #64748b);
    line-height: 1.3;
}

.s-page.s-prog .s-prog__program-name {
    margin: -0.75rem 0 0;
    font-size: 1.05rem;
    color: var(--s-ink, #0f172a);
    font-weight: 600;
}

.s-page.s-prog .s-prog__cert-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border: 1px solid color-mix(in srgb, var(--s-primary, #2b2399) 22%, #e5e7eb);
    border-radius: var(--s-radius, 12px);
    background: color-mix(in srgb, var(--s-primary, #2b2399) 6%, #fff);
}

.s-page.s-prog .s-prog__cert-banner h2 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
}

.s-page.s-prog .s-prog__cert-banner p {
    margin: 0;
    color: var(--s-muted, #64748b);
}

.s-page.s-prog .s-prog__cert-banner--hint {
    background: var(--s-tint, #f8fafc);
    border-color: var(--s-line, #e5e7eb);
}

.s-page.s-prog .s-prog__chapters {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
    border: 1px solid var(--s-line, #e5e7eb);
    border-radius: var(--s-radius, 12px);
    background: var(--s-surface, #fff);
    overflow: hidden;
}

.s-page.s-prog .s-prog__chapter {
    display: grid;
    gap: 0.55rem;
    padding: 1rem 1.25rem;
    border-block-end: 1px solid var(--s-line, #e5e7eb);
}

.s-page.s-prog .s-prog__chapter:last-child {
    border-block-end: 0;
}

.s-page.s-prog .s-prog__chapter h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    align-items: baseline;
    justify-content: space-between;
}

.s-page.s-prog .s-prog__chapter h3 a {
    color: var(--s-primary, #2b2399);
    text-decoration: none;
}

.s-page.s-prog .s-prog__chapter h3 a:hover {
    text-decoration: underline;
}

.s-page.s-prog .s-prog__chapter-score {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--s-muted, #64748b);
}

.s-page.s-prog .s-prog__about h2,
.s-page.s-prog .s-prog__courses > h2 {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
}

.s-page.s-prog .s-prog__cert-preview {
    margin-top: 0.75rem;
}

.s-page.s-prog .s-prog__cert-preview summary {
    cursor: pointer;
    font-weight: 600;
}

.s-page .s-prog__summary {
    display: grid;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--s-line, #e5e7eb);
    border-radius: var(--s-radius, 12px);
    background: var(--s-surface, #fff);
}

.s-page .s-prog__meter {
    height: 12px;
    border-radius: 999px;
    background: var(--s-tint, #f1f5f9);
    overflow: hidden;
}

.s-page .s-prog__meter-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--s-primary, #2b2399);
}

.s-page .s-prog__meter-label {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: baseline;
    margin: 0;
    color: var(--s-muted, #64748b);
}

.s-page .s-prog__meter-label strong {
    font-size: 1.5rem;
    color: var(--s-ink, #0f172a);
}

.s-page .s-prog__cert-ok,
.s-page .s-prog__cert-hint {
    margin: 0;
    color: var(--s-muted, #64748b);
}

.s-page .s-prog__cert-ok {
    color: #166534;
}

.s-page .s-prog__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0;
}

.s-page .s-prog__courses > h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
}

.s-page .s-prog__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.s-page .s-prog__item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--s-line, #e5e7eb);
    border-radius: var(--s-radius, 12px);
    background: var(--s-surface, #fff);
}

@media (max-width: 640px) {
    .s-page .s-prog__item {
        grid-template-columns: 1fr;
    }
}

.s-page .s-prog__item-media {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--s-tint, #f1f5f9);
}

.s-page .s-prog__item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.s-page .s-prog__item-num {
    position: absolute;
    inset-block-start: 8px;
    inset-inline-start: 8px;
    min-width: 1.75rem;
    height: 1.75rem;
    padding-inline: 0.4rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-grid;
    place-items: center;
}

.s-page .s-prog__item-body {
    display: grid;
    gap: 0.55rem;
    align-content: start;
}

.s-page .s-prog__item-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.s-page .s-prog__item-head h3 {
    margin: 0;
    font-size: 1.1rem;
}

.s-page .s-prog__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--s-tint, #f1f5f9);
    color: var(--s-muted, #64748b);
}

.s-page .s-prog__badge--completed {
    background: #dcfce7;
    color: #166534;
}

.s-page .s-prog__badge--in_progress {
    background: #e0e7ff;
    color: #3730a3;
}

.s-page .s-prog__item-meter {
    height: 8px;
    border-radius: 999px;
    background: var(--s-tint, #f1f5f9);
    overflow: hidden;
}

.s-page .s-prog__item-meter > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--s-brand, #2b2399);
}

.s-page .s-prog__item-pct {
    margin: 0;
    font-size: 0.85rem;
    color: var(--s-muted, #64748b);
}

.s-page .s-prog__item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.s-page .s-btn--ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--s-line, #e5e7eb);
    border-radius: var(--s-radius-sm, 8px);
    background: transparent;
    color: var(--s-ink, #0f172a);
    text-decoration: none;
    font-weight: 600;
}

.s-page .s-btn--ghost:hover {
    background: var(--s-tint, #f8fafc);
}

/* Program study / progress */
.s-page.s-study .s-study__hero {
    position: relative;
    color: #fff;
    overflow: hidden;
}

.s-page.s-study .s-study__hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.42) saturate(1.05);
    transform: scale(1.03);
}

.s-page.s-study .s-study__hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(8, 12, 28, 0.92) 0%, color-mix(in srgb, var(--s-primary, #2b2399) 55%, transparent) 72%, color-mix(in srgb, var(--s-accent, #f5a524) 28%, transparent) 100%),
        linear-gradient(0deg, rgba(8, 12, 28, 0.35), transparent 45%);
}

.s-page.s-study .s-study__hero-inner {
    position: relative;
    z-index: 1;
    padding-block: 1.35rem 1.75rem;
}

.s-page.s-study .s-study__hero .s-crumbs a,
.s-page.s-study .s-study__hero .s-crumbs li {
    color: rgba(255, 255, 255, 0.85);
}

.s-page.s-study .s-study__hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 240px);
    gap: 1.5rem 2rem;
    align-items: center;
    margin-top: 0.85rem;
}

@media (max-width: 840px) {
    .s-page.s-study .s-study__hero-grid {
        grid-template-columns: 1fr;
    }

    .s-page.s-study .s-study__hero-progress {
        justify-self: start;
        width: min(100%, 260px);
    }
}

.s-page.s-study .s-study__eyebrow {
    margin: 0 0 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--s-accent, #f5a524) 70%, #fff);
}

.s-page.s-study .s-study__hero-copy h1 {
    margin: 0 0 0.45rem;
    font-size: clamp(1.7rem, 1.25rem + 1.4vw, 2.4rem);
    line-height: 1.15;
}

.s-page.s-study .s-study__lead {
    margin: 0 0 0.9rem;
    max-width: 40rem;
    font-size: 1.02rem;
    line-height: 1.45;
    opacity: 0.92;
}

.s-page.s-study .s-study__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.s-page.s-study .s-study__meta li {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.88rem;
}

.s-page.s-study .s-study__hero-progress {
    display: grid;
    gap: 0.55rem;
    justify-items: center;
    align-content: start;
    width: 100%;
    max-width: 240px;
    padding: 1.05rem 1rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(10px);
}

.s-page.s-study .s-study__ring-copy {
    margin: 0;
    text-align: center;
    font-size: 0.86rem;
    opacity: 0.92;
}

.s-page.s-study .s-study__body {
    display: grid;
    gap: 1.15rem;
    padding-block: 1.35rem 3rem;
}

.s-page.s-study .s-study__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 1.35rem;
    align-items: start;
}

@media (max-width: 960px) {
    .s-page.s-study .s-study__layout {
        grid-template-columns: 1fr;
    }

    .s-page.s-study .s-study__side {
        order: -1;
        position: static;
    }
}

.s-page .s-study__main {
    display: grid;
    gap: 1.25rem;
}

.s-page .s-study__next {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    background: color-mix(in srgb, var(--s-primary, #2b2399) 7%, #fff);
    border: 1px solid color-mix(in srgb, var(--s-primary, #2b2399) 16%, #e5e7eb);
}

.s-page .s-study__next-copy {
    display: grid;
    gap: 0.15rem;
}

.s-page .s-study__next-copy .s-study__eyebrow {
    color: var(--s-primary-strong, #2b2399);
    opacity: 1;
}

.s-page .s-study__next-copy h2 {
    margin: 0;
    font-size: 1.15rem;
}

.s-page .s-study__next-copy p {
    margin: 0;
    color: var(--s-muted, #64748b);
}

.s-page .s-study__next-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.s-page .s-study__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (max-width: 640px) {
    .s-page .s-study__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.s-page .s-study__stats > div {
    position: relative;
    padding: 0.95rem 1rem;
    border: 1px solid var(--s-line, #e5e7eb);
    border-radius: 12px;
    background: var(--s-surface, #fff);
    display: grid;
    gap: 0.15rem;
    overflow: hidden;
}

.s-page .s-study__stats > div::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 3px;
    background: color-mix(in srgb, var(--s-primary, #2b2399) 70%, var(--s-accent, #f5a524));
}

.s-page .s-study__stats strong {
    font-size: 1.4rem;
    line-height: 1.1;
}

.s-page .s-study__stats span {
    color: var(--s-muted, #64748b);
    font-size: 0.84rem;
}

.s-page .s-study__section {
    padding: 1.2rem 1.25rem;
    border: 1px solid var(--s-line, #e5e7eb);
    border-radius: 14px;
    background: var(--s-surface, #fff);
}

.s-page .s-study__section-head {
    margin-bottom: 0.95rem;
}

.s-page .s-study__section-head h2 {
    margin: 0 0 0.2rem;
    font-size: 1.2rem;
}

.s-page .s-study__section-head p {
    margin: 0;
    color: var(--s-muted, #64748b);
    font-size: 0.92rem;
}

.s-page .s-study__modules {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.s-page .s-study__module {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
}

.s-page .s-study__module-num {
    width: 2rem;
    height: 2rem;
    margin-top: 1.05rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.85rem;
    background: var(--s-tint, #f1f5f9);
    color: var(--s-ink, #0f172a);
}

.s-page .s-study__module--completed .s-study__module-num {
    background: #166534;
    color: #fff;
}

.s-page .s-study__module.is-next .s-study__module-num {
    background: var(--s-primary, #2b2399);
    color: #fff;
}

.s-page .s-study__module-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 1rem;
    padding: 0.95rem;
    border: 1px solid var(--s-line, #e5e7eb);
    border-radius: 14px;
    background: #fff;
}

.s-page .s-study__module.is-next .s-study__module-card {
    border-color: color-mix(in srgb, var(--s-primary, #2b2399) 35%, #e5e7eb);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

@media (max-width: 640px) {
    .s-page .s-study__module-card {
        grid-template-columns: 1fr;
    }

    .s-page .s-study__module-media {
        width: 100%;
        height: 140px;
    }
}

.s-page .s-study__module-media {
    width: 112px;
    height: 84px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--s-tint, #f1f5f9);
}

.s-page .s-study__module-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.s-page .s-study__module-body {
    display: grid;
    gap: 0.45rem;
    align-content: start;
    min-width: 0;
}

.s-page .s-study__module-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.65rem;
    justify-content: space-between;
    align-items: start;
}

.s-page .s-study__module-head h3 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.3;
}

.s-page .s-study__module-kicker {
    margin: 0 0 0.1rem;
    color: var(--s-muted, #64748b);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.s-page .s-study__module .s-prog__item-meter {
    height: 8px;
    margin-top: 0.15rem;
}

.s-page .s-study__module .s-prog__item-actions {
    margin-top: 0.2rem;
}

.s-page .s-study__side {
    position: sticky;
    top: 1rem;
}

.s-page .s-study__panel {
    display: grid;
    gap: 0.85rem;
    padding: 1.05rem;
    border: 1px solid var(--s-line, #e5e7eb);
    border-radius: 14px;
    background: var(--s-surface, #fff);
}

.s-page .s-study__panel-title {
    margin: 0;
    font-size: 1rem;
}

.s-page .s-study__path {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
}

.s-page .s-study__path-item {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 0.55rem;
    align-items: start;
}

.s-page .s-study__path-dot {
    width: 10px;
    height: 10px;
    margin-top: 0.35rem;
    border-radius: 999px;
    background: #cbd5e1;
    box-shadow: 0 0 0 3px color-mix(in srgb, #cbd5e1 35%, transparent);
}

.s-page .s-study__path-item--completed .s-study__path-dot {
    background: #16a34a;
    box-shadow: 0 0 0 3px color-mix(in srgb, #16a34a 25%, transparent);
}

.s-page .s-study__path-item--in_progress .s-study__path-dot {
    background: var(--s-primary, #2b2399);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--s-primary, #2b2399) 22%, transparent);
}

.s-page .s-study__path-item strong {
    display: block;
    font-size: 0.9rem;
    line-height: 1.3;
}

.s-page .s-study__path-item span {
    color: var(--s-muted, #64748b);
    font-size: 0.8rem;
}

.s-page .s-study__ring {
    position: relative;
    width: 120px;
    height: 120px;
    max-width: 120px;
    max-height: 120px;
    flex: 0 0 120px;
    overflow: hidden;
}

.s-page .s-study__ring svg {
    display: block;
    width: 120px !important;
    height: 120px !important;
    max-width: 120px;
    max-height: 120px;
    transform: rotate(-90deg);
    overflow: visible;
}

.s-page .s-study__ring-track,
.s-page .s-study__ring-value {
    fill: none !important;
    stroke-width: 9;
}

.s-page .s-study__ring-track {
    stroke: rgba(255, 255, 255, 0.28);
}

.s-page .s-study__ring-value {
    stroke: var(--s-accent, #f5a524);
    stroke-linecap: round;
}

.s-page .s-study__ring-label {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
    color: #fff;
}

.s-page .s-study__ring-label strong {
    font-size: 1.6rem;
    line-height: 1;
}

.s-page .s-study__ring-label span {
    font-size: 0.75rem;
    opacity: 0.85;
}

.s-page .s-study__side-link {
    justify-self: center;
}

.s-page .s-study__cert-preview {
    margin-top: 0.75rem;
    border: 1px solid var(--s-line, #e5e7eb);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    background: var(--s-tint, #f8fafc);
}

.s-page .s-study__cert-preview summary {
    cursor: pointer;
    font-weight: 600;
}

.s-page .s-study__cert-preview[open] summary {
    margin-bottom: 0.75rem;
}

.s-page .s-btn--block {
    width: 100%;
    justify-content: center;
}

.s-page .s-embed {
    margin-block-end: 24px;
    border-radius: var(--s-radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
}

.s-page .s-embed iframe,
.s-page .s-embed video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.s-outline {
    display: grid;
    gap: 10px;
}

.s-outline details {
    border: 1px solid var(--s-line);
    border-radius: var(--s-radius-sm);
    background: var(--s-surface);
    overflow: hidden;
}

.s-outline summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    color: var(--s-ink);
}

.s-outline summary::-webkit-details-marker {
    display: none;
}

.s-outline summary:hover {
    background: var(--s-tint);
}

.s-outline__number {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--s-primary-soft);
    color: var(--s-primary-strong);
    font-variant-numeric: tabular-nums;
}

.s-outline__count {
    margin-inline-start: auto;
    color: var(--s-muted);
    font-weight: 400;
    white-space: nowrap;
}

.s-outline summary .s-icon {
    transition: transform .2s ease;
    color: var(--s-muted);
}

.s-outline details[open] summary .s-icon {
    transform: rotate(180deg);
}

.s-page .s-outline ol {
    border-block-start: 1px solid var(--s-line);
    padding: 8px 20px 12px;
}

.s-page .s-outline ol li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-block: 9px;
    color: var(--s-text);
}

.s-page .s-outline ol li + li {
    border-block-start: 1px dashed var(--s-line);
}

.s-outline ol .s-icon {
    color: var(--s-muted);
}

.s-people {
    display: grid;
    gap: 16px;
}

.s-person {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 18px;
    padding: 20px;
    border: 1px solid var(--s-line);
    border-radius: var(--s-radius);
}

.s-page .s-person img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--s-tint);
}

.s-page .s-person h3 {
    font-size: 1.1875rem;
}

.s-page .s-person__role {
    color: var(--s-primary-ink);
    font-weight: 500;
}

.s-page .s-person__bio {
    color: var(--s-muted);
    margin-block-start: 8px;
}

/* ---------------------------------------------------------------- 7. Article pages */

.s-article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
    padding-block: clamp(28px, 4vw, 48px) var(--s-space);
}

.s-article--single {
    grid-template-columns: minmax(0, 1fr);
}

.s-sidecard {
    position: sticky;
    inset-block-start: 112px;
    padding: 22px;
    border: 1px solid var(--s-line);
    border-radius: var(--s-radius);
    background: var(--s-tint);
}

.s-page .s-sidecard h2 {
    font-size: 1.125rem;
    margin-block-end: 10px;
}

.s-page .s-sidecard a {
    display: block;
    padding: 8px 12px;
    margin-inline: -12px;
    border-radius: 8px;
    color: var(--s-text);
    --s-link: var(--s-text);
    font-weight: 500;
}

.s-page .s-sidecard a:hover,
.s-page .s-sidecard a[aria-current="page"] {
    background: var(--s-surface);
    color: var(--s-primary-ink);
    --s-link: var(--s-primary-ink);
}

.s-page .s-figure {
    max-width: 420px;
    margin: 40px auto 0;
}

/* Text written in an editor (footer pages, course overview): we style the plain tags. */
.s-page .s-prose {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--s-text);
    overflow-wrap: anywhere;
}

/* Editors wrap their text in sections and divs, so spacing is set on the tags themselves. */
.s-page .s-prose p,
.s-page .s-prose ul,
.s-page .s-prose ol,
.s-page .s-prose blockquote,
.s-page .s-prose table,
.s-page .s-prose figure {
    margin-block: 0 1.1em;
}

.s-page .s-prose h1,
.s-page .s-prose h2,
.s-page .s-prose h3,
.s-page .s-prose h4 {
    margin-block: 1.7em .55em;
    letter-spacing: -.01em;
}

.s-page .s-prose h1,
.s-page .s-prose h2 {
    font-size: 1.5rem;
}

.s-page .s-prose h3 {
    font-size: 1.25rem;
}

.s-page .s-prose h4 {
    font-size: 1.0625rem;
}

.s-page .s-prose > :first-child,
.s-page .s-prose > :first-child > :first-child {
    margin-block-start: 0;
}

.s-page .s-prose :last-child {
    margin-block-end: 0;
}

.s-page .s-prose p,
.s-page .s-prose li {
    font-size: inherit;
    line-height: inherit;
    text-align: start;
}

.s-page .s-prose .lead {
    font-size: 1.25rem;
    color: var(--s-ink);
    line-height: 1.6;
}

.s-page .s-prose ul,
.s-page .s-prose ol {
    padding-inline-start: 1.4em;
}

.s-page .s-prose ul {
    list-style: disc;
}

.s-page .s-prose ol {
    list-style: decimal;
}

.s-page .s-prose li + li {
    margin-block-start: .4em;
}

.s-page .s-prose li::marker {
    color: var(--s-primary-ink);
}

.s-page .s-prose a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.s-page .s-prose img,
.s-page .s-prose iframe,
.s-page .s-prose video {
    max-width: 100%;
    height: auto;
    border-radius: var(--s-radius-sm);
}

.s-page .s-prose iframe {
    aspect-ratio: 16 / 9;
    width: 100%;
}

.s-page .s-prose blockquote {
    padding: 4px 20px;
    border-inline-start: 4px solid var(--s-primary);
    color: var(--s-ink);
}

.s-page .s-prose table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
}

.s-page .s-prose th,
.s-page .s-prose td {
    padding: 10px 14px;
    border: 1px solid var(--s-line);
    text-align: start;
}

.s-page .s-prose th {
    background: var(--s-tint);
    color: var(--s-ink);
}

/* ---------------------------------------------------------------- 8. Footer */

/* Colors are tokens: the background comes from the theme configuration page (footer.html
   writes --s-footer-bg) and .s-footer--light is added when that color is a light one. */
.s-footer {
    --s-footer-bg: #0b1020;
    --s-footer-text: #b6c0d4;
    --s-footer-strong: #fff;
    --s-footer-muted: #8b97b0;
    --s-footer-line: rgba(255, 255, 255, .12);
    --s-footer-chip: rgba(255, 255, 255, .08);
    clear: both;
    background: var(--s-footer-bg);
    color: var(--s-footer-text);
    padding-block: clamp(48px, 6vw, 72px) 28px;
}

.s-footer--light {
    --s-footer-text: #334155;
    --s-footer-strong: #0f172a;
    --s-footer-muted: #5b6678;
    --s-footer-line: rgba(15, 23, 42, .14);
    --s-footer-chip: rgba(15, 23, 42, .07);
}

.s-footer__grid {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) repeat(auto-fit, minmax(160px, 1fr));
    gap: 36px clamp(24px, 4vw, 56px);
}

.s-footer__grid > * {
    min-width: 0;
}

.s-footer__contact span,
.s-footer__contact a {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
    .s-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .s-footer__grid > .s-footer__brand {
        grid-column: 1 / -1;
        max-width: none;
    }
}

@media (max-width: 575.98px) {
    .s-footer__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.s-footer__brand {
    display: grid;
    gap: 18px;
    align-content: start;
    max-width: 340px;
}

.s-footer__brand img {
    max-height: 44px;
    max-width: 200px;
    width: auto;
    display: block;
}

.s-footer h2 {
    font-family: var(--s-font-headings);
    color: var(--s-footer-strong);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-block-end: 14px;
}

.s-footer p,
.s-footer li {
    font-size: 1rem;
    line-height: 1.6;
    color: inherit;
}

.s-footer ul {
    display: grid;
    gap: 10px;
}

.s-footer a {
    color: var(--s-footer-text);
    --s-link: var(--s-footer-text);
}

.s-footer a:hover {
    color: var(--s-footer-strong);
    --s-link: var(--s-footer-strong);
}

.s-footer__contact li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    white-space: pre-line;
}

.s-footer__contact .s-icon {
    margin-block-start: 4px;
    color: var(--s-footer-muted);
}

.s-footer__social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.s-footer__social a {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--s-footer-chip);
    color: var(--s-footer-strong);
    --s-link: var(--s-footer-strong);
    transition: background-color .15s ease, transform .15s ease;
}

.s-footer__social a:hover {
    background: var(--s-primary);
    color: #fff;
    --s-link: #fff;
    transform: translateY(-2px);
}

.s-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    margin-block-start: clamp(32px, 5vw, 56px);
    padding-block-start: 22px;
    border-block-start: 1px solid var(--s-footer-line);
}

.s-footer__powered {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.s-footer__powered img {
    height: 26px;
    width: auto;
    display: block;
}

.s-footer__powered a + a {
    padding-inline-start: 14px;
    border-inline-start: 1px solid var(--s-footer-line);
}

/* ---------------------------------------------------------------- 9. Header (every LMS page) */

/*
 * One header for every page: same height, same container width as the page body and the
 * footer (.s-container), every item centred on one line. The older sheets (lms-main, tab.css,
 * override_style.css) position its parts with floats, fixed heights and !important, so the
 * layout is rebuilt here as flex rows and says !important where they do.
 *
 *   wide:    [logo] [links ...............] [language] [light/dark] [user | sign in]
 *   narrow:  [menu button] [logo] ........ [language] [light/dark]      (links in the menu)
 */

/* A pinned header needs ancestors that do not scroll or cut their content themselves. */
body,
body .window-wrap {
    overflow: visible;
    overflow-x: clip;
}

.custom-header-container-in-main {
    position: sticky;
    inset-block-start: 0;
    z-index: 1000;
    height: auto !important;
}

header.global-header.custom-global-header {
    --s-header-height: 72px;
    position: relative;
    height: auto !important;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: color-mix(in srgb, var(--s-surface) 90%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    border: 0;
    border-block-end: 1px solid var(--s-line);
    box-shadow: none;
    font-family: var(--s-font);
    line-height: 1.2;
}

header.global-header.custom-global-header *,
header.global-header.custom-global-header *::before,
header.global-header.custom-global-header *::after {
    box-sizing: border-box;
}

header.global-header.custom-global-header .header-container {
    width: 100%;
    max-width: calc(var(--s-width) + 2 * var(--s-gutter));
    margin-inline: auto;
    padding: 0 var(--s-gutter);
}

header.global-header.custom-global-header .header-container::after {
    display: none;
}

header.global-header.custom-global-header .main-header {
    display: flex;
    align-items: center;
    gap: 12px 24px;
    height: auto !important;
    min-height: var(--s-header-height);
    margin: 0;
    padding: 0;
}

header.global-header.custom-global-header .header-logo {
    display: flex;
    align-items: center;
    flex: none;
    float: none;
    position: static;
    width: auto;
    height: auto;
    margin: 0 !important;
    padding: 0;
    line-height: 0;
}

header.global-header.custom-global-header .header-logo a {
    display: flex;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
}

header.global-header.custom-global-header .header-logo img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 180px !important;
    max-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain;
}

/* The logo for dark backgrounds takes over in dark mode. */
header.global-header.custom-global-header .header-logo img.s-logo-dark,
html[data-theme="dark"] header.global-header.custom-global-header .header-logo img.s-logo-light {
    display: none !important;
}

html[data-theme="dark"] header.global-header.custom-global-header .header-logo img.s-logo-dark {
    display: block !important;
}

header.global-header.custom-global-header .nav-links {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    gap: 20px;
    min-width: 0;
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
}

header.global-header.custom-global-header .nav-links::after {
    display: none;
}

header.global-header.custom-global-header .nav-links .main {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 2px;
    min-width: 0;
    float: none;
    margin: 0;
    margin-inline-end: auto;
    padding: 0;
    padding-inline-end: 16px;
    border: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    /* Extra tabs (My/Browse Programs) must not cover language / profile. */
    overflow-x: auto;
    overflow-y: hidden;
    /* Hide the thin scrollbar that looked like an underline under the tabs. */
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    -webkit-overflow-scrolling: touch;
}

header.global-header.custom-global-header .nav-links .main::-webkit-scrollbar,
header.global-header.custom-global-header .nav-links .main::-webkit-scrollbar-thumb,
header.global-header.custom-global-header .nav-links .main::-webkit-scrollbar-track {
    display: none !important;
    height: 0 !important;
    width: 0 !important;
    background: transparent !important;
}

header.global-header.custom-global-header .nav-links,
header.global-header.custom-global-header .nav-links .main,
header.global-header.custom-global-header .nav-links .main .nav-tab {
    border-bottom: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

header.global-header.custom-global-header .nav-links .main .nav-item,
header.global-header.custom-global-header .nav-links .main .nav-tab {
    float: none;
    margin: 0 !important;
    padding: 0 !important;
}

header.global-header.custom-global-header .nav-links .main .nav-tab > a {
    display: inline-flex;
    align-items: center;
    height: auto;
    margin: 0 !important;
    padding: 8px 10px !important;
    border: 0;
    border-radius: 10px;
    font-family: var(--s-font);
    font-size: 0.95rem !important;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    color: var(--s-text) !important;
    --s-link: var(--s-text);
}

/* The older sheets add an underline border and light boxes on hover / active, in both modes. */
header.global-header.custom-global-header .nav-links .main .nav-tab > a,
header.global-header.custom-global-header .nav-links .main .nav-tab > a:hover,
header.global-header.custom-global-header .nav-links .main .nav-tab > a:focus,
header.global-header.custom-global-header .nav-links .main .nav-tab > a.active {
    border: 0 !important;
    box-shadow: none !important;
}

header.global-header.custom-global-header .nav-links .main .nav-tab > a:hover,
header.global-header.custom-global-header .nav-links .main .nav-tab > a:focus-visible,
header.global-header.custom-global-header .nav-links .main .nav-tab > a.active {
    color: var(--s-primary-ink) !important;
    --s-link: var(--s-primary-ink);
    background: var(--s-primary-soft) !important;
}

/* "Home" submenu (the other home page designs). override_style.css opened it at a fixed
   75px from the item, which left an empty band under the shorter item of this header: the
   pointer left the item on its way down and the menu closed before it could be clicked. It now
   opens right under the item, with an invisible bridge over the gap, looks like the user menu,
   and also opens for keyboard users (focus inside the item). */
header.global-header.custom-global-header .nav-links .main .nav-tab .sub-menu {
    inset-block-start: calc(100% + 8px);
    inset-inline-start: 0;
    inset-inline-end: auto;
    min-width: 220px;
    padding: 6px;
    border: 1px solid var(--s-line);
    border-radius: var(--s-radius-sm);
    background: var(--s-card);
    box-shadow: var(--s-shadow-lift);
}

header.global-header.custom-global-header .nav-links .main .nav-tab .sub-menu::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block-start: -10px;
    height: 10px;
}

header.global-header.custom-global-header .nav-links .main .nav-tab:hover > .sub-menu,
header.global-header.custom-global-header .nav-links .main .nav-tab:focus-within > .sub-menu {
    display: block;
}

header.global-header.custom-global-header .nav-links .main .nav-tab:focus-within .menu-toggle i {
    transform: rotate(180deg);
}

header.global-header.custom-global-header .nav-links .main .nav-tab .sub-menu li {
    padding: 0;
}

header.global-header.custom-global-header .nav-links .main .nav-tab .sub-menu a {
    display: block;
    padding: 9px 12px !important;
    border-radius: 8px;
    font-family: var(--s-font);
    font-size: 1rem;
    white-space: nowrap;
    color: var(--s-text) !important;
    --s-link: var(--s-text);
}

header.global-header.custom-global-header .nav-links .main .nav-tab .sub-menu a:hover,
header.global-header.custom-global-header .nav-links .main .nav-tab .sub-menu a:focus-visible {
    background: var(--s-primary-soft);
    color: var(--s-primary-ink) !important;
    --s-link: var(--s-primary-ink);
    outline: none;
}

/* Right side: language, light/dark, then the user menu or the sign-in buttons.
   Never shrink — keeps them clear of the scrolling main tabs. */
header.global-header.custom-global-header .nav-links .language-menu {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    order: 2;
    float: none;
    margin: 0;
    margin-inline-start: 12px;
    padding: 0;
    position: relative;
    z-index: 2;
}

header.global-header.custom-global-header .nav-links .secondary {
    display: flex !important;
    align-items: center;
    flex: 0 0 auto;
    order: 3;
    gap: 12px;
    float: none;
    margin: 0 !important;
    padding: 0;
    position: relative;
    z-index: 2;
}

header.global-header.custom-global-header .settings-language-form {
    position: static;
    display: flex;
    align-items: center;
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
}

header.global-header.custom-global-header .settings-language-form label {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

header.global-header.custom-global-header .language-selector {
    width: auto;
    max-width: 190px;
    height: 42px;
    margin: 0;
    padding: 0 34px 0 14px;
    border: 1.5px solid var(--s-line);
    border-radius: 999px;
    background-color: var(--s-card);
    color: var(--s-ink);
    font-family: var(--s-font);
    font-size: 1rem !important;
    line-height: 1.2;
    cursor: pointer;
    /* A long language name ends in "…" on narrow screens instead of being cut mid-letter. */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

body.rtl header.global-header.custom-global-header .language-selector {
    padding: 0 14px 0 34px;
}

header.global-header.custom-global-header .language-selector:hover,
header.global-header.custom-global-header .language-selector:focus {
    border-color: var(--s-primary);
}

header.global-header.custom-global-header .nav-links .secondary .nav-item,
header.global-header.custom-global-header .nav-links .secondary .nav-item-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    float: none;
    margin: 0 !important;
    padding: 0 !important;
}

header.global-header.custom-global-header .nav-links .secondary .toggle-user-dropdown {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    margin: 0 !important;
    padding: 0 6px !important;
    border: 0;
    line-height: 1.2;
    cursor: pointer;
}

/* TSD-111: the full user name shows (no 180px cut with an ellipsis). */
header.global-header.custom-global-header .nav-links .secondary .toggle-user-dropdown .username {
    margin: 0;
    padding: 0;
    white-space: nowrap;
    font-family: var(--s-font);
    font-size: 1rem !important;
    font-weight: 500;
    line-height: 1.2;
    color: var(--s-text) !important;
}

/* The arrow of the MFE header's user menu: a small chevron in the text color. */
header.global-header.custom-global-header .nav-links .secondary .toggle-user-dropdown::after {
    content: "" !important;
    position: static;
    display: inline-block;
    flex: none;
    width: 8px;
    height: 8px;
    margin: -4px 4px 0 2px;
    border: 0 !important;
    border-inline-end: 2px solid currentColor !important;
    border-block-end: 2px solid currentColor !important;
    background: none;
    color: var(--s-text);
    font-size: 0;
    transform: rotate(45deg);
    transition: transform .15s ease;
}

header.global-header.custom-global-header .nav-links .secondary .toggle-user-dropdown[aria-expanded="true"]::after {
    margin-block-start: 4px;
    transform: rotate(225deg);
}

header.global-header.custom-global-header .nav-links .secondary .dropdown-user-menu {
    inset-block-start: calc(100% + 8px);
    inset-inline-end: 0;
    inset-inline-start: auto;
    min-width: 200px;
    padding: 6px;
    border: 1px solid var(--s-line) !important;
    border-radius: var(--s-radius-sm);
    background: var(--s-card) !important;
    box-shadow: var(--s-shadow-lift) !important;
    overflow: hidden;
}

header.global-header.custom-global-header .nav-links .secondary .dropdown-user-menu .dropdown-item,
header.global-header.custom-global-header .nav-links .secondary .dropdown-user-menu .dropdown-item a {
    border: 0 !important;
    border-radius: 8px;
    background: transparent !important;
    font-family: var(--s-font);
    font-size: 1rem;
    color: var(--s-text) !important;
    --s-link: var(--s-text);
}

header.global-header.custom-global-header .nav-links .secondary .dropdown-user-menu .dropdown-item:hover,
header.global-header.custom-global-header .nav-links .secondary .dropdown-user-menu .dropdown-item a:hover,
header.global-header.custom-global-header .nav-links .secondary .dropdown-user-menu .dropdown-item a:focus {
    background: var(--s-primary-soft) !important;
    color: var(--s-primary-ink) !important;
    --s-link: var(--s-primary-ink);
    outline: none;
}

header.global-header.custom-global-header .nav-links .secondary .btn-holder {
    display: flex;
    align-items: center;
    gap: 10px;
    float: none;
    margin: 0;
    padding: 0;
}

header.global-header.custom-global-header .nav-links .secondary .btn-holder .nav-item .btn {
    display: inline-flex;
    align-items: center;
    height: auto;
    margin: 0;
    padding: var(--s-btn-padding-y, .5625rem) var(--s-btn-padding-x, 1rem);
    border: var(--s-btn-border-width, 1px) solid var(--s-btn-outline-border, var(--s-primary)) !important;
    border-radius: var(--s-btn-radius, .375rem) !important;
    background: var(--s-btn-outline-bg, transparent) !important;
    box-shadow: none !important;
    color: var(--s-btn-outline-text, var(--s-primary)) !important;
    font-family: var(--s-font);
    font-size: 1rem !important;
    font-weight: var(--s-btn-font-weight, 400);
    line-height: var(--s-btn-line-height, 1.3333);
    white-space: nowrap;
    text-decoration: none;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
}

header.global-header.custom-global-header .nav-links .secondary .btn-holder .nav-item .btn:hover,
header.global-header.custom-global-header .nav-links .secondary .btn-holder .nav-item .btn:focus-visible {
    border-color: var(--s-btn-outline-hover-border, var(--s-primary-strong)) !important;
    background: var(--s-btn-outline-hover-bg, transparent) !important;
    color: var(--s-btn-outline-hover-text, var(--s-primary-strong)) !important;
}

/* "Sign Up" is the primary action, "Sign in" the outline one: the MFE pair. */
header.global-header.custom-global-header .nav-links .secondary .btn-holder .nav-item .btn.register-btn {
    border-color: var(--s-btn-primary-border, var(--s-primary)) !important;
    background: var(--s-btn-primary-bg, var(--s-primary)) !important;
    color: var(--s-btn-primary-text, #fff) !important;
}

header.global-header.custom-global-header .nav-links .secondary .btn-holder .nav-item .btn.register-btn:hover,
header.global-header.custom-global-header .nav-links .secondary .btn-holder .nav-item .btn.register-btn:focus-visible {
    border-color: var(--s-btn-primary-hover-border, var(--s-primary-strong)) !important;
    background: var(--s-btn-primary-hover-bg, var(--s-primary-strong)) !important;
    color: var(--s-btn-primary-hover-text, #fff) !important;
}

/* Menu button of narrow screens (the platform's script fills #mobile-menu). */
header.global-header.custom-global-header .hamburger-menu {
    display: none;
    position: relative;
    inset: auto !important;
    flex: none;
    order: -1;
    width: 22px !important;
    height: 16px !important;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

header.global-header.custom-global-header .hamburger-menu .line {
    inset-inline-start: 0;
    width: 100%;
    height: 2px;
    background: var(--s-ink);
}

header.global-header.custom-global-header .hamburger-menu .line:nth-child(1) { top: 0; }
header.global-header.custom-global-header .hamburger-menu .line:nth-child(2),
header.global-header.custom-global-header .hamburger-menu .line:nth-child(3) { top: 7px; }
header.global-header.custom-global-header .hamburger-menu .line:nth-child(4) { top: 14px; }

header.global-header.custom-global-header .mobile-menu {
    position: absolute;
    inset-block-start: 100%;
    inset-inline: 0;
    width: 100%;
    margin: 0;
    padding: 8px var(--s-gutter) 12px;
    border: 0;
    border-block-end: 1px solid var(--s-line);
    background: var(--s-card);
    box-shadow: var(--s-shadow-lift);
}

header.global-header.custom-global-header .mobile-menu a {
    display: block;
    padding: 12px 8px;
    border: 0;
    border-radius: 10px;
    font-family: var(--s-font);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--s-text);
    --s-link: var(--s-text);
}

header.global-header.custom-global-header .mobile-menu a:hover,
header.global-header.custom-global-header .mobile-menu a.active {
    background: var(--s-primary-soft);
    color: var(--s-primary-ink);
    --s-link: var(--s-primary-ink);
}

/* Small laptops and tablets held sideways: the picture alone stands for the user menu. */
@media (max-width: 1199.98px) {
    header.global-header.custom-global-header .nav-links .secondary .toggle-user-dropdown .username {
        display: none;
    }

    header.global-header.custom-global-header .language-selector {
        max-width: 140px;
    }

    header.global-header.custom-global-header .nav-links .main .nav-tab > a {
        padding-inline: 8px !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 991.98px) {
    header.global-header.custom-global-header {
        --s-header-height: 64px;
    }

    header.global-header.custom-global-header .main-header {
        gap: 12px 14px;
    }

    header.global-header.custom-global-header .hamburger-menu {
        display: block;
    }

    /* Only in the bar: the platform's script copies these items into #mobile-menu. */
    header.global-header.custom-global-header .main-header .hidden-mobile,
    header.global-header.custom-global-header .nav-links .main {
        display: none !important;
    }

    header.global-header.custom-global-header .nav-links {
        justify-content: flex-end;
        gap: 10px;
    }

    header.global-header.custom-global-header .header-logo img {
        max-width: 140px !important;
        max-height: 38px !important;
    }

    header.global-header.custom-global-header .language-selector {
        max-width: 132px;
        height: 40px;
        padding-inline: 12px 28px;
    }
}

@media (max-width: 420px) {
    header.global-header.custom-global-header .header-logo img {
        max-width: 104px !important;
    }

    header.global-header.custom-global-header .language-selector {
        max-width: 96px;
    }
}

/* Blog and event pages (older markup): the same content width as the header and the footer. */
body:not(.site-page) .content-wrapper .section > .container,
body:not(.site-page) .content-wrapper .container {
    width: 100%;
    max-width: calc(var(--s-width) + 2 * var(--s-gutter));
    margin-inline: auto;
    padding-inline: var(--s-gutter);
}

/* ---------------------------------------------------------------- 10. Motion, RTL, small screens, print */

/* Sections rise into place as they scroll into view. This is driven by the scroll position
   itself (no script, nothing is ever left hidden) and only where the browser supports it. */
@keyframes s-rise {
    from {
        opacity: 0;
        translate: 0 28px;
    }

    to {
        opacity: 1;
        translate: 0 0;
    }
}

@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .s-section .s-head,
        .s-section .s-grid > *,
        .s-section .s-split > *,
        .s-section .s-carousel,
        .s-section .s-faq,
        .s-cta,
        .s-stats--band {
            animation: s-rise linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 45%;
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .s-page *,
    .s-footer * {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}

/* Arrows point the other way in right-to-left languages. */
body.rtl .s-link .s-icon,
body.rtl .s-course__go .s-icon,
body.rtl .s-btn .s-icon,
body.rtl .s-carousel__nav .s-icon,
body.rtl .s-pagination .s-icon {
    transform: scaleX(-1);
}

@media (max-width: 1024px) {
    .s-hero--media .s-hero__inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .s-hero__course {
        max-width: 420px;
    }

    .s-courselayout {
        grid-template-columns: minmax(0, 1fr);
    }

    /* The enrol card comes first on a phone: it holds the button. */
    .s-enroll {
        position: static;
        order: -1;
        margin-block-start: -40px;
    }

    .s-article {
        grid-template-columns: minmax(0, 1fr);
    }

    .s-sidecard {
        position: static;
    }
}

@media (max-width: 900px) {
    .s-catalog {
        grid-template-columns: minmax(0, 1fr);
    }

    .s-filters {
        position: static;
        display: none;
    }

    .s-filters.is-open {
        display: block;
    }

    .s-page .s-filters__toggle {
        display: inline-flex;
    }
}

@media (max-width: 600px) {
    .s-page .s-search {
        flex-wrap: wrap;
        border-radius: var(--s-radius);
        padding: 8px;
        padding-inline-start: 14px;
    }

    .s-page .s-search .s-btn {
        width: 100%;
    }

    .s-hero__actions .s-btn,
    .s-cta__actions .s-btn {
        flex: 1 1 100%;
    }

    .s-page .s-stats {
        gap: 16px 28px;
    }

    .s-person {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .s-page .s-person img {
        width: 64px;
        height: 64px;
    }

    .s-page .s-subnav {
        inset-block-start: 56px;
    }

    .s-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---------------------------------------------------------------- 11. Dark mode and header controls */

/*
 * The switch is in the header (templates/header/theme-toggle.html, js/site.js); main.html sets
 * data-theme on <html> before the page paints. Pages built on the tokens above only need the
 * tokens redefined; what follows the token block are the few places with a fixed light color.
 */
html[data-theme="dark"] {
    color-scheme: dark;
    --s-primary-strong: color-mix(in srgb, var(--s-primary) 82%, #fff);
    --s-primary-ink: color-mix(in srgb, var(--s-primary) 58%, #fff);
    --s-primary-soft: color-mix(in srgb, var(--s-primary) 20%, #0f1626);
    --s-primary-line: color-mix(in srgb, var(--s-primary) 42%, #0f1626);
    --s-ink: #f1f5f9;
    --s-text: #cbd5e1;
    --s-muted: #9aa7bb;
    --s-line: #2a3549;
    --s-surface: #0f1626;
    --s-tint: #151e31;
    --s-card: #172135;
    --s-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --s-shadow-lift: 0 2px 4px rgba(0, 0, 0, .45), 0 18px 40px rgba(0, 0, 0, .5);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .window-wrap,
html[data-theme="dark"] .content-wrapper {
    background: var(--s-surface) !important;
    color: var(--s-text);
}

html[data-theme="dark"] .s-notice {
    background: #3a2c0c;
    color: #ffdf9c;
    border-block-end-color: #5a4514;
}

/* Header: every LMS page has it. */
html[data-theme="dark"] header.global-header,
html[data-theme="dark"] body.site-page header.global-header {
    background: color-mix(in srgb, var(--s-surface) 92%, transparent);
    border-block-end: 1px solid var(--s-line);
    box-shadow: none;
}

/* !important: override_style.css fixes these colors with it. */
html[data-theme="dark"] header.global-header .nav-links .main .nav-tab a,
html[data-theme="dark"] header.global-header .nav-links .secondary .toggle-user-dropdown .username {
    color: var(--s-text) !important;
    --s-link: var(--s-text);
}

html[data-theme="dark"] header.global-header .hamburger-menu .line {
    background: var(--s-text);
}

html[data-theme="dark"] header.global-header .nav-links .main .nav-tab a:hover,
html[data-theme="dark"] header.global-header .nav-links .main .nav-tab a.active {
    color: var(--s-primary-strong) !important;
    --s-link: var(--s-primary-strong);
}

html[data-theme="dark"] header.global-header .language-selector,
html[data-theme="dark"] body.site-page header.global-header .language-selector {
    background-color: var(--s-card);
    border-color: var(--s-line);
    color: var(--s-ink);
}

html[data-theme="dark"] header.global-header .dropdown-user-menu,
html[data-theme="dark"] header.global-header .mobile-menu {
    background: var(--s-card);
    border-color: var(--s-line);
    box-shadow: var(--s-shadow-lift);
}

html[data-theme="dark"] header.global-header .dropdown-user-menu .dropdown-item a,
html[data-theme="dark"] header.global-header .mobile-menu a {
    color: var(--s-text);
    --s-link: var(--s-text);
}

/*
 * Blog and event pages still use the older (MaxCoach) markup: give its surfaces the dark tokens.
 * background-color only (sections carry banner images) and !important (the old sheets use it).
 */
html[data-theme="dark"] body:not(.site-page) .content-wrapper,
html[data-theme="dark"] body:not(.site-page) .content-wrapper .section:not(.new-page-title-section),
html[data-theme="dark"] body:not(.site-page) .content-wrapper :is(.blogs-page, .blog-details-page),
html[data-theme="dark"] body:not(.site-page) :is(#page.blogs-page, #page.blog-details-page),
html[data-theme="dark"] body:not(.site-page) .content-wrapper :is(.blogs-page, .blog-details-page) .list {
    background-color: var(--s-surface) !important;
    color: var(--s-text);
}

html[data-theme="dark"] body:not(.site-page) .content-wrapper :is(.event, .blog, .card, .sidebar-widget, .sidebar-entry-event, .event-details, .blog-details, .event-info, .entry-info, .widget, .bg-white, .bg-light, .list-group-item, .box, .info-box) {
    background-color: var(--s-card) !important;
    border-color: var(--s-line) !important;
    color: var(--s-text);
}

html[data-theme="dark"] body:not(.site-page) .content-wrapper :is(h1, h2, h3, h4, h5, h6, .title, .widget-title, strong, b, label, th, dt),
html[data-theme="dark"] body:not(.site-page) .content-wrapper :is(h1, h2, h3, h4, h5, h6, .title, .widget-title) :is(a, span) {
    color: var(--s-ink) !important;
}

html[data-theme="dark"] body:not(.site-page) .content-wrapper :is(p, li, td, dd, span:not(.badge), .date, .text, .value, a.category) {
    color: var(--s-text);
}

html[data-theme="dark"] body:not(.site-page) .content-wrapper :is(input, select, textarea) {
    background-color: var(--s-card) !important;
    border-color: var(--s-line) !important;
    color: var(--s-ink) !important;
}

html[data-theme="dark"] body:not(.site-page) .content-wrapper :is(hr, .border, .border-top, .border-bottom, table, td, th, li) {
    border-color: var(--s-line) !important;
}

/* Light / dark switch */
header.global-header .s-theme-toggle {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 1.5px solid var(--s-line);
    border-radius: 50%;
    background: var(--s-surface);
    background-image: none;
    box-shadow: none;
    color: var(--s-ink);
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease;
}

header.global-header .s-theme-toggle:hover,
header.global-header .s-theme-toggle:focus-visible {
    border-color: var(--s-primary);
    color: var(--s-primary-ink);
    background: var(--s-surface);
}

.s-theme-toggle__sun,
html[data-theme="dark"] .s-theme-toggle__moon {
    display: none;
}

html[data-theme="dark"] .s-theme-toggle__sun {
    display: block;
}

/* User menu: picture, full name, arrow */
header.global-header .nav-links .secondary .s-user-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

header.global-header .s-user-toggle__picture {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--s-line);
}

@media print {
    .s-hero,
    .s-coursehero {
        background: none;
        color: #000;
    }

    .s-footer,
    .s-cta,
    .s-carousel__nav,
    .s-search,
    .s-filters {
        display: none;
    }
}

/* ---------------------------------------------------------------- 12. Touch targets (QA 2026-10-18) */

/* Phones and tablets: every stand-alone link and control is at least 40px tall (the rows get
   taller, the look stays). The menu button keeps its 22px lines inside a 40px square. */
header.global-header.custom-global-header .hamburger-menu {
    width: 40px !important;
    height: 40px !important;
    margin-inline-start: -9px;
}

header.global-header.custom-global-header .hamburger-menu .line {
    inset-inline-start: 9px;
    width: 22px;
}

header.global-header.custom-global-header .hamburger-menu .line:nth-child(1) { top: 12px; }
header.global-header.custom-global-header .hamburger-menu .line:nth-child(2),
header.global-header.custom-global-header .hamburger-menu .line:nth-child(3) { top: 19px; }
header.global-header.custom-global-header .hamburger-menu .line:nth-child(4) { top: 26px; }

@media (max-width: 1024px) {
    header.global-header.custom-global-header .header-logo > a,
    .s-footer li > a,
    .s-footer__contact a,
    .s-footer__powered a,
    .s-page .s-crumbs a,
    .s-page .hx-biz-console__bars a,
    .s-page .s-chip:is(a, button),
    .s-page a.s-link {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
        max-inline-size: 100%;
    }

    .s-footer li > a {
        min-inline-size: 40px;
    }

    header.global-header.custom-global-header .nav-links .mobile-nav-item > a {
        min-height: 40px;
    }

    .s-footer ul {
        gap: 0;
    }
}
