/* level_style.css */
:root {
  --theme-color: #e11d48; /* Default rose */
  --bg-primary: var(--color-base-bg, #ffffff);
  --bg-secondary: var(--color-surface, #f9fafb);
  --text-main: var(--color-text-default, #111827);
  --text-muted: var(--color-text-secondary, #6b7280);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  margin: 0;
}

/* Breadcrumb & Navigation */
.level-nav-container {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.level-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.level-breadcrumb a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}
.level-breadcrumb a:hover {
  color: var(--theme-color);
}
.breadcrumb-active {
  color: var(--text-main);
}

.subject-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.subject-tab {
  background: transparent;
  border: 1px solid transparent;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px; /* Pill shape */
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.subject-tab:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--theme-color);
}

.subject-tab.active {
  background-color: var(--theme-color);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* Hero Header */
.level-hero {
  padding: 4rem 1rem 3rem 1rem;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.5rem;
  animation: fadeUp 0.6s ease-out;
  position: relative;
  z-index: 2;
}

/* Aurora Mesh Background for Level Hero */
.level-aurora-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.level-aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  will-change: transform;
  mix-blend-mode: multiply;
  animation: float-level-blob 20s infinite ease-in-out;
}

:root[data-theme="dark"] .level-aurora-blob,
:root[data-theme="midnight"] .level-aurora-blob,
body.dark .level-aurora-blob {
  mix-blend-mode: screen;
  opacity: 0.1;
}

:root[data-theme="high-contrast"] .level-aurora-bg {
  display: none;
}

.level-aurora-blob.blob-1 {
  top: -30%;
  left: 5%;
  width: 25rem;
  height: 25rem;
  background-color: var(--theme-color);
}

.level-aurora-blob.blob-2 {
  bottom: -40%;
  right: 5%;
  width: 22rem;
  height: 22rem;
  background-color: color-mix(in srgb, var(--theme-color) 40%, var(--color-accent, #06b6d4));
  animation-delay: -5s;
  animation-duration: 25s;
}

.level-aurora-blob.blob-3 {
  top: -10%;
  right: 35%;
  width: 18rem;
  height: 18rem;
  background-color: color-mix(in srgb, var(--theme-color) 30%, var(--color-secondary, #ec4899));
  animation-delay: -10s;
  animation-duration: 18s;
}

@keyframes float-level-blob {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(4%, -8%) scale(1.08);
  }
  66% {
    transform: translate(-3%, 5%) scale(0.92);
  }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-title-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.hero-indicator {
  width: 0.5rem;
  height: 2rem;
  background-color: var(--theme-color);
  border-radius: 9999px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.hero-subject {
  color: var(--theme-color);
  opacity: 0.9;
}

.hero-badge {
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background-color: var(--bg-secondary);
  font-size: 0.625rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--glass-border);
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-left: 1.25rem;
  line-height: 1.4;
}

.diagnostic-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background-color: var(--theme-color);
  color: white;
  font-size: 0.875rem;
  font-weight: 900;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.1);
}
.diagnostic-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}
.diagnostic-btn:active {
  transform: translateY(0);
}

/* Main Layout */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .main-container {
    grid-template-columns: 3fr 1fr;
  }
}

.tab-content {
  display: none;
  animation: fadeUp 0.4s ease-out;
}
.tab-content.block {
  display: block;
}

/* Modules */
.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.module-number {
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--theme-color);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.module-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.module-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  color: var(--theme-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.module-title {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 0.25rem;
}

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

/* Progress Bar */
.mastery-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.mastery-stats {
  text-align: right;
}

.mastery-label {
  font-size: 0.625rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.mastery-value {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--theme-color);
}

.progress-track {
  width: 8rem;
  height: 0.375rem;
  background-color: var(--bg-secondary);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--theme-color);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Topics */
.topic-section {
  margin-bottom: 4rem;
}

.topic-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.topic-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background-color: var(--theme-color);
  color: white;
  font-weight: 900;
  font-size: 1.25rem;
}

.topic-title {
  font-size: 1.5rem;
  font-weight: 900;
}

/* Skill Cards */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.skill-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-radius: 0.75rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-lg);
  border-color: var(--theme-color);
}

.skill-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.skill-code {
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.skill-card:hover .skill-code {
  color: var(--theme-color);
}

.skill-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  transition: color 0.3s ease;
}

.skill-name a {
  text-decoration: none;
  color: inherit;
}
.skill-name a:hover {
  text-decoration: underline;
  text-decoration-color: var(--theme-color);
}

.skill-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.skill-quick-test-btn,
.skill-bookmark-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.1));
  background: var(--color-surface, #ffffff);
  color: var(--color-text-muted, #94a3b8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8125rem;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

.skill-quick-test-btn:hover {
  transform: scale(1.1);
  border-color: #6366f1;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
}

.skill-bookmark-btn:hover {
  transform: scale(1.1);
  border-color: #f59e0b;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

.skill-bookmark-btn.bookmarked {
  background: rgba(245, 158, 11, 0.12);
  border-color: #f59e0b;
  color: #f59e0b;
}

.check-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

.check-btn:hover {
  transform: scale(1.1);
  border-color: var(--theme-color);
}
.check-btn:active {
  transform: scale(0.9);
}

.check-icon {
  font-size: 0.625rem;
  opacity: 0;
  color: white;
  transition: opacity 0.2s;
}

/* Skill Card Completed State */
.skill-card.completed {
  background-color: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}
.skill-card.completed .skill-name {
  text-decoration: line-through;
  opacity: 0.5;
}
.skill-card.completed .check-btn {
  background-color: var(--theme-color);
  border-color: var(--theme-color);
}
.skill-card.completed .check-icon {
  opacity: 1;
}

/* Mastery Badges & Quick Test Actions */
.hero-mastery-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10b981;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.skill-mastery-slot {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
}

.skill-mastery-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.mastery-tag-mastered {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.mastery-tag-proficient {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.mastery-tag-developing {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #f43f5e;
}

.mastery-tag-completed {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #3b82f6;
}

.skill-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-quick-test-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--color-surface, #f9fafb);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-quick-test-btn:hover {
  color: var(--theme-color);
  border-color: var(--theme-color);
  background: rgba(225, 29, 72, 0.08);
  transform: scale(1.1);
}


/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: fadeUp 0.6s ease-out 0.3s backwards;
}

.sidebar-card {
  padding: 1.5rem;
  border-radius: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.skill-of-day {
  background: linear-gradient(135deg, var(--theme-color), #ff4d4d);
  color: white;
}
.skill-of-day-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.25rem;
  font-size: 0.625rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.skill-of-day-id {
  font-size: 0.625rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.25rem;
}
.skill-of-day-name {
  font-size: 1.125rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}
.skill-of-day-btn {
  width: 100%;
  padding: 0.75rem;
  background: white;
  border: none;
  border-radius: 0.75rem;
  color: var(--theme-color);
  font-weight: 900;
  font-size: 0.75rem;
  cursor: pointer;
  transition: transform 0.2s;
}
.skill-of-day-btn:hover {
  transform: translateY(-2px);
}
.skill-of-day-bg-icon {
  position: absolute;
  bottom: -1rem;
  right: -1rem;
  font-size: 6rem;
  color: rgba(255, 255, 255, 0.1);
  transition: transform 0.7s;
}
.sidebar-card:hover .skill-of-day-bg-icon {
  transform: scale(1.1);
}

.recent-activity {
  background-color: var(--bg-secondary);
  border: 1px solid var(--glass-border);
}
.recent-activity-title {
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.recent-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  margin-bottom: 1rem;
}
.recent-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--theme-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
}
.recent-code {
  font-size: 0.625rem;
  font-weight: 900;
  color: var(--theme-color);
  opacity: 0.7;
}
.recent-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.study-tip {
  background-color: var(--bg-primary);
  border: 1px solid var(--glass-border);
}
.study-tip-label {
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--theme-color);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}
.study-tip-text {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-main);
}
.study-tip-bar {
  width: 2rem;
  height: 0.25rem;
  background-color: var(--theme-color);
  border-radius: 9999px;
  opacity: 0.2;
}
.study-tip-bg-icon {
  position: absolute;
  top: -1rem;
  right: -1rem;
  font-size: 6rem;
  color: var(--theme-color);
  opacity: 0.05;
  transform: rotate(12deg);
  transition: transform 0.5s;
}
.study-tip:hover .study-tip-bg-icon {
  transform: rotate(45deg);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem;
  background-color: var(--bg-secondary);
  border-radius: 1.5rem;
  border: 1px dashed var(--glass-border);
  text-align: center;
}
.empty-icon {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--theme-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1rem;
}
.empty-title {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}
.empty-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 400px;
  margin-bottom: 2rem;
}
.empty-badge {
  padding: 0.5rem 1.5rem;
  background-color: var(--theme-color);
  color: white;
  font-size: 0.625rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  border-radius: 9999px;
}

/* ==========================================================================
   Standard Deep-Linking & Skill Highlighting
   ========================================================================== */
.standard-deep-link-banner {
  max-width: 1400px;
  margin: 1.5rem auto 0.5rem auto;
  padding: 0 1rem;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.std-banner-inner {
  background: var(--color-bg-surface, #ffffff);
  border: 1.5px solid var(--theme-color, #e11d48);
  border-radius: var(--radius-xl, 1rem);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  box-shadow: 0 10px 25px -5px color-mix(in srgb, var(--theme-color, #e11d48) 20%, transparent);
}

.std-banner-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.std-banner-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-xl, 1rem);
  background: var(--theme-color, #e11d48);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--theme-color, #e11d48) 35%, transparent);
}

.std-banner-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.std-banner-badge {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: var(--theme-color, #e11d48);
  color: #ffffff;
}

.std-banner-badge.badge-subtle {
  background: color-mix(in srgb, var(--theme-color, #e11d48) 15%, transparent);
  color: var(--theme-color, #e11d48);
}

.std-banner-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main, #111827);
  margin-bottom: 0.15rem;
}

.std-banner-code-text {
  font-family: monospace;
  background: color-mix(in srgb, var(--theme-color, #e11d48) 12%, transparent);
  color: var(--theme-color, #e11d48);
  padding: 0.1rem 0.4rem;
  border-radius: 0.35rem;
}

.std-banner-desc-text {
  font-size: 0.8125rem;
  color: var(--text-muted, #6b7280);
}

.std-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.std-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.std-banner-btn-test {
  background: var(--theme-color, #e11d48);
  color: #ffffff;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--theme-color, #e11d48) 25%, transparent);
}

.std-banner-btn-test:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  color: #ffffff;
}

.std-banner-btn-dismiss {
  background: var(--bg-secondary, #f3f4f6);
  border-color: var(--color-border, #e5e7eb);
  color: var(--text-muted, #4b5563);
}

.std-banner-btn-dismiss:hover {
  background: color-mix(in srgb, var(--theme-color, #e11d48) 10%, transparent);
  color: var(--theme-color, #e11d48);
  border-color: var(--theme-color, #e11d48);
}

/* Targeted Skill Card Highlight Glow */
.skill-card.standard-targeted-skill {
  border-color: var(--theme-color, #e11d48) !important;
  box-shadow: 0 0 0 2.5px var(--theme-color, #e11d48), 0 10px 25px -5px color-mix(in srgb, var(--theme-color, #e11d48) 30%, transparent) !important;
  background: color-mix(in srgb, var(--theme-color, #e11d48) 4%, var(--bg-secondary, #ffffff)) !important;
  position: relative;
  transform: translateY(-2px);
  animation: skillTargetPulse 2s ease-in-out infinite;
}

@keyframes skillTargetPulse {
  0%, 100% {
    box-shadow: 0 0 0 2.5px var(--theme-color, #e11d48), 0 8px 20px -4px color-mix(in srgb, var(--theme-color, #e11d48) 25%, transparent);
  }
  50% {
    box-shadow: 0 0 0 4px var(--theme-color, #e11d48), 0 12px 30px -4px color-mix(in srgb, var(--theme-color, #e11d48) 45%, transparent);
  }
}

.standard-targeted-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background: var(--theme-color, #e11d48);
  color: #ffffff;
  margin-bottom: 0.25rem;
  animation: fadeIn 0.3s ease;
}

/* In-Page Skill Search Filter */
.level-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 280px;
  max-width: 440px;
  min-width: 200px;
}

.level-search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted, #6b7280);
  font-size: 0.85rem;
  pointer-events: none;
}

.level-search-input {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 2.25rem;
  border-radius: 9999px;
  border: 1px solid var(--color-border, #e5e7eb);
  background: var(--color-base-bg, #ffffff);
  color: var(--text-main, #111827);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.level-search-input:focus {
  border-color: var(--theme-color, #e11d48);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-color, #e11d48) 20%, transparent);
}

.level-search-clear {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  padding: 0.2rem;
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  font-size: 0.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.level-search-clear:hover {
  color: var(--theme-color, #e11d48);
}

/* Topic Milestone Honors Ribbon */
.topic-milestone-honors {
  margin: 0.75rem 0 1.25rem 0;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.06));
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: 1rem;
  padding: 0.85rem 1.25rem;
  box-shadow: 0 4px 15px -2px rgba(245, 158, 11, 0.15);
  animation: fadeUp 0.4s ease-out;
}

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

.honors-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.honors-medal-icon {
  font-size: 1.75rem;
  color: #f59e0b;
  filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.4));
  animation: pulse 2s infinite ease-in-out;
}

.honors-title {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: #b45309;
}

:root[data-theme="dark"] .honors-title,
:root[data-theme="midnight"] .honors-title,
body.dark .honors-title {
  color: #fbbf24;
}

.honors-subtext {
  margin: 0.15rem 0 0 0;
  font-size: 0.8rem;
  color: var(--text-muted, #4b5563);
}

.honors-claim-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 0.5rem 1.2rem;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  transition: all 0.2s ease;
}

.honors-claim-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.45);
  filter: brightness(1.08);
}

/* Module Progress Meter Breakdown */
.module-progress-subtext {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}


