/* ==========================================================================
   Learning Paths & Guides - Train & Hire
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared
   -------------------------------------------------------------------------- */

.lp-icon {
  width: 16px;
  height: 16px;
  vertical-align: -2px;
}

/* --------------------------------------------------------------------------
   Difficulty badges
   -------------------------------------------------------------------------- */

.lp-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.lp-badge-beginner     { background: #d1fae5; color: #065f46; }
.lp-badge-intermediate { background: #dbeafe; color: #1e40af; }
.lp-badge-advanced     { background: #fef3c7; color: #92400e; }
.lp-badge-expert       { background: #fce7f3; color: #9d174d; }

/* --------------------------------------------------------------------------
   Learning Path Show
   -------------------------------------------------------------------------- */

.lp-show {
  max-width: 1140px;
  margin: 0 auto;
  margin-top: -1.5rem;
  padding: 0 1rem 3rem;
}

.lp-show-header {
  padding: 1.25rem 0;
}

.lp-show-breadcrumb {
  font-size: 0.85rem;
  color: var(--th-text-muted);
}

.lp-show-breadcrumb-link {
  color: var(--th-accent);
  text-decoration: none;
}

.lp-show-breadcrumb-link:hover { text-decoration: underline; }

.lp-show-breadcrumb-sep {
  margin: 0 0.2rem;
  color: #d1d5db;
}

.lp-show-breadcrumb-current { color: var(--th-text-secondary); }

.lp-show-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--th-text);
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.lp-show-description {
  color: var(--th-text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.lp-show-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.lp-show-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--th-text-secondary);
}

/* --------------------------------------------------------------------------
   Progress bar
   -------------------------------------------------------------------------- */

.lp-progress-section { margin-bottom: 1.5rem; }

.lp-progress-bar-wrap {
  background: var(--th-bg-subtle);
  border: 1px solid var(--th-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.lp-progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.lp-progress-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--th-text);
}

.lp-progress-pct {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--th-accent);
}

.lp-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--th-border);
  border-radius: 4px;
  overflow: hidden;
}

.lp-progress-bar-fill {
  height: 100%;
  background: var(--th-accent);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.lp-progress-detail {
  display: block;
  font-size: 0.8rem;
  color: var(--th-text-muted);
  margin-top: 0.4rem;
}

/* --------------------------------------------------------------------------
   Completed banner
   -------------------------------------------------------------------------- */

.lp-completed-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  color: #065f46;
  font-size: 0.92rem;
  line-height: 1.5;
}

.lp-completed-banner p { margin: 0; }

.lp-completed-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}

.lp-completed-verified {
  background: #ecfdf5;
  border-color: #6ee7b7;
}

/* --------------------------------------------------------------------------
   Assessment CTA (learning path)
   -------------------------------------------------------------------------- */

.lp-assessment-cta {
  background: linear-gradient(135deg, #065f46 0%, #064e3b 100%);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  color: #fff;
}

.lp-assessment-cta-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.lp-assessment-cta-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  stroke: #6ee7b7;
}

.lp-assessment-cta-text {
  flex: 1;
  min-width: 200px;
}

.lp-assessment-cta-text strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.lp-assessment-cta-text span {
  font-size: 0.9rem;
  color: #a7f3d0;
}

.lp-assessment-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #10b981;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.lp-assessment-cta-btn:hover {
  background: #059669;
  color: #fff;
  transform: translateY(-1px);
}

.lp-assessment-cta-btn:active {
  transform: translateY(0);
}

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

.lp-assessment-cta-appear {
  animation: lpAssessmentCtaAppear 0.4s ease-out both;
}

/* --------------------------------------------------------------------------
   Enroll section
   -------------------------------------------------------------------------- */

.lp-enroll-section {
  margin-bottom: 1.5rem;
}

.lp-enroll-card {
  background: linear-gradient(135deg, #eef2ff 0%, #f6f7f9 50%, #fef9f0 100%);
  border: 1.5px solid var(--th-border);
  border-radius: 12px;
  padding: 1.5rem;
}

.lp-enroll-card-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.lp-enroll-card-icon {
  width: 42px;
  height: 42px;
  background: rgba(13, 110, 253, 0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lp-enroll-card-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--th-accent);
}

.lp-enroll-card-text { flex: 1; }

.lp-enroll-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--th-text);
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.lp-enroll-card-desc {
  font-size: 0.88rem;
  color: var(--th-text-secondary);
  margin: 0;
  line-height: 1.5;
}

.lp-enroll-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--th-accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.lp-enroll-btn:hover {
  background: var(--th-accent-hover);
  transform: translateY(-1px);
}

.lp-enroll-btn:active {
  transform: translateY(0);
}

/* Sign-in prompt card (non-authenticated users) */

