/* ========================================
   Design Tokens — White + Dark Blue
   ======================================== */
:root {
  /* Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f7fb;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fc;

  --text-primary: #0f1b3d;
  --text-secondary: #4a5578;
  --text-muted: #6b7699; /* darkened from #8590a8 to meet WCAG AA 4.5:1 on white */

  --accent: #1a2e6e;
  --accent-light: #2a4494;
  --accent-dark: #0f1b3d;
  --accent-glow: rgba(26, 46, 110, 0.08);

  --green: #16a34a;
  --green-bg: rgba(22, 163, 74, 0.06);
  --red: #dc2626;
  --red-bg: rgba(220, 38, 38, 0.05);

  --border: rgba(15, 27, 61, 0.08);
  --border-hover: rgba(15, 27, 61, 0.16);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'Fira Code', Consolas, 'Courier New', monospace;

  /* Spacing */
  --section-py: 6rem;
  --container-max: 1200px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Prevent iOS Safari from auto-inflating font sizes in landscape mode */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative; /* keeps position:fixed working correctly on iOS Safari */
}

/* overflow-x:clip clips visually without creating a scroll container,
   so position:fixed nav stays fixed on iOS. Works on all modern browsers. */
html { overflow-x: clip; }

/* IAB (Instagram/Facebook/Twitter in-app browser): release overflow so iOS WKWebView can scroll.
   overflow-x:hidden on body creates a scroll container that traps touch scroll events in WKWebView.
   overflow:visible removes body as a scroll container — page scrolls at window/document level instead.
   CRITICAL: html must also be overflow:visible in IAB — WebKit/iOS treats overflow-x:clip on <html>
   like hidden on older iOS versions (pre-16), which traps ALL scroll (vertical + horizontal).
   Chromium handles clip correctly but real Instagram WKWebView does not.
   touch-action:pan-y explicitly enables vertical touch scroll in WKWebView (critical for IAB).
   overscroll-behavior removed — on overflow:visible body it can propagate to viewport and suppress
   touch momentum scroll in some WebKit builds.

   Two selectors for two timing phases:
   - html.iab body: applied from first paint (html.iab is set by inline head script before CSS loads)
   - body.iab: applied once script.js runs at bottom of body (fallback / redundant but safe) */
html.iab body { overflow: visible; touch-action: pan-y; }
body.iab { overflow: visible; touch-action: pan-y; }
html.iab { overflow: visible; scroll-behavior: auto; touch-action: pan-y; }

