/* ============================================================================
   AURELIA LEARN — Kajabi Product Theme
   Design tokens are inherited from the AURELIA Website Theme (Product 01)
   and injected at runtime by snippets/css-variables.liquid.
   Authored directly — no build step, no external CSS framework.
   ========================================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, figure, blockquote, ol, ul, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video, audio, iframe { max-width: 100%; }
img { height: auto; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- Base ---------- */
:root {
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 22px; --space-6: 30px; --space-7: 42px; --space-8: 60px;
  --shadow-soft: 0 20px 50px -34px rgba(35,32,27,.42);
  --ease: cubic-bezier(.22,.61,.36,1);
}

html { background: var(--c-bg); }

body.al-body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-body);
  font-family: var(--font-body), 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: var(--body-size);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading), Georgia, 'Times New Roman', serif;
  font-weight: 400;
  color: var(--c-ink);
  line-height: 1.14;
  letter-spacing: -0.012em;
}
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }
strong { color: var(--c-ink); font-weight: 600; }

a { color: var(--c-accent-ink); transition: color .18s var(--ease); }
a:hover { color: var(--c-accent-dark); }

:focus-visible {
  outline: 2px solid var(--c-accent-dark);
  outline-offset: 3px;
  border-radius: 2px;
}

.al-visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.al-skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--c-ink); color: var(--c-dark-text);
  padding: 12px 18px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}
.al-skip:focus { left: 12px; top: 12px; color: var(--c-dark-text); }

.al-eyebrow {
  font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--c-accent-ink); font-weight: 600; margin-bottom: var(--space-3);
}

/* ---------- Shell ---------- */
.al-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  align-items: start;
}

.al-stage { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

.al-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: var(--space-8) clamp(20px, 4.4vw, 64px) var(--space-8);
}
.al-main > * { max-width: 980px; margin-inline: auto; }
.al-main > .al-lesson-page { max-width: 1060px; }

/* ---------- Sidebar ---------- */
.al-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--c-tint);
  border-right: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
}
.al-sidebar__inner {
  display: flex; flex-direction: column; gap: var(--space-5);
  padding: var(--space-6) var(--space-5) var(--space-7);
}
.al-sidebar__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }

.al-brand { display: inline-flex; align-items: center; gap: 10px; }
.al-brand__word {
  font-family: var(--font-heading), Georgia, serif;
  font-size: 19px; letter-spacing: .3em; color: var(--c-ink);
  text-transform: uppercase;
}
.al-brand__logo { max-height: 34px; width: auto; }

.al-drawer-close { display: none; width: 40px; height: 40px; margin-right: -8px; color: var(--c-body); }
.al-drawer-close svg { width: 20px; height: 20px; }

/* Search */
.al-search { position: relative; display: block; }
.al-search__icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--c-accent-ink); pointer-events: none;
}
.al-search__icon svg { width: 100%; height: 100%; }
.al-search input[type="search"] {
  width: 100%;
  padding: 11px 14px 11px 38px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-input);
  font-size: 14px; color: var(--c-ink);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.al-search input[type="search"]::placeholder { color: var(--c-muted); }
.al-search input[type="search"]:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(169,137,85,.16);
}

/* Progress card */
.al-progresscard {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-4) var(--space-3);
}
.al-progresscard__row, .al-home__progress-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: 9px;
}
.al-progresscard__label, .al-home__progress-row span {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--c-body);
}
.al-progresscard__value, .al-home__progress-row strong {
  font-family: var(--font-heading), Georgia, serif;
  font-size: 19px; color: var(--c-ink); font-weight: 500;
}
.al-progresscard__note { font-size: 11.5px; line-height: 1.5; color: var(--c-muted); margin-top: 10px; }

/* Progress bar */
.al-bar {
  display: block; position: relative;
  height: 6px; width: 100%;
  background: var(--c-accent-soft);
  border-radius: 999px;
  overflow: hidden;
}
.al-bar__fill {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--c-accent-dark), var(--c-accent));
  border-radius: inherit;
  transition: width .5s var(--ease);
}
.al-bar--mini { width: 54px; height: 4px; }

