/* ==========================================================================
   JolokLabs V4.6 UI Enhancements
   - Site-wide Auto-Dismiss Toast Notifications
   - Home Article Section & Official YouTube Channel Spotlight (Image 1)
   - Articles Catalog & Single Article Reading Room Polish
   - Engineering Curriculum Roadmap & Upcoming Course Syllabus Timeline
   - Auth & Dark Mode Refinements
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Site-Wide Auto-Dismiss Toast Stack (Welcome back, Save, Status alerts)
   -------------------------------------------------------------------------- */
.site-toast-stack {
  position: fixed;
  top: 76px;
  right: 20px;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  max-width: 420px;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.site-toast-stack .toast-notice {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 13px 14px 15px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #d1fae5;
    color: #065f46;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  pointer-events: auto;
  animation: jlToastSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.32s ease, transform 0.32s ease, max-height 0.32s ease, margin 0.32s ease, padding 0.32s ease;
}

.site-toast-stack .toast-notice.notice-info {
  border-color: #bae6fd;
    color: #075985;
}

.site-toast-stack .toast-notice.notice-warning {
  border-color: #fde68a;
    color: #92400e;
}

.site-toast-stack .toast-notice.notice-error {
  border-color: #fecaca;
    color: #991b1b;
}

.site-toast-stack .toast-notice .notice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
  flex-shrink: 0;
  margin-top: 1px;
}

.site-toast-stack .toast-notice.notice-info .notice-icon {
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
}

.site-toast-stack .toast-notice.notice-warning .notice-icon {
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
}

.site-toast-stack .toast-notice.notice-error .notice-icon {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

.site-toast-stack .toast-notice .notice-text {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.notice-dismiss-btn {
  appearance: none;
  background: transparent;
  border: none;
  color: currentColor;
  opacity: 0.55;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.notice-dismiss-btn:hover,
.notice-dismiss-btn:focus-visible {
  opacity: 1;
  background: rgba(15, 23, 42, 0.06);
  outline: none;
}

.notice-progress-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: currentColor;
  opacity: 0.28;
  transform-origin: left center;
  animation: jlToastCountdown var(--toast-duration, 4200ms) linear forwards;
}

.toast-notice.is-paused .notice-progress-bar {
  animation-play-state: paused;
}

.toast-notice.is-leaving {
  opacity: 0;
  transform: translateX(22px) scale(0.97);
  pointer-events: none;
}

@keyframes jlToastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px) translateX(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
  }
}

