/* ============================================
   KeyZenith — Global Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── CSS Variables ── */
:root {
  --bg-primary: #080c14;
  --bg-secondary: #0d1424;
  --bg-card: #111827;
  --bg-card-hover: #1a2438;
  --border: rgba(56, 139, 253, 0.18);
  --border-glow: rgba(56, 139, 253, 0.45);

  --accent: #38bdf8;
  --accent-2: #818cf8;
  --accent-green: #34d399;
  --accent-orange: #fb923c;
  --accent-red: #f87171;
  --accent-yellow: #fbbf24;

  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --text-heading: #f8fafc;

  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  --shadow-glow: 0 0 30px rgba(56, 189, 248, 0.12);
  --shadow-card: 0 4px 32px rgba(0,0,0,0.45);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme */
body.light {
  --bg-primary: #f0f4ff;
  --bg-secondary: #e8eeff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5ff;
  --border: rgba(99, 102, 241, 0.18);
  --border-glow: rgba(99, 102, 241, 0.4);
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-heading: #0f172a;
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.1);
  --shadow-card: 0 4px 32px rgba(99,102,241,0.08);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: #7dd3fc; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 99px; }

/* ── Typography ── */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text-heading); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { color: var(--text-secondary); }
code, .mono { font-family: var(--font-mono); }

/* ── Layout ── */
.container { width: min(1140px, 92%); margin: 0 auto; }
.section { padding: 80px 0; }

/* ── Grid Background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(56,189,248,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}
body.light::before {
  background-image:
    linear-gradient(rgba(99,102,241,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.06) 1px, transparent 1px);
}
.container, header, main, footer { position: relative; z-index: 1; }

/* ============================================
   HEADER / NAV
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0;
}
body.light .site-header { background: rgba(240,244,255,0.88); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.5px;
}
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  box-shadow: 0 0 16px rgba(56,189,248,0.4);
}
.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--accent);
  background: rgba(56,189,248,0.08);
}

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

.btn-theme {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1rem;
  transition: var(--transition);
}
.btn-theme:hover { border-color: var(--border-glow); color: var(--accent); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 20px rgba(56,189,248,0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(56,189,248,0.4);
  color: #fff;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-secondary);
  border-radius: 99px;
  transition: var(--transition);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56,189,248,0.1);
  border: 1px solid rgba(56,189,248,0.25);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 28px;
  letter-spacing: 0.5px;
  animation: fadeDown 0.6s ease both;
}
.hero-badge::before { content: '◉'; font-size: 0.6rem; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity:1 } 50% { opacity:0.3 } }

.hero h1 {
  margin-bottom: 20px;
  animation: fadeDown 0.7s 0.1s ease both;
  background: linear-gradient(135deg, var(--text-heading) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto 40px;
  animation: fadeDown 0.7s 0.2s ease both;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeDown 0.7s 0.3s ease both;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-secondary:hover { border-color: var(--border-glow); color: var(--accent); background: rgba(56,189,248,0.06); }
.btn-lg { padding: 13px 32px; font-size: 1rem; border-radius: var(--radius-md); }

/* Keyboard visual */
.hero-keyboard {
  margin: 56px auto 0;
  max-width: 640px;
  animation: fadeUp 0.9s 0.4s ease both;
}
.kb-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}
.kb-key {
  height: 44px;
  min-width: 44px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: default;
  user-select: none;
}
.kb-key.home-key {
  background: rgba(56,189,248,0.12);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(56,189,248,0.2);
}
.kb-key.wide { min-width: 72px; }
.kb-key.wider { min-width: 96px; }
.kb-key:hover { border-color: var(--border-glow); color: var(--accent); transform: translateY(-2px); }

@keyframes fadeDown { from { opacity:0; transform: translateY(-16px); } to { opacity:1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: translateY(0); } }

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}
.stat-item h3 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-item p { font-size: 0.85rem; margin-top: 4px; }

/* ============================================
   BENEFITS
   ============================================ */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.benefit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
}
.benefit-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.benefit-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}
.benefit-card h3 { font-size: 1.05rem; margin-bottom: 8px; }

/* ============================================
   MODULES SECTION
   ============================================ */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-label::before { content: '//'; opacity: 0.5; }

.modules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}
.module-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity 0.25s;
  border-radius: inherit;
}
.module-card:hover::before { opacity: 0.06; }
.module-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
.module-card:hover .module-num { color: var(--accent); }

.module-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 1px;
  transition: var(--transition);
}
.module-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.3;
}
.module-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}
.module-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  width: fit-content;
}
.tag-intro { background: rgba(52,211,153,0.12); color: var(--accent-green); }
.tag-base { background: rgba(56,189,248,0.12); color: var(--accent); }
.tag-hand { background: rgba(129,140,248,0.12); color: var(--accent-2); }
.tag-combo { background: rgba(251,146,60,0.12); color: var(--accent-orange); }
.tag-words { background: rgba(56,189,248,0.12); color: var(--accent); }
.tag-speed { background: rgba(251,191,36,0.12); color: var(--accent-yellow); }
.tag-symbols { background: rgba(129,140,248,0.12); color: var(--accent-2); }
.tag-final { background: rgba(248,113,113,0.12); color: var(--accent-red); }

/* Progress bar on module card */
.module-progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.module-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 99px;
  width: 0%;
  transition: width 0.6s ease;
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 38px;
  left: calc(16.67% + 20px);
  right: calc(16.67% + 20px);
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.3;
}
.step-card {
  text-align: center;
  padding: 32px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.step-num {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  box-shadow: 0 0 20px rgba(56,189,248,0.3);
}
.step-card h3 { margin-bottom: 10px; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p { font-size: 0.9rem; margin: 14px 0 20px; max-width: 280px; }
.footer-social { display: flex; gap: 10px; }
.social-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  transition: var(--transition);
  text-decoration: none;
}
.social-btn:hover { border-color: var(--border-glow); color: var(--accent); }
.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 0.88rem; color: var(--text-secondary); }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.82rem; }