/* Modules */
.al-modules { display: flex; flex-direction: column; gap: 2px; }
.al-modules__head {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--c-muted); font-weight: 600; padding: 0 2px var(--space-2);
}
.al-module { border-radius: var(--radius-input); }
.al-module__details > summary { list-style: none; cursor: pointer; }
.al-module__details > summary::-webkit-details-marker { display: none; }

.al-module__head {
  display: grid;
  grid-template-columns: 26px minmax(0,1fr) auto auto;
  align-items: center; gap: 9px;
  padding: 11px 8px;
  border-radius: var(--radius-input);
  color: var(--c-ink);
  transition: background .16s var(--ease);
}
.al-module__details > summary:hover { background: rgba(255,255,255,.62); }
.al-module__head--static { grid-template-columns: 26px minmax(0,1fr) auto; cursor: default; }
.al-module.is-locked .al-module__title { color: var(--c-muted); }
.al-module__num {
  font-size: 10.5px; letter-spacing: .1em; color: var(--c-accent-ink); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.al-module__title { font-size: 14px; font-weight: 500; line-height: 1.35; letter-spacing: -.005em; }
.al-module__count {
  font-size: 11px; color: var(--c-muted); font-variant-numeric: tabular-nums;
}
.al-module__chev { display: inline-flex; width: 16px; height: 16px; color: var(--c-muted); transition: transform .2s var(--ease); }
.al-module__chev svg { width: 100%; height: 100%; }
.al-module__details[open] .al-module__chev { transform: rotate(180deg); }
.al-module__empty { font-size: 12.5px; color: var(--c-muted); padding: 0 8px 10px 43px; }

.al-lessons { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 8px; }
.al-lesson {
  display: grid; grid-template-columns: 18px minmax(0,1fr) auto;
  align-items: start; gap: 9px;
  padding: 8px 8px 8px 36px;
  border-radius: var(--radius-input);
  font-size: 13.5px; line-height: 1.45; color: var(--c-body);
  transition: background .16s var(--ease), color .16s var(--ease);
}
.al-lesson:hover { background: rgba(255,255,255,.72); color: var(--c-ink); }
.al-lesson__state {
  width: 16px; height: 16px; margin-top: 1px;
  border: 1px solid #CFC6B6; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent; transition: all .18s var(--ease);
}
.al-lesson__state svg { width: 11px; height: 11px; }
.al-lesson.is-done { color: var(--c-ink); }
.al-lesson.is-done .al-lesson__state {
  background: var(--c-accent-dark); border-color: var(--c-accent-dark); color: #fff;
}
.al-lesson.is-current {
  background: var(--c-surface);
  color: var(--c-ink);
  font-weight: 500;
  box-shadow: inset 2px 0 0 var(--c-accent);
}
.al-lesson.is-current .al-lesson__state { border-color: var(--c-accent-dark); }

.al-submodule { padding: 0 0 6px; }
.al-submodule__title {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted);
  padding: 6px 8px 2px 36px; margin: 0;
}

/* Chips */
.al-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: var(--radius-pill);
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
  white-space: nowrap;
}
.al-chip--muted { background: rgba(35,32,27,.06); color: var(--c-body); }
.al-chip--done { background: rgba(138,110,66,.14); color: var(--c-accent-ink); }