@keyframes jlToastCountdown {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

html.dark-theme .site-toast-stack .toast-notice {
  background: #0f172a;
  border-color: rgba(16, 185, 129, 0.32);
    color: #d1fae5;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

html.dark-theme .site-toast-stack .toast-notice.notice-info {
  border-color: rgba(56, 189, 248, 0.32);
    color: #e0f2fe;
}

html.dark-theme .site-toast-stack .toast-notice.notice-warning {
  border-color: rgba(251, 191, 36, 0.32);
    color: #fef3c7;
}

html.dark-theme .site-toast-stack .toast-notice.notice-error {
  border-color: rgba(248, 113, 113, 0.35);
    color: #fee2e2;
}

@media (max-width: 640px) {
  .site-toast-stack {
    top: 66px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }
}

/* --------------------------------------------------------------------------
   2. Home Article Section (V2 Editorial Cards)
   -------------------------------------------------------------------------- */
.home-reading-v2 .section-subtitle {
  margin: 6px 0 0;
  font-size: 0.94rem;
  color: var(--text-muted, #64748b);
}

.home-articles-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

@media (max-width: 960px) {
  .home-articles-grid-v2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .home-articles-grid-v2 {
    grid-template-columns: 1fr;
  }
}

.home-article-card-v2 {
  display: flex;
  flex-direction: column;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.home-article-card-v2:hover {
  transform: translateY(-4px);
  border-color: rgba(3, 90, 110, 0.38);
  box-shadow: 0 14px 30px rgba(3, 90, 110, 0.11);
}

.article-card-thumb-v2 {
  position: relative;
  height: 168px;
  overflow: hidden;
  background: linear-gradient(135deg, #062a34 0%, #035a6e 55%, #0e7490 100%);
}

.article-card-thumb-v2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.home-article-card-v2:hover .article-card-thumb-v2 img {
  transform: scale(1.04);
}

.article-card-thumb-v2.is-fallback {
  display: flex;
  align-items: flex-end;
  padding: 18px;
  background:
    radial-gradient(circle at 85% 20%, rgba(2, 211, 204, 0.22), transparent 52%),
    linear-gradient(135deg, #0b2430 0%, #035a6e 100%);
}

.article-thumb-pattern {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.9);
}

.article-thumb-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.article-thumb-index {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  opacity: 0.22;
  letter-spacing: -0.04em;
}

.article-thumb-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  backdrop-filter: blur(6px);
}

.article-thumb-done {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #059669;
  color: #ffffff;
}

.article-card-body-v2 {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 20px 18px;
  gap: 10px;
}

.article-card-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}

.article-read-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.article-pdf-pill {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.article-card-title-v2 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 750;
  line-height: 1.35;
  color: var(--text-heading, #0f172a);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-article-card-v2:hover .article-card-title-v2 {
  color: #035a6e;
}

.article-card-excerpt {
  margin: 0;
  font-size: 0.87rem;
  line-height: 1.55;
  color: var(--text-body, #475569);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.article-card-foot-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  margin-top: auto;
  border-top: 1px solid var(--border, #f1f5f9);
  font-size: 0.82rem;
}

.article-author-mini {
  color: var(--text-muted, #64748b);
  font-weight: 600;
}

.home-article-card-v2 .article-card-action {
  color: #035a6e;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.home-article-card-v2 .action-arrow {
  transition: transform 0.2s ease;
}

.home-article-card-v2:hover .action-arrow {
  transform: translateX(3px);
}

html.dark-theme .home-article-card-v2 {
  background: #111827;
  border-color: rgba(148, 163, 184, 0.16);
}

html.dark-theme .home-article-card-v2:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

html.dark-theme .article-card-title-v2 {
  color: #f8fafc;
}

html.dark-theme .home-article-card-v2:hover .article-card-title-v2,
html.dark-theme .home-article-card-v2 .article-card-action {
  color: #38bdf8;
}

html.dark-theme .article-card-excerpt {
  color: #cbd5e1;
}

html.dark-theme .article-card-foot-v2 {
  border-top-color: rgba(148, 163, 184, 0.14);
}

/* --------------------------------------------------------------------------
   3. Image 1 Section: Official YouTube Channel Spotlight (V2)
   -------------------------------------------------------------------------- */
.channel-spotlight-v2 {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.85fr);
  align-items: center;
  gap: 32px;
  padding: 36px 40px;
  border-radius: 22px;
  background: linear-gradient(135deg, #0b1929 0%, #0f293a 52%, #1e1b2e 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.channel-spotlight-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 82% 24%, rgba(239, 68, 68, 0.24), transparent 44%),
    radial-gradient(circle at 14% 88%, rgba(2, 211, 204, 0.16), transparent 46%),
    radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 22px 22px;
  pointer-events: none;
}

.channel-spotlight-left,
.channel-spotlight-right {
  position: relative;
  z-index: 1;
}

.channel-badge-v2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.channel-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.28);
}

.channel-headline-v2 {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.channel-desc-v2 {
  margin: 0 0 18px;
  font-size: 0.96rem;
  line-height: 1.6;
  color: #cbd5e1;
  max-width: 580px;
}

.channel-desc-v2 strong {
  color: #ffffff;
}

.channel-topic-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.channel-topic-pill {
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 600;
}

.channel-action-panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(10px);
}

.channel-identity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.channel-play-emblem {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.36);
  flex-shrink: 0;
}

.channel-identity-text {
  display: flex;
  flex-direction: column;
}

.channel-identity-text strong {
  font-size: 0.98rem;
  font-weight: 750;
  color: #ffffff;
}

.channel-identity-text span {
  font-size: 0.78rem;
  color: #94a3b8;
}

.channel-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 12px 18px;
  border-radius: 11px;
  background: #ef4444;
  color: #ffffff !important;
  font-size: 0.93rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.34);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.channel-cta-primary:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.44);
}

.channel-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f1f5f9 !important;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.channel-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 820px) {
  .channel-spotlight-v2 {
    grid-template-columns: 1fr;
    padding: 26px 22px;
    gap: 22px;
  }
}

