/**
 * GAPAT Vault — shared theme aligned with gapat.net marketing site
 * Dark background · pink/purple accents · glassmorphism cards
 * Used by portal-squarespace/*.html and course pages
 */

:root {
  /* Brand gradients — pink → purple (matches marketing site) */
  --primary-gradient: linear-gradient(135deg, #ec4899 0%, #d946ef 45%, #a855f7 100%);
  --primary-gradient-subtle: linear-gradient(135deg, rgba(236, 72, 153, 0.25) 0%, rgba(168, 85, 247, 0.2) 100%);

  --accent-pink: #ec4899;
  --accent-magenta: #d946ef;
  --accent-purple: #a855f7;
  --accent-color: #d946ef;
  --accent-dark: #a21caf;
  --accent-light: #f472b6;
  --accent-purple-light: #c4b5fd;

  /* Gold / flagship (marketing site mentorship tier) */
  --accent-gold: #daa520;
  --accent-gold-light: #f5c842;
  --accent-gold-dark: #b8860b;
  --gold-gradient: linear-gradient(135deg, #b8860b 0%, #daa520 50%, #f5c842 100%);

  /* Typography */
  --font-display: 'Space Grotesk', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  /* gapat-site marketing tokens (purple-led) */
  --purple: #8b5cf6;
  --purple-light: #a78bfa;
  --pink: #ec4899;
  --pink-light: #f472b6;
  --site-bg-primary: #08080f;
  --site-bg-card: #14142a;
  --site-bg-card-hover: #1a1a2e;
  --site-border: rgba(139, 92, 246, 0.2);
  --site-border-hover: rgba(139, 92, 246, 0.5);
  --text-muted: #6b7280;

  /* Surfaces — dark */
  --bg-primary: #08080f;
  --bg-elevated: #0f0d1a;
  --bg-card: #14142a;
  --bg-card-hover: #1a1a2e;
  --bg-card-solid: #14121f;

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-dim: #64748b;

  /* Borders & glass */
  --border-color: rgba(236, 72, 153, 0.2);
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-strong: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-accent: rgba(236, 72, 153, 0.35);
  --glass-blur: 16px;
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);

  --success-color: #22c55e;
  --accent-green: #22c55e;
  --accent-green-light: #4ade80;
  --accent-green-muted: #86efac;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 40px rgba(236, 72, 153, 0.15);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Ambient background — purple-led (gapat-site hero-radial-bg palette) */
html,
body {
  margin: 0;
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(88, 28, 135, 0.22) 0%, transparent 65%),
    radial-gradient(ellipse 50% 45% at 85% 15%, rgba(236, 72, 153, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 15% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
}

.loading-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: vault-spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes vault-spin {
  to { transform: rotate(360deg); }
}

.font-display {
  font-family: var(--font-display);
}

/* Ported from gapat-site globals.css */
.gradient-text {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-gold {
  background: linear-gradient(135deg, #fde68a, #fbbf24, #fcd34d, #f59e0b, #fbbf24, #fde68a);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gold-shimmer 4s ease-in-out infinite;
}

.gradient-text-green {
  background: linear-gradient(135deg, #22c55e, #4ade80, #86efac, #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-border {
  position: relative;
  border-radius: 1rem;
  background: var(--bg-card);
  transition: box-shadow 0.35s ease, background-color 0.35s ease;
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.12),
    0 8px 40px rgba(139, 92, 246, 0.14),
    0 0 80px rgba(236, 72, 153, 0.08);
}

.gradient-border::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(236, 72, 153, 0.5));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  pointer-events: none;
  z-index: 0;
}

.gradient-border > * {
  position: relative;
  z-index: 1;
}

.gradient-border:hover {
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.22),
    0 12px 48px rgba(139, 92, 246, 0.22),
    0 0 100px rgba(236, 72, 153, 0.12);
}

.gradient-border:hover::before {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(236, 72, 153, 0.9));
}

.glow-purple {
  box-shadow: 0 0 60px rgba(139, 92, 246, 0.15), 0 0 120px rgba(236, 72, 153, 0.08);
}

.hero-radial-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 48%, rgba(88, 28, 135, 0.3) 0%, rgba(88, 28, 135, 0.1) 40%, transparent 70%),
    radial-gradient(ellipse 50% 45% at 75% 55%, rgba(236, 72, 153, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 80% 80% at 50% 50%, rgba(30, 15, 60, 0.35) 0%, transparent 70%);
}