.lp-signin-section {
  margin-bottom: 1.5rem;
}

.lp-signin-card {
  background: linear-gradient(135deg, #f0f7ff 0%, #f6f7f9 50%, #f0f4ff 100%);
  border: 1.5px solid var(--th-border);
  border-radius: 12px;
  padding: 1.5rem;
}

.lp-signin-card-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.lp-signin-card-icon {
  width: 42px;
  height: 42px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lp-signin-card-icon svg {
  width: 22px;
  height: 22px;
  stroke: #6366f1;
}

.lp-signin-card-text { flex: 1; }

.lp-signin-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--th-text);
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.lp-signin-card-desc {
  font-size: 0.88rem;
  color: var(--th-text-secondary);
  margin: 0;
  line-height: 1.5;
}

.lp-signin-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lp-signin-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #6366f1;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}

.lp-signin-btn-primary:hover {
  background: #4f46e5;
  color: #fff;
  transform: translateY(-1px);
}

.lp-signin-btn-primary:active {
  transform: translateY(0);
}

.lp-signin-btn-secondary {
  font-weight: 600;
  font-size: 0.95rem;
  color: #6366f1;
  text-decoration: none;
  padding: 0.65rem 0.5rem;
  transition: color 0.15s ease;
}

.lp-signin-btn-secondary:hover {
  color: #4f46e5;
}

/* Continue learning link */
.lp-continue-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--th-accent);
  text-decoration: none;
  transition: gap 0.15s ease;
}

.lp-continue-btn:hover {
  gap: 0.55rem;
  text-decoration: none;
  color: var(--th-accent-hover);
}

/* --------------------------------------------------------------------------
   Guides list
   -------------------------------------------------------------------------- */

.lp-guides-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--th-text);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.lp-guides-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lp-guide-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--th-border);
  border-bottom: none;
  background: var(--th-bg-card);
  position: relative;
  cursor: pointer;
}

.lp-guide-item:first-child { border-radius: 8px 8px 0 0; }
.lp-guide-item:last-child  { border-radius: 0 0 8px 8px; border-bottom: 1px solid var(--th-border); }
.lp-guide-item:only-child  { border-radius: 8px; border-bottom: 1px solid var(--th-border); }

.lp-guide-item-completed { background: var(--th-bg-subtle); }

.lp-guide-item-next {
  background: #f0f6ff;
  border-left: 3px solid var(--th-accent);
}

.lp-guide-item-next .lp-guide-number {
  background: #dbeafe;
  color: #1e40af;
  font-weight: 700;
}

.lp-guide-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--th-border-light);
  color: var(--th-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.lp-guide-item-completed .lp-guide-number {
  background: #d1fae5;
  color: #065f46;
}

.lp-guide-check {
  width: 16px;
  height: 16px;
}

.lp-guide-info { flex: 1; min-width: 0; }

.lp-guide-link {
  color: var(--th-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.lp-guide-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.lp-guide-link:hover { color: var(--th-accent); }

.lp-guide-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--th-text-muted);
  margin-top: 0.15rem;
}

.lp-guide-optional {
  background: var(--th-border-light);
  padding: 0.05rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  color: var(--th-text-secondary);
}

.lp-guide-status-done {
  font-size: 0.78rem;
  font-weight: 600;
  color: #059669;
}

.lp-guide-status-next {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--th-accent);
  background: #dbeafe;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Guide Show - Professional Training Manual Layout
   -------------------------------------------------------------------------- */

.guide-show {
  max-width: 1140px;
  margin: 0 auto;
  margin-top: -1.5rem;
  padding: 0 1rem 3rem;
  position: relative;
}

/* Reading progress bar */
.guide-progress-bar {
  width: 100%;
  height: 3px;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, #16a34a, #22c55e, #16a34a);
  transition: transform 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
  pointer-events: none;
  will-change: transform;
}

.guide-progress-bar-completed {
  background: linear-gradient(90deg, #7c3aed, #a78bfa, #7c3aed);
}

/* Two-column layout: sidebar TOC + main content */
.guide-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* --------------------------------------------------------------------------
   Sidebar Table of Contents
   -------------------------------------------------------------------------- */

.guide-toc {
  position: sticky;
  top: 1.5rem;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  padding: 1rem 0;
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
}

.guide-toc-inner {
  border-left: 2px solid #e5e7eb;
  padding-left: 1rem;
}

.guide-toc-heading {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 0.75rem;
  padding-bottom: 0;
}

.guide-toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.guide-toc-link {
  display: block;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #6b7280;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.15s ease;
  border-left: 2px solid transparent;
  margin-left: -1rem;
  padding-left: calc(1rem - 2px);
}

.guide-toc-link:hover {
  color: #1f2937;
  background: #f9fafb;
  text-decoration: none;
}

.guide-toc-link-active {
  color: #92400e;
  font-weight: 600;
  border-left-color: #d97706;
  background: #fffbeb;
}

.guide-toc-level-3 {
  padding-left: calc(1rem + 10px);
  font-size: 0.74rem;
}

/* Mobile TOC (shown below 960px) */
.guide-toc-mobile {
  display: none;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 1.75rem;
  background: #fafbfc;
}

.guide-toc-mobile-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.guide-toc-mobile-toggle::-webkit-details-marker { display: none; }

.guide-toc-mobile-toggle svg { flex-shrink: 0; color: #9ca3af; }

.guide-toc-mobile-chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.guide-toc-mobile[open] .guide-toc-mobile-chevron {
  transform: rotate(180deg);
}

.guide-toc-mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0 1rem 1rem;
  border-top: 1px solid #e5e7eb;
  margin-top: 0;
  padding-top: 0.75rem;
}

.guide-toc-mobile-nav .guide-toc-link {
  margin-left: 0;
  padding-left: 0.5rem;
  border-left: none;
}

.guide-toc-mobile-nav .guide-toc-level-3 {
  padding-left: 1.25rem;
}

/* --------------------------------------------------------------------------
   Guide Header
   -------------------------------------------------------------------------- */

.guide-show-header {
  padding: 0 0 1.75rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--th-border-light);
}

.guide-header-context {
  margin-bottom: 0.6rem;
}

.guide-header-path-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #92400e;
  background: #fef3c7;
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
}

