/* ============================================
   FREETOS.ORG — DESIGN SYSTEM
   Premium Legal Document Generator
   ============================================ */

/* 1. CSS Custom Properties */
:root {
  /* Brand Colors */
  --primary: #4f46e5;
  --primary-light: #6366f1;
  --primary-dark: #3730a3;
  --accent: #7c3aed;
  --accent-light: #8b5cf6;

  /* Semantic Colors */
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;

  /* Backgrounds */
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --bg-3: #f1f5f9;

  /* Surfaces */
  --surface: #ffffff;
  --surface-hover: #f8fafc;

  /* Borders */
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Text */
  --text: #0f172a;
  --text-2: #334155;
  --text-3: #64748b;
  --text-4: #94a3b8;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #4f46e5, #7c3aed);
  --grad-hero: linear-gradient(135deg, #eef2ff 0%, #faf5ff 50%, #f0fdf4 100%);
  --grad-card: linear-gradient(135deg, rgba(99,102,241,0.05), rgba(124,58,237,0.05));

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.09), 0 8px 10px -6px rgba(0,0,0,0.05);
  --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.15);
  --shadow-primary: 0 8px 25px rgba(79,70,229,0.25);

  /* Radii */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Layout */
  --container: 1280px;
  --nav-h: 68px;
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, select, textarea {
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ============================================
   3. Typography
   ============================================ */
h1, h2, h3, h4, h5 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

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

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  letter-spacing: -0.01em;
}

h4 {
  font-size: 1.125rem;
}

p {
  color: var(--text-3);
}

.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-sm  { font-size: 0.875rem; }
.text-xs  { font-size: 0.8125rem; }
.text-lg  { font-size: 1.125rem; }
.text-xl  { font-size: 1.25rem; }

.font-bold   { font-weight: 700; }
.font-semi   { font-weight: 600; }
.font-medium { font-weight: 500; }

/* ============================================
   4. Layout Utilities
   ============================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section    { padding: var(--space-20) 0; }
.section-sm { padding: var(--space-12) 0; }
.section-lg { padding: var(--space-24) 0; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.relative { position: relative; }
.absolute { position: absolute; }
.sticky   { position: sticky; }
.fixed    { position: fixed; }

.overflow-hidden { overflow: hidden; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.z-100 { z-index: 100; }

/* ============================================
   5. Navigation
   ============================================ */
.nav .container { height: 100%; }

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav.scrolled {
  background: rgba(255,255,255,0.95);
  box-shadow: var(--shadow-md);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 0.875rem;
  flex-shrink: 0;
}

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

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

/* ── Nav Links ──────────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-3);
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.nav-link:hover { color: var(--text); background: var(--bg-2); }
.nav-link.active { color: var(--primary); background: #eef2ff; }

/* ── Mega Menu ──────────────────────────────── */
.nav-mega-wrap {
  position: relative;
}

.nav-mega-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}
.nav-mega-trigger:hover,
.nav-mega-wrap.open .nav-mega-trigger {
  color: var(--text);
  background: var(--bg-2);
}
.mega-chevron {
  transition: transform 0.2s ease;
  opacity: 0.6;
}
.nav-mega-wrap.open .mega-chevron { transform: rotate(180deg); }

/* Panel */
.nav-mega-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: 680px;
  background: white;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15,23,42,0.14), 0 4px 16px rgba(15,23,42,0.06);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 500;
  overflow: hidden;
}
.nav-mega-wrap.open .nav-mega-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-mega-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  padding: 20px;
}

.nav-mega-col {
  padding: 4px 12px;
}
.nav-mega-col + .nav-mega-col {
  border-left: 1px solid var(--border);
}

.nav-mega-col-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.nav-mega-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.8375rem;
  font-weight: 500;
  color: var(--text-2);
  transition: background 0.12s, color 0.12s;
  text-decoration: none;
  white-space: nowrap;
}
.nav-mega-item:hover {
  background: var(--bg-2);
  color: var(--primary);
}
.nav-mega-item:hover .mega-dot { transform: scale(1.3); }