.glass {
  background: rgba(18, 18, 31, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@keyframes gold-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes gold-sweep {
  0% { left: -100%; }
  100% { left: 120%; }
}

/* Glass panel utility — course pages only (portal cards use gradient-border) */
.summary-section,
.guide-card {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--glass-shadow);
}

/* Course player sidebar */
.sidebar {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-right: 1px solid var(--glass-border) !important;
}

.section-item:hover {
  background: rgba(236, 72, 153, 0.1) !important;
  border-left-color: var(--accent-pink) !important;
}

.section-item.active {
  background: rgba(168, 85, 247, 0.15) !important;
  border-left-color: var(--accent-purple) !important;
}

.section-number {
  background: rgba(236, 72, 153, 0.2) !important;
  color: var(--accent-light) !important;
}

.nav-btn.prev:hover {
  background: rgba(236, 72, 153, 0.12) !important;
  border-color: var(--accent-pink) !important;
}

/* Hero CTA glow — pink/purple */
.hero-cta {
  background: var(--primary-gradient) !important;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.35) !important;
}

.hero-cta:hover {
  box-shadow: 0 8px 28px rgba(168, 85, 247, 0.45) !important;
}

/* Subsection nav on dark */
.subsection-nav a:hover {
  color: var(--accent-light) !important;
  background: rgba(236, 72, 153, 0.12) !important;
}

/* GAPAT course player (online-blueprint, the-blueprint, gapat-economics) */
#gapat-header {
  background: var(--primary-gradient) !important;
}

#gapat-sidebar,
.gapat-sidebar,
.lesson-panel,
.content-panel {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-color: var(--glass-border) !important;
  color: var(--text-primary) !important;
}

.summary-content .summary-card {
  background: var(--glass-bg) !important;
  border-color: var(--glass-border) !important;
  color: var(--text-primary) !important;
}

/* Eyebrow label (marketing site style) */
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--purple-light);
  margin-bottom: 0.75rem;
}

/* Floating glass nav pill — segmented with sliding indicator */
.glass-pill {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: auto;
  max-width: none;
  padding: 0.375rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.glass-pill--segmented {
  position: relative;
}

.glass-pill-slider {
  position: absolute;
  top: 0.375rem;
  bottom: 0.375rem;
  left: 0;
  width: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 4px 16px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transition:
    transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.18s ease;
  pointer-events: none;
  z-index: 0;
}

/* Revealed only after the highlight has been measured post font-load, so it
   never flashes at the wrong (pre-font) width/position on page entry. */
.glass-pill-slider.is-ready {
  opacity: 1;
}

.glass-pill--segmented button,
.glass-pill--segmented a {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  font-family: inherit;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  transition: color 0.25s ease;
  white-space: nowrap;
  cursor: pointer;
}

.glass-pill--segmented button:hover:not(.active),
.glass-pill--segmented a:hover:not(.active) {
  color: #fff;
}

.glass-pill--segmented button.active,
.glass-pill--segmented a.active {
  color: #fff;
}

.glass-pill a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 0.9rem;
  border-radius: 9999px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.glass-pill:not(.glass-pill--segmented) a:hover,
.glass-pill:not(.glass-pill--segmented) a.active {
  color: #fff;
  background: rgba(139, 92, 246, 0.2);
}

/* Vault page shell — shared top bar (portal + session pages) */
.vault-page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  pointer-events: none;
}

.vault-page-header > * {
  pointer-events: auto;
}

body > .top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.top-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 2rem;
  pointer-events: none;
}

.top-bar-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  justify-self: start;
}

.top-bar > * {
  pointer-events: auto;
}

.top-bar-logo img {
  display: block;
  height: 44px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.top-bar .glass-pill {
  width: auto;
  max-width: min(560px, calc(100vw - 280px));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  justify-self: center;
}

.top-bar #mainNav {
  justify-self: center;
}

.top-bar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
  min-width: 44px;
  justify-self: end;
}

.top-bar-right a {
  text-decoration: none !important;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.85rem 0.35rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 9999px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: #fff;
}

.user-name {
  font-weight: 500;
  font-size: 0.9rem;
  color: #fff;
}

.submissions-header-link {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: background 0.2s;
}

.submissions-header-link:hover {
  background: rgba(255, 255, 255, 0.18);
}

