/**
 * Cleverio — custom styles (Tailwind handles most layout).
 */

html {
  color-scheme: dark;
  background-color: var(--color-bg);
}

[hidden] {
  display: none !important;
}

html::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
  background: var(--color-bg);
}

html::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background: none;
}

body {
  min-height: 100vh;
  background: transparent;
  color: var(--color-text);
}

html {
  overflow-y: scroll;
}

.site-header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 2.25rem;
  align-items: center;
  gap: 0.75rem;
  min-height: 4rem;
}

@media (min-width: 640px) {
  .site-header-inner {
    grid-template-columns: auto minmax(0, 1fr) 12rem;
  }
}

.site-header-brand {
  min-width: 0;
}

.site-header-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.site-header-logo:focus-visible {
  outline: 2px solid var(--color-brand-400);
  outline-offset: 2px;
  border-radius: 0.375rem;
}

.site-header-logo__img {
  display: block;
  height: 2rem;
  width: auto;
}

@media (min-width: 640px) {
  .site-header-logo__img {
    height: 2.25rem;
  }
}

.site-header-nav {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.site-body--student .page-container {
  max-width: 100%;
}

.site-search {
  display: flex;
  width: min(100%, 48rem);
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface-elevated);
  padding: 0.45rem 0.75rem;
  color: var(--color-text-muted);
}

.site-search:focus-within {
  border-color: var(--color-accent-border);
  box-shadow: 0 0 0 3px var(--color-focus);
}

.site-search__icon {
  font-size: 0.9rem;
}

.site-search__input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font-size: 0.875rem;
  outline: 0;
}

.site-search__input::placeholder {
  color: var(--color-text-muted);
}

.profile-settings-group {
  display: grid;
  gap: 1.25rem;
}

.profile-inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
}

.profile-inline-form__field {
  flex: 1 1 10rem;
  min-width: 0;
}

.profile-inline-form__submit {
  flex: 0 0 auto;
}

