/* ============================================================
   Smart Web Tools — Email Signature Generator
   Main Stylesheet
   ============================================================ */

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

:root {
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-light: #dbeafe;
  --accent-xlight: #eff6ff;
  --text-primary: #0f172a;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-lighter: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-md: 0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.05);
  --shadow-lg: 0 20px 25px rgba(0,0,0,.10), 0 10px 10px rgba(0,0,0,.04);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.18s ease;
}

html { scroll-behavior: smooth; font-size: 15px; }

body {
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Container ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--text-primary); }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.25rem; }
p { color: var(--text-secondary); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover { background: var(--accent-xlight); color: var(--accent-dark); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-lighter); color: var(--text-primary); }

.btn-danger { color: #dc2626; border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; color: #b91c1c; }

.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: 7px 14px; font-size: .8rem; }

/* ── Section Headers ──────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p { font-size: 1.05rem; color: var(--text-muted); max-width: 540px; margin: 0 auto; }

/* ══════════════════════════════════════════════════════════
   SITE HEADER
══════════════════════════════════════════════════════════ */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.1rem;
  color: var(--text-primary);
}
.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: .85rem;
}
.logo-text strong { color: var(--accent); }
.header-nav { display: flex; align-items: center; gap: 8px; }
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: .875rem;
  transition: all var(--transition);
  text-decoration: none;
}
.nav-link:hover { background: var(--bg-lighter); color: var(--text-primary); text-decoration: none; }
.nav-cta {
  background: var(--accent);
  color: white !important;
  padding: 8px 18px;
}
.nav-cta:hover { background: var(--accent-dark); color: white !important; }
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
}