.logout-btn {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: #fff;
  padding: 0.5rem 1.1rem;
  border-radius: 9999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
}

.account-menu {
  position: relative;
}

.account-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.85rem 0.35rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 9999px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  color: #fff;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.account-menu__trigger:hover,
.account-menu.is-open .account-menu__trigger {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
}

.account-menu__caret {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.55);
  transition: transform 0.2s ease;
}

.account-menu.is-open .account-menu__caret {
  transform: rotate(180deg);
}

.account-menu__dropdown {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 100%;
  width: max-content;
  padding: 0.375rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  z-index: 120;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transform-origin: top center;
  transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.24s;
}

.account-menu.is-open .account-menu__dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.account-menu__item {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s ease;
}

.account-menu__item:hover {
  background: rgba(255, 255, 255, 0.16);
}

.account-menu__item--logout {
  color: #fff;
}

.edu-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 7.5rem 2rem 4rem;
  min-height: 100vh;
}

.edu-section {
  margin-bottom: 3rem;
}

.edu-section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
}

.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.analysis-header {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: min(72vh, 620px);
  display: flex;
  align-items: flex-end;
}

.analysis-header-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.analysis-header-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: brightness(1.1);
  transform: scale(1.06);
  transform-origin: center center;
}

.analysis-header-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to right, rgba(8, 8, 15, 0.65) 0%, rgba(8, 8, 15, 0.22) 9%, transparent 16%, transparent 84%, rgba(8, 8, 15, 0.22) 91%, rgba(8, 8, 15, 0.65) 100%),
    linear-gradient(to right, rgba(8, 8, 15, 0.92) 0%, rgba(8, 8, 15, 0.72) 40%, rgba(8, 8, 15, 0.3) 68%, transparent 100%),
    linear-gradient(to top, #08080f 0%, #08080f 8%, rgba(8, 8, 15, 0.88) 16%, rgba(8, 8, 15, 0.55) 28%, rgba(8, 8, 15, 0.22) 40%, rgba(8, 8, 15, 0.06) 52%, transparent 68%);
}

.analysis-header-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 760px;
  padding: 3rem 2rem 3.5rem clamp(2rem, 4vw, 3.5rem);
}

.analysis-header-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.05;
  margin: 0.5rem 0 0.75rem;
  color: #fff;
}

.analysis-header-desc {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 520px;
  line-height: 1.6;
  margin: 0;
}

#panel-analysis > .main-content {
  position: relative;
  margin-top: -3rem;
  padding-top: 3rem;
  background:
    linear-gradient(
      to bottom,
      #08080f 0,
      #08080f 140px,
      rgba(8, 8, 15, 0.98) 220px,
      rgba(8, 8, 15, 0.92) 320px,
      rgba(8, 8, 15, 0.75) 460px,
      transparent 640px
    );
}

#panel-analysis > .main-content .section-block {
  position: relative;
  z-index: 1;
}

.session-subbar {
  display: none;
}

.session-section-top {
  margin-bottom: 1.25rem;
}

.session-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 7.5rem 2rem 4rem;
  min-height: 100vh;
}

.session-back-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1.15rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.session-back-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}

.session-back {
  display: none;
}

@media (max-width: 768px) {
  .top-bar {
    padding: 0.85rem 1rem;
    gap: 0.5rem;
  }

  .top-bar-logo img {
    height: 36px;
  }

  .top-bar .glass-pill {
    max-width: calc(100vw - 130px);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .top-bar .glass-pill::-webkit-scrollbar {
    display: none;
  }

  .glass-pill--segmented button,
  .glass-pill--segmented a {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }

  .user-name {
    display: none;
  }

  .session-subbar {
    padding: 0 1rem 0.85rem;
  }
}

/* Vault tab panels */
.vault-panel[hidden] {
  display: none !important;
}

.vault-panel {
  animation: vaultPanelIn 0.35s ease;
}

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

.analysis-subsection + .analysis-subsection {
  margin-top: 2.5rem;
}

#panel-analysis .section-heading {
  text-align: center;
  margin-bottom: 1.75rem;
}

#panel-analysis .section-heading h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Green accent — free training / community (gapat.net) */
.eyebrow-green {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 9999px;
  border: 1px solid rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.1);
  padding: 0.35rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #86efac;
}

.eyebrow-green::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
}

