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

:root {
  --bg: #facab1;
  --page-bg-start: #facab1;
  --page-bg-end: #fa8d65;
  --page-bg-start-glow: rgba(250, 202, 177, 0.85);
  --page-bg-end-glow: rgba(250, 141, 101, 0.24);
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #101828;
  --muted: #475467;
  --primary: #0f6bff;
  --primary-strong: #0b57d0;
  --success: #027a48;
  --danger: #b42318;
  --button-primary: #0f6bff;
  --button-primary-start: #3a86ff;
  --button-primary-end: #0d5ee0;
  --button-primary-text: #ffffff;
  --button-primary-rgb: 15, 107, 255;
  --button-learn-more: #0f6bff;
  --button-learn-more-start: #3a86ff;
  --button-learn-more-end: #0d5ee0;
  --button-learn-more-text: #ffffff;
  --button-learn-more-background: linear-gradient(180deg, #3a86ff 0%, #0d5ee0 100%);
  --button-learn-more-border: 0;
  --button-learn-more-rgb: 15, 107, 255;
  --button-leave-testimonial: #ffffff;
  --button-leave-testimonial-start: #ffffff;
  --button-leave-testimonial-end: #e0e0e0;
  --button-leave-testimonial-text: #344054;
  --button-leave-testimonial-background: linear-gradient(180deg, #ffffff 0%, #e0e0e0 100%);
  --button-leave-testimonial-border: 1px solid #d1d1d1;
  --button-leave-testimonial-rgb: 255, 255, 255;
  --button-preview: #ffffff;
  --button-preview-start: #ffffff;
  --button-preview-end: #e0e0e0;
  --button-preview-text: #344054;
  --button-preview-background: linear-gradient(180deg, #ffffff 0%, #e0e0e0 100%);
  --button-preview-border: 1px solid #d1d1d1;
  --button-preview-rgb: 255, 255, 255;
  --button-secondary: #ffffff;
  --button-secondary-start: #ffffff;
  --button-secondary-end: #e0e0e0;
  --button-secondary-text: #344054;
  --button-secondary-border: #d1d1d1;
  --button-secondary-rgb: 255, 255, 255;
  --button-danger: #b42318;
  --button-danger-start: #c24b42;
  --button-danger-end: #9e1f15;
  --button-danger-text: #ffffff;
  --button-danger-rgb: 180, 35, 24;
  --button-buy-now: #f97316;
  --button-buy-now-start: #fa8c40;
  --button-buy-now-end: #db6513;
  --button-buy-now-text: #ffffff;
  --button-buy-now-background: linear-gradient(180deg, #fa8c40 0%, #db6513 100%);
  --button-buy-now-border: 0;
  --button-buy-now-rgb: 249, 115, 22;
  --button-open-course: #027a48;
  --button-open-course-start: #309269;
  --button-open-course-end: #026b3f;
  --button-open-course-text: #ffffff;
  --button-open-course-background: linear-gradient(180deg, #309269 0%, #026b3f 100%);
  --button-open-course-border: 0;
  --button-open-course-rgb: 2, 122, 72;
  --border: #d0d9e4;
  --ring: rgba(15, 107, 255, 0.22);
  --shadow-sm: 0 8px 20px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 18px 40px rgba(16, 24, 40, 0.1);
  --font-heading: 'Montserrat', 'Avenir Next', 'Segoe UI', sans-serif;
  --font-body: 'Raleway', 'Avenir Next', 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 10% -15%, var(--page-bg-start-glow) 0%, transparent 45%),
    radial-gradient(circle at 95% 15%, var(--page-bg-end-glow) 0%, transparent 38%),
    linear-gradient(180deg, var(--page-bg-start) 0%, var(--page-bg-end) 100%);
  line-height: 1.55;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.6rem;
  font-family: var(--font-heading);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.75rem, 2.4vw, 2.45rem);
}

h2 {
  font-size: clamp(1.25rem, 1.7vw, 1.65rem);
}

p,
blockquote,
small,
footer {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

.site-footer {
  max-width: 1180px;
  margin: -22px auto 30px;
  padding: 0 18px;
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-style: italic;
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(208, 217, 228, 0.85);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
}

.impersonation-banner {
  position: sticky;
  top: 63px;
  z-index: 29;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 18px;
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
  color: #7c2d12;
}

.impersonation-banner div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.impersonation-banner span {
  color: #7c2d12;
}

.impersonation-banner .inline-form button {
  border-color: #fdba74;
}

.brand {
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.brand-image {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  flex: 0 0 auto;
}

nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

nav a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #344054;
  transition: background-color 0.2s ease, color 0.2s ease;
}

nav a:hover {
  text-decoration: none;
  background: #edf2ff;
  color: #1d4ed8;
}

.external-link-icon {
  position: relative;
  width: 0.72em;
  height: 0.72em;
  border: 1.6px solid currentColor;
  border-radius: 2px;
  opacity: 0.72;
  transform: translateY(-0.02em);
}

.external-link-icon::before {
  content: "";
  position: absolute;
  top: -0.24em;
  right: -0.24em;
  width: 0.42em;
  height: 0.42em;
  border-top: 1.6px solid currentColor;
  border-right: 1.6px solid currentColor;
}

.external-link-icon::after {
  content: "";
  position: absolute;
  top: -0.13em;
  right: -0.18em;
  width: 0.48em;
  border-top: 1.6px solid currentColor;
  transform: rotate(-45deg);
  transform-origin: right center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-dropdown {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: -10px;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  min-width: 220px;
  padding: 8px;
  display: grid;
  gap: 4px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #d8e3f0;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.nav-dropdown-menu-courses {
  min-width: 320px;
  max-height: min(72vh, 620px);
  overflow-y: auto;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
}

.nav-dropdown-overview {
  border-bottom: 1px solid #e4eaf2;
  margin-bottom: 4px;
  padding-bottom: 12px;
}

.nav-dropdown-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav-course-link {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.nav-course-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.nav-course-copy strong,
.nav-course-copy small {
  display: block;
}

.nav-course-copy strong {
  color: var(--text);
}

.nav-course-copy small {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-course-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #d8e3f0;
  background: #eef2f8;
}

.nav-course-thumb-placeholder {
  display: block;
  background:
    linear-gradient(135deg, #dbe8ff 0%, #eef5ff 55%, #dff7ef 100%);
}

.container {
  max-width: 1180px;
  margin: 26px auto 48px;
  padding: 0 18px;
}

.hero,
.card,
.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.hero {
  padding: clamp(1.4rem, 3vw, 2.15rem);
  margin-bottom: 20px;
  background:
    linear-gradient(160deg, #ffffff 0%, #f5f9ff 100%),
    var(--surface);
}

.home-hero {
  min-height: clamp(120px, 17vw, 210px);
  display: flex;
  align-items: center;
}

.home-hero > div {
  max-width: 780px;
}

.home-hero-with-image {
  border-color: rgba(16, 24, 40, 0.2);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.56) 0%, rgba(255, 255, 255, 0.32) 34%, rgba(255, 255, 255, 0) 70%),
    var(--home-hero-image);
  background-position: center;
  background-size: cover;
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.18);
}

.hero-description {
  color: var(--text);
  white-space: pre-line;
}

.hero-large {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.9fr);
  align-items: start;
}

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

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

.dashboard-hero {
  min-height: clamp(72px, 10.2vw, 126px);
  margin-bottom: 20px;
}

.dashboard-course-card {
  scroll-margin-top: 88px;
}

.dashboard-testimonial-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 24, 40, 0.44);
  backdrop-filter: blur(4px);
}

.dashboard-testimonial-modal[hidden] {
  display: none !important;
}

.dashboard-testimonial-dialog {
  width: min(100%, 540px);
  max-height: min(720px, calc(100vh - 40px));
  overflow-y: auto;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(208, 217, 228, 0.95);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

.dashboard-testimonial-header {
  display: flex;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
}

.dashboard-testimonial-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
}

.dashboard-testimonial-course {
  margin-bottom: 1rem;
  color: var(--text);
  font-weight: 700;
}

.dashboard-testimonial-status {
  margin: 0;
}

.dashboard-testimonial-actions {
  justify-content: flex-end;
}

.player-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
}

.curriculum-stack,
.module-lessons,
.lesson-list-grid {
  display: grid;
  gap: 16px;
}

.card {
  padding: 20px;
}

.course-grid > .card {
  background: rgba(255, 255, 255, 0.5);
}

.course-grid:not(.dashboard-course-grid) > .card {
  display: flex;
  flex-direction: column;
}

.course-grid:not(.dashboard-course-grid) .course-card-actions {
  margin-top: auto;
  padding-top: 4px;
}

.mini-card {
  padding: 14px 15px;
  background: var(--surface-soft);
  box-shadow: none;
  border-radius: 14px;
}

.single-card {
  margin-bottom: 18px;
}

.auth-shell {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin: 0 auto 18px;
}

.auth-card {
  width: 100%;
}

.auth-showcase {
  overflow: hidden;
  padding: 0;
}

.auth-showcase-image {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  background: #dfe7f3;
}

.profile-hero {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.8fr);
  align-items: stretch;
}

