/* AlmaShift theme for Frappe LMS (/lms): the same colours, shapes and type as almashift.com.
   Tokens are copied from the landing page (site/index.html); the LMS marks dark mode with
   <html data-theme="dark">, and like the landing page it follows the device setting by default.

   Two layers:
   1. The LMS's own colour variables (frappe-ui) are remapped to the landing palette, so every page,
      admin pages included, uses slate greys in light mode, navy in dark mode, and indigo wherever
      the LMS would use its black "primary" colour (buttons, switches, checkboxes, active pager).
   2. A few page-specific touches: the course hero, the Buy button, course cards, list headers. */

/* ---------- AlmaShift tokens (landing page values) ---------- */
:root {
  --as-bg: #ffffff; --as-bg-alt: #f8fafc; --as-text: #0f172a; --as-muted: #475569; --as-border: #e2e8f0;
  --as-brand: #4f46e5; --as-brand-strong: #4338ca; --as-brand-soft: #eef2ff; --as-on-brand: #ffffff;
  --as-accent: #ec4899;
  --as-grad: linear-gradient(120deg, #4f46e5 0%, #7c3aed 55%, #ec4899 100%);
  --as-radius: 14px; --as-pill: 999px;
  --as-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --as-head-tracking: -0.03em;
}
html[data-theme="dark"] {
  --as-bg: #0b1120; --as-bg-alt: #111827; --as-text: #f1f5f9; --as-muted: #94a3b8; --as-border: #1e293b;
  --as-brand: #818cf8; --as-brand-strong: #a5b4fc; --as-brand-soft: #1e1b4b; --as-on-brand: #0b1120;
}

/* ---------- 1. LMS colour variables → landing palette ---------- */
html:root {
  --surface-base: #ffffff; --surface-sidebar: #f8fafc;
  --surface-elevation-1: #ffffff; --surface-elevation-2: #ffffff; --surface-elevation-3: #ffffff;
  --surface-gray-1: #f8fafc; --surface-gray-2: #f1f5f9; --surface-gray-3: #e2e8f0; --surface-gray-4: #cbd5e1;
  --surface-gray-5: #94a3b8; --surface-gray-6: #64748b; --surface-gray-7: #475569; --surface-gray-8: #334155;
  --surface-gray-9: #4338ca; --surface-gray-10: #4f46e5; --ink-base: #ffffff;
  --ink-gray-1: #f1f5f9; --ink-gray-2: #e2e8f0; --ink-gray-3: #cbd5e1; --ink-gray-4: #94a3b8; --ink-gray-5: #64748b;
  --ink-gray-6: #475569; --ink-gray-7: #334155; --ink-gray-8: #1e293b; --ink-gray-9: #0f172a;
  --outline-gray-1: #f1f5f9; --outline-gray-2: #e2e8f0; --outline-gray-3: #cbd5e1; --outline-gray-4: #94a3b8;
  --outline-gray-5: #64748b; --outline-elevation-1: #e2e8f0; --outline-elevation-2: #e2e8f0;
}
html[data-theme="dark"] {
  --surface-base: #0b1120; --surface-sidebar: #111827;
  --surface-elevation-1: #111827; --surface-elevation-2: #131c2f; --surface-elevation-3: #1e293b;
  --surface-gray-1: #111827; --surface-gray-2: #172036; --surface-gray-3: #1e293b; --surface-gray-4: #273449;
  --surface-gray-5: #334155; --surface-gray-6: #475569; --surface-gray-7: #64748b; --surface-gray-8: #94a3b8;
  --surface-gray-9: #a5b4fc; --surface-gray-10: #818cf8; --ink-base: #0b1120;
  --ink-gray-1: #1e293b; --ink-gray-2: #334155; --ink-gray-3: #475569; --ink-gray-4: #64748b; --ink-gray-5: #94a3b8;
  --ink-gray-6: #94a3b8; --ink-gray-7: #cbd5e1; --ink-gray-8: #e2e8f0; --ink-gray-9: #f1f5f9;
  --outline-gray-1: #1e293b; --outline-gray-2: #1e293b; --outline-gray-3: #334155; --outline-gray-4: #475569;
  --outline-gray-5: #64748b; --outline-elevation-1: #1e293b; --outline-elevation-2: #273449;
}

/* ---------- Type: same font and tight bold headings as the landing page ---------- */
html, body, #app { font-family: var(--as-font) !important; }
h1, h2, .text-4xl-semibold, .text-3xl-semibold { font-family: var(--as-font) !important; font-weight: 800 !important; letter-spacing: var(--as-head-tracking); }

/* ---------- Page, top bar, sidebar ---------- */
body, #app { background-color: var(--as-bg) !important; }
.header-frame {
  background: color-mix(in srgb, var(--as-bg) 82%, transparent) !important;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--as-border) !important;
}
.bg-surface-sidebar { border-color: var(--as-border) !important; }
nav button.bg-surface-elevation-3 { background: var(--as-brand-soft) !important; box-shadow: none !important; }
nav button.bg-surface-elevation-3 * { color: var(--as-brand) !important; font-weight: 600; }

