/* =========================================================
   Typing Speed - Global Design System & Core Stylesheet
   Modern, Ultra-Clean Light Mode (with Dark Mode Support)
   Matches Official Typography, Keyboard Component & Cards
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Primary Palette (Light Theme by Default) */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --bg-glass-card: #ffffff;
  --bg-glass-hover: #f8fafc;

  --border-subtle: #e2e8f0;
  --border-card: #e2e8f0;
  --border-focus: rgba(37, 99, 235, 0.6);
  --border-glass: #e2e8f0;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #60a5fa;
  --primary-subtle: #eff6ff;
  --primary-glow: rgba(37, 99, 235, 0.25);

  --accent-purple: #7c3aed;
  --accent-purple-light: #a855f7;
  --accent-cyan: #0284c7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #ef4444;

  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --text-inverse: #ffffff;

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px -6px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 10px 25px rgba(99, 102, 241, 0.3);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --max-width: 1180px;
  --header-height: 70px;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg-main: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-elevated: #1a2234;
  --bg-surface-subtle: #1e293b;
  --bg-glass-card: rgba(26, 34, 52, 0.7);
  --bg-glass-hover: rgba(36, 48, 74, 0.85);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(99, 102, 241, 0.6);
  --border-glass: rgba(255, 255, 255, 0.12);

  --text-main: #f8fafc;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --text-inverse: #0b0f19;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
  --primary-subtle: rgba(99, 102, 241, 0.15);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-main);
  color: var(--text-body);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Background Ambient Glow */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  height: 600px;
  background: radial-gradient(circle at 50% 10%, rgba(124, 58, 237, 0.07) 0%, rgba(99, 102, 241, 0.03) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--primary-hover);
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
  user-select: none;
}

