/* ==========================================================================
   GARDI (ГАРДИ) — QUIET LUXURY LEGALTECH DESIGN SYSTEM
   Standard: 2026 Modern SaaS (Linear, Raycast, Stripe, Vercel)
   ========================================================================== */

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

/* --- CSS Variables & Design Tokens --- */
:root {
  /* Brand Accents */
  --emerald: #10b981;
  --emerald-hover: #059669;
  --emerald-light: #ecfdf5;
  --emerald-glow: rgba(16, 185, 129, 0.25);

  --amber: #f59e0b;
  --amber-hover: #d97706;
  --amber-light: #fffbeb;
  --amber-glow: rgba(245, 158, 11, 0.22);

  --coral: #f43f5e;
  --coral-hover: #e11d48;
  --coral-light: #fff1f2;
  --coral-glow: rgba(244, 63, 94, 0.22);

  --indigo: #6366f1;
  --indigo-light: #eef2ff;
  --indigo-glow: rgba(99, 102, 241, 0.22);

  /* Typography */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.15s ease;
  --transition-smooth: all 0.28s var(--ease-spring);
}

/* Light Theme Tokens (Cozy Clean Alabaster) */
[data-theme="light"], :root {
  --bg-main: #f8fafc;
  --bg-ambient-1: radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.06) 0%, transparent 45%);
  --bg-ambient-2: radial-gradient(circle at 85% 25%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);

  --surface-card: #ffffff;
  --surface-card-hover: #fcfdfd;
  --surface-glass: rgba(255, 255, 255, 0.85);
  --surface-input: #ffffff;
  --surface-subtle: #f1f5f9;
  --surface-code: #0f172a;

  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: var(--emerald);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  --shadow-subtle: 0 2px 8px -2px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 12px 32px -8px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  --shadow-elevated: 0 24px 50px -12px rgba(15, 23, 42, 0.12);
  --shadow-glow-emerald: 0 0 24px rgba(16, 185, 129, 0.25);
}

/* Dark Theme Tokens (Deep Obsidian Quiet Luxury) */
[data-theme="dark"] {
  --bg-main: #090d14;
  --bg-ambient-1: radial-gradient(circle at 20% 15%, rgba(16, 185, 129, 0.09) 0%, transparent 40%);
  --bg-ambient-2: radial-gradient(circle at 80% 25%, rgba(99, 102, 241, 0.07) 0%, transparent 45%);

  --surface-card: rgba(17, 24, 39, 0.72);
  --surface-card-hover: rgba(22, 31, 50, 0.82);
  --surface-glass: rgba(13, 18, 30, 0.82);
  --surface-input: rgba(15, 23, 42, 0.65);
  --surface-subtle: rgba(30, 41, 59, 0.55);
  --surface-code: #030712;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-focus: var(--emerald);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #090d14;

  --shadow-subtle: 0 2px 8px -2px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 16px 40px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-elevated: 0 28px 60px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.1);
  --shadow-glow-emerald: 0 0 32px rgba(16, 185, 129, 0.2);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-primary);
  background-color: var(--bg-main);
  background-image: var(--bg-ambient-1), var(--bg-ambient-2);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Grid & Layout System */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   FLOATING NAVBAR
   ========================================================================== */
.navbar-wrapper {
  position: sticky;
  top: 14px;
  z-index: 999;
  width: 100%;
  padding: 0 20px;
  margin-bottom: 32px;
}

.floating-nav {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  background: var(--surface-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}

.floating-nav:hover {
  border-color: var(--border-medium);
}

/* Brand Identity */
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-avatar-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-subtle);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.25);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.brand-link:hover .brand-avatar-box {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.brand-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--emerald);
}

/* Nav Tabs / Segmented Controls */
.nav-tabs {
  display: flex;
  align-items: center;
  background: var(--surface-subtle);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
  white-space: nowrap;
}

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

.tab-btn.active {
  background: var(--surface-card);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.status-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulse-dot 2s infinite ease-in-out;
}

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

.theme-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--surface-card);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

/* ==========================================================================
   HERO SECTION (COMMAND BAR & COMPANION)
   ========================================================================== */