.card-tag--green {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.card-glow--green {
  background: radial-gradient(circle at 50% 0%, rgba(34, 197, 94, 0.18), transparent 70%);
}

.green-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.5), rgba(22, 163, 74, 0.35));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-decoration: none;
  transition: all 0.25s ease;
}

.green-btn:hover {
  border-color: rgba(74, 222, 128, 0.55);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.65), rgba(22, 163, 74, 0.5));
  transform: translateY(-1px);
}

.community-hero {
  position: relative;
  overflow: hidden;
  max-width: 920px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  border-radius: 1.5rem;
}

.community-hero-glow {
  pointer-events: none;
  position: absolute;
  inset: 0;
}

.community-hero-glow::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 280px;
  height: 280px;
  transform: translate(30%, -35%);
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.12);
  filter: blur(70px);
}

.community-hero-glow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 220px;
  height: 220px;
  transform: translate(-25%, 30%);
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.08);
  filter: blur(60px);
}

.community-hero-content {
  position: relative;
  z-index: 1;
}

.community-hero h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0.75rem 0 1rem;
}

.community-hero-desc {
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 1.25rem;
  line-height: 1.65;
}

.community-perks {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.community-perks li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.community-perks li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 0.45rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #22c55e, #4ade80);
}

.software-hub {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem;
  text-align: center;
}

.software-hub h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 0.75rem 0 1rem;
}

.software-hub-desc {
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  line-height: 1.65;
}

/* Card action pills — matches top nav glass style */
.resource-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.1rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.resource-pill-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.resource-pill-btn--green {
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.resource-pill-btn--green:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(74, 222, 128, 0.45);
  color: #bbf7d0;
}

/* Chart Academy category pills */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  padding: 0 2rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: rgba(139, 92, 246, 0.08);
  color: var(--purple-light);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.category-pill:hover,
.category-pill.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.45);
  color: #fff;
}

/* Horizontal Netflix-style rails */
.rail {
  position: relative;
  margin-bottom: 0.5rem;
}

.rail-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.75rem 2rem 1.25rem 0.5rem;
}

.rail-track::-webkit-scrollbar {
  display: none;
}

.rail-track > * {
  scroll-snap-align: start;
  flex: 0 0 auto;
}

.rail-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(7, 6, 15, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
  opacity: 0;
  pointer-events: none;
}

.rail:hover .rail-arrow {
  opacity: 1;
  pointer-events: auto;
}

.rail-arrow:hover {
  background: rgba(139, 92, 246, 0.45);
  border-color: rgba(139, 92, 246, 0.6);
}

.rail-arrow--prev {
  left: -0.5rem;
}

.rail-arrow--next {
  right: -0.5rem;
}

.rail-arrow:disabled {
  opacity: 0 !important;
  pointer-events: none;
}

/* Analysis rows — arrows in header (Chart Academy / Netflix style) */
.rail--header-nav {
  margin-bottom: 0;
}

.analysis-rail-wrap {
  position: relative;
}

#panel-analysis .analysis-rail-wrap::before {
  content: "";
  position: absolute;
  left: -60px;
  right: -40px;
  top: -10px;
  bottom: -10px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 75% at 35% 50%, rgba(139, 92, 246, 0.16) 0%, transparent 70%),
    radial-gradient(55% 70% at 75% 50%, rgba(236, 72, 153, 0.12) 0%, transparent 72%);
  filter: blur(6px);
}

#panel-analysis .analysis-rail-wrap .rail {
  position: relative;
  z-index: 1;
}

.analysis-rail-wrap::after {
  content: "";
  position: absolute;
  top: 0.75rem;
  bottom: 1.25rem;
  right: 0;
  width: 56px;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
  background: linear-gradient(to left, rgba(8, 8, 15, 0.95) 0%, rgba(8, 8, 15, 0.55) 45%, transparent 100%);
}

.analysis-rail-wrap.rail-fade-right::after {
  opacity: 1;
}

.rail--header-nav .rail-track {
  padding-right: 0.5rem;
}

.rail-arrow--header {
  position: static;
  transform: none;
  opacity: 1;
  pointer-events: auto;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
  flex-shrink: 0;
}

.rail-arrow--header:hover:not(:disabled) {
  background: rgba(139, 92, 246, 0.35);
  border-color: rgba(139, 92, 246, 0.55);
}

.rail-arrow--header:disabled {
  opacity: 0.35 !important;
  pointer-events: none;
}

