/* Coledra Academy — LMS
   Brand: Coledra blue #0061a0 · deep navy #0a3454 · lime green #a4ce4e (from coledra.com)
   Type:  Sora (headings) + Manrope (body), matching the Coledra corporate site. */
:root {
  /* brand */
  --brand: #0061a0;
  --brand-2: #004f84;          /* hover / pressed */
  --navy: #0a3454;
  --navy-2: #123a5a;
  --brand-soft: #e8f2fa;
  --lime: #a4ce4e;
  --lime-2: #93be3c;           /* hover */
  --lime-soft: #eef6dc;
  --lime-ink: #3d5a10;         /* readable text on lime-soft */
  /* neutrals */
  --ink: #112538;
  --ink-2: #4b6275;
  --ink-3: #7d8fa0;
  --bg: #f4f8fb;
  --surface: #ffffff;
  --surface-2: #f6f9fc;
  --line: #dde7ef;
  --line-2: #eaf0f5;
  /* status */
  --good: #3b8a1f;
  --good-soft: #eaf5dd;
  --bad: #c0392b;
  --bad-soft: #fdecea;
  /* legacy aliases used by inline styles */
  --accent: var(--lime);
  --accent-soft: var(--lime-soft);
  --gold: var(--lime);
  /* shape */
  --radius: 14px;
  --shadow: 0 1px 2px rgba(6,34,54,.05), 0 10px 28px rgba(6,34,54,.07);
  --shadow-lg: 0 2px 4px rgba(6,34,54,.06), 0 22px 48px rgba(6,34,54,.12);
  /* type */
  --display: "Sora", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --sans: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: var(--display); /* alias kept for older markup */
  --mono: ui-monospace, "Cascadia Code", Consolas, Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.65 var(--sans); font-weight: 500; color: var(--ink); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
main { flex: 1; padding-block: 30px 64px; outline: none; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-2); }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; color: var(--ink); font-weight: 700; }
h1 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); }
h2 { font-size: 1.35rem; font-weight: 650; }
h3 { font-size: 1.08rem; font-weight: 650; }
p { margin: 0 0 1em; }
img { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--lime-soft); color: var(--navy); }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
.muted { color: var(--ink-2); }
.small { font-size: .86rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 18px; }
.grow { flex: 1; }

/* ───────── Top bar ───────── */
.topbar { background: rgba(255,255,255,.94); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
  position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand-logo { width: 44px; height: 42px; object-fit: contain; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.32rem; letter-spacing: -.02em; color: var(--navy); }
.brand-sub { font-family: var(--sans); font-weight: 700; font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brand); margin-top: 4px; }
.brand-sub b { color: var(--lime-2); font-weight: 800; }
.nav { display: flex; gap: 2px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.nav a, .nav button.linklike { color: var(--ink-2); text-decoration: none; padding: 8px 13px; border-radius: 10px; font: 600 .92rem var(--sans); background: none; border: 0; cursor: pointer; position: relative; }
.nav a:hover, .nav button.linklike:hover { background: var(--brand-soft); color: var(--brand); }
.nav a.active { color: var(--brand); background: var(--brand-soft); }
.nav a.active::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--lime); }
.nav .user-chip { display: flex; align-items: center; gap: 8px; }
.nav .user-chip.active::after { display: none; }
.nav a.btn.accent { color: var(--navy); margin-left: 6px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--lime-soft), #dcedb8); color: var(--navy); display: inline-grid; place-items: center;
  font: 700 .76rem var(--sans); flex: none; box-shadow: inset 0 0 0 1px rgba(10,52,84,.08); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--navy); border-radius: 10px; padding: 6px 11px; font-size: 1.1rem; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 72px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    flex-direction: column; align-items: stretch; padding: 10px 16px 16px; }
  .nav.open { display: flex; }
  .nav a.active::after { display: none; }
}