/* --------------------------------------------------------------------------
   4. Articles Catalog (V2) & Single Article Detail Page (V2)
   -------------------------------------------------------------------------- */
.editorial-index-v2 {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

.editorial-hero-v2 {
  margin-bottom: 22px;
}

.editorial-hero-lead {
  margin: 8px 0 14px;
  font-size: 0.98rem;
  color: var(--text-muted, #64748b);
  max-width: 680px;
}

.editorial-hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.editorial-metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--surface-alt, #f1f5f9);
  border: 1px solid var(--border, #e2e8f0);
  color: var(--text-body, #334155);
}

.editorial-metric-pill.is-accent {
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.26);
  color: #047857;
}

.category-chip .chip-count {
  margin-left: 5px;
  font-size: 0.74rem;
  opacity: 0.72;
}

.track-header-v2 .track-desc {
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: var(--text-muted, #64748b);
}

.pub-row-v2 {
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.pub-row-meta-v2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
}

.pub-meta-readtime {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 650;
  color: #035a6e;
}

.pub-row-excerpt {
  margin: 5px 0 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-muted, #64748b);
  max-width: 720px;
}

.pub-open-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #035a6e;
  background: rgba(3, 90, 110, 0.08);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}

.pub-row-v2:hover .pub-open-pill {
  background: #035a6e;
  color: #ffffff;
}

.pub-read-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #059669;
  margin-left: 4px;
}

.article-breadcrumb-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.8rem;
}

.article-crumb-link {
  color: var(--text-muted, #64748b);
  text-decoration: none;
  font-weight: 600;
}

.article-crumb-link:hover {
  color: #035a6e;
}

.article-crumb-sep {
  color: #94a3b8;
}

.article-kind-pill-v2 {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(3, 90, 110, 0.1);
  color: #035a6e;
  font-weight: 700;
  text-decoration: none;
}

.article-readtime-pill-v2 {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-alt, #f1f5f9);
  color: var(--text-body, #475569);
  font-weight: 600;
}

.article-course-pill-v2 {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.1);
  color: #0369a1;
  font-weight: 600;
  text-decoration: none;
}

.article-summary-deck {
  margin: 12px 0 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-body, #475569);
}

.takeaways-head-v2 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #035a6e;
  margin-bottom: 8px;
}

.article-ecosystem-cta {
  background: linear-gradient(135deg, rgba(3, 90, 110, 0.06), rgba(2, 132, 199, 0.06));
  border-color: rgba(2, 132, 199, 0.22);
}

.ecosystem-cta-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0284c7;
  display: block;
  margin-bottom: 4px;
}

.ecosystem-cta-desc {
  font-size: 12.5px;
  color: var(--text-body, #334155);
  margin: 0 0 10px;
  line-height: 1.45;
}

.ecosystem-cta-link {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #035a6e;
  text-decoration: none;
  margin-bottom: 5px;
}

.ecosystem-cta-link:hover {
  text-decoration: underline;
}

html.dark-theme .editorial-metric-pill {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

html.dark-theme .pub-meta-readtime,
html.dark-theme .article-kind-pill-v2,
html.dark-theme .takeaways-head-v2,
html.dark-theme .ecosystem-cta-link {
  color: #38bdf8;
}

html.dark-theme .pub-open-pill {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
}

html.dark-theme .article-readtime-pill-v2 {
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
}

html.dark-theme .article-summary-deck {
  color: #cbd5e1;
}

/* --------------------------------------------------------------------------
   5. Engineering Curriculum Roadmap (Courses Page & Upcoming Course Page)
   -------------------------------------------------------------------------- */
.course-roadmap-section {
  margin-top: 42px;
  padding: 28px 30px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #e2e8f0;
}

.course-roadmap-section.is-primary {
  margin-top: 12px;
}

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

.roadmap-header-bar h2 {
  margin: 4px 0 6px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-heading, #0f172a);
}

.roadmap-subtitle {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted, #64748b);
  max-width: 640px;
}

.roadmap-count-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(3, 90, 110, 0.1);
  color: #035a6e;
  border: 1px solid rgba(3, 90, 110, 0.2);
}

.roadmap-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.roadmap-node {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
}

.roadmap-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.roadmap-step-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #035a6e, #0284c7);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(3, 90, 110, 0.24);
  flex-shrink: 0;
}