.hero-section {
  padding: 24px 0 40px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
  align-items: center;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 44px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--emerald);
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.gradient-accent {
  background: linear-gradient(135deg, var(--emerald) 0%, #34d399 50%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 580px;
  margin-bottom: 28px;
}

/* Command-Bar Scanner Box */
.command-scanner {
  display: flex;
  align-items: center;
  background: var(--surface-input);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 6px 8px 6px 20px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
  transition: var(--transition-smooth);
  margin-bottom: 16px;
}

.command-scanner:focus-within {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px var(--emerald-glow), 0 8px 30px rgba(0, 0, 0, 0.08);
}

.command-scanner-icon {
  font-size: 18px;
  margin-right: 12px;
  opacity: 0.7;
}

.command-scanner-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  padding: 8px 0;
}

.command-scanner-input::placeholder {
  color: var(--text-muted);
  font-family: var(--font-body);
}

.command-scanner-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--emerald);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 24px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--emerald-glow);
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.command-scanner-btn:hover {
  background: var(--emerald-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Quick Chips */
.quick-chips-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.chips-intro {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}

.chip-btn {
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition-fast);
}

.chip-btn:hover {
  background: var(--surface-card);
  color: var(--text-primary);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.chip-btn.highlight {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
  color: var(--emerald);
}

/* Trust Disclaimer */
.trust-badge-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   GARDI COMPANION CARD (HERO RIGHT)
   ========================================================================== */
.hero-companion {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.mascot-stage {
  position: relative;
  width: 260px;
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cyber-bot-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bot-avatar-frame {
  position: relative;
  width: 165px;
  height: 165px;
  border-radius: 36px;
  padding: 5px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(236, 253, 245, 0.6));
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 16px 36px -8px rgba(16, 185, 129, 0.25), 
              0 0 20px rgba(16, 185, 129, 0.15),
              inset 0 1px 2px rgba(255, 255, 255, 0.9);
  animation: float-bot 3.8s infinite ease-in-out;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
  overflow: hidden;
}

[data-theme="dark"] .bot-avatar-frame {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.6), 
              0 0 28px rgba(16, 185, 129, 0.2),
              inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.bot-avatar-frame:hover {
  transform: scale(1.05) translateY(-4px);
  box-shadow: 0 24px 48px -10px rgba(16, 185, 129, 0.35), 0 0 32px rgba(16, 185, 129, 0.3);
}

.bot-3d-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 32px;
  display: block;
}

.bot-halo-ring {
  position: absolute;
  bottom: 8px;
  width: 100px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.5) 0%, rgba(16, 185, 129, 0.15) 50%, transparent 75%);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.5);
  animation: halo-pulse 3.8s infinite ease-in-out;
  pointer-events: none;
}

@keyframes halo-pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(0.85); opacity: 0.95; }
}

@keyframes float-bot {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.bot-status-badge {
  position: absolute;
  bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
  z-index: 5;
  transition: var(--transition-fast);
}

.bot-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.cyber-bot-wrap.state-scanning .bot-status-dot {
  background: #00e5ff;
  box-shadow: 0 0 10px #00e5ff;
}

.cyber-bot-wrap.state-warning .bot-status-dot {
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}

.cyber-bot-wrap.state-happy .bot-status-dot {
  background: var(--emerald);
  box-shadow: 0 0 12px var(--emerald);
}

/* Deflected floating badges */
.deflected-item {
  position: absolute;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  padding: 3px 7px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--coral);
  pointer-events: none;
  animation: bounce-off 3.5s infinite ease-in-out;
}

.deflected-item.item-1 { top: 15px; left: 10px; animation-delay: 0s; }
.deflected-item.item-2 { top: 40px; right: 10px; animation-delay: 1.5s; }
.deflected-item.item-3 { bottom: 35px; left: 10px; animation-delay: 0.8s; }

@keyframes bounce-off {
  0% { transform: translateY(-16px) scale(0.9); opacity: 0; }
  30% { transform: translateY(0px) scale(1); opacity: 1; }
  70% { transform: translateY(-6px) scale(0.95); opacity: 0.8; }
  100% { transform: translateY(-24px) scale(0.85); opacity: 0; }
}