.mega-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dc, #4f46e5);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.nav-mega-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}
.nav-mega-footer-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.15s;
}
.nav-mega-footer-link:hover { opacity: 0.75; }
.nav-mega-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ── Nav CTA Button ─────────────────────────── */
.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 10px;
  background: var(--grad-primary);
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
  box-shadow: 0 2px 12px rgba(79,70,229,0.35), 0 1px 3px rgba(79,70,229,0.2);
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.nav-cta-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79,70,229,0.4), 0 2px 6px rgba(79,70,229,0.25);
  color: white;
}
.nav-cta-btn:active { transform: translateY(0); }

/* ── Nav Actions (right side) ───────────────── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Mobile Panel ───────────────────────────── */
.nav-mobile-panel {
  background: white;
  border-top: 1px solid var(--border);
  padding: 16px 24px 20px;
}
.nav-mobile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.nav-mobile-item {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.8375rem;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  transition: background 0.12s;
}
.nav-mobile-item:hover { background: var(--bg-2); }

/* Legacy compat – keep old class stubs so other pages don't break */
.nav-dropdown { position: relative; }
.nav-dropdown-menu { display: none !important; }
.nav-dropdown:hover .nav-dropdown-menu { display: grid !important; }

.nav-dropdown-item {
  font-size: 1rem;
  width: 24px;
  text-align: center;
}

/* Nav CTA */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  background: var(--grad-primary);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-primary);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(79,70,229,0.35);
  color: white;
}

/* Mobile nav toggle */
.nav-mobile-toggle {
  display: none;
  padding: var(--space-2);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-mobile-toggle:hover {
  background: var(--bg-3);
}

/* Mobile Menu Drawer */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: var(--space-4);
  box-shadow: var(--shadow-lg);
  z-index: 99;
  animation: slideDown 0.2s ease-out;
}

.nav-mobile-menu.open {
  display: block;
}

.nav-mobile-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-2);
  transition: var(--transition);
}

.nav-mobile-link:hover {
  background: var(--bg-2);
  color: var(--primary);
}

/* ============================================
   6. Hero Section
   ============================================ */
.hero {
  padding-top: calc(var(--nav-h) + var(--space-20));
  padding-bottom: var(--space-16);
  position: relative;
  overflow: hidden;
  background: var(--grad-hero);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.hero-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.12), transparent);
  top: -200px;
  left: -200px;
  animation: float 8s ease-in-out infinite;
}

.hero-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124,58,237,0.10), transparent);
  top: -100px;
  right: -100px;
  animation: float 10s ease-in-out infinite reverse;
}

.hero-orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(16,185,129,0.07), transparent);
  bottom: -100px;
  left: 30%;
  animation: float 12s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-6);
  animation: slideDown 0.6s ease-out;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

.hero-title {
  margin-bottom: var(--space-6);
  animation: slideUp 0.6s ease-out 0.1s both;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-3);
  max-width: 600px;
  margin: 0 auto var(--space-8);
  animation: slideUp 0.6s ease-out 0.2s both;
}

.hero-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  animation: slideUp 0.6s ease-out 0.3s both;
}

.hero-stats {
  display: flex;
  gap: var(--space-8);
  justify-content: center;
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
  animation: slideUp 0.6s ease-out 0.4s both;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}

.hero-stat-label {
  font-size: 0.8125rem;
  color: var(--text-4);
  margin-top: 2px;
}

/* ============================================
   7. Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: var(--transition);
  white-space: nowrap;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(79,70,229,0.35);
  color: white;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: white;
  color: var(--text-2);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: #f5f3ff;
}

.btn-ghost {
  color: var(--primary);
  padding: var(--space-3) var(--space-4);
  background: transparent;
}

.btn-ghost:hover {
  background: #eef2ff;
}

.btn-white {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow);
}

.btn-white:hover {
  background: #f5f3ff;
  transform: translateY(-1px);
}

.btn-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1.5px solid #fecaca;
}

.btn-danger:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: 0.875rem;
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: 1.0625rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
}

.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================
   8. Tool Cards Grid (Homepage)
   ============================================ */
.tools-section {
  background: var(--bg-2);
}

.tools-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.tools-header p {
  font-size: 1.125rem;
  max-width: 560px;
  margin: var(--space-3) auto 0;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.tool-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: var(--transition);
  cursor: pointer;
  display: block;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-card);
  opacity: 0;
  transition: var(--transition);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

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

