/* ============================================================
   STRIVER'S A2Z DSA SHEET — FRAMER-INSPIRED DARK DESIGN SYSTEM
   ============================================================ */

/* ---------- CSS Variables (Design Tokens) ---------- */
:root {
  /* Brand & Accent */
  --primary: #ffffff;
  --on-primary: #0a0a0a;
  --accent-blue: #0099ff;

  /* Surfaces */
  --canvas: #0a0a0b;
  --surface-1: #141415;
  --surface-2: #1e1e20;
  --surface-3: #282829;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-soft: rgba(255, 255, 255, 0.04);
  --inverse-canvas: #ffffff;

  /* Text */
  --ink: #ffffff;
  --ink-muted: #999999;
  --ink-dim: #666666;

  /* Semantic */
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;

  /* Gradient Spotlights */
  --gradient-violet: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #6366f1 100%);
  --gradient-magenta: linear-gradient(135deg, #ec4899 0%, #d946ef 50%, #a855f7 100%);
  --gradient-orange: linear-gradient(135deg, #f97316 0%, #ef4444 50%, #ec4899 100%);
  --gradient-coral: linear-gradient(135deg, #fb7185 0%, #f43f5e 50%, #e11d48 100%);
  --gradient-emerald: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
  --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);

  /* Spacing */
  --sp-hair: 1px;
  --sp-xxs: 4px;
  --sp-xs: 8px;
  --sp-sm: 12px;
  --sp-md: 15px;
  --sp-lg: 20px;
  --sp-xl: 30px;
  --sp-xxl: 40px;
  --sp-section: 96px;

  /* Radius */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 15px;
  --r-xl: 20px;
  --r-xxl: 30px;
  --r-pill: 100px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-elevated: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 0.5px 0 rgba(255, 255, 255, 0.1);
  --focus-ring: 0 0 0 1px rgba(0, 153, 255, 0.15);

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Cormorant Garamond', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;

  /* Use the selected typeface's default OpenType features */
  --font-features: normal;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-feature-settings: var(--font-features);
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: -0.15px;
  color: var(--ink);
  background: var(--canvas);
  overflow-x: hidden;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: opacity 0.15s;
}

a:hover {
  opacity: 0.85;
}

::selection {
  background: rgba(0, 153, 255, 0.25);
  color: var(--ink);
}

/* ---------- Typography Classes ---------- */
.display-xxl {
  font-size: clamp(48px, 8vw, 110px);
  font-weight: 500;
  line-height: 0.85;
  letter-spacing: -0.05em;
}

.display-xl {
  font-size: clamp(36px, 5vw, 85px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.display-lg {
  font-size: clamp(28px, 4vw, 62px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.05em;
}

.display-md {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 500;
  line-height: 1.13;
  letter-spacing: -1px;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-body);
  font-feature-settings: var(--font-features);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.14px;
  line-height: 1;
  padding: 10px 15px;
  border: none;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: transform 0.12s, opacity 0.12s;
  white-space: nowrap;
}

.btn-primary:hover {
  opacity: 0.9;
  color: var(--on-primary);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--surface-1);
  color: var(--ink);
  font-family: var(--font-body);
  font-feature-settings: var(--font-features);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.14px;
  line-height: 1;
  padding: 10px 15px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: transform 0.12s, background 0.15s;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.btn-secondary:active {
  transform: scale(0.97);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--danger);
  color: white;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border: none;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: transform 0.12s, opacity 0.12s;
}

.btn-danger:hover {
  opacity: 0.9;
  color: white;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 15px;
}

/* ---------- Top Navigation ---------- */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hairline);
  height: 56px;
}

.nav-inner {
  max-width: 1199px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-lg);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.brand-icon {
  font-size: 20px;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.14px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--surface-1);
  opacity: 1;
}

.nav-link.active {
  color: var(--ink);
  background: var(--surface-2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--ink-dim);
  pointer-events: none;
}