/* ---------- Topbar ---------- */
.al-topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251,248,243,.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--c-line);
  transition: box-shadow .2s var(--ease);
}
.al-topbar.is-stuck { box-shadow: 0 10px 30px -24px rgba(35,32,27,.5); }
.al-topbar__inner {
  display: flex; align-items: center; gap: var(--space-4);
  padding: 13px clamp(20px, 4.4vw, 64px);
  max-width: 1240px; margin-inline: auto;
}
.al-menu-btn { display: none; width: 42px; height: 42px; align-items: center; justify-content: center; }
.al-menu-btn__bars { display: inline-flex; flex-direction: column; gap: 4px; width: 20px; }
.al-menu-btn__bars i { display: block; height: 1.5px; background: var(--c-ink); border-radius: 2px; }
.al-topbar__crumb { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.al-topbar__label {
  font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--c-accent-ink);
}
.al-topbar__title {
  font-family: var(--font-heading), Georgia, serif; font-weight: 400;
  font-size: 17px; color: var(--c-ink); line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.al-topbar__actions { margin-left: auto; display: flex; align-items: center; gap: var(--space-4); }
.al-topbar__progress { display: inline-flex; align-items: center; gap: 9px; }
.al-topbar__progress-num {
  font-size: 12px; font-weight: 600; color: var(--c-ink); font-variant-numeric: tabular-nums;
}

/* User menu */
.al-user__inner { display: flex; align-items: center; gap: 12px; }
.al-user__avatar img { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--c-line); }
.al-user__links { display: flex; align-items: center; gap: 12px; font-size: 12.5px; }
.al-user__links a, .al-user__links span > a { color: var(--c-body); }
.al-user__links a:hover { color: var(--c-ink); }
.al-user__login { font-size: 12.5px; }
.al-user__login a {
  display: inline-flex; padding: 9px 16px; border: 1px solid var(--c-line);
  border-radius: var(--radius-btn); color: var(--c-ink); font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase;
}
.al-user__login a:hover { border-color: var(--c-accent); }

/* ---------- Buttons ---------- */
.al-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 20px;
  font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.al-btn--solid { background: var(--c-ink); color: var(--c-bg); }
.al-btn--solid:hover { background: #12100D; color: var(--c-bg); }
.al-btn--ghost { background: transparent; border-color: var(--c-line); color: var(--c-ink); }
.al-btn--ghost:hover { border-color: var(--c-accent); color: var(--c-ink); }
.al-btn--lg { padding: 15px 26px; font-size: 12px; }
.al-btn:active { transform: translateY(1px); }

/* ---------- Course home ---------- */
.al-home { display: flex; flex-direction: column; gap: var(--space-8); }

.al-home__hero {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-card);
  padding: clamp(26px, 4.2vw, 52px);
  position: relative;
  overflow: hidden;
}
.al-home__hero::after {
  content: ""; position: absolute; inset: auto -60px -120px auto;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(237,228,211,.75), rgba(237,228,211,0) 70%);
  pointer-events: none;
}
.al-home__title { max-width: 22ch; }
.al-home__intro { margin-top: var(--space-4); max-width: 62ch; font-size: 1.02em; }

.al-home__status {
  margin-top: var(--space-6);
  display: grid; grid-template-columns: minmax(0,1fr) auto;
  gap: var(--space-6); align-items: end;
  position: relative; z-index: 1;
}
.al-home__progress { min-width: 0; max-width: 340px; }
.al-home__count { margin: 10px 0 0; font-size: 12px; letter-spacing: .04em; color: var(--c-muted); }
.al-home__cta { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; }
.al-home__cta-title {
  text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 13px;
  opacity: .82; font-family: var(--font-body), sans-serif;
}

.al-section-head {
  display: flex; align-items: baseline; gap: 12px;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--c-line);
  margin-bottom: var(--space-4);
}
.al-section-head h2 { font-size: 1.35rem; letter-spacing: -.005em; }
.al-section-head__meta {
  font-size: 11.5px; letter-spacing: .12em; color: var(--c-muted); margin-left: auto;
}