/* =========================================================
   Typography & Utilities
   ========================================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.65rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  letter-spacing: -0.025em;
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
}

.text-gradient {
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 50%, #9333ea 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 3vw, 2rem);
  padding-right: clamp(1rem, 3vw, 2rem);
  position: relative;
  z-index: 1;
}

.main-content {
  flex: 1 0 auto;
  padding-top: calc(var(--header-height) + 1rem);
  padding-bottom: 4rem;
}

/* =========================================================
   Header & Navigation (Ultra-Responsive Multi-Device System)
   📱 Mobile • 📲 Tablet • 💻 Desktop • 🖥️ Large Desktop
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background-color var(--transition-normal), border-color var(--transition-normal), height var(--transition-normal);
}

[data-theme="dark"] .site-header {
  background: rgba(11, 15, 25, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.brand-logo:hover {
  transform: translateY(-1px);
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--primary-glow);
  color: #ffffff;
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.brand-logo:hover .brand-icon {
  transform: scale(1.05) rotate(-3deg);
}

/* Brand Logo Image (SEO-Optimized, High DPI) */
.brand-logo-img {
  height: 44px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.brand-logo:hover .brand-logo-img {
  transform: scale(1.03);
}

.footer-logo-img {
  height: 52px;
  width: auto;
  max-width: 210px;
  object-fit: contain;
  display: block;
  margin-bottom: 0.85rem;
  transition: transform var(--transition-fast);
}

.footer-brand-logo:hover .footer-logo-img {
  transform: scale(1.02);
}

/* Subtle contrast enhancement on dark themes for dark-blue logo lettering */
[data-theme="dark"] .brand-logo-img,
.site-footer .footer-logo-img {
  filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.55)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

/* Screen-reader only utility */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Centered Navigation Capsule Menu (Desktop) */
.nav-menu-capsule {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  background: rgba(241, 245, 249, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 0.25rem 0.35rem;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .nav-menu-capsule {
  background: rgba(26, 34, 52, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.45rem 1.05rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

[data-theme="dark"] .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
  background: #ffffff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .nav-link.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

/* Header Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-body);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 1.1rem;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.theme-toggle-btn:hover {
  background: #e2e8f0;
  transform: rotate(18deg) scale(1.05);
}

[data-theme="dark"] .theme-toggle-btn:hover {
  background: #273349;
}

/* User Capsule & Luxury Dropdown Menu (Logged In State) */
.nav-user-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.user-profile-capsule {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.85rem 0.3rem 0.35rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.user-profile-capsule:hover, .user-profile-capsule.open {
  background: #e2e8f0;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

[data-theme="dark"] .user-profile-capsule:hover,
[data-theme="dark"] .user-profile-capsule.open {
  background: #273349;
  border-color: rgba(255, 255, 255, 0.2);
}

.user-avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
}

.user-dropdown-caret {
  font-size: 0.75rem;
  margin-left: 2px;
  color: var(--text-muted);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}

.user-profile-capsule.open .user-dropdown-caret {
  transform: rotate(180deg);
}

/* Floating Glass User Dropdown Menu */
.nav-user-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 0.5rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

[data-theme="dark"] .nav-user-dropdown-menu {
  background: rgba(19, 27, 46, 0.98);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.nav-user-dropdown-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Dropdown User Info Header */
.dropdown-user-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg-surface-subtle);
  border-radius: 12px;
  margin-bottom: 0.3rem;
}

.dropdown-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  flex-shrink: 0;
}

.dropdown-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dropdown-user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-status {
  font-size: 0.74rem;
  color: var(--primary);
  font-weight: 600;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0.3rem 0.25rem;
}

.nav-user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.15s ease;
  background: transparent;
  width: 100%;
  text-align: left;
  border: none;
  cursor: pointer;
}

.nav-user-dropdown-item .item-icon {
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-user-dropdown-item:hover {
  background: var(--bg-surface-subtle);
  color: var(--primary);
  transform: translateX(2px);
}

.nav-user-dropdown-item.item-logout {
  color: #ef4444;
}

.nav-user-dropdown-item.item-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

/* Mobile Hamburger Button with 3-bar animated icon */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 8px;
  border-radius: 12px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hamburger-btn:hover {
  background: #e2e8f0;
}

[data-theme="dark"] .hamburger-btn:hover {
  background: #273349;
}

.hamburger-btn span {
  display: block;
  height: 2px;
  width: 20px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

/* Animated Hamburger to 'X' Transition */
.hamburger-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Backdrop dim for mobile drawer */
.mobile-menu-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.mobile-menu-backdrop.open {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

body.mobile-menu-locked {
  overflow: hidden !important;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS (Menu & Navigation)
   ========================================================= */

/* 🖥️ LARGE DESKTOP (1440px+) */
@media (min-width: 1441px) {
  :root {
    --max-width: 1360px;
    --header-height: 76px;
  }
  .brand-logo {
    font-size: 1.35rem;
  }
  .brand-icon {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }
  .nav-link {
    font-size: 0.95rem;
    padding: 0.5rem 1.25rem;
  }
}

/* 💻 DESKTOP (1025px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
  :root {
    --max-width: 1180px;
    --header-height: 72px;
  }
}

/* 📲 TABLET (861px - 1024px) */
@media (min-width: 861px) and (max-width: 1024px) {
  :root {
    --max-width: 960px;
    --header-height: 68px;
  }
  .brand-logo span {
    font-size: 1.15rem;
  }
  .nav-menu-capsule {
    padding: 0.2rem 0.25rem;
    gap: 0.15rem;
  }
  .nav-link {
    font-size: 0.84rem;
    padding: 0.38rem 0.75rem;
  }
  .header-actions {
    gap: 0.5rem;
  }
  .btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
  }
}

/* 📱 MOBILE LANDSCAPE & TABLET (max-width: 860px) */
@media (max-width: 860px) {
  :root {
    --header-height: 64px;
  }

  .hamburger-btn {
    display: flex;
  }

  /* Completely remove Theme Toggle & Profile Capsule from top mobile bar */
  .header-actions .theme-toggle-btn,
  .header-actions .nav-auth,
  .header-actions #nav-auth-container,
  .header-actions .nav-user-dropdown-wrapper {
    display: none !important;
  }

  .header-actions {
    gap: 0;
  }

  /* Floating Glass Mobile Menu Drawer */
  .nav-menu-capsule {
    position: fixed;
    top: calc(var(--header-height) + 12px);
    left: 1rem;
    right: 1rem;
    width: calc(100% - 2rem);
    max-width: 480px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.16);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 0.85rem;
    gap: 0.4rem;
    z-index: 999;
    opacity: 0;
    transform: translateY(-14px) scale(0.97);
    pointer-events: none;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }

  [data-theme="dark"] .nav-menu-capsule {
    background: #131b2e;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  }

  .nav-menu-capsule.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .nav-menu-capsule li {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.75rem 1.15rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    color: var(--text-body);
  }

  .nav-link:hover {
    background: var(--bg-surface-subtle);
    transform: none;
  }

  .nav-link.active {
    background: var(--primary-subtle);
    color: var(--primary);
    box-shadow: none;
  }

  [data-theme="dark"] .nav-link.active {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
  }

  /* Mobile Drawer Dynamic User Header & Actions */
  .mobile-dynamic-item {
    display: block !important;
    width: 100%;
  }

  .mobile-drawer-user-header {
    margin-bottom: 0.35rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
  }

  .mobile-user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
  }

  .mobile-user-card:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
  }

  [data-theme="dark"] .mobile-user-card:hover {
    background: #273349;
    border-color: rgba(255, 255, 255, 0.2);
  }

  .mobile-user-avatar {
    width: 36px !important;
    height: 36px !important;
    font-size: 1rem !important;
    flex-shrink: 0;
  }

  .mobile-user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .mobile-user-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-user-subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
  }

  .mobile-drawer-logout-item {
    margin-top: 0.35rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
  }

  .mobile-logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.75rem 1.15rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    color: #ef4444;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
  }

  .mobile-logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
  }

  .mobile-auth-grid {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.4rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border-subtle);
  }
}