.guide-show-title {
  font-size: 2rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin-bottom: 0.65rem;
}

.guide-show-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.guide-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #6b7280;
  font-weight: 500;
}

.guide-meta-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.guide-show-summary {
  margin-top: 1rem;
  margin-bottom: 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: #4b5563;
  max-width: 640px;
}

/* --------------------------------------------------------------------------
   Guide Content - Article Typography
   -------------------------------------------------------------------------- */

.guide-show-content {
  font-size: 1.02rem;
  line-height: 1.8;
  color: #1f2937;
  max-width: 720px;
}

/* --- Headings --- */

.guide-show-content h1 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.03em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--th-border-light);
  line-height: 1.25;
}

.guide-show-content h1:first-child {
  display: none;
}

.guide-show-content h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.025em;
  margin-top: 2.5rem;
  margin-bottom: 0.85rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--th-border-light);
  line-height: 1.3;
  scroll-margin-top: 1.5rem;
}

.guide-show-content h2:first-child,
.guide-show-content h1:first-child + h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.guide-show-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: -0.015em;
  margin-top: 2rem;
  margin-bottom: 0.65rem;
  line-height: 1.35;
  scroll-margin-top: 1.5rem;
}

.guide-show-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* --- Paragraphs --- */

.guide-show-content p {
  margin-bottom: 1.15rem;
}

/* --- Strong / emphasis --- */

.guide-show-content strong {
  font-weight: 700;
  color: #111827;
}

.guide-show-content em {
  font-style: italic;
  color: #374151;
}

/* --- Links --- */

.guide-show-content a {
  color: #b45309;
  text-decoration: underline;
  text-decoration-color: #fcd34d;
  text-underline-offset: 2px;
  transition: all 0.15s;
}

.guide-show-content a:hover {
  color: #92400e;
  text-decoration-color: #d97706;
}

/* --- Lists --- */

.guide-show-content ul,
.guide-show-content ol {
  margin-bottom: 1.25rem;
  padding-left: 0;
}

.guide-show-content ul {
  list-style: none;
}

.guide-show-content ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.55rem;
  line-height: 1.7;
}

.guide-show-content ul li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d97706;
  flex-shrink: 0;
}

/* Nested lists */
.guide-show-content ul ul,
.guide-show-content ol ul {
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
}

.guide-show-content ul ul li::before {
  background: transparent;
  border: 1.5px solid #d97706;
  width: 5px;
  height: 5px;
}

.guide-show-content ol {
  list-style: none;
  counter-reset: guide-ol;
}

.guide-show-content ol li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.65rem;
  line-height: 1.7;
  counter-increment: guide-ol;
}

.guide-show-content ol li::before {
  content: counter(guide-ol);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.45rem;
  height: 1.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border-radius: 50%;
  line-height: 1;
}

/* Lists inside lists - smaller counters */
.guide-show-content ol ol li::before {
  font-size: 0.65rem;
  width: 1.2rem;
  height: 1.2rem;
  background: var(--th-border-light);
  color: #6b7280;
}

/* --- Bold label pattern (common in these guides): "**Term** - description" --- */
.guide-show-content li > strong:first-child {
  color: #111827;
  font-weight: 700;
}