.tool-card-inner {
  position: relative;
  z-index: 1;
}

.tool-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
}

.tool-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.tool-card-desc {
  font-size: 0.875rem;
  color: var(--text-3);
  line-height: 1.5;
}

.tool-card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: var(--space-3);
  opacity: 0;
  transform: translateX(-4px);
  transition: var(--transition);
}

.tool-card:hover .tool-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

.tool-card-badge {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  z-index: 2;
}

.badge-new   { background: #dcfce7; color: #15803d; }
.badge-hot   { background: #fee2e2; color: #dc2626; }
.badge-gdpr  { background: #dbeafe; color: #1d4ed8; }
.badge-pro   { background: #fef3c7; color: #92400e; }

/* Icon Color Variants */
.icon-indigo { background: #eef2ff; color: #4f46e5; }
.icon-purple { background: #f5f3ff; color: #7c3aed; }
.icon-blue   { background: #eff6ff; color: #2563eb; }
.icon-green  { background: #f0fdf4; color: #16a34a; }
.icon-orange { background: #fff7ed; color: #ea580c; }
.icon-pink   { background: #fdf2f8; color: #db2777; }
.icon-teal   { background: #f0fdfa; color: #0d9488; }
.icon-amber  { background: #fffbeb; color: #d97706; }
.icon-red    { background: #fef2f2; color: #dc2626; }
.icon-sky    { background: #f0f9ff; color: #0284c7; }
.icon-lime   { background: #f7fee7; color: #65a30d; }
.icon-rose   { background: #fff1f2; color: #e11d48; }

/* ============================================
   9. Generator Layout
   ============================================ */
.generator-section {
  padding: var(--space-6) 0 var(--space-20);
}

.generator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: start;
  min-height: 600px;
}

/* Form Panel */
.form-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: calc(var(--nav-h) + var(--space-4));
}

.form-panel-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
}

.form-panel-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: #eef2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.form-panel-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.form-panel-subtitle {
  font-size: 0.8125rem;
  color: var(--text-4);
  margin: 0;
}

/* Form Sections */
.form-section {
  margin-bottom: var(--space-6);
}

.form-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-4);
  margin-bottom: var(--space-3);
  display: block;
}

.form-group {
  margin-bottom: var(--space-4);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: var(--space-2);
  display: block;
}

.form-label-required::after {
  content: '*';
  color: var(--danger);
  margin-left: 2px;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-4);
  margin-top: var(--space-1);
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  color: var(--text);
  background: white;
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79,70,229,0.08);
}

.form-input:hover:not(:focus) {
  border-color: var(--border-strong);
}

.form-input::placeholder {
  color: var(--text-4);
}

.form-input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.08);
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

/* Toggle Items */
.toggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.toggle-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.toggle-item:hover {
  border-color: var(--primary-light);
  background: #f5f3ff;
}

.toggle-item.active {
  border-color: var(--primary);
  background: #eef2ff;
}

.toggle-check {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  background: white;
}

.toggle-item.active .toggle-check {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.toggle-check-icon {
  display: none;
  width: 12px;
  height: 12px;
}

.toggle-item.active .toggle-check-icon {
  display: block;
}

.toggle-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.3;
}

.toggle-item.active .toggle-label {
  color: var(--primary-dark);
  font-weight: 600;
}

/* Generate Button */
.generate-btn {
  width: 100%;
  padding: var(--space-4);
  background: var(--grad-primary);
  color: white;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  box-shadow: var(--shadow-primary);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(79,70,229,0.4);
}

.generate-btn:active {
  transform: translateY(0);
}

.generate-btn .btn-spark {
  font-size: 1.125rem;
}

/* ============================================
   10. Preview Panel
   ============================================ */
.preview-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 600px;
  display: flex;
  flex-direction: column;
}

.preview-header {
  padding: var(--space-4) var(--space-6);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.preview-header-dots {
  display: flex;
  gap: 6px;
}

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

.preview-dot-red    { background: #fc625d; }
.preview-dot-yellow { background: #fdbc40; }
.preview-dot-green  { background: #34c84a; }

.preview-header-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-3);
}

.preview-header-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: #dcfce7;
  color: #15803d;
  display: none;
}

.preview-header-badge.visible {
  display: inline-flex;
}

.preview-body {
  flex: 1;
  padding: var(--space-8);
  overflow-y: auto;
  position: relative;
}

.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: var(--space-4);
  color: var(--text-4);
  min-height: 400px;
  text-align: center;
}

.preview-placeholder-icon {
  font-size: 3.5rem;
  opacity: 0.25;
  margin-bottom: var(--space-2);
}

.preview-placeholder-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-3);
}

.preview-placeholder-text {
  font-size: 0.9rem;
  color: var(--text-4);
  max-width: 280px;
}

.preview-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  min-height: 400px;
}

.preview-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  animation: spin 0.75s linear infinite;
}

.preview-loading-text {
  font-size: 0.9375rem;
  color: var(--text-3);
  font-weight: 600;
}

.preview-loading-sub {
  font-size: 0.8125rem;
  color: var(--text-4);
  margin-top: -var(--space-2);
}

/* Preview Content Typography */
.preview-content {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.preview-content.visible {
  display: block;
}

.preview-content h1 {
  font-size: 1.375rem;
  color: var(--text);
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--border);
}

.preview-content .last-updated {
  font-size: 0.8125rem;
  color: var(--text-4);
  margin-bottom: var(--space-6);
  font-style: italic;
}

.preview-content h2 {
  font-size: 1.0625rem;
  color: var(--text);
  margin: var(--space-6) 0 var(--space-3);
  padding-left: var(--space-3);
  border-left: 3px solid var(--primary);
}

.preview-content h3 {
  font-size: 0.9375rem;
  color: var(--text-2);
  margin: var(--space-4) 0 var(--space-2);
}

.preview-content p {
  font-size: 0.9rem;
  color: var(--text-2);
  margin-bottom: var(--space-3);
  line-height: 1.75;
}

.preview-content ul,
.preview-content ol {
  padding-left: var(--space-5);
  margin-bottom: var(--space-3);
  list-style: disc;
}

.preview-content ol {
  list-style: decimal;
}

.preview-content li {
  font-size: 0.9rem;
  color: var(--text-2);
  margin-bottom: var(--space-2);
  line-height: 1.65;
}

.preview-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.preview-content strong {
  font-weight: 700;
  color: var(--text);
}

/* Export Actions Bar */
.export-actions {
  padding: var(--space-4) var(--space-6);
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  display: none;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
}

.export-actions.visible {
  display: flex;
}

.export-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.export-btn-copy {
  background: var(--primary);
  color: white;
}

.export-btn-copy:hover {
  background: var(--primary-dark);
  color: white;
}

.export-btn-html {
  background: white;
  color: var(--text-2);
  border: 1.5px solid var(--border);
}

.export-btn-html:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f5f3ff;
}

.export-btn-pdf {
  background: white;
  color: var(--text-2);
  border: 1.5px solid var(--border);
}

.export-btn-pdf:hover {
  border-color: #dc2626;
  color: #dc2626;
  background: #fef2f2;
}

.export-spacer {
  flex: 1;
}

.export-label {
  font-size: 0.75rem;
  color: var(--text-4);
  font-weight: 600;
}

/* ============================================
   11. Affiliate Cards
   ============================================ */
.affiliate-section {
  margin-top: var(--space-6);
  display: none;
}

.affiliate-section.visible {
  display: block;
}

.affiliate-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-4);
  margin-bottom: var(--space-3);
}

