/* The LMS site on Vuexy's front pages (the RaboTeb green). Vuexy provides navbar, footer, buttons, forms, alerts and
   icons; this file is the site's own look: hero, course cards, the course page, the learner dashboard, sign-in,
   checkout, exam, certificate, ticket and the classroom. */
:root {
    --brand: var(--bs-primary, #208d44);
    --brand-rgb: 32, 141, 68;
    --brand-700: #17703a;
    --brand-800: #125a2e;
    --brand-900: #0d381b;
    --brand-50: #eff8f2;
    --brand-100: #d9efe0;
    --brand-dark: var(--brand-700);
    --brand-soft: var(--brand-50);
    --ink: #2f2b3d;            /* headings: 13:1 on white */
    --text: #57536a;           /* body: 7.4:1 */
    --muted: #6d6980;          /* hints: 5.2:1 (Vuexy's #a5a3ae was 2.5:1) */
    --line: #e6e5ea;
    --surface: #fff;
    --page: #f6f7f9;
    --danger: #d43c3d;
    --danger-soft: #fdecec;
    --warn: #a35a00;
    --warn-soft: #fff3e3;
    --info: #00778a;
    --info-soft: #e3f7fa;
    --live: #00a3b8;
    --workshop: #e07b1a;
    --private: #7367f0;
    --radius-sm: .5rem;
    --radius: .875rem;
    --radius-lg: 1.25rem;
    --shadow-sm: 0 1px 2px rgba(47, 43, 61, .06), 0 1px 6px rgba(47, 43, 61, .05);
    --shadow: 0 .25rem 1.125rem rgba(47, 43, 61, .08);
    --shadow-lg: 0 .75rem 2rem rgba(47, 43, 61, .14);
    --ring: 0 0 0 3px rgba(var(--brand-rgb), .35);
    --nav-h: 64px;
}

[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--nav-h) + 16px); }
body { background: var(--page); color: var(--text); }
h1, h2, h3, h4 { color: var(--ink); }
.site-main { min-height: 60vh; padding-block: 1.5rem 4rem; }
.hint { color: var(--muted); font-size: .9rem; }
.link { background: none; border: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }
.page-title { font-size: 1.5rem; margin-block: .5rem 1rem; color: var(--ink); }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }

/* Focus: always visible for keyboard users. */
a:focus-visible, button:focus-visible, summary:focus-visible, .btn:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 0; box-shadow: var(--ring) !important; border-radius: var(--radius-sm);
}
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: var(--ring); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Header and footer ---------- */
.layout-navbar { background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); z-index: 1000; }
.landing-navbar { min-height: var(--nav-h); }
.landing-navbar .app-brand-logo img, .landing-footer .app-brand-logo img { height: 36px; width: auto; max-width: 170px; object-fit: contain; }
.landing-navbar .navbar-nav .nav-link { border-radius: var(--radius-sm); color: var(--text); }
.landing-navbar .navbar-nav .nav-link:hover { color: var(--brand); }
.landing-navbar .navbar-nav .nav-link.active { color: var(--brand-700); background: var(--brand-50); }
.landing-navbar .navbar-nav .nav-link, .landing-navbar .btn { white-space: nowrap; }
.landing-footer .footer-top { padding-block: 3rem 2rem; }
@media (max-width: 991.98px) {
    .landing-navbar { flex-wrap: nowrap !important; }
    .landing-navbar .landing-nav-menu:not(.show) { display: none; }
    .landing-navbar .landing-nav-menu.show { display: block; position: fixed; inset: 0 auto 0 0; width: min(320px, 86vw); z-index: 1100;
        background: #fff; overflow-y: auto; padding: 3rem 1rem 1rem; box-shadow: 0 0 2rem rgba(0,0,0,.2); }
    .landing-navbar .landing-nav-menu.show + .site-menu-overlay { display: block; }
    .landing-navbar .landing-nav-menu .nav-link { padding: .75rem 1rem !important; font-size: 1rem; }
}
.site-menu-overlay { display: none; position: fixed; inset: 0; z-index: 1090; background: rgba(47, 43, 61, .5); }

/* Vuexy's landing footer is dark by design: the logo's deep green in place of the template's navy image. */
.light-style .landing-footer .footer-top { background: #0d381b radial-gradient(120% 140% at 100% 0, rgba(32, 141, 68, .55), transparent 60%); }
.light-style .landing-footer .footer-bottom { background-color: #0a2c15; border: 0 !important; }
.landing-footer .footer-bottom .badge { background: rgba(255, 255, 255, .12) !important; color: #d3d4dc !important; }
.landing-footer .app-brand-logo img { background: #fff; padding: .45rem .8rem; border-radius: .5rem; box-sizing: content-box; }
.landing-footer { margin-top: 2rem; }
/* Desktop: logo, menu, search and actions on one row. */
@media (min-width: 992px) {
    .landing-navbar { flex-wrap: nowrap !important; }
    .landing-navbar .landing-nav-menu { flex: 0 1 auto; }
    .landing-navbar .st-search, .landing-navbar .site-search { flex: 1 1 220px; max-width: 360px; }
}
@media (max-width: 575.98px) {
    .landing-navbar { padding-inline: .75rem !important; }
    .landing-navbar .app-brand-logo img { height: 28px; max-width: 128px; }
    .landing-navbar .navbar-brand { margin-inline-end: 0 !important; }
    .landing-navbar > .navbar-nav { gap: .35rem !important; }
}
@media (max-width: 380px) { .landing-navbar .nav-teacher { display: none; } }
/* Vuexy's front menu pads each link by 1.25rem: six links, the brand and the account buttons ran ~250px past the
   container at 1280px. Tighter links everywhere on desktop, and no menu icons below 1400px. */
@media (min-width: 992px) {
    .landing-navbar .navbar-nav .nav-link { padding-inline: .6rem !important; }
    .landing-navbar .navbar-brand { margin-inline-end: 1rem !important; }
}
@media (min-width: 1200px) and (max-width: 1399.98px) { #siteNavMenu .nav-link i { display: none; } }
/* 992–1200px: six menu items, the brand and the account buttons share one row; without this the row ran ~140px wider than the window. */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .landing-navbar .navbar-nav .nav-link i { display: none; }
    .landing-navbar .navbar-nav .nav-link { padding-inline: .45rem !important; font-size: .875rem; }
    .landing-navbar .navbar-brand { margin-inline-end: .5rem !important; }
    .landing-navbar .navbar-brand .badge { display: none !important; }
}

/* ---------- Shared pieces ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block: 2.25rem 1rem; }
.section-head h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.3rem; margin: 0; }
.section-head h2 > .ti { color: var(--brand); font-size: 1.4rem; }
.section-link { display: inline-flex; align-items: center; gap: .15rem; font-weight: 600; color: var(--brand-700); text-decoration: none; white-space: nowrap; }
.section-link:hover { text-decoration: underline; }

.pill { display: inline-flex; align-items: center; gap: .25rem; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; line-height: 1.6; }
.pill .ti { font-size: .95rem; }
.pill-success { background: var(--brand-50); color: var(--brand-700); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-warning { background: var(--warn-soft); color: var(--warn); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-muted { background: #f1f0f4; color: var(--muted); }

.meter { height: 8px; border-radius: 99px; background: #eceaf0; overflow: hidden; flex: 1; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2bb15a, var(--brand)); transition: width .6s ease; }
.progress { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--brand); }

.empty-state { display: grid; justify-items: center; gap: .5rem; text-align: center; padding: 3rem 1.25rem; margin-block: 1rem;
    background: var(--surface); border: 1px dashed #d6d4de; border-radius: var(--radius-lg); }
.empty-state h2 { font-size: 1.15rem; margin: .5rem 0 0; }
.empty-state p { color: var(--muted); margin: 0 0 .5rem; max-width: 46ch; }
.empty-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--brand-50); color: var(--brand); font-size: 2rem; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }

/* Kind colours: badges, icons and the card art. */
.kind-recorded { --kind: var(--brand); --kind-soft: var(--brand-50); --kind-ink: var(--brand-700); --kind-art: linear-gradient(135deg, #1d7f3d, #34b765); }
.kind-live { --kind: var(--live); --kind-soft: var(--info-soft); --kind-ink: var(--info); --kind-art: linear-gradient(135deg, #00879a, #2fd0e3); }
.kind-workshop { --kind: var(--workshop); --kind-soft: var(--warn-soft); --kind-ink: var(--warn); --kind-art: linear-gradient(135deg, #d0640c, #ffb15e); }
.kind-private { --kind: var(--private); --kind-soft: #efedfe; --kind-ink: #5b4fd6; --kind-art: linear-gradient(135deg, #5a4ed8, #9e95f5); }
.kind { align-self: flex-start; display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--kind-soft); color: var(--kind-ink); }
.tag { padding: 1px 8px; border-radius: 6px; font-size: .8rem; background: var(--brand-soft); color: var(--brand-dark); }

/* ---------- Home ---------- */
.lms-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 2rem;
    padding: clamp(1.75rem, 4vw, 3.5rem); border-radius: var(--radius-lg); color: #eaf6ee;
    background: radial-gradient(90% 120% at 0% 0%, rgba(80, 210, 125, .35), transparent 55%),
                radial-gradient(70% 90% at 100% 100%, rgba(0, 0, 0, .25), transparent 60%),
                linear-gradient(135deg, #0d381b 0%, #145c2e 50%, #208d44 100%);
    box-shadow: 0 1.25rem 2.5rem -1rem rgba(13, 56, 27, .45); }
.lms-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .14;
    background-image: radial-gradient(rgba(255,255,255,.9) 1px, transparent 1px); background-size: 22px 22px;
    mask-image: linear-gradient(to left, #000, transparent 70%); }
.hero-text { position: relative; z-index: 1; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .8rem; border-radius: 999px; background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2); font-size: .85rem; color: #fff; }
.lms-hero h1 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.75rem); margin: 1rem 0 .75rem; line-height: 1.35 !important; font-family: font-extra-bold, "tahoma", serif; }
.hero-mark { background: linear-gradient(90deg, #b8f5cb, #fff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lms-hero p { color: #d3eadb; font-size: 1.05rem; max-width: 52ch; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero-actions .btn-light { background: #fff; color: var(--brand-800); border: 0; font-weight: 700; box-shadow: 0 .5rem 1.25rem rgba(0,0,0,.18); }
.hero-actions .btn-light:hover { background: #f1fbf4; color: var(--brand-900); transform: translateY(-1px); }
.btn-hero-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .06); }
.btn-hero-ghost:hover { color: #fff; background: rgba(255, 255, 255, .16); border-color: #fff; }
.hero-points { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; list-style: none; padding: 0; margin: 1.5rem 0 0; font-size: .9rem; color: #cfe8d7; }
.hero-points li { display: inline-flex; align-items: center; gap: .35rem; }
.hero-points .ti { color: #8fe4a9; font-size: 1.15rem; }

.hero-art { position: relative; z-index: 1; min-height: 260px; }
.art-ring { position: absolute; inset: 50% auto auto 50%; width: 240px; height: 240px; translate: -50% -50%; border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, .22); animation: lms-spin 40s linear infinite; }
.art-card { position: absolute; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; padding: .8rem 1rem; min-width: 200px;
    background: rgba(255, 255, 255, .96); color: var(--ink); border-radius: var(--radius); box-shadow: 0 1rem 2rem rgba(0, 0, 0, .22); animation: lms-float 6s ease-in-out infinite; }
.art-card > .ti { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 1.3rem; background: var(--brand-50); color: var(--brand); }
.art-card span { display: grid; line-height: 1.5; }
.art-card b { font-size: .92rem; }
.art-card small { color: var(--muted); font-size: .78rem; }
.art-card .meter { flex-basis: 100%; height: 6px; }
.art-1 { top: 4%; inset-inline-end: 6%; }
.art-2 { top: 40%; inset-inline-start: 0; animation-delay: -2s; }
.art-2 > .ti { background: var(--info-soft); color: var(--live); }
.art-3 { bottom: 2%; inset-inline-end: 12%; animation-delay: -4s; }
.art-3 > .ti { background: var(--warn-soft); color: var(--workshop); }
@keyframes lms-float { 50% { transform: translateY(-8px); } }
@keyframes lms-spin { to { rotate: 360deg; } }

.kind-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.kind-card { position: relative; display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.15rem; background: var(--surface); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); border: 1px solid transparent; text-decoration: none; color: var(--text); transition: transform .18s, box-shadow .18s, border-color .18s; }
.kind-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--kind); color: var(--text); }
.kind-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--kind-soft); color: var(--kind-ink); font-size: 1.6rem; }
.kind-text { display: grid; gap: .1rem; min-width: 0; }
.kind-text strong { color: var(--ink); font-size: 1rem; }
.kind-text span { font-size: .85rem; color: var(--muted); }
.kind-go { margin-inline-start: auto; color: var(--kind-ink); opacity: .5; transition: transform .18s, opacity .18s; }
.kind-card:hover .kind-go { opacity: 1; transform: translateX(-4px); }

.cert-band { display: flex; align-items: center; gap: 1.25rem; margin-top: 3rem; padding: 1.5rem 1.75rem; border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--brand-50), #fff 70%); border: 1px solid var(--brand-100); }
.cert-band h2 { font-size: 1.15rem; margin: 0 0 .25rem; }
.cert-band p { margin: 0; color: var(--muted); }
.cert-band > div { flex: 1; min-width: 0; }
.cert-band-icon { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 1.9rem;
    box-shadow: 0 0 0 8px rgba(var(--brand-rgb), .12); }

/* ---------- Course cards ---------- */
.course-grid, .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.course-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid #eeedf2; transition: transform .2s, box-shadow .2s; }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.course-card:focus-within { box-shadow: var(--shadow-lg), var(--ring); }
.course-media { position: relative; aspect-ratio: 16 / 9; background: var(--kind-art, var(--brand-50)); overflow: hidden; }
.course-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.course-card:hover .course-media img { transform: scale(1.04); }
.course-media-art { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .92); font-size: 3.25rem;
    background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,.25), transparent 40%), radial-gradient(circle at 85% 90%, rgba(0,0,0,.15), transparent 45%); }
.course-media-art .ti { filter: drop-shadow(0 .5rem 1rem rgba(0,0,0,.2)); }
.kind-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700;
    background: rgba(255, 255, 255, .95); color: var(--kind-ink); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.course-media .kind-badge { position: absolute; top: .75rem; inset-inline-start: .75rem; }
.media-flag { position: absolute; top: .75rem; inset-inline-end: .75rem; display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .6rem;
    border-radius: 999px; font-size: .75rem; font-weight: 700; color: #fff; }
.flag-done { background: var(--brand-700); }
.flag-full { background: var(--danger); }
.flag-few { background: #b4530a; }
.course-body { display: flex; flex-direction: column; gap: .55rem; padding: 1rem 1.1rem 1.1rem; flex: 1; }
.course-title { font-size: 1.02rem; margin: 0; line-height: 1.7 !important; }
.course-title a { color: var(--ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-title a:hover { color: var(--brand-700); }
.course-title a.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.course-title a.stretched:focus-visible { box-shadow: none !important; }
.course-summary { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.8 !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; list-style: none; padding: 0; margin: 0; font-size: .82rem; color: var(--muted); }
.course-meta li { display: inline-flex; align-items: center; gap: .25rem; }
.course-meta .ti { font-size: 1rem; color: var(--kind-ink, var(--brand)); }
.course-teacher { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--text); }
.teacher-avatar { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--kind-soft, var(--brand-50));
    color: var(--kind-ink, var(--brand-700)); font-weight: 700; font-size: .85rem; }
.course-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-top: auto; padding-top: .75rem; border-top: 1px dashed var(--line); }
.course-progress { flex-basis: 100%; display: flex; align-items: center; gap: .6rem; font-size: .82rem; font-weight: 700; color: var(--brand-700); }
.course-price { font-weight: 800; color: var(--ink); font-size: 1.02rem; }
.course-price.free { color: var(--brand-700); }
.course-price.large { font-size: 1.5rem; }
.course-cta { display: inline-flex; align-items: center; gap: .25rem; font-weight: 700; font-size: .88rem; color: var(--brand-700); }
.course-cta .ti { transition: transform .2s; }
.course-card:hover .course-cta .ti { transform: translateX(-4px); }
.price { font-weight: 700; color: var(--brand-dark); }
.price.large { font-size: 1.3rem; }

/* ---------- Catalog ---------- */
.page-band { display: flex; align-items: center; gap: 1.1rem; padding: 1.5rem 1.75rem; border-radius: var(--radius-lg); background: var(--surface);
    box-shadow: var(--shadow-sm); border-inline-start: 5px solid var(--kind); position: relative; overflow: hidden; }
.page-band::after { content: ""; position: absolute; inset-block: 0; inset-inline-end: 0; width: 40%; background: radial-gradient(circle at 0 50%, var(--kind-soft), transparent 70%); opacity: .9; pointer-events: none; }
.band-icon { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--kind-art); color: #fff; font-size: 1.8rem; box-shadow: 0 .5rem 1rem -.25rem var(--kind); }
.band-text { position: relative; z-index: 1; min-width: 0; }
.band-text h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
.band-text p { margin: 0; color: var(--muted); }
.catalog-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-block: 1.25rem; }
.kind-switch { display: flex; gap: .4rem; overflow-x: auto; padding: .25rem; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow-sm); max-width: 100%; scrollbar-width: none; }
.kind-switch a { display: inline-flex; align-items: center; gap: .3rem; padding: .45rem .95rem; border-radius: 999px; color: var(--text); text-decoration: none; font-size: .9rem; white-space: nowrap; }
.kind-switch a:hover { background: var(--page); color: var(--ink); }
.kind-switch a.active { background: var(--brand); color: #fff; font-weight: 700; }
.catalog-search { position: relative; flex: 0 1 320px; min-width: 0; margin: 0; }
.catalog-search .ti { position: absolute; inset-inline-start: .85rem; top: 50%; translate: 0 -50%; color: var(--muted); }
.catalog-search .form-control { padding-inline-start: 2.4rem; border-radius: 999px; background: var(--surface); }
.result-count { color: var(--muted); font-size: .88rem; margin: 0 0 .75rem; }

/* ---------- Learner dashboard ---------- */
.dash-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1.5rem 1.75rem; border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #fff 40%, var(--brand-50)); box-shadow: var(--shadow-sm); border: 1px solid #eeedf2; }
.dash-hello { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.dash-hello h1 { font-size: 1.45rem; margin: 0; }
.dash-hello p { margin: .15rem 0 0; color: var(--muted); }
.dash-avatar { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, #1d7f3d, #34b765);
    color: #fff; font-size: 1.5rem; font-weight: 800; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--brand-100); }
.dash-stats { display: flex; gap: .75rem; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.dash-stats li { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: .6rem; align-items: center; padding: .65rem 1rem; min-width: 140px;
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.dash-stats .ti { grid-row: span 2; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; font-size: 1.3rem; }
.dash-stats b { font-size: 1.35rem; color: var(--ink); line-height: 1.2; }
.dash-stats span { font-size: .8rem; color: var(--muted); }
.stat-progress { background: var(--info-soft); color: var(--info); }
.stat-done { background: var(--brand-50); color: var(--brand-700); }
.stat-cert { background: var(--warn-soft); color: var(--warn); }
.dash-section .section-head { margin-top: 2rem; }

.next-step { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; padding: 1rem 1.25rem; border-radius: var(--radius); text-decoration: none;
    background: var(--surface); border: 1px solid var(--brand-100); border-inline-start: 5px solid var(--brand); box-shadow: var(--shadow-sm); color: var(--text); }
a.next-step:hover { box-shadow: var(--shadow); color: var(--text); }
.next-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--brand-50); color: var(--brand); font-size: 1.5rem; }
.next-text { display: grid; gap: .1rem; flex: 1; min-width: 0; }
.next-text small { color: var(--brand-700); font-weight: 700; font-size: .78rem; }
.next-text strong { color: var(--ink); font-size: 1.05rem; overflow-wrap: anywhere; }
.next-text span { color: var(--muted); font-size: .88rem; }
.next-step .btn { flex: none; }
.next-step.is-done { border-color: #f3d9a6; border-inline-start-color: #e0a420; background: linear-gradient(135deg, #fffaf0, #fff 60%); }
.next-step.is-done .next-icon { background: #fff1d1; color: #b07a00; }
.next-step.is-done small { color: #8a5f00; }
.next-step.is-live { border-color: #b8eef5; border-inline-start-color: var(--live); }
.next-step.is-live .next-icon { background: var(--info-soft); color: var(--info); animation: lms-pulse 1.8s infinite; }
.next-step.is-live small { color: var(--info); }
.next-step.is-warn { border-color: #ffdcb0; border-inline-start-color: var(--workshop); }
.next-step.is-warn .next-icon { background: var(--warn-soft); color: var(--warn); }
.next-step.is-warn small { color: var(--warn); }
.next-step.is-wait { border-inline-start-color: var(--info); }
.next-step.is-wait .next-icon { background: var(--info-soft); color: var(--info); }
.next-step.is-wait small { color: var(--info); }
@keyframes lms-pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 163, 184, .45); } 70% { box-shadow: 0 0 0 12px rgba(0, 163, 184, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 163, 184, 0); } }

/* Sessions as a timeline with calendar chips */
.timeline, .sessions { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.session-row { display: flex; align-items: center; gap: .9rem; padding: .7rem .9rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.session-row.cancelled { opacity: .6; }
.session-row.cancelled strong { text-decoration: line-through; }
.session-row.is-past .date-chip { background: #f1f0f4; color: var(--muted); }
.session-row.is-live { border-color: var(--live); box-shadow: 0 0 0 3px rgba(0, 163, 184, .12); }
.date-chip { flex: none; display: grid; justify-items: center; align-content: center; width: 56px; height: 58px; border-radius: 12px; background: var(--brand-50); color: var(--brand-700); font-size: .75rem; line-height: 1.3; }
.date-chip b { font-size: 1.3rem; line-height: 1.1; }
.session-text { display: grid; flex: 1; min-width: 0; }
.session-text strong { color: var(--ink); overflow-wrap: anywhere; }
.session-text span { color: var(--muted); font-size: .85rem; }
.btn-live { display: inline-flex; align-items: center; gap: .4rem; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: lms-blink 1.2s infinite; }
@keyframes lms-blink { 50% { opacity: .25; } }
.sessions li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }

/* ---------- Course page ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand-700); text-decoration: underline; }
.crumbs span { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.crumbs .ti { font-size: .8rem; opacity: .6; }

.course-hero { position: relative; overflow: hidden; padding: clamp(1.5rem, 3.5vw, 2.5rem); border-radius: var(--radius-lg); color: #e9f4ec;
    background: radial-gradient(80% 120% at 0% 0%, rgba(255,255,255,.14), transparent 60%), var(--kind-art);
    box-shadow: 0 1rem 2rem -1rem var(--kind); }
.course-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .12;
    background-image: radial-gradient(rgba(255,255,255,.9) 1px, transparent 1px); background-size: 20px 20px; mask-image: linear-gradient(to left, #000, transparent 60%); }
.course-hero > * { position: relative; z-index: 1; }
@media (min-width: 992px) { .course-hero { padding-inline-end: calc(340px + 3.5rem); min-height: 15rem; } }
@media (max-width: 991.98px) { .course-hero { padding-bottom: 4rem; } }
.course-hero h1 { color: #fff; font-size: clamp(1.5rem, 3.2vw, 2.25rem); margin: .85rem 0 .5rem; max-width: 30ch; font-family: font-extra-bold, "tahoma", serif; line-height: 1.4 !important; }
.course-lead { color: rgba(255, 255, 255, .88); font-size: 1.05rem; max-width: 60ch; margin: 0; }
.fact-chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1.25rem 0 0; }
.fact-chips li, .fact-chips a { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .8rem; border-radius: 999px; font-size: .85rem;
    background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .22); color: #fff; text-decoration: none; }
.fact-chips li:has(a) { padding: 0; border: 0; background: none; }
.fact-chips .ti { font-size: 1rem; }
.course-teacher.large { margin-top: 1.25rem; color: #fff; }
.course-teacher.large .teacher-avatar { width: 40px; height: 40px; font-size: 1.1rem; background: #fff; color: var(--kind-ink); }
.course-teacher.large span:last-child { display: grid; line-height: 1.4; font-weight: 700; }
.course-teacher.large small { font-weight: 400; opacity: .8; font-size: .75rem; }

.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "main aside"; gap: 1.75rem; align-items: start; margin-top: 1.75rem; }
.course-main { grid-area: main; min-width: 0; }
.course-main > .next-step:first-child { margin-top: 0; }
.course-aside { grid-area: aside; position: sticky; top: calc(var(--nav-h) + 1rem); margin-top: -7rem; z-index: 2; }
.enrol-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid #eeedf2; }
.enrol-card .course-media { border-bottom: 1px solid var(--line); }
.enrol-body { display: grid; gap: .85rem; padding: 1.25rem; }
.enrol-body .hint { margin: 0; }
.enrol-body form { display: grid; gap: .6rem; margin: 0; }
.enrol-body .alert { margin: 0; }
.enrol-price { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem; }
.seats { display: inline-flex; align-items: center; gap: .25rem; font-size: .85rem; color: var(--muted); }
.seats.few { color: #b4530a; font-weight: 700; }
.enrol-state { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; border-radius: var(--radius-sm); background: var(--brand-50); color: var(--brand-700); font-weight: 700; font-size: .9rem; }
.enrol-state .ti { font-size: 1.2rem; }
.enrol-state.is-done { background: #fff6e0; color: #8a5f00; }
.enrol-state.is-wait { background: var(--info-soft); color: var(--info); }
.enrol-state.is-closed { background: #f1f0f4; color: var(--muted); }
.ring-row { display: flex; align-items: center; gap: .9rem; }
.ring-row > span:last-child { display: grid; line-height: 1.6; }
.ring-row strong { color: var(--ink); }
.ring-row small { color: var(--muted); }
.ring { --p: 0; flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%;
    background: radial-gradient(closest-side, #fff 78%, transparent 80% 100%), conic-gradient(var(--brand) calc(var(--p) * 1%), #eceaf0 0); }
.ring b { font-size: .95rem; color: var(--brand-700); direction: ltr; }
.state-dot { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--brand-50); color: var(--brand); font-size: 1.5rem; }
.includes { list-style: none; padding: .85rem 0 0; margin: 0; border-top: 1px dashed var(--line); display: grid; gap: .45rem; font-size: .88rem; }
.includes li { display: flex; align-items: center; gap: .5rem; }
.includes .ti { color: var(--brand); font-size: 1.1rem; }

.section-nav { position: sticky; top: var(--nav-h); z-index: 3; display: flex; gap: .35rem; overflow-x: auto; margin-block: 1.25rem; padding: .4rem;
    background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px); border-radius: 999px; box-shadow: var(--shadow-sm); scrollbar-width: none; }
.section-nav a { display: inline-flex; align-items: center; gap: .3rem; padding: .4rem .9rem; border-radius: 999px; font-size: .88rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.section-nav a:hover { background: var(--brand-50); color: var(--brand-700); }
.course-section { margin-top: 1.25rem; padding: 1.5rem; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid #eeedf2; }
.course-section > h2 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: 1.2rem; margin: 0 0 1.1rem; }
.course-section > h2 > .ti { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand-50); color: var(--brand); font-size: 1.2rem; }
.course-section > h2 small { margin-inline-start: auto; font-size: .82rem; color: var(--muted); font-family: font-regular, "tahoma", serif; }
.description { white-space: pre-line; line-height: 2; }
.place { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.place > div { flex: 1; min-width: 0; }
.place-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 1.4rem; }
.stack-form { display: grid; gap: .5rem; margin-top: 1rem; }
.stack-form .form-label { margin: .25rem 0 0; font-weight: 600; color: var(--ink); }
.stack-form .btn { justify-self: start; margin-top: .35rem; }

/* Lessons and assignments: an accordion curriculum */
.curriculum, .lessons { display: grid; gap: .55rem; }
.lesson { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.lesson[open] { border-color: var(--brand-100); box-shadow: var(--shadow-sm); }
.lesson summary { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; padding: .8rem 1rem; cursor: pointer; list-style: none; border-radius: var(--radius); }
.lesson summary::-webkit-details-marker { display: none; }
.lesson summary:hover { background: #fafafb; }
.lesson.locked summary { cursor: default; }
.lesson .check { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #f1f0f4; color: var(--text); font-weight: 700; font-size: .85rem; }
.lesson.done .check { background: var(--brand); color: #fff; }
.lesson.locked .check { background: #f6f6f8; color: #9a97a8; }
.lesson .check.pill-success { background: var(--brand); color: #fff; }
.lesson .check.pill-info { background: var(--info-soft); color: var(--info); }
.lesson .check.pill-warning { background: var(--warn-soft); color: var(--warn); }
.lesson .check.pill-danger { background: var(--danger-soft); color: var(--danger); }
.lesson .check.pill-muted { background: #f1f0f4; color: var(--text); }
.lesson-title { flex: 1 1 12rem; min-width: 0; color: var(--ink); font-weight: 600; }
.lesson.locked .lesson-title { color: var(--muted); font-weight: 400; }
.lesson-time { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.lesson-type { color: var(--muted); }
.lesson-caret { color: var(--muted); transition: transform .2s; }
.lesson[open] .lesson-caret { transform: rotate(180deg); }
.lesson-body { padding: .25rem 1rem 1rem; display: grid; gap: .85rem; }
.lesson-body video, .lesson-body iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); background: #000; }
.lesson-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.lesson-actions form { margin: 0; }
.mini-facts { display: flex; flex-wrap: wrap; gap: .35rem 1rem; list-style: none; padding: 0; margin: 0; font-size: .85rem; color: var(--muted); }
.mini-facts li { display: inline-flex; align-items: center; gap: .25rem; }
.mini-facts li.late { color: var(--danger); font-weight: 700; }
.grade { display: flex; align-items: center; gap: 1rem; padding: .8rem 1rem; border-radius: var(--radius); }
.grade.is-pass { background: var(--brand-50); color: var(--brand-800); }
.grade.is-fail { background: var(--danger-soft); color: #9f2526; }
.grade-num { display: grid; justify-items: center; line-height: 1.2; padding-inline-end: 1rem; border-inline-end: 1px solid currentColor; }
.grade-num b { font-size: 1.6rem; }
.grade-num small { font-size: .75rem; opacity: .8; }
.feedback { display: flex; gap: .65rem; padding: .8rem 1rem; border-radius: var(--radius); background: var(--info-soft); color: #075866; }
.feedback .ti { font-size: 1.3rem; }
.feedback small { display: block; font-weight: 700; }
.handed { padding: .8rem 1rem; border-radius: var(--radius); background: var(--page); border: 1px solid var(--line); display: grid; gap: .4rem; }
.handed-photo { max-width: 100%; max-height: 20rem; border-radius: var(--radius-sm); justify-self: start; }

.exam-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.exam-stats li { display: grid; justify-items: center; padding: .75rem .5rem; border-radius: var(--radius); background: var(--page); text-align: center; }
.exam-stats b { font-size: 1.3rem; color: var(--ink); direction: ltr; }
.exam-stats span { font-size: .8rem; color: var(--muted); }

/* ---------- Sign-in, checkout, verify ---------- */
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 940px; margin: 1.5rem auto; border-radius: var(--radius-lg);
    overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg); }
.auth-side { position: relative; padding: 2.5rem 2rem; color: #e3f3e8; background: radial-gradient(90% 90% at 0 0, rgba(80, 210, 125, .35), transparent 60%), linear-gradient(160deg, #0d381b, #1d7f3d); }
.auth-side h2 { color: #fff; font-size: 1.4rem; margin: 0 0 1.25rem; }
.auth-side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.auth-side li { display: flex; gap: .75rem; align-items: flex-start; }
.auth-side li .ti { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.12); color: #a9efc0; font-size: 1.2rem; }
.auth-side li b { display: block; color: #fff; }
.auth-side li span { font-size: .85rem; opacity: .85; }
.auth-main { padding: 2.5rem 2rem; display: grid; align-content: center; gap: .9rem; }
.auth-main h1 { font-size: 1.4rem; margin: 0; }
.auth-main p { margin: 0; }
.auth-main form { display: grid; gap: .75rem; margin: 0; }
.auth-badge { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--brand-50); color: var(--brand); font-size: 1.7rem; }
.steps { display: flex; align-items: center; gap: .5rem; list-style: none; padding: 0; margin: 0; font-size: .82rem; color: var(--muted); }
.steps li { display: inline-flex; align-items: center; gap: .35rem; }
.steps li + li::before { content: ""; width: 24px; height: 2px; background: var(--line); border-radius: 2px; }
.steps b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #f1f0f4; color: var(--muted); font-size: .78rem; }
.steps .on { color: var(--ink); font-weight: 700; }
.steps .on b { background: var(--brand); color: #fff; }
.steps .ok b { background: var(--brand-100); color: var(--brand-700); }
.code-input { font-size: 1.6rem !important; letter-spacing: .6em; text-align: center !important; font-weight: 700; padding-inline-start: .6em; }
.auth-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; font-size: .9rem; }
.auth-links form { margin: 0; }
.teacher-note { display: flex; gap: .5rem; align-items: center; padding: .7rem .9rem; border-radius: var(--radius-sm); background: var(--page); font-size: .85rem; color: var(--muted); }
.teacher-note .ti { color: var(--brand); font-size: 1.2rem; }

.auth-box { max-width: 460px; margin: 2rem auto; padding: 2rem; border: 0; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lg); display: grid; gap: .85rem; }
.auth-box.wide { max-width: 620px; }
.auth-box h1 { font-size: 1.3rem; margin: 0; }
.auth-box form { display: grid; gap: .65rem; margin: 0; }
.auth-box label { display: grid; gap: .3rem; font-weight: 600; color: var(--ink); font-size: .9rem; }
.auth-box p { margin: 0; }
.auth-box .alert { margin: 0; }
.resend { margin-top: 10px; }
.order-summary { display: flex; align-items: center; gap: 1rem; padding: 1rem; border-radius: var(--radius); background: var(--page); }
.order-summary .ti { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--brand-50); color: var(--brand); font-size: 1.5rem; }
.order-summary > div { flex: 1; min-width: 0; }
.order-summary strong { display: block; color: var(--ink); }
.order-total { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; padding-block: .25rem; }
.order-total span { color: var(--muted); }
.transfer, .voucher { padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
.transfer[open], .voucher[open] { border-color: var(--brand-100); background: #fcfdfc; }
.transfer summary, .voucher summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.transfer > * + *, .voucher > * + * { margin-top: .75rem; }
.inline-form { display: flex !important; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.inline-form input { flex: 1 1 160px; min-width: 0; }
.card-number { font-size: 1.3rem; font-weight: 700; letter-spacing: 1px; text-align: center; padding: .75rem; background: var(--page); border-radius: var(--radius-sm); border: 1px dashed var(--line); }
.verify-result { display: flex; gap: .75rem; align-items: flex-start; padding: 1rem; border-radius: var(--radius); }
.verify-result.ok { background: var(--brand-50); color: var(--brand-800); }
.verify-result.bad { background: var(--danger-soft); color: #9f2526; }
.verify-result .ti { font-size: 1.6rem; }
.verify-result dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .75rem; margin: .5rem 0 0; font-size: .9rem; }
.verify-result dt { font-weight: 400; opacity: .8; }
.verify-result dd { margin: 0; font-weight: 700; }

/* ---------- Exam ---------- */
.exam-bar { position: sticky; top: var(--nav-h); z-index: 3; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .85rem 1.1rem; margin-bottom: 1rem; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.exam-bar h1 { font-size: 1.1rem; margin: 0; }
.exam-timer { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .85rem; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-weight: 700; }
.exam-timer.low { background: var(--danger-soft); color: var(--danger); }
.question { border: 1px solid var(--line); border-radius: var(--radius); margin-block: 0 1rem; padding: 1.1rem 1.25rem; background: var(--surface); box-shadow: var(--shadow-sm); }
.question legend { float: none; width: auto; display: flex; gap: .6rem; align-items: flex-start; font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: .75rem; padding: 0; }
.q-num { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .85rem; }
.option { display: flex; gap: .65rem; align-items: center; padding: .65rem .85rem; margin-top: .45rem; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; transition: border-color .15s, background .15s; }
.option:hover { border-color: var(--brand-100); background: #fafcfb; }
.option:has(input:checked) { border-color: var(--brand); background: var(--brand-50); color: var(--ink); }
.option input { flex: none; margin: 0; width: 1.15rem; height: 1.15rem; accent-color: var(--brand); }

/* ---------- Certificate and ticket ---------- */
.certificate { position: relative; max-width: 760px; margin: 1.5rem auto; padding: 3rem 2.5rem 2.25rem; text-align: center; background: #fffdf7;
    border-radius: 6px; box-shadow: var(--shadow-lg); outline: 2px solid #c9a227; outline-offset: -14px; border: 6px solid #fff; }
.certificate::before { content: ""; position: absolute; inset: 22px; border: 1px solid rgba(201, 162, 39, .45); pointer-events: none; }
.certificate h1 { font-size: 2rem; margin: .5rem 0 1rem; color: var(--brand-900); font-family: font-extra-bold, "tahoma", serif; }
.certificate p { margin: .35rem 0; color: var(--text); }
.cert-seal { display: grid; place-items: center; width: 74px; height: 74px; margin: 0 auto .5rem; border-radius: 50%; color: #fff; font-size: 2.2rem;
    background: radial-gradient(circle at 30% 30%, #f4d36b, #c9a227 60%, #a07f12); box-shadow: 0 0 0 5px #fff4d1, 0 6px 14px rgba(160, 127, 18, .35); }
.cert-store, .ticket-store { font-weight: 800; color: var(--brand-dark); letter-spacing: .02em; }
.cert-name, .ticket-name { font-size: 1.75rem; font-weight: 800; color: var(--ink); }
.certificate .cert-name { display: inline-block; padding: 0 1.5rem .25rem; border-bottom: 2px solid #e7d7a1; margin-block: .25rem .5rem; }
.cert-course { font-size: 1.2rem; font-weight: 700; color: var(--brand-800); }
.cert-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 2rem; padding-top: 1rem; border-top: 1px dashed #e2d6ae; color: var(--muted); font-size: .9rem; }
.cert-verify { margin-top: 8px; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 1rem; }
.ticket { position: relative; max-width: 480px; margin: 1.5rem auto; padding: 1.75rem 1.5rem; background: var(--surface); border-radius: var(--radius-lg); text-align: center;
    box-shadow: var(--shadow-lg); border-top: 6px solid var(--workshop); }
.ticket h1 { font-size: 1.25rem; margin: 6px 0; }
.ticket-qr { width: min(240px, 100%); display: block; margin: 1rem auto .25rem; padding: .5rem; border-radius: var(--radius); border: 1px solid var(--line); }
.ticket-code { font-size: 1.25rem; font-weight: 700; letter-spacing: 3px; }
.ticket ul { list-style: none; padding: 0; color: var(--muted); }
.ticket-cut { position: relative; margin: 1.25rem -1.5rem; border-top: 2px dashed var(--line); }
.ticket-cut::before, .ticket-cut::after { content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--page); }
.ticket-cut::before { inset-inline-start: -12px; }
.ticket-cut::after { inset-inline-end: -12px; }

/* ---------- The classroom ---------- */
.room { position: fixed; inset: 0; background: #0f1714; color: #eef3f0; display: flex; }
.room a { color: #9fdcc4; }
.room .hint { color: #a9b8b1; }
.lobby { margin: auto; max-width: 460px; padding: 2rem; text-align: center; display: grid; gap: 12px; }
.room .lobby { background: #16211d; border: 1px solid #2a3a33; border-radius: var(--radius-lg); box-shadow: 0 1.5rem 3rem rgba(0,0,0,.4); }
.lobby-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; background: rgba(62, 207, 155, .14); color: #3ecf9b; font-size: 2rem; animation: lms-pulse-green 2s infinite; }
@keyframes lms-pulse-green { 0% { box-shadow: 0 0 0 0 rgba(62, 207, 155, .4); } 70% { box-shadow: 0 0 0 16px rgba(62, 207, 155, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 207, 155, 0); } }
.lobby h1 { font-size: 1.4rem; margin: 0; color: #fff; }
.lobby p { margin: 0; }
.stage { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.room-top { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; padding: 8px 14px; }
.room-body { flex: 1; display: flex; min-height: 0; }
.tiles { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); grid-auto-rows: minmax(160px, 1fr); gap: 8px; padding: 8px; overflow: auto; }
.tile-video { position: relative; margin: 0; border-radius: 10px; overflow: hidden; background: #1d2a25; min-height: 150px; border: 2px solid transparent; }
.tile-video.speaking { border-color: #3ecf9b; }
.tile-video.screen { grid-column: 1 / -1; grid-row: span 2; }
.tile-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-video.screen video { object-fit: contain; background: #000; }
.tile-video.no-video video { visibility: hidden; }
.tile-video figcaption { position: absolute; inset-block-end: 6px; inset-inline-start: 6px; padding: 1px 8px; border-radius: 6px; background: rgba(0, 0, 0, .6); font-size: .85rem; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side { width: 300px; flex: none; display: flex; flex-direction: column; border-inline-start: 1px solid #2a3a33; min-height: 0; }
.side-tabs { display: flex; gap: 6px; padding: 8px; }
.chip { flex: 1; padding: 4px 8px; border: 1px solid #2a3a33; border-radius: 8px; background: none; color: inherit; font: inherit; cursor: pointer; }
.chip.active { background: #1d2a25; }
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
#messages { flex: 1; list-style: none; margin: 0; padding: 8px; overflow: auto; }
#messages li { margin-block-end: 8px; overflow-wrap: anywhere; }
#messages strong { display: block; font-size: .8rem; color: #9fdcc4; }
#chat-form { display: flex; gap: 6px; padding: 8px; }
#chat-form input { background: #1d2a25; color: inherit; border-color: #2a3a33; }
.people { list-style: none; margin: 0; padding: 8px; overflow: auto; }
.people li { display: flex; gap: 10px; align-items: center; padding-block: 6px; }
.people li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.people .link { color: #9fdcc4; font-size: .85rem; }
.room-bar { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 10px; background: #16211d; }
.room-bar .btn { background: #22312b; border-color: #2f4239; color: inherit; }
.room-bar .btn.on { background: var(--brand); border-color: var(--brand); }
.room-bar .btn-danger { background: var(--danger); border-color: var(--danger); }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .lms-hero { grid-template-columns: minmax(0, 1fr); }
    .hero-art { display: none; }
    .course-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "aside" "main"; }
    .course-aside { position: static; margin-top: -3rem; padding-inline: 1rem; }
    .enrol-card { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
    .enrol-card .course-media { aspect-ratio: auto; min-height: 100%; border-bottom: 0; border-inline-end: 1px solid var(--line); }
    .auth-wrap { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
    .auth-side { display: none; }
}
@media (max-width: 820px) {
    .course-head { grid-template-columns: minmax(0, 1fr); }
    .side { position: absolute; inset: 0 0 60px 0; width: auto; background: #0f1714; z-index: 2; }
}
@media (max-width: 640px) {
    /* 16px stops iOS from zooming into a focused field. */
    .form-control, .form-select { font-size: 16px; }
    .site-main { padding-block: 1rem 3rem; }
    .lms-hero { padding: 1.5rem 1.25rem; border-radius: var(--radius); }
    .hero-actions .btn { flex: 1 1 auto; }
    .course-grid, .grid { grid-template-columns: minmax(0, 1fr); }
    .section-head h2 { font-size: 1.12rem; }
    .cert-band { flex-direction: column; text-align: center; padding: 1.5rem 1.25rem; }
    .page-band { padding: 1.1rem; gap: .85rem; }
    .band-icon { width: 48px; height: 48px; font-size: 1.4rem; border-radius: 14px; }
    .band-text h1 { font-size: 1.25rem; }
    .catalog-search { flex-basis: 100%; }
    .dash-head { padding: 1.1rem; }
    .dash-stats { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
    .dash-stats li { min-width: 0; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: .6rem .3rem; }
    .dash-stats .ti { grid-row: auto; width: 34px; height: 34px; font-size: 1.1rem; margin-bottom: .2rem; }
    .next-step { flex-wrap: wrap; padding: 1rem; }
    .next-step .btn { width: 100%; }
    .course-hero { border-radius: var(--radius); padding-bottom: 3.75rem; }
    .course-aside { padding-inline: .5rem; }
    .enrol-card { display: block; }
    .enrol-card .course-media { display: none; }
    .course-section { padding: 1.1rem; border-radius: var(--radius); }
    .lesson summary { padding: .75rem; gap: .5rem; }
    .lesson-body { padding: .25rem .75rem .9rem; }
    .exam-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .session-row { flex-wrap: wrap; }
    .session-row .btn { width: 100%; }
    .auth-main, .auth-box { padding: 1.4rem 1.1rem; }
    .auth-wrap, .auth-box { margin-block: .75rem; }
    .certificate { padding: 2.25rem 1.25rem 1.75rem; }
    .certificate h1 { font-size: 1.5rem; }
    .cert-name { font-size: 1.35rem; }
    .ticket { padding: 1.25rem 1rem; }
    .ticket-cut { margin-inline: -1rem; }
    .sessions li { flex-direction: column; align-items: stretch; }
    .sessions li .btn { width: 100%; }
    .card-number { font-size: 1.1rem; overflow-wrap: anywhere; }
}

/* Forms on phones and touch screens */
input[dir="ltr"] { text-align: left; }
input[dir="ltr"]::placeholder { direction: rtl; text-align: right; }
@media (pointer: coarse) {
    .btn:not(.btn-sm), .form-control, .form-select { min-height: 44px; }
    .option { min-height: 48px; }
}

@media print {
    .layout-navbar, .landing-footer, .no-print, .crumbs { display: none !important; }
    body, .site-main { background: #fff; padding: 0; }
    .certificate, .ticket { box-shadow: none; margin: 0 auto; }
}
