/* ==========================================================================
   ClauseFlag - Design System & Stylesheet (Enhanced Edition)
   Aesthetic: Clean, authoritative Legal-Tech / FinTech (Stripe & Linear inspired)
   With 1280px Container, Full Mobile Responsiveness, Micro-Animations & Hover Effects
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-subtle: #F1F5F9;
  --navy-900: #0F172A;
  --navy-800: #1E293B;
  --navy-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-400: #94A3B8;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50: #F8FAFC;

  /* Brand Accents */
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --blue-500: #3B82F6;
  --blue-300: #93C5FD;
  --blue-100: #DBEAFE;
  --blue-50: #EFF6FF;

  /* Risk & Status */
  --red-600: #DC2626;
  --red-500: #EF4444;
  --red-100: #FEE2E2;
  --red-50: #FEF2F2;

  --amber-600: #D97706;
  --amber-500: #F59E0B;
  --amber-100: #FEF3C7;
  --amber-50: #FFFBEB;

  --green-600: #059669;
  --green-500: #10B981;
  --green-100: #D1FAE5;
  --green-50: #ECFDF5;

  /* Shadows & Radius */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06), 0 12px 24px -4px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.18);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Smooth Animation Easings */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--navy-800);
  background-color: var(--bg-main);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
}

a {
  color: var(--blue-600);
  text-decoration: none;
  transition: color 0.18s var(--ease-out-expo);
}

a:hover {
  color: var(--blue-700);
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
  transition: all 0.2s var(--ease-out-expo);
  touch-action: manipulation;
}

/* iOS Safari auto-zoom prevention: min 16px on mobile inputs */
input, select, textarea {
  font-family: inherit;
  font-size: 16px;
  color: var(--navy-900);
}

@media (min-width: 768px) {
  input, select, textarea {
    font-size: 0.95rem;
  }
}

/* ==========================================================================
   Container Layout: Exactly 1280px Max-Width
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (max-width: 640px) {
  .container, .container-narrow {
    padding: 0 1rem;
  }
}

/* ==========================================================================
   Hardware-Accelerated Scroll-Reveal Animations
   ========================================================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease-out-expo), transform 0.65s var(--ease-out-expo);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Header & Mobile Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--slate-200);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-900);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: transform 0.25s var(--ease-out-expo);
  flex-shrink: 0;
}

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

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--blue-700) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.25);
  transition: transform 0.25s var(--ease-out-expo);
}

.brand-logo:hover .logo-icon {
  transform: rotate(-4deg);
}

.logo-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--blue-50);
  color: var(--blue-600);
  border: 1px solid var(--blue-100);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  margin-left: 0.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--slate-600);
  transition: color 0.18s var(--ease-out-expo), transform 0.18s var(--ease-out-expo);
  display: inline-block;
}

.nav-link:hover {
  color: var(--navy-900);
  transform: translateY(-1px);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Hide desktop text nav links on mobile to keep header clean */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-container {
    height: 3.75rem;
  }
  .brand-logo {
    font-size: 1.2rem;
  }
  .logo-icon {
    width: 32px;
    height: 32px;
  }
  .logo-badge {
    display: none;
  }
}

/* ==========================================================================
   Buttons with Shimmer, Tactile Hover & Lift Effects
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  transition: transform 0.2s var(--ease-out-expo), box-shadow 0.2s var(--ease-out-expo), background-color 0.2s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  will-change: transform, box-shadow;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(1px);
}

.btn-sm {
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  font-size: 1.05rem;
  padding: 0.9rem 1.85rem;
  border-radius: var(--radius-md);
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(180deg, var(--blue-600) 0%, var(--blue-700) 100%);
  color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: skewX(-20deg);
  transition: none;
}

.btn-primary:hover::after {
  left: 125%;
  transition: left 0.75s ease-in-out;
}

.btn-primary:hover {
  background: linear-gradient(180deg, var(--blue-500) 0%, var(--blue-700) 100%);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background: white;
  color: var(--navy-800);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--slate-50);
  border-color: var(--slate-300);
  box-shadow: var(--shadow-md);
  color: var(--blue-700);
}

.btn-outline {
  border: 1px solid var(--slate-200);
  color: var(--slate-600);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--slate-400);
  color: var(--navy-900);
  background: var(--slate-100);
}

.btn-dark {
  background: var(--navy-900);
  color: white;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.btn-dark:hover {
  background: var(--navy-800);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.3);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 3.5rem 0 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

@media (max-width: 640px) {
  .hero-section {
    padding: 2.25rem 0 1.5rem;
  }
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-800);
  margin-bottom: 1.5rem;
  transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s ease;
  max-width: 100%;
}

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

.trust-pill-icon {
  font-size: 1rem;
}

.hero-title {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--navy-900);
  max-width: 960px;
  margin: 0 auto 1.25rem;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--blue-600) 0%, #4338CA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: var(--slate-600);
  max-width: 760px;
  margin: 0 auto 2rem;
}

.trust-badges-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
  color: var(--slate-500);
  font-size: 0.85rem;
  font-weight: 600;
}

@media (max-width: 640px) {
  .trust-badges-bar {
    gap: 0.85rem 1.25rem;
    font-size: 0.8rem;
  }
}

.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: transform 0.2s var(--ease-out-expo);
}

.trust-badge-item:hover {
  transform: translateY(-1px);
}

/* ==========================================================================
   Scanner Interactive Box (Fully Responsive)
   ========================================================================== */