.affiliate-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.affiliate-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  text-decoration: none;
}

.affiliate-card:hover {
  border-color: var(--primary-light);
  background: #f5f3ff;
  transform: translateX(2px);
}

.affiliate-card-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.affiliate-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: white;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.affiliate-card-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.affiliate-card-desc {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-top: 1px;
}

.affiliate-card-btn {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
  background: white;
  border: 1px solid var(--border);
}

.affiliate-card:hover .affiliate-card-btn {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ============================================
   12. Benefits / Features Section
   ============================================ */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.benefit-card {
  text-align: center;
  padding: var(--space-8) var(--space-6);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.benefit-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: var(--grad-primary);
  border-radius: var(--radius-full);
  opacity: 0;
  transition: var(--transition);
}

.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.benefit-card:hover::after {
  opacity: 1;
}

.benefit-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-4);
  display: block;
}

.benefit-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.benefit-desc {
  font-size: 0.9375rem;
  color: var(--text-3);
  line-height: 1.65;
}

/* ============================================
   13. FAQ Accordion
   ============================================ */
.faq-section {
  background: var(--bg-2);
}

.faq-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item.open {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  gap: var(--space-4);
  user-select: none;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--text-3);
}

.faq-item.open .faq-icon {
  background: #eef2ff;
  color: var(--primary);
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 var(--space-6);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s;
}