.al-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }
.al-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-card);
  transition: border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.al-card__inner {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  grid-template-areas: "num title arrow" "num meta arrow";
  align-items: center;
  gap: 2px 12px;
  padding: 18px 18px 17px;
  border-radius: inherit;
  color: inherit;
  min-height: 92px;
}
.al-card__num {
  grid-area: num;
  font-family: var(--font-heading), Georgia, serif;
  font-size: 15px; color: var(--c-accent-ink); font-variant-numeric: tabular-nums;
  align-self: start; padding-top: 2px;
}
.al-card__title { grid-area: title; font-size: 15.5px; line-height: 1.32; font-family: var(--font-body), sans-serif; font-weight: 600; color: var(--c-ink); }
.al-card__meta { grid-area: meta; font-size: 11.5px; letter-spacing: .06em; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.al-card__arrow { grid-area: arrow; width: 16px; height: 16px; color: #8C8477; transition: transform .18s var(--ease), color .18s var(--ease); }
.al-card__arrow svg { width: 100%; height: 100%; }
a.al-card__inner:hover { transform: translateY(-1px); }
a.al-card__inner:hover .al-card__arrow { transform: translateX(2px); color: var(--c-accent-dark); }
.al-card:hover { border-color: #D9D0C0; box-shadow: var(--shadow-soft); }
.al-card.is-locked, .al-card.is-drip { background: transparent; }
.al-card.is-locked .al-card__title, .al-card.is-drip .al-card__title { color: #6E6659; }

.al-empty {
  border: 1px dashed var(--c-line);
  border-radius: var(--radius-card);
  padding: var(--space-7) var(--space-5);
  text-align: center;
  background: rgba(255,255,255,.5);
}
.al-empty__title { font-family: var(--font-heading), Georgia, serif; font-size: 1.2rem; color: var(--c-ink); margin-bottom: 8px; }
.al-empty__body { font-size: 13.5px; color: var(--c-muted); margin: 0; }

/* ---------- Module page ---------- */
.al-module-page, .al-announcements, .al-searchpage { display: flex; flex-direction: column; gap: var(--space-6); }

.al-crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-muted);
}
.al-crumbs a { color: var(--c-accent-ink); }
.al-crumbs a:hover { color: var(--c-accent-dark); }

.al-module-hero { display: flex; flex-direction: column; gap: 6px; padding-bottom: var(--space-2); }
.al-module-hero__meta { font-size: 12.5px; color: var(--c-muted); letter-spacing: .04em; margin: 0; }

.al-notice {
  margin-top: var(--space-3);
  display: inline-flex; align-self: flex-start;
  padding: 9px 14px; border-radius: var(--radius-input);
  background: var(--c-tint); border: 1px solid var(--c-line);
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #6E6659;
}

.al-lessonlist {
  display: flex; flex-direction: column;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--c-surface);
}
.al-lessonrow + .al-lessonrow { border-top: 1px solid var(--c-line); }
.al-lessonrow > a {
  display: grid; grid-template-columns: 34px minmax(0,1fr) auto;
  align-items: center; gap: 14px;
  padding: 17px 20px;
  color: var(--c-ink);
  transition: background .16s var(--ease);
}
.al-lessonrow > a:hover { background: var(--c-tint); }
.al-lessonrow__num {
  font-family: var(--font-heading), Georgia, serif; font-size: 14px; color: var(--c-muted);
  font-variant-numeric: tabular-nums;
}
.al-lessonrow__title { font-size: 15px; line-height: 1.4; }
.al-lessonrow.is-done .al-lessonrow__title { color: var(--c-ink); }
.al-lessonrow__open {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted);
}
.al-lessonrow > a:hover .al-lessonrow__open { color: var(--c-accent-ink); }

.al-submodule-block { display: flex; flex-direction: column; gap: var(--space-3); }
.al-submodule-block h2 { font-size: 1.1rem; }

/* ---------- Lesson page ---------- */
.al-lesson-page { display: flex; flex-direction: column; gap: var(--space-6); }

.al-lesson-hero {
  display: grid; grid-template-columns: minmax(0,1fr) auto;
  gap: var(--space-5); align-items: end;
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--c-line);
}
.al-lesson-hero__title { max-width: 26ch; }
.al-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.al-btn--complete.is-done { background: rgba(138,110,66,.12); color: var(--c-accent-ink); border-color: rgba(138,110,66,.4); }
.al-btn--complete .al-actions__check { width: 15px; height: 15px; display: inline-flex; }
.al-btn--complete .al-actions__check svg { width: 100%; height: 100%; }
.al-btn--ghost.is-done { border-color: var(--c-accent); color: var(--c-accent-ink); }
.al-btn--ghost .al-actions__star { width: 15px; height: 15px; display: inline-flex; }
.al-btn--ghost .al-actions__star svg { width: 100%; height: 100%; }

.al-lesson-body { display: flex; flex-direction: column; gap: var(--space-6); }

/* Video */
.al-video { margin: 0; }
.al-video__frame {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--c-ink);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 9;
}
.al-video__frame > * { width: 100% !important; height: 100% !important; }
.al-video__frame iframe, .al-video__frame video { display: block; border: 0; }
.al-video__frame img.al-video__poster {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.al-video__caption {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding-top: 12px;
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted);
}
.al-video__download { color: var(--c-accent-ink); }
.al-video__download:hover { color: var(--c-accent-dark); }