/* Apple-style glass buttons */
.gradient-btn,
.outline-btn,
.gold-btn,
.course-action {
  text-decoration: none;
}

.gradient-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.28);
  cursor: pointer;
  border-radius: 9999px;
  transition: all 0.25s ease;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.45), rgba(236, 72, 153, 0.35));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.gradient-btn:hover {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.55), rgba(219, 39, 119, 0.45));
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow:
    0 8px 32px rgba(139, 92, 246, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.outline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 600;
  border-radius: 9999px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: all 0.25s ease;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.outline-btn:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
}

.gold-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  border-radius: 9999px;
  background: linear-gradient(135deg, #b8860b, #d4a017, #c4960e, #b8860b);
  background-size: 200% 200%;
  animation: gold-shimmer 4s ease-in-out infinite;
  transition: all 0.3s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 8px rgba(255, 240, 180, 0.3);
  border-top: 1px solid rgba(255, 220, 120, 0.5);
  border-bottom: 1px solid rgba(90, 55, 5, 0.7);
  border-left: 1px solid rgba(200, 160, 50, 0.3);
  border-right: 1px solid rgba(200, 160, 50, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 140, 0.3),
    inset 0 -1px 2px rgba(0, 0, 0, 0.2),
    0 4px 20px rgba(218, 165, 32, 0.4),
    0 0 40px rgba(245, 200, 66, 0.15);
}

.gold-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255, 240, 180, 0.35) 45%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 240, 180, 0.35) 55%,
    transparent 80%
  );
  animation: gold-sweep 3.5s ease-in-out infinite alternate;
  pointer-events: none;
}

.gold-btn:hover {
  background: linear-gradient(135deg, #c4960e, #daa520, #d4a017, #c4960e);
  background-size: 200% 200%;
  border-top-color: rgba(255, 230, 140, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 140, 0.4),
    inset 0 -1px 2px rgba(0, 0, 0, 0.25),
    0 6px 28px rgba(218, 165, 32, 0.55),
    0 0 56px rgba(245, 200, 66, 0.25);
}

.gold-btn:focus-visible {
  outline: 2px solid #daa520;
  outline-offset: 3px;
}

/* Section title underline — Features.tsx */
.section-heading {
  text-align: left;
  margin-bottom: 1.25rem;
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--text-primary);
}

.section-heading-underline {
  margin-top: 0.65rem;
  height: 4px;
  width: 96px;
  border-radius: 9999px;
  background: linear-gradient(to right, #8b5cf6, #ec4899);
}

/* Course card variants — ProductPathCard */
.card-glow {
  position: absolute;
  pointer-events: none;
  right: -4rem;
  top: -4rem;
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  transition: opacity 0.3s;
}

.course-card:hover .card-glow {
  opacity: 0.85;
}

.card-glow--purple { background: rgba(139, 92, 246, 0.15); }
.card-glow--pink { background: rgba(236, 72, 153, 0.15); }
.card-glow--gold { background: rgba(218, 165, 32, 0.15); }

.card-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple-light);
}

.card-tag--gold {
  color: var(--accent-gold);
}

.course-card--standard {
  background: rgba(18, 18, 31, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.course-card--standard:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.course-card--flagship {
  border: 1px solid rgba(218, 165, 32, 0.4);
  background: linear-gradient(to bottom, rgba(218, 165, 32, 0.12), var(--bg-card) 45%, transparent);
  box-shadow: 0 0 60px rgba(218, 165, 32, 0.14);
}

.course-card--flagship:hover {
  border-color: rgba(218, 165, 32, 0.7);
}

@media (max-width: 768px) {
  .rail:not(.rail--header-nav) .rail-arrow {
    display: none;
  }

  .rail-track {
    scroll-padding-left: 1rem;
  }

  .analysis-rail-controls {
    gap: 0.35rem;
  }

  .rail-arrow--header {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }
}

/* Analysis empty / loading states */
.analysis-empty {
  color: var(--text-secondary);
  padding: 1.5rem 0;
  line-height: 1.65;
}

.analysis-empty a {
  color: var(--purple-light);
}

.analysis-card-subtitle {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.analysis-play-hover {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  z-index: 3;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.22s ease, transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
  pointer-events: none;
}

.analysis-play-hover svg {
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  fill: #fff;
  display: block;
}

.analysis-video-card:hover .analysis-play-hover {
  opacity: 1;
  transform: scale(1);
  background: rgba(0, 0, 0, 0.78);
  border-color: rgba(255, 255, 255, 0.32);
}

.poster-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
}

.poster-title-overlay--analysis {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  padding: 1rem 0.85rem 0.9rem;
}

.analysis-card-title {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
  margin: 0;
  text-align: center;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.65);
}

.analysis-video-card:hover {
  transform: none;
}

.analysis-video-card .poster-thumb {
  height: 180px;
  position: relative;
  overflow: hidden;
}

.analysis-video-card .poster-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: transform 0.45s ease;
}