.faq-item.open .faq-answer {
  max-height: 600px;
  padding-bottom: var(--space-5);
}

.faq-answer p {
  font-size: 0.9375rem;
  color: var(--text-3);
  line-height: 1.75;
}

.faq-answer a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================
   14. Related Tools
   ============================================ */
.related-section {
  background: var(--bg-2);
}

.related-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.related-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: var(--transition);
  display: block;
  text-decoration: none;
}

.related-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.related-card-icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-3);
}

.related-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-1);
}

.related-card-subtitle {
  font-size: 0.8125rem;
  color: var(--text-4);
}

/* ============================================
   15. Stats / Counter Bar
   ============================================ */
.stats-bar {
  background: var(--grad-primary);
  color: white;
  padding: var(--space-10) 0;
  position: relative;
  overflow: hidden;
}

.stats-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.stats-bar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  position: relative;
}

.stats-item {
  text-align: center;
}

.stats-value {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stats-label {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: var(--space-2);
}

/* ============================================
   16. Comparison Table
   ============================================ */
.comparison-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
}

.comparison-table th {
  padding: var(--space-4) var(--space-6);
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 700;
  background: var(--bg-2);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.comparison-table th.highlight {
  background: #eef2ff;
  color: var(--primary);
}

.comparison-table th:first-child {
  text-align: left;
}

.comparison-table td {
  padding: var(--space-4) var(--space-6);
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--text-2);
}

.comparison-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--text);
}

.comparison-table td.highlight {
  background: #f5f3ff;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover td {
  background: var(--bg-2);
}

.comparison-table tr:hover td.highlight {
  background: #eef2ff;
}

.comparison-table .check {
  color: var(--success);
  font-size: 1.25rem;
}

.comparison-table .cross {
  color: var(--text-4);
  font-size: 1.25rem;
}

/* ============================================
   17. Blog Cards
   ============================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.blog-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: var(--transition);
  display: block;
  text-decoration: none;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.blog-card-img {
  height: 160px;
  background: var(--grad-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.blog-card-img-gradient {
  position: absolute;
  inset: 0;
  background: var(--grad-hero);
}

.blog-card-img-icon {
  position: relative;
  z-index: 1;
}

.blog-card-body {
  padding: var(--space-6);
}

.blog-card-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: var(--space-2);
}

.blog-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-3);
  line-height: 1.4;
}

.blog-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-3);
  line-height: 1.6;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-4);
}

.blog-card-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-4);
}

/* ============================================
   18. Testimonials
   ============================================ */
.testimonials-section {
  background: var(--bg-2);
}

.testimonials-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.testimonial-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.testimonial-stars {
  color: #fbbf24;
  font-size: 0.875rem;
  margin-bottom: var(--space-4);
  letter-spacing: 2px;
}

.testimonial-text {
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: var(--space-5);
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.testimonial-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.testimonial-role {
  font-size: 0.8125rem;
  color: var(--text-4);
  margin-top: 1px;
}

/* ============================================
   19. CTA Section
   ============================================ */
.cta-section {
  background: var(--grad-primary);
  color: white;
  text-align: center;
  padding: var(--space-20) 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.08), transparent);
  border-radius: 50%;
}

.cta-section::after {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.06), transparent);
  border-radius: 50%;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  color: white;
  margin-bottom: var(--space-4);
}

.cta-section p {
  color: rgba(255,255,255,0.82);
  font-size: 1.125rem;
  max-width: 520px;
  margin: 0 auto var(--space-8);
}