.scanner-container {
  margin: 2rem auto 4rem;
  background: var(--bg-card);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.scanner-container:hover {
  border-color: var(--slate-300);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
}

/* Preset selector bar with animated scale & glow */
.preset-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.5rem;
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .preset-bar {
    padding: 0.85rem 1rem;
    gap: 0.5rem;
  }
}

.preset-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-500);
  margin-right: 0.25rem;
}

.preset-chip {
  background: white;
  border: 1px solid var(--slate-200);
  padding: 0.42rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy-800);
  transition: transform 0.2s var(--ease-out-expo), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  will-change: transform;
}

.preset-chip:hover {
  border-color: var(--blue-500);
  background: var(--blue-50);
  color: var(--blue-700);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.12);
}

.preset-chip:active {
  transform: translateY(0) scale(0.98);
}

.preset-chip.active {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Scanner Configuration Fields */
.scanner-config-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: white;
  border-bottom: 1px solid var(--slate-200);
}

@media (max-width: 640px) {
  .scanner-config-bar {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
}

.config-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 0.35rem;
}

.select-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  background-color: white;
  color: var(--navy-800);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.select-control:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Scanner Body */
.scanner-body {
  padding: 1.5rem;
}

@media (max-width: 640px) {
  .scanner-body {
    padding: 1rem;
  }
}

.input-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--slate-200);
  padding-bottom: 0.75rem;
  overflow-x: auto;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-500);
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease-out-expo);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--navy-900);
  background: var(--slate-100);
}

.tab-btn.active {
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
}

/* Drag & Drop PDF Zone */
.pdf-dropzone {
  border: 2px dashed var(--slate-300);
  background: var(--slate-50);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2rem;
  text-align: center;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.2s ease;
  cursor: pointer;
  position: relative;
}

@media (max-width: 640px) {
  .pdf-dropzone {
    padding: 2rem 1rem;
  }
}

.pdf-dropzone:hover, .pdf-dropzone.dragover {
  border-color: var(--blue-500);
  background: var(--blue-50);
  transform: scale(1.005);
}

.dropzone-icon {
  width: 52px;
  height: 52px;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--blue-600);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease-out-expo);
}

.pdf-dropzone:hover .dropzone-icon {
  transform: translateY(-3px);
}

.dropzone-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.35rem;
}

.dropzone-subtitle {
  font-size: 0.85rem;
  color: var(--slate-500);
}

.dropzone-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.pdf-status-banner {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--blue-700);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: fadeIn 0.3s ease;
}

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

/* Subtle Focus Glow on Textarea */
.contract-textarea-wrapper {
  position: relative;
}

.contract-textarea {
  width: 100%;
  min-height: 240px;
  padding: 1.25rem;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-lg);
  line-height: 1.6;
  color: var(--navy-900);
  background: white;
  resize: vertical;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.contract-textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14), 0 8px 24px -4px rgba(37, 99, 235, 0.08);
}

.textarea-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--slate-500);
}

.char-counter {
  font-weight: 500;
}

.clear-btn {
  font-size: 0.8rem;
  color: var(--slate-500);
  text-decoration: underline;
  transition: color 0.15s ease;
}

.clear-btn:hover {
  color: var(--red-600);
}

/* Scanner Action Bar */
.scanner-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--slate-200);
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 640px) {
  .scanner-action-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .scan-cta-btn {
    width: 100%;
  }
}