.blog-breadcrumbs {
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.blog-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-breadcrumbs li {
  display: inline;
}

.blog-breadcrumbs__sep {
  margin: 0 0.5rem;
  color: var(--color-text-muted);
}

.blog-breadcrumbs a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.blog-breadcrumbs a:hover {
  color: var(--color-text);
}

.blog-breadcrumbs [aria-current="page"] {
  color: var(--color-text);
}

/* Blog post detail */
.blog-post {
  padding-bottom: 2rem;
}

.blog-post__measure {
  max-width: 42rem;
  margin-inline: auto;
}

.blog-post__header {
  margin-top: 0.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.blog-post__title {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
  text-wrap: balance;
}

.blog-post__lead {
  margin: 0.75rem 0 0;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.blog-post__meta {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.blog-post__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.blog-post__tag {
  display: inline-block;
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.blog-post__tag:hover {
  color: var(--color-text-accent);
}

.blog-post__cover {
  max-width: 48rem;
  margin: 2rem auto 0;
}

.blog-post__cover img {
  display: block;
  width: 100%;
  max-height: 24rem;
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  object-fit: cover;
}

.blog-post__body {
  margin-top: 2rem;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.blog-post__body p,
.blog-post__body li {
  color: var(--color-text);
}

.blog-post__body table {
  display: block;
  width: 100%;
  overflow-x: auto;
}

.blog-post__body pre {
  display: block;
  overflow-x: auto;
}

.blog-post__related {
  max-width: 56rem;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.blog-post-related__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
}

.blog-post-related__grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .blog-post-related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.site-header-profile {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.25rem;
}

.site-header-profile-email {
  display: none;
  max-width: 9rem;
  min-width: 9rem;
  min-height: 1.25rem;
}

.site-header-profile-avatar {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .site-header-profile-email {
    display: block;
  }

  .student-top-nav--cabinet {
    width: 22rem;
    max-width: 100%;
    justify-content: flex-end;
  }
}

.auth-shell {
  background: transparent;
}

.sidebar-shell {
  border-right: 1px solid var(--color-border);
  background: var(--color-surface);
}

.site-body--student .site-body__workspace {
  flex-direction: row;
}

.site-body--student .site-body__main {
  min-width: 0;
}

.student-sidebar {
  position: sticky;
  top: 4rem;
  display: none;
  width: 15rem;
  height: calc(100vh - 4rem);
  flex: 0 0 15rem;
}

.student-sidebar-eyebrow {
  margin: 0 0 1rem;
  padding-inline: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.5rem;
  border-radius: var(--radius-control);
  padding: 0.5rem 0.625rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--motion-fast), color var(--motion-fast);
}

.sidebar-link:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.sidebar-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.sidebar-link-active {
  background: var(--color-accent-soft);
  color: var(--color-text-accent);
  box-shadow: inset 0 0 0 1px var(--color-accent-border);
}

.sidebar-link__icon {
  display: inline-flex;
  width: 1.35rem;
  height: 1.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: var(--color-surface-elevated);
  font-size: 0.8rem;
  line-height: 1;
}

.sidebar-link__label {
  min-width: 0;
  flex: 1;
}

.sidebar-link__badge {
  border-radius: var(--radius-pill);
  background: var(--color-surface-elevated);
  padding: 0.1rem 0.45rem;
  color: var(--color-text-muted);
  font-size: 0.65rem;
}

.sidebar-link-disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.sidebar-link-disabled:hover {
  transform: none;
}

@media (min-width: 1024px) {
  .student-sidebar {
    display: block;
  }
}

.border-token {
  border-color: var(--color-border);
}

.text-muted {
  color: var(--color-text-muted);
}

.bg-surface {
  background-color: var(--color-surface);
}

.site-footer {
  background: transparent;
}

.loader-spinner {
  border-color: var(--color-border-strong);
  border-top-color: var(--color-accent);
  box-shadow: none;
}

.chat-bubble-user,
.chat-bubble-assistant {
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  box-shadow: none;
}

.chat-bubble-user {
  background: var(--color-accent-soft);
  color: var(--color-text);
}

.chat-bubble-assistant {
  background: var(--color-surface);
  color: var(--color-text);
  backdrop-filter: none;
}

/* Legacy Tailwind color utilities resolve through tokens during migration. */
.dark .bg-white {
  background: var(--color-surface) !important;
  backdrop-filter: none;
}

.dark .bg-slate-50,
.dark .bg-slate-100 {
  background-color: var(--color-surface-muted) !important;
}

.dark [class*="bg-brand-50"],
.dark [class*="bg-brand-500"],
.dark .bg-brand-100 {
  background-color: var(--color-accent-soft) !important;
}

.dark .bg-brand-600 {
  background: var(--color-accent-strong) !important;
}

.dark .bg-red-50,
.dark .bg-red-100,
.dark [class*="bg-red-500/"] {
  background-color: var(--color-danger-bg) !important;
}

.dark .bg-emerald-50,
.dark .bg-emerald-100,
.dark [class*="bg-emerald-"] {
  background-color: var(--color-success-bg) !important;
}

.dark .bg-amber-50,
.dark .bg-amber-100,
.dark [class*="bg-amber-"] {
  background-color: var(--color-warning-bg) !important;
}

.dark .hover\:bg-slate-50:hover,
.dark .hover\:bg-slate-100:hover {
  background-color: var(--color-surface-hover) !important;
}

.dark .border-slate-100,
.dark .border-slate-200,
.dark .border-slate-300,
.dark .border-slate-400,
.dark .border-brand-200,
.dark .border-red-200,
.dark .border-emerald-200,
.dark .border-amber-200 {
  border-color: var(--color-border) !important;
}

.dark .divide-slate-100 > :not([hidden]) ~ :not([hidden]),
.dark .divide-slate-200 > :not([hidden]) ~ :not([hidden]) {
  border-color: var(--color-border) !important;
}

.dark .text-slate-900,
.dark .text-slate-800,
.dark .text-slate-700,
.dark .text-slate-200,
.dark .text-white,
.dark .text-brand-800,
.dark .text-brand-900 {
  color: var(--color-text) !important;
}

.dark .text-slate-600 {
  color: var(--color-text-subtle) !important;
}

.dark .text-slate-500,
.dark .text-slate-400,
.dark .text-slate-300 {
  color: var(--color-text-muted) !important;
}

.dark [class*="text-brand-"] {
  color: var(--color-text-accent) !important;
}

.dark [class*="text-cyan-100"],
.dark [class*="text-cyan-200/"],
.dark [class*="text-cyan-50"],
.dark [class*="text-fuchsia-"] {
  color: var(--color-text-muted) !important;
}

.dark [class~="text-cyan-200"] {
  color: var(--color-text-accent) !important;
}

.dark [class*="text-emerald-"] {
  color: var(--color-text-success) !important;
}

.dark [class*="text-emerald-50"],
.dark [class*="text-emerald-100"] {
  color: var(--color-text-muted) !important;
}

.dark [class*="bg-emerald-"] [class*="text-emerald-"] {
  color: var(--color-text-success) !important;
}

.dark [class*="text-amber-"] {
  color: var(--color-text-warning) !important;
}

.dark [class*="text-red-"] {
  color: var(--color-text-danger) !important;
}

.dark .shadow-sm,
.dark .shadow-xl,
.dark .shadow-2xl {
  box-shadow: var(--shadow-card) !important;
}

.dark table tbody tr {
  transition: background-color var(--motion-fast);
}

.dark table tbody tr:hover {
  background-color: var(--color-surface-hover);
}

.sidebar-link-danger {
  color: var(--color-text-danger);
}

.sidebar-link-danger:hover {
  background-color: var(--color-danger-bg);
  color: var(--color-text-danger);
}

.student-top-nav {
  display: flex;
  justify-content: flex-end;
  gap: 0.25rem;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
  margin-left: auto;
}

.student-top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav-link {
  flex: 0 0 auto;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  transition: background-color var(--motion-fast), color var(--motion-fast), box-shadow var(--motion-fast);
}

.top-nav-link:hover {
  background-color: var(--color-accent-soft);
  color: var(--color-text);
}

.top-nav-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.top-nav-link-active {
  background: var(--color-accent-soft);
  color: var(--color-text-accent);
  border-color: var(--color-accent-border);
  box-shadow: none;
}

.top-nav-link-logout {
  color: var(--color-text-danger);
}

.top-nav-link-logout:hover {
  background-color: var(--color-danger-bg);
  color: var(--color-text-danger);
}

[x-cloak] {
  display: none !important;
}

/* Dashboard */
.page-container > section:not(.dashboard-home):not(.student-feature-page) > header {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  padding: 0.25rem 0 0.5rem;
}

.page-container > section:not(.dashboard-home):not(.student-feature-page) > header::before {
  display: none;
}

.page-container > section:not(.dashboard-home):not(.student-feature-page) > header > * {
  position: relative;
  z-index: 1;
}

.page-container > section:not(.dashboard-home):not(.student-feature-page) > header h1 {
  color: #fff;
  letter-spacing: -0.025em;
}

.page-container > section:not(.dashboard-home):not(.student-feature-page) > header p,
.page-container > section:not(.dashboard-home):not(.student-feature-page) > header nav {
  color: var(--color-text-muted);
}

.page-container > section:not(.dashboard-home) .rounded-2xl.border.bg-white,
.page-container > section:not(.dashboard-home) form.rounded-2xl.border,
.page-container > section:not(.dashboard-home) article.rounded-2xl.border,
.page-container > section:not(.dashboard-home) div.overflow-hidden.rounded-2xl.border {
  border-color: var(--color-border) !important;
  background: var(--color-surface) !important;
  box-shadow: none !important;
  backdrop-filter: none;
}

.page-container > section:not(.dashboard-home) .rounded-2xl.border-dashed {
  border-color: var(--color-border-strong) !important;
  background-color: var(--color-surface-muted) !important;
}

.auth-shell main section.rounded-2xl {
  position: relative;
  overflow: hidden;
  border-color: var(--color-border) !important;
  border-radius: var(--radius-card);
  background: var(--color-surface) !important;
  box-shadow: none !important;
  backdrop-filter: none;
}

.auth-shell main section.rounded-2xl::after {
  position: absolute;
  right: -5rem;
  bottom: -5rem;
  width: 11rem;
  height: 11rem;
  border-radius: 9999px;
  background: var(--color-accent-soft);
  content: "";
  filter: blur(16px);
  pointer-events: none;
}

.dashboard-home {
  isolation: isolate;
}

.dashboard-hero {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-surface);
}

.dashboard-hero::before,
.dashboard-hero::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.dashboard-hero::before {
  display: none;
}

.dashboard-hero::after {
  display: none;
}

.hero-orbit-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface-muted);
  box-shadow: none;
}

.hero-orbit-card::before {
  display: none;
}

.hero-orbit-card > * {
  position: relative;
  z-index: 1;
}

.progress-orb {
  --progress: 0%;
  display: flex;
  width: 12rem;
  height: 12rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 9999px;
  background:
    linear-gradient(var(--color-surface) 0 0) padding-box,
    conic-gradient(var(--color-accent) var(--progress), var(--color-border) 0) border-box;
  border: 10px solid transparent;
  box-shadow: none;
}

.dashboard-bento {
  grid-auto-rows: minmax(12rem, auto);
}

.bento-card,
.course-glass-card,
.activity-row {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  backdrop-filter: none;
  box-shadow: none;
}

.bento-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  padding: 1.25rem;
  transition: border-color var(--motion-fast), background-color var(--motion-fast);
}

.bento-card::after {
  display: none;
}

.bento-card:hover,
.course-glass-card:hover {
  border-color: var(--color-accent-border);
  background: var(--color-surface-elevated);
}

.bento-card-accent {
  border-color: var(--color-accent-border);
  background: var(--color-accent-soft);
}

.course-glass-card {
  border-radius: var(--radius-card);
  padding: 1.25rem;
  transition: border-color var(--motion-fast), background-color var(--motion-fast);
}

.activity-row {
  border-radius: 1.25rem;
  padding: 1rem;
}

.btn-hero {
  background: var(--color-accent-strong);
  box-shadow: none;
}

.btn-hero:hover:not(:disabled) {
  background: var(--color-accent);
}

.dashboard-action-card {
  display: block;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  padding: 1.25rem;
  box-shadow: none;
  transition: border-color var(--motion-fast), background-color var(--motion-fast);
}

.dashboard-action-card:hover {
  border-color: var(--color-accent);
  background: var(--color-surface-elevated);
}

.dashboard-action-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Lesson content */
.lesson-content-body {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text);
}