.cta-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn-white {
  background: white;
  color: var(--primary);
  font-weight: 700;
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-full);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.cta-btn-white:hover {
  background: #eef2ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.cta-btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.5);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.cta-btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: white;
}

/* ============================================
   20. Footer
   ============================================ */
.footer {
  background: #0a0f1e;
  color: rgba(255,255,255,0.65);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  text-decoration: none;
}

.footer-brand-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

.footer-brand-name {
  color: white;
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.footer-brand-desc {
  font-size: 0.875rem;
  line-height: 1.65;
  max-width: 280px;
  margin-bottom: var(--space-5);
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-3);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.7);
}

.footer-col-title {
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.footer-link {
  font-size: 0.875rem;
  padding: 5px 0;
  transition: var(--transition);
  display: block;
}

.footer-link:hover {
  color: white;
  transform: translateX(2px);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-6);
}

.footer-bottom-links a {
  transition: var(--transition);
}

.footer-bottom-links a:hover {
  color: white;
}

/* ============================================
   21. Article / Blog Styles
   ============================================ */
.article-hero {
  padding-top: calc(var(--nav-h) + var(--space-12));
  padding-bottom: var(--space-10);
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}

.article-hero-inner {
  max-width: 760px;
  margin: 0 auto;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  font-size: 0.875rem;
  color: var(--text-3);
  flex-wrap: wrap;
}

.article-tag {
  background: #eef2ff;
  color: var(--primary);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.8125rem;
}

.article-meta-sep {
  color: var(--border-strong);
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-12) 0;
}

.article-body h2 {
  margin: var(--space-10) 0 var(--space-4);
  font-size: 1.5rem;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.article-body h3 {
  margin: var(--space-8) 0 var(--space-3);
  font-size: 1.25rem;
}

.article-body p {
  margin-bottom: var(--space-4);
  line-height: 1.85;
  font-size: 1.0625rem;
  color: var(--text-2);
}

.article-body ul,
.article-body ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-5);
  list-style: disc;
}

.article-body ol {
  list-style: decimal;
}

.article-body li {
  margin-bottom: var(--space-2);
  line-height: 1.75;
  color: var(--text-2);
  font-size: 1.0625rem;
}

.article-body strong {
  color: var(--text);
  font-weight: 700;
}

.article-body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-callout {
  background: #eef2ff;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-5) var(--space-6);
  margin: var(--space-7) 0;
}

.article-callout p {
  color: var(--text-2);
  margin: 0;
  font-size: 1rem;
}

.article-callout-warning {
  background: #fffbeb;
  border-left-color: var(--warning);
}

.article-callout-success {
  background: #f0fdf4;
  border-left-color: var(--success);
}

.article-cta {
  background: var(--grad-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
  margin: var(--space-10) 0;
  color: white;
}

.article-cta h3 {
  color: white;
  margin-bottom: var(--space-3);
  font-size: 1.375rem;
}

.article-cta p {
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-5);
  font-size: 1rem;
}

/* ============================================
   22. Page Heroes (Non-Home)
   ============================================ */
.page-hero {
  padding-top: calc(var(--nav-h) + var(--space-12));
  padding-bottom: var(--space-10);
  background: var(--grad-hero);
  position: relative;
  overflow: hidden;
}

.page-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.page-hero-orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99,102,241,0.1), transparent);
  top: -150px;
  right: -100px;
}

.page-hero-orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(124,58,237,0.08), transparent);
  bottom: -100px;
  left: -50px;
}

.page-hero-content {
  position: relative;
  z-index: 1;
}

.page-hero-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.875rem;
  color: var(--text-3);
  margin-bottom: var(--space-4);
}

.page-hero-breadcrumb a:hover {
  color: var(--primary);
}

.page-hero-breadcrumb-sep {
  color: var(--text-4);
}

.page-hero-title {
  margin-bottom: var(--space-4);
}

.page-hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-3);
  max-width: 640px;
  line-height: 1.6;
}

/* ============================================
   23. Trust Bar
   ============================================ */