.search-input {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  color: var(--ink);
  font-family: var(--font-body);
  font-feature-settings: var(--font-features);
  font-size: 14px;
  padding: 8px 14px 8px 36px;
  width: 220px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input::placeholder {
  color: var(--ink-dim);
}

.search-input:focus {
  border-color: rgba(0, 153, 255, 0.3);
  box-shadow: var(--focus-ring);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: rgba(10, 10, 11, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hairline);
  padding: 16px var(--sp-lg);
  z-index: 999;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-link {
  color: var(--ink-muted);
  font-size: 16px;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline-soft);
}

.mobile-link:hover {
  color: var(--ink);
}

.mobile-search {
  padding-top: 8px;
}

.mobile-search .search-input {
  width: 100%;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px var(--sp-lg) var(--sp-section);
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

/* ---------- Black Shimmer on White Text ---------- */
@keyframes blackShimmer {
  0% {
    background-position: 250% 0;
  }

  100% {
    background-position: -250% 0;
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 8px 22px;
  background: rgba(14, 20, 36, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: var(--r-pill);
  margin-bottom: var(--sp-xl);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-eyebrow:hover {
  background: rgba(18, 28, 52, 0.95);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.18);
  transform: translateY(-1px);
}

.hero-eyebrow .eyebrow-icon {
  color: #38bdf8;
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.hero-eyebrow:hover .eyebrow-icon {
  color: #7dd3fc;
  transform: translate(2px, -2px);
}

.hero-eyebrow span {
  background: linear-gradient(95deg,
      #ffffff 0%,
      #ffffff 35%,
      #71717a 46%,
      #18181b 50%,
      #71717a 54%,
      #ffffff 65%,
      #ffffff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: blackShimmer 5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.hero-title {
  font-size: clamp(48px, 10vw, 110px);
  font-weight: 600;
  line-height: 0.88;
  letter-spacing: -0.055em;
  margin-bottom: var(--sp-xl);
  background: linear-gradient(95deg,
      #ffffff 0%,
      #ffffff 36%,
      #52525b 45%,
      #18181b 50%,
      #52525b 55%,
      #ffffff 64%,
      #ffffff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: blackShimmer 5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--ink-muted);
  line-height: 1.5;
  max-width: 620px;
  margin: 0 auto var(--sp-xxl);
  letter-spacing: -0.2px;
}

.hero-stats {
  display: flex;
  gap: var(--sp-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--sp-xxl);
}

.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: linear-gradient(180deg, rgba(14, 22, 38, 0.9) 0%, rgba(9, 14, 26, 0.96) 100%);
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: var(--r-xl);
  padding: 18px 26px;
  min-width: 110px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
}

.stat-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.38);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(56, 189, 248, 0.14);
}

.stat-pill.accent {
  background: linear-gradient(180deg, rgba(15, 32, 60, 0.95) 0%, rgba(10, 20, 40, 0.98) 100%);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6), 0 0 25px rgba(56, 189, 248, 0.2), inset 0 1px 0 rgba(56, 189, 248, 0.25);
}

.stat-number {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1;
  color: #ffffff;
}

.stat-pill.accent .stat-number {
  color: #38bdf8;
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.45);
}

.stat-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.hero-cta {
  display: flex;
  gap: var(--sp-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-glow {
  display: none !important;
}

/* ---------- Global Progress ---------- */
.global-progress {
  position: sticky;
  top: 56px;
  z-index: 100;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline-soft);
  padding: 10px var(--sp-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.progress-track {
  flex: 1;
  height: 4px;
  background: var(--surface-2);
  border-radius: var(--r-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-emerald);
  border-radius: var(--r-full);
  transition: width 0.4s ease;
}

.progress-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
  min-width: 100px;
  text-align: right;
}

/* ---------- Filter Bar ---------- */
.filter-bar {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline-soft);
  padding: var(--sp-md) var(--sp-lg);
  overflow-x: auto;
}

.filter-inner {
  max-width: 1199px;
  margin: 0 auto;
  display: flex;
  gap: var(--sp-xl);
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  white-space: nowrap;
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-pills {
  display: flex;
  gap: 4px;
}

.filter-pill {
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-feature-settings: var(--font-features);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-pill:hover {
  background: var(--surface-1);
  color: var(--ink);
}

.filter-pill.active {
  background: var(--surface-2);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ---------- Section Headers ---------- */
.section-header {
  max-width: 1199px;
  margin: 0 auto;
  padding: var(--sp-section) var(--sp-lg) var(--sp-xxl);
  text-align: center;
}

.section-title {
  font-size: clamp(32px, 4vw, 62px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: var(--sp-sm);
  background: linear-gradient(95deg,
      #ffffff 0%,
      #ffffff 38%,
      #52525b 46%,
      #18181b 50%,
      #52525b 54%,
      #ffffff 62%,
      #ffffff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: blackShimmer 5.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  display: inline-block;
}

.section-subtitle {
  font-size: 18px;
  color: var(--ink-muted);
  letter-spacing: -0.18px;
}

/* ---------- Steps Grid ---------- */
.steps-grid {
  max-width: 1199px;
  margin: 0 auto;
  padding: 0 var(--sp-lg) var(--sp-section);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--sp-md);
}

.step-card {
  background: linear-gradient(180deg, rgba(14, 20, 36, 0.88) 0%, rgba(8, 12, 24, 0.96) 100%);
  border: 1px solid rgba(56, 189, 248, 0.14);
  border-radius: var(--r-xl);
  padding: 24px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.step-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.45), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.step-card:hover {
  background: linear-gradient(180deg, rgba(18, 28, 50, 0.92) 0%, rgba(10, 16, 30, 0.98) 100%);
  border-color: rgba(56, 189, 248, 0.38);
  transform: translateY(-3px);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(56, 189, 248, 0.15);
}

.step-card:hover::before {
  opacity: 1;
}

/* Gradient spotlight cards for key steps (midnight blue base with glowing colored accents) */
.step-card.spotlight-violet {
  background: linear-gradient(180deg, rgba(24, 18, 48, 0.9) 0%, rgba(10, 12, 26, 0.96) 100%);
  border-color: rgba(168, 85, 247, 0.25);
}

.step-card.spotlight-violet::before {
  opacity: 1;
  background: linear-gradient(90deg, transparent, #a855f7, transparent);
}

.step-card.spotlight-magenta {
  background: linear-gradient(180deg, rgba(38, 16, 40, 0.9) 0%, rgba(10, 12, 26, 0.96) 100%);
  border-color: rgba(236, 72, 153, 0.25);
}

.step-card.spotlight-magenta::before {
  opacity: 1;
  background: linear-gradient(90deg, transparent, #ec4899, transparent);
}

.step-card.spotlight-orange {
  background: linear-gradient(180deg, rgba(36, 20, 16, 0.9) 0%, rgba(10, 12, 26, 0.96) 100%);
  border-color: rgba(249, 115, 22, 0.25);
}

.step-card.spotlight-orange::before {
  opacity: 1;
  background: linear-gradient(90deg, transparent, #f97316, transparent);
}

.step-card.spotlight-coral {
  background: linear-gradient(180deg, rgba(38, 18, 26, 0.9) 0%, rgba(10, 12, 26, 0.96) 100%);
  border-color: rgba(251, 113, 133, 0.25);
}

.step-card.spotlight-coral::before {
  opacity: 1;
  background: linear-gradient(90deg, transparent, #fb7185, transparent);
}

.step-card.spotlight-emerald {
  background: linear-gradient(180deg, rgba(12, 32, 26, 0.9) 0%, rgba(10, 12, 26, 0.96) 100%);
  border-color: rgba(16, 185, 129, 0.25);
}

.step-card.spotlight-emerald::before {
  opacity: 1;
  background: linear-gradient(90deg, transparent, #10b981, transparent);
}

.step-card.spotlight-blue {
  background: linear-gradient(180deg, rgba(14, 28, 54, 0.9) 0%, rgba(8, 14, 28, 0.96) 100%);
  border-color: rgba(56, 189, 248, 0.35);
}

.step-card.spotlight-blue::before {
  opacity: 1;
  background: linear-gradient(90deg, transparent, #38bdf8, transparent);
}

.step-card.spotlight-violet:hover,
.step-card.spotlight-magenta:hover,
.step-card.spotlight-orange:hover,
.step-card.spotlight-coral:hover,
.step-card.spotlight-emerald:hover,
.step-card.spotlight-blue:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
}

.step-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
}

.step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f3f4f6;
  width: 32px;
  height: 32px;
}

.step-icon svg {
  display: block;
  stroke-width: 2;
}

.step-number {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.2);
  padding: 3px 10px;
  border-radius: var(--r-pill);
}

.step-name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: var(--sp-xs);
}

.step-meta {
  display: flex;
  gap: var(--sp-md);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: var(--sp-md);
}

.step-progress-bar {
  height: 4px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--r-full);
  overflow: hidden;
}

.step-progress-fill {
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--r-full);
  transition: width 0.4s ease;
}

.step-card:not([class*="spotlight"]) .step-progress-bar {
  background: var(--surface-3);
}

.step-card:not([class*="spotlight"]) .step-progress-fill {
  background: var(--success);
}

.step-card:not([class*="spotlight"]) .step-number {
  background: var(--surface-2);
  color: var(--ink-muted);
}

/* ---------- Expanded Step (Problem List) ---------- */
.step-expanded {
  max-width: 1199px;
  margin: 0 auto;
  padding: 0 var(--sp-lg) var(--sp-xxl);
}

.step-expanded-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
  padding: var(--sp-lg) 0;
  border-bottom: 1px solid var(--hairline-soft);
  margin-bottom: var(--sp-lg);
}

.step-expanded-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -1px;
}

.step-back-btn {
  font-size: 14px;
  color: var(--ink-muted);
  cursor: pointer;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 8px 16px;
  transition: background 0.15s;
}

.step-back-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.category-section {
  margin-bottom: var(--sp-xxl);
}

.category-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: var(--ink);
  padding: var(--sp-sm) 0;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: var(--sp-sm);
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
}

.category-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-dim);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: var(--r-pill);
}

/* ---------- Problem Row ---------- */
/* ---------- Problem Row (Bubble Design) ---------- */
.problem-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  padding: 14px 18px;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--r-md);
  transition: background 0.15s, border-color 0.15s;
}