.lesson-content-body :is(p, li, div, span, strong, em, blockquote, td, th) {
  color: var(--color-text);
}

.lesson-content-body :is(div, p, blockquote)[style*="background"] {
  background-color: rgb(255 255 255 / 0.06) !important;
  color: var(--color-text) !important;
}

.lesson-content-body [style*="#f0f4f8"],
.lesson-content-body [style*="#e8f5e9"],
.lesson-content-body [style*="#fff3e0"],
.lesson-content-body [style*="#ede7f6"],
.lesson-content-body [style*="#eee"],
.lesson-content-body [style*="#ffffff"],
.lesson-content-body [style*="#fff"] {
  background-color: rgb(255 255 255 / 0.06) !important;
  color: var(--color-text) !important;
  border-color: rgb(103 232 249 / 0.22) !important;
}

.lesson-content-body [style*="#e8f5e9"] {
  background-color: rgb(16 185 129 / 0.12) !important;
  border-color: rgb(52 211 153 / 0.28) !important;
}

.lesson-content-body [style*="#fff3e0"] {
  background-color: rgb(245 158 11 / 0.12) !important;
  border-color: rgb(251 191 36 / 0.28) !important;
}

.lesson-content-body [style*="#ede7f6"] {
  background-color: rgb(168 85 247 / 0.12) !important;
  border-color: rgb(192 132 252 / 0.28) !important;
}