.trust-bar {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.trust-bar-inner {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  justify-content: center;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.875rem;
  color: var(--text-3);
  font-weight: 500;
  white-space: nowrap;
}

.trust-icon {
  color: var(--success);
  font-size: 1rem;
}

/* ============================================
   24. About Page
   ============================================ */
.about-hero {
  padding-top: calc(var(--nav-h) + var(--space-16));
  padding-bottom: var(--space-16);
  background: var(--grad-hero);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.team-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.team-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  margin: 0 auto var(--space-4);
}

.team-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-1);
}

.team-role {
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.team-bio {
  font-size: 0.875rem;
  color: var(--text-3);
  line-height: 1.6;
}

.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.mission-img {
  background: var(--grad-hero);
  border-radius: var(--radius-xl);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  border: 1px solid var(--border);
}

/* ============================================
   25. Pricing Cards
   ============================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  align-items: start;
}

.pricing-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: var(--transition);
  position: relative;
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
  transform: scale(1.02);
}

.pricing-card-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.pricing-name {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: var(--space-2);
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: var(--space-1);
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0;
}

.pricing-desc {
  font-size: 0.875rem;
  color: var(--text-3);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
}

.pricing-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  list-style: none;
}

.pricing-feature {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.9rem;
  color: var(--text-2);
}

.pricing-feature-check {
  color: var(--success);
  flex-shrink: 0;
  font-size: 1rem;
}

/* ============================================
   26. Breadcrumb
   ============================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.875rem;
  color: var(--text-3);
  flex-wrap: wrap;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb-sep {
  color: var(--text-4);
  font-size: 0.75rem;
}

.breadcrumb-current {
  color: var(--text-2);
  font-weight: 500;
}

/* ============================================
   27. Alert / Notification Components
   ============================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: var(--space-4);
}

.alert-icon {
  flex-shrink: 0;
  font-size: 1.125rem;
  margin-top: 1px;
}

.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* Form Error */
.form-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-4);
  display: none;
  align-items: center;
  gap: var(--space-2);
}

.form-error.visible {
  display: flex;
}

/* ============================================
   28. Skeleton Loading
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text { height: 1em; margin-bottom: var(--space-2); }
.skeleton-text:last-child { width: 60%; }
.skeleton-heading { height: 1.5em; width: 50%; margin-bottom: var(--space-4); }
.skeleton-block { height: 160px; }

/* ============================================
   29. Tabs
   ============================================ */
.tabs {
  border-bottom: 2px solid var(--border);
  display: flex;
  gap: 0;
  margin-bottom: var(--space-6);
}

