@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700;800&family=Fraunces:wght@500;600;700&display=swap');

:root {
  --bg: #101114;
  --bg-soft: #17191f;
  --panel: rgba(19, 22, 29, 0.92);
  --panel-strong: #171a21;
  --card: #1e222b;
  --card-soft: #262c37;
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-strong: rgba(255, 255, 255, 0.14);
  --text: #f8f6f1;
  --muted: #9ca7b8;
  --muted-strong: #c8cfdb;
  --emerald: #35d0aa;
  --emerald-deep: #188b75;
  --gold: #d7a84a;
  --coral: #ef6d49;
  --navy: #1b315a;
  --berry: #7d335a;
  --cream: #f2ead9;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  --radius-shell: 34px;
  --radius-card: 28px;
  --radius-pill: 999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(53, 208, 170, 0.18), transparent 32%),
    radial-gradient(circle at 85% 12%, rgba(239, 109, 73, 0.16), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(215, 168, 74, 0.12), transparent 28%),
    linear-gradient(180deg, #0d0f13 0%, #101114 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.page {
  min-height: 100vh;
  padding: 18px;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.app-shell {
  width: min(1240px, 100%);
  min-height: calc(100vh - 36px);
  background: linear-gradient(180deg, rgba(17, 20, 27, 0.96), rgba(13, 15, 20, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-shell);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}

.app-shell::before {
  content: '';
  position: absolute;
  inset: auto -12% -20% auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(53, 208, 170, 0.16), transparent 72%);
  pointer-events: none;
}

.main-panel {
  padding: 30px;
  position: relative;
  overflow: auto;
}

.page-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(215, 168, 74, 0.14);
}

.brand-mark {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand-mark h1,
.brand-mark h2 {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.brand-mark p,
.panel-title p,
.hero-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.ghost-button,
.solid-button,
.lesson-chip,
.utility-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.ghost-button:hover,
.solid-button:hover,
.course-card:hover,
.lesson-link:hover,
.module-card:hover,
.course-poster:hover {
  transform: translateY(-2px);
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.solid-button {
  background: linear-gradient(135deg, var(--coral), #ff9158);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 16px 30px rgba(239, 109, 73, 0.26);
}

.hero-actions,
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-stats,
.quick-stats,
.hero-badges,
.chip-row,
.course-badges,
.course-actions,
.support-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.metric-card,
.support-card,
.course-card,
.module-card,
.course-poster,
.lesson-link,
.desktop-card,
.catalog-hero {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(14px);
}

.metric-card,
.support-card,
.desktop-card,
.catalog-hero {
  border-radius: 22px;
  padding: 18px;
}

.metric-card strong,
.sidebar-metric strong,
.course-stat strong,
.lesson-meta strong {
  display: block;
  font-size: 1.2rem;
  color: var(--text);
}

.metric-card span,
.sidebar-metric span,
.course-stat span,
.lesson-meta span,
.helper-text {
  color: var(--muted);
  font-size: 0.92rem;
}

.panel-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.panel-title h2,
.course-hero h2,
.desktop-card h3 {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.course-chip,
.utility-chip,
.lesson-chip {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.course-card h3,
.course-poster h3,
.module-card h3,
.lesson-title,
.lesson-header h3 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.1;
}

.course-card p,
.course-poster p,
.module-card p,
.lesson-header p,
.detail-copy p,
.read-body p,
.quiz-hint,
.complete-copy p {
  margin: 0;
  line-height: 1.6;
}

.progress-ring {
  width: 78px;
  height: 78px;
}

.progress-ring circle:first-child {
  stroke: rgba(255, 255, 255, 0.12);
}

.progress-ring .ring-value {
  font-weight: 800;
  fill: #fff;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.course-poster {
  position: relative;
  min-height: 470px;
  padding: 18px;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  aspect-ratio: 0.74 / 1;
}

.course-poster-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  transition: transform 260ms ease, opacity 260ms ease;
}

.course-poster::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 10, 14, 0.02) 0%, rgba(8, 10, 14, 0.1) 36%, rgba(8, 10, 14, 0.94) 100%);
  pointer-events: none;
}

.course-poster::after,
.course-hero::after {
  content: '';
  position: absolute;
  inset: auto -24px -42px auto;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 68%);
  pointer-events: none;
}

.course-poster[data-accent='emerald'] {
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.16), transparent 22%),
    linear-gradient(180deg, rgba(53, 208, 170, 0.62), rgba(11, 21, 24, 0.88));
}

.course-poster[data-accent='gold'] {
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.16), transparent 22%),
    linear-gradient(180deg, rgba(215, 168, 74, 0.68), rgba(24, 18, 10, 0.9));
}