.lesson-content-body h2,
.lesson-content-body h3 {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.lesson-content-body p {
  margin-top: 0.75rem;
}

.lesson-content-body ul,
.lesson-content-body ol {
  margin-top: 0.75rem;
  padding-left: 1.25rem;
}

.lesson-content-body table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.lesson-content-body th,
.lesson-content-body td {
  border: 1px solid var(--color-border);
  padding: 0.5rem 0.625rem;
  text-align: left;
  color: var(--color-text) !important;
  background-color: transparent !important;
}

.lesson-content-body th {
  background-color: rgb(255 255 255 / 0.08) !important;
}

.lesson-content-body tr:nth-child(even) td {
  background-color: rgb(255 255 255 / 0.03) !important;
}

.lesson-content-body a {
  color: var(--color-text-accent);
  text-decoration: underline;
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.875rem;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Layout */
.main-content {
  flex: 1 1 auto;
}

.site-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.site-body__workspace {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.site-body__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
  min-height: 0;
}

.site-body--admin > .site-footer {
  flex-shrink: 0;
}

.admin-sidebar-toggle {
  display: inline-flex;
}

.admin-sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgb(2 6 23 / 0.7);
  display: none;
}

body.admin-sidebar-open .admin-sidebar-overlay {
  display: block;
}

body.admin-sidebar-open .admin-sidebar {
  transform: translateX(0);
}

.admin-sidebar {
  position: fixed;
  top: 4rem;
  bottom: 0;
  left: 0;
  z-index: 40;
  width: 16rem;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
}

.admin-sidebar--open {
  transform: translateX(0);
}

@media (min-width: 1024px) {
  .admin-sidebar-toggle {
    display: none !important;
  }

  .admin-sidebar-overlay {
    display: none !important;
  }

  .site-body--admin .site-body__workspace {
    flex-direction: row;
    align-items: stretch;
  }

  .admin-sidebar {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 16rem;
    flex-shrink: 0;
    align-self: stretch;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow-y: auto;
    transform: none !important;
  }

  .admin-sidebar > nav {
    flex: 1 1 auto;
    min-height: 0;
  }
}

/* Legacy alias kept for older templates */
.admin-shell {
  flex: 1 1 auto;
  min-width: 0;
}

@media (min-width: 1024px) {
  .admin-shell {
    flex-direction: row;
    align-items: stretch;
  }

  .admin-shell .sidebar-shell {
    position: sticky !important;
    top: 4rem;
    align-self: flex-start;
    transform: none !important;
  }
}

.page-container {
  width: 100%;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Course detail hero */
.course-detail-hero {
  padding: 1.25rem 1.5rem;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 1rem;
  background: rgb(255 255 255 / 0.04);
}

.course-detail-hero__grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .course-detail-hero__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
    align-items: start;
  }
}

