/* ================================================================================================
   LEGACY BUILDERS ASSOCIATION - DESIGN SYSTEM
   Professional Trading Education Platform
   ================================================================================================
   
   Brand Colors:
   - Primary: #111827 (Deep slate)
   - Accent: #0fb5b3 (Teal)
   - Accent Alt: #4c4fd8 (Blue)
   
   Typography:
   - Headings: Space Grotesk (display font)
   - Body: Work Sans (readable UI font)
   
   Design Principles:
   - Clean, professional aesthetic
   - Accessibility-first approach
   - Mobile-responsive design
   - Smooth micro-interactions
   
   NOTE: All original styles preserved. Encoding issues fixed.
   ================================================================================================ */

/* ==============================
   Legacy Builders Association – Design System
   (LightLMS branded version)
   ============================== */

:root {
  /* === Legacy Builders brand tokens === */
  --lba-color-primary: #111827;
  --lba-color-bg: #f9fafb;
  --lba-color-accent: #0fb5b3;
  --lba-color-accent-alt: #4c4fd8;
  --lba-color-border: #d1d5db;
  --lba-color-text-muted: #6b7280;
  --lba-color-success: #16a34a;
  --lba-color-warning: #fbbf24;
  --lba-color-danger: #dc2626;

  --lba-radius-card: 16px;
  --lba-radius-pill: 999px;

  --lba-font-heading: "Space Grotesk", system-ui, -apple-system, "Segoe UI",
    sans-serif;
  --lba-font-body: "Work Sans", system-ui, -apple-system, "Segoe UI",
    sans-serif;

  /* === Mapped LightLMS tokens (keep old names for HTML/JS) === */

  /* Backgrounds & surfaces */
  --color-bg: var(--lba-color-bg);
  --color-bg-alt: #eef2ff;
  --color-surface: #ffffff;
  --color-surface-soft: #f3f4f6;
  --color-surface-hover: #f9fafb;

  /* Primary + accents */
  --color-primary: var(--lba-color-primary);
  --color-primary-hover: #020617;
  --color-primary-soft: rgba(17, 24, 39, 0.06);
  --color-primary-softer: rgba(17, 24, 39, 0.03);

  --color-accent: var(--lba-color-accent);
  --color-accent-hover: var(--lba-color-accent-alt);
  --color-accent-soft: rgba(15, 181, 179, 0.12);

  /* Status colors */
  --color-success: var(--lba-color-success);
  --color-success-soft: rgba(22, 163, 74, 0.12);
  --color-warning: var(--lba-color-warning);
  --color-warning-soft: rgba(251, 191, 36, 0.16);
  --color-danger: var(--lba-color-danger);
  --color-danger-soft: rgba(220, 38, 38, 0.12);

  /* Borders */
  --color-border-subtle: rgba(15, 23, 42, 0.06);
  --color-border-strong: rgba(15, 23, 42, 0.16);
  --color-border-focus: var(--lba-color-accent);

  /* Text */
  --color-text-main: var(--lba-color-primary);
  --color-text-secondary: #374151;
  --color-text-muted: var(--lba-color-text-muted);
  --color-text-soft: #9ca3af;
  --color-text-inverse: #ffffff;

  /* Typography scale */
  --font-sans: var(--lba-font-body);
  --font-display: var(--lba-font-heading);

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;
  --fs-4xl: 2.25rem;
  --fs-5xl: 3rem;

  /* Line heights */
  --lh-tight: 1.2;
  --lh-snug: 1.4;
  --lh-base: 1.6;
  --lh-relaxed: 1.75;
  --lh-loose: 2;

  /* Letter spacing */
  --ls-tight: -0.02em;
  --ls-normal: 0;
  --ls-wide: 0.025em;

  /* Spacing */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4rem;
  --space-12: 5rem;
  --space-16: 8rem;

  /* Radius */
  --radius-xs: 0.25rem;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 8px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 20px 40px rgba(15, 23, 42, 0.16);
  --shadow-2xl: 0 25px 50px rgba(15, 23, 42, 0.2);

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 960px;
  --max-width-wide: 1440px;
  --nav-height: 72px;
  --nav-height-mobile: 64px;

  /* Transitions */
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 350ms;

  --transition-fast: var(--duration-fast) var(--ease-out);
  --transition-base: var(--duration-base) var(--ease-out);
  --transition-slow: var(--duration-slow) var(--ease-out);
}

/* Dark-mode placeholder (can be expanded later) */
@media (prefers-color-scheme: dark) {
  :root {
    /* override palette if you want a dark theme later */
  }
}

/* ==============================
   Base Reset & Typography
   ============================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  color: var(--color-text-main);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
    color: inherit;

}

.h1 {
  font-size: clamp(2rem, 5vw, var(--fs-5xl));
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: var(--space-4);
}

.h2 {
  font-size: clamp(1.5rem, 4vw, var(--fs-3xl));
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.h3 {
  font-size: clamp(1.25rem, 3vw, var(--fs-2xl));
  font-weight: 600;
  margin-bottom: var(--space-2);
}

p {
  margin: 0 0 var(--space-4) 0;
  line-height: var(--lh-relaxed);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

.text-muted {
  color: var(--color-text-muted);
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* ==============================
   Layout Structure
   ============================== */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header / Nav */

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  background: var(--lba-color-primary);
  color: #f9fafb;
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.4);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.app-header.scrolled {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.7);
}

.nav-inner {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

/* Brand mark – “Stair” logo using pseudo elements */
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  transition: transform var(--transition-fast);
  color: inherit;
}