.scan-cta-btn {
  flex: 1;
  min-width: 240px;
}

.privacy-inline-note {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--slate-500);
}

/* ==========================================================================
   Animated Scanning Progress State with Laser Sweep Effect
   ========================================================================== */
.scanning-state-card {
  display: none;
  padding: 3.5rem 2rem;
  text-align: center;
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-card);
  margin: 2rem auto;
  animation: fadeInSlideUp 0.45s var(--ease-out-expo) forwards;
}

@media (max-width: 640px) {
  .scanning-state-card {
    padding: 2.25rem 1rem;
  }
}

.scanning-spinner {
  width: 64px;
  height: 64px;
  border: 4px solid var(--blue-100);
  border-top-color: var(--blue-600);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
  margin: 0 auto 1.5rem;
}

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

.scanning-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 0.5rem;
}

.scanning-current-step {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blue-600);
  margin-bottom: 1.5rem;
  min-height: 1.5rem;
  transition: all 0.25s ease;
}

/* Animated Laser Sweep Bar */
.scan-progress-bar-container {
  width: 100%;
  max-width: 480px;
  height: 10px;
  background: var(--slate-100);
  border-radius: var(--radius-full);
  margin: 0 auto 2rem;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.scan-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue-600), #4F46E5);
  border-radius: var(--radius-full);
  transition: width 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

/* Glowing Laser Sweep Beam */
.scan-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.85) 50%, transparent 100%);
  animation: laserSweep 1.35s infinite linear;
}

@keyframes laserSweep {
  0% { left: -80px; }
  100% { left: 100%; }
}

.scan-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 420px;
  margin: 0 auto;
  text-align: left;
}

.scan-step-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--slate-500);
  font-weight: 500;
  transition: color 0.25s ease, transform 0.25s var(--ease-out-expo);
}

.scan-step-item.active {
  color: var(--navy-900);
  font-weight: 700;
  transform: translateX(4px);
}

.scan-step-item.completed {
  color: var(--green-600);
}

.step-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Results View Choreography (Mobile Optimized)
   ========================================================================== */
.results-view {
  display: none;
  margin: 2rem auto 5rem;
  animation: fadeInSlideUp 0.65s var(--ease-out-expo) forwards;
}

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

/* Risk Overview Card */
.risk-overview-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-card);
  padding: 2.25rem;
  margin-bottom: 2rem;
  transition: box-shadow 0.3s ease;
}

@media (max-width: 640px) {
  .risk-overview-card {
    padding: 1.5rem 1rem;
  }
}

.risk-overview-card:hover {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.risk-header-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 768px) {
  .risk-header-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }
}

/* Radial Gauge with Hardware-Accelerated Animation */
.gauge-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.gauge-svg {
  width: 170px;
  height: 170px;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: var(--slate-100);
  stroke-width: 12;
}

.gauge-fill {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.3s var(--ease-out-expo), stroke 0.6s ease;
  will-change: stroke-dashoffset;
}

.gauge-center-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.gauge-score-number {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  color: var(--navy-900);
}

.gauge-score-max {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--slate-400);
}

.gauge-label {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Risk Details Right Column */
.risk-details-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.risk-level-badge-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .risk-level-badge-wrapper {
    justify-content: center;
  }
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
}

.risk-badge.high {
  background: var(--red-100);
  color: var(--red-600);
  border: 1px solid var(--red-500);
}

.risk-badge.moderate {
  background: var(--amber-100);
  color: var(--amber-600);
  border: 1px solid var(--amber-500);
}

.risk-badge.low {
  background: var(--green-100);
  color: var(--green-600);
  border: 1px solid var(--green-500);
}

.risk-metrics-strip {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--slate-500);
  font-weight: 600;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .risk-metrics-strip {
    justify-content: center;
    gap: 1rem;
  }
}

.verdict-box {
  background: var(--slate-50);
  border-left: 4px solid var(--blue-600);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--navy-800);
  font-weight: 500;
}

/* ==========================================================================
   Red Flags Section
   ========================================================================== */
.section-header-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.red-flags-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Individual Flag Card with Staggered Entrance */
.flag-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s var(--ease-out-expo), border-color 0.2s ease;
  position: relative;
  animation: cardEntrance 0.5s var(--ease-out-expo) forwards;
  will-change: transform, opacity;
}