/* Prose — optimised for long-form study */
.al-prose {
  font-size: 1.06em;
  line-height: 1.78;
  color: var(--c-body);
  max-width: 70ch;
}
.al-prose > p:first-child { font-size: 1.12em; color: #464036; }
.al-prose h1, .al-prose h2, .al-prose h3 {
  margin: var(--space-7) 0 var(--space-3);
  color: var(--c-ink);
}
.al-prose h1 { font-size: 1.9rem; }
.al-prose h2 { font-size: 1.45rem; }
.al-prose h3 { font-size: 1.18rem; font-family: var(--font-body), sans-serif; font-weight: 600; letter-spacing: 0; }
.al-prose p, .al-prose ul, .al-prose ol, .al-prose blockquote, .al-prose table { margin-bottom: var(--space-4); }
.al-prose ul, .al-prose ol { padding-left: 1.3em; }
.al-prose ul li { list-style: none; position: relative; margin-bottom: 8px; }
.al-prose ul li::before {
  content: ""; position: absolute; left: -1.05em; top: .72em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--c-accent);
}
.al-prose ol { list-style: decimal; }
.al-prose ol li { margin-bottom: 8px; padding-left: 4px; }
.al-prose ol li::marker { color: var(--c-accent-ink); font-weight: 600; }
.al-prose blockquote {
  border-left: 2px solid var(--c-accent);
  padding: 4px 0 4px 22px;
  font-family: var(--font-heading), Georgia, serif;
  font-size: 1.22em; line-height: 1.5; color: var(--c-ink);
}
.al-prose img, .al-prose figure img { border-radius: var(--radius-card); }
.al-prose figcaption { font-size: 12.5px; color: var(--c-muted); margin-top: 8px; }
.al-prose a { border-bottom: 1px solid rgba(138,110,66,.35); }
.al-prose a:hover { border-bottom-color: var(--c-accent-dark); }
.al-prose code {
  background: var(--c-tint); border-radius: 3px; padding: 2px 6px;
  font-size: .88em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.al-prose pre {
  background: var(--c-ink); color: var(--c-dark-text);
  padding: 18px 20px; border-radius: var(--radius-card);
  overflow-x: auto; font-size: .88em; line-height: 1.6;
}
.al-prose pre code { background: none; color: inherit; padding: 0; }
.al-prose table { width: 100%; border-collapse: collapse; font-size: .92em; }
.al-prose th, .al-prose td { border: 1px solid var(--c-line); padding: 10px 12px; text-align: left; }
.al-prose th { background: var(--c-tint); font-weight: 600; color: var(--c-ink); }
.al-prose hr { border: 0; border-top: 1px solid var(--c-line); margin: var(--space-6) 0; }

/* Resources */
.al-resources {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-card);
  padding: var(--space-5);
}
.al-resources__title {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.05rem; font-family: var(--font-body), sans-serif; font-weight: 600;
  letter-spacing: 0; color: var(--c-ink);
  margin-bottom: var(--space-3);
}
.al-resources__count {
  font-size: 11px; font-weight: 600; color: var(--c-accent-ink);
  background: var(--c-tint); border-radius: var(--radius-pill); padding: 2px 8px;
}
.al-resources__list { display: flex; flex-direction: column; gap: 8px; }
.al-resource {
  display: grid; grid-template-columns: 34px minmax(0,1fr) auto;
  align-items: center; gap: 13px;
  padding: 12px 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-input);
  color: var(--c-ink);
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.al-resource:hover { border-color: var(--c-accent); background: #FEFDFB; }
.al-resource__icon {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-tint); color: var(--c-accent-ink);
}
.al-resource__icon svg { width: 17px; height: 17px; }
.al-resource__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.al-resource__name { font-size: 14px; line-height: 1.35; }
.al-resource__meta { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-muted); }
.al-resource__cta { width: 16px; height: 16px; color: #8C8477; }
.al-resource__cta svg { width: 100%; height: 100%; }

/* Audio */
.al-audio { display: flex; flex-direction: column; gap: 12px; }
.al-audio__item {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-card); padding: 16px 18px;
}
.al-audio__name { font-size: 13.5px; margin-bottom: 10px; color: var(--c-ink); }
.al-audio__player { width: 100%; }