/* ---------- Section headings: the landing's fading indigo-to-pink line above ---------- */
main h2.text-3xl-semibold { position: relative; padding-top: 14px; }
main h2.text-3xl-semibold::before {
  content: ""; position: absolute; left: 0; top: 0; width: 140px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--as-brand), var(--as-accent) 70%, transparent); opacity: .7;
}

/* ---------- Course page hero (the title block): light = gradient, dark = landing glow ---------- */
main section.space-y-4:has(> h1) {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 30px 30px 26px; border-radius: var(--as-radius);
  background: var(--as-grad); box-shadow: 0 0 0 1px rgba(99,102,241,.25), 0 12px 30px -12px rgba(79,70,229,.55);
}
main section.space-y-4:has(> h1) h1 { font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1.1; color: #fff !important; }
main section.space-y-4:has(> h1) > :not(.md\:hidden), main section.space-y-4:has(> h1) > :not(.md\:hidden) .text-ink-gray-7,
main section.space-y-4:has(> h1) > :not(.md\:hidden) a, main section.space-y-4:has(> h1) > :not(.md\:hidden) [class*="lucide"] { color: rgba(255,255,255,.95) !important; }
main section.space-y-4:has(> h1) > p { font-size: 1.05rem; }
main section.space-y-4:has(> h1) .bg-surface-gray-2 {
  background: rgba(255,255,255,.18) !important; color: #fff !important; border: 1px solid rgba(255,255,255,.3); border-radius: var(--as-pill) !important; font-weight: 600;
}
html[data-theme="dark"] main section.space-y-4:has(> h1) {
  border: 1px solid color-mix(in srgb, var(--as-brand) 18%, var(--as-border));
  background:
    radial-gradient(520px 280px at 0% 0%, color-mix(in srgb, var(--as-brand) 18%, transparent), transparent 70%),
    radial-gradient(480px 280px at 100% 100%, color-mix(in srgb, var(--as-accent) 15%, transparent), transparent 70%),
    linear-gradient(160deg, var(--as-brand-soft) 0%, var(--as-bg) 75%);
  box-shadow: none;
}
/* dark title in the landing's "Learn by doing." gradient */
html[data-theme="dark"] main section.space-y-4:has(> h1) h1 {
  background: linear-gradient(90deg, var(--as-brand), var(--as-accent), var(--as-brand)); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: as-shimmer 6s linear infinite;
}
@keyframes as-shimmer { to { background-position: 200% center; } }
html[data-theme="dark"] main section.space-y-4:has(> h1) > :not(.md\:hidden):not(h1), html[data-theme="dark"] main section.space-y-4:has(> h1) > :not(.md\:hidden) .text-ink-gray-7,
html[data-theme="dark"] main section.space-y-4:has(> h1) > :not(.md\:hidden) a { color: var(--as-muted) !important; }
html[data-theme="dark"] main section.space-y-4:has(> h1) > :not(.md\:hidden) [class*="lucide"] { color: var(--as-brand) !important; }
html[data-theme="dark"] main section.space-y-4:has(> h1) .bg-surface-gray-2 {
  background: var(--as-brand-soft) !important; color: var(--as-brand) !important; border-color: color-mix(in srgb, var(--as-brand) 25%, transparent);
}

/* ---------- Price card + Buy button (desktop: aside; phones: the card inside the hero) ---------- */
main aside > div, main .md\:hidden > .border-2 {
  background: var(--as-bg) !important; border: 1px solid var(--as-border) !important; border-radius: var(--as-radius) !important;
  overflow: hidden; transition: border-color .25s ease, box-shadow .25s ease;
}
main aside > div:hover { border-color: color-mix(in srgb, var(--as-brand) 40%, var(--as-border)) !important; box-shadow: 0 16px 36px -18px rgba(15,23,42,.35); }
/* the price card (the aside card that shows the price) is the featured card, like the landing's featured course */
main aside > div:first-child:has(.text-3xl-semibold), main .md\:hidden > .border-2 {
  border: 2px solid var(--as-brand) !important;
  background: linear-gradient(160deg, var(--as-brand-soft) 0%, var(--as-bg) 70%) !important;
  box-shadow: 0 14px 34px -20px color-mix(in srgb, var(--as-brand) 70%, transparent);
}
main aside .text-3xl-semibold, main .md\:hidden > .border-2 .text-3xl-semibold { font-size: 2rem; }
main aside [class*="lucide-"], main .md\:hidden > .border-2 [class*="lucide-"] { color: var(--as-brand) !important; }
/* the Buy / Enroll / Continue button in the price card: landing pill, gradient in light mode */
main aside a.bg-surface-gray-10, main aside button.bg-surface-gray-10,
main .md\:hidden > .border-2 a.bg-surface-gray-10, main .md\:hidden > .border-2 button.bg-surface-gray-10 {
  height: 2.75rem !important; border-radius: var(--as-pill) !important; font-weight: 600 !important;
  background: var(--as-grad) !important; color: #fff !important; box-shadow: 0 8px 22px -8px rgba(124,58,237,.7);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s;
}
main aside a.bg-surface-gray-10:hover, main aside button.bg-surface-gray-10:hover,
main .md\:hidden > .border-2 a.bg-surface-gray-10:hover, main .md\:hidden > .border-2 button.bg-surface-gray-10:hover {
  transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 12px 28px -10px rgba(124,58,237,.8);
}
html[data-theme="dark"] main aside a.bg-surface-gray-10, html[data-theme="dark"] main aside button.bg-surface-gray-10,
html[data-theme="dark"] main .md\:hidden > .border-2 a.bg-surface-gray-10, html[data-theme="dark"] main .md\:hidden > .border-2 button.bg-surface-gray-10 {
  background: var(--as-brand) !important; color: var(--as-on-brand) !important; box-shadow: 0 6px 20px -8px color-mix(in srgb, var(--as-brand) 70%, transparent);
}
main aside .bg-surface-gray-10 *, main .md\:hidden > .border-2 .bg-surface-gray-10 * { color: inherit !important; }

/* ---------- Course outline ---------- */
main .border.rounded-5.p-2:has(.chapter-item) { border-radius: var(--as-radius) !important; }
.chapter-item > button { background: var(--as-brand-soft); border-radius: 10px; margin-bottom: 6px; transition: background .2s; }
.chapter-item > button .text-base-medium { font-weight: 700; }
.chapter-item > button:hover { background: color-mix(in srgb, var(--as-brand) 16%, var(--as-bg)); }
[data-testid="outline-lesson"] [class*="lucide-"] { color: var(--as-brand) !important; }
[data-testid="outline-lesson"]:hover { background: var(--as-bg-alt); border-radius: 8px; }

/* ---------- List pages (Courses, Batches, …): a slim header strip ----------
   Title (and tagline) on the left, filters on the right; when they don't fit side by side the whole
   filter row drops below the title instead of wrapping inside itself. Soft brand wash fading to the
   page, with the landing's indigo-to-pink hairline along the bottom. */
main [data-testid="page-header-block"]:has(h1) {
  position: relative; margin: 16px 20px 22px; padding: 18px 24px 16px; border-radius: var(--as-radius);
  flex-direction: row !important; flex-wrap: wrap !important; align-items: center !important;
  justify-content: space-between !important; gap: 14px 24px !important;
  border: 1px solid color-mix(in srgb, var(--as-brand) 14%, var(--as-border)) !important;
  background:
    radial-gradient(420px 140px at 0% 0%, color-mix(in srgb, var(--as-brand) 12%, transparent), transparent 70%),
    linear-gradient(90deg, var(--as-brand-soft) 0%, var(--as-bg) 60%) !important;
  overflow: hidden;
}
main [data-testid="page-header-block"]:has(h1)::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--as-brand), var(--as-accent) 60%, transparent); opacity: .8;
}
main [data-testid="page-header-block"]:has(h1) > :first-child { flex: 1 1 240px; min-width: 0; }
main [data-testid="page-header-block"]:has(h1) > :last-child:not(:first-child) { flex: 0 0 auto; max-width: 100%; }
main [data-testid="page-header-block"] h1 { font-size: clamp(1.4rem, 2.6vw, 1.75rem) !important; line-height: 1.15; }
/* Course list (the header with the Published / Upcoming tabs, or course cards on phones): gradient title + one-line tagline */
main:is(:has([data-value="upcoming"]), :has(a[href^="/lms/courses/"] > .rounded-5)) [data-testid="page-header-block"] h1 {
  background: linear-gradient(90deg, var(--as-brand), var(--as-accent), var(--as-brand)); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: as-shimmer 6s linear infinite;
}
main:is(:has([data-value="upcoming"]), :has(a[href^="/lms/courses/"] > .rounded-5)) [data-testid="page-header-block"] h1::after {
  content: "Practical, hands-on courses from expert trainers"; display: block; margin-top: 4px;
  font: 400 .95rem/1.45 var(--as-font); letter-spacing: 0; color: var(--as-muted); -webkit-text-fill-color: var(--as-muted);
}
main [data-testid="page-header-block"] [data-slot="tab-buttons"],
main [data-testid="page-header-block"] input[type="text"],
main [data-testid="page-header-block"] [data-slot="trigger"] {
  background: var(--as-bg) !important; border: 1px solid var(--as-border) !important; border-radius: var(--as-pill) !important;
}
main [data-testid="page-header-block"] [data-slot="tab-buttons"] [data-state="active"],
main [data-testid="page-header-block"] [data-slot="tab-indicator"] { border-radius: var(--as-pill) !important; }
main [data-testid="page-header-block"] input[type="text"] { padding-inline-start: 2rem; }
/* the Category dropdown nests a trigger inside a trigger: outline only the outer one */
main [data-testid="page-header-block"] [data-slot="trigger"] [data-slot="trigger"],
main [data-testid="page-header-block"] [data-slot="trigger"] input[type="text"] { border: 0 !important; background: transparent !important; }
/* Certification filter: a pill the same height as the search box, with a small checkbox */
main [data-testid="page-header-block"] [data-slot="trigger"]:has(input[type="checkbox"]) {
  display: inline-flex; align-items: center; height: 1.75rem; padding: 0 12px 0 10px; width: auto !important;
}
main [data-testid="page-header-block"] input[type="checkbox"] { width: 14px !important; height: 14px !important; margin: 0 !important; border-radius: 4px !important; }
main [data-testid="page-header-block"] input[type="checkbox"] + label { font-size: .875rem; color: var(--as-muted) !important; line-height: 1; }