.course-detail-hero__sidebar {
  display: grid;
  gap: 0.75rem;
  width: 100%;
}

.course-detail-hero__aside {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.course-detail-hero__access {
  width: 100%;
}

/* Course progress panel */
.course-progress-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.course-progress-panel__label {
  flex: 1 1 100%;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(103 232 249 / 0.85);
}

@media (min-width: 640px) {
  .course-progress-panel__label {
    flex: 1 1 auto;
  }
}

.course-progress-panel__fraction {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.course-progress-panel__percent {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.2;
}

.course-progress-panel__bar {
  overflow: hidden;
  height: 0.5rem;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.1);
}

.course-progress-panel__bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #22d3ee, #34d399);
  transition: width 0.3s ease;
}

.course-progress-panel__status {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.course-progress-panel__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.25rem;
}

.course-progress-panel__actions .btn-primary,
.course-progress-panel__actions .btn-secondary {
  width: 100%;
  justify-content: center;
}

/* Course learning path */
.learning-path {
  position: relative;
  display: grid;
  gap: 1.25rem;
}

.learning-path::before {
  position: absolute;
  top: 1.75rem;
  bottom: 1.75rem;
  left: 1.375rem;
  width: 2px;
  content: "";
  background: linear-gradient(
    180deg,
    rgb(103 232 249 / 0.55),
    rgb(168 85 247 / 0.22),
    rgb(255 255 255 / 0.06)
  );
}

.learning-module {
  position: relative;
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 1rem;
}

.learning-module-marker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgb(103 232 249 / 0.32);
  border-radius: 9999px;
  background:
    radial-gradient(circle at 35% 20%, rgb(255 255 255 / 0.28), transparent 32%),
    linear-gradient(135deg, #22d3ee, #3b82f6 52%, #a855f7);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 18px 42px rgb(59 130 246 / 0.26);
}

.learning-module-body {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: 1.5rem;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0.035));
  box-shadow: 0 24px 70px rgb(0 0 0 / 0.2);
  backdrop-filter: blur(18px) saturate(140%);
}

.learning-module-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  padding: 1.25rem;
}