.brand:hover {
  transform: translateX(2px);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    var(--lba-color-accent) 0%,
    var(--lba-color-accent-alt) 100%
  );
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.4);
  overflow: hidden;
  font-size: 0; /* hide "L" text visually */
}

.brand-mark::before {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 9px;
  width: 6px;
  height: 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    8px -6px 0 0 rgba(255, 255, 255, 0.9),
    16px -12px 0 0 rgba(255, 255, 255, 0.85);
}

.brand-name {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f9fafb;
}

.brand-name::after {
  content: "Association";
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(249, 250, 251, 0.7);
}

/* Navigation links */

.nav-links {
  display: flex;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  padding: var(--space-2) var(--space-3);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: rgba(249, 250, 251, 0.8);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(15, 181, 179, 0.18);
  text-decoration: none;
}

.nav-link--active {
  color: #ffffff;
  background: rgba(15, 181, 179, 0.32);
}

.nav-link--active::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: var(--space-3);
  right: var(--space-3);
  height: 2px;
  background: var(--lba-color-accent);
  border-radius: var(--radius-full);
}

/* Nav actions / auth buttons */

.nav-actions {
  display: flex;
  gap: var(--space-3);
}

/* Mobile nav toggle */

.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: transparent;
  color: #e5e7eb;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  position: relative;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-icon::before {
  top: -5px;
}

.nav-toggle-icon::after {
  top: 5px;
}

.app-header.app-header--open .nav-toggle-icon {
  transform: rotate(45deg);
}

.app-header.app-header--open .nav-toggle-icon::before {
  transform: rotate(90deg);
  top: 0;
}

.app-header.app-header--open .nav-toggle-icon::after {
  opacity: 0;
}

/* Main content area */

.app-main {
  flex: 1;
  padding: var(--space-8) var(--space-5) var(--space-12);
}

.app-main-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Footer */

.app-footer {
  background: #020617;
  border-top: 1px solid rgba(15, 23, 42, 0.8);
  padding: var(--space-6) var(--space-5);
  text-align: center;
  font-size: var(--fs-sm);
  color: rgba(249, 250, 251, 0.7);
}

/* ==============================
   Buttons
   ============================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7rem 1.4rem;
  border-radius: var(--lba-radius-pill);
  border: 1px solid transparent;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
  opacity: 0.7;
}

.btn:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* Primary CTA – Builder teal */

.btn--primary {
  background: var(--lba-color-accent);
  color: #020617;
  border-color: transparent;
  box-shadow: 0 14px 30px rgba(15, 181, 179, 0.4);
}

.btn--primary:hover {
  background: var(--lba-color-accent-alt);
  color: #020617;
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(76, 79, 216, 0.4);
  text-decoration: none;
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Secondary = white pill */

.btn--accent {
  background: #ffffff;
  color: var(--lba-color-primary);
  border-color: var(--lba-color-border);
  box-shadow: var(--shadow-xs);
}

.btn--accent:hover {
  background: #f9fafb;
  border-color: #cbd5e1;
}

/* Ghost */

.btn--ghost {
  background: transparent;
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.5);
}

.btn--ghost:hover {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.9);
  color: #ffffff;
  text-decoration: none;
}

/* Sizes */

.btn--sm {
  padding: 0.45rem 0.9rem;
  font-size: var(--fs-xs);
}

.btn--lg {
  padding: 0.9rem 1.7rem;
  font-size: var(--fs-md);
}

.btn--block {
  width: 100%;
}

/* ==============================
   Generic Cards
   ============================== */

.card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-subtle);
  padding: var(--space-5);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* ==============================
   Hero Section (homepage)
   ============================== */

.hero {
  padding: var(--space-8) 0 var(--space-10);
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: var(--space-10);
  align-items: center;
}

.hero-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: rgba(15, 181, 179, 0.1);
  color: var(--lba-color-accent);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--lba-color-accent);
}

.hero-subtitle {
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  color: var(--color-text-secondary);
  max-width: 600px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-subtle);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.hero-stat strong {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--color-primary);
}

.hero-side {
  background: var(--color-surface);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--color-border-subtle);
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
}

.hero-side-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(15, 181, 179, 0.1);
  color: var(--lba-color-accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-side-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-top: var(--space-3);
}

.hero-side-course {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.hero-side-meta {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
}

.hero-side-stats {
  display: flex;
  gap: var(--space-4);
  margin: var(--space-4) 0;
}

.hero-side-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hero-side-stat-value {
  font-weight: 700;
}

/* ==============================
   Sections & Feature Cards
   ============================== */

.section {
  padding: var(--space-8) 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  max-width: 480px;
}

.section--key-features {
  border-top: 1px solid var(--color-border-subtle);
}

/* Feature grid */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.feature-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: left;
  border: 1px solid var(--color-border-subtle);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(
    circle at top left,
    rgba(15, 181, 179, 0.28),
    transparent 55%
  );
  opacity: 0;
  transition: opacity var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-4);
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--color-primary-soft),
    var(--color-accent-soft)
  );
  color: var(--color-primary);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-title {
  font-size: var(--fs-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.feature-text {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  line-height: var(--lh-relaxed);
}

/* Social proof / testimonials */

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.testimonial-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-subtle);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.testimonial-rating {
  color: #fbbf24;
  margin-bottom: var(--space-3);
}

.testimonial-text {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.testimonial-author {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
}

/* CTA band */

.cta-band {
  margin-top: var(--space-8);
}

.cta-inner {
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #111827, #020617);
  color: #f9fafb;
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  box-shadow: var(--shadow-lg);
}

.cta-title {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-2);
}

.cta-text {
  font-size: var(--fs-sm);
  color: rgba(249, 250, 251, 0.8);
  max-width: 540px;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* Tools section */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.tool-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-subtle);
  padding: var(--space-5);
}

.tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--color-primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}

.tool-title {
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.tool-text {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
}

/* ==============================
   Forms & Auth Layout (shared)
   ============================== */

.form-field {
  margin-bottom: var(--space-4);
}

.form-row {
  display: flex;
  gap: var(--space-3);
}

.form-row--split > .form-field {
  flex: 1;
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-main);
}

.form-label-optional {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: 0.8em;
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-sm);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background: #ffffff;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast), background var(--transition-fast);
}

.form-input:focus {
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(15, 181, 179, 0.24);
  outline: none;
}

.form-help-text {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

/* Generic auth card (signup/profile) */

.auth-page {
  display: flex;
  justify-content: center;
}

.auth-layout {
  max-width: 640px;
  width: 100%;
}

.auth-card {
  background: var(--color-surface);
  border-radius: 1.5rem;
  border: 1px solid var(--color-border-subtle);
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
}

.auth-title {
  font-size: 1.6rem;
  margin-bottom: var(--space-2);
}

.auth-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

/* ==============================
   Courses Page – cards & filters
   ============================== */

.courses-hero {
  background: linear-gradient(135deg, #111827, #020617);
  color: #f9fafb;
  padding: 3.5rem 0 3rem;
  margin: -3rem -1.5rem 3rem;
  border-radius: 0 0 2rem 2rem;
}
/* Make hero titles pop on gradients */
.courses-hero h1,
.dashboard-hero .dash-hero-title {
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.courses-hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.courses-hero h1 {
  font-size: clamp(2rem, 4vw, 2.7rem);
  margin-bottom: 0.75rem;
}

.courses-hero p {
  font-size: 0.95rem;
  color: rgba(249, 250, 251, 0.8);
  max-width: 640px;
  margin: 0 auto;
}

/* Controls */

.courses-controls {
  max-width: var(--max-width);
  margin: 0 auto 1.5rem;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 360px;
}

.search-input {
  width: 100%;
  padding: 0.75rem 0.9rem 0.75rem 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  background: #ffffff;
}

.search-input:focus {
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 1px rgba(15, 181, 179, 0.2);
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: #9ca3af;
}

/* Course grid */

.courses-grid-enhanced {
  max-width: var(--max-width);
  margin: 0 auto 3.5rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
  align-items: stretch;
}

.course-card-enhanced {
  background: #ffffff;
  border-radius: 1.25rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-card-enhanced:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

/* Thumbnail */

.course-thumbnail {
  height: 140px;
  background: radial-gradient(
      circle at top left,
      rgba(15, 181, 179, 0.4),
      transparent 50%
    ),
    linear-gradient(135deg, #111827, #020617);
  position: relative;
  overflow: hidden;
}

.course-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Duration mini chip */

.course-duration {
  position: absolute;
  bottom: 0.9rem;
  right: 1rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  color: #f9fafb;
  font-size: 0.75rem;
}

/* Body */

.course-card-body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 100%;
}

.course-category-tag {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.category-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-accent);
}

.course-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-main);
}

.course-card-description {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin: 0.25rem 0 0.4rem;
}

.course-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid #f3f4f6;
}

.course-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-main);
}

.course-price.free {
  color: var(--color-success);
}

/* ==============================
   Course overview pages
   ============================== */

.course-hero {
  padding: var(--space-6) 0 var(--space-6);
}

.course-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: var(--space-6);
  align-items: flex-start;
}

.course-hero-main .course-hero-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin-top: var(--space-3);
  max-width: 640px;
}

.course-hero-meta {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.course-hero-aside {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-subtle);
  padding: var(--space-4);
  box-shadow: var(--shadow-md);
  font-size: 0.9rem;
}