/* --- Blockquotes (tips, warnings, notes) --- */

.guide-show-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
  border-radius: 0 8px 8px 0;
  color: #92400e;
  font-size: 0.95rem;
  line-height: 1.65;
}

.guide-show-content blockquote p {
  margin-bottom: 0.5rem;
}

.guide-show-content blockquote p:last-child {
  margin-bottom: 0;
}

.guide-show-content blockquote strong {
  color: #78350f;
}

/* --- Tables --- */

.guide-show-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.guide-show-content thead {
  background: #1f2937;
  color: #fff;
}

.guide-show-content thead th {
  padding: 0.7rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #111827;
}

.guide-show-content tbody tr {
  border-bottom: 1px solid var(--th-border-light);
  transition: background 0.1s;
}

.guide-show-content tbody tr:nth-child(even) {
  background: #f9fafb;
}

.guide-show-content tbody tr:hover {
  background: #fffbeb;
}

.guide-show-content tbody td {
  padding: 0.65rem 1rem;
  vertical-align: top;
}

.guide-show-content tbody td:first-child {
  font-weight: 600;
  color: #111827;
}

/* --- Code --- */

.guide-show-content code {
  background: var(--th-border-light);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Menlo, monospace;
  color: #92400e;
  border: 1px solid #e5e7eb;
}

.guide-show-content pre {
  background: #1f2937;
  color: #e5e7eb;
  padding: 1.15rem 1.35rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  line-height: 1.6;
  border: 1px solid #374151;
}

.guide-show-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  border: none;
  font-size: inherit;
}

/* --- Horizontal rules --- */

.guide-show-content hr {
  border: none;
  height: 2px;
  background: var(--th-border-light);
  margin: 2.5rem 0;
}

/* --- Images --- */

.guide-show-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  border: 1px solid #e5e7eb;
}

/* --- Highlight (==text== via Redcarpet) --- */

.guide-show-content mark {
  background: #fef3c7;
  color: #92400e;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   Guide Completion Toggle
   -------------------------------------------------------------------------- */

.guide-show-completion {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  text-align: center;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.guide-show-completion:has(.guide-completion-done) {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.guide-completion-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-completion-icon {
  width: 18px;
  height: 18px;
}

/* Completed state */
.guide-completion-done {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  animation: completionDoneAppear 0.3s ease-out;
}

.guide-completion-done-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-completion-done-icon {
  width: 22px;
  height: 22px;
  stroke: #059669;
}

.guide-completion-done-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #059669;
}

.guide-completion-btn-undo {
  font-size: 0.82rem;
  font-weight: 500;
  color: #9ca3af;
  background: none;
  border: 1px solid #86efac;
  border-radius: 6px;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
}

.guide-completion-btn-undo:hover {
  color: #6b7280;
  border-color: #4ade80;
  background: rgba(255, 255, 255, 0.5);
}

/* Prompt text for incomplete state */
.guide-completion-prompt-text {
  font-size: 0.88rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
  margin-top: 0;
}

@keyframes completionDoneAppear {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* --------------------------------------------------------------------------
   Assessment CTA (shown when all guides in a learning path are completed)
   -------------------------------------------------------------------------- */

.guide-assessment-cta {
  margin-top: 1.5rem;
  background: linear-gradient(135deg, #065f46 0%, #064e3b 100%);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  color: #fff;
}

.guide-assessment-cta-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.guide-assessment-cta-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  stroke: #6ee7b7;
}

.guide-assessment-cta-text {
  flex: 1;
  min-width: 200px;
}

.guide-assessment-cta-text strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.guide-assessment-cta-text span {
  font-size: 0.9rem;
  color: #a7f3d0;
}

.guide-assessment-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #10b981;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.guide-assessment-cta-btn:hover {
  background: #059669;
  color: #fff;
  transform: translateY(-1px);
}

.guide-assessment-cta-btn:active {
  transform: translateY(0);
}

/* Assessment CTA appear animation */
@keyframes assessmentCtaAppear {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.guide-assessment-cta-appear {
  animation: assessmentCtaAppear 0.4s ease-out both;
}

/* --------------------------------------------------------------------------
   Skill Auto-Added Notice
   -------------------------------------------------------------------------- */

.skill-auto-added-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.6rem 1rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #065f46;
}

.skill-auto-added-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: #10b981;
}

.skill-auto-added-text {
  line-height: 1.3;
}

.skill-auto-added-text strong {
  font-weight: 600;
}

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

@keyframes skillAutoAddedDismiss {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.skill-auto-added-appear {
  animation: skillAutoAddedAppear 0.35s ease-out both,
             skillAutoAddedDismiss 0.3s ease-in 6s both;
}

/* --------------------------------------------------------------------------
   Guide Prev/Next Navigation
   -------------------------------------------------------------------------- */

.guide-show-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--th-border-light);
}