.profile-hero-panel {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(15, 107, 255, 0.14), transparent 46%),
    linear-gradient(160deg, #f7fbff 0%, #eef5ff 100%);
  border: 1px solid #d4e2f4;
}

.profile-kicker {
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  align-items: start;
}

.profile-sidebar,
.profile-main,
.profile-summary-card {
  display: grid;
  gap: 18px;
}

.profile-sidebar {
  align-content: start;
}

.profile-summary-card {
  position: sticky;
  top: 88px;
  background:
    radial-gradient(circle at top left, rgba(15, 107, 255, 0.1), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.profile-avatar {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: linear-gradient(160deg, #0f6bff 0%, #1b8a8f 100%);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 16px 28px rgba(15, 107, 255, 0.22);
}

.profile-meta-list {
  display: grid;
  gap: 10px;
}

.profile-meta-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #d8e3f0;
  background: rgba(255, 255, 255, 0.82);
}

.profile-meta-item span {
  color: var(--muted);
  font-size: 0.84rem;
}

.profile-meta-item strong {
  color: var(--text);
}

.profile-form-card {
  display: grid;
  gap: 16px;
}

.profile-section-heading {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
}

.profile-section-heading .microcopy {
  max-width: 320px;
  margin-bottom: 0;
}

.profile-form-grid {
  gap: 14px;
}

.profile-form-footer {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 2px;
}

.profile-form-footer .microcopy {
  max-width: 520px;
  margin-bottom: 0;
}

.form-grid,
.stack-sm,
.stack-lg {
  display: grid;
}

.form-grid {
  gap: 12px;
  margin-top: 10px;
}

.appearance-color-group {
  border: 1px solid #d0d9e4;
  border-radius: 8px;
  margin: 0;
  padding: 14px;
}

.appearance-color-group legend {
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0 6px;
}

.stack-sm {
  gap: 10px;
}

.stack-lg {
  gap: 18px;
}

label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 0.95rem;
  font-weight: 600;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px solid #c9d4e1;
  background: #fff;
  color: var(--text);
}

.color-swatch-input {
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 3px;
  border-radius: 8px;
  cursor: pointer;
}

.color-swatch-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-swatch-input::-webkit-color-swatch {
  border: 0;
  border-radius: 5px;
}

.color-swatch-input::-moz-color-swatch {
  border: 0;
  border-radius: 5px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #8fb8ff;
  box-shadow: 0 0 0 4px var(--ring);
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 11px;
  padding: 11px 15px;
  background: linear-gradient(180deg, var(--button-primary-start) 0%, var(--button-primary-end) 100%);
  color: var(--button-primary-text);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button:hover,
.button-link:hover {
  filter: brightness(1.03);
  box-shadow: 0 8px 20px rgba(var(--button-primary-rgb), 0.28);
  text-decoration: none;
}

button:active,
.button-link:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.25);
  opacity: 0.58;
  transform: none;
}