.problem-row:hover {
  background: #121215;
}

.problem-row.solved {
  opacity: 0.65;
}

.problem-row.solved .problem-title {
  text-decoration: line-through;
  color: var(--ink-dim);
}

.problem-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.problem-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  color: transparent;
  font-size: 11px;
  flex-shrink: 0;
}

.problem-check:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.04);
}

.problem-check.checked {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.problem-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  cursor: pointer;
}

.problem-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: #f3f4f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.problem-title:hover {
  color: #38bdf8;
}

.problem-tags {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.problem-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--r-full);
  line-height: 1.4;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tag-core,
.level-core {
  background: #271c08;
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
  text-transform: lowercase;
}

.tag-basic,
.level-basic {
  background: #092316;
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
  text-transform: lowercase;
}

.tag-advance,
.tag-advanced,
.level-advance,
.level-advanced {
  background: #2b0d12;
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.35);
  text-transform: lowercase;
}

.tag-time {
  background: rgba(255, 255, 255, 0.05);
  color: #9ca3af;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 500;
}

.problem-links {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-muted);
  border: 1px solid var(--hairline);
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.link-btn:hover {
  opacity: 1;
}

.link-btn.solution-btn {
  background: rgba(15, 23, 42, 0.95);
  color: #cbd5e1;
  border: 1px solid #1e40af;
}

.link-btn.solution-btn:hover {
  background: #1e3a8a;
  color: #93c5fd;
  border-color: #3b82f6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.link-btn.yt {
  background: rgba(30, 15, 15, 0.95);
  color: #fca5a5;
  border: 1px solid #7f1d1d;
}

.link-btn.yt:hover {
  background: #450a0a;
  color: #f87171;
  border-color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.link-btn.lc {
  background: rgba(30, 25, 10, 0.95);
  color: #fde047;
  border: 1px solid #854d0e;
}

.link-btn.lc:hover {
  background: #451a03;
  color: #fbbf24;
  border-color: #f59e0b;
}

/* ---------- Problems List (Card Container) ---------- */
.problems-list-wrap {
  max-width: 1199px;
  margin: 0 auto;
  padding: 0 var(--sp-lg) var(--sp-section);
}

.problems-list-container {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(13, 20, 36, 0.82) 0%, rgba(8, 12, 22, 0.94) 100%);
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: var(--r-xl);
  overflow: hidden;
  padding: 8px 0;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.category-problems-card {
  background: linear-gradient(180deg, rgba(13, 20, 36, 0.82) 0%, rgba(8, 12, 22, 0.94) 100%);
  border: 1px solid rgba(56, 189, 248, 0.14);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: var(--sp-lg);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.problems-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.problems-table thead {
  position: sticky;
  top: 92px;
  z-index: 50;
  background: var(--canvas);
}

.problems-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: var(--sp-sm) var(--sp-md);
  text-align: left;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}

.problems-table td {
  padding: var(--sp-sm) var(--sp-md);
  border-bottom: 1px solid var(--hairline-soft);
  vertical-align: middle;
}

.problems-table tr:hover td {
  background: var(--surface-1);
}

.problems-table tr.solved td {
  opacity: 0.5;
}

.problems-table tr.solved .td-title {
  text-decoration: line-through;
}

.th-check {
  width: 40px;
  text-align: center;
}

.th-id {
  width: 50px;
}

.th-level {
  width: 80px;
}

.th-time {
  width: 70px;
}

.th-links {
  width: 200px;
}

.th-category {
  width: 180px;
}

.td-check {
  text-align: center;
}

.td-id {
  color: var(--ink-dim);
  font-weight: 500;
}

.td-title {
  font-weight: 500;
  letter-spacing: -0.14px;
}

.td-category {
  color: var(--ink-muted);
  font-size: 13px;
}

.td-time {
  color: var(--ink-muted);
  font-size: 13px;
}

.table-check {
  width: 20px;
  height: 20px;
  border-radius: var(--r-xs);
  border: 2px solid var(--hairline);
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  color: transparent;
  font-size: 11px;
}

.table-check.checked {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.level-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  text-transform: capitalize;
}

.level-basic {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.level-core {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.level-advance,
.level-advanced {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.table-links {
  display: flex;
  gap: 4px;
}

/* ---------- Stats Section ---------- */
.stats-section {
  background: var(--canvas);
}

.stats-grid {
  max-width: 1199px;
  margin: 0 auto;
  padding: 0 var(--sp-lg) var(--sp-section);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-md);
}

.stats-card {
  background: linear-gradient(180deg, rgba(14, 20, 36, 0.88) 0%, rgba(8, 12, 24, 0.96) 100%);
  border: 1px solid rgba(56, 189, 248, 0.14);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.25s ease;
}

.stats-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.12);
}

.stats-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-md);
}

.stats-card-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.stats-card-pct {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--accent-blue);
}

.stats-card-bar {
  height: 6px;
  background: var(--surface-3);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-bottom: var(--sp-xs);
}

.stats-card-fill {
  height: 100%;
  border-radius: var(--r-full);
  transition: width 0.5s ease;
}

.stats-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-dim);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--canvas);
  border-top: 1px solid var(--hairline-soft);
  padding: 64px 32px;
}

.footer-inner {
  max-width: 1199px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-lg);
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
}

.footer-socials {
  width: min(100%, 760px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.footer-social-link:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.38);
  color: #fff;
  transform: translateY(-1px);
}

.footer-social-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.book-vault-icon {
  width: 34px;
  height: 20px;
  border-radius: 3px;
  object-fit: contain;
  background: #fff;
}

.github-icon {
  fill: #fff;
}

.linkedin-icon {
  fill: #0a66c2;
}

@media (max-width: 480px) {
  .footer {
    padding: 48px 16px;
  }

  .footer-socials {
    gap: 8px;
  }

  .footer-social-link {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
  }
}

.footer-links {
  display: flex;
  gap: var(--sp-xl);
}