@media (max-width: 640px) {
  .flag-card {
    padding: 1.15rem;
  }
}

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

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

.flag-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.flag-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.flag-num-pill {
  width: 26px;
  height: 26px;
  background: var(--navy-900);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
}

.flag-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy-900);
}

.severity-pill {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
}

.severity-critical {
  background: var(--red-100);
  color: var(--red-600);
}

.severity-high {
  background: var(--amber-100);
  color: var(--amber-600);
}

.severity-medium {
  background: var(--blue-100);
  color: var(--blue-700);
}

/* Quoted Clause Box */
.clause-quote-box {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 0.9rem 1.15rem;
  font-size: 0.88rem;
  font-style: italic;
  line-height: 1.6;
  color: #78350F;
  margin-bottom: 1rem;
  position: relative;
  word-break: break-word;
}

.quote-label {
  font-style: normal;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 0.35rem;
  color: #92400E;
}

/* Plain English Explanation Box */
.plain-english-box {
  background: var(--red-50);
  border: 1px solid var(--red-100);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}

.plain-english-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--red-600);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.plain-english-text {
  font-size: 0.92rem;
  color: var(--navy-800);
  line-height: 1.6;
}

/* Suggested Fix Box */
.suggested-fix-box {
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
}

.suggested-fix-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.suggested-fix-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--green-600);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.suggested-fix-text {
  font-size: 0.9rem;
  color: #064E3B;
  font-family: var(--font-mono);
  background: white;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 185, 129, 0.2);
  line-height: 1.5;
  margin-top: 0.5rem;
  word-break: break-word;
}

/* Free Unlocked Badge */
.free-badge-tag {
  background: var(--green-100);
  color: var(--green-600);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ==========================================================================
   Locked / Blurred Cards & Frosted Glass Paywall
   ========================================================================== */
.locked-flag-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  background: white;
  transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s ease;
}

.locked-flag-wrapper:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.locked-blurred-content {
  filter: blur(8px);
  -webkit-filter: blur(8px);
  pointer-events: none;
  user-select: none;
  opacity: 0.7;
  transition: filter 0.6s var(--ease-out-expo), opacity 0.6s ease;
}

.lock-overlay-center {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(248, 250, 252, 0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 10;
  padding: 1.5rem;
  text-align: center;
  transition: opacity 0.4s ease;
}

@media (max-width: 640px) {
  .lock-overlay-center {
    padding: 1rem;
  }
}

.lock-shield-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--navy-900);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
  margin-bottom: 0.75rem;
  transition: transform 0.25s var(--ease-out-expo);
}

.locked-flag-wrapper:hover .lock-shield-circle {
  transform: scale(1.08);
}

.lock-overlay-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 0.35rem;
}

.lock-overlay-sub {
  font-size: 0.85rem;
  color: var(--slate-600);
  max-width: 320px;
  margin-bottom: 1rem;
}

/* ==========================================================================
   High-Converting Upgrade Pricing Gate (Mobile Responsive)
   ========================================================================== */
.paywall-gate-section {
  background: linear-gradient(180deg, #FFFFFF 0%, var(--slate-50) 100%);
  border: 2px solid var(--blue-100);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 2.75rem 2rem;
  margin: 2.5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

@media (max-width: 640px) {
  .paywall-gate-section {
    padding: 2rem 1rem;
    margin: 1.5rem 0;
  }
}

.paywall-gate-section:hover {
  box-shadow: 0 24px 38px -6px rgba(37, 99, 235, 0.12);
}

.paywall-gate-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-600), #8B5CF6, var(--blue-600));
}

.paywall-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.paywall-headline {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy-900);
  margin-bottom: 0.75rem;
}

.paywall-subheadline {
  font-size: 1rem;
  color: var(--slate-600);
  max-width: 600px;
  margin: 0 auto 2.25rem;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
  max-width: 820px;
  margin: 0 auto 2rem;
  text-align: left;
}

@media (max-width: 640px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.pricing-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s var(--ease-out-expo), border-color 0.2s ease;
}

@media (max-width: 640px) {
  .pricing-card {
    padding: 1.35rem;
  }
}

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

.pricing-card.featured {
  border: 2px solid var(--blue-600);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.card-popular-pill {
  position: absolute;
  top: -12px;
  right: 20px;
  background: linear-gradient(135deg, var(--blue-600) 0%, #4338CA 100%);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

.plan-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 0.25rem;
}

.plan-desc {
  font-size: 0.85rem;
  color: var(--slate-500);
  margin-bottom: 1.25rem;
}

.plan-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

.plan-currency {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy-900);
}

.plan-amount {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--navy-900);
  line-height: 1;
}