button.danger {
  background: linear-gradient(180deg, var(--button-danger-start) 0%, var(--button-danger-end) 100%);
  color: var(--button-danger-text);
}

button.danger:hover {
  box-shadow: 0 8px 20px rgba(var(--button-danger-rgb), 0.3);
}

button.secondary {
  background: linear-gradient(180deg, var(--button-secondary-start) 0%, var(--button-secondary-end) 100%);
  color: var(--button-secondary-text);
  border: 1px solid var(--button-secondary-border);
  box-shadow: none;
}

button.secondary:hover,
.secondary-link:hover,
.inline-form button:hover {
  box-shadow: 0 8px 20px rgba(var(--button-secondary-rgb), 0.22);
}

.secondary-link {
  background: linear-gradient(180deg, var(--button-secondary-start) 0%, var(--button-secondary-end) 100%);
  color: var(--button-secondary-text);
  border: 1px solid var(--button-secondary-border);
  box-shadow: none;
}

.learn-more-link {
  background: var(--button-learn-more-background);
  color: var(--button-learn-more-text);
  border: var(--button-learn-more-border);
}

.learn-more-link:hover {
  box-shadow: 0 8px 20px rgba(var(--button-learn-more-rgb), 0.32);
}

.leave-testimonial-link {
  background: var(--button-leave-testimonial-background);
  color: var(--button-leave-testimonial-text);
  border: var(--button-leave-testimonial-border);
  box-shadow: none;
}

.leave-testimonial-link:hover {
  box-shadow: 0 8px 20px rgba(var(--button-leave-testimonial-rgb), 0.22);
}

.preview-link {
  background: var(--button-preview-background);
  color: var(--button-preview-text);
  border: var(--button-preview-border);
  box-shadow: none;
}

.preview-link:hover {
  box-shadow: 0 8px 20px rgba(var(--button-preview-rgb), 0.22);
}

.buy-now-link {
  background: var(--button-buy-now-background);
  color: var(--button-buy-now-text);
  border: var(--button-buy-now-border);
}

.buy-now-link:hover {
  box-shadow: 0 8px 20px rgba(var(--button-buy-now-rgb), 0.32);
}

.open-course-link {
  background: var(--button-open-course-background);
  color: var(--button-open-course-text);
  border: var(--button-open-course-border);
}

.open-course-link:hover {
  box-shadow: 0 8px 20px rgba(var(--button-open-course-rgb), 0.32);
}

.inline-form {
  display: inline;
}

.inline-form button {
  background: linear-gradient(180deg, var(--button-secondary-start) 0%, var(--button-secondary-end) 100%);
  color: var(--button-secondary-text);
  border: 1px solid var(--button-secondary-border);
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: none;
}

.button-row,
.lesson-row,
.form-inline-group,
.module-header,
.module-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.course-card-actions .button-link {
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 0.92rem;
}

.dashboard-testimonial-form {
  margin-top: 12px;
}

.dashboard-testimonial-form .button-row {
  margin-top: 2px;
}

.form-inline-group {
  flex: 1 1 240px;
}

.form-inline-group input {
  flex: 1 1 180px;
}

.module-header,
.module-grid {
  justify-content: space-between;
}

.module-header-actions,
.editor-tree-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.module-grid > label {
  flex: 1 1 220px;
}

.tag {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  border-radius: 999px;
  padding: 5px 10px;
  margin-bottom: 0.8rem;
}

.tag {
  color: #0b57d0;
  background: #edf4ff;
  border: 1px solid #c7dafd;
  font-size: 0.84rem;
}

.tag-success {
  color: #0f5132;
  background: #dcfae6;
  border-color: #abefc6;
}

.tag-warning {
  color: #92400e;
  background: #fff3db;
  border-color: #f3d08b;
}

.notice {
  color: #004a77;
  background: #e0f2ff;
  border: 1px solid #a4d8f8;
  border-radius: 10px;
  padding: 10px 12px;
}

.error {
  color: var(--danger);
  font-weight: 700;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 800;
  color: #1d4ed8;
}

.lead {
  font-size: 1.05rem;
}

.microcopy {
  font-size: 0.92rem;
}

.field-label {
  margin-bottom: 0;
  color: #344054;
  font-size: 0.95rem;
  font-weight: 600;
}

code {
  background: #eef2f8;
  padding: 2px 6px;
  border-radius: 6px;
}

.lesson {
  margin-bottom: 12px;
}

details.lesson {
  background: #f8fbff;
  border: 1px solid #d8e3f0;
  border-radius: 12px;
  padding: 10px 12px;
}