/* ───────── Buttons & forms ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 11px; padding: 10px 18px;
  font: 700 .92rem var(--sans); letter-spacing: .005em; cursor: pointer; text-decoration: none; transition: background .15s, transform .05s, box-shadow .15s, border-color .15s;
  background: var(--brand); color: #fff; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,97,160,.18); }
.btn:hover { background: var(--brand-2); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.accent { background: var(--lime); color: var(--navy); box-shadow: 0 1px 2px rgba(61,90,16,.2); }
.btn.accent:hover { background: var(--lime-2); color: var(--navy); }
.btn.ghost { background: #fff; color: var(--brand); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--brand-soft); border-color: #c6dcec; }
.btn.danger { background: #fff; color: var(--bad); border-color: #f2c9c4; box-shadow: none; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.sm { padding: 6px 11px; font-size: .8rem; border-radius: 9px; }
.btn.lg { padding: 13px 24px; font-size: .98rem; border-radius: 12px; }
.icon-btn { background: #fff; border: 1px solid var(--line); border-radius: 9px; width: 30px; height: 30px; cursor: pointer; color: var(--ink-2); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.icon-btn:disabled { opacity: .4; cursor: default; }
label { display: block; font-weight: 700; font-size: .86rem; margin-bottom: 6px; color: var(--ink); }
.field { margin-bottom: 18px; }
.hint { font-weight: 500; color: var(--ink-3); font-size: .8rem; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; font: 500 .95rem var(--sans); background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(0,97,160,.12); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid rgba(164,206,78,.7); outline-offset: 2px; }
textarea { min-height: 120px; resize: vertical; }
textarea.code { font-family: var(--mono); font-size: .86rem; min-height: 320px; }
input[type=color] { width: 54px; height: 42px; border: 1px solid var(--line); border-radius: 11px; padding: 3px; background: #fff; }
input[type=radio], input[type=checkbox] { accent-color: var(--brand); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; }

/* ───────── Cards & layout ───────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card.flush { padding: 0; overflow: hidden; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 36px 0 14px; flex-wrap: wrap; }
.section-title h2 { margin: 0; }
.section-title a { font-weight: 700; text-decoration: none; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); letter-spacing: .01em; white-space: nowrap; }
.badge.accent { background: var(--lime-soft); color: var(--lime-ink); }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.gray { background: #edf1f5; color: var(--ink-2); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.empty { text-align: center; padding: 52px 20px; color: var(--ink-2); }
.empty .big { font-size: 2.4rem; margin-bottom: 6px; }

/* ───────── Hero ───────── */
.stats-strip { display: flex; gap: 38px; margin-top: 26px; flex-wrap: wrap; }
.stats-strip b { font-family: var(--display); font-size: 1.75rem; display: block; color: var(--navy); letter-spacing: -.02em; }
.stats-strip > div { border-left: 3px solid var(--lime); padding-left: 12px; }
/* ---------- home hero carousel ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hero-slider { position: relative; height: clamp(440px, 46vw, 580px); border-radius: 24px; overflow: hidden; background: var(--navy); box-shadow: var(--shadow-lg); margin-top: 8px; isolation: isolate; touch-action: pan-y; }
.hs-track, .hs-slide { position: absolute; inset: 0; }
.hs-slide { opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s linear .9s; }
.hs-slide.is-active { opacity: 1; visibility: visible; transition: opacity .9s ease, visibility 0s; z-index: 1; }
.hs-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 78% 30%; transform: scale(1.07); transition: transform 8s ease-out; user-select: none; -webkit-user-drag: none; }
.hs-slide.is-active img { transform: scale(1); }
.hs-slide::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(10,52,84,.97) 0%, rgba(10,52,84,.93) 36%, rgba(10,52,84,.5) 56%, rgba(10,52,84,0) 72%),
              radial-gradient(circle at 8% 110%, rgba(164,206,78,.35), transparent 40%); }
.hs-content { position: relative; z-index: 2; height: 100%; max-width: 580px; padding: 48px 56px 84px; display: flex; flex-direction: column; justify-content: center; color: #fff; }
.hs-content > * { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.hs-slide.is-active .hs-content > * { opacity: 1; transform: none; }
.hs-slide.is-active .hs-content > :nth-child(2) { transition-delay: .12s; }
.hs-slide.is-active .hs-content > :nth-child(3) { transition-delay: .22s; }
.hs-slide.is-active .hs-content > :nth-child(4) { transition-delay: .32s; }
.hs-tag { align-self: flex-start; font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); background: var(--lime); padding: 6px 13px; border-radius: 999px; }
.hs-content h2 { color: #fff; font-size: clamp(2rem, 3.9vw, 3.15rem); line-height: 1.08; letter-spacing: -.035em; margin: 18px 0 14px; }
.hs-content h2 span { color: var(--lime); }
.hs-content p { font-size: 1.08rem; line-height: 1.6; color: rgba(255,255,255,.86); max-width: 33em; margin: 0 0 26px; }
.btn.on-dark { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.45); box-shadow: none; backdrop-filter: blur(4px); }
.btn.on-dark:hover { background: rgba(255,255,255,.18); color: #fff; }
.hs-controls { position: absolute; z-index: 3; left: 56px; bottom: 30px; display: flex; align-items: center; gap: 14px; }
.hs-dots { display: flex; gap: 8px; }
.hs-dot { position: relative; width: 10px; height: 10px; padding: 0; border-radius: 999px; border: 0; background: rgba(255,255,255,.4); cursor: pointer; overflow: hidden; transition: width .35s ease, background .2s; }
.hs-dot:hover { background: rgba(255,255,255,.7); }
.hs-dot[aria-current] { width: 38px; background: rgba(255,255,255,.3); }
.hs-dot[aria-current]::after { content: ""; position: absolute; inset: 0; background: var(--lime); border-radius: inherit; transform-origin: left; transform: scaleX(1); }
.hero-slider.hs-running.hs-tick .hs-dot[aria-current]::after { animation: hs-fill var(--hs-interval, 6500ms) linear forwards; }
@keyframes hs-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hs-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(10,52,84,.45); color: #fff; font-size: 1.3rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; backdrop-filter: blur(6px); transition: background .2s, border-color .2s; }
.hs-btn:hover { background: var(--lime); border-color: var(--lime); color: var(--navy); }
.hs-pause { width: 32px; height: 32px; font-size: .7rem; letter-spacing: -1px; }
.hs-arrows { position: absolute; z-index: 3; right: 28px; bottom: 26px; display: flex; gap: 10px; }
.hero-stats { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; padding: 26px 4px 6px; }
.hero-stats > p { margin: 0; max-width: 34em; font-size: 1.02rem; }
.hero-stats .stats-strip { margin-top: 0; }
@media (max-width: 760px) {
  .hero-slider { height: 660px; border-radius: 18px; }
  .hs-slide img { object-position: 80% 30%; height: 40%; }
  .hs-slide::after { background: linear-gradient(0deg, rgba(10,52,84,1) 0%, rgba(10,52,84,1) 58%, rgba(10,52,84,.6) 64%, rgba(10,52,84,0) 72%); }
  .hs-content { justify-content: flex-end; padding: 20px 22px 80px; }
  .hs-content h2 { font-size: 1.8rem; margin: 14px 0 10px; }
  .hs-content p { font-size: .97rem; margin-bottom: 20px; }
  .hs-content .row { gap: 10px; flex-wrap: wrap; }
  .hs-content .btn.lg { padding: 11px 15px; font-size: .9rem; }
  .hs-controls { left: 22px; bottom: 24px; }
  .hs-arrows { right: 18px; bottom: 20px; }
  .hs-arrows .hs-btn { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .hs-slide, .hs-slide img, .hs-content > *, .hs-dot { transition: none !important; }
  .hs-slide img { transform: none; }
}

/* ───────── Course cards ───────── */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 22px; }
.course-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s, border-color .18s; }
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #c9dbe9; color: inherit; }
.cover { height: 136px; display: grid; place-items: center; font-size: 3rem; position: relative; overflow: hidden; }
.cover::after { content: ""; position: absolute; width: 160px; height: 160px; right: -50px; bottom: -70px; border-radius: 50%; border: 14px solid rgba(255,255,255,.16); }
.cover .badge { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.95); color: var(--navy); z-index: 1; }
.cover .badge.right { left: auto; right: 12px; }
.cover .badge.good { color: var(--good); }
.course-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.course-card h3 { margin: 0; font-size: 1.06rem; line-height: 1.3; }
.course-card .meta { display: flex; gap: 12px; font-size: .8rem; color: var(--ink-2); margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-2); flex-wrap: wrap; font-weight: 600; }
.stars { color: #e3a008; letter-spacing: 1px; }

/* ───────── Filters & chips ───────── */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.filters input[type=search] { flex: 2 1 240px; }
.filters select { flex: 1 1 150px; width: auto; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { text-decoration: none; border: 1px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 999px; cursor: pointer; font: 600 .86rem var(--sans); color: var(--ink-2); transition: all .15s; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ───────── Course detail ───────── */
.course-hero { border-radius: 22px; color: #fff; padding: 38px; display: grid; grid-template-columns: 1fr 330px; gap: 32px; align-items: start; position: relative; overflow: hidden; }
.course-hero::after { content: ""; position: absolute; width: 380px; height: 380px; left: -140px; bottom: -220px; border-radius: 50%; border: 22px solid rgba(255,255,255,.08); pointer-events: none; }
.course-hero h1 { color: #fff; }
.course-hero a { color: #fff; }
.course-hero .summary { font-size: 1.08rem; opacity: .92; max-width: 40em; }
.course-hero .facts { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; font-size: .9rem; opacity: .95; font-weight: 600; }
.course-hero .panel { background: #fff; color: var(--ink); border-radius: 18px; padding: 24px; box-shadow: 0 18px 44px rgba(6,34,54,.28); position: relative; z-index: 1; }
.course-hero .panel a { color: inherit; }
.course-hero .panel a.btn { color: #fff; }
.course-hero .panel a.btn.accent { color: var(--navy); }
.course-hero .panel a.btn.ghost { color: var(--brand); }
.course-hero .panel .big-icon { font-size: 3rem; text-align: center; }
@media (max-width: 900px) { .course-hero { grid-template-columns: 1fr; padding: 26px; } }
.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 26px; margin-top: 26px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.curriculum .module { border-bottom: 1px solid var(--line); }
.curriculum .module:last-child { border-bottom: 0; }
.curriculum .module-head { padding: 14px 20px; background: var(--surface-2); display: flex; justify-content: space-between; gap: 10px; font-weight: 700; color: var(--navy); }
.curriculum .lesson { display: flex; gap: 12px; align-items: center; padding: 11px 20px; border-top: 1px solid var(--line-2); color: inherit; text-decoration: none; }
a.lesson:hover { background: var(--brand-soft); color: inherit; }
.lesson .ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .76rem; background: #edf2f6; flex: none; }
.lesson .ico.done { background: var(--good); color: #fff; }
.lesson .dur { margin-left: auto; color: var(--ink-3); font-size: .8rem; white-space: nowrap; font-weight: 600; }

/* ───────── Progress ───────── */
.progress { height: 8px; background: #e6edf3; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--lime-2), var(--lime)); border-radius: 999px; transition: width .4s; }
.progress.brand > span { background: linear-gradient(90deg, var(--brand), #2a86c4); }

/* ───────── Reviews ───────── */
.review { padding: 15px 0; border-top: 1px solid var(--line); }
.review:first-child { border-top: 0; }
.star-input { display: flex; gap: 4px; flex-direction: row-reverse; justify-content: flex-end; }
.star-input input { display: none; }
.star-input label { font-size: 1.7rem; color: #d3dbe2; cursor: pointer; margin: 0; line-height: 1; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: #e3a008; }

/* ───────── Lesson player ───────── */
.player { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.player aside { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; }
.player aside .lesson { padding: 9px 14px; font-size: .88rem; }
.player aside .lesson.current { background: var(--brand-soft); font-weight: 700; box-shadow: inset 3px 0 0 var(--lime); }
.player aside .module-head { padding: 10px 14px; font-size: .86rem; }
@media (max-width: 900px) { .player { grid-template-columns: 1fr; } .player aside { position: static; max-height: none; } }
.lesson-body { padding: 36px clamp(20px, 5vw, 50px); }
.crumbs { font-size: .84rem; color: var(--ink-3); margin-bottom: 8px; font-weight: 600; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 18px clamp(20px, 5vw, 50px); background: var(--surface-2); flex-wrap: wrap; }
.video { position: relative; padding-top: 56.25%; border-radius: 14px; overflow: hidden; background: #000; margin-bottom: 22px; box-shadow: var(--shadow); }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ───────── Prose (rendered Markdown) ───────── */
.prose { font-size: 1.02rem; line-height: 1.78; max-width: 46em; color: #1d3346; }
.prose h1 { font-size: 1.85rem; }
.prose h2 { font-size: 1.32rem; margin-top: 1.7em; }
.prose h3 { margin-top: 1.4em; }
.prose strong { color: var(--ink); font-weight: 800; }
.prose code { font-family: var(--mono); font-size: .86em; background: #edf3f8; color: var(--navy); padding: 2px 6px; border-radius: 6px; }
.prose pre { background: var(--navy); color: #e3eef7; padding: 16px 18px; border-radius: 12px; overflow-x: auto; line-height: 1.55; }
.prose pre code { background: none; padding: 0; color: inherit; font-size: .86rem; }
.prose blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 4px solid var(--lime); background: var(--lime-soft); border-radius: 0 12px 12px 0; color: #2c4410; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose .lesson-figure { margin: 1.4em 0; }
.prose .lesson-figure img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.prose .lesson-figure figcaption { margin-top: 8px; font-size: .86rem; color: var(--ink-2); text-align: center; }
.prose li::marker { color: var(--brand); }

/* ───────── Quiz ───────── */
.question { border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; background: #fff; }
.question .q { font-weight: 700; margin-bottom: 10px; }
.option { display: flex; gap: 10px; align-items: center; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; margin-top: 8px; cursor: pointer; font-weight: 600; transition: border-color .15s, background .15s; }
.option:hover { background: var(--surface-2); border-color: #c6dcec; }
.option.correct { border-color: var(--good); background: var(--good-soft); }
.option.wrong { border-color: var(--bad); background: var(--bad-soft); }
.result-banner { padding: 18px 20px; border-radius: 14px; margin-bottom: 18px; display: flex; gap: 14px; align-items: center; }
.result-banner.pass { background: var(--good-soft); color: var(--good); }
.result-banner.fail { background: var(--bad-soft); color: var(--bad); }
.result-banner b { font-size: 1.6rem; font-family: var(--display); }

/* ───────── Dashboard ───────── */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--lime); }
.tile .label { font-size: .74rem; color: var(--ink-2); font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.tile .value { font-family: var(--display); font-size: 1.9rem; font-weight: 700; margin-top: 4px; color: var(--navy); letter-spacing: -.02em; }
.tile .sub { font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.list-item { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.list-item:first-child { border-top: 0; }
.thumb { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.5rem; flex: none; }
.welcome { background: radial-gradient(circle at 92% 10%, rgba(164,206,78,.45), transparent 38%), linear-gradient(120deg, var(--navy), var(--brand));
  color: #fff; border-radius: 22px; padding: 30px 32px; margin-bottom: 24px; position: relative; overflow: hidden; }
.welcome::after { content: ""; position: absolute; width: 260px; height: 260px; right: -70px; bottom: -150px; border-radius: 50%; border: 18px solid rgba(164,206,78,.3); }
.welcome h1 { color: #fff; margin-bottom: 4px; }
.welcome p { margin: 0; opacity: .9; }
.welcome .btn { position: relative; z-index: 1; }

/* ───────── Tables ───────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); font-weight: 800; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcfe; }
td .progress { min-width: 90px; }

/* ───────── Tabs ───────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; overflow-y: hidden; }
.tabs a { padding: 11px 16px; text-decoration: none; color: var(--ink-2); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--brand); }
.tabs a.active { color: var(--brand); border-color: var(--lime); }

/* ───────── Curriculum builder ───────── */
.builder-module { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; background: #fff; overflow: hidden; }
.builder-module > .head { display: flex; gap: 8px; align-items: center; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.builder-module > .head input { flex: 1; min-width: 160px; font-weight: 700; background: transparent; border-color: transparent; }
.builder-module > .head input:hover, .builder-module > .head input:focus { background: #fff; border-color: var(--line); }
.builder-lesson { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.builder-lesson:first-child { border-top: 0; }
.builder-lesson .title { flex: 1; min-width: 140px; font-weight: 600; text-decoration: none; }
.builder-add { padding: 10px 12px; border-top: 1px dashed var(--line); display: flex; gap: 8px; flex-wrap: wrap; }
.q-builder { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; background: var(--surface-2); }
.q-builder .opt { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.q-builder .opt input[type=radio] { accent-color: var(--good); width: 18px; height: 18px; }

/* ───────── Auth ───────── */
.auth-card { max-width: 450px; margin: 30px auto; position: relative; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--brand), var(--lime)); }
.demo-accounts { margin-top: 18px; font-size: .86rem; }
.demo-accounts button { display: flex; width: 100%; justify-content: space-between; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px; margin-top: 8px; cursor: pointer; font: 600 .85rem var(--sans); color: var(--ink); }
.demo-accounts button:hover { border-color: var(--brand); background: var(--brand-soft); }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-pick label { border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; font-weight: 600; display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.role-pick label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }

/* ───────── Certificate ─────────
   Laid out like a printed A4-landscape document: every size is in cqw (1% of the certificate's width),
   so it scales as one piece on phones, desktops and paper. */
.certificate { container-type: inline-size; max-width: 1060px; margin: 0 auto; }
.cert-paper { position: relative; aspect-ratio: 297 / 210; overflow: hidden; color: #1d2b38; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  background-color: #fff; background-image: repeating-linear-gradient(-45deg, rgba(10,52,84,.045) 0 1px, transparent 1px 9px); }
.cert-corners { position: absolute; inset: 0; width: 100%; height: 100%; }
.cert-frame { position: absolute; inset: 2.9cqw; border: 1px solid #cfd8e1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 3.6cqw 5.4cqw 1.2cqw; }
.cert-head { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.cert-logo-main { height: 9cqw; width: auto; }
.cert-cobrand { display: flex; align-items: center; gap: 1.5cqw; }
.cert-lws { height: 3.7cqw; width: auto; }
.cert-ca { height: 4.4cqw; width: auto; margin-top: -.9cqw; }
.cert-standard .cert-ca { height: 5.6cqw; margin-top: -1.2cqw; }  /* on its own, the Coledra Academy mark is shown a little larger */
.cert-divider { width: 2px; height: 4.8cqw; background: linear-gradient(var(--lime), var(--brand)); border-radius: 2px; }
.cert-title { font-family: "Cormorant Garamond", "Times New Roman", Georgia, serif; font-weight: 600; color: var(--navy); text-transform: uppercase; letter-spacing: .01em; line-height: .92; margin: 2.2cqw 0 0; }
.cert-title span { display: block; }
.cert-title span:first-child { font-size: 3.9cqw; }
.cert-title span:last-child { font-size: 7.4cqw; }
.cert-name { font-family: var(--sans); font-weight: 500; font-size: 3.6cqw; letter-spacing: .02em; margin: 2.6cqw 0 .6cqw; color: #1d2b38; }
.cert-line { font-size: 1.75cqw; color: #5b6b78; margin: 0; }
.cert-course { font-family: var(--sans); font-weight: 600; font-size: 2.55cqw; letter-spacing: .015em; color: var(--brand); margin: 1.9cqw 0 0; }
.cert-statement { font-size: 1.75cqw; line-height: 1.5; color: #5b6b78; max-width: 60cqw; margin: 2.9cqw 0 0; }
.cert-foot { width: 100%; margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; text-align: left; }
.cert-meta { font-size: 1.75cqw; line-height: 1.8; color: #1d2b38; }
.cert-meta sup { font-size: .62em; }
.cert-sign { text-align: center; font-size: 1.55cqw; line-height: 1.45; color: #4b5b68; min-width: 22cqw; }
.cert-script { font-family: "Great Vibes", "Segoe Script", cursive; font-size: 3.5cqw; color: var(--navy); line-height: 1; transform: rotate(-4deg); margin-bottom: -.2cqw; }
.cert-sigline { height: 1px; background: #9fb0bf; margin: .5cqw 0 .6cqw; }
.cert-disclaimer { font-size: .92cqw; color: #6b7b88; margin: 1.3cqw 0 0; }
@media print {
  @page { size: A4 landscape; margin: 0; }
  .topbar, .footer, .no-print, #toasts { display: none !important; }
  body { background: #fff; }
  main, main.wrap { padding: 0; margin: 0; max-width: none; }
  .certificate { max-width: none; width: 297mm; }
  .cert-paper { box-shadow: none; border: 0; width: 297mm; height: 210mm; aspect-ratio: auto; }
  .cert-paper, .cert-corners, .cert-divider { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ───────── Toasts & modal ───────── */
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 12px 32px rgba(6,34,54,.3); max-width: 370px; animation: slide .2s ease-out; font-size: .9rem; font-weight: 600; border-left: 4px solid var(--lime); }
.toast.error { background: var(--bad); border-left-color: #ffd2cc; }
.toast.success { background: var(--navy); border-left-color: var(--lime); }
@keyframes slide { from { transform: translateY(10px); opacity: 0; } }
.modal-back { position: fixed; inset: 0; background: rgba(10,52,84,.45); display: grid; place-items: center; z-index: 90; padding: 20px; backdrop-filter: blur(2px); }
.modal { background: #fff; border-radius: 18px; padding: 26px; max-width: 430px; width: 100%; box-shadow: 0 24px 64px rgba(6,34,54,.35); font-weight: 600; }
.modal .row { justify-content: flex-end; margin-top: 18px; }

/* ───────── Footer & loading ───────── */
.footer { background: var(--navy); color: #b8cadb; padding: 22px 0; font-size: .86rem; border-top: 3px solid var(--lime); }
.footer-inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.footer .brand-mini { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--display); font-weight: 700; }
.footer .brand-mini img { width: 28px; height: auto; background: #fff; border-radius: 8px; padding: 3px; }
.loading { padding: 80px 0; text-align: center; color: var(--ink-3); font-weight: 600; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--brand); border-right-color: var(--lime); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────── Lesson discussion ───────── */
.discussion { margin-top: 42px; padding-top: 26px; border-top: 1px solid var(--line); max-width: 46em; }
.discussion h2 { margin-bottom: 4px; }
#comments { margin-top: 18px; }
.thread { border-top: 1px solid var(--line); padding: 6px 0 10px; }
.thread:first-child { border-top: 0; }
.comment { display: flex; gap: 12px; padding: 10px 0; }
.comment .comment-body { margin: 2px 0 4px; }
.comment .comment-body p { margin: 0 0 6px; }
.comment .comment-body code { font-family: var(--mono); font-size: .86em; background: #edf3f8; padding: 1px 5px; border-radius: 5px; }
.replies { margin-left: 44px; border-left: 2px solid var(--line); padding-left: 14px; }
.comment.from-instructor .comment-body { background: var(--brand-soft); padding: 9px 13px; border-radius: 12px; border-left: 3px solid var(--brand); }
.reply-form { margin-left: 44px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: 700 .8rem var(--sans); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn.danger-text { color: var(--bad); }
.thread-card { margin-bottom: 14px; }
.thread-card .replies, .thread-card .reply-form { margin-left: 44px; }

/* ───────── My Progress ───────── */
.tile-link { text-decoration: none; color: inherit; }
.tile-link .tile { transition: border-color .15s, transform .15s; height: 100%; }
.tile-link:hover .tile { border-color: var(--brand); transform: translateY(-2px); }
.tile-link .sub { color: var(--brand); }
.progress-card { margin-bottom: 16px; }
.progress-card summary { display: flex; gap: 14px; align-items: center; cursor: pointer; list-style: none; }
.progress-card summary::-webkit-details-marker { display: none; }
.progress-card[open] summary { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.plesson { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; color: inherit; text-decoration: none; flex-wrap: wrap; font-weight: 600; }
.plesson:hover { background: var(--brand-soft); color: inherit; }
.plesson .ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; background: #edf2f6; flex: none; }
.plesson .ico.done { background: var(--good); color: #fff; }
.cert-card .cover { height: 112px; }

/* ───────── Protected (uploaded) lesson video ───────── */
.protected-video { user-select: none; -webkit-user-select: none; }
.protected-video video { background: #000; }
.protected-video .watermark {
  position: absolute; z-index: 2; pointer-events: none; color: rgba(255,255,255,.4); font-size: .78rem; font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,.5); white-space: nowrap; transition: left 1.2s ease, top 1.2s ease; letter-spacing: .02em;
}
.protected-note { margin: -12px 0 22px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 30px 18px; border: 2px dashed #c6dcec;
  border-radius: 14px; background: var(--surface-2); cursor: pointer; font-weight: 500; margin: 0; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--lime-2); background: var(--lime-soft); }
.video-source { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: #fff; }
.video-source .video { margin-bottom: 10px; }