.plan-period {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-500);
}

.plan-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.plan-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--navy-800);
  font-weight: 500;
}

.plan-feature-item svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--blue-600);
}

/* Test Mode Instant Unlock Toggle */
.test-mode-strip {
  background: var(--slate-100);
  border: 1px dashed var(--slate-300);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--navy-800);
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.test-unlock-btn {
  background: var(--navy-900);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: transform 0.2s ease, background 0.2s ease;
}

.test-unlock-btn:hover {
  background: var(--blue-700);
  transform: translateY(-1px);
}

/* Paywall Guarantees */
.paywall-guarantee-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--slate-500);
  font-weight: 600;
  margin-top: 1.5rem;
}

@media (max-width: 640px) {
  .paywall-guarantee-bar {
    gap: 0.75rem 1rem;
    font-size: 0.78rem;
  }
}

/* ==========================================================================
   Negotiation Email Generator Box
   ========================================================================== */
.negotiation-email-section {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-card);
  padding: 2.25rem;
  margin-bottom: 2rem;
  transition: filter 0.5s var(--ease-out-expo), opacity 0.5s ease;
}

@media (max-width: 640px) {
  .negotiation-email-section {
    padding: 1.25rem 1rem;
  }
}

.email-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.email-box-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Tone Toggle Buttons */
.tone-toggle-wrap {
  display: inline-flex;
  background: var(--slate-100);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  gap: 0.25rem;
  flex-wrap: wrap;
}

.tone-toggle-btn {
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-600);
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease-out-expo);
}

.tone-toggle-btn.active {
  background: white;
  color: var(--navy-900);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.email-field-group {
  margin-bottom: 1.25rem;
}

.email-field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-600);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.email-subject-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-weight: 600;
  background: var(--slate-50);
}

.email-body-textarea {
  width: 100%;
  min-height: 250px;
  padding: 1.25rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.6;
  background: var(--slate-50);
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.email-body-textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.email-actions-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .email-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .email-actions-bar .btn {
    width: 100%;
  }
}

/* ==========================================================================
   Report Export Actions
   ========================================================================== */
.report-export-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 1rem;
  transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s ease;
}

@media (max-width: 640px) {
  .report-export-strip {
    padding: 1.25rem 1rem;
    flex-direction: column;
    align-items: stretch;
  }
  .report-export-strip .btn {
    width: 100%;
  }
}

.report-export-strip:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.report-export-info h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy-900);
}

.report-export-info p {
  font-size: 0.85rem;
  color: var(--slate-500);
}

/* ==========================================================================
   Mandatory Legal Disclaimer Card
   ========================================================================== */
.legal-disclaimer-box {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 0.82rem;
  color: var(--slate-600);
  line-height: 1.6;
  margin: 2rem 0;
}

.legal-disclaimer-box svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--slate-400);
}

/* ==========================================================================
   Value Proposition / Feature Grid
   ========================================================================== */
.value-section {
  padding: 5rem 0;
  border-top: 1px solid var(--slate-200);
}

@media (max-width: 640px) {
  .value-section {
    padding: 3rem 0;
  }
}

.section-lead-center {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

@media (max-width: 640px) {
  .section-lead-center {
    margin-bottom: 2rem;
  }
}

.section-eyebrow {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue-600);
  margin-bottom: 0.5rem;
}

.section-main-heading {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy-900);
  margin-bottom: 0.75rem;
}

.feature-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.75rem;
}

@media (max-width: 640px) {
  .feature-cards-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.feature-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s var(--ease-out-expo), border-color 0.2s ease;
  will-change: transform, box-shadow;
}

@media (max-width: 640px) {
  .feature-card {
    padding: 1.35rem;
  }
}

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

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  background: var(--blue-50);
  color: var(--blue-600);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: transform 0.25s var(--ease-out-expo);
}

.feature-card:hover .feature-icon-wrapper {
  transform: scale(1.1) rotate(-6deg);
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 0.5rem;
}

.feature-text {
  font-size: 0.9rem;
  color: var(--slate-600);
  line-height: 1.6;
}

/* ==========================================================================
   Comparison Table Section (Touch & Mobile Optimized)
   ========================================================================== */