.footer-links a {
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-note {
  font-size: 12px;
  color: var(--ink-dim);
}

.footer-made {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.footer-made-text {
  color: #fff;
  background: linear-gradient(100deg, #fff 0%, #fff 40%, #090909 49%, #090909 51%, #fff 60%, #fff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: blackShimmer 4.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.footer-heart {
  color: #ff304f;
  font-size: 16px;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .footer-made-text {
    color: #fff;
    background: none;
    -webkit-text-fill-color: #fff;
    animation: none;
  }
}

/* ---------- Scroll to Top ---------- */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 500;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--surface-3);
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.modal-card h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: var(--sp-sm);
}

.modal-card p {
  color: var(--ink-muted);
  font-size: 14px;
  margin-bottom: var(--sp-xl);
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: var(--sp-sm);
  justify-content: center;
}

/* ---------- Hidden / Utility ---------- */
.hidden {
  display: none !important;
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: var(--sp-section) var(--sp-lg);
  color: var(--ink-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: var(--sp-lg);
}

.empty-state-text {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.3px;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeIn 0.3s ease forwards;
}

/* ---------- Responsive ---------- */
@media (max-width: 810px) {
  .nav-links {
    display: none;
  }

  .nav-actions .search-container {
    display: none;
  }

  .nav-actions .btn-primary {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    min-height: 70vh;
    padding-top: 100px;
  }

  .hero-title {
    font-size: clamp(36px, 10vw, 72px);
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .filter-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-sm);
  }

  .problems-table .th-category,
  .problems-table .td-category {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .problem-row {
    grid-template-columns: 36px 1fr;
  }

  .problem-links {
    grid-column: 1 / -1;
    padding-left: 48px;
    padding-top: 4px;
  }

  .section-header {
    padding: var(--sp-xxl) var(--sp-lg) var(--sp-lg);
  }

  .sp-section {
    padding: var(--sp-xxl);
  }
}

@media (max-width: 480px) {
  .hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .stat-pill {
    flex: 1;
    min-width: 80px;
    padding: 12px 16px;
  }

  .stat-number {
    font-size: 22px;
  }

  .hero-title {
    font-size: 36px;
  }

  .step-card {
    padding: 18px;
  }

  .step-name {
    font-size: 17px;
  }

  .filter-pills {
    flex-wrap: wrap;
  }
}

/* ---------- Monochrome problem list refresh ---------- */
.problems-list-container,
.category-problems-card {
  background: #000;
  border-color: #242424;
  box-shadow: none;
}

.category-problems-card {
  border-radius: 16px;
}

.problem-row {
  background: #000;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 0;
  padding: 18px 20px;
  transition: background-color 180ms ease, opacity 420ms ease, transform 420ms ease;
}

.problem-row:last-child {
  border-bottom: 0;
}

.problem-row:hover {
  background: #101010;
}

.problem-title,
.problem-title:hover {
  color: #fff;
}

.problem-tag.tag-core,
.problem-tag.tag-basic,
.problem-tag.tag-advance,
.problem-tag.tag-advanced,
.level-badge.level-core,
.level-badge.level-basic,
.level-badge.level-advance,
.level-badge.level-advanced {
  background: transparent;
  color: #fff;
  border: 0;
  text-transform: lowercase;
}

.problem-tag.tag-core,
.problem-tag.tag-basic,
.problem-tag.tag-advance,
.problem-tag.tag-advanced {
  padding-right: 0;
  padding-left: 0;
}

.problem-tag.tag-time {
  background: #111;
  color: #d4d4d4;
  border-color: #303030;
}

.link-btn.solution-btn,
.link-btn.yt,
.link-btn.lc,
.link-btn.gfg {
  min-height: 40px;
  padding: 8px 15px;
  gap: 8px;
  border-radius: 999px;
  background: #fff;
  color: #050505;
  border: 1px solid #fff;
  font-weight: 600;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.link-btn.solution-btn:hover,
.link-btn.yt:hover,
.link-btn.lc:hover,
.link-btn.gfg:hover {
  color: #000;
  background: #e9e9e9;
  border-color: #e9e9e9;
  box-shadow: 0 3px 12px rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.solution-play-icon {
  width: 12px;
  height: 12px;
  fill: currentColor;
  flex: 0 0 auto;
}

.gfg-mark {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 2px solid #138808;
  border-radius: 50%;
  color: #138808;
  font: 700 11px/1 Arial, sans-serif;
  flex: 0 0 auto;
}

.leetcode-icon {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 auto;
}

.youtube-icon {
  width: 19px;
  height: 14px;
  flex: 0 0 auto;
}

.youtube-mark {
  fill: #ff0000;
}

.youtube-play {
  fill: #fff;
}

.solution-play-icon {
  color: #050505;
}

.leetcode-icon {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 auto;
}

.problem-title .title-word {
  display: inline-block;
  opacity: 0;
  filter: blur(3px);
  transform: translateY(0.24em);
  transition: opacity 420ms ease, filter 520ms ease, transform 520ms cubic-bezier(0.2, 0.75, 0.25, 1);
  transition-delay: calc(var(--word-index, 0) * 28ms);
}

.problem-row.is-visible .problem-title .title-word {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.step-expanded .problem-row.reveal-on-scroll {
  opacity: 0;
  transform: translateY(14px);
}

.step-expanded .problem-row.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.step-expanded .problem-row.solved.reveal-on-scroll.is-visible {
  opacity: 0.65;
}

@media (max-width: 600px) {
  .problems-list-wrap {
    padding-right: 12px;
    padding-left: 12px;
  }

  .step-expanded {
    padding-right: 12px;
    padding-left: 12px;
  }

  .step-expanded-title {
    font-size: clamp(21px, 6vw, 28px);
  }

  .category-title {
    font-size: 16px;
  }

  .category-problems-card {
    border-radius: 12px;
  }

  .problem-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 16px 14px;
  }

  .problem-row-left {
    width: 100%;
    align-items: flex-start;
    gap: 10px;
  }

  .problem-check {
    width: 22px;
    height: 22px;
    margin-top: 1px;
  }

  .problem-info {
    flex: 1;
  }

  .problem-title {
    white-space: normal;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .problem-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 0 0 32px;
  }

  .problem-links .link-btn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px 8px;
    font-size: 12px;
    gap: 6px;
  }

  .problem-links .link-btn > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 810px) {
  .top-nav,
  .mobile-menu {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.hero-eyebrow {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.hero-title {
  display: block;
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.nav-brand .header-brand-icon {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px;
  min-height: 28px;
  padding: 2px;
  flex: 0 0 28px;
}

.nav-brand .header-brand-icon img {
  display: block;
  width: 24px !important;
  height: 24px !important;
  max-width: 24px;
  max-height: 24px;
  object-fit: contain;
}

.mobile-search .search-icon {
  left: 14px;
  z-index: 1;
}

.mobile-search .search-input,
.mobile-search .search-input:focus,
.mobile-search .search-input:focus-visible {
  width: 100%;
  padding-left: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  outline: 0;
  box-shadow: none;
}

.mobile-search .search-input:focus,
.mobile-search .search-input:focus-visible {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .step-expanded .problem-row,
  .step-expanded .problem-row.reveal-on-scroll,
  .problem-title .title-word {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* ---------- Monochrome hero stats with count-up reveal ---------- */
.stat-pill,
.stat-pill.accent {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

.stat-pill:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.stat-number,
.stat-pill.accent .stat-number {
  color: #fff;
  text-shadow: none;
}

.stat-label {
  color: #fff;
}

.hero-stats {
  gap: 32px;
  align-items: flex-start;
}

.hero-subtitle {
  color: #fff;
}

.hero-subtitle .inline-reveal-word,
.hero-eyebrow .inline-reveal-word {
  display: inline-block;
  opacity: 0;
  filter: blur(3px);
  transform: translateY(0.22em);
  transition: opacity 420ms ease, filter 520ms ease, transform 520ms cubic-bezier(0.2, 0.75, 0.25, 1);
  transition-delay: calc(var(--word-index, 0) * 26ms);
}

.hero-subtitle.is-revealed .inline-reveal-word,
.hero-eyebrow .is-revealed .inline-reveal-word,
.hero-eyebrow span.is-revealed .inline-reveal-word {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

@media (max-width: 480px) {
  .hero-stats {
    width: 100%;
    max-width: 360px;
    margin-right: auto;
    margin-left: auto;
    justify-content: center;
    column-gap: 18px;
    row-gap: 24px;
  }

  .stat-pill {
    flex: 0 0 calc((100% - 36px) / 3);
    min-width: 0;
    padding: 0;
  }

  .stat-number {
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stat-pill {
    transition: none;
  }

  .hero-subtitle .inline-reveal-word,
  .hero-eyebrow .inline-reveal-word {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }
}

/* ---------- White step cards with black iconography ---------- */
.steps-grid .step-card,
.steps-grid .step-card[class*="spotlight"] {
  color: #050505;
  background: #fff;
  border: 1px solid #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.steps-grid .step-card::before,
.steps-grid .step-card[class*="spotlight"]::before {
  display: none;
}

.steps-grid .step-card:hover,
.steps-grid .step-card[class*="spotlight"]:hover {
  color: #050505;
  background: #fff;
  border-color: #fff;
  transform: translateY(-2px);
  filter: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

.steps-grid .step-icon {
  color: #050505;
}

.steps-grid .step-icon svg {
  stroke: currentColor;
}

.steps-grid .step-name {
  color: #050505;
}

.steps-grid .step-meta {
  color: #454545;
}

.steps-grid .step-number,
.steps-grid .step-card:not([class*="spotlight"]) .step-number {
  color: #111;
  background: #ededed;
}

.steps-grid .step-progress-bar,
.steps-grid .step-card:not([class*="spotlight"]) .step-progress-bar {
  background: #dedede;
}

.steps-grid .step-progress-fill,
.steps-grid .step-card:not([class*="spotlight"]) .step-progress-fill {
  background: #111;
}

/* ---------- White progress cards ---------- */
.stats-grid .stats-card {
  color: #050505;
  background: #fff;
  border: 1px solid #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.stats-grid .stats-card:hover {
  border-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

.stats-card-name,
.stats-card-pct {
  color: #050505;
}

.stats-card-bar {
  background: #dedede;
}

.stats-card-fill {
  background: #111;
}

.stats-card-meta {
  color: #555;
}

/* ---------- Clear progress separators and step completion ---------- */
.filter-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
}

.progress-track {
  background: #fff;
}

.progress-fill {
  background: #111;
}

.steps-grid .step-meta {
  align-items: center;
  flex-wrap: wrap;
  color: #454545;
}

.steps-grid .step-meta .step-percent {
  margin-left: auto;
  color: #111;
  font-weight: 700;
}

.steps-grid .step-progress-bar {
  height: 5px;
  background: #dedede !important;
}

.steps-grid .step-progress-fill {
  background: #111 !important;
  transition: width 560ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

/* ---------- Plain Book Vault attribution link ---------- */
.hero-eyebrow {
  gap: 6px;
  padding: 0;
  margin-bottom: var(--sp-xl);
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.hero-eyebrow span {
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
  animation: none;
}

.hero-eyebrow span.inline-reveal-word {
  color: #fff;
  background: linear-gradient(100deg, #fff 0%, #fff 40%, #080808 49%, #080808 51%, #fff 60%, #fff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: blackShimmer 4.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.hero-eyebrow .eyebrow-icon {
  color: #fff;
  transition: transform 220ms ease;
}

.hero-eyebrow:hover {
  opacity: 0.78;
  background: transparent;
  transform: translateY(-1px);
}

.hero-eyebrow:hover .eyebrow-icon {
  transform: translate(2px, -2px);
}

@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow span.inline-reveal-word {
    color: #fff;
    background: none;
    -webkit-text-fill-color: #fff;
    animation: none;
  }
}

/* ---------- Near-black canvas and crisp mobile typography ---------- */
:root {
  --canvas: #050505;
  --surface-1: #0b0b0b;
  --surface-2: #141414;
  --surface-3: #202020;
  --hairline: rgba(255, 255, 255, 0.12);
  --hairline-soft: rgba(255, 255, 255, 0.08);
  --ink: #fff;
  --ink-muted: #b8b8b8;
  --ink-dim: #888;
}

html,
body,
.hero,
.filter-bar,
.footer {
  background-color: #050505;
}

body {
  color: #fff;
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.nav-brand .brand-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 2px;
  overflow: hidden;
  border-radius: 5px;
  background: #fff;
  flex: 0 0 auto;
}

.nav-brand .brand-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.top-nav {
  background: rgba(5, 5, 5, 0.94);
}

.mobile-menu {
  background: rgba(5, 5, 5, 0.98);
}

.hero-subtitle {
  color: #fff;
  line-height: 1.58;
}

.hero-subtitle .inline-reveal-word {
  transition-duration: 560ms, 660ms, 660ms;
  transition-timing-function: cubic-bezier(0.2, 0.75, 0.25, 1);
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
  animation: none;
}

@media (max-width: 600px) {
  .hero {
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero-inner {
    width: 100%;
  }

  .hero-subtitle {
    max-width: 36rem;
    font-size: clamp(16px, 4.5vw, 19px);
    line-height: 1.6;
  }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--canvas);
}

::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink-dim);
}

/* ---------- Inline text reveal and reading progress ---------- */
.problem-title,
.problem-title:hover {
  font-size: clamp(16px, 1.25vw, 19px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  color: #fff;
}

.inline-reveal-word:not(.title-word),
.problem-title .title-word {
  display: inline-block;
  opacity: 0;
  filter: blur(2px);
  transform: translate3d(0, 0.18em, 0);
  transition-property: clip-path, opacity, filter, transform;
  transition-duration: 560ms, 420ms, 520ms, 520ms;
  transition-timing-function: cubic-bezier(0.2, 0.75, 0.25, 1), ease, ease, cubic-bezier(0.2, 0.75, 0.25, 1);
  transition-delay: calc(var(--word-index, 0) * 100ms);
  will-change: opacity, transform;
}

.problem-row.is-visible .problem-title .title-word {
  clip-path: inset(0 0 0 0);
  transition-delay: calc(var(--word-index, 0) * 100ms);
}

.problem-title .title-word {
  clip-path: inset(0 100% 0 0);
}

.is-revealed .inline-reveal-word,
.is-revealed .title-word {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0);
}

.hero-title .inline-reveal-word,
.hero-eyebrow span .inline-reveal-word {
  background: inherit;
  background-size: inherit;
  background-position: inherit;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: inherit;
}

.scroll-reading-progress {
  position: fixed;
  z-index: 999;
  top: 56px;
  left: 0;
  width: 100%;
  height: 2px;
  pointer-events: none;
}

.scroll-reading-track,
.scroll-reading-fill {
  height: 100%;
}

.scroll-reading-track {
  width: 100%;
  background: rgba(255, 255, 255, 0.2);
}

.scroll-reading-fill {
  width: 0;
  background: #fff;
  transition: width 90ms linear;
}

.scroll-reading-percent {
  position: absolute;
  top: 5px;
  left: 20px;
  min-width: 38px;
  padding: 4px 7px;
  transform: translateX(-50%);
  border-radius: 5px;
  background: #fff;
  color: #050505;
  font: 600 11px/1.2 'Cormorant Garamond', Georgia, serif;
  font-variant-numeric: tabular-nums;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  .inline-reveal-word:not(.title-word),
  .problem-title .title-word {
    opacity: 1;
    filter: none;
    transform: none;
    clip-path: none;
    transition: none;
    will-change: auto;
  }

  .scroll-reading-fill {
    transition: none;
  }
}


/* ---------- AI tools showcase ---------- */
.ai-tools-section {
  max-width: 1199px;
  margin: 12px auto 76px;
  padding: 44px var(--sp-lg) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.ai-tools-inner {
  width: 100%;
}

.ai-tools-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
}

.ai-tools-kicker {
  color: #8fc29a;
  font: 700 12px/1.2 Arial, sans-serif;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.ai-tools-title {
  margin: 5px 0 2px;
  color: #fff;
  font: 700 clamp(36px, 5.6vw, 64px)/1 'Cormorant Garamond', Georgia, serif;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.ai-tools-marquee {
  width: 100%;
  overflow: hidden;
  background: var(--canvas);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}

.ai-tools-marquee:hover .ai-tools-track {
  animation-play-state: paused;
}

.ai-tools-marquee:focus-within .ai-tools-track {
  animation-play-state: paused;
}

.ai-tools-track {
  display: flex;
  width: max-content;
  animation: ai-tools-marquee 26s linear infinite;
  will-change: transform;
}

.ai-tools-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0;
  padding: 14px 18px 14px 10px;
}

@keyframes ai-tools-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ai-tool-card {
  display: flex;
  min-width: max-content;
  min-height: 0;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 24px;
}

.ai-tool-logo {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  flex: 0 0 auto;
  padding: 5px;
  border-radius: 13px;
  background: #fff;
}

.ai-tool-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.codex-logo {
  padding: 4px;
  border-radius: 14px;
  background: #fff;
}

.opencode-logo {
  width: 150px;
  height: 30px;
  overflow: visible;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.opencode-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ai-tool-name {
  color: #fff;
  font: 600 21px/1.1 'Cormorant Garamond', Georgia, serif;
  text-align: center;
  white-space: nowrap;
}

.ai-tool-card {
  color: #fff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.ai-tool-card:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.founder-note {
  width: min(100%, 840px);
  margin: 28px auto 0;
  padding: 18px 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.founder-note-lines {
  display: grid;
  gap: 5px;
  margin: 0;
  color: #e4e4e4;
  font: 400 clamp(17px, 2vw, 21px)/1.38 'Cormorant Garamond', Georgia, serif;
}

.founder-note-line {
  display: block;
}

.founder-note-line .inline-reveal-word {
  transition-duration: 680ms, 720ms, 720ms;
  transition-delay: calc(var(--word-index, 0) * 48ms);
}

.founder-note-signoff {
  margin: 12px 0 0;
  color: #aaa;
  font: 500 15px/1.35 'Cormorant Garamond', Georgia, serif;
  text-align: right;
}

.progress-guidance-card {
  width: min(100%, 920px);
  margin: 24px auto 0;
  padding: 24px 30px 22px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 22px;
  background: #fff;
  color: #111;
  text-align: center;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

.progress-guidance-card .section-subtitle {
  margin: 0 0 12px;
  color: #111;
  font-weight: 600;
}

.progress-guidance-card .founder-note {
  width: 100%;
  margin: 0 auto;
  padding: 0;
  border: 0;
  color: #111;
  text-align: center;
}

.progress-guidance-card .founder-note-lines,
.progress-guidance-card .founder-note-signoff {
  color: #111;
  text-align: center;
}

@media (max-width: 720px) {
  .ai-tools-section {
    margin-top: 4px;
    margin-bottom: 50px;
    padding: 30px 0 0;
  }

  .ai-tools-heading {
    padding: 0 14px;
    margin-bottom: 22px;
  }

  .ai-tools-title {
    font-size: clamp(32px, 9vw, 48px);
  }

  .ai-tools-group {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .ai-tool-card {
    gap: 11px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .ai-tool-logo {
    width: 48px;
    height: 48px;
  }

  .opencode-logo {
    width: 116px;
    height: 24px;
  }

  .ai-tool-name {
    font-size: 18px;
  }

  .ai-tools-track {
    animation-duration: 22s;
  }

  .founder-note {
    margin-top: 22px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .progress-guidance-card {
    margin-top: 18px;
    padding: 20px 16px 18px;
    border-radius: 18px;
  }

  .founder-note-lines {
    gap: 7px;
    font-size: 18px;
    line-height: 1.42;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-tools-marquee {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .ai-tools-track {
    animation: none;
  }

  .ai-tools-group[aria-hidden="true"] {
    display: none;
  }
}

/* ============================================================
   IN-APP ARTICLE & CODE VIEWER (NO REDIRECTS)
   ============================================================ */

.reader-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 6, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-lg);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.reader-modal-overlay.open {
  display: flex;
  opacity: 1;
}

.reader-modal-container {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 1100px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), inset 0 0.5px 0 rgba(255, 255, 255, 0.1);
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalScaleUp {
  from {
    transform: scale(0.96) translateY(10px);
    opacity: 0;
  }

  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.reader-header {
  padding: 20px 24px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  flex-shrink: 0;
}

.reader-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.reader-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-dim);
  font-weight: 500;
}

.reader-breadcrumbs span.step {
  color: var(--accent-blue);
}

.reader-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.reader-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  color: var(--ink-muted);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.reader-close-btn:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.reader-nav-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--hairline-soft);
  flex-shrink: 0;
  overflow-x: auto;
}

.reader-nav-tab {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.reader-nav-tab:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.reader-nav-tab.active {
  color: var(--ink);
  background: var(--surface-2);
  border-color: rgba(255, 255, 255, 0.1);
}

.reader-content-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px 36px;
  color: #d1d5db;
  font-size: 15px;
  line-height: 1.6;
}

/* Complexity Summary Pill Group */
.complexity-box {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
}

.complexity-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.complexity-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-dim);
}

.complexity-value {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Code Editor in Reader */
/* ============================================================
   IDE-STYLE CODE VIEWER
   ============================================================ */

.ide-window {
  display: flex;
  flex-direction: column;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 0.5px 0 rgba(255, 255, 255, 0.08);
}

.ide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #161b22;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
  flex-wrap: wrap;
}

.ide-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ide-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ide-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red {
  background: #ff5f56;
}

.dot-yellow {
  background: #ffbd2e;
}

.dot-green {
  background: #27c93f;
}

.ide-file-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #8b949e;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ide-file-icon {
  font-size: 14px;
}

.ide-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ide-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.08);
  color: #c9d1d9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.15s;
}

.ide-copy-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.ide-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #090d13;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.ide-approaches-group {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  overflow-x: auto;
}

.ide-approach-btn {
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  color: #8b949e;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.ide-approach-btn:hover {
  color: #c9d1d9;
  background: rgba(255, 255, 255, 0.08);
}

.ide-approach-btn.active {
  background: rgba(35, 134, 54, 0.2);
  color: #3fb950;
  border-color: rgba(63, 185, 80, 0.4);
}

.ide-lang-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
}

.ide-lang-tab {
  padding: 10px 14px;
  background: transparent;
  color: #8b949e;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.ide-lang-tab:hover {
  color: #c9d1d9;
}

.ide-lang-tab.active {
  color: #58a6ff;
  border-bottom-color: #58a6ff;
  background: rgba(88, 166, 255, 0.06);
  font-weight: 600;
}

.ide-editor-container {
  display: flex;
  background: #0d1117;
  max-height: 560px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
}

.ide-line-numbers {
  padding: 16px 12px;
  text-align: right;
  color: #484f58;
  user-select: none;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: #090d13;
  font-size: 12px;
  min-width: 44px;
  flex-shrink: 0;
}

.ide-code-pane {
  padding: 16px 20px;
  overflow-x: auto;
  flex: 1;
  color: #e6edf3;
  margin: 0;
  white-space: pre;
}

/* Syntax Highlighting */
.syn-keyword {
  color: #ff7b72;
  font-weight: 500;
}

.syn-string {
  color: #a5d6ff;
}

.syn-comment {
  color: #8b949e;
  font-style: italic;
}

.syn-number {
  color: #79c0ff;
}

.syn-function {
  color: #d2a8ff;
}

.syn-type {
  color: #ffa657;
}

/* Article Body Enhancement - Clean up ugly tables */
.reader-prose table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  overflow: hidden;
}

.reader-prose th {
  background: var(--surface-2);
  color: #f3f4f6;
  font-weight: 600;
  font-size: 13px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--hairline);
}

.reader-prose td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 14px;
  color: #d1d5db;
}

.reader-prose tr:last-child td {
  border-bottom: none;
}

/* Examples callout styling */
.reader-prose h3:has(+ p code) {
  margin-top: 24px;
  color: #38bdf8;
}

/* Article Typography Styling */
.reader-prose h1,
.reader-prose h2,
.reader-prose h3,
.reader-prose h4 {
  color: var(--ink);
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.reader-prose h2 {
  font-size: 20px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 8px;
}

.reader-prose h3 {
  font-size: 17px;
}

.reader-prose h4 {
  font-size: 15px;
}

.reader-prose p {
  margin-bottom: 16px;
  line-height: 1.6;
}

.reader-prose ul,
.reader-prose ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.reader-prose li {
  margin-bottom: 6px;
}

.reader-prose code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: #38bdf8;
}

.reader-prose pre {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.reader-prose strong {
  color: var(--ink);
  font-weight: 600;
}

.reader-prose blockquote {
  border-left: 3px solid var(--accent-blue);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--ink-muted);
}

.reader-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.reader-prose th,
.reader-prose td {
  padding: 10px 14px;
  border: 1px solid var(--hairline);
  text-align: left;
}

.reader-prose th {
  background: var(--surface-1);
  color: var(--ink);
}

.reader-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  gap: 16px;
  color: var(--ink-muted);
}

.reader-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--surface-3);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

@media (max-width: 810px) {
  .reader-modal-overlay {
    padding: 0;
  }

  .reader-modal-container {
    height: 100vh;
    border-radius: 0;
    max-width: 100%;
  }

  .reader-content-body {
    padding: 20px 16px;
  }

  .reader-header {
    padding: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .reader-actions {
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }

  .reader-actions .btn-primary,
  .reader-actions .btn-secondary {
    min-height: 40px;
  }

  .reader-nav-tabs {
    padding: 8px 16px;
  }
}


/* Inline problem numbering with a restrained black sheen across white type. */
.problem-title-line {
  display: flex;
  align-items: baseline;
  gap: 0.48em;
  min-width: 0;
}

.problem-number {
  flex: 0 0 auto;
  color: #fff;
  font-size: 0.76em;
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1.35;
  white-space: nowrap;
  background: linear-gradient(108deg, #fff 0%, #fff 38%, #171717 49%, #fff 61%, #fff 100%);
  background-size: 240% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: problem-number-sheen 4.8s ease-in-out infinite;
}

.problem-title-line .problem-title {
  flex: 1 1 auto;
  min-width: 0;
}

@keyframes problem-number-sheen {
  0%, 15% { background-position: 100% 0; }
  75%, 100% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .problem-number { animation: none; }
}



/* Problem source picker: one compact control, only real direct destinations. */
.platform-links { position: relative; flex: 0 0 auto; }
.platform-links > summary { list-style: none; }
.platform-links > summary::-webkit-details-marker { display: none; }
.platform-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.platform-chevron { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform 160ms ease; }
.platform-links[open] .platform-chevron { transform: rotate(180deg); }
.platform-options { position: absolute; z-index: 30; right: 0; bottom: calc(100% + 8px); display: grid; min-width: 176px; padding: 6px; gap: 4px; background: #fff; color: #101010; border: 1px solid rgba(0,0,0,.12); border-radius: 14px; box-shadow: 0 14px 36px rgba(0,0,0,.35); }
.platform-option { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 9px; color: #111; text-decoration: none; font-size: 13px; font-weight: 600; }
.platform-option:hover { background: #f0f0f0; }
.link-btn.yt { cursor: pointer; }

.youtube-player-overlay { position: fixed; inset: 0; z-index: 4000; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.youtube-player-overlay.open { display: flex; }
.youtube-player-dialog { width: min(920px, 100%); overflow: hidden; border: 1px solid rgba(255,255,255,.16); border-radius: 20px; background: #0b0b0b; color: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.55); }
.youtube-player-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; }
.youtube-player-header h2 { min-width: 0; margin: 0; font-size: clamp(16px, 2.5vw, 21px); font-weight: 600; }
.youtube-player-frame-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.youtube-player-frame-wrap iframe { display: block; width: 100%; height: 100%; border: 0; }
.youtube-player-frame-wrap iframe[hidden], .youtube-player-fallback[hidden] { display: none; }
.youtube-player-fallback { display: grid; width: 100%; height: 100%; place-items: center; padding: 24px; color: #d4d4d4; text-align: center; font-size: 15px; }
.youtube-watch-link { display: flex; align-items: center; justify-content: center; gap: 10px; width: max-content; max-width: calc(100% - 32px); min-height: 44px; margin: 16px auto 20px; padding: 0 18px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: #fff; color: #111; font-size: 14px; font-weight: 600; text-decoration: none; }
.youtube-watch-link .youtube-icon { width: 20px; height: 15px; }
@media (max-width: 480px) {
  .platform-links { min-width: 0; }
  .platform-links > summary { width: 100%; }
  .platform-options { right: auto; left: 0; bottom: calc(100% + 6px); min-width: min(210px, 68vw); }
  .youtube-player-overlay { padding: 12px; }
  .youtube-player-dialog { border-radius: 15px; }
  .youtube-player-header { padding: 13px 14px; }
}

.platform-empty { display: block; max-width: 230px; padding: 10px 12px; color: #555; font-size: 12px; line-height: 1.45; }


/* Header link filters */
.platform-filter-group { border: 0; margin: 0; padding: 0; }
.platform-filter-options { display: flex; align-items: center; gap: 8px; }
.platform-filter-option { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 11px; border: 1px solid var(--hairline); border-radius: var(--r-pill); color: var(--ink-muted); font-size: 12px; cursor: pointer; transition: color .16s ease, border-color .16s ease, background .16s ease; }
.platform-filter-option:hover { color: var(--ink); border-color: rgba(255,255,255,.34); }
.platform-filter-option:has(input:checked) { color: #111; background: #fff; border-color: #fff; }
.platform-filter-option input { width: 14px; height: 14px; margin: 0; accent-color: #111; cursor: pointer; }
.platform-filter-option:has(input:checked) input { accent-color: #111; }
@media (max-width: 480px) {
  .platform-filter-options { flex-wrap: wrap; gap: 6px; }
  .platform-filter-option { min-height: 36px; }
}


/* Header version and problem-link information */
.brand-version { color: #fff; font-family: Inter, Arial, sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .04em; line-height: 1; }
.brand-info { position: relative; flex: 0 0 auto; }
.brand-info > summary { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; background: #fff; color: #050505; list-style: none; cursor: pointer; }
.brand-info > summary::-webkit-details-marker { display: none; }
.brand-info > summary span { display: block; font-family: Arial, sans-serif; font-size: 13px; font-style: normal; font-weight: 700; line-height: 1; }
.brand-info > summary:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.brand-info-popover { position: absolute; z-index: 200; top: calc(100% + 12px); left: 0; width: min(310px, calc(100vw - 32px)); padding: 14px 16px; border: 1px solid rgba(255,255,255,.24); border-radius: 12px; background: #111; color: #fff; white-space: normal; font-family: Inter, Arial, sans-serif; font-size: 13px; font-weight: 400; line-height: 1.5; letter-spacing: 0; box-shadow: 0 12px 34px rgba(0,0,0,.42); }
@media (max-width: 480px) {
  .brand-text { font-size: 14px; }
  .brand-info-popover { left: 0; }
}


/* White SVG leaves drifting down through the hero background. */
.hero { isolation: isolate; }
.leaf-fall-layer { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.falling-leaf { position: absolute; top: -9%; left: var(--leaf-left); width: var(--leaf-size); height: var(--leaf-size); opacity: 0; animation: leaf-fall var(--leaf-duration) linear var(--leaf-delay) infinite; will-change: transform, opacity; }
.falling-leaf svg { display: block; width: 100%; height: 100%; overflow: visible; }
.leaf-shape { fill: rgba(255,255,255,.9); }
.leaf-vein { fill: none; stroke: rgba(8,8,8,.62); stroke-width: .8; stroke-linecap: round; }
@keyframes leaf-fall {
  0% { opacity: 0; transform: translate3d(0,-5vh,0) rotate(-24deg); }
  8% { opacity: .42; }
  48% { transform: translate3d(var(--leaf-drift),48vh,0) rotate(152deg); }
  90% { opacity: .3; }
  100% { opacity: 0; transform: translate3d(calc(var(--leaf-drift) * -1),112vh,0) rotate(330deg); }
}
@media (prefers-reduced-motion: reduce) {
  .leaf-fall-layer { display: none; }
}
@media (max-width: 600px) {
  .falling-leaf { opacity: .28; }
}

/* Remove pointer-click focus boxes; keep a clear white keyboard focus ring. */
button,
a,
summary,
input[type="checkbox"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
summary:focus:not(:focus-visible),
input[type="checkbox"]:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
  box-shadow: none;
}

.brand-info { flex: 0 0 22px; }
.brand-info > summary { width: 22px; height: 22px; }

@media (max-width: 480px) {
  .nav-inner { padding-right: 12px; padding-left: 12px; }
  .nav-brand { min-width: 0; gap: 5px; }
  .brand-text { font-size: 13px; }
  .brand-version { font-size: 9px; }
  .brand-info-popover {
    position: fixed;
    top: 66px;
    right: auto;
    left: 50%;
    width: min(320px, calc(100vw - 24px));
    transform: translateX(-50%);
  }
}

/* Keep the footer credit and Book Vault link legible at every shimmer phase. */
.footer-made-text,
.footer-made-text .inline-reveal-word,
.hero-eyebrow span,
.hero-eyebrow span.inline-reveal-word,
.hero-eyebrow span .inline-reveal-word {
  color: #fff !important;
  background: none !important;
  -webkit-text-fill-color: #fff !important;
  animation: none !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  clip-path: none !important;
}