/* Pager */
.al-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.al-pager__link {
  display: flex; flex-direction: column; gap: 5px;
  padding: 18px 20px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-card);
  background: var(--c-surface);
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.al-pager__link:hover { border-color: var(--c-accent); transform: translateY(-1px); }
.al-pager__link--next { text-align: right; align-items: flex-end; }
.al-pager__dir { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--c-accent-ink); }
.al-pager__title { font-family: var(--font-heading), Georgia, serif; font-size: 1.05rem; color: var(--c-ink); line-height: 1.3; }
.al-pager__link--next:only-child { grid-column: 2; }

/* Comments */
.al-comments { border-top: 1px solid var(--c-line); padding-top: var(--space-6); }
/* Standalone comment permalink page */
.al-standalone { padding-block: var(--space-8) var(--space-7); }
.al-standalone__title { font-family: var(--font-heading); font-weight: 400; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); line-height: 1.15; margin-bottom: var(--space-6); }
.al-comments__title { font-size: 1.25rem; margin-bottom: var(--space-4); }
.al-comments__locked { font-size: 13.5px; color: var(--c-muted); }
.al-comment-form { display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 13px; margin-bottom: var(--space-5); }
.al-comment-form__avatar img { border-radius: 50%; }
.al-comment-form__body { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.al-comment-form textarea {
  width: 100%; padding: 13px 15px; min-height: 96px; resize: vertical;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-input); font-size: 14.5px; color: var(--c-ink);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.al-comment-form textarea:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(169,137,85,.16); }
.al-comments__list { display: flex; flex-direction: column; gap: var(--space-4); }
.al-comment { display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 13px; }
.al-comment__avatar img { border-radius: 50%; border: 1px solid var(--c-line); }
.al-comment__meta { display: flex; align-items: baseline; gap: 9px; margin-bottom: 3px; font-size: 13.5px; }
.al-comment__meta strong { font-size: 13.5px; }
.al-comment__time { font-size: 11.5px; color: var(--c-muted); letter-spacing: .04em; }
.al-comment__text { font-size: 14.5px; line-height: 1.68; color: var(--c-body); }
.al-comment__actions { display: flex; gap: 14px; margin-top: 6px; }
.al-comment__action { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-accent-ink); }
.al-comment__replies { margin-top: var(--space-4); padding-left: var(--space-4); border-left: 1px solid var(--c-line); display: flex; flex-direction: column; gap: var(--space-4); }
.al-comments__more { margin-top: var(--space-5); }

/* Announcements, search, pagination */
.al-announcements__list { display: flex; flex-direction: column; gap: var(--space-5); }
.al-announcement {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-card); padding: var(--space-5);
}
.al-announcement__date {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--c-accent-ink); margin-bottom: 8px;
}
.al-announcement__title { font-size: 1.2rem; margin-bottom: 10px; }
.al-searchpage__term { display: block; font-size: .55em; color: var(--c-accent-ink); margin-top: 8px; }
.al-results { display: flex; flex-direction: column; gap: 2px; }
.al-result { padding: 18px 0; border-bottom: 1px solid var(--c-line); }
.al-result a { font-family: var(--font-heading), Georgia, serif; font-size: 1.15rem; color: var(--c-ink); }
.al-result p { font-size: 14px; color: var(--c-body); margin: 6px 0 0; }

.al-pagination {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--c-line);
  font-size: 12.5px; letter-spacing: .06em;
}
.al-pagination__link { color: var(--c-accent-ink); }
.al-pagination__status { color: var(--c-muted); }

/* Footer */
.al-footer {
  border-top: 1px solid var(--c-line);
  padding: var(--space-6) clamp(20px, 4.4vw, 64px);
  background: var(--c-tint);
}
.al-footer__inner {
  max-width: 1240px; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-5);
  flex-wrap: wrap;
}
.al-footer__word {
  font-family: var(--font-heading), Georgia, serif; font-size: 14px;
  letter-spacing: .26em; color: var(--c-ink);
}
.al-footer__word em { font-style: italic; letter-spacing: .1em; color: var(--c-accent-ink); }
.al-footer__logo { max-height: 26px; width: auto; }
.al-footer__meta { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; }
.al-footer__menu { display: flex; gap: var(--space-4); font-size: 12.5px; }
.al-footer__menu a { color: var(--c-body); }
.al-footer__menu a:hover { color: var(--c-ink); }
.al-footer__copy { font-size: 11.5px; letter-spacing: .08em; color: var(--c-muted); }