.comparison-section {
  padding: 4rem 0;
  background: white;
  border-top: 1px solid var(--slate-200);
  border-bottom: 1px solid var(--slate-200);
}

.table-responsive-wrapper {
  overflow-x: auto;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.25s ease;
  -webkit-overflow-scrolling: touch;
}

.table-responsive-wrapper:hover {
  box-shadow: var(--shadow-md);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
  min-width: 580px;
}

.comparison-table th, .comparison-table td {
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--slate-200);
  transition: background-color 0.15s ease;
}

.comparison-table tbody tr:hover td {
  background-color: rgba(37, 99, 235, 0.03);
}

.comparison-table th {
  background: var(--slate-50);
  font-weight: 800;
  color: var(--navy-900);
}

.comparison-table th.col-highlight {
  background: var(--blue-50);
  color: var(--blue-700);
  border-left: 2px solid var(--blue-600);
  border-right: 2px solid var(--blue-600);
}

.comparison-table td.col-highlight {
  background: rgba(239, 246, 255, 0.4);
  border-left: 2px solid var(--blue-600);
  border-right: 2px solid var(--blue-600);
  font-weight: 600;
}

/* ==========================================================================
   Smooth Animated FAQ Section
   ========================================================================== */
.faq-section {
  padding: 5rem 0;
}

@media (max-width: 640px) {
  .faq-section {
    padding: 3rem 0;
  }
}

.faq-accordion {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.faq-item:hover {
  border-color: var(--slate-300);
}

.faq-item.open {
  border-color: var(--blue-300);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-900);
  text-align: left;
  transition: background 0.15s ease;
  gap: 1rem;
}

@media (max-width: 640px) {
  .faq-question {
    padding: 1rem 1.15rem;
    font-size: 0.98rem;
  }
}

.faq-question:hover {
  background: var(--slate-50);
}

.faq-chevron {
  transition: transform 0.3s var(--ease-out-expo), color 0.2s ease;
  color: var(--slate-400);
  flex-shrink: 0;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--blue-600);
}

/* Smooth CSS Grid Height Transition */
.faq-answer-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s var(--ease-out-expo), opacity 0.25s ease;
  opacity: 0;
}

.faq-item.open .faq-answer-wrapper {
  grid-template-rows: 1fr;
  opacity: 1;
}

.faq-answer-inner {
  overflow: hidden;
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.92rem;
  color: var(--slate-600);
  line-height: 1.65;
}

@media (max-width: 640px) {
  .faq-answer {
    padding: 0 1.15rem 1rem;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--navy-900);
  color: var(--slate-400);
  padding: 4.5rem 0 2rem;
  margin-top: auto;
}

@media (max-width: 640px) {
  .site-footer {
    padding: 3rem 0 1.5rem;
  }
}

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

@media (max-width: 840px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.6;
  margin-top: 1rem;
  max-width: 320px;
}

.footer-col h5 {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
  margin-bottom: 1.25rem;
}

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

.footer-links-list a {
  color: var(--slate-400);
  font-size: 0.88rem;
  transition: color 0.15s ease, transform 0.15s ease;
  display: inline-block;
}

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

.footer-bottom-bar {
  padding-top: 2rem;
  border-top: 1px solid var(--navy-800);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-disclaimer-text {
  font-size: 0.78rem;
  color: var(--slate-500);
  max-width: 650px;
  line-height: 1.5;
}

/* ==========================================================================
   Accessibility: prefers-reduced-motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }

  .scan-progress-fill::after {
    display: none !important;
  }

  .faq-answer-wrapper {
    grid-template-rows: 1fr !important;
    opacity: 1 !important;
  }
}

/* ==========================================================================
   Print Stylesheet (for PDF Export)
   ========================================================================== */
@media print {
  body {
    background: white !important;
    color: black !important;
    font-size: 12pt;
  }

  .site-header, .site-footer, .scanner-container, 
  .paywall-gate-section, .value-section, .faq-section,
  .comparison-section, .tone-toggle-wrap, .email-actions-bar,
  .report-export-strip button, .btn, .test-mode-strip {
    display: none !important;
  }

  .results-view {
    display: block !important;
    margin: 0 !important;
  }

  .locked-flag-wrapper {
    display: none !important;
  }

  .risk-overview-card, .flag-card, .negotiation-email-section {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    margin-bottom: 20pt !important;
  }
}