.analysis-video-card:hover .poster-thumb-img:not(.poster-thumb-img--missing) {
  transform: scale(1.08);
}

.poster-thumb--placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 30% 35%, rgba(139, 92, 246, 0.35) 0%, transparent 55%),
    radial-gradient(circle at 70% 65%, rgba(236, 72, 153, 0.25) 0%, transparent 50%),
    linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(236, 72, 153, 0.12));
}

.poster-thumb-img--missing {
  display: none;
}

.analysis-video-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.analysis-video-card .poster-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 6, 15, 0.92) 0%, rgba(7, 6, 15, 0.2) 45%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.analysis-play-badge {
  display: none;
}

/* Session page */
.session-view-header {
  margin-bottom: 1.5rem;
}

.session-view-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin: 0.5rem 0 0.75rem;
  line-height: 1.15;
}

.session-view-date {
  display: block;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.session-video-wrap {
  position: relative;
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.session-video {
  display: block;
  width: 100%;
  max-height: min(72vh, 820px);
  background: #000;
}

.session-youtube-wrap {
  aspect-ratio: 16 / 9;
}

.session-youtube-wrap .post-youtube {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.session-thumb-hero {
  margin: 0;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.session-thumb-hero img {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}

.session-body {
  margin-top: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.session-section-header {
  margin-bottom: 2rem;
}

.session-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin: 0.5rem 0 0.5rem;
  color: #fff;
}

.session-section-meta {
  color: var(--text-secondary);
}

/* Analysis session cards — shared by portal rails + session section grid */
.resource-card.poster-card.analysis-video-card {
  width: 320px;
  max-width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  padding: 0;
  transition: box-shadow 0.3s ease;
}

.resource-card.poster-card.analysis-video-card.gradient-border {
  padding: 0;
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.08);
}

/* Softer, richer border highlight for Analysis video cards —
   multi-stop gradient with transparent breaks so the outline reads as a
   soft glow rather than a rigid uniform line */
.analysis-video-card.gradient-border::before {
  padding: 1.5px;
  background: linear-gradient(
    140deg,
    rgba(139, 92, 246, 0.85) 0%,
    rgba(168, 85, 247, 0.4) 25%,
    rgba(168, 85, 247, 0.25) 45%,
    rgba(217, 70, 239, 0.4) 68%,
    rgba(236, 72, 153, 0.88) 100%
  );
}

.analysis-video-card.gradient-border:hover::before {
  background: linear-gradient(
    140deg,
    rgba(139, 92, 246, 1) 0%,
    rgba(168, 85, 247, 0.6) 25%,
    rgba(168, 85, 247, 0.45) 45%,
    rgba(217, 70, 239, 0.65) 68%,
    rgba(236, 72, 153, 1) 100%
  );
}

.session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 320px);
  gap: 1.5rem;
  justify-content: start;
  align-content: start;
}

.session-grid .analysis-video-card {
  width: 320px;
  max-width: 100%;
}

@media (max-width: 720px) {
  .session-grid {
    grid-template-columns: 1fr;
  }

  .session-grid .analysis-video-card {
    width: 100%;
  }
}

/* Software tab — version cards */
.version-card {
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  background: rgba(18, 18, 31, 0.85);
}

.version-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.version-label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.version-date {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

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

.version-download-btn {
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
  text-decoration: none;
}

.version-notes-toggle {
  padding: 0.55rem 1rem;
  font-size: 0.8125rem;
  cursor: pointer;
}

.version-notes {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.version-notes-pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-secondary);
  overflow-x: auto;
}

.software-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.software-video-card {
  width: 100%;
}

.software-video-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

/* YouTube modal (software tutorials) */
.yt-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.yt-modal.hidden {
  display: none;
}

.yt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 3, 12, 0.82);
  backdrop-filter: blur(8px);
}