img { max-width: 100%; display: block; }
picture { display: block; width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* Remove grey tap highlight in WKWebView/iOS Safari — applies globally via inheritance */
html { -webkit-tap-highlight-color: transparent; }
/* Eliminate 300ms click delay on interactive elements in IAB/mobile browsers */
a, button { touch-action: manipulation; }

/* Offset anchor scroll targets so fixed nav doesn't overlap section headings */
[id] { scroll-margin-top: 80px; }


.container {
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========================================
   Gradient Text
   ======================================== */
.gradient-text {
  background: linear-gradient(135deg, var(--accent), #3b5ec9, var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Windows High Contrast Mode: gradient text becomes invisible — restore solid color */
@media (forced-colors: active) {
  .gradient-text {
    -webkit-text-fill-color: unset;
    background: none;
    color: LinkText;
  }
}

/* ========================================
   Navigation
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  /* env() safe area: pushes nav content below notch / Dynamic Island on iPhone X+ */
  padding: calc(1rem + env(safe-area-inset-top, 0px)) 0 1rem;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 3px rgba(15, 27, 61, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.logo-text { color: var(--text-primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s var(--ease);
  font-weight: 500;
}

@media (hover: hover) {
  .nav-links a:hover { color: var(--accent); }
}

.nav-links li {
  display: flex;
  align-items: center;
}

.nav-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  padding: 0.625rem 1.25rem;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

.btn-sm { padding: 0.625rem 1.25rem; font-size: 0.8125rem; min-height: 44px; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn-xl { padding: 1rem 2.25rem; font-size: 1.1rem; border-radius: var(--radius); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(26, 46, 110, 0.25);
}

@media (hover: hover) {
  .btn-primary:hover {
    background: var(--accent-dark);
    box-shadow: 0 8px 24px rgba(26, 46, 110, 0.35);
    transform: translateY(-1px);
  }
}

/* Touch feedback — :hover never fires on mobile touch, only :active does */
.btn-primary:active {
  background: var(--accent-dark);
  box-shadow: 0 2px 8px rgba(26, 46, 110, 0.3);
  transform: scale(0.97);
  transition: none;
}

.btn-outline {
  border: 1.5px solid var(--border-hover);
  color: var(--text-primary);
  background: transparent;
}

@media (hover: hover) {
  .btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
  }
}

.btn-outline:active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
  transform: scale(0.97);
  transition: none;
}

/* ========================================
   Hero
   ======================================== */
.hero {
  position: relative;
  /* 100svh = small viewport height (excludes iOS browser chrome) — prevents
     oversized hero on iOS Safari. Falls back to -webkit-fill-available, then 100vh. */
  min-height: 100vh;
  min-height: -webkit-fill-available;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 8rem 0 4rem;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-glow {
  position: absolute;
  top: -200px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(26, 46, 110, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(26, 46, 110, 0.15);
  padding: 0.375rem 1rem;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  color: var(--accent-dark);
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-subtitle strong { color: var(--accent); }

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-icon {
  color: var(--accent);
  display: flex;
}

/* Hero Visual — Claude AI Animation */
.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
}

/* Claude Prompt Box */
.claude-prompt {
  background: #2a2040;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #d97706;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(217, 119, 6, 0.12);
  /* Default: visible — JS adds .js-hero to hero-visual to enable animation.
     Prevents ghost column flash before script.js loads on slow IAB connections. */
  opacity: 1;
  transform: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

/* Animation start state — only active when JS has confirmed it can animate */
.js-hero .claude-prompt:not(.visible) {
  opacity: 0;
  transform: translateY(8px);
}

.claude-prompt.visible {
  opacity: 1;
  transform: translateY(0);
}

.claude-prompt-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.25rem;
  background: rgba(217, 119, 6, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
}

.claude-prompt-header svg {
  color: #d97706;
}

.claude-badge {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 700;
  background: linear-gradient(135deg, #d97706, #ea580c);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  letter-spacing: 0.03em;
}

.claude-prompt-body {
  padding: 1rem 1.25rem 1.125rem;
}

.claude-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f0a840;
  margin-bottom: 0.375rem;
}

.prompt-input-box {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  padding: 0.875rem 0.75rem;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
  min-height: 2.75rem;
}

.prompt-text {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  min-height: 1.3125rem;
  font-weight: 400;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.prompt-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #d97706;
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

/* Thinking Indicator */
.claude-thinking {
  display: none;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8125rem;
  color: #d97706;
  font-weight: 600;
}

.claude-thinking.active {
  display: flex;
}

.thinking-dots {
  display: flex;
  gap: 3px;
}

.thinking-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d97706;
  animation: dotPulse 1.2s ease-in-out infinite;
}

.thinking-dots span:nth-child(2) { animation-delay: 0.15s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* Code Window */
.code-window {
  background: #0f1b3d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(15, 27, 61, 0.18);
  opacity: 1;
  transform: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.js-hero .code-window:not(.visible) {
  opacity: 0;
  transform: translateY(12px);
}

.code-window.visible {
  opacity: 1;
  transform: translateY(0);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.125rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-title {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-mono);
}

.code-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #7ee8a8;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.code-status.active { opacity: 1; }

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7ee8a8;
  animation: statusPulse 1.5s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.code-body {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.65);
  /* width:100% + overflow-x:auto prevents <pre> white-space:pre from
     expanding this element (and its parents) wider than the viewport */
  width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  min-height: 220px;
}

.code-body .line {
  display: block;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.code-body .line.typed {
  opacity: 1;
  transform: translateY(0);
}

.code-body .kw { color: #93bbff; }
.code-body .str { color: #7ee8a8; }
.code-body .fn { color: #c9a6ff; }
.code-body .comment { color: rgba(255, 255, 255, 0.3); font-style: italic; }
.code-body .cursor-line::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #93bbff;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Test Result */
.test-result {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.125rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--green);
  opacity: 1;
  transform: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.08);
}

.js-hero .test-result:not(.visible) {
  opacity: 0;
  transform: translateY(8px);
}

.test-result.visible {
  opacity: 1;
  transform: translateY(0);
}

.test-time {
  margin-left: auto;
  color: var(--text-muted);
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* Static hero visual — pre-rendered snapshot, shown on mobile only */
.hero-visual-static {
  display: none;
}

/* ========================================
   Trust Bar
   ======================================== */
.trust-bar {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
}

.trust-label {
  text-align: center;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.trust-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.tech-badge {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1.125rem 0.5rem 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

@media (hover: hover) {
  .tech-badge:hover {
    border-color: var(--border-hover);
    box-shadow: 0 2px 8px rgba(15, 27, 61, 0.06);
  }
}

.tech-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ========================================
   Sections
   ======================================== */
.section {
  padding: var(--section-py) 0;
}

.section-dark {
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--accent-dark);
}

.section-desc {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   What You'll Learn Grid
   ======================================== */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.learn-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all 0.3s var(--ease);
}

@media (hover: hover) {
  .learn-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 24px rgba(15, 27, 61, 0.08);
    transform: translateY(-2px);
  }
}

.learn-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.learn-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.625rem;
  letter-spacing: -0.01em;
  color: var(--accent-dark);
}

.learn-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   Curriculum
   ======================================== */
.curriculum-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.module {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

@media (hover: hover) {
  .module:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 12px rgba(15, 27, 61, 0.06);
  }
}

.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.25rem 1.5rem;
  color: var(--text-primary);
  font-size: 1rem;
  text-align: left;
  transition: background 0.2s var(--ease);
}

@media (hover: hover) {
  .module-header:hover { background: var(--bg-secondary); }
}

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

.module-number {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.6;
  min-width: 28px;
}

.module-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
  color: var(--accent-dark);
}

.module-info p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.module-chevron {
  color: var(--text-muted);
  transition: transform 0.3s var(--ease);
  flex-shrink: 0;
}

.module-header[aria-expanded="true"] .module-chevron {
  transform: rotate(180deg);
}

.module-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease), padding 0.4s var(--ease);
}

.module-body.open {
  max-height: 800px;
}

.module-body ul {
  padding: 0 1.5rem 1.25rem 4.25rem;
}

.module-body li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.375rem 0;
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.5;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.module-body li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.35;
}

/* ========================================
   Comparison
   ======================================== */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.comparison-card {
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.comparison-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.comparison-card li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.625rem 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.comparison-old {
  background: var(--red-bg);
  border-color: rgba(220, 38, 38, 0.12);
}

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

.x-mark {
  color: var(--red);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.comparison-new {
  background: var(--green-bg);
  border-color: rgba(22, 163, 74, 0.15);
}

.comparison-new h3 { color: var(--accent-dark); }

.check-mark {
  color: var(--green);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ========================================
   Student Reviews
   ======================================== */
.reviews-embed {
  max-width: 560px;
  margin: 0 auto;
}

.reviews-udemy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(15, 27, 61, 0.06);
}

.udemy-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #a435f0, #8710d8);
  color: #fff;
}

.udemy-logo-icon {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 6px;
  width: 44px;
  height: 44px;
}

.udemy-logo-icon path {
  fill: #fff;
}

.udemy-card-header h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.125rem;
}

.udemy-card-header p {
  font-size: 0.8125rem;
  opacity: 0.8;
}

.udemy-card-body {
  padding: 2rem;
  text-align: center;
}

.udemy-stars-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.udemy-stars {
  display: flex;
  gap: 0.125rem;
}

.udemy-rating-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.udemy-card-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.btn-udemy {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: #a435f0;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease);
  box-shadow: 0 4px 16px rgba(164, 53, 240, 0.25);
}

@media (hover: hover) {
  .btn-udemy:hover {
    background: #8710d8;
    box-shadow: 0 8px 24px rgba(164, 53, 240, 0.35);
    transform: translateY(-1px);
  }
}

/* ========================================
   Instructor
   ======================================== */
.instructor-split {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 4rem;
  align-items: center;
}

.instructor-photo-frame {
  position: relative;
}

.instructor-photo-frame img {
  width: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
  position: relative;
  z-index: 1;
  box-shadow: 0 16px 48px rgba(15, 27, 61, 0.12);
}

.instructor-photo-accent {
  position: absolute;
  bottom: -12px;
  right: -12px;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  background: var(--accent);
  opacity: 0.12;
  z-index: 0;
}

.instructor-content-col .section-tag {
  text-align: left;
}

.instructor-content-col h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--accent-dark);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.instructor-role {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.instructor-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

.instructor-credentials {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-top: 1.5rem;
}

.credential {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.credential-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.credential strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.credential span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.instructor-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.75rem 1.5rem;
  background: #0a66c2;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease);
  box-shadow: 0 4px 12px rgba(10, 102, 194, 0.25);
}

@media (hover: hover) {
  .instructor-linkedin:hover {
    background: #004182;
    box-shadow: 0 8px 20px rgba(10, 102, 194, 0.35);
    transform: translateY(-1px);
  }
}

@media (max-width: 768px) {
  .instructor-split {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .instructor-photo-frame {
    max-width: 260px;
    margin: 0 auto;
  }

  .instructor-photo-accent {
    bottom: -8px;
    right: -8px;
  }

  .instructor-content-col .section-tag {
    text-align: center;
  }

  .instructor-credentials {
    align-items: center;
  }

  .instructor-linkedin {
    justify-content: center;
  }
}

/* ========================================
   Audience
   ======================================== */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.audience-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s var(--ease);
}

@media (hover: hover) {
  .audience-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 24px rgba(15, 27, 61, 0.08);
    transform: translateY(-2px);
  }
}

.audience-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.audience-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.625rem;
  color: var(--accent-dark);
}

.audience-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   CTA Banner
   ======================================== */
.cta-banner {
  padding: 1.5rem 0;
}

.cta-inner {
  background: var(--accent);
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cta-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #fff;
}

.cta-content p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9375rem;
}

.cta-content strong { color: #fff; }

.cta-inner .btn-primary {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

@media (hover: hover) {
  .cta-inner .btn-primary:hover {
    background: #f0f0f5;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }
}

.cta-inner .btn-primary:active {
  background: #e8e8ee;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transform: scale(0.97);
  transition: none;
}

/* ========================================
   FAQ
   ======================================== */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

@media (hover: hover) {
  .faq-item:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 12px rgba(15, 27, 61, 0.06);
  }
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.25rem 1.5rem;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
}

.faq-chevron {
  color: var(--text-muted);
  transition: transform 0.3s var(--ease);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-question[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
}

.faq-answer.open {
  max-height: 600px;
}

.faq-answer p {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   Final CTA
   ======================================== */
.final-cta {
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-secondary);
}

.final-cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(26, 46, 110, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.final-cta h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  position: relative;
  color: var(--accent-dark);
}

.final-cta > .container > p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  position: relative;
}

.final-cta .btn { position: relative; }

/* ========================================
   Footer
   ======================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 0;
  background: var(--bg-primary);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2rem;
}

.footer-left p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s var(--ease);
}

@media (hover: hover) {
  .footer-links a:hover { color: var(--accent); }
}

.footer-right { display: flex; align-items: center; }

.footer-bottom {
  border-top: 1px solid var(--border);
  /* env() safe area: pushes footer above iOS home bar indicator */
  padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* ========================================
   Responsive
   ======================================== */

/* Tighten nav gap at tablet widths to prevent link crowding at 769-900px */
@media (max-width: 900px) {
  .nav-links { gap: 1.25rem; }
  .nav-links a { font-size: 0.8125rem; }
}

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 2rem; text-align: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-stats { justify-content: center; }
  /* min-width:0 overrides CSS grid's default min-width:auto so columns
     actually constrain instead of expanding to content */
  .hero-content { min-width: 0; max-width: 100%; overflow-x: hidden; }
  .hero-visual { margin-top: 2rem; width: 100%; min-width: 0; overflow: hidden; }
  .claude-prompt,
  .code-window { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
  /* <pre> with white-space:pre has intrinsic min-width = longest line width,
     which overflows the viewport on mobile when JS types long code lines.
     pre-wrap lets lines wrap inside the code window instead of blowing out. */
  .code-body { white-space: pre-wrap; overflow-wrap: break-word; min-width: 0; max-width: 100%; }
  .learn-grid { grid-template-columns: repeat(2, 1fr); }
  .audience-grid { grid-template-columns: repeat(2, 1fr); }
  /* Collapse instructor split layout at tablet — fixed 320px column too wide below 1024px */
  .instructor-split { grid-template-columns: 1fr; gap: 2.5rem; }
  .instructor-photo-frame { max-width: 300px; margin: 0 auto; }
}

@media (max-width: 768px) {
  :root { --section-py: 4rem; }

  /* Mobile nav: logo left + Enroll Now button right — no hamburger */
  .nav-toggle { display: none; }
  .nav-cta { display: flex; }

  /* Dropdown — slides in below the fixed nav bar */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(26, 46, 110, 0.08);
    box-shadow: 0 8px 24px rgba(15, 27, 61, 0.10);
    padding: 0.25rem 0 1rem;
    z-index: 1000;
  }
  .nav-links.open { display: flex; }

  .nav-links li { width: 100%; border-bottom: 1px solid rgba(26, 46, 110, 0.06); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a { display: block; padding: 0.875rem 1.5rem; font-size: 1rem; color: var(--text-primary); }
  @media (hover: hover) {
    .nav-links a:hover { color: var(--accent); background: rgba(26, 46, 110, 0.03); }
  }
  .nav-enroll-link a { color: var(--accent) !important; font-weight: 700; }

  /* Mobile hero: hide the entire visual (animation + static snapshot) */
  .hero-visual,
  .hero-visual-static { display: none !important; }

  .hero { padding: 6rem 0 3rem; min-height: auto; }
  .hero h1 { font-size: 2rem; }
  .hero-stats { justify-content: center; }

  .learn-grid { grid-template-columns: 1fr; }
  .comparison-grid { grid-template-columns: 1fr; }
  .audience-grid { grid-template-columns: 1fr; }

  .cta-inner {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }

  .module-info { gap: 0.75rem; }
  .module-body ul { padding-left: 3rem; }

  .footer-inner {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-links { flex-wrap: wrap; justify-content: center; gap: 1rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.75rem; }
  .hero-stats { flex-direction: column; align-items: center; }
  .trust-logos { gap: 0.5rem; }
  .tech-badge { font-size: 0.75rem; padding: 0.375rem 0.75rem; }
  .comparison-card { padding: 1.5rem; }
  /* Prevent code window overflow on narrow screens */
  .code-body { font-size: 0.7rem; padding: 1rem; min-height: 180px; }
  .code-window { overflow-x: auto; }
  /* Allow button text to wrap on very small screens */
  .btn-xl, .btn-lg { white-space: normal; text-align: center; }
}

/* ========================================
   How to Generate Playwright Tests with AI
   ======================================== */

/* 4-step process grid */
.how-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 3.5rem;
  counter-reset: steps;
}

.how-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  position: relative;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

@media (hover: hover) {
  .how-step:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 24px rgba(15, 27, 61, 0.08);
    transform: translateY(-2px);
  }
}

/* Faint connector line between cards on desktop */
.how-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 2.75rem;
  right: -0.75rem;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid var(--border-hover);
  z-index: 1;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.step-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.step-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.inline-code {
  font-family: var(--font-mono);
  font-size: 0.8125em;
  background: rgba(26, 46, 110, 0.07);
  color: var(--accent);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

/* Prompt → Code example block */
.how-example {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(15, 27, 61, 0.12);
}

.how-example-prompt {
  background: #2a2040;
  padding: 2rem 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.how-example-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.how-example-prompt .how-example-label { color: #f0a840; }
.how-example-code .how-example-label { color: #7ee8a8; }

.how-example-text {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.65;
  font-style: italic;
  flex: 1;
}

.how-example-tag {
  font-size: 0.75rem;
  color: rgba(240, 168, 64, 0.7);
  font-weight: 500;
}

/* Centre arrow column */
.how-example-arrow {
  background: #1e1630;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem 1.25rem;
  color: rgba(255, 255, 255, 0.3);
  min-width: 80px;
}

.how-example-arrow span {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  writing-mode: vertical-rl;
  color: rgba(255, 255, 255, 0.25);
}

.how-example-code {
  background: #0f1b3d;
  padding: 2rem 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.how-code-block {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.65);
  flex: 1;
  margin: 0;
  overflow-x: auto;
  white-space: pre;
}

.how-code-block .hc-kw { color: #93bbff; }
.how-code-block .hc-str { color: #7ee8a8; }
.how-code-block .hc-fn { color: #c9a6ff; }

.how-example-pass {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #7ee8a8;
  font-family: var(--font-mono);
}

/* Responsive */
@media (max-width: 1024px) {
  .how-steps { grid-template-columns: repeat(2, 1fr); }
  .how-step:not(:last-child)::after { display: none; }
}

@media (max-width: 768px) {
  .how-steps { grid-template-columns: 1fr; }

  .how-example {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    /* Prevent any child from expanding the grid container wider than viewport */
    overflow: hidden;
    max-width: 100%;
  }

  /* Grid children default min-width:auto — they expand to fit content.
     min-width:0 constrains them to their 1fr column. */
  .how-example-prompt,
  .how-example-code {
    min-width: 0;
    overflow: hidden;
  }

  .how-example-arrow {
    flex-direction: row;
    min-width: unset;
    padding: 1rem 2rem;
    gap: 1rem;
  }

  .how-example-arrow span {
    writing-mode: horizontal-tb;
  }

  .how-code-block {
    white-space: pre-wrap;      /* wrap long lines */
    overflow-wrap: break-word;  /* break within words if needed */
    word-break: break-all;      /* break long tokens (method chains) */
    overflow-x: hidden;
    max-width: 100%;
  }
}

/* ========================================
   Animations
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
  .js-animations .learn-card,
  .js-animations .audience-card,
  .js-animations .module,
  .js-animations .faq-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  }

  .js-animations .learn-card.visible,
  .js-animations .audience-card.visible,
  .js-animations .module.visible,
  .js-animations .faq-item.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Homepage Blog Grid (responsive)
   ======================================== */
@media (max-width: 768px) {
  .section [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }
}

/* ========================================
   Reading Progress Bar
   ======================================== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent);
  z-index: 1001;
  transition: none;
  pointer-events: none;
}

/* ========================================
   Scroll Indicator (hero chevron)
   ======================================== */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--accent);
  opacity: 0.6;
  animation: scrollBounce 2s ease-in-out infinite;
  transition: opacity 0.3s var(--ease);
  z-index: 2;
}

.scroll-indicator:hover {
  opacity: 1;
}

.scroll-indicator.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* Hide on mobile — hero is shorter, no room for the chevron */
@media (max-width: 768px) {
  .scroll-indicator {
    display: none;
  }
}

/* ========================================
   Sticky Bottom CTA Bar (mobile only)
   ======================================== */
.sticky-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  display: none; /* hidden by default, shown via JS on mobile */
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.98);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 -2px 12px rgba(15, 27, 61, 0.08);
  transform: translateY(100%);
  transition: transform 0.3s var(--ease);
}

.sticky-cta-bar.visible {
  transform: translateY(0);
}

.sticky-cta-text {
  flex: 1;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.sticky-cta-btn {
  flex-shrink: 0;
}

.sticky-cta-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 1.25rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s var(--ease);
  line-height: 1;
}

.sticky-cta-close:hover {
  background: var(--bg-secondary);
}

/* Only display the sticky bar on mobile viewports */
@media (max-width: 768px) {
  .sticky-cta-bar.active {
    display: flex;
  }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .scroll-indicator {
    animation: none;
  }
  .sticky-cta-bar {
    transition: none;
  }
}

/* ========================================
   Blog Post: Sticky Enrollment Bar
   Injected by blogEnrollCta() in script.js
   ======================================== */
#blogStickyBar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: #0f1b3d;
  color: #fff;
  padding: 0.875rem 1.5rem calc(0.875rem + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}

#blogStickyBar.visible {
  transform: translateY(0);
}

.bsb-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.bsb-text {
  flex: 1;
  min-width: 0;
}

.bsb-text strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bsb-text span {
  display: block;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bsb-btn {
  flex-shrink: 0;
  background: #fff !important;
  color: #0f1b3d !important;
  box-shadow: none !important;
  font-weight: 700;
}

.bsb-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 1.5rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.45);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
  transition: background 0.2s, color 0.2s;
}

.bsb-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

@media (max-width: 480px) {
  .bsb-text span {
    display: none;
  }

  #blogStickyBar {
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  #blogStickyBar {
    transition: none;
  }
}

/* ========================================
   Blog Post: Early inline CTA
   Injected before 2nd H2 by blogEnrollCta()
   ======================================== */
.blog-cta-early {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
  border: 1.5px solid rgba(26, 46, 110, 0.15);
  border-left: 4px solid #1a2e6e;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #0f1b3d;
}

.blog-cta-early p {
  margin: 0;
}

.blog-cta-early a {
  color: #1a2e6e;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-cta-early a:hover {
  color: #2a4494;
}