/* Mascot Speech Bubble */
.mascot-speech {
  position: relative;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-primary);
  max-width: 290px;
  margin-top: 8px;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition-fast);
}

.mascot-speech::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--surface-subtle);
}

/* ==========================================================================
   DIAGNOSTIC TERMINAL (SCANNING HUD)
   ========================================================================== */
.scanning-state {
  display: none;
  margin: 32px 0;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.scanning-radar {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-circle {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--emerald);
  opacity: 0;
  animation: radar-wave 2.2s infinite ease-out;
}

.radar-circle:nth-child(1) { width: 40px; height: 40px; animation-delay: 0s; }
.radar-circle:nth-child(2) { width: 65px; height: 65px; animation-delay: 0.6s; }
.radar-circle:nth-child(3) { width: 90px; height: 90px; animation-delay: 1.2s; }

.radar-icon {
  font-size: 32px;
  z-index: 2;
  filter: drop-shadow(0 0 12px var(--emerald));
}

@keyframes radar-wave {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.scan-progress-steps {
  max-width: 520px;
  margin: 24px auto 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-step-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.progress-step-item.active {
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.08);
  color: var(--text-primary);
}

.progress-step-item.done {
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--emerald);
}

/* ==========================================================================
   COMPLIANCE DOSSIER (RESULTS SECTION)
   ========================================================================== */
.results-container {
  display: none;
  margin: 32px 0 60px 0;
}

.results-header-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

/* Circular Gauge */
.score-gauge-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-svg {
  width: 120px;
  height: 120px;
  transform: rotate(-9deg);
}

.score-bg-circle {
  fill: none;
  stroke: var(--surface-subtle);
  stroke-width: 10;
}

.score-progress-circle {
  fill: none;
  stroke: var(--emerald);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  transition: stroke-dashoffset 1.4s var(--ease-spring), stroke 0.4s ease;
}

.score-number-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.score-val {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.score-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

/* Overview Info */
.results-overview-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dossier-domain {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.platform-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.status-desc-text {
  font-size: 14.5px;
  color: var(--text-secondary);
}

.potential-fines-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 13.5px;
}

.fines-label {
  color: var(--text-muted);
}

.fines-amount {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--coral);
  background: rgba(244, 63, 94, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(244, 63, 94, 0.25);
}

/* Metrics Grid Pills */
.metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.metric-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.metric-pill.critical { background: rgba(244, 63, 94, 0.1); border-color: rgba(244, 63, 94, 0.3); color: var(--coral); }
.metric-pill.high { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.3); color: var(--amber); }
.metric-pill.medium { background: var(--surface-subtle); color: var(--text-secondary); }
.metric-pill.safe { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.3); color: var(--emerald); }

/* Gardi Verdict Speech Banner */
.verdict-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--emerald);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-subtle);
}

.verdict-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(16, 185, 129, 0.4);
}

.verdict-text-content {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-primary);
}

/* Category Filter Tabs */
.dossier-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--emerald);
  color: #ffffff;
  border-color: var(--emerald);
}

/* Risk Cards */
.risks-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 36px;
}

.risk-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.risk-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
}

.risk-card.severity-critical::before { background: var(--coral); }
.risk-card.severity-high::before { background: var(--amber); }
.risk-card.severity-medium::before { background: #3b82f6; }
.risk-card.severity-safe::before { background: var(--emerald); }

.risk-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.risk-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.risk-category-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.risk-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.risk-meta-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.severity-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
}

.severity-pill.critical { background: rgba(244, 63, 94, 0.15); color: var(--coral); }
.severity-pill.high { background: rgba(245, 158, 11, 0.15); color: var(--amber); }
.severity-pill.medium { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }

.law-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
}

/* Risk Details Grid */
.risk-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
  padding: 16px;
  background: var(--surface-subtle);
  border-radius: var(--radius-md);
  font-size: 13.5px;
}

.risk-detail-block h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 700;
}