/* ---------- Course cards: landing cards; price as a filled pill ---------- */
a[href^="/lms/courses/"] > .rounded-5 {
  background: var(--as-bg) !important; border: 1px solid var(--as-border); border-radius: var(--as-radius) !important; overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
a[href^="/lms/courses/"] > .rounded-5:hover {
  transform: translateY(-4px); border-color: color-mix(in srgb, var(--as-brand) 40%, var(--as-border));
  box-shadow: 0 16px 36px -18px rgba(15,23,42,.35);
}
/* thumbnail at its real 16:9 shape, so nothing (like the logo at the top) is cropped; slight zoom on hover */
a[href^="/lms/courses/"] > .rounded-5 > div:first-child {
  border: 0 !important; border-bottom: 1px solid var(--as-border) !important; border-radius: 0 !important;
  height: auto !important; aspect-ratio: 16 / 9; transition: transform .4s ease;
}
a[href^="/lms/courses/"] > .rounded-5 { isolation: isolate; }
a[href^="/lms/courses/"]:hover > .rounded-5 > div:first-child { transform: scale(1.03); }
a[href^="/lms/courses/"] > .rounded-5 > div:last-child { position: relative; z-index: 1; background: var(--as-bg); }
a[href^="/lms/courses/"] > .rounded-5 > div:last-child { border: 0 !important; border-radius: 0 !important; }
a[href^="/lms/courses/"] > .rounded-5 .text-2xl { font-weight: 800; letter-spacing: -0.02em; font-size: 1.25rem; }
a[href^="/lms/courses/"] > .rounded-5 .short-introduction { color: var(--as-muted); }
a[href^="/lms/courses/"] > .rounded-5 .lucide-book-open, a[href^="/lms/courses/"] > .rounded-5 .lucide-users { color: var(--as-brand); }
a[href^="/lms/courses/"] > .rounded-5 .flex.items-center.gap-x-2 > .font-semibold {
  background: var(--as-brand); color: var(--as-on-brand); padding: 4px 14px; border-radius: var(--as-pill); font-weight: 700;
}
a[href^="/lms/courses/"] > .rounded-5 .lucide-graduation-cap { color: var(--as-brand) !important; }

/* ---------- Lesson page ---------- */
/* video: rounded with a soft brand shadow; player controls in brand indigo */
.plyr { --plyr-color-main: var(--as-brand); border-radius: var(--as-radius); overflow: hidden; box-shadow: 0 18px 40px -22px rgba(79,70,229,.6); }
.ce-block .embed-tool, .ce-block .cdx-block:has(> .plyr) { border: 0 !important; background: transparent !important; }
/* Previous / Next: soft brand pills */
main h1.text-4xl-semibold ~ * button.bg-surface-gray-2, main .flex.items-center.gap-x-2 > button.bg-surface-gray-2 {
  border-radius: var(--as-pill) !important; height: 2rem !important; padding: 0 14px !important;
  background: var(--as-brand-soft) !important; color: var(--as-brand) !important; font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--as-brand) 22%, transparent);
}
main .flex.items-center.gap-x-2 > button.bg-surface-gray-2:hover { background: color-mix(in srgb, var(--as-brand) 16%, var(--as-bg)) !important; }
main .flex.items-center.gap-x-2 > button.bg-surface-gray-2 * { color: inherit !important; }
/* lesson text: brand bullets, code as soft chips, readable line length */
.ce-block li::marker, .cdx-nested-list__item::marker { color: var(--as-brand); }
.ce-block code, .ce-block .inline-code, .ProseMirror :not(pre) > code {
  background: var(--as-brand-soft) !important; color: var(--as-brand-strong) !important; border-radius: 6px !important;
  padding: 1px 6px !important; font-size: .88em; border: 1px solid color-mix(in srgb, var(--as-brand) 18%, transparent);
}
html[data-theme="dark"] .ce-block code, html[data-theme="dark"] .ce-block .inline-code { color: var(--as-brand-strong) !important; }
.ce-block b, .ce-block strong { color: var(--as-text); }
/* course outline panel: header in the brand wash, current lesson highlighted with a brand edge */
main aside.sticky { border-color: var(--as-border) !important; }
main aside.sticky > div > .bg-surface-gray-1:first-child, main aside.sticky .bg-surface-gray-1.border-b {
  background: linear-gradient(160deg, var(--as-brand-soft) 0%, var(--as-bg) 90%) !important;
}
main aside.sticky .bg-surface-gray-1.border-b > div { font-weight: 800 !important; letter-spacing: -0.01em; }
main aside.sticky a.router-link-exact-active {
  background: var(--as-brand-soft) !important; color: var(--as-brand) !important; font-weight: 600;
  box-shadow: inset 3px 0 0 var(--as-brand);
}
main aside.sticky a [class*="lucide"] { color: var(--as-brand) !important; }