details.lesson summary {
  cursor: pointer;
  font-weight: 700;
  color: #1f2937;
}

.chapter-body {
  white-space: pre-wrap;
  font-family: var(--font-body);
  color: #344054;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed #d0d9e4;
}

.chapter-body-panel {
  margin-top: 0;
  padding: 16px;
  font-family: var(--font-body);
  border: 1px solid #d8e3f0;
  border-radius: 14px;
  background: #f9fbff;
}

.lesson-sidebar {
  --lesson-sidebar-offset: 92px;
  --lesson-sidebar-bottom-gap: 20px;
  position: fixed;
  left: var(--lesson-sidebar-left, 18px);
  top: var(--lesson-sidebar-offset);
  width: min(var(--lesson-sidebar-width, 320px), calc(100vw - 36px));
  max-height: calc(100dvh - var(--lesson-sidebar-offset) - var(--lesson-sidebar-bottom-gap));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.lesson-sidebar-shell {
  min-width: 0;
}

.lesson-stage video {
  display: block;
  width: 100%;
  border-radius: 12px;
  border: 1px solid #d0d9e4;
  background: #0b1220;
  margin-bottom: 14px;
}

.lesson-stage video.lesson-video-portrait {
  aspect-ratio: 16 / 9;
  max-height: min(72vh, 640px);
  object-fit: contain;
}

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

.player-course-summary h1 {
  margin: 0;
  min-width: 0;
}

.lesson-sidebar-header .player-course-summary h1 {
  font-size: clamp(1.2rem, 1.6vw, 1.55rem);
}

.lesson-sidebar-header {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e4eaf2;
}

.player-course-thumb {
  width: auto;
  height: 56px;
  flex: 0 0 auto;
  max-width: 96px;
  display: block;
  border-radius: 14px;
  border: 1px solid #d8e3f0;
  background: #eef2f8;
}

.lesson-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.lesson-stage-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.lesson-stage-action {
  display: flex;
}

.lesson-stage-action-start {
  justify-content: flex-start;
}

.lesson-stage-action-center {
  justify-content: center;
}

.lesson-stage-action-end {
  justify-content: flex-end;
}

.lesson-nav {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d8e3f0;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.lesson-nav.active {
  border-color: #8fb8ff;
  box-shadow: 0 0 0 4px var(--ring);
}

.lesson-nav.locked {
  opacity: 0.55;
  pointer-events: none;
}

.lesson-nav:hover {
  text-decoration: none;
}

.lesson-nav:hover .lesson-nav-text,
.lesson-nav:hover .lesson-nav-meta-text {
  text-decoration: underline;
}

.lesson-nav span,
.lesson-nav small {
  display: block;
}

.lesson-nav-title {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lesson-nav-status-icon {
  flex: 0 0 auto;
  line-height: 1;
}

.access-badge-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.access-badge-only {
  gap: 0;
  justify-content: flex-start;
  vertical-align: text-top;
}

.access-badge-emoji {
  font-size: 1.8em;
  line-height: 1;
  display: block;
  margin-left: -0.12em;
}

.module-card,
.lesson-editor-card,
.lesson-preview-card,
.lesson-create-card,
.mini-form-card,
.asset-panel {
  border: 1px solid #d8e3f0;
  border-radius: 16px;
  background: #fff;
}

.module-card {
  padding: 18px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8ff 100%);
}

.module-header {
  align-items: flex-start;
  margin-bottom: 14px;
}

.module-body {
  display: grid;
  gap: 14px;
}

.module-body[hidden],
.editor-tree-list[hidden] {
  display: none !important;
}

.module-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #d0d9e4;
  background: #fff;
  color: #344054;
  box-shadow: none;
  font-size: 0.92rem;
}

.module-toggle:hover {
  border-color: #b8cef7;
}

.lesson-sidebar-module-toggle {
  flex: 1 1 220px;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.lesson-sidebar-module-toggle:hover {
  border-color: transparent;
  color: #0b57d0;
}

.lesson-sidebar-module-toggle:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 3px;
}

.lesson-sidebar-module-toggle .module-toggle-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lesson-sidebar-module-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.3;
}

.lesson-sidebar-module-toggle .module-toggle-icon {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  transform: rotate(45deg) translateY(-1px);
}

.module-toggle-icon {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transform-origin: center;
  transition: transform 0.18s ease;
}

[data-module-expanded="true"] .module-toggle-icon {
  transform: rotate(-135deg) translate(-1px, -1px);
}

[data-module-collapsible][data-module-expanded="false"] > .module-header,
[data-module-collapsible][data-module-expanded="false"] > .editor-tree-header {
  margin-bottom: 0;
}

.mini-form-card,
.lesson-editor-card,
.lesson-create-card {
  padding: 16px;
}

.lesson-editor-card,
.lesson-create-card {
  background: #ffffff;
}

.lesson-editor-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.lesson-thumb-preview,
.lesson-card-thumb,
.lesson-stage-thumb {
  display: block;
  object-fit: cover;
  background: #eef2f8;
  border: 1px solid #d8e3f0;
  border-radius: 14px;
}

.lesson-thumb-preview {
  width: 120px;
  height: 80px;
}

.lesson-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 12px;
}

.lesson-stage-thumb {
  width: 100%;
  max-height: 280px;
  margin-bottom: 16px;
}

.lesson-preview-card {
  padding: 14px;
}

.asset-row,
.asset-row-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.asset-row {
  padding: 12px 14px;
  border: 1px solid #d8e3f0;
  border-radius: 14px;
  background: #f8fbff;
}