.roadmap-rail-line {
  width: 2px;
  flex: 1;
  min-height: 24px;
  margin-top: 8px;
  background: linear-gradient(180deg, rgba(3, 90, 110, 0.35), rgba(3, 90, 110, 0.08));
}

.roadmap-node:last-child .roadmap-rail-line {
  display: none;
}

.roadmap-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.roadmap-card:hover {
  transform: translateY(-2px);
  border-color: rgba(3, 90, 110, 0.38);
  box-shadow: 0 12px 26px rgba(3, 90, 110, 0.09);
}

.roadmap-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.roadmap-card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.roadmap-release-tag {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.roadmap-topic-tag {
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 650;
  background: #f1f5f9;
  color: #334155;
}

.roadmap-module-tag {
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 650;
  background: #ecfdf5;
  color: #047857;
}

.roadmap-price-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: #035a6e;
}

.roadmap-card-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 750;
}

.roadmap-card-title a {
  color: var(--text-heading, #0f172a);
  text-decoration: none;
}

.roadmap-card-title a:hover {
  color: #035a6e;
}

.roadmap-card-outcome {
  margin: 0 0 12px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-body, #475569);
}

.roadmap-tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.roadmap-tool-chip {
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.roadmap-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.roadmap-prereq {
  font-size: 0.8rem;
  color: var(--text-muted, #64748b);
}

.roadmap-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9px;
  background: #035a6e;
  color: #ffffff !important;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.16s ease, transform 0.16s ease;
}

.roadmap-cta-btn:hover {
  background: #024656;
  transform: translateY(-1px);
}

/* Upcoming Course Individual Syllabus Roadmap Timeline */
.syllabus-roadmap-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.syllabus-roadmap-node {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
}

.syllabus-node-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.syllabus-node-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #035a6e, #0284c7);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.syllabus-node-line {
  width: 2px;
  flex: 1;
  min-height: 20px;
  margin-top: 8px;
  background: linear-gradient(180deg, rgba(3, 90, 110, 0.35), rgba(3, 90, 110, 0.08));
}

.syllabus-roadmap-node:last-child .syllabus-node-line {
  display: none;
}

.syllabus-foot-v2 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.syllabus-pill-lab,
.syllabus-pill-deliv {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.4;
}

.syllabus-pill-lab {
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.syllabus-pill-deliv {
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

html.dark-theme .course-roadmap-section {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(17, 24, 39, 0.95));
  border-color: rgba(148, 163, 184, 0.16);
}

html.dark-theme .roadmap-card {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.18);
}

html.dark-theme .roadmap-card-title a,
html.dark-theme .roadmap-header-bar h2 {
  color: #f8fafc;
}

html.dark-theme .roadmap-card-outcome,
html.dark-theme .roadmap-subtitle {
  color: #cbd5e1;
}

html.dark-theme .roadmap-topic-tag,
html.dark-theme .roadmap-tool-chip {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

html.dark-theme .roadmap-release-tag {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(96, 165, 250, 0.35);
  color: #93c5fd;
}

html.dark-theme .roadmap-module-tag {
  background: rgba(5, 150, 105, 0.2);
  color: #6ee7b7;
}

html.dark-theme .roadmap-card-foot {
  border-top-color: rgba(148, 163, 184, 0.14);
}

@media (max-width: 640px) {
  .course-roadmap-section {
    padding: 20px 16px;
  }
  .roadmap-node,
  .syllabus-roadmap-node {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
  }
  .roadmap-step-badge,
  .syllabus-node-num {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }
}

/* Dark theme polish for Google Login button */
html.dark-theme .social-auth-btn.btn-google {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

/* ==========================================================================
   V4.7 Refinements:
   - Clean toast border (no left accent stripe)
   - Minimalist articles list readability & article prose readability
   - Clean Home Article cards & Upgraded Roadmap Overview/Module content
   ========================================================================== */
.site-toast-stack .toast-notice {
  border-left: 1px solid #d1fae5 !important;
}
.site-toast-stack .toast-notice.notice-info {
  border-left: 1px solid #bae6fd !important;
}
.site-toast-stack .toast-notice.notice-warning {
  border-left: 1px solid #fde68a !important;
}
.site-toast-stack .toast-notice.notice-error {
  border-left: 1px solid #fecaca !important;
}
html.dark-theme .site-toast-stack .toast-notice {
  border-left: 1px solid rgba(16, 185, 129, 0.32) !important;
}

/* Home Article Cards — Clean Typography-First Polish */
.home-article-card-v2 {
  border-top: 3px solid rgba(3, 90, 110, 0.2);
}
.home-article-card-v2:hover {
  border-top-color: #035a6e;
}
.article-card-top-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.article-kind-pill-home {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(3, 90, 110, 0.09);
  color: #035a6e;
}
html.dark-theme .article-kind-pill-home {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
}
.article-date-mini {
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
  font-weight: 500;
}

/* Restored Articles List — Improved Text Readability (Image 2) */
.editorial-clean-v2 .pub-row-readable {
  padding: 15px 20px;
  transition: background 0.15s ease;
}
.editorial-clean-v2 .pub-row-readable:hover {
  background: rgba(3, 90, 110, 0.035);
}
.editorial-clean-v2 .pub-row-title-readable {
  font-size: 1.03rem !important;
  line-height: 1.5 !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
}
.editorial-clean-v2 .pub-row-title-readable a {
  color: #0f172a;
}
.editorial-clean-v2 .pub-row-title-readable a:hover {
  color: #035a6e;
}
.editorial-clean-v2 .pub-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
}
.pub-row-minread {
  font-size: 0.8rem;
  font-weight: 500;
  color: #64748b;
  white-space: nowrap;
  margin-right: 8px;
}
html.dark-theme .editorial-clean-v2 .pub-row-title-readable a {
  color: #f1f5f9;
}
html.dark-theme .editorial-clean-v2 .pub-row-title-readable a:hover {
  color: #38bdf8;
}
html.dark-theme .editorial-clean-v2 .pub-row-readable:hover {
  background: rgba(56, 189, 248, 0.06);
}

/* Single Article Prose Readability */
.article-detail-v2 .article-prose {
  font-size: 1.05rem;
  line-height: 1.78;
  color: #1e293b;
}
.article-detail-v2 .article-prose p {
  margin-bottom: 1.15em;
}
.article-detail-v2 .article-prose h2 {
  margin-top: 2em;
  margin-bottom: 0.65em;
  line-height: 1.3;
}
html.dark-theme .article-detail-v2 .article-prose {
  color: #e2e8f0;
}

/* Upcoming Course Roadmap — Structured Overview Grid & Content Section (Image 4) */
.upcoming-meta-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.roadmap-access-tag {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 650;
  background: rgba(3, 90, 110, 0.08);
  color: #035a6e;
}
.upcoming-overview-grid-v2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 30px;
}
.overview-card-v2 {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 13px;
  padding: 15px 17px;
}
.overview-card-v2.is-full {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(3, 90, 110, 0.045), rgba(2, 132, 199, 0.035));
  border-color: rgba(3, 90, 110, 0.2);
}
.overview-card-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #035a6e;
  margin-bottom: 5px;
}
.overview-card-v2 p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-body, #334155);
}
.syllabus-lessons-block {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border, #f1f5f9);
}
.syllabus-sub-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 6px;
}
.syllabus-foot-v2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.syllabus-pill-lab,
.syllabus-pill-deliv {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.83rem;
  line-height: 1.45;
}
.pill-kicker {
  font-size: 0.69rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #035a6e;
}
.syllabus-pill-deliv .pill-kicker {
  color: #047857;
}
html.dark-theme .overview-card-v2 {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.18);
}
html.dark-theme .overview-card-v2 p {
  color: #cbd5e1;
}
html.dark-theme .overview-card-label,
html.dark-theme .roadmap-access-tag,
html.dark-theme .pill-kicker {
  color: #38bdf8;
}
@media (max-width: 680px) {
  .upcoming-overview-grid-v2 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   V4.8 Light-Mode YouTube Section (Image 2) & Academic Article List
   ========================================================================== */
.channel-spotlight-light {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 28px 34px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
.channel-light-text {
  max-width: 600px;
}
.channel-light-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.22);
  color: #dc2626;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.channel-light-title {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 750;
  color: #0f172a;
  letter-spacing: -0.015em;
}
.channel-light-desc {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: #475569;
}
.channel-light-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.channel-light-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  background: #ef4444;
  color: #ffffff !important;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
  transition: background 0.16s ease, transform 0.16s ease;
}
.channel-light-btn-primary:hover {
  background: #dc2626;
  transform: translateY(-1px);
}
.channel-light-btn-secondary {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  padding: 4px 8px;
}
.channel-light-btn-secondary:hover {
  color: #035a6e;
  text-decoration: underline;
}
html.dark-theme .channel-spotlight-light {
  background: #111827;
  border-color: rgba(148, 163, 184, 0.18);
}
html.dark-theme .channel-light-title {
  color: #f8fafc;
}
html.dark-theme .channel-light-desc,
html.dark-theme .channel-light-btn-secondary {
  color: #cbd5e1;
}
@media (max-width: 720px) {
  .channel-spotlight-light {
    padding: 22px 20px;
  }
  .channel-light-actions {
    width: 100%;
    align-items: stretch;
  }
  .channel-light-btn-secondary {
    text-align: center;
  }
}

