﻿/* ============================================================
   LOCAL FONTS
   ============================================================ */

/* Libre Baskerville â€“ italic 400 */
@font-face {
    font-family: 'Libre Baskerville';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/libre-baskerville-italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Libre Baskerville';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/libre-baskerville-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Libre Baskerville â€“ normal 400 */
@font-face {
    font-family: 'Libre Baskerville';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/libre-baskerville-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Libre Baskerville';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/libre-baskerville-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Libre Baskerville â€“ normal 700 */
@font-face {
    font-family: 'Libre Baskerville';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/libre-baskerville-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Libre Baskerville';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/libre-baskerville-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Public Sans â€“ variable (400â€“700), vietnamese */
@font-face {
    font-family: 'Public Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/public-sans-vietnamese.woff2') format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
                   U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
                   U+0329, U+1EA0-1EF9, U+20AB;
}

/* Public Sans â€“ variable (400â€“700), latin-ext */
@font-face {
    font-family: 'Public Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/public-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Public Sans â€“ variable (400â€“700), latin */
@font-face {
    font-family: 'Public Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/public-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    --accent:        #B22234;
    --accent-dark:   #8E1B2A;
    --navy:          #161D33;
    --navy-mid:      #232C54;
    --gold:          #C9A961;
    --gold-dark:     #A07C3A;
    --muted:         #5C6073;
    --body-text:     #1A2238;
    --parchment:     #F6F1E7;
    --parchment-border: #E3D8BF;
    --border:        #E8E3D6;
    --surface:       #FBFAF6;
    --font-serif:    'Libre Baskerville', Georgia, serif;
    --font-sans:     'Public Sans', system-ui, sans-serif;
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }

body {
    margin: 0;
    /* Sticky-footer layout: fill the viewport and let <main> grow so the
       footer always sits at the bottom, even on short pages. */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    color: var(--body-text);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

a { text-decoration: none; color: inherit; }

/* ============================================================
   SHARED: TRI-COLOR STRIPE
   ============================================================ */
.tricolor-stripe {
    display: flex;
    height: 4px;
    width: 100%;
}
.tricolor-stripe div:nth-child(1) { flex: 1; background: var(--navy-mid); }
.tricolor-stripe div:nth-child(2) { flex: 1; background: #fff; }
.tricolor-stripe div:nth-child(3) { flex: 1; background: var(--accent); }

/* ============================================================
   SHARED HEADER
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(251, 250, 246, 0.92);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 12px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    cursor: pointer;
}
.site-logo__text { text-align: left; line-height: 1.05; }
.site-logo__name {
    display: block;
    font-family: var(--font-serif);
    font-size: 16px;
    color: var(--navy);
}
.site-logo__tagline {
    display: block;
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

/* Nav links */
.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}
.site-nav__signin {
    font-size: 14.5px;
    color: var(--navy);
    padding: 4px 0;
    transition: color 0.15s;
}
.site-nav__signin:hover { color: var(--accent); }

.site-nav__register {
    background: var(--accent);
    color: #fff;
    border-radius: 9px;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 14px;
    transition: background 0.15s;
}
.site-nav__register:hover { background: var(--accent-dark); }

.site-nav__link {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--navy);
    transition: color 0.15s;
}
.site-nav__link:hover { color: var(--accent); }

.site-nav__signout {
    background: #fff;
    color: var(--navy);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 9px 16px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.15s;
}
.site-nav__signout:hover { border-color: var(--navy-mid); }

/* Hamburger toggle — hidden on desktop, shown at the mobile breakpoint. */
.site-nav__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 6px;
    margin: -6px;
    color: var(--navy);
    cursor: pointer;
}
.site-nav__toggle-icon--close { display: none; }
.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-icon--open  { display: none; }
.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-icon--close { display: block; }

/* ============================================================
   SHARED FOOTER
   ============================================================ */
.site-footer {
    background: var(--navy);
    color: #AEB4C6;
    margin-top: 10px;
}
.site-footer__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 22px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.site-footer__brand {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    max-width: 400px;
}
.site-footer__brand-name {
    font-family: var(--font-serif);
    color: #fff;
    font-size: 17px;
}
.site-footer__brand-blurb {
    font-size: 12.5px;
    margin-top: 4px;
    line-height: 1.5;
}
.site-footer__links {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
}
.site-footer__col-head {
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.site-footer__link {
    display: block;
    color: #AEB4C6;
    font-size: 13.5px;
    padding: 4px 0;
    transition: color 0.15s;
}
.site-footer__link:hover { color: #fff; }

.site-footer__legal {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 16px 22px;
    text-align: center;
    font-size: 11.5px;
}
.site-footer__legal-link { color: #AEB4C6; transition: color 0.15s; }
.site-footer__legal-link:hover { color: #fff; }

/* ============================================================
   SHARED BUTTONS
   ============================================================ */
.btn-accent {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border-radius: 9px;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 14px;
    font-family: var(--font-sans);
    transition: background 0.15s;
    cursor: pointer;
    border: none;
}
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-accent:disabled { background: #C8BDBD; cursor: not-allowed; opacity: 0.7; }
.btn-accent:disabled:hover { background: #C8BDBD; }
.btn-accent.btn-lg { padding: 13px 24px; font-size: 15px; }

.btn-ghost {
    display: inline-block;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 9px;
    padding: 10px 22px;
    font-weight: 600;
    font-size: 14px;
    font-family: var(--font-sans);
    transition: background 0.15s, border-color 0.15s;
    cursor: pointer;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-ghost.btn-lg { padding: 13px 22px; font-size: 15px; }

.btn-outline {
    display: inline-block;
    background: transparent;
    color: var(--navy);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 14px;
    font-family: var(--font-sans);
    transition: border-color 0.15s;
    cursor: pointer;
}
.btn-outline:hover { border-color: var(--navy-mid); }

/* ============================================================
   SHARED SECTION TYPOGRAPHY
   ============================================================ */
.section-label {
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent);
}
.section-h2 {
    font-family: var(--font-serif);
    font-size: 32px;
    color: var(--navy);
    margin: 8px 0 6px;
    font-weight: 700;
}
.section-body {
    color: var(--muted);
    max-width: 640px;
    margin-top: 0;
    font-size: 15.5px;
    line-height: 1.6;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    background: linear-gradient(180deg, #161D33 0%, #232C54 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hero__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 58px 22px 64px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 46px;
    align-items: center;
}
.hero__stars { display: flex; gap: 7px; margin-bottom: 14px; }
.hero__label {
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 18px;
}
.hero__h1 {
    font-family: var(--font-serif);
    font-size: 46px;
    line-height: 1.1;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.hero__body {
    font-size: 17.5px;
    line-height: 1.6;
    color: #CDD2E0;
    margin-top: 20px;
    max-width: 560px;
}
.hero__ctas {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Hero flag */
.hero__flag {
    width: 100%;
    display: block;
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.4);
}

.hero__flag-img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 12px 32px rgba(0,0,0,0.35));
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
    background: var(--parchment);
    border-bottom: 1px solid var(--parchment-border);
}
.stats-bar__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 26px 22px;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
}
.stat {
    min-width: 130px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.stat svg { flex-shrink: 0; }
.stat__n {
    font-family: var(--font-serif);
    font-size: 28px;
    color: var(--navy);
}
.stat__l {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 2px;
}

/* ============================================================
   CURRICULUM
   ============================================================ */
.curriculum {
    max-width: 1120px;
    margin: 0 auto;
    padding: 60px 22px 24px;
}
.curriculum__map { margin-top: 30px; }

/* Course row */
.course-row {
    width: 100%;
    text-align: left;
    background: var(--parchment);
    border: 1px solid var(--parchment-border);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
    color: inherit;
}
.course-row:hover {
    border-color: var(--gold-dark);
    box-shadow: 0 6px 20px rgba(22, 29, 51, 0.07);
}
.track-col .course-row {
    background: #fff;
    border-color: var(--border);
}
.track-col .course-row:hover {
    border-color: var(--gold-dark);
    box-shadow: 0 6px 20px rgba(22,29,51,0.07);
}
.course-row__left {
    display: flex;
    gap: 14px;
    align-items: center;
    min-width: 0;
}
.course-badge {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 16px;
    border: 2px solid var(--gold-dark);
}
.course-row__title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.course-row__title {
    font-family: var(--font-serif);
    font-size: 16.5px;
    color: var(--navy);
}
.course-row__sub {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 3px;
}
.course-row__req {
    color: var(--accent, #B22234);
    font-weight: 500;
}
.course-row__arrow {
    color: var(--accent);
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

/* Status chips */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
}
.status-chip--available { background: #E8F5E9; color: #2E7D32; }
.status-chip--locked    { background: #F3F4F6; color: var(--muted); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #4CAF50; flex-shrink: 0; }
.status-dot--locked     { background: #9E9E9E; }

/* Divider */
.curriculum__divider {
    display: flex;
    justify-content: center;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 14px 0 6px;
    gap: 8px;
    align-items: center;
}
.curriculum__divider span { width: 40px; height: 1px; background: var(--border); }

/* Track columns */
.curriculum__tracks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 10px;
}
.track-col {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 18px 6px;
}
.track-col__head {
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 10px;
}
.track-col__name {
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--navy);
}
.track-col__sub {
    font-size: 12px;
    color: var(--gold-dark);
    font-weight: 700;
    margin-top: 3px;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-it-works {
    background: #fff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.how-it-works__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 56px 22px;
}
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 26px;
    margin-top: 26px;
}
.step__n {
    font-family: var(--font-serif);
    font-size: 28px;
    color: var(--gold-dark);
}
.step__rule {
    width: 30px;
    height: 2px;
    background: var(--accent);
    margin: 12px 0 14px;
}
.step__title {
    font-weight: 700;
    font-size: 16px;
    color: var(--navy);
    margin-bottom: 6px;
}
.step__body {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.55;
}

/* ============================================================
   CERTIFICATE TEASER
   ============================================================ */
.cert-teaser {
    max-width: 1120px;
    margin: 0 auto;
    padding: 64px 22px;
}
.cert-teaser__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 44px;
    align-items: center;
}

/* Certificate card preview */
.cert-card {
    background: var(--parchment);
    border: 1px solid var(--parchment-border);
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 8px 32px rgba(22,29,51,0.08);
}
.cert-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.cert-card__org {
    font-family: var(--font-serif);
    font-size: 14px;
    color: var(--navy);
}
.cert-card__title {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
}
.cert-card__course {
    font-family: var(--font-serif);
    font-size: 22px;
    color: var(--navy);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--parchment-border);
    padding-bottom: 16px;
}
.cert-card__meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 16px;
}
.cert-card__meta strong { color: var(--navy); display: block; margin-top: 3px; }
.cert-card__meta-label { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.cert-card__id {
    font-size: 10.5px;
    color: var(--muted);
    letter-spacing: 0.05em;
    border-top: 1px solid var(--parchment-border);
    padding-top: 12px;
    margin-bottom: 16px;
}
.cert-card__sigs {
    display: flex;
    gap: 24px;
    font-size: 12px;
    color: var(--muted);
}
.cert-card__sig-line {
    width: 100%;
    height: 1px;
    background: var(--navy);
    margin-bottom: 6px;
    opacity: 0.3;
}
.cert-card__sig-name { line-height: 1.4; }
.cert-card__sig-name span { color: var(--muted); font-size: 11px; }

/* ============================================================
   BOTTOM CTA
   ============================================================ */
.bottom-cta {
    background: var(--navy);
    color: #fff;
}
.bottom-cta__inner {
    max-width: 640px;
    margin: 0 auto;
    padding: 64px 22px;
    text-align: center;
}
.bottom-cta__h2 {
    font-family: var(--font-serif);
    font-size: 34px;
    font-weight: 700;
    margin: 0 0 14px;
}
.bottom-cta__body {
    color: #CDD2E0;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 28px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .hero__inner           { grid-template-columns: 1fr; }
    .hero__h1              { font-size: 34px; }
    .hero__emblem          { display: none; }
    .curriculum__tracks    { grid-template-columns: 1fr; }
    .cert-teaser__inner    { grid-template-columns: 1fr; }
    .cert-teaser__card     { display: none; }
    .site-footer__inner    { flex-direction: column; }
    .site-footer__links    { gap: 30px; }
}

/* Mobile header: collapse the nav into a hamburger dropdown. */
@media (max-width: 640px) {
    .site-nav__toggle { display: inline-flex; }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 10px 16px 16px;
        background: var(--parchment, #FBFAF6);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 12px 24px rgba(0,0,0,0.12);
        z-index: 39;
    }
    .site-nav--open { display: flex; }

    .site-nav__link,
    .site-nav__signin {
        padding: 12px 8px;
        font-size: 16px;
        border-radius: 8px;
    }
    .site-nav__link:hover,
    .site-nav__signin:hover { background: rgba(0,0,0,0.04); }

    .site-nav__register,
    .site-nav__signout { width: 100%; text-align: center; padding: 12px 16px; }

    /* The sign-out button lives inside a form — let it fill the row too. */
    .site-nav form { width: 100%; margin: 6px 0 0 !important; }

    /* Show the avatar as a labelled row rather than a lone floating circle.
       Scoped under .site-nav--open so it outranks the base avatar rule that
       appears later in this file (equal specificity → source order loses). */
    .site-nav--open .site-nav__avatar {
        width: 100%;
        height: auto;
        border-radius: 8px;
        justify-content: flex-start;
        padding: 10px 8px;
        gap: 10px;
    }
    .site-nav--open .site-nav__avatar::after {
        content: "My profile";
        font-family: var(--font-sans);
        font-size: 16px;
        font-weight: 600;
        color: #fff;
        letter-spacing: normal;
    }
}

@media (max-width: 480px) {
    .hero__ctas            { flex-direction: column; }
    .stats-bar__inner      { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   AUTH PAGE  (Register / Sign in)
   ============================================================ */
.auth-page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 22px 64px;
    background: var(--parchment);
}

.auth-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 900px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(22,29,51,0.14);
}

/* --- Left panel ------------------------------------------- */
.auth-left {
    background: linear-gradient(160deg, var(--navy-mid) 0%, var(--navy) 100%);
    color: #fff;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.auth-left svg {
    margin-bottom: 24px;
}

.auth-left__h2 {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 14px;
    color: #fff;
}

.auth-left__body {
    font-size: 14px;
    line-height: 1.65;
    color: #CDD2E0;
    margin: 0 0 28px;
}

.auth-perks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-perk {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    color: #CDD2E0;
    line-height: 1.5;
}

.auth-perk__bullet {
    color: var(--gold);
    font-size: 11px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* --- Right panel ------------------------------------------ */
.auth-right {
    background: #fff;
    padding: 40px 40px 36px;
    display: flex;
    flex-direction: column;
}

/* --- Tab switcher ----------------------------------------- */
.auth-tabs {
    display: flex;
    border-bottom: 2px solid #E8E3DA;
    margin-bottom: 28px;
    gap: 0;
}

.auth-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 10px 20px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: color 0.15s, border-color 0.15s;
}

.auth-tab:hover { color: var(--navy); }

.auth-tab--active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* --- Panel visibility ------------------------------------- */
.auth-panel--hidden { display: none; }

/* --- Form elements ---------------------------------------- */
.auth-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.auth-label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 16px;
}

.auth-label__text {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.auth-req {
    color: var(--accent, #B22234);
    font-size: 11px;
    line-height: 1;
    vertical-align: middle;
}

.auth-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #D6D0C8;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--navy);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(178,34,52,0.1);
}

/* --- Submit & forgot -------------------------------------- */
.auth-submit {
    width: 100%;
    margin-top: 6px;
    padding: 11px 20px;
    font-size: 15px;
}

.auth-forgot {
    background: none;
    border: none;
    padding: 0;
    margin-top: 14px;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    display: block;
    text-align: center;
}

.auth-forgot:hover { color: var(--navy); }

/* --- Reset / confirmation states -------------------------- */
.auth-confirm__title {
    margin: 0 0 10px;
    font-family: var(--font-serif, var(--font-sans));
    font-size: 22px;
    color: var(--navy);
}

.auth-confirm {
    background: #F2EFE8;
    border: 1px solid #D6D0C8;
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 18px;
    color: #333;
}

.auth-confirm p { margin: 6px 0; }

.auth-confirm__hint {
    font-size: 13px;
    color: var(--muted);
}

/* --- Debug panel ------------------------------------------ */
.auth-debug {
    margin-top: 16px;
    border: 1px solid #D6D0C8;
    border-radius: 8px;
    font-size: 12px;
    overflow: hidden;
}
.auth-debug summary {
    padding: 8px 12px;
    background: #F2EFE8;
    font-weight: 600;
    color: var(--navy);
    cursor: pointer;
    user-select: none;
}
.auth-debug pre {
    margin: 0;
    padding: 12px;
    background: #FAFAF8;
    color: var(--body-text);
    font-size: 11.5px;
    line-height: 1.55;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* --- Error banner ----------------------------------------- */
.auth-error {
    background: #FFF0F0;
    border: 1px solid #F5C6CB;
    color: #8B1C2A;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13.5px;
    margin-bottom: 16px;
}

/* --- Disclaimers ------------------------------------------- */
.auth-disclaimer {
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.55;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #E8E3DA;
}

.auth-disclaimer2 {
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.55;
    margin-top: 1px;
    padding-top: 1px;
}

/* --- Responsive ------------------------------------------- */
@media (max-width: 720px) {
    .auth-card { grid-template-columns: 1fr; }
    .auth-left  { padding: 36px 28px; }
    .auth-right { padding: 32px 28px; }
    .auth-perks { display: none; }
}

@media (max-width: 480px) {
    .auth-page  { padding: 20px 14px 48px; align-items: flex-start; }
    .auth-left  { padding: 28px 20px; }
    .auth-right { padding: 24px 20px; }
    .auth-row-2 { grid-template-columns: 1fr; gap: 0; }
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dash-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 22px 72px;
}

/* --- Greeting --------------------------------------------- */
.dash-greeting {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.dash-greeting__logo { flex-shrink: 0; }
.dash-greeting__logo img {
    max-height: 84px;
    max-width: 160px;
    width: auto;
    height: auto;
    display: block;
}

.dash-greeting__kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}

.dash-greeting__h1 {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 6px;
}

.dash-greeting__meta {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
}

/* --- Progress banner -------------------------------------- */
.dash-banner {
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 100%);
    color: #fff;
    border-radius: 16px;
    padding: 26px 28px;
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 36px;
}

.dash-banner__ring-wrap { flex-shrink: 0; }

.dash-banner__info { flex: 1; min-width: 180px; }

.dash-banner__kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #C6CBDB;
    margin-bottom: 4px;
}

.dash-banner__earned {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 4px;
}

.dash-banner__sub {
    font-size: 13.5px;
    color: #C6CBDB;
}

.dash-banner__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.dash-banner__btn {
    padding: 10px 16px;
    font-size: 14px;
}

.dash-banner__btn--gold {
    background: var(--gold-dark) !important;
}
.dash-banner__btn--gold:hover { background: #8c6a31 !important; }

/* btn-ghost for dark background */
.btn-ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 9px;
    padding: 10px 16px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    transition: background 0.15s;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* --- Course grid ------------------------------------------ */
.dash-courses__h2 {
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 16px;
}

.dash-courses__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

/* --- Course card ------------------------------------------ */
.course-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    min-height: 220px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.course-card:not(.course-card--locked):hover {
    border-color: var(--gold-dark);
    box-shadow: 0 6px 20px rgba(22,29,51,0.07);
}

.course-card--locked {
    opacity: 0.72;
}

.course-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.course-card__no {
    font-family: var(--font-serif);
    font-size: 30px;
    color: var(--gold-dark);
    line-height: 1;
}

/* Status chips */
.course-card__status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
}

.course-card__status--open {
    background: #F0F4FF;
    color: #3050A0;
}
.course-card__status--open .course-card__dot { background: #3050A0; }

.course-card__status--progress {
    background: #FFF6E0;
    color: #8C6200;
}
.course-card__status--progress .course-card__dot { background: #C9A961; }

.course-card__status--done {
    background: #E8F5EC;
    color: #1F7A3A;
}
.course-card__status--done .course-card__dot { background: #2EAA54; }

.course-card__status--locked {
    background: #F2F2F2;
    color: #888;
}
.course-card__status--locked .course-card__dot { background: #BBBCBE; }

.course-card__status--failed {
    background: #FBEAEC;
    color: #8B1C2A;
}
.course-card__status--failed .course-card__dot { background: #B22234; }

.course-card__chip_track {
    background: var(--gold-dark);
    color: #fff;
}

.course-card__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.course-card__title {
    font-family: var(--font-serif);
    font-size: 17px;
    color: var(--navy);
    margin-bottom: 4px;
}

.course-card__track {
    font-family: var(--font-serif);
    font-size: 14px;
    color: var(--navy);
    margin-left: 0;
    margin-top: 4px;
    margin-bottom: 8px;
}

.course-card__req {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 6px;
}

.course-card__blurb {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.55;
    flex: 1;
    margin-bottom: 14px;
}

/* Progress bar */
.course-card__bar-wrap { margin-bottom: 14px; }

.course-card__bar-track {
    height: 6px;
    background: var(--parchment);
    border: 1px solid var(--parchment-border);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 6px;
}

.course-card__bar {
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
    transition: width 0.6s ease;
}

.course-card__bar-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--muted);
}

/* CTA buttons */
.course-card__cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 14px;
    border-radius: 9px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: var(--accent);
    color: #fff;
    transition: background 0.15s;
    text-decoration: none;
}
.course-card__cta:hover { background: var(--accent-dark); color: #fff; }

.course-card__cta--locked {
    background: #F2F2F2;
    color: #888;
    cursor: not-allowed;
    font-weight: 600;
    font-size: 13px;
}
.course-card__cta--locked:hover { background: #F2F2F2; color: #888; }

/* --- Responsive ------------------------------------------- */
@media (max-width: 640px) {
    .dash-banner { flex-direction: column; align-items: flex-start; }
    .dash-banner__actions { width: 100%; }
    .dash-banner__btn { flex: 1; text-align: center; }
}

@media (max-width: 480px) {
    .dash-page { padding: 24px 14px 56px; }
    .dash-greeting__h1 { font-size: 26px; }
    .dash-courses__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   COURSE VIEW
   ============================================================ */
.cv-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 30px 22px 72px;
}

/* Enroll banner â€” shown when user visits a course they haven't enrolled in */
.cv-enroll-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--parchment);
    border: 1px solid var(--parchment-border);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.cv-enroll-banner__h {
    font-weight: 700;
    font-size: 15px;
    color: var(--navy);
    margin-bottom: 4px;
}

.cv-enroll-banner__sub {
    font-size: 13.5px;
    color: var(--muted);
    margin: 0;
}

/* Course progress bar â€” shown on course page when enrolled */
.cv-progress-bar-wrap {
    margin-bottom: 24px;
}

.cv-progress-bar-track {
    height: 7px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 6px;
}

.cv-progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 99px;
    transition: width 0.4s ease;
}

.cv-progress-bar-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
}

/* Exam status â€” ready state */
.cv-exam-status--ready {
    background: #EBF7EF;
    border: 1px solid #A3D9B3;
    color: #1A6B35;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    margin: 16px 0;
}

/* Exam result banner (pass / fail) in the course exam pane */
.cv-exam-result {
    display: flex;
    align-items: center;
    gap: 14px;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 16px 0 20px;
}
.cv-exam-result--pass {
    background: #EBF7EF;
    border: 1px solid #A3D9B3;
    color: #1A6B35;
}
.cv-exam-result--fail {
    background: #FDF3F4;
    border: 1px solid #F5B8B8;
    color: #8B1A1A;
}
.cv-exam-result__icon {
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}
.cv-exam-result__label {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}
.cv-exam-result__score {
    font-size: 13px;
    opacity: 0.85;
}

/* Attempt history list in the course exam pane */
.cv-attempt-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}
.cv-attempt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    background: #fff;
}
.cv-attempt-row--pass { border-color: #A3D9B3; }
.cv-attempt-row--fail { border-color: #F5B8B8; }
.cv-attempt-row__left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cv-attempt-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.cv-attempt-dot--pass { background: #2a7a4b; color: #fff; }
.cv-attempt-dot--fail { background: var(--accent); color: #fff; }
.cv-attempt-row__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
}
.cv-attempt-row__date {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}
.cv-attempt-row__right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.cv-attempt-score {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 700;
    min-width: 52px;
    text-align: right;
}
.cv-attempt-score--pass { color: #2a7a4b; }
.cv-attempt-score--fail { color: var(--accent); }
.cv-attempt-detail {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}
.cv-attempt-review-btn {
    font-size: 12px;
    padding: 6px 12px;
    white-space: nowrap;
}

.cv-back {
    display: inline-block;
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 13.5px;
    font-family: var(--font-sans);
    padding: 0;
    margin-bottom: 18px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s;
}
.cv-back:hover { color: var(--accent-dark); }

/* --- Course header ---------------------------------------- */
.cv-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.cv-no {
    font-family: var(--font-serif);
    font-size: 34px;
    color: var(--gold-dark);
    line-height: 1;
    flex-shrink: 0;
}

.cv-kicker {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-bottom: 3px;
}

.cv-title {
    font-family: var(--font-serif);
    font-size: 28px;
    color: var(--navy);
    margin: 0;
    line-height: 1.2;
}

/* --- Two-column layout ------------------------------------ */
.cv-layout {
    display: grid;
    grid-template-columns: 284px 1fr;
    gap: 26px;
    align-items: start;
}

/* --- Sidebar ---------------------------------------------- */
.cv-sidebar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px;
    position: sticky;
    top: 76px;
}

.cv-sidebar__heading {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 8px 10px 6px;
}

.cv-mod-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: none;
    border: none;
    border-radius: 9px;
    padding: 9px 10px;
    cursor: pointer;
    font-family: var(--font-sans);
    text-align: left;
    transition: background 0.12s;
}
.cv-mod-btn:hover { background: var(--parchment); }
.cv-mod-btn--active { background: #FDF3F4; }

.cv-mod-left {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.cv-mod-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--parchment);
    border: 1.5px solid #D6D0C8;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s;
}
.cv-mod-dot--active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.cv-mod-dot--done {
    background: #2a7a4b;
    border-color: #2a7a4b;
    color: #fff;
    font-size: 13px;
}

.cv-mod-text {
    font-size: 13px;
    color: var(--navy);
    line-height: 1.4;
    word-break: break-word;
}
.cv-mod-btn--active .cv-mod-text { color: var(--accent); font-weight: 600; }

.cv-mod-duration {
    font-size: 11px;
    color: var(--muted);
    flex-shrink: 0;
    white-space: nowrap;
}

.cv-sidebar__divider {
    border-top: 1px solid var(--border);
    margin: 8px 0 6px;
}

.cv-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: none;
    border-radius: 9px;
    padding: 9px 10px;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: background 0.12s;
}
.cv-action-btn:hover { background: var(--parchment); }
.cv-action-btn--active { background: #FDF3F4; }

.cv-action-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    color: #fff;
}
.cv-action-dot--exam { background: var(--accent); }
.cv-action-dot--res  { background: var(--navy-mid); }

.cv-action-label {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--navy);
    flex: 1;
    text-align: left;
}
.cv-action-btn--active .cv-action-label { color: var(--accent); }

.cv-action-count {
    font-size: 11px;
    color: var(--muted);
}

/* --- Content panel ---------------------------------------- */
.cv-content {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 30px 34px;
    min-height: 500px;
}

.cv-pane--hidden { display: none; }

/* --- Video player mockup ---------------------------------- */
.cv-video {
    position: relative;
    width: 100%;
    padding-top: 52%;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--navy), var(--navy-mid));
    margin-bottom: 22px;
}

.cv-video__inner {
    position: absolute;
    inset: 0;
}

.cv-video__label {
    position: absolute;
    top: 14px;
    left: 16px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
}

.cv-video__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    transition: transform 0.15s, background 0.15s;
}
.cv-video__play:hover {
    transform: translate(-50%, -50%) scale(1.07);
    background: var(--accent-dark);
}

.cv-video__controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 16px;
    background: linear-gradient(0deg, rgba(11,15,28,0.88), transparent);
}

.cv-video__title {
    color: #fff;
    font-family: var(--font-serif);
    font-size: 15px;
    margin-bottom: 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cv-video__bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cv-video__time {
    color: #fff;
    font-size: 11.5px;
    flex-shrink: 0;
}

.cv-video__bar-track {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: rgba(255,255,255,0.25);
    overflow: hidden;
}

.cv-video__bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
    transition: width 0.3s;
}

.cv-video__fullscreen {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    margin-left: 4px;
    cursor: pointer;
}

/* Real HTML5 video element */
/* Book cover shown for modules with no video */
.cv-book {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.cv-book__cover {
    position: relative;
    width: min(42%, 200px);
    aspect-ratio: 3 / 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding: 16px 18px;
    background: linear-gradient(145deg, #2a3358 0%, #1b2340 100%);
    border: 1px solid rgba(201, 169, 97, 0.55);
    border-left: 6px solid var(--gold-dark, #A07C3A);
    border-radius: 4px 9px 9px 4px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.cv-book__spine {
    position: absolute;
    left: 5px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: rgba(201, 169, 97, 0.4);
    border-radius: 2px;
}
.cv-book__kicker {
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold, #C9A961);
    font-weight: 700;
}
.cv-book__title {
    font-family: var(--font-serif, Georgia, "Times New Roman", serif);
    color: #fff;
    font-size: clamp(13px, 1.5vw, 18px);
    line-height: 1.28;
    font-weight: 700;
    text-wrap: balance;
}
.cv-book__stars {
    color: var(--gold, #C9A961);
    font-size: 10px;
    letter-spacing: 3px;
}

.cv-video__player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    border-radius: 12px;
}

/* Placeholder shown when no video URL is available */
.cv-video__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.cv-video__placeholder-icon {
    font-size: 36px;
    color: rgba(255,255,255,0.18);
    margin-bottom: 4px;
}
.cv-video__placeholder .cv-video__title {
    text-align: center;
    padding: 0 24px;
}
.cv-video__placeholder .cv-video__bar-row {
    width: 100%;
    padding: 0 16px;
    position: absolute;
    bottom: 14px;
    left: 0;
}

/* Blurb line under the course header */
.cv-blurb {
    color: var(--muted);
    font-size: 14px;
    margin: -8px 0 20px;
    line-height: 1.5;
}

/* Inline link to the course book from a module */
.cv-book-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--accent);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
}
.cv-book-link:hover { text-decoration: underline; }

/* Empty state note */
.cv-empty-note {
    color: var(--muted);
    font-size: 14px;
    padding: 24px 0;
}

/* ============================================================
   EXAM PAGE
   ============================================================ */

.ex-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 32px 20px 80px;
}

/* --- Header ------------------------------------------------ */
.ex-header {
    margin-bottom: 32px;
}
.ex-header__meta {
    margin: 12px 0 20px;
}
.ex-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    background: var(--navy);
    color: #fff;
    border-radius: 4px;
    padding: 3px 8px;
    margin-bottom: 6px;
}
.ex-header__kicker {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 5px;
}
.ex-header__title {
    font-family: var(--font-serif);
    font-size: 26px;
    color: var(--navy);
    margin: 0;
}
.ex-header__stats {
    display: flex;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.ex-stat__val {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
}
.ex-stat__lbl {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 2px;
}

/* --- Retake notice ----------------------------------------- */
.ex-retake-notice {
    background: #FFF8E8;
    border: 1px solid #E8D080;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #7A5700;
    margin-bottom: 24px;
}

.ex-empty {
    color: var(--muted);
    font-size: 15px;
    padding: 40px 0;
    text-align: center;
}

/* --- Questions --------------------------------------------- */
.ex-questions {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-bottom: 32px;
}
.ex-question {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}
.ex-q-num {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ex-q-prompt {
    font-family: var(--font-serif);
    font-size: 17px;
    color: var(--navy);
    line-height: 1.45;
    margin-bottom: 18px;
}
.ex-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ex-choice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s;
}
.ex-choice:hover { border-color: var(--accent); background: #FDF3F4; }
.ex-choice:has(.ex-radio:checked) {
    border-color: var(--accent);
    background: #FDF3F4;
}
.ex-radio { display: none; }
.ex-choice__key {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--parchment);
    font-size: 12px;
    font-weight: 700;
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ex-choice:has(.ex-radio:checked) .ex-choice__key {
    background: var(--accent);
    color: #fff;
}
.ex-choice__text {
    font-size: 14px;
    color: var(--navy);
    line-height: 1.4;
    padding-top: 5px;
}

/* --- Submit area ------------------------------------------- */
.ex-submit-area {
    position: sticky;
    bottom: 24px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.10);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.ex-progress-wrap { flex: 1; }
.ex-progress-label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}
.ex-progress-track {
    height: 5px;
    border-radius: 999px;
    background: var(--parchment);
    overflow: hidden;
}
.ex-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
    transition: width 0.25s;
}
.ex-submit-btn {
    flex-shrink: 0;
    padding: 12px 28px;
    font-size: 15px;
}
.ex-submit-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* --- Result hero ------------------------------------------- */
.ex-result-hero {
    text-align: center;
    padding: 40px 24px 36px;
    border-radius: 16px;
    margin-bottom: 40px;
}
.ex-result-hero--pass {
    background: linear-gradient(135deg, #1A4731, #2a7a4b);
    color: #fff;
}
.ex-result-hero--fail {
    background: linear-gradient(135deg, var(--navy), #2a2f4a);
    color: #fff;
}
.ex-result-icon {
    font-size: 52px;
    margin-bottom: 10px;
    line-height: 1;
}
.ex-result-verdict {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
}
.ex-result-course {
    font-size: 13px;
    opacity: 0.75;
    margin-bottom: 28px;
}
.ex-score-row {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 28px;
}
.ex-score__pct {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}
.ex-score--pass .ex-score__pct { color: #A6F5C5; }
.ex-score--fail .ex-score__pct { color: #FF9090; }
.ex-score__lbl {
    font-size: 11px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 2px;
}
.ex-result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* --- Answer review ----------------------------------------- */
.ex-review-heading {
    font-family: var(--font-serif);
    font-size: 20px;
    color: var(--navy);
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.ex-questions--review .ex-question { padding: 20px 24px; }
.ex-question--correct { border-color: #A6D8B5; }
.ex-question--wrong   { border-color: #F5B8B8; }
.ex-review-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.ex-review-dot--correct { background: #2a7a4b; color: #fff; }
.ex-review-dot--wrong   { background: var(--accent); color: #fff; }

.ex-choices--review .ex-choice { cursor: default; pointer-events: none; }
.ex-choice--correct { border-color: #2a7a4b; background: #F0FBF4; }
.ex-choice--correct .ex-choice__key { background: #2a7a4b; color: #fff; }
.ex-choice--wrong   { border-color: var(--accent); background: #FDF3F4; }
.ex-choice--wrong .ex-choice__key   { background: var(--accent); color: #fff; }
.ex-choice--neutral { border-color: var(--border); background: #fff; opacity: 0.6; }
.ex-choice__tag {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #2a7a4b;
    padding: 2px 6px;
    border-radius: 4px;
    background: #E0F5E9;
}
.ex-choice__tag--wrong { color: var(--accent); background: #FDE8E8; }

.ex-explanation {
    margin-top: 14px;
    padding: 12px 14px;
    background: #F8F8F2;
    border-left: 3px solid var(--gold);
    border-radius: 0 6px 6px 0;
    font-size: 13.5px;
    color: var(--navy);
    line-height: 1.5;
}

/* --- Attempt history --------------------------------------- */
.ex-history {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.ex-history-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13.5px;
}
.ex-history-row--current { border-color: var(--navy); background: var(--parchment); }
.ex-history-num { font-weight: 600; color: var(--navy); min-width: 90px; }
.ex-history-score { flex: 1; }
.ex-history-score--pass { color: #2a7a4b; font-weight: 600; }
.ex-history-score--fail { color: var(--accent); font-weight: 600; }
.ex-history-detail { font-size: 12px; color: var(--muted); }
.ex-history-date { color: var(--muted); font-size: 12px; }

.ex-outline-light {
    border-color: rgba(255,255,255,0.45);
    color: #fff;
    background: transparent;
}
.ex-outline-light:hover { background: rgba(255,255,255,0.12); border-color: #fff; }

.ex-no-attempts {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

.ex-attempts-note {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    margin-top: 12px;
}

@media (max-width: 600px) {
    .ex-header__stats { gap: 16px; }
    .ex-score-row { gap: 20px; }
    .ex-submit-area { flex-direction: column; align-items: stretch; }
    .ex-submit-btn { width: 100%; text-align: center; }
    .ex-history-row { flex-wrap: wrap; gap: 4px; }
}

/* --- Module text content ---------------------------------- */
.cv-section-kicker {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-bottom: 6px;
}

.cv-section-h2 {
    font-family: var(--font-serif);
    font-size: 24px;
    color: var(--navy);
    margin: 0 0 16px;
    line-height: 1.25;
}

.cv-mod-body p { margin-top: 0; margin-bottom: 14px; }
.cv-mod-body h3 { font-family: var(--font-serif); color: var(--navy); margin: 20px 0 8px; font-size: 17px; }
.cv-mod-body ul, .cv-mod-body ol { padding-left: 22px; margin-bottom: 14px; }
.cv-mod-body li { margin-bottom: 5px; line-height: 1.55; }

/* ── End-of-module formative quiz ─────────────────────────── */
.cv-quiz { margin-top: 24px; padding: 18px 20px; border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: 10px; background: #FAFAF8; }
.cv-quiz__label { font-weight: 800; color: var(--navy); font-size: 14px; text-transform: uppercase; letter-spacing: .03em; }
.cv-quiz__hint { font-size: 12.5px; color: var(--muted); margin: 3px 0 14px; }
.cv-quiz__q { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #ECE8E1; }
.cv-quiz__prompt { font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.cv-quiz__choice { display: flex; align-items: flex-start; gap: 8px; padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; border: 1px solid transparent; }
.cv-quiz__choice:hover { background: #F0F0EC; }
.cv-quiz__choice input { margin-top: 3px; }
.cv-quiz__choice--right { background: #E8F5EC; border-color: #C6E4CF; }
.cv-quiz__choice--wrong { background: #FDECEC; border-color: #F3C9C9; }
.cv-quiz__explain { margin-top: 8px; font-size: 13px; color: #555; background: #F2EFE8; border-left: 3px solid var(--gold-dark); padding: 8px 11px; border-radius: 4px; }
.cv-quiz__actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.cv-quiz__result { font-weight: 800; color: var(--navy); }

.cv-section-body {
    color: var(--body-text);
    font-size: 15.5px;
    line-height: 1.72;
}
.cv-section-body p { margin-top: 0; }

.cv-callout {
    background: var(--parchment);
    border: 1px solid var(--parchment-border);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 14px 18px;
    margin: 20px 0;
    font-size: 14.5px;
    color: var(--navy);
    line-height: 1.6;
}

.cv-mod-content--hidden { display: none; }

/* --- Pane navigation -------------------------------------- */
.cv-pane-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.cv-nav-prev {
    background: #fff;
    color: var(--navy);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 10px 16px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.15s;
    text-decoration: none;
    display: inline-block;
}
.cv-nav-prev:hover { border-color: var(--navy-mid); color: var(--navy); }

.cv-nav-next {
    padding: 10px 18px;
    font-size: 14px;
}

/* --- Exam pane -------------------------------------------- */
.cv-exam-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.cv-exam-badge {
    background: var(--parchment);
    border: 1px solid var(--parchment-border);
    color: var(--navy);
    font-size: 12.5px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
}

.cv-exam-status {
    background: #F0F4FF;
    border: 1px solid #C8D4F8;
    border-radius: 9px;
    padding: 12px 16px;
    font-size: 14px;
    color: #2A3E8C;
    margin-bottom: 22px;
    line-height: 1.55;
}

.cv-exam-qlabel {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.cv-exam-q {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 14px;
    line-height: 1.45;
}

.cv-exam-qnum {
    font-family: var(--font-serif);
    color: var(--gold-dark);
    margin-right: 8px;
}

.cv-exam-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 14.5px;
    color: var(--body-text);
    transition: border-color 0.12s, background 0.12s;
}
.cv-exam-option:hover { border-color: var(--accent); background: #FDF3F4; }

.cv-exam-radio {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid var(--muted);
    flex-shrink: 0;
}

/* --- Resources pane --------------------------------------- */
.cv-res-book {
    display: flex;
    gap: 16px;
    align-items: center;
    background: var(--parchment);
    border: 1px solid var(--parchment-border);
    border-left: 3px solid var(--accent);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.cv-res-icon {
    width: 48px;
    height: 48px;
    border-radius: 9px;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
    text-align: center;
}
.cv-res-icon--pdf { background: var(--accent); }

.cv-res-book-body { flex: 1; min-width: 160px; }

.cv-res-book-kicker {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 3px;
}

.cv-res-book-title {
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--navy);
    margin-bottom: 3px;
}

.cv-res-book-meta { font-size: 13px; color: var(--muted); }

.cv-res-book-btn { flex-shrink: 0; }

.cv-res-section-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.cv-res-item {
    display: flex;
    gap: 14px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
}

.cv-res-item-body {
    flex: 1;
    min-width: 0;
}

.cv-res-item-title {
    font-weight: 700;
    color: var(--navy);
    font-size: 14.5px;
    margin-bottom: 2px;
}

.cv-res-item-meta { font-size: 12px; color: var(--muted); }

.cv-res-item-btn { flex-shrink: 0; }

/* --- Responsive ------------------------------------------- */
@media (max-width: 860px) {
    .cv-layout { grid-template-columns: 1fr; }
    .cv-sidebar { position: static; }
    .cv-content { padding: 22px 20px; }
}

@media (max-width: 540px) {
    .cv-page   { padding: 20px 14px 56px; }
    .cv-title  { font-size: 22px; }
    .cv-section-h2 { font-size: 20px; }
    .cv-pane-nav { flex-direction: column-reverse; }
    .cv-pane-nav button, .cv-pane-nav a { width: 100%; text-align: center; }
    .cv-res-book { flex-direction: column; }
}

/* ============================================================
   CERTIFICATES PAGE
   ============================================================ */
.certs-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 36px 22px 72px;
}

/* --- Page header ------------------------------------------ */
.certs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.certs-header__kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 4px;
}

.certs-header__h1 {
    font-family: var(--font-serif);
    font-size: 28px;
    color: var(--navy);
    margin: 0;
}

/* --- Course tab row --------------------------------------- */
.certs-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.cert-tab {
    flex: 1;
    min-width: 180px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.cert-tab:hover {
    border-color: var(--gold-dark);
    box-shadow: 0 4px 14px rgba(22,29,51,0.06);
}
.cert-tab--active {
    border-color: var(--navy);
    box-shadow: 0 4px 14px rgba(22,29,51,0.1);
}

.cert-tab__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.cert-tab__no {
    font-family: var(--font-serif);
    font-size: 22px;
    color: var(--gold-dark);
}

.cert-tab__icon { font-size: 15px; }

.cert-tab__title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.35;
    margin-bottom: 4px;
}

.cert-tab__status {
    font-size: 11.5px;
    font-weight: 600;
}
.cert-tab__status--locked  { color: var(--muted); }
.cert-tab__status--earned  { color: #1F7A3A; }

/* --- Panel visibility ------------------------------------- */
.cert-panel--hidden { display: none; }

/* --- Locked state ----------------------------------------- */
.cert-locked {
    background: #fff;
    border: 1.5px dashed var(--parchment-border);
    border-radius: 14px;
    padding: 52px 32px;
    text-align: center;
}

.cert-locked__icon {
    font-size: 32px;
    margin-bottom: 12px;
    line-height: 1;
}

.cert-locked__h {
    font-family: var(--font-serif);
    font-size: 20px;
    color: var(--navy);
    margin-bottom: 10px;
}

.cert-locked__body {
    color: var(--muted);
    font-size: 14.5px;
    max-width: 420px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

/* --- Earned state: actions bar ---------------------------- */
.cert-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 16px;
}

/* --- Earned state: certificate document ------------------- */
.cert-doc {
    background: var(--parchment);
    border: 1px solid var(--parchment-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(22,29,51,0.1);
}

.cert-doc__stripe {
    height: 6px;
    display: flex;
}
.cert-doc__stripe::before  { content:''; flex:1; background: var(--navy-mid); }
.cert-doc__stripe::after   { content:''; flex:1; background: var(--accent); }
.cert-doc__stripe > *      { flex:1; }

.cert-doc__body {
    padding: 36px 44px 32px;
    text-align: center;
}

.cert-doc__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 28px;
}

.cert-doc__org {
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--navy);
    text-align: left;
}

.cert-doc__county {
    font-size: 12.5px;
    color: var(--muted);
    text-align: left;
    margin-top: 2px;
}

.cert-doc__stars {
    color: var(--gold);
    font-size: 13px;
    letter-spacing: 0.5em;
    margin-bottom: 8px;
}

.cert-doc__label {
    font-family: var(--font-serif);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--navy);
    margin-bottom: 22px;
}

.cert-doc__certifies {
    font-size: 14px;
    color: var(--muted);
    font-style: italic;
    margin-bottom: 10px;
}

.cert-doc__name {
    font-family: var(--font-serif);
    font-size: 32px;
    color: var(--navy);
    font-style: italic;
    line-height: 1.1;
}

.cert-doc__name-rule {
    width: 280px;
    height: 1px;
    background: var(--navy);
    opacity: 0.3;
    margin: 8px auto 6px;
}

.cert-doc__role {
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 20px;
}

.cert-doc__completed-text {
    font-size: 14px;
    color: var(--body-text);
    margin-bottom: 12px;
}

.cert-doc__course-no {
    font-family: var(--font-serif);
    font-size: 15px;
    color: var(--gold-dark);
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.cert-doc__course-title {
    font-family: var(--font-serif);
    font-size: 24px;
    color: var(--navy);
    font-weight: 700;
    margin-bottom: 26px;
}

.cert-doc__meta-grid {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    background: rgba(22,29,51,0.04);
    border: 1px solid var(--parchment-border);
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 28px;
    text-align: left;
}

.cert-doc__meta-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
}

.cert-doc__meta-val {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--navy);
}
.cert-doc__meta-val--mono {
    font-family: monospace;
    font-size: 13px;
}

.cert-doc__sigs {
    display: flex;
    justify-content: center;
    gap: 52px;
    flex-wrap: wrap;
}

.cert-doc__sig { min-width: 160px; text-align: center; }

/* Preferred signature font — self-hosted for print fidelity. If the file isn't
   present, the cursive fallback stack below still renders a handwritten look. */
@font-face {
    font-family: "Great Vibes";
    src: url("/fonts/GreatVibes-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Simulated (stylized) signature that rests on the signature line. min-height keeps
   the line in the same place whether or not a name is present. */
.cert-doc__sig-signature {
    font-family: "Great Vibes", "Segoe Script", "Brush Script MT", "Lucida Handwriting", cursive;
    font-size: 17px;
    line-height: 1;
    color: var(--navy);
    min-height: 36px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    white-space: nowrap;
    margin-bottom: 2px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.cert-doc__sig-line {
    width: 100%;
    height: 1px;
    background: var(--navy);
    opacity: 0.3;
    margin-bottom: 7px;
}

.cert-doc__sig-name {
    font-size: 12px;
    color: var(--navy);
    font-weight: 700;
    line-height: 1.4;
}
.cert-doc__sig-name span {
    display: block;
    font-weight: 400;
    color: var(--muted);
    font-size: 11px;
}

/* Gold stripe for cert top/bottom */
.cert-doc__stripe {
    height: 6px;
    background: linear-gradient(90deg, var(--navy) 33.3%, #fff 33.3% 66.6%, var(--accent) 66.6%);
}

.cert-verify {
    text-align: center;
    color: var(--muted);
    font-size: 12.5px;
    margin-top: 18px;
}

/* --- Responsive ------------------------------------------- */
@media (max-width: 700px) {
    .certs-tabs   { flex-direction: column; }
    .cert-tab     { min-width: unset; }
    .cert-doc__body { padding: 24px 20px; }
    .cert-doc__name { font-size: 24px; }
    .cert-doc__sigs { gap: 24px; }
    .cert-actions { justify-content: stretch; }
    .cert-actions button { flex: 1; }
}

@media (max-width: 480px) {
    .certs-page { padding: 24px 14px 56px; }
    .cert-doc__meta-grid { gap: 16px; }
}

/* ============================================================
   VERIFY PAGE
   ============================================================ */
.verify-page {
    max-width: 680px;
    margin: 0 auto;
    padding: 48px 22px 80px;
    text-align: center;
}

.verify-header { margin-bottom: 32px; }

.verify-header__kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}

.verify-header__h1 {
    font-family: var(--font-serif);
    font-size: 32px;
    color: var(--navy);
    margin: 0 0 10px;
}

.verify-header__sub {
    color: var(--muted);
    font-size: 15px;
    margin: 0;
}

/* Search card */
.verify-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 36px;
    text-align: left;
}

/* Search type tabs */
.verify-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.verify-tab {
    flex: 1;
    padding: 13px 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-sans);
    color: var(--muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    text-align: center;
}

.verify-tab:hover { color: var(--navy); }

.verify-tab--active {
    color: var(--navy);
    border-bottom-color: var(--accent);
    background: #fff;
}

/* Form */
.verify-form {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.verify-field { display: flex; flex-direction: column; gap: 6px; }

.verify-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--navy);
}

.verify-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14.5px;
    font-family: var(--font-sans);
    color: var(--body-text);
    background: var(--surface);
    border: 1px solid var(--parchment-border);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s;
}

.verify-input:focus { border-color: var(--navy); background: #fff; }

.verify-select { appearance: none; cursor: pointer; }

.verify-hint {
    font-size: 12px;
    color: var(--muted);
}

.verify-btn {
    align-self: center;
    padding: 11px 36px;
    font-size: 14px;
}

/* Verified badge */
.verify-result--valid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #EBF7EF;
    border: 1px solid #A3D9B3;
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 24px;
    color: #1A6B35;
    font-weight: 700;
    font-size: 15px;
}

.verify-result__check {
    font-size: 20px;
    color: #1F7A3A;
}

/* Not-found state */
.verify-result--not-found {
    text-align: center;
    padding: 36px 24px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.verify-result--not-found .verify-result__icon { font-size: 32px; color: var(--accent); margin-bottom: 10px; }
.verify-result--not-found .verify-result__h { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.verify-result--not-found .verify-result__body { color: var(--muted); font-size: 14px; margin: 0; }

/* Revoked state */
.verify-result--revoked {
    text-align: center;
    padding: 36px 24px;
    background: #FFF8F0;
    border: 1px solid #F0C070;
    border-radius: 10px;
}

.verify-result--revoked .verify-result__icon { font-size: 32px; color: #C07000; margin-bottom: 10px; }
.verify-result--revoked .verify-result__h { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.verify-result--revoked .verify-result__body { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

.verify-result__meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.verify-result__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-right: 8px;
}

.verify-result__val { font-size: 13.5px; color: var(--navy); }

.verify-mono { font-family: 'Courier New', monospace; font-size: 12.5px; }

/* Multi-result list */
.verify-results-list { text-align: left; }

.verify-results-count {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
    text-align: center;
}

.verify-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 10px;
}

.verify-row--revoked { opacity: 0.75; border-color: #F0C070; background: #FFF8F0; }

.verify-row__name { font-weight: 700; font-size: 15px; color: var(--navy); margin-bottom: 2px; }
.verify-row__course { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.verify-row__id { font-size: 11.5px; color: var(--muted); }

.verify-row__right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.verify-row__date { font-size: 13px; color: var(--muted); }

.verify-row__badge {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.verify-row__badge--valid   { background: #EBF7EF; color: #1A6B35; }
.verify-row__badge--revoked { background: #FFF0D0; color: #8C5500; }

/* cert-doc on verify page gets centered */
.cert-doc--verify { margin: 0 auto; }

@media (max-width: 600px) {
    .verify-page { padding: 28px 14px 60px; }
    .verify-header__h1 { font-size: 26px; }
    .verify-tabs { flex-direction: column; }
    .verify-tab { border-bottom: 1px solid var(--border); border-right: none; }
    .verify-tab--active { border-bottom-color: var(--border); border-left: 3px solid var(--accent); }
    .verify-row { flex-direction: column; gap: 10px; }
    .verify-row__right { align-items: flex-start; flex-direction: row; }
}

/* ============================================================
   TRANSCRIPT PAGE
   ============================================================ */
.tr-page {
    max-width: 920px;
    margin: 0 auto;
    padding: 36px 22px 72px;
}

/* --- Top action bar --------------------------------------- */
.tr-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.tr-topbar__actions {
    display: flex;
    gap: 10px;
}

/* --- Document card ---------------------------------------- */
.tr-doc {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 34px rgba(22,29,51,0.08);
}

/* --- Dark header ------------------------------------------ */
.tr-doc__header {
    background: var(--navy);
    color: #fff;
    padding: 22px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.tr-doc__header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tr-doc__title {
    font-family: var(--font-serif);
    font-size: 20px;
    margin-bottom: 3px;
}

.tr-doc__org {
    font-size: 12px;
    color: #C6CBDB;
    letter-spacing: 0.04em;
}

.tr-doc__header-right {
    text-align: right;
    font-size: 11.5px;
    color: #C6CBDB;
    line-height: 1.7;
}

/* --- Facts grid ------------------------------------------- */
.tr-facts {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.tr-fact__label {
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 3px;
}

.tr-fact__value {
    font-size: 14.5px;
    color: var(--navy);
    font-weight: 600;
}

/* --- Course table ----------------------------------------- */
.tr-table-wrap {
    padding: 0 30px 6px;
    overflow-x: auto;
}

.tr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.tr-th {
    padding: 12px 8px;
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
}
.tr-th--center { text-align: center; }
.tr-th--right  { text-align: right; }

.tr-row { border-top: 1px solid var(--border); }
.tr-row:hover { background: #FDFCFA; }

.tr-td {
    padding: 13px 8px;
    vertical-align: top;
}
.tr-td--center { text-align: center; }
.tr-td--right  { text-align: right; }
.tr-td--muted  { color: var(--muted); }

.tr-td__no {
    font-family: var(--font-serif);
    color: var(--gold-dark);
    font-size: 16px;
    white-space: nowrap;
}

.tr-td__title {
    color: var(--navy);
    font-weight: 600;
    margin-bottom: 2px;
}

.tr-td__tag {
    font-size: 11.5px;
    color: var(--muted);
}

/* Exam score chips */
.tr-exam-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
}

.tr-exam-chip--pending {
    color: var(--muted);
}

.tr-exam-chip--locked {
    background: #F2F2F2;
    color: #999;
}

.tr-exam-chip--pass {
    background: #E8F5EC;
    color: #1F7A3A;
}

.tr-exam-chip--fail {
    background: #FFF0F0;
    color: #8B1C2A;
}

/* Attempt list inside a table cell */
.tr-attempts {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.tr-attempt-entry {
    display: flex;
    align-items: center;
    gap: 7px;
    justify-content: center;
    flex-wrap: wrap;
}
.tr-attempt-meta {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}
.tr-pass-label { color: #1F7A3A; font-weight: 700; }
.tr-fail-label { color: #8B1C2A; font-weight: 700; align-items: center; }

/* Certificate chips */
.tr-cert-chip {
    font-size: 13px;
}
.tr-cert-chip--none { color: var(--muted); }
.tr-cert-chip--earned {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

/* --- Summary bar ------------------------------------------ */
.tr-summary {
    padding: 18px 30px;
    border-top: 2px solid var(--navy);
    background: var(--parchment);
}

.tr-summary__stats {
    display: flex;
    gap: 36px;
    flex-wrap: wrap;
}

.tr-stat__label {
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 2px;
}

.tr-stat__value {
    font-family: var(--font-serif);
    font-size: 20px;
    color: var(--navy);
}

/* --- Footer note + sig ------------------------------------ */
.tr-footer {
    padding: 20px 30px 26px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.tr-footer__note {
    font-size: 11px;
    color: var(--muted);
    max-width: 400px;
    line-height: 1.6;
    margin: 0;
}

.tr-footer__sig {
    text-align: center;
    flex-shrink: 0;
}

.tr-footer__sig-name {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 17px;
    color: var(--navy);
    margin-bottom: 6px;
}

.tr-footer__sig-rule {
    width: 100%;
    height: 1px;
    background: var(--navy);
    margin-bottom: 5px;
}

.tr-footer__sig-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 0.04em;
}

/* --- Responsive ------------------------------------------- */
@media (max-width: 640px) {
    .tr-doc__header    { flex-direction: column; align-items: flex-start; }
    .tr-doc__header-right { text-align: left; }
    .tr-facts          { grid-template-columns: 1fr 1fr; }
    .tr-table-wrap     { padding: 0 16px 6px; }
    .tr-summary__stats { gap: 20px; }
    .tr-footer         { flex-direction: column; }
    .tr-footer__sig    { align-self: flex-start; }
}

@media (max-width: 480px) {
    .tr-page           { padding: 20px 14px 56px; }
    .tr-doc__header    { padding: 18px 16px; }
    .tr-facts          { padding: 16px; grid-template-columns: 1fr 1fr; }
    .tr-summary        { padding: 14px 16px; }
    .tr-footer         { padding: 16px; }
    .tr-topbar__actions button { font-size: 13px; padding: 9px 12px; }
}

/* ============================================================
   NAV AVATAR BUTTON
   ============================================================ */
.site-nav__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--navy-mid);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    transition: box-shadow 0.15s, opacity 0.15s;
}
.site-nav__avatar:hover {
    opacity: 0.88;
    box-shadow: 0 0 0 2px var(--gold);
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.prof-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 44px 22px 80px;
}

/* Hero row */
.prof-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.prof-initials {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--navy-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    user-select: none;
}

.prof-hero-name {
    font-family: var(--font-serif);
    font-size: 22px;
    color: var(--navy);
    margin: 0 0 6px;
    line-height: 1.2;
}

.prof-hero-meta {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
}

.prof-hero-sep { color: var(--parchment-border); }

/* Banners */
.prof-success {
    background: #EFF7F1;
    border: 1px solid #86C997;
    color: #1A5E32;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

.prof-error {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #991B1B;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

/* Verified-chair badge (under the name on the profile hero) */
.prof-verified {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #FBF3DA;
    border: 1px solid #E4D2A0;
    color: #8A6D1F;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.prof-verified__star { color: var(--gold-dark, #C9A961); font-size: 13px; line-height: 1; }

/* Verify-me banner (unverified users) */
.prof-verify-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: #FBF7EC;
    border: 1px solid #E4D8B8;
    border-left: 4px solid var(--gold-dark, #C9A961);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
}
.prof-verify-banner__title { font-weight: 700; color: var(--navy, #232C54); }
.prof-verify-banner__sub { font-size: 13px; color: var(--muted, #666); margin-top: 2px; }

/* Form sections */
.prof-section { margin-bottom: 30px; }

.prof-section--locked { margin-top: 40px; }

.prof-section-title {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.prof-optional {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
}

/* Actions */
.prof-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

/* Locked / read-only fields */
.prof-locked-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.prof-locked {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
}

.prof-locked__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 3px;
}

.prof-locked__value {
    font-size: 14.5px;
    color: var(--body-text);
    font-weight: 500;
}

.prof-locked__note {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}

@media (max-width: 520px) {
    .prof-hero               { flex-direction: column; align-items: flex-start; gap: 14px; }
    .prof-locked-row         { grid-template-columns: 1fr; }
}

/* ============================================================
   ADMIN PORTAL
   ============================================================ */

.site-nav__link--admin {
    background: var(--accent);
    color: #fff !important;
    border-radius: 6px;
    padding: 4px 12px;
    font-weight: 600;
}
.site-nav__link--admin:hover { background: #8f1a25; }

/* Page shell */
.adm-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

/* Top bar */
.adm-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.adm-topbar-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.adm-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.adm-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
}

.rpt-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}
.rpt-stat {
    background: #fff;
    border: 1px solid #E2E5EC;
    border-radius: 10px;
    padding: 16px 18px;
    text-align: center;
}
.rpt-stat__val { font-size: 28px; font-weight: 800; color: var(--navy, #232C54); line-height: 1.1; }
.rpt-stat__lbl { font-size: 12px; color: var(--muted, #667); margin-top: 4px; text-transform: uppercase; letter-spacing: .3px; }
.rpt-stat__delta { font-size: 11px; color: var(--muted, #667); margin-top: 4px; font-weight: 600; }

/* ============================================================
   COUNTY INSIGHTS — patriotic infographic styling
   ============================================================ */
.ci-hero {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #161D33 0%, #232C54 62%, #2B3568 100%);
    color: #fff;
    margin-bottom: 18px;
    box-shadow: 0 10px 34px rgba(22, 29, 51, 0.25);
}
.ci-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.22; pointer-events: none; }
.ci-hero__main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px;
    flex-wrap: wrap;
}
.ci-hero__id { display: flex; align-items: center; gap: 16px; }
.ci-hero__kicker { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.ci-hero__title { font-family: var(--font-serif); font-size: 27px; margin: 5px 0; color: #fff; line-height: 1.1; }
.ci-hero__sub { font-size: 13px; color: rgba(255, 255, 255, 0.72); }
.ci-hero__rings { display: flex; gap: 20px; flex-wrap: wrap; }
.ci-ring-wrap { text-align: center; min-width: 104px; }
.ci-ring { width: 104px; height: 104px; display: block; margin: 0 auto; }
.ci-ring__pct { fill: #fff; font-size: 25px; font-weight: 800; font-family: var(--font-sans); }
.ci-ring-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255, 255, 255, 0.85); margin-top: 6px; font-weight: 700; }
.ci-ring-sub { font-size: 10.5px; color: rgba(255, 255, 255, 0.55); margin-top: 1px; }

.ci-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ci-controls__right { display: flex; gap: 8px; align-items: center; }

.ci-sec { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; }
.ci-sec__icon { width: 24px; height: 24px; flex-shrink: 0; color: var(--accent); }
.ci-sec__title { font-size: 15px; font-weight: 800; color: var(--navy); }
.ci-sec__hint { font-size: 12px; color: var(--muted); font-weight: 500; }

/* Upgrade every stat tile + card on the insights page (scoped so admin is untouched). */
.ci-page .rpt-stat {
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold);
    border-radius: 12px;
    text-align: left;
    transition: box-shadow 0.15s, transform 0.1s;
}
.ci-page .rpt-stat:hover { box-shadow: 0 5px 18px rgba(0, 0, 0, 0.07); transform: translateY(-1px); }
.ci-page .rpt-stat__lbl { text-transform: uppercase; }
.ci-page .adm-card { border-radius: 12px; }

/* ── Election-infographic layout (Arapahoe-style) ─────────── */
.ci-frame { border: 3px solid #2E7D32; border-radius: 16px; padding: 18px 22px 24px; background: #fff; }

.ci-masthead { text-align: center; padding: 4px 0 14px; }
.ci-masthead__stars { color: var(--gold); letter-spacing: 10px; font-size: 13px; }
.ci-masthead__title { font-family: var(--font-serif); font-weight: 800; font-size: 38px; letter-spacing: 0.05em; color: var(--navy); margin: 6px 0 2px; }
.ci-masthead__title .accent { color: var(--accent); }
.ci-masthead__sub { font-size: 15px; font-weight: 700; color: var(--navy); }

.ci-panel { background: #EEF1F8; border: 1px solid #DFE3EE; border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.ci-panel__head { background: var(--navy); color: #fff; text-align: center; font-weight: 700; font-size: 13px; padding: 9px 14px; letter-spacing: 0.04em; text-transform: uppercase; }
.ci-panel__body { padding: 18px; }

.ci-band { text-align: center; font-family: var(--font-serif); font-weight: 800; font-size: 21px; color: var(--navy); margin: 22px 0 12px; }
.ci-band__hint { font-family: var(--font-sans); font-size: 12px; font-weight: 600; color: var(--muted); }

.ci-cov { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.ci-cov__label { font-size: 12px; color: var(--muted); }
.ci-cov__big { font-size: 34px; font-weight: 800; color: var(--navy); line-height: 1; }
.ci-cov__sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

.ci-stat { display: flex; align-items: center; gap: 13px; }
.ci-stat__icon { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ci-stat__icon svg { width: 26px; height: 26px; }
.ci-stat__icon--navy { background: var(--navy); color: #fff; }
.ci-stat__icon--red  { background: var(--accent); color: #fff; }
.ci-stat__icon--gold { background: var(--gold-dark); color: #fff; }
.ci-stat__num { font-size: 25px; font-weight: 800; color: var(--navy); line-height: 1; }
.ci-stat__lbl { font-size: 12px; color: #444; margin-top: 3px; }
.ci-stat__delta { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }
a.ci-stat--link { text-decoration: none; color: inherit; cursor: pointer; border-radius: 10px; padding: 6px; margin: -6px; transition: background 0.15s; }
a.ci-stat--link:hover { background: rgba(255, 255, 255, 0.65); }
a.ci-stat--link:hover .ci-stat__lbl { color: var(--accent); }

.ci-grid { display: grid; gap: 14px; }
.ci-grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.ci-grid--4 { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }

.ci-bars { display: flex; align-items: flex-end; gap: 10px; min-height: 210px; padding-top: 6px; overflow-x: auto; }
.ci-bar { flex: 1 0 46px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.ci-bar__cap { font-size: 12px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.ci-bar__fill { width: 72%; max-width: 48px; border-radius: 4px 4px 0 0; min-height: 3px; }
.ci-bar__label { font-size: 11px; color: #444; margin-top: 6px; text-align: center; word-break: break-word; }

/* Clickable stat tiles (drill-down to a list) */
a.rpt-stat {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .1s;
}
a.rpt-stat:hover {
    border-color: var(--gold-dark, #A07C3A);
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
}
a.rpt-stat:hover .rpt-stat__lbl { color: var(--gold-dark, #A07C3A); }

.rpt-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.rpt-chip {
    font-size: 12px;
    padding: 3px 12px;
    border-radius: 20px;
    background: #F1EFE8;
    color: #5F5E5A;
    text-decoration: none;
    border: 1px solid transparent;
}
.rpt-chip--active {
    background: var(--navy, #232C54);
    color: #fff;
}

/* ── Dashboard "Recommended reading" book ad ─────────────── */
.dash-book { margin-top: 36px; }

.dash-book__heading {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--navy, #232C54);
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 14px;
}

.dash-book__card {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    background: #FBF3E8;
    border: 1px solid #E7DBC8;
    border-left: 5px solid var(--accent, #B22234);
    border-radius: 12px;
    padding: 20px 24px;
}

.dash-book__cover { flex-shrink: 0; width: 120px; }
.dash-book__cover img { width: 100%; border-radius: 4px; display: block; }

.dash-book__cover-ph {
    width: 120px;
    height: 168px;
    border: 1px dashed #C6B79A;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 13px;
    color: #8A7A5C;
    background: #fff;
}

.dash-book__label {
    color: var(--accent, #B22234);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.dash-book__title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    color: var(--navy, #232C54);
    line-height: 1.2;
}

.dash-book__author { color: #3050A0; font-size: 14px; margin-top: 2px; }

.dash-book__blurb {
    color: #444;
    font-size: 14px;
    line-height: 1.6;
    margin: 10px 0 16px;
    max-width: 60ch;
}

.dash-book__actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dash-book__price { font-size: 15px; font-weight: 600; color: var(--navy, #232C54); }

@media (max-width: 640px) {
    .dash-book__card { flex-direction: column; }
    .dash-book__cover, .dash-book__cover-ph { width: 100%; max-width: 160px; }
}

/* ── Legal pages (Privacy, Terms) ────────────────────────── */
.legal-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 24px 64px;
    color: #2b2b2b;
    line-height: 1.7;
}
.legal-page h1 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--navy, #232C54);
    font-size: 30px;
    margin: 0 0 6px;
}
.legal-page__meta { color: var(--muted, #6b6b6b); font-size: 13px; margin-bottom: 28px; }
.legal-page h2 {
    color: var(--navy, #232C54);
    font-size: 19px;
    margin: 30px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e6e2d8;
}
.legal-page p, .legal-page li { font-size: 15px; }
.legal-page ul { padding-left: 22px; margin: 8px 0 14px; }
.legal-page li { margin-bottom: 6px; }
.legal-page a { color: var(--accent, #B22234); }
.legal-page__note {
    background: #FBF3E8;
    border: 1px solid #E7DBC8;
    border-left: 4px solid var(--accent, #B22234);
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 14px;
    margin: 22px 0;
}

/* ── Busy overlay (shown while a form is submitting) ──────── */
.busy-overlay {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(22,29,51,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.busy-overlay--on { display: flex; }
.busy-overlay__box {
    background: #fff;
    border-radius: 12px;
    border-top: 4px solid var(--accent, #B22234);
    padding: 28px 44px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.32);
}
.busy-overlay__glass {
    font-size: 42px;
    line-height: 1;
    display: block;
    animation: busy-flip 1.8s ease-in-out infinite;
}
@keyframes busy-flip {
    0%, 60%   { transform: rotate(0deg); }
    80%, 100% { transform: rotate(180deg); }
}
.busy-overlay__text {
    margin-top: 14px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--navy, #232C54);
    letter-spacing: 0.02em;
}
@media (prefers-reduced-motion: reduce) {
    .busy-overlay__glass { animation: none; }
}

/* ── Home contact CTA band ────────────────────────────────── */
.home-contact {
    background: linear-gradient(160deg, var(--navy-mid) 0%, var(--navy) 100%);
    padding: 56px 24px 60px;
    text-align: center;
}
.home-contact__inner { max-width: 640px; margin: 0 auto; }
.home-contact__h2 {
    font-family: Georgia, "Times New Roman", serif;
    color: #fff;
    font-size: 28px;
    margin: 8px 0 12px;
}
.home-contact__body {
    color: rgba(255,255,255,0.82);
    font-size: 15.5px;
    line-height: 1.6;
    margin: 0 auto 26px;
    max-width: 560px;
}

/* ── Contact page ─────────────────────────────────────────── */
.contact-form { margin-top: 10px; }
.contact-form textarea.auth-input { min-height: 150px; resize: vertical; line-height: 1.55; }
.contact-cat-desc {
    font-size: 12.5px;
    color: var(--muted, #6b6b6b);
    margin: -8px 0 16px;
    min-height: 16px;
}
.contact-success {
    background: #EEF6EE;
    border: 1px solid #CDE5CD;
    border-left: 4px solid #2E7D32;
    border-radius: 8px;
    padding: 18px 20px;
    color: #22331f;
}
.contact-success__title {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--navy, #232C54);
    font-size: 20px;
    margin: 0 0 8px;
}
.contact-success p { margin: 6px 0; }
.contact-success a { color: var(--accent, #B22234); }
.adm-breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.adm-breadcrumb a { color: var(--navy); text-decoration: none; }
.adm-breadcrumb a:hover { text-decoration: underline; }
.adm-title { font-size: 24px; font-weight: 700; color: var(--navy); margin: 0; }
.adm-empty { padding: 48px; text-align: center; color: var(--muted); background: var(--parchment); border-radius: 12px; }

/* Table */
.adm-table-wrap { overflow-x: auto; border-radius: 12px; box-shadow: 0 1px 6px rgba(0,0,0,.07); }
.adm-table  { width: 100%; border-collapse: collapse; background: #fff; }
.adm-th     { padding: 10px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase;
              letter-spacing: .04em; color: var(--muted); background: var(--parchment);
              border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.adm-th--center { text-align: center; }
.adm-th--right  { text-align: right; }
.adm-row    { border-bottom: 1px solid var(--border); }
.adm-row:hover { background: #fafafa; }
.adm-td     { padding: 12px 14px; font-size: 14px; vertical-align: middle; }
.adm-td--center { text-align: center; }
.adm-td--right  { text-align: right; }
.adm-td--mono   { font-family: monospace; font-weight: 600; color: var(--navy); }
.adm-course-title { font-weight: 600; color: var(--navy); }
.adm-course-tag   { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Badges */
.adm-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
}
.adm-badge--published { background: #D4F4E2; color: #1a6b3c; }
.adm-badge--draft     { background: #F5E9C8; color: #8a6500; }
.adm-badge--yes       { background: #D4F4E2; color: #1a6b3c; }
.adm-badge--no        { background: var(--parchment); color: var(--muted); }

/* Row action buttons */
.adm-row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.adm-action-btn {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--navy);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.adm-action-btn:hover { background: var(--parchment); }
.adm-action-btn--publish { border-color: var(--accent); color: var(--accent); }
.adm-action-btn--publish:hover { background: #fef2f3; }

/* Form cards */
.adm-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}
.adm-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.adm-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 16px;
}
.adm-card-header .adm-card-title { margin-bottom: 0; }

/* Form fields */
.adm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.adm-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.adm-field  { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.adm-field--toggle { justify-content: center; }
.adm-label  { font-size: 12px; font-weight: 600; color: var(--navy); text-transform: uppercase; letter-spacing: .03em; }
.adm-hint   { font-size: 12px; color: var(--muted); font-weight: 400; }
.adm-input  {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    color: var(--navy);
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color .15s;
}
.adm-input:focus { outline: none; border-color: var(--navy); }
.adm-textarea     { resize: vertical; min-height: 80px; }
.adm-textarea--tall { min-height: 180px; }

/* Toggle checkbox */
.adm-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.adm-toggle input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--navy); cursor: pointer; }
.adm-toggle__label { font-size: 14px; font-weight: 600; color: var(--navy); }
.adm-toggle--sm .adm-toggle__label { font-size: 12px; }

/* Module / resource / question cards */
.adm-module-card, .adm-resource-card, .adm-exam-module-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
    background: var(--parchment);
}
.adm-question-card {
    border: 1px solid #d8dce8;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
    background: #fff;
}
.adm-module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.adm-module-num { font-weight: 700; color: var(--navy); font-size: 13px; }
.adm-add-btn    { background: none; border: 1px dashed var(--navy); color: var(--navy);
                  border-radius: 8px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.adm-add-btn:hover { background: var(--parchment); }
.adm-add-q-btn  { margin-top: 8px; }
.adm-remove-btn { background: none; border: none; color: var(--accent); font-size: 12px;
                  font-weight: 600; cursor: pointer; padding: 0; }
.adm-remove-btn:hover { text-decoration: underline; }

/* Choices */
.adm-choices-wrap   { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.adm-choice-row     { display: flex; align-items: center; gap: 8px; }
.adm-choice-key     { width: 24px; text-align: center; font-weight: 700; color: var(--navy); flex-shrink: 0; }
.adm-choice-input   { flex: 1; }
.adm-add-choice-btn { background: none; border: none; color: var(--navy); font-size: 12px;
                      font-weight: 600; cursor: pointer; padding: 0; margin-top: 4px; }
.adm-add-choice-btn:hover { text-decoration: underline; }
.adm-questions-list { margin-bottom: 8px; }

/* Form actions */
.adm-form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 8px;
}
.adm-delete-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
}
.adm-delete-btn:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .adm-grid-2, .adm-grid-3 { grid-template-columns: 1fr; }
    .adm-grid-2 [style*="grid-column:span 2"],
    .adm-grid-3 [style*="grid-column:span 2"] { grid-column: span 1; }
}

.adm-remove-choice-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    flex-shrink: 0;
}
.adm-remove-choice-btn:hover { opacity: .7; }