.lesson-text-section-card {
  display: grid;
  gap: 12px;
}

.lesson-text-section-card.is-collapsed {
  gap: 8px;
}

.lesson-text-section-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.lesson-text-section-header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.lesson-text-section-body {
  display: grid;
  gap: 12px;
}

.lesson-text-section-body[hidden] {
  display: none !important;
}

.asset-row-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.asset-row-controls > label {
  min-width: 120px;
}

.lesson-text-section-fields {
  display: grid;
  gap: 12px;
  width: 100%;
}

.lesson-text-section-fields > label,
.lesson-text-section-fields textarea {
  width: 100%;
}

.lesson-text-section-card.is-collapsed [data-text-section-summary] {
  color: #344054;
}

[data-text-section-expanded="true"] .module-toggle-icon {
  transform: rotate(-135deg) translate(-1px, -1px);
}

.drag-handle {
  width: 40px;
  min-width: 40px;
  padding: 10px 0;
  border-radius: 12px;
  border: 1px dashed #c0d2ea;
  background: #fff;
  color: #526581;
  cursor: grab;
  font-weight: 700;
  line-height: 1;
}

.drag-handle:active {
  cursor: grabbing;
}

.nav-order-list {
  display: grid;
  gap: 12px;
}

.nav-order-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-order-item.is-dragging {
  opacity: 0.7;
}

.nav-order-copy {
  display: grid;
  gap: 3px;
}

.nav-order-copy small {
  color: var(--muted);
}

.asset-panel {
  padding: 16px;
}

.rich-editor {
  display: grid;
  gap: 10px;
}

.rich-body-render h1,
.rich-body-render h2,
.rich-body-render h3,
.rich-body-render h4,
.rich-body-render h5,
.rich-body-render h6,
.chapter-body h1,
.chapter-body h2,
.chapter-body h3,
.chapter-body h4,
.chapter-body h5,
.chapter-body h6,
.chapter-body-panel h1,
.chapter-body-panel h2,
.chapter-body-panel h3,
.chapter-body-panel h4,
.chapter-body-panel h5,
.chapter-body-panel h6 {
  font-family: var(--font-body);
  letter-spacing: normal;
}

.rich-editor-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rich-editor-toolbar .secondary {
  padding: 8px 10px;
}

.lesson-settings {
  border: 1px dashed #cfd8e3;
  border-radius: 12px;
  padding: 12px;
  background: #fbfdff;
}

.lesson-settings summary {
  cursor: pointer;
  font-weight: 700;
  color: #1f2937;
}

.lesson-settings[open] summary {
  margin-bottom: 12px;
}

.lesson-pdf-frame {
  width: 100%;
  min-height: 560px;
  border: 1px solid #d0d9e4;
  border-radius: 14px;
  background: #fff;
}

.rich-body-render p:first-child {
  margin-top: 0;
}

.rich-body-render p:last-child {
  margin-bottom: 0;
}

.rich-body-render ul,
.rich-body-render ol,
.rich-body-render blockquote,
.rich-body-render h2,
.rich-body-render h3 {
  margin-top: 0;
}

.resource-panel {
  display: grid;
  gap: 12px;
}

.course-graphic {
  width: 100%;
  display: block;
  border-radius: 16px;
  border: 1px solid #d0d9e4;
  object-fit: cover;
  margin-bottom: 14px;
  background: #eef2f8;
}

.course-graphic-hero {
  max-height: 300px;
}

.course-graphic-thumb {
  max-height: 180px;
}

.course-graphic-preview {
  width: 100%;
  max-width: 320px;
  border-radius: 14px;
  border: 1px solid #d0d9e4;
}