/* Hide Mobile Dynamic Items on Desktop (>860px) */
@media (min-width: 861px) {
  .mobile-dynamic-item {
    display: none !important;
  }
}

/* 📱 MOBILE PORTRAIT (max-width: 480px) */
@media (max-width: 480px) {
  :root {
    --header-height: 60px;
  }

  .brand-logo {
    font-size: 1.1rem;
    gap: 0.5rem;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .header-actions {
    gap: 0.4rem;
  }

  .theme-toggle-btn {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }

  .user-profile-capsule {
    padding: 0.25rem 0.55rem 0.25rem 0.3rem;
    font-size: 0.8rem;
  }

  .user-avatar-circle {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }

  .user-profile-capsule span:not(.user-avatar-circle) {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
  white-space: nowrap;
  min-height: 44px;
}

.btn-primary {
  background: #6366f1;
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-white {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-xs);
}

.btn-white:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  color: #0f172a;
}

[data-theme="dark"] .btn-white {
  background: #1e293b;
  color: #ffffff;
  border-color: #334155;
}

.btn-secondary {
  background: var(--bg-surface-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
}

.btn-emerald {
  background: #10b981;
  color: #fff;
}

.btn-outline {
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}
.btn-outline:hover {
  border-color: var(--text-main);
  color: var(--text-main);
}

.btn-sm {
  padding: 0.4rem 0.95rem;
  font-size: 0.85rem;
  min-height: 36px;
}

.btn-lg {
  padding: 0.85rem 1.85rem;
  font-size: 1.05rem;
}

/* =========================================================
   Hero Section & Pill Badge
   ========================================================= */
.hero-wrapper {
  text-align: center;
  padding: 2.5rem 0 3.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: #eff6ff;
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-full);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

[data-theme="dark"] .hero-pill-badge {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
}

.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  max-width: 800px;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  max-width: 680px;
  line-height: 1.65;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* =========================================================
   Interactive Keyboard Component (As in Photo)
   ========================================================= */
.keyboard-card-container {
  width: 100%;
  max-width: 640px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-lg);
  margin: 0 auto;
}

.keyboard-rows-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.kb-row {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
}

.kb-key {
  min-width: 44px;
  height: 44px;
  padding: 0 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.1s ease;
  user-select: none;
  cursor: pointer;
}

[data-theme="dark"] .kb-key {
  background: #1a2234;
  border-color: rgba(255, 255, 255, 0.08);
}

.kb-key:hover, .kb-key.active {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--accent-purple);
  transform: translateY(2px);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* =========================================================
   "Exercise of the Day" Purple Card Banner (As in Photo)
   ========================================================= */
.daily-exercise-banner {
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2.5rem;
  color: #ffffff;
  box-shadow: 0 16px 36px -10px rgba(99, 102, 241, 0.4);
  margin: 3.5rem auto 4rem auto;
  max-width: 860px;
  position: relative;
  overflow: hidden;
  text-align: left;
}

.daily-banner-deco-circle-1 {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.daily-banner-deco-circle-2 {
  position: absolute;
  bottom: -50px;
  left: -50px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.daily-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.85rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.85rem;
}

.daily-banner-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.daily-banner-sub {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

.daily-test-subcard {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.daily-test-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #10b981;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.daily-test-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.daily-test-meta {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.15rem;
}

.daily-banner-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-daily-start {
  background: #ffffff;
  color: #6d28d9;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.65rem 1.45rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.btn-daily-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  color: #5b21b6;
}

.daily-streak-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
}

/* =========================================================
   "Everything You Need to Improve" 4-Cards Grid
   ========================================================= */
.feature-section {
  padding: 4rem 0;
  text-align: center;
}

.section-heading {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.65rem;
}

.section-subheading {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto 3rem auto;
}

.grid-4-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.feature-box-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feature-box-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.feature-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-subtle);
  color: var(--accent-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}

.feature-box-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.feature-box-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* =========================================================
   Large Information Container Card
   ========================================================= */
.info-container-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: var(--shadow-sm);
  margin-bottom: 4rem;
}

.info-header-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.info-intro-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.info-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.info-subcard {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.info-subcard-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.info-subcard-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =========================================================
   "Ready to Test Your Speed?" Purple Gradient CTA Banner
   ========================================================= */
.purple-cta-banner {
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
  border-radius: var(--radius-xl);
  padding: clamp(2.5rem, 5vw, 3.5rem) 2rem;
  text-align: center;
  color: #ffffff;
  box-shadow: 0 20px 40px -15px rgba(99, 102, 241, 0.4);
  margin-bottom: 4rem;
}

.purple-cta-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.purple-cta-sub {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 2rem auto;
  line-height: 1.6;
}

.btn-cta-white {
  background: #ffffff;
  color: #6d28d9;
  font-weight: 700;
  padding: 0.85rem 2.25rem;
  border-radius: var(--radius-full);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-normal);
}