.guide-show-nav-prev,
.guide-show-nav-next {
  flex: 1;
  min-width: 0;
}

.guide-show-nav-next { text-align: right; }

.guide-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #1f2937;
  padding: 1rem 1.25rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  transition: all 0.18s ease;
  background: #fff;
}

.guide-nav-link:hover {
  border-color: #d97706;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.08);
  color: #1f2937;
  text-decoration: none;
  transform: translateY(-1px);
}

.guide-nav-link-next { flex-direction: row; }

.guide-nav-icon {
  width: 20px;
  height: 20px;
  color: #9ca3af;
  flex-shrink: 0;
}

.guide-nav-link:hover .guide-nav-icon {
  color: #d97706;
}

.guide-nav-label {
  display: block;
  font-size: 0.72rem;
  color: #9ca3af;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.guide-nav-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
}

/* Highlighted next guide nav when current guide is completed */
.guide-show-nav-completed .guide-show-nav-next .guide-nav-link {
  border-color: #d97706;
  background: #fffbeb;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.1);
}

.guide-show-nav-completed .guide-show-nav-next .guide-nav-label {
  color: #d97706;
}

.guide-show-nav-completed .guide-show-nav-next .guide-nav-icon {
  color: #d97706;
}

/* --------------------------------------------------------------------------
   Dashboard enrollment cards
   -------------------------------------------------------------------------- */

.lp-enrollment-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lp-enrollment-card {
  border: 1px solid var(--th-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  background: var(--th-bg-card);
}

.lp-enrollment-card-completed { background: var(--th-bg-subtle); }

.lp-enrollment-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.lp-enrollment-card-info { flex: 1; min-width: 0; }

.lp-enrollment-card-title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--th-text);
  text-decoration: none;
  margin-bottom: 0.15rem;
}

.lp-enrollment-card-title:hover { color: var(--th-accent); }

.lp-enrollment-card-skill {
  font-size: 0.8rem;
  color: var(--th-text-muted);
}

.lp-enrollment-card-completed-date {
  font-size: 0.78rem;
  color: #059669;
  font-weight: 500;
  white-space: nowrap;
}

.lp-enrollment-card-progress { margin-bottom: 0.75rem; }

.lp-enrollment-card-actions {
  display: flex;
  gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   Dashboard empty state (reuses dash patterns)
   -------------------------------------------------------------------------- */

.dash-empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.dash-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: var(--th-text-muted);
}

.dash-empty-icon svg {
  width: 100%;
  height: 100%;
}

.dash-empty-text {
  font-size: 1rem;
  color: var(--th-text-secondary);
  margin-bottom: 0.35rem;
}

.dash-empty-hint {
  font-size: 0.88rem;
  color: var(--th-text-muted);
}

/* --------------------------------------------------------------------------
   Skill Status Badges (skills index cards)
   -------------------------------------------------------------------------- */

.skill-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}

.skill-status-icon {
  width: 12px;
  height: 12px;
}

.skill-status-verified {
  background: #d1fae5;
  color: #065f46;
}

.skill-status-completed {
  background: #dbeafe;
  color: #1e40af;
}