.home-hero-preview {
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.brand-image-preview {
  width: 96px;
  aspect-ratio: 1;
  object-fit: cover;
}

.lesson-image {
  width: 100%;
  border-radius: 14px;
  border: 1px solid #d0d9e4;
}

.quote-card {
  margin: 0;
  padding: 14px 16px;
  background: #f8fbff;
  border: 1px solid #d8e3f0;
  border-radius: 14px;
}

.comment-admin-response {
  margin-top: 12px;
  padding: 12px 14px;
  background: #f7fbf8;
  border-left: 4px solid #2f855a;
  border-radius: 8px;
}

.comment-admin-response p:first-child {
  margin-top: 0;
}

.comment-admin-response p:last-child {
  margin-bottom: 0;
}

.editor-overview-card {
  display: grid;
  gap: 18px;
}

.editor-overview-top,
.editor-tree-header,
.editor-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.editor-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.editor-stat-card {
  min-height: 120px;
}

.editor-shell {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
  align-items: start;
}

.editor-sidebar-shell {
  min-width: 0;
}

.editor-sidebar {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.editor-sidebar-block {
  display: grid;
  gap: 12px;
}

.editor-sidebar-header {
  margin-bottom: 0;
}

.editor-sidebar-course-copy {
  min-width: 0;
}

.editor-sidebar-course-copy .eyebrow,
.editor-sidebar-header .microcopy,
.editor-sidebar-section-heading .field-label,
.editor-sidebar-section-heading .microcopy {
  margin-bottom: 0;
}

.editor-sidebar-course-copy h2 {
  margin-bottom: 0;
  font-size: clamp(1.2rem, 1.5vw, 1.5rem);
}

.editor-sidebar-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.editor-sidebar-stats .tag {
  margin-bottom: 0;
}

.editor-sidebar-section-heading {
  align-items: flex-start;
}

.editor-nav-stack,
.editor-tree,
.editor-tree-list,
.editor-linked-list {
  display: grid;
  gap: 12px;
}

.editor-nav-item,
.editor-tree-title,
.editor-tree-link,
.editor-linked-list-item,
.editor-linked-list-link {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #d8e3f0;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.editor-nav-item:hover,
.editor-tree-title:hover,
.editor-tree-link:hover,
.editor-linked-list-link:hover {
  text-decoration: none;
  border-color: #b8cef7;
  transform: translateY(-1px);
}

.editor-nav-item.active,
.editor-tree-title.active,
.editor-tree-link.active {
  border-color: #8fb8ff;
  box-shadow: 0 0 0 4px var(--ring);
}

.editor-nav-item span,
.editor-nav-item small,
.editor-tree-title span,
.editor-tree-title small,
.editor-tree-link span,
.editor-tree-link small,
.editor-linked-list-link span,
.editor-linked-list-link small {
  display: block;
}

.editor-tree-group {
  display: grid;
  gap: 12px;
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid #d8e3f0;
  background: #f8fbff;
  box-shadow: none;
}

.editor-tree-group.active {
  border-color: #bfd4fb;
  background: linear-gradient(180deg, #f8fbff 0%, #eff5ff 100%);
}

.editor-tree-heading {
  display: flex;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  align-items: flex-start;
}

.editor-tree-title {
  flex: 1 1 auto;
}

.editor-sidebar-module-toggle {
  flex: 1 1 auto;
  min-width: 0;
}

.editor-sidebar-module-meta {
  display: block;
  color: #475467;
  font-size: 0.84rem;
}

.editor-tree-lesson-item {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.editor-tree-link {
  flex: 1 1 auto;
  color: var(--text);
}

.editor-tree-link:hover {
  color: var(--text);
  transform: none;
}

.editor-linked-list-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 0;
  background: transparent;
  border: 0;
}

.editor-linked-list-link {
  flex: 1 1 auto;
  color: var(--text);
}

.editor-linked-list-link:hover {
  color: var(--text);
}

.editor-tree-group.is-dragging,
.editor-tree-lesson-item.is-dragging,
.editor-linked-list-item.is-dragging,
.asset-row.is-dragging {
  opacity: 0.7;
}

.is-hidden {
  display: none !important;
}

.editor-tree-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d0d9e4;
  background: #fff;
  color: #344054;
  font-weight: 700;
  white-space: nowrap;
}

.editor-tree-action.active {
  border-color: #8fb8ff;
  box-shadow: 0 0 0 4px var(--ring);
}

.editor-tree-empty,
.editor-empty-state {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed #cfd8e3;
  background: #fbfdff;
}

.editor-empty-state p {
  color: var(--text);
}

.editor-main {
  min-width: 0;
}

.editor-panel {
  display: grid;
  gap: 18px;
}

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

.editor-media-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #d8e3f0;
  border-radius: 14px;
  background: #f8fbff;
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.checkbox-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.backup-grid {
  display: grid;
  gap: 10px;
}

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

.admin-link-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 180px;
}

.user-admin-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
}

.user-list-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.user-list-header {
  display: grid;
  gap: 12px;
}

.user-filter-form {
  margin-top: 0;
}

.user-create-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d8e3f0;
  border-radius: 12px;
  background: #f8fbff;
}

.user-create-panel h3,
.user-create-panel .form-grid {
  margin-top: 0;
}

.user-create-panel select[multiple] {
  min-height: 118px;
}

.user-list {
  display: grid;
  gap: 10px;
  max-height: 980px;
  overflow: auto;
}

.user-list-item {
  margin: 0;
}

.user-list-button {
  width: 100%;
  display: grid;
  gap: 8px;
  text-align: left;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #d8e3f0;
  background: #f8fbff;
  color: var(--text);
  box-shadow: none;
}

.user-list-item.active .user-list-button {
  border-color: #8fb8ff;
  box-shadow: 0 0 0 4px var(--ring);
  background: #fff;
}

.user-list-title-row,
.user-list-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.user-list-subtle {
  color: var(--muted);
  font-size: 0.94rem;
}

.user-list-meta {
  color: #475467;
  font-size: 0.84rem;
}

.user-detail-header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}

.upload-detail-header,
.upload-reference-header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.upload-path {
  margin-bottom: 0;
  padding: 10px 12px;
  border: 1px solid #d8e3f0;
  border-radius: 12px;
  background: #f8fbff;
  color: #344054;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92rem;
  word-break: break-word;
}

.upload-preview {
  margin-top: 20px;
}

.upload-preview-frame {
  display: block;
  max-width: 100%;
  max-height: 360px;
  border-radius: 16px;
  border: 1px solid #d8e3f0;
  background: #f8fbff;
}

.upload-detail-card p,
.upload-reference-card p {
  margin-bottom: 0;
}

.upload-reference-list {
  display: grid;
  gap: 12px;
}

.upload-table-wrap {
  max-height: 980px;
  overflow: auto;
  border: 1px solid #d8e3f0;
  border-radius: 16px;
  background: #fff;
}

.upload-file-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
}

.upload-file-table th,
.upload-file-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #e4eaf2;
  vertical-align: top;
  text-align: left;
}

.upload-file-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.upload-file-table tbody tr:last-child td {
  border-bottom: 0;
}

.upload-file-table tbody tr:hover td {
  background: #f8fbff;
}

.upload-file-row-selected td {
  background: #eef4ff;
}