.course-hero-price {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.course-hero-note {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.course-hero-list {
  margin: var(--space-3) 0 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

/* Course body */

.course-body {
  padding-top: var(--space-4);
}

.course-body-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  gap: var(--space-6);
}

.course-body-heading {
  font-size: 1.1rem;
  margin-bottom: var(--space-3);
}

.course-learn-list {
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.course-body-text {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.course-body-curriculum .curriculum-section {
  border: 1px solid var(--color-border-subtle);
  border-radius: 1rem;
  padding: 1.15rem 1.2rem;
  margin-bottom: 0.9rem;
  background: var(--color-surface);
}

.curriculum-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: 0.25rem;
}

.curriculum-title {
  font-size: 0.95rem;
}

.curriculum-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.curriculum-lessons {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

/* ==============================
   Dashboard & Continue Cards
   ============================== */

.dashboard-hero {
  background: linear-gradient(135deg, #111827 0%, #0fb5b3 100%);
  color: white;
  margin: -3rem -1.5rem 3rem;
  padding: 2.75rem 0 2.25rem;
  border-radius: 0 0 2rem 2rem;
}

.dashboard-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-end;
}

.dash-hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

.dash-hero-title {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 800;
  margin-top: 0.35rem;
  margin-bottom: 0.4rem;
}

.dash-hero-subtitle {
  font-size: 0.95rem;
  opacity: 0.9;
  max-width: 520px;
}

.dash-hero-card {
  background: rgba(15, 23, 42, 0.32);
  border-radius: 1.25rem;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  min-width: 240px;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.dash-hero-card-row {
  display: flex;
  justify-content: space-between;
  margin-top: 0.15rem;
}

/* Layout */

.dashboard-layout {
  max-width: var(--max-width);
  margin: 0 auto 3.5rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 2rem;
}

/* Continue card */

.continue-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: 1.25rem 1.5rem;
  border-radius: 1.25rem;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-6);
}

.continue-main {
  max-width: 520px;
}

.continue-title {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.continue-text {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* Stats grid */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}

.stat-card {
  background: var(--color-surface);
  border-radius: 1.25rem;
  border: 1px solid var(--color-border-subtle);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
  font-size: 0.85rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.stat-detail {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  margin-top: 0.4rem;
}

/* ==============================
   Workbooks page
   ============================== */
.workbooks-hero {
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  margin: -3rem -1.5rem 3rem;
  padding: 3rem 0 2.5rem;
  border-radius: 0 0 2rem 2rem;
}

.workbooks-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

.workbooks-hero-main {
  max-width: 640px;
}

.workbooks-eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #2563eb;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.workbooks-title {
  font-size: clamp(2rem, 3.3vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 0.4rem;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.workbooks-subtitle {
  font-size: 0.95rem;
  color: #4b5563;
  margin-bottom: 0.6rem;
  max-width: 600px;
}

.workbooks-hero-tagline {
  font-size: 0.85rem;
  color: #6b7280;
  max-width: 580px;
}

.workbooks-hero-side {
  min-width: 260px;
  max-width: 340px;
  background: white;
  border-radius: 1.25rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.85rem;
}

.workbooks-hero-side h3 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.workbooks-hero-side p {
  margin-bottom: 0.6rem;
  color: #4b5563;
}

.workbooks-hero-side ul {
  padding-left: 1rem;
  margin: 0;
  color: #6b7280;
  font-size: 0.85rem;
}

/* Main layout */
.workbooks-layout {
  max-width: 1200px;
  margin: 0 auto 3.5rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 2rem;
  align-items: flex-start;
}

/* Workbook cards */
.workbooks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.workbook-card {
  background: white;
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workbook-header {
  padding: 0.9rem 1.25rem 0.85rem;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.workbook-header-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.workbook-tag {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.9;
}

.workbook-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.workbook-badge {
  font-size: 0.8rem;
  background: rgba(15, 23, 42, 0.2);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.workbook-body {
  padding: 1.1rem 1.5rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.workbook-body p {
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
}

.workbook-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #6b7280;
}

.workbook-chip {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #f9fafb;
}

.workbook-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Resource links */
.resource-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  background: #f9fafb;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  font-size: 0.85rem;
  color: #374151;
}

.resource-link:hover {
  background: #eef2ff;
  border-color: #e0e7ff;
}

/* Sidebar cards */
.sidebar-block {
  background: white;
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  padding: 1.25rem 1.5rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.sidebar-block h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.sidebar-block ol {
  margin: 0.3rem 0 0;
  padding-left: 1.2rem;
  color: #6b7280;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 900px) {
  .workbooks-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .workbooks-hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .workbooks-hero {
    margin: -3rem -1rem 2rem;
    border-radius: 0 0 1.25rem 1.25rem;
  }
}


/* ==============================
   Risk banner (global component)
   ============================== */

.risk-banner {
  background: #fef2f2;
  border-left: 4px solid var(--color-danger);
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.85rem;
  color: #7f1d1d;
  margin-top: 1.5rem;
}

.risk-banner strong {
  display: block;
  color: #991b1b;
  margin-bottom: 0.25rem;
}

/* ==============================
   Scroll reveal helper
   ============================== */

/* Default: visible, no animation (if JS never runs) */
[data-reveal] {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}

/* When JS marks the page as ready for reveal animations */
body.reveal-ready [data-reveal] {
  opacity: 0;
}

body.reveal-ready [data-reveal="up"] {
  transform: translateY(30px);
}

body.reveal-ready [data-reveal="right"] {
  transform: translateX(-30px);
}

body.reveal-ready [data-reveal="left"] {
  transform: translateX(30px);
}

/* When IntersectionObserver says it's visible */
body.reveal-ready [data-reveal].reveal-visible {
  opacity: 1;
  transform: translate(0);
}



/* ==============================
   Responsive
   ============================== */

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .course-hero-layout,
  .course-body-layout,
  .dashboard-layout,
  .workbooks-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .app-main {
    padding: var(--space-6) var(--space-3) var(--space-8);
  }

  .nav-links,
  .nav-actions {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .app-header.app-header--open .nav-links,
  .app-header.app-header--open .nav-actions {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #020617;
    padding: 0.75rem 1.5rem 1.25rem;
    gap: 0.5rem;
  }

  .courses-hero,
  .workbooks-hero,
  .dashboard-hero {
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0 0 1.5rem 1.5rem;
  }

  .cta-inner {
    padding: var(--space-4);
  }
}

@media (max-width: 640px) {
  .hero-side-stats {
    flex-direction: column;
  }

  .continue-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==============================
   Dashboard page
   ============================== */
    .dashboard-hero {
      background: linear-gradient(135deg, #111827 0%, #0fb5b3 100%);
      color: white;
      margin: -3rem -1.5rem 3rem;
      padding: 2.75rem 0 2.25rem;
      border-radius: 0 0 2rem 2rem;
    }
    .dashboard-hero-inner {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 1.5rem;
      display: flex;
      justify-content: space-between;
      gap: 2rem;
      align-items: flex-end;
    }
    .dash-hero-left p {
      margin: 0;
    }
    .dash-hero-eyebrow {
      font-size: 0.8rem;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      opacity: 0.9;
    }
    .dash-hero-title {
      font-size: clamp(1.8rem, 3vw, 2.3rem);
      font-weight: 800;
      margin-top: 0.35rem;
      margin-bottom: 0.4rem;
    }
    .dash-hero-subtitle {
      font-size: 0.95rem;
      opacity: 0.9;
      max-width: 520px;
    }
    .dash-hero-card {
      background: rgba(15,23,42,0.32);
      border-radius: 1.25rem;
      padding: 1rem 1.25rem;
      font-size: 0.85rem;
      min-width: 240px;
      backdrop-filter: blur(12px);
      border: 1px solid rgba(148,163,184,0.35);
    }
    .dash-hero-card h3 {
      margin: 0 0 0.4rem;
      font-size: 0.9rem;
      font-weight: 600;
    }
    .dash-hero-card-row {
      display: flex;
      justify-content: space-between;
      margin-top: 0.15rem;
    }

    .dashboard-layout {
      max-width: 1200px;
      margin: 0 auto 3.5rem;
      padding: 0 1.5rem;
      display: grid;
      grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
      gap: 2rem;
      align-items: flex-start;
    }

    /* reuse generic continue-card styles from styles.css */
    .dashboard-main .continue-card {
      margin-bottom: var(--space-6);
    }

    .activity-list {
      margin-top: 1.25rem;
      border-radius: 1rem;
      border: 1px solid var(--color-border-subtle);
      background: var(--color-surface);
      padding: 1.25rem 1.5rem;
    }
    .activity-item {
      display: flex;
      align-items: flex-start;
      gap: 0.75rem;
      font-size: 0.85rem;
      padding: 0.4rem 0;
    }
    .activity-dot {
      width: 8px;
      height: 8px;
      border-radius: 999px;
      margin-top: 0.35rem;
      background: #22c55e;
    }
    .activity-dot.quiz {
      background: #3b82f6;
    }
    .activity-dot.note {
      background: #f97316;
    }
    .activity-title {
      font-weight: 600;
      color: var(--color-text-main);
      margin-bottom: 0.1rem;
    }
    .activity-meta {
      font-size: 0.8rem;
      color: var(--color-text-soft);
    }

    .dashboard-side .side-card {
      background: var(--color-surface);
      border-radius: 1.25rem;
      border: 1px solid var(--color-border-subtle);
      box-shadow: var(--shadow-md);
      padding: 1.25rem 1.5rem;
      font-size: 0.86rem;
      color: var(--color-text-secondary);
    }
    .dashboard-side .side-card h3 {
      font-size: 0.9rem;
      font-weight: 700;
      margin-bottom: 0.5rem;
    }
    .dashboard-side ul {
      margin: 0.25rem 0 0 1.1rem;
      padding: 0;
    }
    .dashboard-side li {
      margin-bottom: 0.25rem;
    }

    @media (max-width: 900px) {
      .dashboard-layout {
        grid-template-columns: minmax(0, 1fr);
      }
      .dashboard-side {
        order: -1;
      }
    }

/* ==============================
   Home page (index.html)
   ============================== */


        /* Additional styles for new sections */
    .hero-side-badge {
      display: inline-block;
      padding: var(--space-1) var(--space-3);
      background: linear-gradient(135deg, #ff6b6b, #ff8e53);
      color: white;
      border-radius: var(--radius-full);
      font-size: var(--fs-xs);
      font-weight: 600;
      margin-bottom: var(--space-4);
    }

    .hero-side-content {
      padding-bottom: var(--space-4);
      border-bottom: 1px solid var(--color-border-subtle);
      margin-bottom: var(--space-4);
    }

    .hero-side-stats {
      display: flex;
      justify-content: space-around;
      margin-bottom: var(--space-5);
      padding: var(--space-3) 0;
    }

    .hero-side-stat {
      text-align: center;
    }

    .hero-side-stat-value {
      display: block;
      font-size: var(--fs-2xl);
      font-weight: 700;
      color: var(--color-primary);
      margin-bottom: var(--space-1);
    }

    .hero-side-stat-label {
      display: block;
      font-size: var(--fs-xs);
      color: var(--color-text-muted);
      text-transform: uppercase;
      letter-spacing: var(--ls-wide);
    }

    /* Social Proof Section */
    .section--social-proof {
      background: var(--color-surface-soft);
      padding: var(--space-10) var(--space-5);
      margin-left: calc(50% - 50vw);
      margin-right: calc(50% - 50vw);
    }

    .section--social-proof .section-header {
      max-width: var(--max-width);
      margin: 0 auto var(--space-8) auto;
      text-align: center;
    }

    .testimonial-grid {
      max-width: var(--max-width);
      margin: 0 auto;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: var(--space-5);
    }

    .testimonial-card {
      background: var(--color-surface);
      border-radius: var(--radius-xl);
      padding: var(--space-5);
      box-shadow: var(--shadow-sm);
    }

    .testimonial-rating {
      color: #fbbf24;
      font-size: var(--fs-lg);
      margin-bottom: var(--space-3);
    }

    .testimonial-text {
      font-size: var(--fs-md);
      line-height: var(--lh-relaxed);
      color: var(--color-text-secondary);
      margin-bottom: var(--space-4);
    }

    .testimonial-author {
      display: flex;
      flex-direction: column;
      gap: var(--space-1);
      padding-top: var(--space-3);
      border-top: 1px solid var(--color-border-subtle);
    }

    .testimonial-author strong {
      font-size: var(--fs-sm);
      color: var(--color-text-main);
    }

    .testimonial-author span {
      font-size: var(--fs-xs);
      color: var(--color-text-muted);
    }

    /* Tools Section Enhancement */
    .tools-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: var(--space-5);
      margin-top: var(--space-8);
    }

    .tool-card {
      background: var(--color-surface);
      border-radius: var(--radius-xl);
      padding: var(--space-6);
      border: 1px solid var(--color-border-subtle);
      transition: all var(--transition-base);
      display: flex;
      flex-direction: column;
      gap: var(--space-4);
    }

    .tool-card:hover {
      box-shadow: var(--shadow-lg);
      transform: translateY(-4px);
    }

    .tool-icon {
      width: 56px;
      height: 56px;
      background: var(--color-primary-soft);
      border-radius: var(--radius-lg);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--color-primary);
    }

    .tool-icon svg {
      width: 28px;
      height: 28px;
    }

    .tool-title {
      font-size: var(--fs-xl);
      font-weight: 700;
      margin: 0;
    }

    .tool-text {
      font-size: var(--fs-sm);
      color: var(--color-text-secondary);
      line-height: var(--lh-relaxed);
      flex: 1;
    }

    .tool-link {
      font-size: var(--fs-sm);
      font-weight: 600;
      color: var(--color-primary);
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      transition: all var(--transition-fast);
    }

    .tool-link:hover {
      transform: translateX(4px);
    }

    /* About Section */
    .section--about {
      text-align: center;
      max-width: 720px;
      margin: 0 auto;
      padding: var(--space-10) var(--space-5);
    }

    .about-content {
      padding: var(--space-8);
      background: var(--color-surface-soft);
      border-radius: var(--radius-2xl);
    }

    .about-text {
      font-size: var(--fs-lg);
      line-height: var(--lh-relaxed);
      color: var(--color-text-secondary);
    }

    /* Enhanced CTA */
    .cta-inner {
      display: grid;
      grid-template-columns: 1.5fr 1fr;
      gap: var(--space-8);
      align-items: center;
      max-width: var(--max-width);
      margin: 0 auto;
      padding: var(--space-8) var(--space-6);
      background: linear-gradient(135deg, #eff6ff, #fef3e2);
      border-radius: var(--radius-2xl);
    }

    .cta-title {
      font-size: var(--fs-3xl);
      font-weight: 800;
      margin-bottom: var(--space-3);
      color: var(--color-text-main);
    }

    .cta-text {
      font-size: var(--fs-lg);
      color: var(--color-text-secondary);
      line-height: var(--lh-relaxed);
    }

    .cta-actions {
      display: flex;
      flex-direction: column;
      gap: var(--space-3);
    }

    /* Footer Enhancement */
    .footer-content {
      max-width: var(--max-width);
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .footer-links {
      display: flex;
      gap: var(--space-5);
    }

    .footer-links a {
      color: var(--color-text-muted);
      text-decoration: none;
      transition: color var(--transition-fast);
    }

    .footer-links a:hover {
      color: var(--color-primary);
    }

    .section-subtitle {
      font-size: var(--fs-lg);
      color: var(--color-text-muted);
      max-width: 600px;
      margin: 0 auto;
    }

    /* Responsive adjustments */
    @media (max-width: 1024px) {
      .cta-inner {
        grid-template-columns: 1fr;
        text-align: center;
      }

      .cta-actions {
        flex-direction: row;
        justify-content: center;
      }
    }

    @media (max-width: 767px) {
      .footer-content {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
      }

      .testimonial-grid {
        grid-template-columns: 1fr;
      }

      .cta-actions {
        flex-direction: column;
      }

      .cta-actions .btn {
        width: 100%;
      }
    }







/* ==============================
   Home page (workbooks.html)
   ============================== */

    .workbooks-hero {
      background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
      margin: -3rem -1.5rem 3rem;
      padding: 3rem 0 2.5rem;
      border-radius: 0 0 2rem 2rem;
    }
    .workbooks-hero-inner {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 1.5rem;
      display: flex;
      flex-wrap: wrap;
      gap: 2rem;
      align-items: center;
      justify-content: space-between;
    }
    .workbooks-hero-main {
      max-width: 640px;
    }
    .workbooks-eyebrow {
      font-size: 0.8rem;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      color: #2563eb;
      margin-bottom: 0.4rem;
      font-weight: 600;
    }
    .workbooks-title {
      font-size: clamp(2rem, 3.3vw, 2.6rem);
      font-weight: 800;
      margin-bottom: 0.4rem;
      letter-spacing: -0.03em;
      color: #0f172a;
    }
    .workbooks-subtitle {
      font-size: 0.95rem;
      color: #64748b;
      max-width: 36rem;
    }
    .workbooks-hero-tagline {
      font-size: 0.8rem;
      color: #6b7280;
      margin-top: 0.75rem;
    }

    .workbooks-hero-side {
      min-width: 260px;
      max-width: 340px;
      background: white;
      border-radius: 1.25rem;
      padding: 1.25rem 1.5rem;
      box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
      border: 1px solid rgba(148, 163, 184, 0.35);
      font-size: 0.85rem;
    }
    .workbooks-hero-side h3 {
      font-size: 0.95rem;
      margin-bottom: 0.35rem;
    }
    .workbooks-hero-side p {
      margin-bottom: 0.6rem;
      color: #4b5563;
    }
    .workbooks-hero-side ul {
      padding-left: 1rem;
      margin: 0;
      color: #6b7280;
    }

    .workbooks-layout {
      max-width: 1200px;
      margin: 0 auto 3.5rem;
      padding: 0 1.5rem;
      display: grid;
      grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
      gap: 2rem;
      align-items: flex-start;
    }

    .workbooks-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 1.5rem;
    }

    .workbook-card {
      background: white;
      border-radius: 1.25rem;
      border: 1px solid rgba(148, 163, 184, 0.35);
      box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    .workbook-header {
      padding: 0.9rem 1.25rem 0.85rem;
      background: linear-gradient(135deg, #0f766e, #22c55e);
      color: white;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 1rem;
    }
    .workbook-header-main {
      display: flex;
      flex-direction: column;
      gap: 0.15rem;
    }
    .workbook-tag {
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      opacity: 0.9;
    }
    .workbook-title {
      font-size: 1rem;
      font-weight: 700;
    }
    .workbook-badge {
      font-size: 0.75rem;
      padding: 0.25rem 0.6rem;
      border-radius: 999px;
      background: rgba(15, 23, 42, 0.65);
    }

    .workbook-body {
      padding: 1.1rem 1.5rem 1.3rem;
      display: flex;
      flex-direction: column;
      gap: 0.9rem;
    }
    .workbook-body p {
      margin: 0;
      font-size: 0.9rem;
      color: #374151;
    }
    .workbook-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
      font-size: 0.78rem;
      color: #6b7280;
    }
    .workbook-chip {
      padding: 0.2rem 0.55rem;
      border-radius: 999px;
      background: #f9fafb;
    }
    .workbook-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      margin-top: 0.5rem;
    }

    .resource-link {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      padding: 0.45rem 0.9rem;
      border-radius: 999px;
      text-decoration: none;
      background: #f9fafb;
      border: 1px solid transparent;
      transition: all 0.15s ease;
      font-size: 0.85rem;
      color: #374151;
    }
    .resource-link:hover {
      background: #eef2ff;
      border-color: #e0e7ff;
    }

    .sidebar-block {
      background: white;
      border-radius: 1.25rem;
      border: 1px solid rgba(148, 163, 184, 0.35);
      box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
      padding: 1.25rem 1.5rem;
      font-size: 0.9rem;
      color: #4b5563;
    }
    .sidebar-block h3 {
      font-size: 0.95rem;
      margin-bottom: 0.5rem;
    }
    .sidebar-block ol {
      margin: 0.3rem 0 0;
      padding-left: 1.2rem;
      color: #6b7280;
      font-size: 0.85rem;
    }

    @media (max-width: 900px) {
      .workbooks-layout {
        grid-template-columns: minmax(0, 1fr);
      }
    }

    @media (max-width: 768px) {
      .workbooks-hero-inner {
        flex-direction: column;
        align-items: flex-start;
      }
      .workbooks-hero {
        margin: -3rem -1rem 2rem;
        border-radius: 0 0 1.25rem 1.25rem;
      }
    }



    /* ==============================
   Dashboard page
   ============================== */

.dashboard-hero {
  background: linear-gradient(135deg, #111827 0%, #0fb5b3 100%);
  color: white;
  margin: -3rem -1.5rem 3rem;
  padding: 2.75rem 0 2.25rem;
  border-radius: 0 0 2rem 2rem;
}

.dashboard-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-end;
}

.dash-hero-main {
  max-width: 520px;
}

.dash-hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

.dash-hero-title {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 800;
  margin-top: 0.35rem;
  margin-bottom: 0.4rem;
}

.dash-hero-subtitle {
  font-size: 0.95rem;
  opacity: 0.9;
  max-width: 520px;
}

/* Hero side card */
.dash-hero-card {
  background: rgba(15, 23, 42, 0.32);
  border-radius: 1.25rem;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  min-width: 240px;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.dash-hero-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.dash-hero-card-row {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  font-size: 0.8rem;
}

/* Layout */
.dashboard-layout {
  max-width: 1200px;
  margin: 0 auto 3.5rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 2rem;
}

.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dashboard-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Continue card */
.continue-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 1.25rem;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}

.continue-main {
  max-width: 520px;
}

.continue-title {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.continue-text {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* Activity list */
.activity-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.activity-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
}

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 0.35rem;
  background: #22c55e;
}

.activity-dot.quiz {
  background: #0ea5e9;
}

.activity-dot.note {
  background: #f97316;
}

.activity-title {
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 0.1rem;
}

.activity-meta {
  font-size: 0.8rem;
  color: var(--color-text-soft);
}

/* Stats grid already exists in styles.css, but if not: */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}

.stat-card {
  background: var(--color-surface);
  border-radius: 1.25rem;
  border: 1px solid var(--color-border-subtle);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
  font-size: 0.85rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.stat-detail {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  margin-top: 0.4rem;
}

/* Dashboard side cards */
.dashboard-side .side-card {
  background: var(--color-surface);
  border-radius: 1.2rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-xs);
  font-size: 0.9rem;
}

.dashboard-side .side-card h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.dashboard-side .side-card ul {
  margin: 0.3rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
}

.dashboard-side li {
  margin-bottom: 0.25rem;
}

/* Responsive for dashboard */
@media (max-width: 900px) {
  .dashboard-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .dashboard-side {
    order: -1;
  }
  .continue-card {
    flex-direction: column;
    align-items: flex-start;
  }
}



.course-title {
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: var(--lh-snug);
  margin: 0;
}

.course-instructor {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: 0;
}
.course-description {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  margin: 0.35rem 0 0.5rem;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-4);
}


/* =========================================
   Global Reading Wrapper (full-page iframe)
   ========================================= */

body.reading-page {
  margin: 0;
  height: 100vh;
  background: #020617;
  overflow: hidden; /* no outer scroll; iframe scrolls */
}

/* The fixed shell fills the viewport regardless of content */
.reading-shell {
  position: fixed;
  inset: 0; /* top/right/bottom/left: 0 */
  width: 100vw;
  height: 100vh;
}

/* Iframe fills the shell completely */
.reading-shell .reading-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Overlay controls above iframe (doesn't push content down) */
.reading-shell .reading-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 9999;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.reading-shell .reading-overlay__btn {
  pointer-events: auto;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #f9fafb;
  text-decoration: none;
  font-weight: 700;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.reading-shell .reading-overlay__btn:hover {
  filter: brightness(1.06);
}

.reading-shell .reading-overlay__btn:active {
  transform: translateY(1px);
}

/* =========================================
   Fix: Ghost buttons inside WHITE course cards
   (Course overview CTAs)
   ========================================= */

/* Course overview CTA box uses data-course-card in your pages */
[data-course-card] .btn--ghost {
  color: var(--lba-color-primary);
  border-color: rgba(15, 23, 42, 0.18);
  background: rgba(15, 23, 42, 0.03);
}

[data-course-card] .btn--ghost:hover {
  color: var(--lba-color-primary);
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.28);
}

/* =========================================
   Fix: Disabled CTA styling (used by main.js gating)
   main.js applies: aria-disabled="true" + .btn--disabled
   ========================================= */
.btn--disabled,
.btn[aria-disabled="true"],
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
}

.btn--disabled::before,
.btn[aria-disabled="true"]::before,
button:disabled::before {
  opacity: 0.25;
}
/* =========================================
   Reading modules player (Normal Course)
   Sidebar + iframe (click module -> swap iframe src)
   ========================================= */

.reading-shell--modules {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  height: 100vh;
}

/* Override the default "absolute iframe fill" when in modules mode */
.reading-shell--modules .reading-iframe {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
}

/* Sidebar panel */
.reading-shell--modules .reading-modules-panel {
  position: relative;
  z-index: 2;
  padding: 78px 14px 14px; /* leaves room for overlay buttons */
  overflow: auto;
  background: rgba(2, 6, 23, 0.92);
  border-right: 1px solid rgba(148, 163, 184, 0.18);
}

.reading-modules-panel__title {
  color: #f9fafb;
  font-family: var(--lba-font-heading);
  font-weight: 800;
  letter-spacing: 0.01em;
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.reading-modules-panel__subtitle {
  color: rgba(226, 232, 240, 0.8);
  font-size: 0.8rem;
  margin: 0 0 0.9rem;
  line-height: 1.35;
}

.reading-modules-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reading-module-btn {
  width: 100%;
  text-align: left;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(148, 163, 184, 0.06);
  color: #f9fafb;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease,
    border-color 140ms ease, box-shadow 140ms ease;
}

.reading-module-btn:hover {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.28);
}

.reading-module-btn:active {
  transform: translateY(1px);
}

.reading-module-btn.is-active {
  background: linear-gradient(
    90deg,
    rgba(15, 181, 179, 0.28),
    rgba(76, 79, 216, 0.18)
  );
  border-color: rgba(15, 181, 179, 0.55);
  box-shadow: 0 16px 34px rgba(15, 181, 179, 0.12);
}

.reading-module-index {
  flex: 0 0 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: rgba(15, 181, 179, 0.14);
  border: 1px solid rgba(15, 181, 179, 0.28);
  color: #e5f9f9;
}

.reading-module-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.reading-module-title {
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.15;
}

.reading-module-slug {
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.72);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobile: stack modules panel above iframe */
@media (max-width: 900px) {
  .reading-shell--modules {
    grid-template-columns: 1fr;
    grid-template-rows: 240px 1fr;
  }

  .reading-shell--modules .reading-modules-panel {
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    padding-top: 70px;
  }
}
/* ==============================
   Strategy reading modules: Premium locking
   ============================== */

.course-price.premium {
  color: #d946ef; /* magenta-like (matches your reference) */
}

/* Make module buttons able to host a badge on the right */
.reading-module-btn {
  position: relative;
}

/* Locked look (blur text, keep layout) */
.reading-module-btn.is-locked {
  cursor: not-allowed;
}

.reading-module-btn.is-locked .reading-module-index,
.reading-module-btn.is-locked .reading-module-text {
  filter: blur(2px);
  opacity: 0.55;
}

/* Optional: tint the number chip a “paid” magenta */
.reading-module-btn.is-locked .reading-module-index {
  background: rgba(217, 70, 239, 0.14);
  border-color: rgba(217, 70, 239, 0.28);
  color: rgba(253, 242, 255, 0.92);
}

/* Visible lock badge (NOT blurred) */
.reading-module-lock-badge {
  margin-left: auto;
  align-self: center;
  flex: 0 0 auto;

  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;

  background: rgba(217, 70, 239, 0.12);
  border: 1px solid rgba(217, 70, 239, 0.28);
  color: rgba(253, 242, 255, 0.92);
  white-space: nowrap;
}