.skill-status-has-skill {
  background: var(--th-border-light);
  color: #6b7280;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Guide layout: collapse sidebar at 960px */
@media (max-width: 960px) {
  .guide-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .guide-toc { display: none; }
  .guide-toc-mobile { display: block; }
}

@media (max-width: 640px) {
  .lp-show, .guide-show, .learning-page { padding-left: 0.75rem; padding-right: 0.75rem; }
  .lp-show-title { font-size: 1.4rem; }
  .guide-show-title { font-size: 1.5rem; }
  .guide-show-nav { flex-direction: column-reverse; align-items: center; }
  .guide-show-nav-next { text-align: center; }
  .guide-show-nav-prev { text-align: center; }
  .lp-enrollment-card-top { flex-direction: column; }
  .lp-enroll-card-content { flex-direction: column; gap: 0.75rem; }
  .lp-enroll-card { padding: 1.15rem; }
  .lp-signin-card-content { flex-direction: column; gap: 0.75rem; }
  .lp-signin-card { padding: 1.15rem; }
  .guide-completion-done { flex-direction: column; gap: 0.5rem; }
  .guide-show-content { font-size: 0.95rem; }
  .guide-show-content h2 { font-size: 1.2rem; }
  .guide-show-content h3 { font-size: 1.02rem; }
  .guide-show-content table { font-size: 0.82rem; }
  .guide-show-content thead th { padding: 0.5rem 0.65rem; }
  .guide-show-content tbody td { padding: 0.5rem 0.65rem; }
  .guide-show-completion { padding: 1rem; }
  .skill-auto-added-notice { font-size: 0.8rem; padding: 0.5rem 0.75rem; }
  .guide-assessment-cta { padding: 1.25rem; }
  .guide-assessment-cta-inner { flex-direction: column; text-align: center; }
  .guide-assessment-cta-icon { width: 32px; height: 32px; }
  .lp-assessment-cta { padding: 1.25rem; }
  .lp-assessment-cta-inner { flex-direction: column; text-align: center; }
  .lp-assessment-cta-icon { width: 32px; height: 32px; }
}

/* ==========================================================================
   Skill Show Page
   ========================================================================== */

:root {
  /* Difficulty palette (learning-specific) */
  --learning-beginner: #2563eb;
  --learning-beginner-bg: #dbeafe;
  --learning-beginner-border: #93c5fd;
  --learning-intermediate: #059669;
  --learning-intermediate-bg: #d1fae5;
  --learning-intermediate-border: #6ee7b7;
  --learning-advanced: #d97706;
  --learning-advanced-bg: #fef3c7;
  --learning-advanced-border: #fcd34d;
  --learning-expert: #dc2626;
  --learning-expert-bg: #fee2e2;
  --learning-expert-border: #fca5a5;

  /* Prereq status */
  --learning-unlocked: #059669;
  --learning-unlocked-bg: #ecfdf5;
  --learning-locked: #9aa0a6;
  --learning-locked-bg: var(--th-border-light);
}

/* --------------------------------------------------------------------------
   Skill show page layout
   -------------------------------------------------------------------------- */

.learning-page {
  font-family: var(--learning-font);
  max-width: 1140px;
  margin: 0 auto;
  margin-top: -1.5rem;
  padding: 0 1rem 3rem;
}

/* --------------------------------------------------------------------------
   Hero header
   -------------------------------------------------------------------------- */

.learning-hero {
  background: linear-gradient(135deg, #eef2ff 0%, #f6f7f9 50%, #fef9f0 100%);
  border: 1px solid var(--learning-border);
  border-radius: 14px;
  padding: 2rem 2.25rem;
  margin-bottom: 2rem;
}

.learning-hero-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.learning-hero-text {
  flex: 1;
}

.learning-category-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--learning-accent);
  background: rgba(13, 110, 253, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
}

/* Category filter chips */
.learning-category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 0 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.learning-category-filters::-webkit-scrollbar {
  display: none;
}

.learning-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--learning-font);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--learning-text-secondary);
  background: #fff;
  border: 1px solid var(--learning-border);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.learning-category-chip:hover {
  color: var(--learning-accent);
  border-color: var(--learning-accent);
  background: rgba(13, 110, 253, 0.04);
}

.learning-category-chip-active {
  color: #fff;
  background: var(--learning-accent);
  border-color: var(--learning-accent);
}

.learning-category-chip-active:hover {
  color: #fff;
  background: var(--learning-accent);
  border-color: var(--learning-accent);
}

.learning-category-chip-count {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--learning-text-muted);
  background: rgba(0, 0, 0, 0.06);
  padding: 0.1rem 0.4rem;
  border-radius: 100px;
  line-height: 1.2;
}

.learning-category-chip-active .learning-category-chip-count {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 640px) {
  .learning-category-filters {
    flex-wrap: nowrap;
    padding-bottom: 1rem;
  }
}

.learning-hero-title {
  font-family: var(--learning-font);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--learning-text-primary);
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.learning-hero-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--learning-text-secondary);
  margin-bottom: 0;
  max-width: 560px;
}

/* Stats cluster */
.learning-hero-stats {
  display: flex;
  gap: 1.5rem;
  flex-shrink: 0;
  padding-top: 0.25rem;
}

.learning-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
}

.learning-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--learning-text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.learning-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--learning-text-muted);
  margin-top: 0.2rem;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.learning-section {
  margin-bottom: 2.5rem;
}

.learning-section-header {
  margin-bottom: 1.25rem;
}

.learning-section-title {
  font-family: var(--learning-font);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--learning-text-primary);
  letter-spacing: -0.025em;
  margin-bottom: 0.2rem;
}

.learning-section-subtitle {
  font-size: 0.88rem;
  color: var(--learning-text-secondary);
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Prerequisites grid
   -------------------------------------------------------------------------- */

.learning-prereqs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.learning-prereq-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--learning-card-bg);
  border: 1.5px solid var(--learning-border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.18s ease;
}

.learning-prereq-card:hover {
  border-color: #c7d7f7;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
  color: inherit;
  text-decoration: none;
}

.learning-prereq-unlocked {
  border-color: var(--learning-intermediate-border);
  background: var(--learning-unlocked-bg);
}