.upload-file-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.upload-file-link strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.upload-file-folder {
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.upload-file-numeric {
  font-size: 0.84rem;
  white-space: nowrap;
}

.user-detail-sections {
  margin-top: 20px;
}

.completion-report-header {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.completion-report-results {
  margin-bottom: 0;
}

.completion-report-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: end;
  margin-bottom: 16px;
}

.completion-report-actions {
  align-self: end;
}

.completion-report-legend {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.completion-report-legend .tag {
  margin-bottom: 0;
}

.completion-report-tag-blocked {
  color: #b42318;
  background: #fee4e2;
  border-color: #f7b0ab;
}

.completion-report-table-wrap {
  overflow: auto;
  border: 1px solid #d8e3f0;
  border-radius: 16px;
  background: #fff;
}

.completion-report-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.completion-report-table th,
.completion-report-table td {
  padding: 0;
  border-right: 1px solid #e4eaf2;
  border-bottom: 1px solid #e4eaf2;
  vertical-align: top;
  background: #fff;
}

.completion-report-table tr:last-child th,
.completion-report-table tr:last-child td {
  border-bottom: 0;
}

.completion-report-table th:last-child,
.completion-report-table td:last-child {
  border-right: 0;
}

.completion-report-table thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.completion-report-sticky {
  position: sticky;
  left: 0;
  z-index: 5;
}

.completion-report-sticky-corner {
  z-index: 7 !important;
}

.completion-report-user-heading,
.completion-report-user-cell {
  min-width: 260px;
  max-width: 260px;
}

.completion-report-user-heading {
  padding: 14px;
  text-align: left;
}

.completion-report-user-cell {
  background: #fbfdff !important;
}

.completion-report-user-summary {
  display: grid;
  gap: 4px;
  padding: 14px;
}

.completion-report-user-summary strong {
  display: block;
}

.completion-report-user-summary span {
  color: #475467;
  font-size: 0.88rem;
}

.completion-report-course-heading {
  display: grid;
  gap: 4px;
  min-width: 132px;
  max-width: 132px;
  padding: 14px 12px;
  text-align: left;
}

.completion-report-course-heading strong {
  display: block;
  font-size: 0.94rem;
}

.completion-report-course-heading span {
  color: #475467;
  font-size: 0.82rem;
}

.completion-report-table td {
  min-width: 132px;
  max-width: 132px;
}

.completion-report-cell,
.completion-report-empty {
  min-height: 102px;
}

.completion-report-cell {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 12px 10px;
  background: #f8fbff;
}

.completion-report-cell strong {
  font-size: 1rem;
  color: var(--text);
}

.completion-report-cell span {
  color: #475467;
  font-size: 0.84rem;
}

.completion-report-cell-meta {
  font-weight: 700;
}

.completion-report-cell-completed {
  background: #ecfdf3;
}

.completion-report-cell-in-progress {
  background: #eef4ff;
}

.completion-report-cell-not-started {
  background: #fff8e7;
}

.completion-report-cell-blocked {
  background: #fff1f1;
}

.completion-report-cell-pending {
  box-shadow: inset 0 0 0 1px #f3d08b;
}

.completion-report-empty {
  display: grid;
  place-items: center;
  color: #98a2b3;
  font-weight: 700;
  background: #fcfcfd;
}

.completion-report-empty-state {
  margin-top: 14px;
}

.feedback-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.system-stats-filter-header {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
}

.system-stats-quick-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.system-stats-quick-link-active {
  border-color: #8fb8ff;
  box-shadow: 0 0 0 4px var(--ring);
}

.system-stats-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.system-stats-filter-actions {
  align-self: end;
}

.system-stats-detail-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-bottom: 18px;
}

.system-stats-breakdown-list,
.system-stats-ranking-list {
  display: grid;
  gap: 12px;
}

.system-stats-breakdown-list {
  margin-top: 14px;
}

.system-stats-breakdown-row,
.system-stats-ranking-row {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid #d8e3f0;
  border-radius: 14px;
  background: #f8fbff;
}

.system-stats-breakdown-row h3,
.system-stats-ranking-row h3 {
  margin-bottom: 0.35rem;
}

.system-stats-breakdown-row p,
.system-stats-ranking-row p {
  margin-bottom: 0;
}

.system-stats-ranking-total {
  min-width: 84px;
  display: grid;
  justify-items: end;
  text-align: right;
}

.system-stats-ranking-total strong {
  font-size: 1.55rem;
  line-height: 1;
}

.system-stats-ranking-total span {
  color: var(--muted);
  font-size: 0.86rem;
}

.feedback-filter-form {
  margin-top: 0;
}

.feedback-bulk-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d8e3f0;
  border-radius: 12px;
  background: #f8fbff;
}

.feedback-select-all-row {
  align-items: center;
}

.feedback-bulk-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.feedback-bulk-actions button {
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 0.92rem;
}

.feedback-bulk-count {
  color: #475467;
  font-size: 0.88rem;
  font-weight: 700;
  margin-right: auto;
}

.feedback-list-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.feedback-row-select {
  display: grid;
  place-items: start center;
  padding-top: 16px;
}

.feedback-list-entry.active .user-list-button {
  border-color: #8fb8ff;
  box-shadow: 0 0 0 4px var(--ring);
  background: #fff;
}

.feedback-status-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.feedback-list-snippet {
  color: #344054;
  font-size: 0.94rem;
  line-height: 1.5;
}

.feedback-detail-header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}

.feedback-context-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 18px 0 24px;
}

.feedback-context-card {
  display: grid;
  gap: 8px;
}

.feedback-context-card p {
  margin: 0;
}

.ip-history-card {
  display: grid;
  gap: 8px;
}