.course-poster[data-accent='navy'] {
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.16), transparent 22%),
    linear-gradient(180deg, rgba(27, 49, 90, 0.78), rgba(10, 15, 24, 0.92));
}

.course-poster[data-accent='berry'] {
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.16), transparent 22%),
    linear-gradient(180deg, rgba(125, 51, 90, 0.72), rgba(18, 10, 17, 0.92));
}

.course-poster.has-poster-image::before {
  background: linear-gradient(180deg, rgba(8, 10, 14, 0.01) 0%, rgba(8, 10, 14, 0.08) 34%, rgba(8, 10, 14, 0.94) 100%);
}

.card-kicker,
.module-kicker,
.lesson-kicker {
  color: var(--muted-strong);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.course-meta,
.course-footer,
.lesson-meta-row,
.module-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--emerald), var(--gold));
}

.catalog-heading {
  margin-bottom: 20px;
}

.catalog-heading h1 {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.05em;
  line-height: 0.96;
}

.course-poster-top,
.course-poster-bottom {
  position: relative;
  z-index: 1;
}

.course-poster-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 16px;
  margin: -18px;
  background: linear-gradient(180deg, rgba(8, 10, 14, 0) 0%, rgba(8, 10, 14, 0.24) 8%, rgba(8, 10, 14, 0.72) 100%);
}

.course-poster-copy h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  line-height: 1.02;
}

.poster-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.78);
}

.poster-details span {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.poster-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poster-progress-line {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.poster-progress-meta,
.poster-cta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.82);
}

.course-poster:hover .course-poster-image {
  transform: scale(1.04);
  opacity: 0.98;
}

.course-page-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.course-page-topbar {
  margin-bottom: 0;
  justify-content: flex-end;
}