.lesson-path-list {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.lesson-path-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 1.125rem;
  padding: 1rem;
  color: var(--color-text);
  background: rgb(255 255 255 / 0.035);
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.lesson-path-card:hover,
.lesson-path-card:focus-visible {
  border-color: rgb(103 232 249 / 0.42);
  background: rgb(34 211 238 / 0.075);
  box-shadow: 0 18px 44px rgb(34 211 238 / 0.1);
  outline: none;
  transform: translateY(-1px);
}

.lesson-path-card-current {
  border-color: rgb(103 232 249 / 0.55);
  background:
    linear-gradient(135deg, rgb(34 211 238 / 0.12), rgb(168 85 247 / 0.09));
  box-shadow:
    inset 0 0 0 1px rgb(103 232 249 / 0.14),
    0 22px 54px rgb(59 130 246 / 0.14);
}

.lesson-path-card-completed {
  border-color: rgb(52 211 153 / 0.24);
}

.lesson-path-marker {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 9999px;
  color: var(--color-text-muted);
  background: rgb(255 255 255 / 0.06);
  font-size: 0.875rem;
  font-weight: 800;
}

.lesson-path-marker-current {
  border-color: rgb(103 232 249 / 0.44);
  color: #fff;
  background: linear-gradient(135deg, #22d3ee, #3b82f6 52%, #a855f7);
  box-shadow: 0 14px 32px rgb(59 130 246 / 0.22);
}

.lesson-path-marker-completed {
  border-color: rgb(52 211 153 / 0.36);
  color: #a7f3d0;
  background: rgb(16 185 129 / 0.16);
}

.lesson-path-action {
  flex: 0 0 auto;
  border-radius: 9999px;
  border: 1px solid rgb(103 232 249 / 0.28);
  padding: 0.5rem 0.75rem;
  color: #67e8f9;
  font-size: 0.8125rem;
  font-weight: 700;
}

.lesson-path-empty {
  border: 1px dashed rgb(255 255 255 / 0.12);
  border-radius: 1rem;
  padding: 1rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Lesson player */
.lesson-card {
  border: 1px solid var(--color-border);
  border-radius: 1.5rem;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0.035));
  padding: 1.25rem;
  box-shadow: 0 24px 70px rgb(0 0 0 / 0.2);
  backdrop-filter: blur(18px) saturate(140%);
}

@media (min-width: 640px) {
  .lesson-card {
    padding: 1.5rem;
  }
}

.lesson-outline-link {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 0.875rem;
  border: 1px solid rgb(255 255 255 / 0.08);
  padding: 0.625rem 0.75rem;
  text-align: left;
  color: var(--color-text-muted);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lesson-outline-link:hover,
.lesson-outline-link:focus-visible {
  border-color: rgb(103 232 249 / 0.38);
  background-color: rgb(34 211 238 / 0.08);
  color: var(--color-text);
  outline: none;
}

.lesson-outline-link-viewed {
  border-color: rgb(16 185 129 / 0.22);
  background-color: rgb(16 185 129 / 0.08);
  color: #a7f3d0;
}

.lesson-content-body {
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.75;
}

.lesson-content-body > * + * {
  margin-top: 1rem;
}

.lesson-content-body h1,
.lesson-content-body h2,
.lesson-content-body h3,
.lesson-content-body h4 {
  color: var(--color-text);
  font-weight: 700;
  line-height: 1.25;
}

.lesson-content-body h1 {
  font-size: 1.875rem;
}

.lesson-content-body h2 {
  font-size: 1.5rem;
}

.lesson-content-body h3 {
  font-size: 1.25rem;
}

.lesson-content-body p,
.lesson-content-body li {
  color: var(--color-text-muted);
}

.lesson-content-body ul,
.lesson-content-body ol {
  padding-left: 1.5rem;
}

.lesson-content-body ul {
  list-style: disc;
}

.lesson-content-body ol {
  list-style: decimal;
}

.lesson-content-body a {
  color: #67e8f9;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.lesson-content-body blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: 1rem;
  color: var(--color-text);
}

.lesson-content-body code {
  border-radius: 0.375rem;
  background: rgb(255 255 255 / 0.08);
  padding: 0.125rem 0.375rem;
  color: #bae6fd;
}

.lesson-content-body pre {
  overflow-x: auto;
  border-radius: 1rem;
  border: 1px solid var(--color-border);
  background: rgb(2 6 23 / 0.72);
  padding: 1rem;
}

.lesson-content-body pre code {
  background: transparent;
  padding: 0;
}

/* Lesson layout + AI tutor sidebar */
.lesson-layout {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .lesson-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
  }

  .lesson-layout__content {
    flex: 1 1 0;
    min-width: 0;
  }

  .lesson-layout__ai {
    flex: 0 0 22rem;
    width: 22rem;
    transition:
      width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
      flex-basis 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .lesson-layout--chat-active .lesson-layout__ai {
    flex-basis: min(32rem, 38vw);
    width: min(32rem, 38vw);
  }
}

.ai-sidebar {
  display: flex;
  min-height: 34rem;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: 1.5rem;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0.035));
  padding: 1rem;
  backdrop-filter: blur(18px) saturate(140%);
}

.ai-sidebar__header {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.ai-sidebar__body {
  min-height: 0;
}

.ai-sidebar__chat {
  min-height: 8rem;
}

.ai-sidebar .chat-bubble-user,
.ai-sidebar .chat-bubble-assistant {
  box-shadow: none;
  padding: 0.625rem 0.875rem;
}

.ai-suggestion-btn {
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.04);
  padding: 0.35rem 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  line-height: 1.35;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}

.ai-suggestion-btn:hover,
.ai-suggestion-btn:focus-visible {
  border-color: rgb(103 232 249 / 0.38);
  background: rgb(34 211 238 / 0.08);
  color: var(--color-text);
  outline: none;
}