.btn-cta-white:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  color: #5b21b6;
}

/* =========================================================
   Footer (Dark Charcoal/Black as in photo)
   ========================================================= */
.site-footer {
  background: #090d16;
  color: #94a3b8;
  padding: 4rem 0 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  margin-top: 0.85rem;
  font-size: 0.9rem;
  color: #64748b;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.88rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: #64748b;
}

/* =========================================================
   Modals, Toasts & Responsive Rules
   ========================================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform var(--transition-normal);
  position: relative;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.25rem;
}

.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-surface);
}

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 3000;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  color: var(--text-main);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Glass Card Global Helper */
.glass-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.glass-card:hover {
  box-shadow: var(--shadow-md);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
}

.badge-easy {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-moderate {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-advanced {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-exam {
  background: var(--primary-subtle);
  color: var(--accent-purple);
  border: 1px solid rgba(124, 58, 237, 0.25);
}

/* =========================================================
   Practice & Category Cards (As in Photo)
   ========================================================= */
.cat-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.cat-card {
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.65rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all var(--transition-normal);
  text-decoration: none;
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -8px rgba(0, 0, 0, 0.08);
}

.cat-card-circle-deco {
  position: absolute;
  right: -25px;
  bottom: -25px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  opacity: 0.45;
  pointer-events: none;
  transition: transform var(--transition-normal);
}

.cat-card:hover .cat-card-circle-deco {
  transform: scale(1.15);
}

.cat-card-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.cat-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.cat-card-subtitle {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.cat-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  position: relative;
  z-index: 2;
}

.cat-card-count {
  font-size: 0.82rem;
  font-weight: 600;
}

.cat-card-link-btn {
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: transform var(--transition-fast);
}

.cat-card:hover .cat-card-link-btn {
  transform: translateX(4px);
}

/* Category Themes */
/* 1. Easy */
.cat-theme-easy {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.cat-theme-easy .cat-card-icon-badge { background: #10b981; }
.cat-theme-easy .cat-card-circle-deco { background: #86efac; }
.cat-theme-easy .cat-card-title { color: #065f46; }
.cat-theme-easy .cat-card-count, .cat-theme-easy .cat-card-link-btn { color: #059669; }

/* 2. Moderate */
.cat-theme-moderate {
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.cat-theme-moderate .cat-card-icon-badge { background: #f59e0b; }
.cat-theme-moderate .cat-card-circle-deco { background: #fcd34d; }
.cat-theme-moderate .cat-card-title { color: #92400e; }
.cat-theme-moderate .cat-card-count, .cat-theme-moderate .cat-card-link-btn { color: #d97706; }

/* 3. Advanced */
.cat-theme-advanced {
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.cat-theme-advanced .cat-card-icon-badge { background: #ef4444; }
.cat-theme-advanced .cat-card-circle-deco { background: #fca5a5; }
.cat-theme-advanced .cat-card-title { color: #991b1b; }
.cat-theme-advanced .cat-card-count, .cat-theme-advanced .cat-card-link-btn { color: #dc2626; }

/* 4. SSC */
.cat-theme-ssc {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
}
.cat-theme-ssc .cat-card-icon-badge { background: #7c3aed; }
.cat-theme-ssc .cat-card-circle-deco { background: #c4b5fd; }
.cat-theme-ssc .cat-card-title { color: #5b21b6; }
.cat-theme-ssc .cat-card-count, .cat-theme-ssc .cat-card-link-btn { color: #7c3aed; }

/* 5. RRB */
.cat-theme-rrb {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}
.cat-theme-rrb .cat-card-icon-badge { background: #2563eb; }
.cat-theme-rrb .cat-card-circle-deco { background: #93c5fd; }
.cat-theme-rrb .cat-card-title { color: #1e40af; }
.cat-theme-rrb .cat-card-count, .cat-theme-rrb .cat-card-link-btn { color: #2563eb; }

/* 6. State */
.cat-theme-state {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}
.cat-theme-state .cat-card-icon-badge { background: #0d9488; }
.cat-theme-state .cat-card-circle-deco { background: #6ee7b7; }
.cat-theme-state .cat-card-title { color: #115e59; }
.cat-theme-state .cat-card-count, .cat-theme-state .cat-card-link-btn { color: #0d9488; }

/* 7. Court */
.cat-theme-court {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.cat-theme-court .cat-card-icon-badge { background: #ea580c; }
.cat-theme-court .cat-card-circle-deco { background: #fdba74; }
.cat-theme-court .cat-card-title { color: #9a3412; }
.cat-theme-court .cat-card-count, .cat-theme-court .cat-card-link-btn { color: #ea580c; }

/* Custom 7 Theme Colors */
.cat-theme-golden { background: #fffbeb; border: 1px solid #fde68a; }
.cat-theme-golden .cat-card-icon-badge { background: #f59e0b; }
.cat-theme-golden .cat-card-circle-deco { background: #fcd34d; }
.cat-theme-golden .cat-card-title { color: #92400e; }
.cat-theme-golden .cat-card-count, .cat-theme-golden .cat-card-link-btn { color: #d97706; }

.cat-theme-green { background: #f0fdf4; border: 1px solid #bbf7d0; }
.cat-theme-green .cat-card-icon-badge { background: #10b981; }
.cat-theme-green .cat-card-circle-deco { background: #86efac; }
.cat-theme-green .cat-card-title { color: #065f46; }
.cat-theme-green .cat-card-count, .cat-theme-green .cat-card-link-btn { color: #059669; }

.cat-theme-orange { background: #fff7ed; border: 1px solid #fed7aa; }
.cat-theme-orange .cat-card-icon-badge { background: #f97316; }
.cat-theme-orange .cat-card-circle-deco { background: #fdba74; }
.cat-theme-orange .cat-card-title { color: #9a3412; }
.cat-theme-orange .cat-card-count, .cat-theme-orange .cat-card-link-btn { color: #ea580c; }

.cat-theme-red { background: #fef2f2; border: 1px solid #fecaca; }
.cat-theme-red .cat-card-icon-badge { background: #ef4444; }
.cat-theme-red .cat-card-circle-deco { background: #fca5a5; }
.cat-theme-red .cat-card-title { color: #991b1b; }
.cat-theme-red .cat-card-count, .cat-theme-red .cat-card-link-btn { color: #dc2626; }

.cat-theme-blue { background: #eff6ff; border: 1px solid #bfdbfe; }
.cat-theme-blue .cat-card-icon-badge { background: #3b82f6; }
.cat-theme-blue .cat-card-circle-deco { background: #93c5fd; }
.cat-theme-blue .cat-card-title { color: #1e40af; }
.cat-theme-blue .cat-card-count, .cat-theme-blue .cat-card-link-btn { color: #2563eb; }

.cat-theme-purple { background: #f5f3ff; border: 1px solid #ddd6fe; }
.cat-theme-purple .cat-card-icon-badge { background: #8b5cf6; }
.cat-theme-purple .cat-card-circle-deco { background: #c4b5fd; }
.cat-theme-purple .cat-card-title { color: #5b21b6; }
.cat-theme-purple .cat-card-count, .cat-theme-purple .cat-card-link-btn { color: #7c3aed; }

.cat-theme-teal { background: #f0fdfa; border: 1px solid #99f6e4; }
.cat-theme-teal .cat-card-icon-badge { background: #14b8a6; }
.cat-theme-teal .cat-card-circle-deco { background: #5eead4; }
.cat-theme-teal .cat-card-title { color: #115e59; }
.cat-theme-teal .cat-card-count, .cat-theme-teal .cat-card-link-btn { color: #0d9488; }

/* Dark Mode support for Category Cards */
[data-theme="dark"] .cat-card {
  background: #151d2f !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
[data-theme="dark"] .cat-card-title {
  color: #ffffff !important;
}
[data-theme="dark"] .cat-card-circle-deco {
  opacity: 0.15;
}

/* Tips Container */
.tips-container-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-sm);
  margin-top: 3.5rem;
  margin-bottom: 4rem;
}

.tips-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tips-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.tips-num-badge {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: #ede9fe;
  color: #7c3aed;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

[data-theme="dark"] .tips-num-badge {
  background: rgba(124, 58, 237, 0.25);
  color: #c4b5fd;
}

@media (max-width: 1023px) {
  .cat-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .cat-card-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Test Evaluation Cards Grid (As in Photo)
   ========================================================= */
.tests-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.test-eval-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.35rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  min-height: 185px;
  position: relative;
}

.test-eval-card:hover {
  transform: translateY(-4px);
  border-color: #c7d2fe;
  box-shadow: 0 14px 28px -6px rgba(99, 102, 241, 0.12);
}

[data-theme="dark"] .test-eval-card {
  background: #151d2f;
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .test-eval-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 14px 28px -6px rgba(0, 0, 0, 0.4);
}

.test-eval-num {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.test-eval-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.45rem;
  line-height: 1.3;
  transition: color var(--transition-fast);
}

.test-eval-card:hover .test-eval-title {
  color: var(--primary);
}

.test-eval-snippet {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.test-eval-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-subtle);
}

.test-eval-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.test-eval-status {
  font-weight: 600;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.test-eval-status.completed {
  color: #10b981;
  font-weight: 700;
}

/* Controls Bar for Test Selection */
.test-selection-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.test-search-box {
  position: relative;
  max-width: 320px;
  width: 100%;
}

.test-search-input {
  width: 100%;
  padding: 0.55rem 1rem 0.55rem 2.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.test-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.test-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

@media (max-width: 1200px) {
  .tests-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 860px) {
  .tests-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================================
   Typing Test Results Scorecard (As in Photo)
   ========================================================= */
.scorecard-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
  max-width: 680px;
  margin: 1.5rem auto 4rem auto;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.06);
  text-align: center;
  position: relative;
}

[data-theme="dark"] .scorecard-container {
  background: #151d2f;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.4);
}

.scorecard-trophy-badge {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: #dcfce7;
  color: #16a34a;
  border: 2px solid #bbf7d0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.25rem auto;
}

[data-theme="dark"] .scorecard-trophy-badge {
  background: rgba(22, 163, 74, 0.2);
  border-color: #16a34a;
  color: #86efac;
}

.scorecard-title {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.scorecard-tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 1rem;
  background: #ede9fe;
  color: #7c3aed;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

[data-theme="dark"] .scorecard-tier-pill {
  background: rgba(124, 58, 237, 0.2);
  color: #c4b5fd;
}

.scorecard-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.scorecard-metric-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 0.75rem;
  text-align: center;
  transition: all var(--transition-fast);
}

.scorecard-metric-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
}

[data-theme="dark"] .scorecard-metric-card {
  background: #1a2234;
  border-color: rgba(255, 255, 255, 0.06);
}

.metric-big-num {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  font-family: var(--font-heading);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.num-green { color: #10b981; }
.num-purple { color: #6366f1; }
.num-dark { color: var(--text-main); }
.num-red { color: #ef4444; }
.num-amber { color: #f59e0b; }

.metric-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.scorecard-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .scorecard-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .scorecard-actions-row {
    flex-direction: column;
    width: 100%;
  }
  .scorecard-actions-row .btn {
    width: 100%;
  }
}


/* =========================================================
   Responsive Breakpoints
   ========================================================= */
@media (max-width: 1023px) {
  .grid-4-features {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 767px) {
  .grid-4-features {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .kb-key {
    min-width: 28px;
    height: 36px;
    font-size: 0.8rem;
    padding: 0 0.2rem;
  }

  .kb-row {
    gap: 0.25rem;
  }
}

/* =========================================================
   About Page Custom Component Styles (Pixel-Perfect Mockup)
   ========================================================= */

.about-page-wrapper {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem 0 4rem 0;
}

/* Top Icon Squircle Badge */
.about-hero-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #ede9fe;
  border: 1px solid #ddd6fe;
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

[data-theme="dark"] .about-hero-badge {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

/* Hero Header */
.about-hero-header {
  text-align: center;
  margin-bottom: 2.75rem;
}

.about-hero-title {
  font-size: clamp(2.1rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-bottom: 0.85rem;
}

.about-hero-desc {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.65;
}

/* Mission Card */
.about-mission-card {
  background: #f6f5ff;
  border: 1px solid #e2e0fb;
  border-radius: 22px;
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 3.5rem;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.04);
}

[data-theme="dark"] .about-mission-card {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
}

.about-mission-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.about-mission-text {
  font-size: 0.96rem;
  color: var(--text-body);
  line-height: 1.75;
  margin-bottom: 1.15rem;
}

.about-mission-text:last-child {
  margin-bottom: 0;
}

/* Section Title */
.about-section-title {
  font-size: clamp(1.4rem, 2.8vw, 1.75rem);
  font-weight: 800;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 2.25rem;
  letter-spacing: -0.02em;
}

/* 2x2 Features Grid */
.about-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

@media (max-width: 680px) {
  .about-features-grid {
    grid-template-columns: 1fr;
  }
}

.about-feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 1.75rem;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.about-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.35);
}

.about-feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #ede9fe;
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.2rem;
}

[data-theme="dark"] .about-feature-icon {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

.about-feature-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.about-feature-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* By The Numbers Banner (Dark Charcoal/Navy Card) */
.about-numbers-banner {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 2.5rem 2rem;
  margin-bottom: 3.5rem;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
  position: relative;
  overflow: hidden;
}

.about-numbers-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 150px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.about-numbers-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

.about-numbers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

@media (max-width: 560px) {
  .about-numbers-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

.about-stat-value {
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.35rem;
  letter-spacing: -0.03em;
}

.stat-val-blue {
  color: #60a5fa;
}

.stat-val-green {
  color: #34d399;
}

.stat-val-amber {
  color: #fbbf24;
}

.about-stat-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: #94a3b8;
  text-transform: capitalize;
}

/* How It Works Steps */
.about-steps-wrapper {
  max-width: 620px;
  margin: 0 auto 3.5rem auto;
}

.about-steps-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.about-step-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.about-step-badge {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: #4f46e5;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
  margin-top: 2px;
}

.about-step-content {
  flex: 1;
}

.about-step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.about-step-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* CTA Bottom Section */
.about-cta-container {
  text-align: center;
  padding: 1.5rem 1rem 1rem 1rem;
}

.about-cta-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.about-cta-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.about-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #4f46e5;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  transition: all var(--transition-fast);
  text-decoration: none;
  cursor: pointer;
}

.about-cta-btn:hover {
  background: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

/* =========================================================
   Contact Us Page Component Styles (Pixel-Perfect Mockup)
   ========================================================= */

.contact-page-wrapper {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.5rem 0 4rem 0;
}

.contact-hero-header {
  text-align: center;
  margin-bottom: 2.75rem;
}

.contact-hero-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #ede9fe;
  border: 1px solid #ddd6fe;
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

[data-theme="dark"] .contact-hero-badge {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

.contact-hero-title {
  font-size: clamp(2.1rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-bottom: 0.85rem;
}

.contact-hero-desc {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.65;
}

/* Main 2-Column Grid (Cards on Left + Form on Right) */
.contact-main-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.75rem;
  margin-bottom: 3.5rem;
}

@media (max-width: 820px) {
  .contact-main-grid {
    grid-template-columns: 1fr;
  }
}

/* Left Stack Info Cards */
.contact-info-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 1.4rem;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.contact-info-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.35);
}

.contact-info-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #ede9fe;
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.15rem;
}

[data-theme="dark"] .contact-info-icon {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

.contact-info-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  text-transform: capitalize;
}

.contact-info-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
  word-break: break-word;
}

.contact-info-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Right Form Card */
.contact-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 600px) {
  .contact-form-row {
    grid-template-columns: 1fr;
  }
}

.contact-form-group {
  margin-bottom: 1.25rem;
}

.contact-form-group:last-of-type {
  margin-bottom: 1.5rem;
}

.contact-form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.contact-form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.contact-form-input:focus {
  border-color: #6366f1;
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.contact-form-textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: #4f46e5;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  transition: all var(--transition-fast);
}

.contact-submit-btn:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.45);
}

/* FAQ Bottom Section */
.contact-faq-banner {
  background: #f6f5ff;
  border: 1px solid #e2e0fb;
  border-radius: 22px;
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-top: 1rem;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.04);
}

[data-theme="dark"] .contact-faq-banner {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
}

.contact-faq-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 0.4rem;
}

.contact-faq-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 2rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}

.contact-faq-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

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

.contact-faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 1.35rem;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.contact-faq-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.contact-faq-q {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.contact-faq-a {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* =========================================================
   Legal & Policy Pages Component Styles (Pixel-Perfect Mockup)
   ========================================================= */

.legal-page-wrapper {
  max-width: 780px;
  margin: 0 auto;
  padding: 1.5rem 0 4.5rem 0;
}

.legal-hero-header {
  text-align: center;
  margin-bottom: 2.25rem;
}

.legal-hero-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #ede9fe;
  border: 1px solid #ddd6fe;
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

[data-theme="dark"] .legal-hero-badge {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

.legal-hero-title {
  font-size: clamp(2.1rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.legal-updated-date {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Callout Notice Banner */
.legal-callout-banner {
  background: #f0f4ff;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  color: var(--text-body);
  font-size: 0.95rem;
  line-height: 1.7;
}

[data-theme="dark"] .legal-callout-banner {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.25);
  color: var(--text-body);
}

.legal-warning-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  color: #92400e;
  font-size: 0.95rem;
  line-height: 1.7;
}

[data-theme="dark"] .legal-warning-banner {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
  color: #fde68a;
}

/* Main Card Container */
.legal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02);
  margin-bottom: 2.5rem;
}

.legal-section {
  padding-bottom: 1.85rem;
  margin-bottom: 1.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.legal-section-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  letter-spacing: -0.015em;
}

.legal-text {
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--text-body);
  margin-bottom: 0.85rem;
}

.legal-list {
  list-style: none;
  padding: 0;
  margin: 0.65rem 0 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.legal-list-item {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--text-body);
}

.legal-list-item::before {
  content: '•';
  position: absolute;
  left: 0.25rem;
  color: var(--primary);
  font-weight: 800;
  font-size: 1.1rem;
}

.legal-not-collect-box {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-surface-subtle);
  border-radius: 12px;
  border: 1px dashed var(--border-subtle);
}

.legal-footer-note {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  line-height: 1.6;
}

.legal-related-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* =========================================================
   Home: Explore Practice Categories & Skill Benchmarks (As in Photo)
   ========================================================= */
.section-pill-badge {
  display: inline-block;
  padding: 0.35rem 1.05rem;
  background: #ede9fe;
  color: #6366f1;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
}
[data-theme="dark"] .section-pill-badge {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
}

.explore-categories-section {
  margin: 4.5rem auto 4.5rem auto;
}

.practice-modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 960px) {
  .practice-modules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .practice-modules-grid {
    grid-template-columns: 1fr;
  }
}

.practice-module-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 1.85rem 1.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  position: relative;
}
[data-theme="dark"] .practice-module-card {
  background: var(--bg-card);
  border-color: var(--border-color);
}
.practice-module-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.4);
}

.practice-module-card.card-all-categories {
  border: 2px dashed #cbd5e1;
  background: #fbfcfe;
}
[data-theme="dark"] .practice-module-card.card-all-categories {
  border: 2px dashed #334155;
  background: rgba(30, 41, 59, 0.4);
}
.practice-module-card.card-all-categories:hover {
  border-color: #6366f1;
  border-style: solid;
}

.practice-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.practice-module-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
}
.icon-bg-easy {
  background: #ecfdf5;
  border: 1px solid #d1fae5;
}
[data-theme="dark"] .icon-bg-easy {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
}
.icon-bg-moderate {
  background: #fff7ed;
  border: 1px solid #ffedd5;
}
[data-theme="dark"] .icon-bg-moderate {
  background: rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.3);
}
.icon-bg-all {
  background: #fefce8;
  border: 1px solid #fef08a;
}
[data-theme="dark"] .icon-bg-all {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.3);
}

.practice-level-badge {
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid #e2e8f0;
}
[data-theme="dark"] .practice-level-badge {
  background: #1e293b;
  color: #94a3b8;
  border-color: #334155;
}

.practice-module-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
}

.practice-module-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.practice-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.practice-tests-count {
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-weight: 600;
}

.practice-action-link {
  font-size: 0.86rem;
  font-weight: 700;
  color: #4f46e5;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: transform 0.2s ease;
}
.practice-module-card:hover .practice-action-link {
  transform: translateX(3px);
}

/* Benchmarks Container Card (As in Photo) */
.benchmarks-container-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 3.5rem 2.5rem;
  margin: 4.5rem auto 4.5rem auto;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}
[data-theme="dark"] .benchmarks-container-card {
  background: #0f172a;
  border-color: #1e293b;
}

.badge-benchmarks {
  background: #ede9fe;
  color: #4f46e5;
}
[data-theme="dark"] .badge-benchmarks {
  background: rgba(79, 70, 229, 0.18);
  color: #a5b4fc;
}

.benchmarks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
@media (max-width: 960px) {
  .benchmarks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 540px) {
  .benchmarks-grid {
    grid-template-columns: 1fr;
  }
}

.benchmark-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 2.25rem 1.35rem 1.6rem 1.35rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
[data-theme="dark"] .benchmark-card {
  background: var(--bg-card);
  border-color: var(--border-color);
}
.benchmark-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.benchmark-icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

.benchmark-tier-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.benchmark-wpm-range {
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 0.85rem;
}
.wpm-beginner {
  color: #475569;
}
[data-theme="dark"] .wpm-beginner {
  color: #94a3b8;
}
.wpm-intermediate {
  color: #0284c7;
}
.wpm-advanced {
  color: #6366f1;
}
.wpm-promaster {
  color: #7c3aed;
}

.benchmark-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.6rem;
  min-height: 52px;
}

.benchmark-progress-track {
  width: 100%;
  height: 4px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
  margin-top: auto;
}
[data-theme="dark"] .benchmark-progress-track {
  background: #334155;
}

.benchmark-progress-bar {
  height: 100%;
  border-radius: 9999px;
}
.bar-beginner {
  width: 100%;
  background: #64748b;
}
.bar-intermediate {
  width: 100%;
  background: #0284c7;
}
.bar-advanced {
  width: 100%;
  background: #6366f1;
}
.bar-promaster {
  width: 100%;
  background: linear-gradient(90deg, #7c3aed 0%, #f59e0b 100%);
}

/* =========================================================
   Public Dynamic Ad Placement Slots & Monetization Banners
   ========================================================= */
.ad-slot-container {
  display: none;
  width: 100%;
  margin: 1.5rem auto;
  text-align: center;
  transition: all var(--transition-fast);
}

.ad-slot-container.ad-slot-active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.ad-banner-wrapper {
  display: inline-block;
  max-width: 100%;
  margin: 0 auto;
  padding: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: center;
  overflow: hidden;
}

.ad-label-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  opacity: 0.75;
}

.ad-inner-content {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  max-width: 100%;
  overflow-x: auto;
}

.ad-inner-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

@media (max-width: 768px) {
  .ad-slot-container {
    margin: 1rem auto;
  }
  .ad-banner-wrapper {
    padding: 0.35rem;
  }
}