.module-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.course-hero {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 30px;
  min-height: 220px;
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.2), transparent 22%),
    linear-gradient(145deg, rgba(27, 49, 90, 0.92), rgba(24, 139, 117, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.course-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
}

.course-hero .hero-copy {
  max-width: 620px;
  position: relative;
  z-index: 1;
}

.course-hero-note {
  margin-top: 18px;
  padding: 18px 18px 16px;
  border-radius: 22px;
  background: rgba(7, 17, 34, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.course-hero-note-head {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.96rem;
}

.course-hero-note-body {
  position: relative;
  color: rgba(255, 255, 255, 0.86);
}

.course-hero-note-body p,
.course-hero-note-body ul,
.course-hero-note-body ol {
  margin: 0;
}

.course-hero-note-body ul,
.course-hero-note-body ol {
  padding-left: 1.2rem;
}

.course-hero-note-body li + li,
.course-hero-note-body p + p,
.course-hero-note-body p + ul,
.course-hero-note-body p + ol,
.course-hero-note-body ul + p,
.course-hero-note-body ol + p {
  margin-top: 0.7rem;
}

.course-hero-note-body.is-collapsed {
  max-height: 150px;
  overflow: hidden;
}

.course-hero-note-body.is-collapsed::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 54px;
  background: linear-gradient(180deg, rgba(7, 17, 34, 0), rgba(7, 17, 34, 0.96));
  pointer-events: none;
}

.course-hero-toggle {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.course-hero.has-cover-image {
  background: linear-gradient(145deg, rgba(27, 49, 90, 0.8), rgba(24, 139, 117, 0.78));
}

.course-stats-grid {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 2px;
}

.course-stat-compact {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.course-stat-compact strong {
  font-size: 0.95rem;
  color: var(--text);
}

.course-stat-compact span {
  font-size: 0.82rem;
  color: var(--muted);
}

.module-accordion {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 24px;
  overflow: hidden;
}

.module-accordion + .module-accordion {
  margin-top: 12px;
}

.module-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  cursor: pointer;
}

.module-summary::-webkit-details-marker {
  display: none;
}

.module-summary::after {
  content: '+';
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.module-accordion[open] .module-summary::after {
  content: '−';
}

.module-summary-copy,
.module-summary-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.module-summary-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.module-thumb {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.module-summary-copy h3 {
  font-size: 1.02rem;
}

.module-summary-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-right: 10px;
}

.module-panel {
  padding: 0 14px 14px;
}

.module-lessons {
  display: grid;
  gap: 8px;
}

.lesson-link {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.lesson-link:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.lesson-index {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  background: linear-gradient(135deg, rgba(53, 208, 170, 0.9), rgba(27, 49, 90, 0.9));
}

.lesson-link.is-complete .lesson-index {
  background: linear-gradient(135deg, rgba(215, 168, 74, 0.9), rgba(53, 208, 170, 0.9));
}

.lesson-meta-row {
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill {
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.status-pill.is-complete {
  color: #0f241f;
  background: linear-gradient(135deg, var(--gold), #f0d185);
}

.status-pill.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--coral), #ff9158);
}

.status-pill.is-fresh {
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.06);
}

.lesson-page {
  width: min(1320px, 100%);
  min-height: calc(100vh - 36px);
}

.lesson-layout {
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 36px);
}

.lesson-shell-wrap {
  background: linear-gradient(180deg, rgba(17, 20, 27, 0.94), rgba(12, 14, 18, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.lesson-shell-wrap {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lesson-shell {
  width: min(100%, 432px);
  min-height: 840px;
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #13161c;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.42);
}

.lesson-headline {
  padding: 6px 24px 12px;
  background: #12151b;
}

.lesson-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 16px 12px;
  background: #12151b;
  position: relative;
}

.lesson-back,
.lesson-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  display: grid;
  place-items: center;
}

.progress-track {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  transition: all 0.28s ease;
  background: rgba(255, 255, 255, 0.18);
}

.progress-dot.is-read {
  width: 12px;
  border-radius: 999px;
}

.progress-dot.is-quiz {
  width: 14px;
  height: 14px;
  border-radius: 0;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.progress-dot.is-current {
  background: rgba(255, 255, 255, 0.34);
}

.progress-dot.is-read.is-current {
  width: 30px;
  border-radius: 999px;
  clip-path: none;
}

.progress-dot.is-quiz.is-current {
  width: 18px;
  height: 18px;
  border-radius: 0;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}


.progress-dot.is-complete {
  background: var(--emerald);
}

.shield-track {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.shield {
  width: 14px;
  height: 14px;
  clip-path: polygon(50% 0%, 100% 26%, 100% 74%, 50% 100%, 0% 74%, 0% 26%);
  background: rgba(255, 255, 255, 0.22);
}

.shield.is-earned {
  background: linear-gradient(135deg, var(--gold), var(--emerald));
}

.slides-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(38px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.slide.is-exit {
  transform: translateX(-38px);
}

.read-slide,
.complete-slide {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #151920;
}

.read-inner {
  flex: 1;
  overflow-y: auto;
  padding: 30px 24px 22px;
  scrollbar-width: none;
}

.read-inner::-webkit-scrollbar {
  display: none;
}

.read-chapter,
.read-topic,
.read-page {
  text-align: center;
}

.read-chapter {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.read-topic {
  color: var(--emerald);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 7px;
}

.read-page {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 26px;
}

.read-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 1.08rem;
  line-height: 1.72;
  color: #fff;
}

.read-art {
  margin-top: 8px;
  height: 154px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 20%, rgba(242, 234, 217, 0.25), transparent 20%),
    linear-gradient(135deg, rgba(27, 49, 90, 0.95), rgba(125, 51, 90, 0.9), rgba(53, 208, 170, 0.72));
  display: flex;
  align-items: end;
  justify-content: start;
  padding: 18px;
  color: rgba(255, 255, 255, 0.88);
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.slide-action-wrap,
.quiz-action-wrap {
  padding: 0 24px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.slide-action-wrap {
  justify-content: flex-end;
}

.quiz-action-wrap {
  justify-content: flex-end;
}

.next-btn,
.quiz-next-btn,
.complete-btn {
  border: none;
  border-radius: var(--radius-pill);
  min-height: 52px;
  padding: 0 28px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.next-btn,
.complete-btn {
  background: linear-gradient(135deg, var(--emerald), var(--emerald-deep));
}

.quiz-next-btn {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: none;
}

.quiz-next-btn.is-visible {
  display: inline-flex;
  align-items: center;
}

.quiz-slide {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 30px 24px 24px;
  background: linear-gradient(180deg, rgba(53, 208, 170, 0.96), rgba(24, 139, 117, 0.96));
}

.quiz-type {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  margin-bottom: 16px;
}

.quiz-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quiz-question {
  color: #fff;
  font-size: 1.34rem;
  font-weight: 800;
  line-height: 1.4;
}

.quiz-options {
  display: grid;
  gap: 12px;
}

.quiz-option {
  border: none;
  text-align: left;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  color: #20252e;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}

.quiz-option:hover {
  transform: scale(1.01);
}

.quiz-option.is-correct {
  background: rgba(16, 88, 67, 0.96);
  color: #fff;
}

.quiz-option.is-wrong {
  background: rgba(162, 36, 36, 0.96);
  color: #fff;
}

.quiz-option.is-muted {
  background: rgba(255, 255, 255, 0.32);
  color: rgba(255, 255, 255, 0.76);
}

.feedback-banner {
  display: none;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.feedback-banner.is-visible {
  display: block;
}

.feedback-banner.is-correct {
  background: rgba(7, 78, 60, 0.26);
  color: #eafff8;
}

.feedback-banner.is-wrong {
  background: rgba(105, 20, 20, 0.22);
  color: #fff1f1;
}

.quiz-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.9rem;
}

.complete-slide {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 28px;
  gap: 16px;
}

.complete-badge {
  width: 86px;
  height: 86px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(215, 168, 74, 0.92), rgba(53, 208, 170, 0.96));
  color: #0f241f;
  font-weight: 900;
  font-size: 1.1rem;
}

.complete-copy h3 {
  margin: 0 0 8px;
  font-family: 'Fraunces', serif;
  font-size: 2rem;
}

.complete-score {
  padding: 18px 28px;
  border-radius: 24px;
  border: 1px solid rgba(53, 208, 170, 0.34);
  background: rgba(53, 208, 170, 0.08);
}
.course-card h3,
.module-card h3,
.lesson-title,
.lesson-header h3 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.1;
}

.featured-main p,
.course-card p,
.module-card p,
.lesson-header p,
.detail-copy p,
.read-body p,
.quiz-hint,
.complete-copy p {
  margin: 0;
  line-height: 1.6;
}

.featured-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.featured-side {
  display: grid;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.progress-ring {
  width: 78px;
  height: 78px;
}

.progress-ring circle:first-child {
  stroke: rgba(255, 255, 255, 0.12);
}

.progress-ring .ring-value {
  font-weight: 800;
  fill: #fff;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.course-card {
  padding: 22px;
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.course-card::after,
.course-hero::after {
  content: '';
  position: absolute;
  inset: auto -36px -60px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 68%);
  pointer-events: none;
}

.course-card[data-accent='emerald'] {
  background: linear-gradient(180deg, rgba(53, 208, 170, 0.12), rgba(255, 255, 255, 0.03));
}

.course-card[data-accent='gold'] {
  background: linear-gradient(180deg, rgba(215, 168, 74, 0.14), rgba(255, 255, 255, 0.03));
}

.course-card[data-accent='navy'] {
  background: linear-gradient(180deg, rgba(27, 49, 90, 0.22), rgba(255, 255, 255, 0.03));
}

.course-card[data-accent='berry'] {
  background: linear-gradient(180deg, rgba(125, 51, 90, 0.18), rgba(255, 255, 255, 0.03));
}

.card-kicker,
.module-kicker,
.lesson-kicker {
  color: var(--muted-strong);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.course-meta,
.course-footer,
.lesson-meta-row,
.module-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--emerald), var(--gold));
}

.course-page-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.module-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.course-hero {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 30px;
  min-height: 220px;
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.2), transparent 22%),
    linear-gradient(145deg, rgba(27, 49, 90, 0.92), rgba(24, 139, 117, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.course-hero .hero-copy {
  max-width: 620px;
  position: relative;
  z-index: 1;
}

.course-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.course-stat {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.module-card {
  border-radius: 28px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.module-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.module-lessons {
  display: grid;
  gap: 12px;
}

.lesson-link {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.lesson-link:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.lesson-index {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(53, 208, 170, 0.9), rgba(27, 49, 90, 0.9));
}

.lesson-link.is-complete .lesson-index {
  background: linear-gradient(135deg, rgba(215, 168, 74, 0.9), rgba(53, 208, 170, 0.9));
}

.lesson-meta-row {
  color: var(--muted);
  font-size: 0.92rem;
}

.status-pill {
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.status-pill.is-complete {
  color: #0f241f;
  background: linear-gradient(135deg, var(--gold), #f0d185);
}

.status-pill.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--coral), #ff9158);
}

.status-pill.is-fresh {
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.06);
}

.support-card h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}
.footer-pill {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.catalog-hero {
  margin-bottom: 18px;
  overflow: hidden;
}

.catalog-hero .panel-title {
  margin-bottom: 0;
}

.catalog-hero p {
  margin-top: 8px;
}

@media (max-width: 1100px) {
  .lesson-shell-wrap {
    min-height: auto;
  }

  .lesson-shell {
    min-height: calc(100vh - 64px);
  }
}

@media (max-width: 860px) {
  .page {
    padding: 10px;
  }

  .app-shell,
  .lesson-shell-wrap {
    border-radius: 26px;
  }

  .main-panel {
    padding: 22px 18px;
  }

  .course-stats-grid,
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lesson-link {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .lesson-link .status-pill {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .page-topbar,
  .panel-title,
  .course-footer,
  .quiz-footer {
    flex-direction: column;
    align-items: start;
  }

  .module-summary {
    flex-direction: column;
    align-items: start;
  }

  .lesson-shell-wrap {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .lesson-shell {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
  }

  .page.page-lesson {
    padding: 0;
  }

  .course-stats-grid {
    gap: 8px;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    justify-content: stretch;
    column-gap: 8px;
    row-gap: 8px;
  }

  .course-poster {
    min-height: 260px;
    padding: 12px;
    border-radius: 18px;
    margin: 0;
  }

  .course-poster h3 {
    font-size: 1rem;
  }

  .poster-progress,
  .poster-progress-meta,
  .poster-cta-row {
    display: none;
  }

  .course-poster-bottom {
    gap: 8px;
    padding: 14px;
    margin: -12px;
  }

  .poster-details {
    gap: 6px;
    font-size: 0.72rem;
  }

  .read-body {
    font-size: 1rem;
  }
}

.flash-banner {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(53, 208, 170, 0.16);
  border: 1px solid rgba(53, 208, 170, 0.34);
  color: var(--text);
  backdrop-filter: blur(12px);
}

.error-banner {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: min(720px, calc(100vw - 32px));
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(105, 20, 20, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: var(--shadow);
}

.error-banner strong {
  display: block;
  margin-bottom: 8px;
}

.error-banner ul {
  margin: 0;
  padding-left: 18px;
}

.form-card {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(14px);
  border-radius: 28px;
  padding: 22px;
}

.admin-section,
.admin-subsection {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(14px);
  border-radius: 28px;
  overflow: hidden;
}

.admin-summary,
.admin-subsummary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
}

.admin-summary::-webkit-details-marker,
.admin-subsummary::-webkit-details-marker {
  display: none;
}

.admin-summary::after,
.admin-subsummary::after {
  content: '+';
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.admin-section[open] > .admin-summary::after,
.admin-subsection[open] > .admin-subsummary::after {
  content: '−';
}

.admin-summary h3,
.admin-subsummary {
  margin: 0;
}

.admin-section-body {
  padding: 0 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-subsection {
  margin-top: 8px;
  border-radius: 22px;
}

.summary-leading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.summary-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.admin-form,
.stack-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nested-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-list-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-actions form {
  margin: 0;
}

.media-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.media-preview-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.media-preview,
.media-thumb {
  width: 100%;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  object-fit: cover;
}

.media-preview {
  min-height: 180px;
  max-height: 240px;
}

.media-preview-thumb,
.media-thumb {
  min-height: 96px;
  max-height: 140px;
}

.media-thumb {
  width: 86px;
  height: 86px;
  min-height: 86px;
}

.media-thumb-course {
  width: 100%;
  height: 180px;
}

.field-grid {
  display: grid;
  gap: 14px;
}

.field-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span,
.checkbox-field span {
  color: var(--muted-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 14px 16px;
  outline: none;
}

.field textarea {
  resize: vertical;
  min-height: 96px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(53, 208, 170, 0.55);
  box-shadow: 0 0 0 4px rgba(53, 208, 170, 0.14);
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.compact-check {
  align-self: end;
  min-height: 52px;
}

.ghost-danger {
  border-color: rgba(239, 109, 73, 0.24);
  color: #ffd9cf;
}

.lesson-media {
  width: 100%;
  margin-top: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  object-fit: cover;
  max-height: 320px;
}

.compact-media {
  max-height: 220px;
}

.lesson-media-large {
  max-height: 360px;
  margin-top: 8px;
}

.image-caption {
  margin-top: 16px;
  color: var(--muted-strong);
  line-height: 1.6;
}

.lesson-quote {
  margin: 10px 0 0;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'Fraunces', serif;
  font-size: 1.45rem;
  line-height: 1.45;
  color: var(--cream);
}

.lesson-quote p + p {
  margin-top: 14px;
}

.stack-list > form {
  margin-top: -6px;
}

.field input[type='file'] {
  padding: 11px 14px;
}

@media (max-width: 860px) {
  .admin-summary,
  .admin-subsummary {
    align-items: start;
  }

  .field-grid-2,
  .field-grid-3,
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 450px) {
  .summary-leading {
    align-items: start;
  }

  .module-thumb,
  .media-thumb {
    width: 60px;
    height: 60px;
    min-height: 60px;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  .course-poster {
    min-height: 320px;
    border-radius: 16px;
  }
}