/* ---------- Empty states ("No courses / batches found") ---------- */
/* only the big icon that is a direct child of the centred empty-state column; :where keeps it weak */
:where(main .flex.flex-col.items-center.justify-center) > :is(svg, [class*="lucide"]) { color: var(--as-brand); }

/* ---------- Statistics: number cards as landing cards ---------- */
main .grid > div.border.rounded-md:has(> div + div), main .rounded-md.border.p-4 { border-radius: var(--as-radius) !important; }

/* ---------- Phones ---------- */
@media (max-width: 767px) {
  main section.space-y-4:has(> h1) { padding: 22px 18px; }
  main .md\:hidden > .border-2 { min-width: 0; }
  main .md\:hidden > .border-2 .text-ink-gray-7, main .md\:hidden > .border-2 .text-ink-gray-8,
  main .md\:hidden > .border-2 .text-ink-gray-9 { color: var(--as-text) !important; }
  main [data-testid="page-header-block"]:has(h1) { margin: 12px 12px 18px; padding: 14px 16px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  main section.space-y-4:has(> h1) h1 { animation: none !important; }
}

/* Buy button icon: always the button's text colour (the price card colours its other icons indigo) */
html:not([data-theme="dark"]) main aside .bg-surface-gray-10 > [class*="lucide"],
html:not([data-theme="dark"]) main .md\:hidden > .border-2 .bg-surface-gray-10 > [class*="lucide"] { color: #fff !important; background-color: #fff; }
html[data-theme="dark"] main aside .bg-surface-gray-10 [class*="lucide"], html[data-theme="dark"] main .md\:hidden > .border-2 .bg-surface-gray-10 [class*="lucide"] { color: var(--as-on-brand) !important; }

/* ---------- Page background: the landing hero's soft indigo and pink glows ----------
   On the scrolling main area, so the glows stay put while content scrolls over them. */
:is(main#main-content, main.bg-surface-base) {
  background:
    radial-gradient(min(760px, 90vw) 560px at 12% 42%, color-mix(in srgb, var(--as-brand) 20%, transparent), transparent 70%),
    radial-gradient(min(700px, 90vw) 520px at 96% 92%, color-mix(in srgb, var(--as-accent) 16%, transparent), transparent 70%),
    radial-gradient(520px 380px at 96% 8%, color-mix(in srgb, var(--as-brand) 7%, transparent), transparent 70%),
    var(--as-bg) !important;
}
html[data-theme="dark"] :is(main#main-content, main.bg-surface-base) {
  background:
    radial-gradient(min(760px, 90vw) 560px at 12% 42%, color-mix(in srgb, var(--as-brand) 20%, transparent), transparent 70%),
    radial-gradient(min(700px, 90vw) 520px at 96% 92%, color-mix(in srgb, var(--as-accent) 14%, transparent), transparent 70%),
    var(--as-bg) !important;
}
/* let the glows show through the top bar, the list header and the pager bar */
:is(main#main-content, main.bg-surface-base) .header-frame { background: color-mix(in srgb, var(--as-bg) 70%, transparent) !important; }
:is(main#main-content, main.bg-surface-base) .sticky.bottom-0.bg-surface-elevation-1 {
  background: color-mix(in srgb, var(--as-bg) 75%, transparent) !important; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
main [data-testid="page-header-block"]:has(h1) {
  background: linear-gradient(90deg, color-mix(in srgb, var(--as-brand-soft) 85%, transparent) 0%, color-mix(in srgb, var(--as-bg) 55%, transparent) 70%) !important;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
/* phones: the page scrolls on the app container, so the same glows go there, pinned to the screen */
@media (max-width: 767px) {
  #app {
    background:
      radial-gradient(520px 420px at 0% 30%, color-mix(in srgb, var(--as-brand) 18%, transparent), transparent 70%),
      radial-gradient(480px 420px at 100% 95%, color-mix(in srgb, var(--as-accent) 14%, transparent), transparent 70%),
      var(--as-bg) !important;
    background-attachment: fixed !important;
  }
  :is(main#main-content, main.bg-surface-base) { background: transparent !important; }
}

/* ---------- Course content box: a solid card that stands out from the page glows ---------- */
main .border.rounded-5.p-2:has(.chapter-item) {
  background: var(--as-bg) !important;
  border: 1px solid color-mix(in srgb, var(--as-brand) 28%, var(--as-border)) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 18px 40px -20px color-mix(in srgb, var(--as-brand) 45%, transparent),
              0 4px 14px -6px rgba(15,23,42,.12) !important;
  position: relative; overflow: hidden;
}
/* brand line across the top, like the sign-in card */
main .border.rounded-5.p-2:has(.chapter-item)::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed 55%, #ec4899);
}
html[data-theme="dark"] main .border.rounded-5.p-2:has(.chapter-item) {
  background: #111827 !important;
  border-color: color-mix(in srgb, var(--as-brand) 35%, var(--as-border)) !important;
  box-shadow: 0 18px 44px -18px rgba(0,0,0,.85), 0 0 0 1px color-mix(in srgb, var(--as-brand) 10%, transparent),
              0 10px 34px -16px color-mix(in srgb, var(--as-brand) 40%, transparent) !important;
}
html[data-theme="dark"] .chapter-item > button { background: color-mix(in srgb, var(--as-brand) 18%, #111827); }
