/* ==========================================================================
   Optima Learning — design system
   Brand: Optima navy (#2E375F / #45577E) + Optima orange (#EB8634)
   Light, calm surfaces; dark navy used sparingly; dot/ring patterns instead of gradients.
   ========================================================================== */

:root {
    --navy-950: #10152C;
    --navy-900: #171D3A;
    --navy-800: #1F2749;
    --navy-700: #2E375F;
    --navy-600: #3A4672;
    --navy-500: #45577E;
    --navy-400: #6E7BA0;
    --navy-300: #A0AAC6;
    --navy-200: #CDD3E4;
    --navy-100: #E7EAF3;
    --navy-50:  #F4F6FB;

    --orange-700: #B9591A;
    --orange-600: #D4701F;
    --orange-500: #EB8634;
    --orange-400: #F3A15F;
    --orange-100: #FCE6D3;
    --orange-50:  #FFF5EC;

    --green-700: #157347;
    --green-600: #1A8754;
    --green-100: #D7F2E3;
    --green-50:  #EEFAF3;
    --red-600:   #C93A31;
    --red-50:    #FDF0EF;
    --amber-600: #B7791F;
    --amber-50:  #FFF8E6;
    --blue-600:  #2F6FDB;
    --blue-50:   #EEF4FF;

    --ink:     #151A33;
    --text:    #2D3352;
    --muted:   #646C88;
    --subtle:  #8A91AA;
    --line:    #E4E7EF;
    --line-2:  #EEF0F5;
    --surface: #FFFFFF;
    --surface-2: #F7F8FB;
    --surface-3: #F1F3F8;
    --warm:    #FBF8F4;

    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius:    12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-pill: 999px;

    --shadow-xs: 0 1px 2px rgba(16, 21, 44, .06);
    --shadow-sm: 0 1px 2px rgba(16, 21, 44, .05), 0 4px 12px -4px rgba(16, 21, 44, .08);
    --shadow-md: 0 2px 4px rgba(16, 21, 44, .04), 0 14px 32px -12px rgba(16, 21, 44, .18);
    --shadow-lg: 0 30px 70px -24px rgba(16, 21, 44, .30);
    --ring: 0 0 0 4px rgba(69, 87, 126, .16);

    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;

    --header-h: 68px;
    --container: 1200px;
    --ease: cubic-bezier(.2, .7, .2, 1);

    /* Bootstrap bridge */
    --bs-primary: #2E375F;
    --bs-primary-rgb: 46, 55, 95;
    --bs-link-color: #3A4672;
    --bs-link-color-rgb: 58, 70, 114;
    --bs-link-hover-color: #D4701F;
    --bs-body-font-family: var(--font-sans);
    --bs-body-color: var(--text);
    --bs-border-color: var(--line);
    --bs-border-radius: var(--radius-sm);
    --bs-border-radius-lg: var(--radius);
    --bs-success-rgb: 26, 135, 84;
    --bs-danger-rgb: 201, 58, 49;
    --bs-warning-rgb: 235, 134, 52;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--text);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, .display {
    font-family: var(--font-display);
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.2;
    margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.125rem; }
p { margin: 0 0 1em; }
a { color: var(--navy-600); text-decoration: none; transition: color .15s; }
a:hover { color: var(--orange-600); }
img { max-width: 100%; }
::selection { background: var(--orange-100); color: var(--ink); }
:focus-visible { outline: 3px solid rgba(235, 134, 52, .55); outline-offset: 2px; border-radius: 4px; }
.text-muted, .muted { color: var(--muted) !important; }
.text-ink { color: var(--ink) !important; }
.text-orange { color: var(--orange-600) !important; }
.fw-800 { font-weight: 800 !important; }
.small-caps, .eyebrow {
    font-family: var(--font-sans);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--orange-600);
}
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .9rem; }
.eyebrow::before { content: ''; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.container { max-width: var(--container); padding-left: 1rem; padding-right: 1rem; }
@media (max-width: 767.98px) {
    /* Bootstrap's 3rem gutters are wider than the phone container padding */
    .row.g-5, .row.gx-5 { --bs-gutter-x: 2rem; }
    .row.g-5 { --bs-gutter-y: 2rem; }
}
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Patterns (no gradients) ---------- */
.bg-dots {
    background-color: var(--surface-2);
    background-image: radial-gradient(rgba(46, 55, 95, .13) 1px, transparent 1.4px);
    background-size: 22px 22px;
}
.bg-dots-dark {
    background-color: var(--navy-900);
    background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1.4px);
    background-size: 24px 24px;
}
.bg-warm { background: var(--warm); }
.bg-soft { background: var(--surface-2); }
.bg-navy { background: var(--navy-900); color: #DCE1EF; }
.bg-navy h1, .bg-navy h2, .bg-navy h3, .bg-navy h4,
.bg-dots-dark h1, .bg-dots-dark h2, .bg-dots-dark h3, .bg-dots-dark h4 { color: #fff; }
.bg-dots-dark { color: var(--navy-200); }
.deco { position: relative; overflow: hidden; isolation: isolate; }
.deco-ring {
    position: absolute; border-radius: 50%; pointer-events: none; z-index: -1;
    border: 1.5px solid rgba(235, 134, 52, .35);
}
.deco-ring--navy { border-color: rgba(46, 55, 95, .12); }
.deco-ring--light { border-color: rgba(255, 255, 255, .09); }
.deco-disc { position: absolute; border-radius: 50%; pointer-events: none; z-index: -1; background: rgba(235, 134, 52, .10); }
.deco-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--orange-500); z-index: -1; }