/* Standard Academic Article List & Mobile Responsiveness */
.editorial-clean-v2 {
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 16px 76px;
}
.editorial-clean-v2 .pub-row-academic {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
}
.editorial-clean-v2 .pub-row-index {
  flex-shrink: 0;
  min-width: 28px;
  padding-top: 2px;
}
.editorial-clean-v2 .pub-num {
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
  font-weight: 700;
  color: #64748b;
}
.editorial-clean-v2 .pub-row-main {
  flex: 1;
  min-width: 0;
}
.editorial-clean-v2 .pub-row-title-academic {
  margin: 0;
  font-size: 1.02rem !important;
  line-height: 1.48 !important;
  font-weight: 600 !important;
  overflow-wrap: anywhere;
}
.editorial-clean-v2 .pub-row-title-academic a {
  color: #0f172a;
  text-decoration: none;
}
.editorial-clean-v2 .pub-row-title-academic a:hover {
  color: #035a6e;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.track-expand-footer {
  padding: 12px 18px 16px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: center;
}
.track-expand-btn {
  appearance: none;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #035a6e;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.track-expand-btn:hover {
  background: #f0fdfa;
  border-color: #035a6e;
}
html.dark-theme .editorial-clean-v2 .pub-row-title-academic a {
  color: #f1f5f9;
}
html.dark-theme .editorial-clean-v2 .pub-row-title-academic a:hover {
  color: #38bdf8;
}
html.dark-theme .track-expand-footer {
  border-top-color: rgba(148, 163, 184, 0.14);
}
html.dark-theme .track-expand-btn {
  background: #1e293b;
  border-color: rgba(148, 163, 184, 0.25);
  color: #38bdf8;
}
@media (max-width: 640px) {
  .editorial-clean-v2 {
    padding: 16px 12px 56px;
  }
  .editorial-clean-v2 .pub-row-academic {
    padding: 12px 12px;
    gap: 10px;
  }
  .editorial-clean-v2 .pub-row-title-academic {
    font-size: 0.94rem !important;
    line-height: 1.44 !important;
  }
  .editorial-clean-v2 .track-header-bar {
    padding: 12px 14px;
  }
}