.tab {
  padding: var(--space-3) var(--space-5);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ============================================
   30. Badges & Labels
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-primary  { background: #eef2ff; color: var(--primary); }
.badge-success  { background: #dcfce7; color: #15803d; }
.badge-warning  { background: #fef3c7; color: #92400e; }
.badge-danger   { background: #fee2e2; color: #dc2626; }
.badge-neutral  { background: var(--bg-3); color: var(--text-3); }

/* ============================================
   31. Dividers
   ============================================ */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-6) 0;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: 0.875rem;
  color: var(--text-4);
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================
   32. Section Headers (Reusable)
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: #eef2ff;
  color: var(--primary);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-4);
}

.section-title {
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-3);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ============================================
   33. Animations
   ============================================ */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-20px) rotate(3deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.9); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideLeft {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* Animation utility classes */
.animate-in   { animation: slideUp 0.5s ease-out both; }
.animate-in-1 { animation-delay: 0.1s; }
.animate-in-2 { animation-delay: 0.2s; }
.animate-in-3 { animation-delay: 0.3s; }
.animate-in-4 { animation-delay: 0.4s; }
.animate-in-5 { animation-delay: 0.5s; }

.fade-in  { animation: fadeIn 0.4s ease-out both; }
.scale-in { animation: scaleIn 0.3s ease-out both; }

/* ============================================
   34. Scroll Animations (JS-enhanced)
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================
   35. Utility Classes
   ============================================ */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mt-auto   { margin-top: auto; }
.mb-0      { margin-bottom: 0; }
.mb-4      { margin-bottom: var(--space-4); }
.mb-6      { margin-bottom: var(--space-6); }
.mb-8      { margin-bottom: var(--space-8); }
.mt-4      { margin-top: var(--space-4); }
.mt-6      { margin-top: var(--space-6); }
.mt-8      { margin-top: var(--space-8); }
.pt-0      { padding-top: 0; }
.pb-0      { padding-bottom: 0; }

/* ============================================
   36. Responsive — 1024px
   ============================================ */
@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-bar-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .pricing-card.featured {
    transform: scale(1);
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   37. Responsive — 768px
   ============================================ */
@media (max-width: 768px) {
  :root {
    --nav-h: 60px;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .generator-layout {
    grid-template-columns: 1fr;
  }

  .form-panel {
    position: static;
    padding: var(--space-6);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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

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

  .hero-stats {
    flex-wrap: wrap;
    gap: var(--space-6);
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .nav-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

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

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

  .mission-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  .footer-bottom-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
  }

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

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .stats-bar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-bar-inner {
    gap: var(--space-4);
  }
}

/* ============================================
   38. Responsive — 640px
   ============================================ */
@media (max-width: 640px) {
  .container {
    padding: 0 var(--space-4);
  }

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

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

  .export-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .export-btn {
    justify-content: center;
  }

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

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

  .hero-stat-value {
    font-size: 1.375rem;
  }

  .section    { padding: var(--space-12) 0; }
  .section-lg { padding: var(--space-16) 0; }

  .form-panel {
    padding: var(--space-5);
    border-radius: var(--radius-lg);
  }

  .preview-panel {
    border-radius: var(--radius-lg);
  }

  .preview-body {
    padding: var(--space-5);
  }

  .article-body {
    padding: var(--space-8) 0;
  }

  .article-body p,
  .article-body li {
    font-size: 1rem;
  }
}

/* ============================================
   39. Print Styles
   ============================================ */
@media print {
  .nav,
  .hero,
  .export-actions,
  .affiliate-section,
  .faq-section,
  .cta-section,
  .footer {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  .preview-content {
    display: block !important;
  }

  .preview-panel {
    border: none;
    box-shadow: none;
  }
}

/* ============================================
   40. Focus & Accessibility
   ============================================ */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   41. Success Modal
   ============================================ */
.doc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.doc-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.doc-modal {
  background: white;
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(15,23,42,0.22), 0 0 0 1px rgba(79,70,229,0.08);
  width: 100%;
  max-width: 520px;
  padding: 40px 36px 32px;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1), opacity 0.25s ease;
  opacity: 0;
  position: relative;
}
.doc-modal-overlay.open .doc-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.doc-modal-close-x {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-2);
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}
.doc-modal-close-x:hover { background: var(--bg-3); color: var(--text); }

.doc-modal-header {
  text-align: center;
  margin-bottom: 28px;
}
.doc-modal-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(16,185,129,0.35);
  animation: checkPop 0.4s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes checkPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.doc-modal-title {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.doc-modal-subtitle {
  font-size: 0.9rem;
  color: var(--text-3);
}
.doc-modal-subtitle strong { color: var(--text-2); }

.doc-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.doc-modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.doc-modal-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(79,70,229,0.04);
}
.doc-modal-btn.primary {
  background: var(--grad-primary);
  border-color: transparent;
  color: white;
  grid-column: 1 / -1;
  padding: 14px;
  font-size: 0.9375rem;
  box-shadow: 0 4px 16px rgba(79,70,229,0.3);
}
.doc-modal-btn.primary:hover {
  opacity: 0.93;
  color: white;
  transform: translateY(-1px);
}

.doc-modal-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.doc-modal-share-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.doc-modal-share-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.doc-modal-share-input {
  flex: 1;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-3);
  background: var(--bg-2);
  outline: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-modal-share-copy {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--primary);
  background: white;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.doc-modal-share-copy:hover { background: var(--primary); color: white; }

.doc-modal-email {
  text-align: center;
}
.doc-modal-email-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-3);
  text-decoration: none;
  transition: var(--transition);
}
.doc-modal-email-link:hover { color: var(--primary); }

.doc-modal-view-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 11px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-3);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}
.doc-modal-view-btn:hover { border-color: var(--text-3); color: var(--text); }

/* Rate-limit notice */
.gen-limit-notice {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #92400e;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