.al-powered { padding: 16px; text-align: center; font-size: 11.5px; color: var(--c-muted); }
.al-powered a { color: inherit; }

/* Overlay for the mobile drawer */
.al-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(35,32,27,.42);
  backdrop-filter: blur(1px);
  opacity: 0; transition: opacity .22s var(--ease);
}
.al-overlay.is-visible { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .al-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 1024px) {
  .al-shell { grid-template-columns: 280px minmax(0, 1fr); }
  .al-home__status { grid-template-columns: 1fr; gap: var(--space-5); align-items: start; }
  .al-home__progress { max-width: none; }
}

@media (max-width: 900px) {
  .al-shell { grid-template-columns: minmax(0, 1fr); }
  .al-sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 70;
    width: min(86vw, 340px); height: 100%;
    transform: translateX(-102%);
    transition: transform .26s var(--ease);
    box-shadow: 26px 0 60px -40px rgba(35,32,27,.6);
    border-right: 1px solid var(--c-line);
  }
  .al-sidebar.is-open { transform: translateX(0); }
  .al-drawer-close { display: inline-flex; align-items: center; justify-content: center; }
  .al-menu-btn { display: inline-flex; }
  .al-topbar { position: sticky; }
  .al-topbar__inner { gap: 10px; }
  .al-topbar__progress { display: none; }
  .al-user__links { display: none; }
  .al-main { padding-top: var(--space-6); }
  .al-lesson-hero { grid-template-columns: minmax(0,1fr); gap: var(--space-4); align-items: start; }
  .al-lesson-hero__title { max-width: none; }
}

@media (max-width: 640px) {
  :root { --h1: 1.92rem; }
  .al-main { padding: var(--space-5) 18px var(--space-7); }
  .al-topbar__inner { padding: 11px 14px; }
  .al-footer { padding: var(--space-5) 18px; }
  .al-footer__inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .al-home__hero { padding: 22px 20px 24px; border-radius: var(--radius-card); }
  .al-home__hero::after { display: none; }
  .al-home__title { max-width: none; }
  .al-home__cta { width: 100%; }
  .al-cards { grid-template-columns: minmax(0,1fr); }
  .al-card__inner { min-height: 0; padding: 16px; }
  .al-lessonlist { border-radius: var(--radius-card); }
  .al-lessonrow > a { grid-template-columns: 26px minmax(0,1fr); gap: 10px; padding: 15px 16px; }
  .al-lessonrow__state { grid-column: 2; }
  .al-pager { grid-template-columns: minmax(0,1fr); }
  .al-pager__link--next { text-align: left; align-items: flex-start; }
  .al-pager__link--next:only-child { grid-column: 1; }
  .al-prose { font-size: 1.02em; line-height: 1.72; }
  .al-resources { padding: 18px 16px; }
  .al-video__caption { flex-direction: column; align-items: flex-start; gap: 6px; }
  .al-comments__title { font-size: 1.15rem; }
  .al-comment-form { grid-template-columns: 30px minmax(0,1fr); gap: 10px; }
  .al-comment { grid-template-columns: 30px minmax(0,1fr); gap: 10px; }
  .al-section-head h2 { font-size: 1.2rem; }
}

@media (max-width: 400px) {
  .al-main { padding-inline: 14px; }
  .al-home__hero { padding: 18px 16px 20px; }
  .al-card__inner { padding: 14px; }
  .al-resource { grid-template-columns: 28px minmax(0,1fr); }
  .al-resource__cta { display: none; }
  .al-resource__icon { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .al-sidebar, .al-topbar, .al-footer, .al-pager, .al-comments, .al-actions { display: none !important; }
  .al-shell { display: block; }
  .al-main { padding: 0; }
  .al-prose { max-width: none; }
}