/* ============================================
   MODULE PAGE STYLES
   ============================================ */
.module-page-hero {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--border-glow); }

.module-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.meta-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(56,189,248,0.1);
  color: var(--accent);
  border: 1px solid rgba(56,189,248,0.25);
}

.module-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 48px 0;
  align-items: start;
}

/* Content blocks */
.content-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 28px;
}
.content-block h2 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.content-block p { margin-bottom: 14px; font-size: 0.95rem; }
.content-block ul { margin: 14px 0; }
.content-block ul li {
  padding: 6px 0 6px 20px;
  position: relative;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.content-block ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Keyboard diagram in modules */
.hand-diagram {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 20px 0;
  text-align: center;
}
.hand-diagram p { font-size: 0.85rem; color: var(--text-muted); margin-top: 12px; margin-bottom: 0; }

/* ── Typing Exercise ── */
.exercise-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 28px;
  position: relative;
}
.exercise-block h2 {
  font-size: 1.3rem;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Stats row */
.exercise-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}
.stat-box .stat-val {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-box .stat-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* Target text display */
.target-text {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  line-height: 1.8;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  min-height: 80px;
  word-break: break-all;
  user-select: none;
}
.target-text .char { position: relative; }
.target-text .char.correct { color: var(--accent-green); }
.target-text .char.wrong { color: var(--accent-red); background: rgba(248,113,113,0.15); border-radius: 2px; }
.target-text .char.current {
  background: rgba(56,189,248,0.2);
  border-bottom: 2px solid var(--accent);
  border-radius: 2px;
}
.target-text .char.pending { color: var(--text-muted); }

/* Typing area */
.typing-area {
  width: 100%;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--text-primary);
  resize: none;
  outline: none;
  transition: var(--transition);
  min-height: 80px;
  line-height: 1.6;
}
.typing-area:focus { border-color: var(--border-glow); box-shadow: 0 0 0 3px rgba(56,189,248,0.1); }
.typing-area::placeholder { color: var(--text-muted); }

/* Exercise controls */
.exercise-controls {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.btn-reset:hover { border-color: var(--border-glow); color: var(--accent); }

/* Result panel */
.result-panel {
  display: none;
  background: linear-gradient(135deg, rgba(52,211,153,0.1), rgba(56,189,248,0.1));
  border: 1px solid var(--accent-green);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 20px;
  text-align: center;
  animation: fadeUp 0.4s ease;
}
.result-panel h3 { color: var(--accent-green); margin-bottom: 8px; }
.result-panel.show { display: block; }
.result-stars { font-size: 1.8rem; margin-bottom: 8px; }

/* ── Sidebar ── */
.module-sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.sidebar-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-heading);
}

/* Progress tracker */
.progress-list { display: flex; flex-direction: column; gap: 6px; }
.progress-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.progress-item.current { background: rgba(56,189,248,0.08); color: var(--accent); }
.progress-item.done { color: var(--accent-green); }
.progress-item .pi-icon { font-size: 0.9rem; width: 20px; text-align: center; }

/* Tips card */
.tip-content {
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.tip-content strong { color: var(--accent-yellow); }

/* Nav between modules */
.module-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0 60px;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-nav:hover { border-color: var(--border-glow); color: var(--accent); transform: translateY(-2px); }
.btn-nav.next {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border: none;
  box-shadow: 0 0 20px rgba(56,189,248,0.25);
}
.btn-nav.next:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(56,189,248,0.4); color: #fff; }

/* Achievement toast */
.achievement-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--bg-card);
  border: 1px solid var(--accent-green);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(52,211,153,0.2);
  z-index: 999;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.achievement-toast.show { transform: translateX(0); }
.toast-icon { font-size: 1.8rem; }
.toast-text h4 { font-size: 0.9rem; color: var(--accent-green); }
.toast-text p { font-size: 0.8rem; }

/* ── Keyboard highlight overlay (mini) ── */
.mini-keyboard { margin: 20px 0; }
.mini-kb-row { display: flex; gap: 5px; margin-bottom: 5px; flex-wrap: wrap; }
.mini-key {
  height: 36px;
  min-width: 36px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: var(--transition);
  user-select: none;
}
.mini-key.highlight {
  background: rgba(56,189,248,0.15);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 10px rgba(56,189,248,0.2);
}
.mini-key.home-pos {
  background: rgba(129,140,248,0.15);
  border-color: var(--accent-2);
  color: var(--accent-2);
}
.mini-key.wide { min-width: 60px; }
.mini-key.wider { min-width: 80px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .modules-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .nav-links, .btn-primary.nav-cta { display: none; }
  .hamburger { display: flex; }
  .modules-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .benefits-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .steps-grid::before { display: none; }
  .module-layout { grid-template-columns: 1fr; }
  .module-sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .exercise-stats { grid-template-columns: repeat(3,1fr); }
  .hero { padding: 60px 0 40px; }
  .hero-keyboard { display: none; }
  .section { padding: 56px 0; }
}
@media (max-width: 480px) {
  .modules-grid { grid-template-columns: 1fr; }
  .exercise-stats { grid-template-columns: 1fr; }
}

/* Mobile nav open */
.nav-open .nav-links {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 68px;
  left: 0; right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 16px;
  gap: 4px;
}
.nav-open .nav-links a { padding: 12px 16px; border-radius: var(--radius-sm); width: 100%; }