.ai-rec-item {
  border-radius: 0.75rem;
  border: 1px solid rgb(255 255 255 / 0.08);
  background: rgb(255 255 255 / 0.04);
  padding: 0.5rem 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* Toast */
.toast-root {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  display: flex;
  max-width: min(24rem, calc(100vw - 2rem));
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  box-shadow: 0 24px 70px rgb(0 0 0 / 0.24);
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast-enter {
  opacity: 1;
  transform: translateY(0);
}

.toast-leave {
  opacity: 0;
}

.toast-text {
  flex: 1;
}

.toast-close {
  border-radius: 0.375rem;
  padding: 0 0.25rem;
  line-height: 1.25rem;
}

.toast-info {
  border-color: rgb(125 211 252 / 0.28);
  background: rgb(14 165 233 / 0.16);
  color: #bae6fd;
}

.toast-success {
  border-color: rgb(110 231 183 / 0.28);
  background: rgb(16 185 129 / 0.16);
  color: #a7f3d0;
}

.toast-warning {
  border-color: rgb(253 230 138 / 0.28);
  background: rgb(245 158 11 / 0.16);
  color: #fde68a;
}

.toast-error {
  border-color: rgb(252 165 165 / 0.28);
  background: rgb(239 68 68 / 0.16);
  color: #fecaca;
}

/* Responsive */
@media (max-width: 639px) {
  .btn-primary,
  .btn-secondary,
  .btn-danger {
    min-height: 2.75rem;
  }

  .dashboard-action-card {
    padding: 1rem;
  }

  .learning-path::before {
    left: 1.125rem;
  }

  .learning-module {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: 0.75rem;
  }

  .learning-module-marker {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.875rem;
  }

  .learning-module-header,
  .lesson-path-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .lesson-path-card {
    gap: 0.75rem;
  }

  .lesson-path-action {
    width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast,
  .sidebar-link,
  .dashboard-action-card,
  .bento-card,
  .course-glass-card {
    transition: none;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-free {
  background: linear-gradient(135deg, rgb(8 145 178 / 0.92), rgb(14 116 144 / 0.92));
  color: rgb(236 254 255);
  border: 1px solid rgb(165 243 252 / 0.42);
}

.badge-paid {
  background: linear-gradient(135deg, rgb(217 119 6 / 0.92), rgb(146 64 14 / 0.92));
  color: rgb(255 247 237);
  border: 1px solid rgb(253 186 116 / 0.4);
}

.badge-owned {
  background: linear-gradient(135deg, rgb(37 99 235 / 0.92), rgb(29 78 216 / 0.9));
  color: rgb(239 246 255);
  border: 1px solid rgb(147 197 253 / 0.42);
}

.badge-status-draft {
  background: rgb(100 116 139 / 0.15);
  color: rgb(51 65 85);
}

.badge-status-published {
  background: rgb(16 185 129 / 0.15);
  color: rgb(6 95 70);
}

.badge-status-archived {
  background: rgb(148 163 184 / 0.2);
  color: rgb(71 85 105);
}

.catalog-card {
  border: 1px solid rgb(226 232 240);
  border-radius: 1rem;
  background: rgb(255 255 255);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
}

.catalog-card-cover {
  position: relative;
  min-height: 8.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.catalog-card-cover .badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 3;
  box-shadow: 0 8px 18px rgb(15 23 42 / 0.35);
  backdrop-filter: blur(8px);
}

.catalog-card-cover--placeholder::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.catalog-card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    150deg,
    rgb(15 23 42 / 0.1) 0%,
    rgb(15 23 42 / 0.34) 78%,
    rgb(15 23 42 / 0.48) 100%
  );
  pointer-events: none;
  z-index: 2;
}

.catalog-tag {
  display: inline-flex;
  border-radius: 9999px;
  background: rgb(58 61 74);
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  color: rgb(226 232 240 / 0.86);
}

.catalog-showcase {
  display: grid;
  gap: 1.25rem;
}

.catalog-showcase__header {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  padding: clamp(1.25rem, 2.5vw, 2rem);
}

.catalog-showcase__eyebrow {
  margin: 0 0 0.5rem;
  color: #c4b5fd;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.catalog-showcase__title {
  margin: 0;
  max-width: 52rem;
  color: var(--color-text);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.catalog-showcase__subtitle {
  margin: 0.85rem 0 0;
  max-width: 42rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.catalog-category-strip {
  display: grid;
  grid-auto-columns: minmax(12rem, 1fr);
  grid-auto-flow: column;
  gap: 0.875rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.catalog-category-tile {
  min-height: 7rem;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 1rem;
  background: var(--color-surface);
  padding: 1rem;
  color: var(--color-text);
  text-align: left;
  transition: border-color var(--motion-fast), background-color var(--motion-fast);
}

.catalog-category-tile:hover,
.catalog-category-tile:focus-visible {
  border-color: var(--color-focus);
  background: var(--color-surface-elevated);
}

.catalog-category-tile-active {
  border-color: var(--color-focus);
  background: var(--color-accent-soft);
}

.catalog-category-tile span,
.catalog-category-tile small {
  display: block;
}

.catalog-category-tile span {
  font-weight: 700;
}

.catalog-category-tile small {
  margin-top: 0.45rem;
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.catalog-toolbar__title {
  margin: 0;
  color: var(--color-text);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.catalog-toolbar__meta {
  margin: 0.25rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.catalog-toolbar__sort {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.055);
  padding: 0.55rem 0.8rem;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.catalog-empty {
  border: 1px solid rgb(155 115 255 / 0.25);
  border-radius: 1rem;
  background: rgb(155 115 255 / 0.08);
  padding: 1rem;
  color: var(--color-text);
}

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

.catalog-grid-card {
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: none;
}

.catalog-grid-card:hover {
  border-color: var(--color-focus);
  background: var(--color-surface);
}

.catalog-grid-card .catalog-card-cover {
  min-height: 7.25rem;
  border-radius: 1rem 1rem 0 0;
}

.catalog-favorite-button {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  display: inline-flex;
  width: 1.8rem;
  height: 1.8rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.1);
  color: rgb(255 255 255 / 0.72);
  cursor: not-allowed;
  backdrop-filter: blur(10px);
}

.catalog-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.9rem;
}

.catalog-card-heading h2 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--color-text);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.catalog-card-meta {
  margin: 0.35rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.catalog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 1.35rem;
}

.catalog-card-learnings {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.catalog-card-learnings p {
  margin: 0 0 0.35rem;
  color: var(--color-text);
  font-weight: 700;
}

.catalog-card-learnings ul {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.catalog-card-learnings li::before {
  content: "· ";
  color: #c4b5fd;
}

.catalog-card-actions {
  margin-top: auto;
}

.student-feature-page {
  display: grid;
  gap: 1.25rem;
}

.student-feature-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: clamp(1.5rem, 3vw, 2rem);
  background:
    radial-gradient(circle at 85% 18%, rgb(155 115 255 / 0.22), transparent 18rem),
    linear-gradient(135deg, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0.03));
  overflow: hidden;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-card);
}

.student-feature-hero__eyebrow {
  margin: 0 0 0.5rem;
  color: #c4b5fd;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.student-feature-hero__title {
  margin: 0;
  color: var(--color-text);
  font-size: clamp(2rem, 4vw, 3.75rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.05em;
}

.student-feature-hero__description {
  max-width: 42rem;
  margin: 0.85rem 0 0;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.student-feature-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--color-focus);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  padding: 1.25rem;
}

.student-feature-empty__icon {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgb(155 115 255 / 0.18);
  color: #ddd6fe;
}

.student-feature-empty h2,
.student-feature-card h2 {
  margin: 0;
  color: var(--color-text);
  font-size: 1.05rem;
  font-weight: 700;
}

.student-feature-empty p,
.student-feature-card p {
  margin: 0.35rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.student-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}

.student-feature-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  padding: 1rem;
  box-shadow: none;
}

.student-feature-card__badge {
  display: inline-flex;
  margin-bottom: 1rem;
  border-radius: 9999px;
  background: rgb(58 61 74);
  padding: 0.18rem 0.6rem;
  color: rgb(226 232 240 / 0.86);
  font-size: 0.72rem;
  font-weight: 700;
}

@media (min-width: 1880px) {
  .catalog-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .site-body--student .site-body__workspace {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .student-feature-empty {
    grid-template-columns: 1fr;
  }
}

.locked-program-module + .locked-program-module {
  margin-top: 0.75rem;
}

.locked-program-lesson {
  list-style: decimal;
  margin-left: 1.25rem;
}

/* Media picker (admin cover upload) */
.media-picker__preview-img {
  display: block;
  max-width: 100%;
  width: 20rem;
  height: auto;
  border-radius: 0.75rem;
  border: 1px solid var(--color-border, rgb(255 255 255 / 0.12));
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.media-picker__modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.media-picker__modal[hidden] {
  display: none;
}

.media-picker__modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.55);
}

.media-picker__modal-panel {
  position: relative;
  z-index: 1;
  width: min(48rem, 100%);
  max-height: min(36rem, 90vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.media-picker__modal-body {
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.75rem;
}

.media-picker__gallery-item {
  position: relative;
}

.media-picker__gallery-select {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  padding: 0.35rem;
  border-radius: 0.65rem;
  border: 1px solid var(--color-border, rgb(255 255 255 / 0.12));
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.media-picker__gallery-select:hover,
.media-picker__gallery-select:focus-visible {
  border-color: var(--color-brand, #6366f1);
  outline: none;
}

.media-picker__gallery-select img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0.45rem;
}

.media-picker__gallery-caption {
  font-size: 0.7rem;
  color: var(--color-muted, rgb(148 163 184));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-picker__gallery-delete {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  border: none;
  background: rgb(15 23 42 / 0.82);
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

.media-picker__dropzone--active {
  border-color: var(--color-brand, #6366f1);
  background: rgb(99 102 241 / 0.08);
}

.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;
}