.learning-prereq-unlocked:hover {
  border-color: var(--learning-unlocked);
}

.learning-prereq-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--learning-locked-bg);
}

.learning-prereq-unlocked .learning-prereq-icon {
  background: rgba(5, 150, 105, 0.1);
}

.learning-prereq-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.learning-prereq-card .learning-prereq-icon svg {
  stroke: var(--learning-locked);
}

.learning-prereq-unlocked .learning-prereq-icon svg {
  stroke: var(--learning-unlocked);
}

.learning-prereq-info {
  flex: 1;
  min-width: 0;
}

.learning-prereq-name {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--learning-text-primary);
  letter-spacing: -0.01em;
}

.learning-prereq-category {
  display: block;
  font-size: 0.75rem;
  color: var(--learning-text-muted);
  font-weight: 500;
  margin-top: 0.05rem;
}

.learning-prereq-status {
  flex-shrink: 0;
}

.learning-prereq-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.learning-prereq-badge svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.learning-prereq-badge-done {
  background: var(--learning-unlocked-bg);
  color: var(--learning-unlocked);
}

.learning-prereq-badge-done svg {
  stroke: var(--learning-unlocked);
}

.learning-prereq-badge-locked {
  background: var(--learning-locked-bg);
  color: #6b7280;
}

.learning-prereq-badge-locked svg {
  stroke: #6b7280;
  width: 11px;
  height: 11px;
}

/* --------------------------------------------------------------------------
   Difficulty grouping
   -------------------------------------------------------------------------- */

.learning-difficulty-group {
  margin-bottom: 2rem;
  scroll-margin-top: 1.5rem;
}

.learning-difficulty-group:last-child {
  margin-bottom: 0;
}

.learning-difficulty-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  scroll-margin-top: 1.25rem;
}

.learning-difficulty-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 6px;
  letter-spacing: 0.01em;
}

.learning-difficulty-count {
  font-size: 0.78rem;
  color: var(--learning-text-muted);
  font-weight: 500;
}

/* Difficulty badge colors */
.learning-difficulty-beginner {
  background: var(--learning-beginner-bg);
  color: var(--learning-beginner);
  border: 1px solid var(--learning-beginner-border);
}

.learning-difficulty-intermediate {
  background: var(--learning-intermediate-bg);
  color: var(--learning-intermediate);
  border: 1px solid var(--learning-intermediate-border);
}

.learning-difficulty-advanced {
  background: var(--learning-advanced-bg);
  color: var(--learning-advanced);
  border: 1px solid var(--learning-advanced-border);
}

.learning-difficulty-expert {
  background: var(--learning-expert-bg);
  color: var(--learning-expert);
  border: 1px solid var(--learning-expert-border);
}

/* --------------------------------------------------------------------------
   Learning path cards grid
   -------------------------------------------------------------------------- */

.learning-paths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
}

/* --------------------------------------------------------------------------
   Learning path card
   -------------------------------------------------------------------------- */

.learning-path-card {
  background: var(--learning-card-bg);
  border: 1.5px solid var(--learning-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  transition: all 0.18s ease;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.learning-path-card:hover {
  border-color: #c7d7f7;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

.learning-path-card-top {
  padding: 1.15rem 1.25rem 0.85rem;
  flex: 1;
}

.learning-path-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.learning-path-card-title {
  font-family: var(--learning-font);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--learning-text-primary);
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: 0;
}

.learning-path-card-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.learning-path-card-link:hover {
  color: var(--learning-accent);
}

/* Stretched link - entire card is clickable */
.learning-path-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Keep action buttons and badges clickable above stretched link */
.learning-path-action {
  position: relative;
  z-index: 2;
}

.skill-status-badge {
  position: relative;
  z-index: 2;
}

/* Small colored dot indicating difficulty */
.learning-difficulty-pip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.35rem;
}

.learning-difficulty-pip.learning-difficulty-beginner { background: var(--learning-beginner); }
.learning-difficulty-pip.learning-difficulty-intermediate { background: var(--learning-intermediate); }
.learning-difficulty-pip.learning-difficulty-advanced { background: var(--learning-advanced); }
.learning-difficulty-pip.learning-difficulty-expert { background: var(--learning-expert); }

.learning-path-card-desc {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--learning-text-secondary);
  margin-bottom: 0.65rem;
}

.learning-path-card-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.learning-path-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--learning-text-muted);
}

.learning-path-meta-item svg {
  width: 14px;
  height: 14px;
  stroke: var(--learning-text-muted);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Card bottom: progress + action
   -------------------------------------------------------------------------- */

.learning-path-card-bottom {
  padding: 0.75rem 1.25rem 1rem;
  border-top: 1px solid #f0f1f3;
  background: #fafbfc;
}

/* Progress bar row */
.learning-path-progress-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.learning-path-progress-bar {
  flex: 1;
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
}

.learning-path-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--learning-accent), #4f8cf7);
  border-radius: 3px;
  transition: width 0.4s ease;
  min-width: 2px;
}