.ip-history-header {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.backup-option {
  padding: 12px;
  border: 1px solid #d8e3f0;
  border-radius: 14px;
  background: #f8fbff;
}

.backup-option strong,
.backup-option small {
  display: block;
}

.backup-count {
  margin-top: 4px;
  color: #1d4ed8;
  font-weight: 700;
}

.checkbox-card {
  padding: 12px;
  border: 1px solid #d8e3f0;
  border-radius: 12px;
  background: #fff;
}

.checkbox-row input {
  width: auto;
  margin-top: 3px;
}

.access-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px dashed #d8e3f0;
}

.access-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.magic-link-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 18px;
}

.magic-link-stat {
  padding: 16px;
}

.magic-link-stat span,
.magic-link-note {
  color: var(--muted);
}

.magic-link-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 1.8rem;
  line-height: 1.1;
}

.magic-link-admin-card {
  display: grid;
  gap: 16px;
}

.magic-link-toolbar {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
}

.magic-link-filter-form {
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) auto;
  align-items: end;
  flex: 1 1 620px;
  margin-top: 0;
}

.magic-link-note {
  margin-bottom: 0;
}

.magic-link-table-wrap {
  max-height: 1120px;
}

.magic-link-table {
  min-width: 960px;
}

.magic-link-table td span {
  display: block;
}

.magic-link-table .tag {
  display: inline-flex;
  margin-bottom: 0;
}

.magic-link-table code {
  font-size: 0.86rem;
  color: #344054;
}

.magic-link-status-active {
  color: #0f5132;
  background: #dcfae6;
  border-color: #abefc6;
}

.magic-link-status-used {
  color: #0b57d0;
  background: #edf4ff;
  border-color: #c7dafd;
}

.magic-link-status-expired {
  color: #92400e;
  background: #fff3db;
  border-color: #f3d08b;
}

.magic-link-actions {
  align-items: flex-start;
}

.rich-copy {
  white-space: pre-wrap;
  margin: 0 0 1rem;
  color: #344054;
}

@media (max-width: 920px) {
  .hero-large,
  .profile-hero,
  .profile-layout,
  .player-layout,
  .user-admin-layout,
  .editor-shell {
    grid-template-columns: 1fr;
  }

  .magic-link-filter-form {
    grid-template-columns: 1fr;
  }

  .lesson-sidebar,
  .profile-summary-card,
  .editor-sidebar {
    position: static;
  }

  .lesson-sidebar {
    max-height: none;
    overflow-y: visible;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
  }
}

@media (max-width: 760px) {
  .dashboard-course-grid {
    grid-template-columns: 1fr;
  }

  .system-stats-breakdown-row,
  .system-stats-ranking-row {
    flex-direction: column;
  }

  .upload-detail-header,
  .upload-reference-header {
    flex-direction: column;
  }

  .system-stats-ranking-total {
    justify-items: start;
    text-align: left;
  }

  .lesson-stage-actions {
    grid-template-columns: 1fr;
  }

  .lesson-stage-action,
  .lesson-stage-action-start,
  .lesson-stage-action-center,
  .lesson-stage-action-end {
    justify-content: stretch;
  }

  .lesson-stage-action .button-link,
  .lesson-stage-action button {
    width: 100%;
  }

  .completion-report-user-heading,
  .completion-report-user-cell {
    min-width: 220px;
    max-width: 220px;
  }

  .completion-report-course-heading,
  .completion-report-table td {
    min-width: 118px;
    max-width: 118px;
  }

  .site-header {
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .impersonation-banner {
    position: static;
    justify-content: flex-start;
  }

  .container {
    margin-top: 18px;
  }

  .card,
  .hero {
    border-radius: 14px;
    padding: 15px;
  }

  .lesson-header {
    flex-direction: column;
  }

  .player-course-summary {
    gap: 12px;
  }

  .player-course-thumb {
    width: auto;
    height: 48px;
    max-width: 82px;
  }

  .lesson-editor-heading,
  .profile-section-heading,
  .editor-overview-top,
  .editor-tree-header,
  .editor-panel-header,
  .editor-media-card {
    flex-direction: column;
  }

  .profile-form-footer {
    align-items: stretch;
  }

  .profile-form-footer button,
  .profile-form-footer .button-link,
  .profile-section-heading .button-link {
    width: 100%;
  }

  .editor-tree-action {
    width: 100%;
  }

  .editor-tree-controls {
    width: 100%;
  }

  .editor-tree-controls .module-toggle,
  .editor-tree-controls .editor-tree-action {
    width: 100%;
  }

  .editor-tree-heading,
  .editor-tree-lesson-item,
  .editor-linked-list-item,
  .asset-row {
    width: 100%;
  }

  .asset-row-main,
  .editor-tree-lesson-item,
  .editor-linked-list-item {
    flex-direction: column;
  }
}

body.prompt-open {
  overflow: hidden;
}

.app-prompt-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 24, 40, 0.42);
  backdrop-filter: blur(4px);
}

.app-prompt-backdrop[hidden] {
  display: none !important;
}

.app-prompt {
  width: min(100%, 460px);
  padding: 24px;
  border-radius: 20px;
  border: 1px solid rgba(208, 217, 228, 0.95);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

.app-prompt.app-prompt-danger {
  border-color: rgba(180, 35, 24, 0.24);
}

.app-prompt-title {
  margin-bottom: 0.5rem;
}

.app-prompt-message {
  margin-bottom: 1.1rem;
}

.app-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.app-prompt-actions button {
  min-width: 132px;
}