.yt-modal-dialog {
  position: relative;
  width: min(960px, 100%);
  z-index: 1;
}

.yt-modal-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.yt-modal-player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #000;
}

.yt-modal-player-wrap .post-youtube {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

body.yt-modal-open {
  overflow: hidden;
}

/* Education poster cards (courses + guides rails) */
.course-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.course-badge-lock {
  width: 1.35em;
  height: 1.35em;
  flex-shrink: 0;
}

.course-badge.unlocked {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.course-badge.locked {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
}

/* Price shown bottom-left on locked course posters */
.course-poster-price {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  z-index: 2;
  padding: 0.35rem 0.7rem;
  border-radius: 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Ready-to-watch button (Start now / Resume) on accessible course posters */
.course-poster-play {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.85rem 0.3rem 0.3rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.22s ease, transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.course-poster-play-icon {
  width: 1.6rem;
  height: 1.6rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.course-poster-play-icon svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: #fff;
  display: block;
}

.course-poster-card:hover .course-poster-play,
.course-poster-card:focus-within .course-poster-play {
  opacity: 1;
  transform: translateY(0);
}

.course-poster-play:hover {
  background: rgba(0, 0, 0, 0.82);
  border-color: rgba(255, 255, 255, 0.34);
}

/* Touch devices have no hover — keep the watch button visible */
@media (hover: none) {
  .course-poster-play {
    opacity: 1;
    transform: none;
  }
}

.course-poster-card {
  display: block;
  width: 360px;
  flex: 0 0 360px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.28s ease;
}

.course-poster-card:hover {
  transform: translateY(-4px);
}

.course-poster-thumb {
  position: relative;
  height: 208px;
  border-radius: 1rem;
  overflow: hidden;
  background: #14142a;
}

.course-poster-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 8, 15, 0.88) 0%, rgba(8, 8, 15, 0.2) 42%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.course-poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.course-poster-card:hover .course-poster-img {
  transform: scale(1.04);
}

.course-poster-thumb .course-badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
}

.course-poster-meta-badge {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 2;
  padding: 0.35rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.course-poster-meta-badge--green {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
}

.course-poster-title {
  margin: 0.85rem 0 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
}

.course-poster-desc {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-poster-card--locked {
  opacity: 0.95;
}

@media (hover: hover) {
  .course-poster-card--locked .course-badge.locked,
  .course-poster-card--locked .course-poster-price {
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.22s ease, transform 0.22s ease;
  }

  .course-poster-card--locked:hover .course-badge.locked,
  .course-poster-card--locked:hover .course-poster-price,
  .course-poster-card--locked:focus-within .course-badge.locked,
  .course-poster-card--locked:focus-within .course-poster-price {
    opacity: 1;
    transform: translateY(0);
  }
}

.course-poster-card--guide {
  width: 260px;
  flex: 0 0 260px;
}

.course-poster-card--guide .course-poster-thumb {
  height: auto;
  aspect-ratio: 1 / 1;
  background: #14142a;
}

.course-poster-card--guide .course-poster-thumb::after {
  background: linear-gradient(
    to top,
    rgba(8, 8, 15, 0.72) 0%,
    rgba(8, 8, 15, 0.18) 22%,
    transparent 45%
  );
}

.course-poster-card--guide .course-poster-img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
}

.course-poster-card--guide:hover .course-poster-img {
  transform: scale(1.04);
  transform-origin: center;
}

/* Red progress line on home Education cards */
.course-poster-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  z-index: 4;
  pointer-events: none;
}

.course-poster-progress-fill {
  display: block;
  height: 100%;
  background: #ef4444;
  border-radius: 0 2px 2px 0;
  transition: width 0.35s ease;
}

/* Popular section — large purple rank numbers behind cards */
.rail[data-rail="popular"] .rail-track {
  gap: 2.25rem;
  padding-left: 0.5rem;
}

.course-popular-item {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  padding-left: 3.75rem;
}

.course-popular-rank {
  position: absolute;
  left: 0;
  bottom: 2.75rem;
  z-index: 0;
  font-family: var(--font-display);
  font-size: clamp(6rem, 12vw, 10rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.85) 0%, rgba(139, 92, 246, 0.3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(139, 92, 246, 0.35);
  pointer-events: none;
  user-select: none;
}

.course-popular-card-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Coming Soon placeholders — non-clickable, match poster card size */
.course-coming-soon-card {
  display: block;
  width: 360px;
  flex: 0 0 360px;
  cursor: default;
  pointer-events: none;
  opacity: 0.95;
}

.course-coming-soon-thumb {
  position: relative;
  height: 208px;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #14142a;
}

.course-coming-soon-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 8, 15, 0.55) 0%, rgba(8, 8, 15, 0.1) 50%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.course-coming-soon-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  background: rgba(250, 204, 21, 0.92);
  color: #1a1a1a;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.course-coming-soon-center-title {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 1.5rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

/* Course detail / sales page */
.course-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 7.5rem 2rem 4rem;
  min-height: 100vh;
}

.course-detail-top {
  margin-bottom: 1.5rem;
}

.course-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.course-detail-back:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.course-detail-heading {
  margin: 0 0 1.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.course-detail-hero {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  min-height: 360px;
  margin-bottom: 2.5rem;
  background: #14142a;
}

.course-detail-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(8, 8, 15, 0.92) 0%, rgba(8, 8, 15, 0.55) 45%, rgba(8, 8, 15, 0.15) 100%),
    linear-gradient(to top, rgba(8, 8, 15, 0.75) 0%, transparent 55%);
  z-index: 1;
}