.learning-path-progress-text {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--learning-text-secondary);
  min-width: 32px;
  text-align: right;
}

/* Completed status */
.learning-path-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.learning-path-status svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.learning-path-status-complete {
  color: var(--learning-unlocked);
}

.learning-path-status-complete svg {
  stroke: var(--learning-unlocked);
}

/* Action buttons */
.learning-path-action {
  display: block;
  text-align: center;
  font-family: var(--learning-font);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
  letter-spacing: -0.01em;
}

.learning-path-action:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.learning-path-action:active {
  transform: translateY(0);
}

.learning-path-action-start {
  background: var(--learning-accent);
  color: #fff;
}

.learning-path-action-start:hover {
  background: #0b5ed7;
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.learning-path-action-continue {
  background: rgba(13, 110, 253, 0.08);
  color: var(--learning-accent);
}

.learning-path-action-continue:hover {
  background: rgba(13, 110, 253, 0.14);
  color: var(--learning-accent);
}

.learning-path-action-view {
  background: var(--th-border-light);
  color: var(--learning-text-secondary);
}

.learning-path-action-view:hover {
  background: #e9ecef;
  color: var(--learning-text-primary);
}

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */

.learning-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--learning-text-muted);
}

.learning-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #f1f3f5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.learning-empty-icon svg {
  width: 26px;
  height: 26px;
  stroke: #adb5bd;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.learning-empty p {
  font-size: 0.88rem;
  max-width: 320px;
  line-height: 1.5;
  margin-bottom: 0;
}

.learning-hero {
  animation: fadeSlideIn 0.3s ease-out;
}

.learning-prereq-card {
  animation: fadeSlideIn 0.25s ease-out both;
}

.learning-prereq-card:nth-child(1) { animation-delay: 0.03s; }
.learning-prereq-card:nth-child(2) { animation-delay: 0.06s; }
.learning-prereq-card:nth-child(3) { animation-delay: 0.09s; }
.learning-prereq-card:nth-child(4) { animation-delay: 0.12s; }

.learning-path-card {
  animation: fadeSlideIn 0.25s ease-out both;
}

.learning-path-card:nth-child(1) { animation-delay: 0.04s; }
.learning-path-card:nth-child(2) { animation-delay: 0.08s; }
.learning-path-card:nth-child(3) { animation-delay: 0.12s; }
.learning-path-card:nth-child(4) { animation-delay: 0.16s; }
.learning-path-card:nth-child(5) { animation-delay: 0.20s; }
.learning-path-card:nth-child(6) { animation-delay: 0.24s; }

/* --------------------------------------------------------------------------
   Skill show + dashboard learning responsive
   -------------------------------------------------------------------------- */

@media (max-width: 767.98px) {
  .learning-hero {
    padding: 1.5rem 1.25rem;
  }

  .learning-hero-inner {
    flex-direction: column;
    gap: 1.25rem;
  }

  .learning-hero-title {
    font-size: 1.45rem;
  }

  .learning-hero-desc {
    font-size: 0.9rem;
  }

  .learning-hero-stats {
    justify-content: flex-start;
  }

  .learning-prereqs-grid,
  .learning-paths-grid {
    grid-template-columns: 1fr;
  }

  .learning-section-title {
    font-size: 1.1rem;
  }

  .learning-section-subtitle {
    font-size: 0.84rem;
  }

  /* Larger touch targets for action buttons on mobile */
  .learning-path-action {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .learning-path-card-top {
    padding: 1rem 1.1rem 0.75rem;
  }

  .learning-path-card-bottom {
    padding: 0.65rem 1.1rem 0.85rem;
  }

  /* Better tap target for prereq cards */
  .learning-prereq-card {
    padding: 0.9rem 1rem;
    min-height: 44px;
  }

  .learning-difficulty-group {
    margin-bottom: 1.75rem;
  }
}

@media (max-width: 575.98px) {
  .learning-page {
    padding: 0 0.65rem 2rem;
  }

  .learning-hero {
    padding: 1.15rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
  }

  .learning-hero-title {
    font-size: 1.25rem;
  }

  .learning-hero-desc {
    font-size: 0.85rem;
  }

  .learning-stat-value {
    font-size: 1.25rem;
  }

  .learning-stat-label {
    font-size: 0.65rem;
  }

  .learning-path-card-desc {
    font-size: 0.8rem;
  }

  .learning-path-card-title {
    font-size: 0.9rem;
  }
}