/* ══════════════════════════════════════════════════════════
   HERO SECTION
══════════════════════════════════════════════════════════ */
.hero-section {
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 40%, #f0f9ff 100%);
  padding: 80px 0 70px;
  overflow: hidden;
  position: relative;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-xlight);
  color: var(--accent-dark);
  border: 1px solid var(--accent-light);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--text-primary);
}
.hero-highlight {
  color: var(--accent);
  position: relative;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 500px;
}
.hero-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.benefit-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: white;
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}
.benefit-pill i { color: #16a34a; font-size: .75rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero Visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-preview-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
  position: relative;
}
.hero-floating-badge {
  position: absolute;
  background: white;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 12px;
  font-size: .75rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.badge-gmail { top: -12px; left: 20px; color: #ea4335; }
.badge-gmail i { color: #16a34a; }
.badge-outlook { bottom: -12px; right: 20px; color: #0078d4; }
.badge-outlook i { color: #16a34a; }

/* ══════════════════════════════════════════════════════════
   AD SLOTS
══════════════════════════════════════════════════════════ */
.ad-slot { padding: 12px 0; }
.ad-placeholder {
  background: var(--bg-lighter);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-label {
  color: var(--text-light);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ══════════════════════════════════════════════════════════
   TRUST STRIP
══════════════════════════════════════════════════════════ */
.trust-strip {
  background: white;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}
.trust-items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 28px;
  border-right: 1px solid var(--border);
}
.trust-item:last-child { border-right: none; }
.trust-item i {
  font-size: 1.4rem;
  color: var(--accent);
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}
.trust-item div { display: flex; flex-direction: column; }
.trust-item strong { font-size: .875rem; color: var(--text-primary); }
.trust-item span { font-size: .78rem; color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════
   TEMPLATE GALLERY
══════════════════════════════════════════════════════════ */
.template-gallery-section {
  padding: 80px 0;
  background: var(--bg-light);
}
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.template-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  cursor: pointer;
  transition: all .2s ease;
  overflow: hidden;
  position: relative;
}
.template-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.template-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.template-card .active-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent);
  color: white;
  border-radius: 100px;
  padding: 3px 10px;
  font-size: .7rem;
  font-weight: 700;
  display: none;
}
.template-card.active .active-badge { display: block; }
.template-thumb {
  height: 160px;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}
.template-info { padding: 14px 16px; }
.template-name {
  font-weight: 700;
  font-size: .875rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.template-desc {
  font-size: .775rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.template-cta-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px 14px;
  padding: 7px;
  background: var(--accent-xlight);
  color: var(--accent);
  border: 1px solid var(--accent-light);
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.template-card.active .template-cta-btn {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ══════════════════════════════════════════════════════════
   GENERATOR SECTION
══════════════════════════════════════════════════════════ */
.generator-section {
  padding: 80px 0;
  background: white;
}
.generator-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 28px;
  align-items: start;
}

/* ── Editor Panel ──────────────────────────────────────── */
.editor-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.editor-tabs {
  display: flex;
  overflow-x: auto;
  background: var(--bg-lighter);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.editor-tabs::-webkit-scrollbar { display: none; }
.etab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 14px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  border-bottom: 2px solid transparent;
  flex-shrink: 0;
}
.etab i { font-size: .9rem; }
.etab:hover { color: var(--text-primary); background: var(--bg-light); }
.etab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: white;
}
.tab-panels { overflow: hidden; }
.tab-panel {
  display: none;
  max-height: 680px;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.tab-panel.active { display: block; }
.tab-panel::-webkit-scrollbar { width: 4px; }
.tab-panel::-webkit-scrollbar-track { background: transparent; }
.tab-panel::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

.panel-section {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}
.panel-section:last-child { border-bottom: none; }
.panel-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-title i { color: var(--accent); }
.panel-hint {
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }

/* ── Form Elements ─────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full-width { grid-column: 1 / -1; }

.form-group label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.required { color: #dc2626; }
.optional { color: var(--text-muted); font-weight: 400; }

.form-input, .form-select, .form-textarea {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  color: var(--text-primary);
  background: white;
  font-family: var(--font);
  transition: all var(--transition);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.form-input::placeholder { color: var(--text-light); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { cursor: pointer; appearance: auto; }

.form-color {
  width: 44px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 2px;
  background: white;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.toggle-switch input { display: none; }
.toggle-slider {
  width: 40px;
  height: 22px;
  background: var(--border-strong);
  border-radius: 100px;
  transition: all .25s ease;
  position: relative;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: all .25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::after { left: calc(100% - 19px); }

.field-toggle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.field-toggle-header label:first-child {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.toggle-field { grid-column: 1 / -1; }

/* Toggle List */
.toggle-list { display: flex; flex-direction: column; gap: 2px; }
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  cursor: default;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Checkbox */
.checkbox-group { display: flex; gap: 16px; flex-wrap: wrap; }
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
}
.checkbox-label input { cursor: pointer; accent-color: var(--accent); }

/* ── Upload Zone ───────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  background: var(--bg-light);
  transition: all var(--transition);
}
.upload-zone:hover { border-color: var(--accent); background: var(--accent-xlight); }
.upload-preview {
  width: 90px;
  height: 90px;
  border-radius: var(--radius);
  background: white;
  border: 1px solid var(--border);
  margin: 0 auto 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
}
.upload-placeholder i { font-size: 2rem; color: var(--border-strong); }
.upload-placeholder span { font-size: .8rem; font-weight: 500; }
.upload-placeholder small { font-size: .72rem; color: var(--text-light); }
.upload-actions { display: flex; justify-content: center; gap: 8px; margin-bottom: 8px; }
.upload-tip { font-size: .73rem; color: var(--text-light); }

/* Social Inputs */
.social-inputs { display: flex; flex-direction: column; gap: 8px; }
.social-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  border: 1px solid var(--border);
  transition: border-color var(--transition);
}
.social-input-row:focus-within { border-color: var(--accent); background: white; }
.social-input-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  color: white;
  flex-shrink: 0;
}
.social-input-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 70px;
  flex-shrink: 0;
}
.social-input-field {
  flex: 1;
  border: none;
  background: transparent;
  font-size: .82rem;
  color: var(--text-primary);
  font-family: var(--font);
  outline: none;
}
.social-input-field::placeholder { color: var(--text-light); }

/* Save Actions */
.save-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Preview Panel ─────────────────────────────────────── */
.preview-panel {
  position: sticky;
  top: 80px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.preview-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-lighter);
  border-bottom: 1px solid var(--border);
}
.preview-label {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.preview-label i { color: var(--accent); }
.preview-mode-btns { display: flex; gap: 4px; }
.preview-mode-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.preview-mode-btn:hover, .preview-mode-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Preview Wrapper */
.preview-wrapper {
  padding: 20px;
  background: #e9eef5;
  flex: 1;
  min-height: 300px;
  overflow: auto;
  transition: background var(--transition);
}
.preview-wrapper.dark-mode { background: #1e2430; }
.preview-wrapper.mobile-mode .preview-email-chrome {
  max-width: 380px;
  margin: 0 auto;
}

.preview-email-chrome {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.email-chrome-bar {
  background: #f3f4f6;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}
.chrome-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.chrome-dot.red { background: #ef4444; }
.chrome-dot.yellow { background: #f59e0b; }
.chrome-dot.green { background: #10b981; }
.chrome-title {
  margin-left: 8px;
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 500;
}
.email-chrome-body { padding: 20px; }
.email-stub-line {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  margin-bottom: 7px;
  width: 100%;
}
.email-stub-para {
  height: 6px;
  background: #f3f4f6;
  border-radius: 3px;
  margin-bottom: 5px;
  width: 100%;
}
.signature-divider-line {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}
.live-preview-container { overflow: hidden; }
.live-preview-container table { font-size: 13px; }

/* Export Panel */
.export-panel {
  padding: 18px;
  background: var(--bg-light);
  border-top: 1px solid var(--border);
}
.export-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.export-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.export-btn {
  justify-content: center;
  font-size: .8rem;
  padding: 9px 12px;
}
.export-note {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  font-size: .73rem;
  color: var(--text-muted);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  line-height: 1.5;
}
.export-note i { color: var(--accent); flex-shrink: 0; margin-top: 1px; }

/* Toast */
.copy-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111827;
  color: white;
  padding: 12px 24px;
  border-radius: 100px;
  font-size: .875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: all .3s ease;
  white-space: nowrap;
}
.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.copy-toast i { color: #4ade80; }

/* ══════════════════════════════════════════════════════════
   INSTALLATION GUIDES
══════════════════════════════════════════════════════════ */
.guides-section {
  padding: 80px 0;
  background: var(--bg-light);
}
.guide-tab-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.guide-tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  color: var(--text-secondary);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.guide-tab-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-xlight); }
.guide-tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: var(--shadow);
}
.guide-content-area {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.guide-content { display: none; }
.guide-content.active { display: block; }
.guide-content h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.guide-content h3 i { color: var(--accent); }
.guide-content > p { margin-bottom: 20px; color: var(--text-muted); }
.guide-steps { counter-reset: step; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.guide-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.step-num {
  counter-increment: step;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  font-size: .78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.step-content { flex: 1; }
.step-content strong { display: block; font-size: .875rem; color: var(--text-primary); margin-bottom: 2px; }
.step-content p { font-size: .82rem; color: var(--text-muted); line-height: 1.5; }
.guide-tip {
  margin-top: 20px;
  background: var(--accent-xlight);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .82rem;
  color: var(--text-secondary);
}
.guide-tip strong { color: var(--accent); }

/* ══════════════════════════════════════════════════════════
   SEO CONTENT SECTION
══════════════════════════════════════════════════════════ */
.seo-content-section {
  padding: 80px 0;
  background: white;
}
.seo-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.seo-article h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.seo-article h3 {
  font-size: 1.05rem;
  margin-top: 24px;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.seo-article p {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 14px;
}
.seo-article ul, .seo-article ol {
  padding-left: 20px;
  margin-bottom: 14px;
}
.seo-article li {
  font-size: .88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 6px;
}
.seo-article li strong { color: var(--text-primary); }

/* ══════════════════════════════════════════════════════════
   FAQ SECTION
══════════════════════════════════════════════════════════ */
.faq-section {
  padding: 80px 0;
  background: var(--bg-light);
}
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 960px;
  margin: 0 auto;
}
.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  gap: 12px;
  font-weight: 600;
  font-size: .875rem;
  color: var(--text-primary);
  transition: background var(--transition);
}
.faq-question:hover { background: var(--bg-light); }
.faq-question i { color: var(--accent); flex-shrink: 0; font-size: .75rem; transition: transform .2s; }
.faq-question.open i { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 0 20px 16px;
  font-size: .85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.faq-answer.open { display: block; }

/* ══════════════════════════════════════════════════════════
   RELATED TOOLS
══════════════════════════════════════════════════════════ */
.related-tools-section {
  padding: 80px 0;
  background: white;
}
.related-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.related-tool-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-decoration: none;
  transition: all .2s ease;
  display: block;
}
.related-tool-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
  background: white;
}
.related-tool-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-xlight);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--accent);
  margin-bottom: 12px;
}
.related-tool-card h4 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
}
.related-tool-card p {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════
   FOOTER CTA
══════════════════════════════════════════════════════════ */
.footer-cta-section {
  background: linear-gradient(135deg, var(--accent) 0%, #1d4ed8 100%);
  padding: 70px 0;
  color: white;
}
.footer-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-cta-content h2 { color: white; font-size: 1.875rem; margin-bottom: 12px; }
.footer-cta-content p { color: rgba(255,255,255,.85); margin-bottom: 24px; max-width: 500px; }
.footer-cta-content .btn-primary {
  background: white;
  color: var(--accent);
  border-color: white;
}
.footer-cta-content .btn-primary:hover { background: var(--accent-xlight); }
.footer-cta-bookmark {
  text-align: center;
  color: rgba(255,255,255,.9);
}
.footer-cta-bookmark i { font-size: 2rem; margin-bottom: 8px; display: block; }
.footer-cta-bookmark p { font-size: .875rem; color: rgba(255,255,255,.8); margin-bottom: 12px; }
.footer-cta-bookmark .btn-ghost {
  color: white;
  border-color: rgba(255,255,255,.5);
}
.footer-cta-bookmark .btn-ghost:hover { background: rgba(255,255,255,.15); }

/* ══════════════════════════════════════════════════════════
   SITE FOOTER
══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--text-primary);
  color: rgba(255,255,255,.7);
  padding: 60px 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .logo { color: white; margin-bottom: 12px; }
.footer-brand .logo-icon { background: var(--accent); }
.footer-brand p { font-size: .85rem; line-height: 1.7; max-width: 260px; }
.footer-links h4 { color: white; font-size: .875rem; margin-bottom: 14px; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links ul li a {
  font-size: .82rem;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-links ul li a:hover { color: white; }
.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: .8rem;
  color: rgba(255,255,255,.4);
}
.footer-bottom a { color: rgba(255,255,255,.6); }

/* ══════════════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.modal-header h3 i { color: #f59e0b; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .95rem;
  padding: 4px;
  border-radius: 4px;
}
.modal-close:hover { background: var(--bg-lighter); }
.modal-body { padding: 20px; }
.modal-body p { font-size: .9rem; color: var(--text-secondary); }
.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.btn-danger.solid {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}
.btn-danger.solid:hover { background: #b91c1c; }

/* ══════════════════════════════════════════════════════════
   TEMPLATE THUMBNAILS (mini previews)
══════════════════════════════════════════════════════════ */
.mini-sig {
  font-family: Arial, sans-serif;
  text-align: left;
  width: 100%;
}
.mini-sig .ms-name { font-size: 11px; font-weight: 700; color: #111; }
.mini-sig .ms-title { font-size: 9px; color: #6b7280; margin-top: 1px; }
.mini-sig .ms-company { font-size: 9px; color: #374151; font-weight: 600; }
.mini-sig .ms-divider { height: 2px; margin: 5px 0; border-radius: 1px; }
.mini-sig .ms-contact { font-size: 8px; color: #6b7280; margin-top: 3px; }
.mini-sig .ms-icons { display: flex; gap: 3px; margin-top: 4px; }
.mini-sig .ms-icon {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}
.mini-sig .ms-cta {
  margin-top: 5px;
  display: inline-block;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 7px;
  font-weight: 700;
  color: white;
}
.mini-sig .ms-photo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #2563eb;
  float: left;
  margin-right: 8px;
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .generator-layout {
    grid-template-columns: 1fr;
  }
  .preview-panel {
    position: static;
    order: -1;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-visual {
    display: none;
  }
  .hero-title { font-size: 2.2rem; }
  .seo-content-grid { grid-template-columns: 1fr; gap: 32px; }
  .faq-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .site-header .header-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero-title { font-size: 1.9rem; }
  .hero-subtitle { font-size: .95rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { text-align: center; justify-content: center; }
  .trust-items { flex-direction: column; gap: 0; }
  .trust-item { border-right: none; border-bottom: 1px solid var(--border); width: 100%; justify-content: flex-start; }
  .trust-item:last-child { border-bottom: none; }
  .template-grid { grid-template-columns: 1fr 1fr; }
  .editor-tabs { gap: 0; }
  .etab { padding: 10px 10px; font-size: .65rem; }
  .etab span { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group { grid-column: auto; }
  .export-actions { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-cta-inner { flex-direction: column; text-align: center; }
  .guide-tab-nav { gap: 4px; }
  .guide-tab-btn { padding: 8px 12px; font-size: .78rem; }
  .guide-content-area { padding: 20px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-section { padding: 48px 0 40px; }
  h2 { font-size: 1.5rem; }
  .section-header { margin-bottom: 28px; }
  .template-grid { grid-template-columns: 1fr; }
  .export-actions { grid-template-columns: 1fr; }
  .related-tools-grid { grid-template-columns: 1fr 1fr; }
  .modal { width: 95%; }
  .tab-panel { max-height: 500px; }
}

/* ── Utilities ────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
.text-center { text-align: center; }
.mt-4 { margin-top: 4px; }
.mb-0 { margin-bottom: 0; }
.gap-4 { gap: 4px; }

/* Scrollbar for panel sections */
.tab-panel {
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

/* ── Modal Danger Button ──────────────────────────────────── */
#confirmReset {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
  font-weight: 700;
}
#confirmReset:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  transform: none;
}

/* ── Template grid scroll on mobile ─────────────────────── */
@media (max-width: 480px) {
  .template-grid {
    overflow-x: visible;
  }
}

/* ── Preview chrome responsive fix ──────────────────────── */
@media (max-width: 480px) {
  .email-chrome-body { padding: 12px; }
  .preview-wrapper { padding: 12px; }
  .export-panel { padding: 14px; }
}

/* ── Form color input label alignment ───────────────────── */
.form-group .form-color {
  display: block;
}

/* ── Panel section divider spacing ─────────────────────── */
.panel-section + .panel-section {
  border-top: 1px solid var(--border);
}

/* ── Signature preview scaling ──────────────────────────── */
.live-preview-container {
  transform-origin: top left;
}

/* ── Anchor smooth scroll offset for sticky header ─────── */
:target::before {
  content: '';
  display: block;
  height: 80px;
  margin-top: -80px;
}

/* ── Dark mode preview text fix ─────────────────────────── */
.preview-wrapper.dark-mode .email-chrome-bar {
  background: #2d3748;
  border-bottom-color: #4a5568;
}
.preview-wrapper.dark-mode .email-chrome-body {
  background: #1a202c;
}
.preview-wrapper.dark-mode .email-stub-line {
  background: #4a5568;
}
.preview-wrapper.dark-mode .email-stub-para {
  background: #2d3748;
}
.preview-wrapper.dark-mode .signature-divider-line {
  background: #4a5568;
}
.preview-wrapper.dark-mode .preview-email-chrome {
  background: #1a202c;
}

/* ── Sticky preview scroll ───────────────────────────────── */
@media (min-width: 1025px) {
  .preview-panel {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
}

/* ── Generator section label ────────────────────────────── */
.generator-section .section-header {
  margin-bottom: 36px;
}

/* ── Input with toggle label alignment ──────────────────── */
.toggle-field .form-input,
.toggle-field .form-select {
  margin-top: 0;
}

/* ── Photo preview circular view ────────────────────────── */
.upload-preview img {
  border-radius: var(--radius-sm);
}

/* ── Color field row alignment ──────────────────────────── */
.form-group label + .form-color {
  margin-top: 2px;
}

/* ── Hero badge pulse ────────────────────────────────────── */
@keyframes heroPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,0.3); }
  50% { box-shadow: 0 0 0 6px rgba(37,99,235,0); }
}
.hero-badge {
  animation: heroPulse 2.5s ease infinite;
}

/* ── Active template thumbnail ring ─────────────────────── */
.template-card.active .template-thumb {
  background: var(--accent-xlight);
}

/* ── Export panel CTA color ──────────────────────────────── */
.export-panel .btn-primary {
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

/* ── Section animation ──────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.tab-panel.active {
  animation: fadeIn .15s ease;
}
.guide-content.active {
  animation: fadeIn .15s ease;
}

/* ── Export panel on small screens ──────────────────────── */
@media (max-width: 360px) {
  .export-actions {
    grid-template-columns: 1fr;
  }
  .export-btn {
    font-size: .75rem;
  }
}

/* ── Trust strip on small mobile ────────────────────────── */
@media (max-width: 360px) {
  .trust-item {
    padding: 10px 16px;
  }
}

/* ── Benefit pills responsive ───────────────────────────── */
@media (max-width: 360px) {
  .hero-benefits {
    gap: 5px;
  }
  .benefit-pill {
    font-size: .72rem;
    padding: 4px 8px;
  }
}

/* ── Guide steps on mobile ───────────────────────────────── */
@media (max-width: 480px) {
  .guide-content-area { padding: 16px; }
  .step-content strong { font-size: .82rem; }
  .step-content p { font-size: .78rem; }
}

/* ── Color input grid alignment ─────────────────────────── */
.form-grid .form-group:has(.form-color) {
  align-items: start;
}

/* ── Improve form group spacing ─────────────────────────── */
.form-grid {
  row-gap: 14px;
  column-gap: 12px;
}

/* ── Social input row focus ring ────────────────────────── */
.social-input-row:focus-within {
  box-shadow: 0 0 0 2px var(--accent-light);
}

/* ── Scrollable template gallery on mobile ──────────────── */
@media (max-width: 600px) {
  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Table in mini sig thumbnail ────────────────────────── */
.template-thumb table {
  border-collapse: collapse;
  width: auto;
}
.template-thumb td {
  padding: 0;
  vertical-align: top;
}

/* ── Prevent template thumbnail overflow ────────────────── */
.template-thumb {
  font-size: 12px;
  overflow: hidden;
}
.template-thumb .mini-sig {
  width: 100%;
  max-width: 100%;
}

/* ── Print styles ───────────────────────────────────────── */
@media print {
  .site-header,
  .hero-section,
  .trust-strip,
  .template-gallery-section,
  .editor-panel,
  .export-panel,
  .guides-section,
  .faq-section,
  .related-tools-section,
  .footer-cta-section,
  .site-footer,
  .ad-slot { display: none !important; }

  .preview-panel {
    position: static;
    box-shadow: none;
    border: none;
  }
  .preview-wrapper {
    background: white;
    padding: 0;
  }
}