.course-detail-hero-content {
  position: relative;
  z-index: 2;
  max-width: 520px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 360px;
}

.course-detail-hero-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple-light);
}

.course-detail-hero-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
}

.course-detail-hero-desc {
  margin: 0 0 1.25rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
  font-size: 0.95rem;
}

.course-detail-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.course-detail-start-btn {
  min-height: 58px;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.course-detail-start-btn:hover {
  transform: translateY(-1px);
}

.course-detail-start-btn svg {
  width: 1.15rem;
  height: 1.15rem;
}

/* Larger Get Access CTA on the course detail hero */
.course-detail-hero-actions .gradient-btn,
.course-detail-hero-actions .gold-btn {
  min-height: 58px;
  padding: 1rem 2.75rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 9999px;
}

.course-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 2rem;
  align-items: start;
}

.course-detail-lessons-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.course-detail-lesson-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.course-detail-lesson {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 1rem;
  padding: 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.course-detail-lesson-thumb {
  width: 88px;
  height: 56px;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #1a1a2e;
}

.course-detail-lesson-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-detail-lesson-thumb--empty {
  background: linear-gradient(135deg, #14142a 0%, #1f1f35 100%);
}

.course-detail-lesson-body {
  min-width: 0;
}

.course-detail-lesson-number {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--purple-light);
}

.course-detail-lesson-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.course-detail-lesson-desc {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.course-detail-panel {
  padding: 1.35rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.course-detail-panel h3 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.course-detail-panel-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.course-detail-panel-badges .meta-chip {
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.78);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.course-detail-panel p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 0.92rem;
}

.course-detail-objectives {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.course-detail-objectives li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}

.course-detail-objectives li::before {
  content: "\2713";
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.course-detail-resources {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.course-detail-resource-group {
  margin-bottom: 1.25rem;
}

.course-detail-resource-group:last-child {
  margin-bottom: 0;
}

.course-detail-resource-group-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.course-detail-resource-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-secondary);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.course-detail-resource-row a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  color: var(--text-primary);
  text-decoration: none;
}

.course-detail-resource-row:hover {
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.08);
}

.course-detail-resource-row.is-locked {
  opacity: 0.65;
}

.course-detail-resource-icon {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.45rem;
  background: rgba(236, 72, 153, 0.12);
  color: var(--accent-light);
  font-size: 0.85rem;
  font-weight: 700;
}

.course-detail-resources li {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.course-detail-resources a {
  color: #c4b5fd;
  text-decoration: none;
}

.course-detail-resources a:hover {
  color: #ddd6fe;
  text-decoration: none;
}

.course-detail-resources-note {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

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

  .course-detail-hero-content {
    padding: 1.75rem;
    min-height: 320px;
  }

  .course-poster-card {
    width: 300px;
    flex-basis: 300px;
  }

  .course-poster-thumb {
    height: 174px;
  }

  .course-poster-card--guide {
    width: 220px;
    flex-basis: 220px;
  }
}

@media (max-width: 768px) {
  .course-page {
    padding: 6.5rem 1rem 3rem;
  }
}