.risk-detail-block p {
  color: var(--text-primary);
  line-height: 1.5;
}

/* Code Snippet Box */
.solution-code-box {
  margin-top: 14px;
  background: var(--surface-code);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  position: relative;
  overflow-x: auto;
}

.code-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
}

.btn-copy-code {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-copy-code:hover {
  background: rgba(255, 255, 255, 0.2);
}

.solution-code-box pre {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #e2e8f0;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Safe items section */
.safe-items-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
  margin-bottom: 32px;
}

.safe-items-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--emerald);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.safe-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.safe-item-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  color: var(--text-primary);
}

.safe-check-badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

/* ==========================================================================
   TAB VIEWS CONTAINER
   ========================================================================== */
.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
}

/* ==========================================================================
   TAB 2: SOLUTIONS & DOCUMENT GENERATOR
   ========================================================================== */
.section-header-centered {
  text-align: center;
  max-width: 680px;
  margin: 20px auto 36px auto;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--emerald);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Document Generator Workspace */
.doc-gen-workspace {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-card);
  margin-bottom: 40px;
}

.doc-form-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input, .form-select {
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus {
  border-color: var(--emerald);
  background: var(--surface-card);
}

.doc-preview-col {
  display: flex;
  flex-direction: column;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.doc-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.doc-preview-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.doc-preview-actions {
  display: flex;
  gap: 8px;
}

.btn-secondary {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.doc-preview-content {
  flex: 1;
  min-height: 380px;
  max-height: 480px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text-secondary);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
}

/* ==========================================================================
   TAB 3: AI ANONYMIZER (PRIVACY SANDBOX)
   ========================================================================== */
.anonymizer-box {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-card);
  margin-bottom: 40px;
}

.anonymizer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}

.anon-textarea {
  width: 100%;
  height: 220px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: var(--transition-fast);
}

.anon-textarea:focus {
  border-color: var(--indigo);
  background: var(--surface-card);
}

.anon-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-indigo {
  background: var(--indigo);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--indigo-glow);
  transition: var(--transition-smooth);
}

.btn-indigo:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* ==========================================================================
   TAB 4: FAQ & KNOWLEDGE BASE
   ========================================================================== */
.faq-accordion-list {
  max-width: 800px;
  margin: 0 auto 60px auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  background: transparent;
  border: none;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.faq-answer {
  display: none;
  padding: 0 20px 20px 20px;
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ==========================================================================
   TAB 5: TURNKEY COMPLIANCE
   ========================================================================== */
.turnkey-card {
  max-width: 760px;
  margin: 0 auto 60px auto;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   HUD TOAST & MODALS
   ========================================================================== */
.hud-toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  opacity: 0;
  pointer-events: none;
  z-index: 10000;
  transition: all 0.35s var(--ease-spring);
}

.hud-toast-container.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.hud-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  border-radius: var(--radius-pill);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
  font-size: 13.5px;
  font-weight: 600;
}

/* Modal Window */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
}

.modal-box {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  padding: 32px;
  box-shadow: var(--shadow-elevated);
  position: relative;
  animation: modal-enter 0.3s var(--ease-spring);
}

@keyframes modal-enter {
  0% { transform: scale(0.94); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0;
  margin-top: 60px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding: 32px 24px;
    gap: 28px;
  }
  .hero-companion {
    order: -1;
  }
  .results-header-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
  }
  .score-gauge-wrap {
    margin: 0 auto;
  }
  .metrics-row {
    justify-content: center;
  }
  .doc-gen-workspace {
    grid-template-columns: 1fr;
  }
  .anonymizer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .floating-nav {
    padding: 8px 12px;
  }
  .nav-tabs {
    display: none; /* In mobile, tabs can be accessible or simplified */
  }
  .hero-title {
    font-size: 28px;
  }
  .command-scanner {
    flex-direction: column;
    padding: 12px;
    border-radius: var(--radius-lg);
  }
  .command-scanner-input {
    width: 100%;
    margin-bottom: 10px;
  }
  .command-scanner-btn {
    width: 100%;
    justify-content: center;
  }
}