/* ---------- Buttons ---------- */
.btn {
    --bs-btn-font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: .95rem;
    border-radius: var(--radius-sm);
    padding: .62rem 1.15rem;
    line-height: 1.25;
    border: 1.5px solid transparent;
    transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s, transform .15s;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { box-shadow: var(--ring); outline: none; }
.btn-lg { padding: .85rem 1.5rem; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: .42rem .8rem; font-size: .85rem; }
.btn-xs { padding: .25rem .55rem; font-size: .78rem; border-radius: var(--radius-xs); }
.btn-primary { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.btn-primary:disabled { background: var(--navy-400); border-color: var(--navy-400); }
.btn-accent { background: var(--orange-500); border-color: var(--orange-500); color: var(--navy-950); }
.btn-accent:hover, .btn-accent:focus { background: var(--orange-400); border-color: var(--orange-400); color: var(--navy-950); }
.btn-success { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.btn-success:hover { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.btn-success:disabled, .btn-success.disabled { opacity: 1; background: var(--green-600); border-color: var(--green-600); color: #fff; }
.btn-danger { background: var(--red-600); border-color: var(--red-600); color: #fff; }
.btn-outline, .btn-outline-primary, .btn-outline-secondary {
    background: #fff; border-color: var(--line); color: var(--ink);
}
.btn-outline:hover, .btn-outline-primary:hover, .btn-outline-secondary:hover {
    background: var(--surface-2); border-color: var(--navy-200); color: var(--ink);
}
.btn-outline-danger { background: #fff; border-color: #F1C7C3; color: var(--red-600); }
.btn-outline-danger:hover { background: var(--red-50); border-color: var(--red-600); color: var(--red-600); }
.btn-ghost { background: transparent; color: var(--navy-600); }
.btn-ghost:hover { background: var(--navy-50); color: var(--ink); }
.btn-light { background: #fff; color: var(--navy-900); border-color: #fff; }
.btn-light:hover { background: var(--navy-50); color: var(--navy-900); }
.btn-outline-light { border-color: rgba(255, 255, 255, .35); color: #fff; background: transparent; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .08); border-color: #fff; color: #fff; }
.btn-block, .w-100.btn { width: 100%; }
.btn .fa-spinner { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: .875rem; color: var(--ink); margin-bottom: .4rem; }
.form-control, .form-select {
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    padding: .65rem .85rem;
    font-size: .95rem;
    color: var(--ink);
    background-color: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.form-control-lg { padding: .85rem 1rem; font-size: 1rem; border-radius: var(--radius); }
.form-select { padding-right: 2.4rem; background-position: right .8rem center; }
.form-select-sm { padding-top: .45rem; padding-bottom: .45rem; font-size: .88rem; }
.form-control:focus, .form-select:focus { border-color: var(--navy-400); box-shadow: var(--ring); }
.form-control::placeholder { color: var(--subtle); }
.form-control[readonly] { background: var(--surface-2); }
.form-text, .hint { font-size: .82rem; color: var(--muted); margin-top: .35rem; }
.form-check-input { width: 1.1em; height: 1.1em; border: 1.5px solid var(--navy-300); }
.form-check-input:checked { background-color: var(--navy-700); border-color: var(--navy-700); }
.form-check-input:focus { box-shadow: var(--ring); border-color: var(--navy-400); }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--subtle); pointer-events: none; }
.input-icon > .form-control { padding-left: 2.6rem; }
.password-toggle { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--subtle); padding: .35rem .5rem; }
.password-toggle:hover { color: var(--ink); }

/* ---------- Cards & surfaces ---------- */
.card, .panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}
.card-header { background: #fff; border-bottom: 1px solid var(--line-2); padding: 1rem 1.25rem; border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important; }
.card-body, .panel-body { padding: 1.25rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--line-2); }
.panel-head h2, .panel-head h3, .panel-head h4 { margin: 0; font-size: 1.05rem; }
.panel-body { padding: 1.35rem; }
.panel-pad { padding: clamp(1.25rem, 3vw, 2rem); }

/* ---------- Badges & chips ---------- */
.badge-soft, .chip {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .76rem; font-weight: 600;
    padding: .28rem .65rem;
    border-radius: var(--radius-pill);
    background: var(--navy-50); color: var(--navy-600);
    line-height: 1.2;
    white-space: nowrap;
}
.chip--orange, .badge-soft.orange { background: var(--orange-50); color: var(--orange-700); }
.chip--green, .badge-soft.green { background: var(--green-50); color: var(--green-700); }
.chip--red, .badge-soft.red { background: var(--red-50); color: var(--red-600); }
.chip--amber, .badge-soft.amber { background: var(--amber-50); color: var(--amber-600); }
.chip--blue, .badge-soft.blue { background: var(--blue-50); color: var(--blue-600); }
.chip--dark { background: var(--navy-800); color: #fff; }
.chip--white { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .15); }
.chip-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 1030;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(16, 21, 44, .35); }
.site-header__inner { height: var(--header-h); display: flex; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__text small { display: block; font-family: var(--font-sans); font-weight: 500; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 1px; }
.nav-main { display: flex; align-items: center; gap: .25rem; margin-left: 1rem; }
.nav-main a { color: var(--text); font-weight: 500; font-size: .93rem; padding: .5rem .8rem; border-radius: var(--radius-sm); }
.nav-main a:hover { color: var(--ink); background: var(--surface-3); }
.nav-main a.is-active { color: var(--ink); font-weight: 600; }
.nav-main a.is-active::after { content: ''; display: block; height: 2px; margin-top: 3px; background: var(--orange-500); border-radius: 2px; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--navy-700); color: #fff; font-weight: 700; font-size: .8rem;
    overflow: hidden; flex: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { width: 72px; height: 72px; font-size: 1.4rem; }
.avatar--orange { background: var(--orange-500); color: var(--navy-950); }
.user-menu-btn { display: inline-flex; align-items: center; gap: .55rem; background: none; border: 1px solid var(--line); border-radius: var(--radius-pill); padding: .2rem .7rem .2rem .2rem; color: var(--ink); font-weight: 600; font-size: .88rem; }
.user-menu-btn:hover { background: var(--surface-2); }
.dropdown-menu {
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md);
    padding: .4rem; min-width: 220px; font-size: .92rem;
}
.dropdown-item { border-radius: var(--radius-xs); padding: .5rem .7rem; color: var(--text); display: flex; align-items: center; gap: .6rem; }
.dropdown-item i { width: 16px; color: var(--muted); text-align: center; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface-3); color: var(--ink); }
.dropdown-header { font-size: .75rem; color: var(--muted); padding: .4rem .7rem; }
.dropdown-divider { margin: .35rem 0; border-color: var(--line-2); }
.nav-toggle { display: none; border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm); width: 40px; height: 40px; color: var(--ink); }
.mobile-nav { display: none; }

@media (max-width: 991.98px) {
    .nav-main, .header-actions .hide-mobile { display: none !important; }
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .mobile-nav {
        position: fixed; inset: var(--header-h) 0 0 0; z-index: 1029;
        background: #fff; padding: 1rem 1.25rem 2rem; overflow-y: auto;
        border-top: 1px solid var(--line);
    }
    .mobile-nav.is-open { display: block; }
    .mobile-nav a { display: flex; align-items: center; gap: .75rem; padding: .85rem .5rem; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line-2); }
    .mobile-nav a i { width: 20px; color: var(--muted); }
    .mobile-nav .btn { margin-top: 1rem; width: 100%; }
}

/* ---------- Flash toasts ---------- */
.flash-stack { position: fixed; top: calc(var(--header-h) + 14px); right: 16px; z-index: 1080; display: grid; gap: .6rem; max-width: min(420px, calc(100vw - 32px)); }
.toast-flash {
    display: flex; align-items: flex-start; gap: .75rem;
    background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--navy-500);
    border-radius: var(--radius); box-shadow: var(--shadow-md);
    padding: .85rem 1rem; font-size: .92rem; color: var(--ink);
    animation: toast-in .35s var(--ease);
}
.toast-flash > i { margin-top: 3px; }
.toast-flash__body { flex: 1; }
.toast-flash__close { border: 0; background: none; color: var(--subtle); font-size: 1.3rem; line-height: 1; padding: 0 .1rem; }
.toast-flash--success { border-left-color: var(--green-600); } .toast-flash--success > i { color: var(--green-600); }
.toast-flash--danger { border-left-color: var(--red-600); } .toast-flash--danger > i { color: var(--red-600); }
.toast-flash--warning { border-left-color: var(--orange-500); } .toast-flash--warning > i { color: var(--orange-600); }
.toast-flash--info > i { color: var(--navy-500); }
.toast-flash.is-leaving { opacity: 0; transform: translateX(16px); transition: all .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Inline alerts */
.notice {
    display: flex; gap: .8rem; align-items: flex-start;
    border-radius: var(--radius); padding: .9rem 1.1rem; font-size: .92rem;
    background: var(--navy-50); color: var(--navy-700); border: 1px solid var(--navy-100);
}
.notice > i { margin-top: 3px; }
.notice--success { background: var(--green-50); border-color: var(--green-100); color: var(--green-700); }
.notice--danger { background: var(--red-50); border-color: #F6D3D0; color: #9F2D25; }
.notice--warning { background: var(--orange-50); border-color: var(--orange-100); color: #8A4512; }
.notice a { color: inherit; text-decoration: underline; font-weight: 600; }
.alert { border-radius: var(--radius); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3.5rem, 7vw, 6rem); color: #C9D0E4; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--orange-400); position: relative; white-space: nowrap; }
.hero__lead { font-size: 1.15rem; max-width: 34rem; color: #C3CAE0; margin-bottom: 2rem; }
.hero-search {
    display: flex; gap: .5rem; background: #fff; border-radius: var(--radius); padding: .4rem;
    max-width: 520px; box-shadow: var(--shadow-lg);
}
.hero-search input { flex: 1; border: 0; outline: 0; padding: .6rem .8rem; font-size: 1rem; color: var(--ink); min-width: 0; border-radius: var(--radius-sm); }
.hero-search input:focus { box-shadow: none; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 2.25rem; margin-top: 2.5rem; }
.hero-stat strong { display: block; font-family: var(--font-display); font-size: 1.75rem; color: #fff; line-height: 1.1; }
.hero-stat span { font-size: .85rem; color: var(--navy-300); }
.hero-visual { position: relative; max-width: 470px; margin-left: auto; }
.hero-visual__img { border-radius: var(--radius-xl); width: 100%; aspect-ratio: 4/4.4; object-fit: cover; box-shadow: var(--shadow-lg); border: 6px solid rgba(255, 255, 255, .06); }
.float-card {
    position: absolute; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: .85rem 1rem; display: flex; align-items: center; gap: .75rem; color: var(--ink); font-size: .88rem;
}
.float-card strong { display: block; font-size: .95rem; }
.float-card small { color: var(--muted); }
.float-card__icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--orange-50); color: var(--orange-600); font-size: 1.05rem; }
.float-card--a { left: -36px; bottom: 54px; }
.float-card--b { right: -22px; top: 36px; }
@media (max-width: 991.98px) { .float-card--a { left: 12px; } .float-card--b { right: 12px; } .hero-visual { margin: 3rem auto 0; } }

/* Page header (inner pages) */
.page-hero { padding: clamp(2.25rem, 5vw, 3.75rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: .4rem; }
.page-hero p { color: var(--muted); font-size: 1.05rem; max-width: 46rem; margin: 0; }
.page-hero.bg-navy p { color: var(--navy-300); }
.crumbs { display: flex; flex-wrap: wrap; gap: .35rem; font-size: .84rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-hidden] { opacity: .5; }
.bg-navy .crumbs, .bg-navy .crumbs a { color: var(--navy-300); }
.bg-navy .crumbs a:hover { color: #fff; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.section-sm { padding: clamp(2.25rem, 5vw, 3.5rem) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.25rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { color: var(--muted); margin: .5rem 0 0; max-width: 40rem; }
.section-head--center { flex-direction: column; align-items: center; text-align: center; }

/* ---------- Course cards ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.course-card {
    position: relative; display: flex; flex-direction: column; height: 100%;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--navy-100); }
.course-card__media { position: relative; aspect-ratio: 16/9.5; background: var(--navy-50); overflow: hidden; }
.course-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.course-card:hover .course-card__media img { transform: scale(1.04); }
.course-card__placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--navy-300); font-size: 2.4rem; }
.course-card__badges { position: absolute; top: .75rem; left: .75rem; right: .75rem; display: flex; justify-content: space-between; gap: .5rem; }
.course-card__badges .chip { background: rgba(255, 255, 255, .95); box-shadow: var(--shadow-xs); }
.course-card__body { padding: 1.15rem 1.2rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.course-card__cat { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-600); margin-bottom: .45rem; }
.course-card__title { font-size: 1.08rem; line-height: 1.35; margin: 0 0 .5rem; }
.course-card__title a { color: var(--ink); }
.course-card__title a::after { content: ''; position: absolute; inset: 0; } /* whole card clickable */
.course-card__desc { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-card__meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .82rem; color: var(--muted); margin-top: auto; }
.course-card__meta i { color: var(--navy-300); margin-right: .25rem; }
.course-card__foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line-2); }
.price { font-family: var(--font-display); font-weight: 800; color: var(--ink); font-size: 1.15rem; }
.price--free { color: var(--green-700); }
.price small { font-family: var(--font-sans); font-weight: 500; font-size: .78rem; color: var(--muted); }
.price-old { text-decoration: line-through; color: var(--subtle); font-weight: 500; font-size: .9rem; margin-right: .35rem; }

/* Progress */
.progress-thin { height: 8px; background: var(--navy-50); border-radius: var(--radius-pill); overflow: hidden; }
.progress-thin > span { display: block; height: 100%; background: var(--green-600); border-radius: inherit; transition: width .6s var(--ease); }
.progress-thin.is-orange > span { background: var(--orange-500); }
.ring { --p: 0; --size: 56px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; position: relative; flex: none; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring .ring__track { stroke: var(--navy-50); }
.ring .ring__bar { stroke: var(--green-600); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.ring b { font-size: .8rem; color: var(--ink); }

/* ---------- Feature / steps ---------- */
.feature { padding: 1.5rem; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); height: 100%; transition: border-color .2s, box-shadow .2s; }
.feature:hover { border-color: var(--navy-100); box-shadow: var(--shadow-sm); }
.feature__icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--navy-50); color: var(--navy-600); font-size: 1.15rem; margin-bottom: 1rem; }
.feature__icon.orange { background: var(--orange-50); color: var(--orange-600); }
.feature h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.feature p { color: var(--muted); font-size: .92rem; margin: 0; }
.steps { counter-reset: step; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { position: relative; padding: 1.5rem 1.4rem 1.4rem; border-radius: var(--radius-lg); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .09); }
.step::before { counter-increment: step; content: '0' counter(step); font-family: var(--font-display); font-weight: 800; font-size: .95rem; color: var(--orange-400); display: block; margin-bottom: .9rem; }
.step h3 { color: #fff; font-size: 1.05rem; margin-bottom: .35rem; }
.step p { color: var(--navy-300); font-size: .92rem; margin: 0; }

/* ---------- Catalog ---------- */
.catalog-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; justify-content: space-between; margin-bottom: 1.75rem; }
.filter-pills { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filter-pills::-webkit-scrollbar { display: none; }
.filter-pill { border: 1px solid var(--line); background: #fff; color: var(--text); font-weight: 500; font-size: .88rem; padding: .45rem .95rem; border-radius: var(--radius-pill); white-space: nowrap; }
.filter-pill:hover { border-color: var(--navy-200); color: var(--ink); }
.filter-pill.is-active { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.search-box { position: relative; min-width: min(320px, 100%); }
.search-box i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--subtle); }
.search-box input { padding-left: 2.5rem; border-radius: var(--radius-pill); }

/* Empty state */
.empty-state { text-align: center; padding: clamp(2.5rem, 6vw, 4rem) 1.5rem; border: 1.5px dashed var(--line); border-radius: var(--radius-lg); background: #fff; }
.empty-state__icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1rem; background: var(--navy-50); color: var(--navy-500); font-size: 1.5rem; }
.empty-state h3 { font-size: 1.2rem; }
.empty-state p { color: var(--muted); max-width: 30rem; margin: 0 auto 1.25rem; }

/* Pagination */
.pager { display: flex; justify-content: center; gap: .35rem; margin-top: 2.5rem; flex-wrap: wrap; }
.pager__item { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 .75rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; color: var(--text); font-weight: 600; font-size: .9rem; }
.pager__item:hover { border-color: var(--navy-200); color: var(--ink); }
.pager__item.is-active { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.pager__item.is-disabled { opacity: .45; pointer-events: none; }
.pager__item.is-gap { border: 0; background: none; }

/* ---------- Course detail ---------- */
.course-hero { padding: clamp(2.25rem, 5vw, 3.5rem) 0 clamp(2.5rem, 5vw, 3.75rem); }
.course-hero h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); max-width: 22ch; }
.course-hero__lead { font-size: 1.1rem; color: var(--navy-300); max-width: 42rem; }
.course-hero__meta { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: 1.4rem; font-size: .9rem; color: var(--navy-200); }
.course-hero__meta i { color: var(--orange-400); margin-right: .35rem; }
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 2.5rem; align-items: start; }
.course-layout__aside { margin-top: -9.5rem; position: sticky; top: calc(var(--header-h) + 20px); }
@media (max-width: 991.98px) {
    .course-layout { grid-template-columns: 1fr; }
    .course-layout__aside { margin-top: 0; position: static; order: -1; }
}
.buy-card { background: #fff; border-radius: var(--radius-xl); border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; }
.buy-card__media { aspect-ratio: 16/9; background: var(--navy-800); position: relative; }
.buy-card__media img, .buy-card__media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.buy-card__body { padding: 1.5rem; }
.buy-card__price { display: flex; align-items: baseline; gap: .5rem; margin-bottom: 1.1rem; }
.buy-card__price .price { font-size: 2rem; }
.buy-card ul.includes { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .6rem; font-size: .9rem; color: var(--text); }
.buy-card ul.includes i { width: 20px; color: var(--navy-400); }
.voucher-toggle { background: none; border: 0; color: var(--navy-600); font-weight: 600; font-size: .88rem; padding: 0; margin-top: 1rem; }
.voucher-toggle:hover { color: var(--orange-600); }
.voucher-form { display: flex; gap: .5rem; margin-top: .75rem; }
.voucher-form input { text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.learn-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .75rem 1.5rem; list-style: none; padding: 0; margin: 0; }
.learn-list li { display: flex; gap: .65rem; font-size: .95rem; }
.learn-list li i { color: var(--green-600); margin-top: 5px; }
.prose { font-size: 1rem; line-height: 1.75; color: var(--text); }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.prose blockquote { border-left: 3px solid var(--orange-500); padding: .25rem 0 .25rem 1rem; color: var(--muted); margin: 1.25rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .92rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .55rem .7rem; }
.prose a { text-decoration: underline; }

/* Curriculum */
.curriculum { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #fff; }
.curriculum__section { padding: .8rem 1.2rem; background: var(--surface-2); font-weight: 700; font-size: .88rem; color: var(--ink); border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; }
.curriculum__section span { font-weight: 500; color: var(--muted); }
.curriculum__item { display: flex; align-items: center; gap: .9rem; padding: .9rem 1.2rem; border-bottom: 1px solid var(--line-2); color: var(--text); }
.curriculum__item:last-child { border-bottom: 0; }
a.curriculum__item:hover { background: var(--surface-2); color: var(--ink); }
.curriculum__icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--navy-50); color: var(--navy-500); font-size: .85rem; }
.curriculum__icon.is-done { background: var(--green-50); color: var(--green-600); }
.curriculum__title { flex: 1; font-weight: 500; font-size: .94rem; min-width: 0; }
.curriculum__meta { font-size: .8rem; color: var(--muted); white-space: nowrap; display: flex; gap: .6rem; align-items: center; }
.instructor { display: flex; gap: 1.1rem; align-items: flex-start; }

/* ---------- Auth ---------- */
.auth { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: 1fr 1fr; }
.auth__form { display: flex; align-items: center; justify-content: center; padding: clamp(2rem, 5vw, 4rem) 1.25rem; }
.auth__card { width: 100%; max-width: 420px; }
.auth__card h1 { font-size: 1.85rem; margin-bottom: .35rem; }
.auth__card .sub { color: var(--muted); margin-bottom: 1.75rem; }
.auth__aside { padding: clamp(2rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: center; color: var(--navy-200); }
.auth__aside h2 { color: #fff; max-width: 18ch; }
.auth__points { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.1rem; max-width: 26rem; }
.auth__points li { display: flex; gap: .9rem; }
.auth__points i { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; background: rgba(235, 134, 52, .14); color: var(--orange-400); }
.auth__points strong { color: #fff; display: block; font-size: .96rem; }
.auth__points span { font-size: .88rem; }
.divider-text { display: flex; align-items: center; gap: .75rem; color: var(--subtle); font-size: .82rem; margin: 1.5rem 0; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 991.98px) { .auth { grid-template-columns: 1fr; } .auth__aside { display: none; } }

/* ---------- Student area ---------- */
.dash-hero { padding: 2.25rem 0 2rem; }
.dash-hero h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: .3rem; }
.stat-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.15rem 1.25rem; display: flex; align-items: center; gap: 1rem; height: 100%; }
.stat-tile__icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--navy-50); color: var(--navy-600); font-size: 1.1rem; flex: none; }
.stat-tile__icon.orange { background: var(--orange-50); color: var(--orange-600); }
.stat-tile__icon.green { background: var(--green-50); color: var(--green-600); }
.stat-tile__icon.blue { background: var(--blue-50); color: var(--blue-600); }
.stat-tile strong { display: block; font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); line-height: 1.15; }
.stat-tile span { font-size: .85rem; color: var(--muted); }
.continue-card { display: grid; grid-template-columns: 300px 1fr; border-radius: var(--radius-xl); overflow: hidden; background: var(--navy-900); color: var(--navy-200); min-height: 220px; }
.continue-card__media { background: var(--navy-800); position: relative; }
.continue-card__media img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.continue-card__body { padding: 1.75rem 2rem; display: flex; flex-direction: column; justify-content: center; position: relative; }
.continue-card__body h2 { color: #fff; font-size: 1.45rem; margin-bottom: .35rem; }
@media (max-width: 767.98px) { .continue-card { grid-template-columns: 1fr; } .continue-card__media { aspect-ratio: 16/8; } }
.my-course { display: flex; gap: 1rem; align-items: center; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; transition: border-color .2s, box-shadow .2s; }
.my-course:hover { border-color: var(--navy-100); box-shadow: var(--shadow-sm); }
.my-course__thumb { width: 112px; aspect-ratio: 16/10; border-radius: 10px; overflow: hidden; background: var(--navy-50); flex: none; }
.my-course__thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-course__body { flex: 1; min-width: 0; }
.my-course__body h3 { font-size: 1rem; margin: 0 0 .3rem; }
.my-course__body h3 a { color: var(--ink); }
.tabs-line { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; overflow-x: auto; scrollbar-width: none; }
.tabs-line::-webkit-scrollbar { display: none; }
.tabs-line a, .tabs-line button { background: none; border: 0; padding: .75rem 1rem; color: var(--muted); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs-line a:hover, .tabs-line button:hover { color: var(--ink); }
.tabs-line .is-active, .tabs-line .active { color: var(--ink); border-bottom-color: var(--orange-500); }
.side-nav { display: grid; gap: .2rem; }
.side-nav a { display: flex; align-items: center; gap: .7rem; padding: .65rem .85rem; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; font-size: .93rem; }
.side-nav a i { width: 18px; color: var(--muted); text-align: center; }
.side-nav a:hover { background: var(--surface-3); color: var(--ink); }
.side-nav a.is-active { background: var(--navy-50); color: var(--ink); font-weight: 600; }
.side-nav a.is-active i { color: var(--orange-600); }
.cert-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.cert-card__top { padding: 1.4rem 1.4rem 1.1rem; position: relative; }
.cert-card__seal { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--orange-50); color: var(--orange-600); font-size: 1.3rem; border: 2px dashed var(--orange-400); margin-bottom: 1rem; }
.cert-card__foot { margin-top: auto; padding: 1rem 1.4rem; border-top: 1px solid var(--line-2); display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Checkout ---------- */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 2rem; align-items: start; }
@media (max-width: 991.98px) { .checkout { grid-template-columns: minmax(0, 1fr); } }
.pay-option { position: relative; display: block; cursor: pointer; }
.pay-option input { position: absolute; opacity: 0; pointer-events: none; }
.pay-option__box { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.2rem; border: 1.5px solid var(--line); border-radius: var(--radius-lg); background: #fff; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.pay-option:hover .pay-option__box { border-color: var(--navy-200); }
.pay-option input:checked + .pay-option__box { border-color: var(--navy-600); box-shadow: var(--ring); background: var(--navy-50); }
.pay-option input:focus-visible + .pay-option__box { box-shadow: var(--ring); }
.pay-option__radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--navy-300); flex: none; display: grid; place-items: center; }
.pay-option input:checked + .pay-option__box .pay-option__radio { border-color: var(--navy-700); }
.pay-option input:checked + .pay-option__box .pay-option__radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--navy-700); }
.pay-option__logo { width: 52px; height: 40px; border-radius: 9px; display: grid; place-items: center; font-size: 1.35rem; flex: none; background: var(--surface-3); color: var(--navy-600); }
.pay-option__logo.pesapal { background: #E9F6EE; color: #1A8754; }
.pay-option__logo.paypal { background: #EEF4FF; color: #1F4DA5; }
.pay-option__text { flex: 1; min-width: 0; }
.pay-option__text strong { display: block; color: var(--ink); }
.pay-option__text span { font-size: .85rem; color: var(--muted); }
.pay-methods { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.pay-methods span { font-size: .72rem; font-weight: 600; padding: .15rem .45rem; border-radius: 5px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; font-size: .94rem; }
.summary-row.total { border-top: 1px solid var(--line); margin-top: .5rem; padding-top: .9rem; font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.trust-row { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .82rem; }
.trust-row i { color: var(--green-600); }
@media (max-width: 575.98px) {
    .pay-option__box { position: relative; padding: 1rem; gap: .75rem; align-items: flex-start; }
    .pay-option__radio { margin-top: 2px; }
    .pay-option__logo { display: none; }
    .pay-option__box > .chip { position: absolute; top: -.6rem; right: .75rem; }
}

/* ---------- Result pages ---------- */
.result { max-width: 560px; margin: 0 auto; text-align: center; }
.result__icon { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1.5rem; font-size: 2.1rem; background: var(--green-50); color: var(--green-600); box-shadow: 0 0 0 10px rgba(26, 135, 84, .06); }
.result__icon.warn { background: var(--orange-50); color: var(--orange-600); box-shadow: 0 0 0 10px rgba(235, 134, 52, .08); }
.result__icon.err { background: var(--red-50); color: var(--red-600); box-shadow: 0 0 0 10px rgba(201, 58, 49, .06); }
.receipt { text-align: left; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: .5rem 1.25rem; margin: 1.75rem 0; background: var(--surface-2); }
.receipt div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.receipt div:last-child { border-bottom: 0; }
.receipt span { color: var(--muted); }
.receipt strong { color: var(--ink); text-align: right; }

/* ---------- Preview banner ---------- */
.preview-bar {
    position: sticky; top: 0; z-index: 1040;
    background: var(--orange-500); color: var(--navy-950);
    font-size: .88rem; font-weight: 600;
}
.preview-bar .container { display: flex; align-items: center; gap: .9rem; padding-top: .55rem; padding-bottom: .55rem; flex-wrap: wrap; }
.preview-bar .btn { padding: .3rem .75rem; font-size: .8rem; }
.preview-bar .btn-dark { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.preview-bar .btn-dark:hover { background: var(--navy-800); }
.preview-bar + .site-header { top: 46px; }

/* ---------- Footer ---------- */
.site-footer { color: var(--navy-300); padding: 4rem 0 0; font-size: .92rem; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; font-family: var(--font-sans); margin-bottom: 1.1rem; }
.site-footer a { color: var(--navy-200); }
.site-footer a:hover { color: var(--orange-400); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.site-footer .brand { color: #fff; }
.site-footer .brand__text small { color: var(--navy-300); }
.footer-contact li { display: flex; gap: .7rem; }
.footer-contact i { color: var(--orange-400); margin-top: 4px; width: 16px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 3rem; padding: 1.4rem 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .84rem; }
.social { display: flex; gap: .5rem; margin-top: 1.25rem; }
.social a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .14); color: var(--navy-200); }
.social a:hover { background: var(--orange-500); border-color: var(--orange-500); color: var(--navy-950); }

/* CTA band */
.cta-band { border-radius: var(--radius-xl); padding: clamp(2rem, 5vw, 3.25rem); display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 .35rem; }
.cta-band p { color: var(--navy-300); margin: 0; }

/* ---------- Lesson player ---------- */
.player { display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: calc(100vh - 60px); background: var(--surface-2); }
.player-top { position: sticky; top: 0; z-index: 1030; height: 60px; background: var(--navy-900); color: #fff; display: flex; align-items: center; gap: 1rem; padding: 0 1rem; }
.player-top a { color: var(--navy-200); }
.player-top a:hover { color: #fff; }
.player-top__title { flex: 1; min-width: 0; font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-top__progress { display: flex; align-items: center; gap: .6rem; font-size: .82rem; color: var(--navy-300); }
.player-top__progress .progress-thin { width: 120px; background: rgba(255, 255, 255, .12); }
.player-top .icon-btn { width: 38px; height: 38px; border-radius: 9px; display: inline-grid; place-items: center; border: 1px solid rgba(255, 255, 255, .14); color: #fff; background: transparent; }
.player-top .icon-btn:hover { background: rgba(255, 255, 255, .08); }
.player-main { min-width: 0; padding: 1.5rem clamp(1rem, 3vw, 2.25rem) 3rem; }
.player-stage { background: #000; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); position: relative; }
.player-stage video { width: 100%; display: block; max-height: 72vh; background: #000; }
.player-stage .embed { position: relative; aspect-ratio: 16/9; }
.player-stage .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.scorm-stage { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.scorm-stage__bar { display: flex; align-items: center; gap: .75rem; padding: .6rem .9rem; border-bottom: 1px solid var(--line-2); font-size: .84rem; color: var(--muted); }
.scorm-stage iframe { width: 100%; height: calc(100vh - 220px); min-height: 520px; border: 0; display: block; background: #fff; }
.scorm-stage:fullscreen iframe { height: calc(100vh - 44px); }
.lesson-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin: 1.5rem 0 1rem; flex-wrap: wrap; }
.lesson-head h1 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin: .2rem 0 0; }
.lesson-nav { display: flex; justify-content: space-between; gap: .75rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.player-side { background: #fff; border-left: 1px solid var(--line); height: calc(100vh - 60px); position: sticky; top: 60px; overflow-y: auto; }
.player-side__head { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: #fff; z-index: 1; }
.player-side__head h2 { font-size: .98rem; margin: 0 0 .6rem; }
.p-lesson { display: flex; gap: .75rem; padding: .8rem 1.25rem; border-bottom: 1px solid var(--line-2); color: var(--text); font-size: .9rem; align-items: flex-start; }
.p-lesson:hover { background: var(--surface-2); color: var(--ink); }
.p-lesson.is-current { background: var(--navy-50); box-shadow: inset 3px 0 0 var(--orange-500); color: var(--ink); font-weight: 600; }
.p-lesson.is-locked { opacity: .55; cursor: not-allowed; }
.p-lesson__state { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--navy-200); flex: none; display: grid; place-items: center; font-size: .65rem; margin-top: 1px; color: transparent; }
.p-lesson.is-done .p-lesson__state { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.p-lesson.is-current .p-lesson__state { border-color: var(--orange-500); color: var(--orange-600); }
.p-lesson__meta { display: block; font-size: .77rem; color: var(--muted); font-weight: 400; margin-top: .15rem; }
.p-section { padding: .7rem 1.25rem; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
@media (max-width: 991.98px) {
    .player { grid-template-columns: 1fr; }
    .player-side { position: fixed; top: 60px; right: 0; width: min(360px, 92vw); z-index: 1035; transform: translateX(100%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg); }
    .player-side.is-open { transform: none; }
    .player-top__progress .progress-thin { display: none; }
    .scorm-stage iframe { height: calc(100vh - 200px); min-height: 420px; }
}
.debug-panel { margin-top: 1rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; background: var(--navy-950); color: #C9D0E4; border-radius: var(--radius); padding: .9rem 1rem; max-height: 220px; overflow: auto; }
.debug-panel b { color: var(--orange-400); font-weight: 600; }

/* ---------- Misc ---------- */
.kbd { font-family: ui-monospace, monospace; font-size: .75rem; padding: .1rem .4rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: #fff; color: var(--ink); }
.code-pill { white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; letter-spacing: .04em; background: var(--surface-3); border: 1px solid var(--line); padding: .15rem .5rem; border-radius: 6px; color: var(--ink); font-size: .88em; }
.list-check { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.list-check li { display: flex; gap: .6rem; }
.list-check i { color: var(--green-600); margin-top: 4px; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}
.maintenance-page { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.table { --bs-table-color: var(--text); font-size: .92rem; }
.table > :not(caption) > * > * { padding: .8rem .9rem; border-bottom-color: var(--line-2); }
.table thead th { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.modal-content { border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.modal-header { border-bottom: 1px solid var(--line-2); padding: 1.1rem 1.35rem; }
.modal-body { padding: 1.35rem; }
.modal-footer { border-top: 1px solid var(--line-2); padding: .9rem 1.35rem; }
.nav-tabs { border-bottom: 1px solid var(--line); gap: .25rem; }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; padding: .75rem 1rem; margin-bottom: -1px; }
.nav-tabs .nav-link:hover { color: var(--ink); border-color: transparent; }
.nav-tabs .nav-link.active { color: var(--ink); border-bottom-color: var(--orange-500); background: none; }
.nav-tabs .nav-link i { margin-right: .35rem; }
