/* ==========================================================================
   VCF GRAMMAR PRO — PURE WHITE FINTECH 100% RESPONSIVE CSS SYSTEM
   ========================================================================== */

:root {
  --bg-main: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-card: #ffffff;
  --bg-inset: #f1f5f9;
  --border-light: #e2e8f0;
  --border-focus: #a855f7;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --accent-primary: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  --accent-blue: #2563eb;
  --accent-emerald: #10b981;

  --err-spelling: #ef4444;
  --err-grammar: #8b5cf6;
  --err-typo: #0ea5e9;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 4px 20px -2px rgba(0, 0, 0, 0.05);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Global Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
}

/* Background Subtle Grid Texture */
.bg-grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.04) 0%, transparent 60%),
    linear-gradient(to right, rgba(226, 232, 240, 0.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(226, 232, 240, 0.35) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.app-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 14px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }
}

/* ==========================================================================
   1. MAIN HEADER (100% RESPONSIVE)
   ========================================================================== */
.main-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 6px 0;
  gap: 8px;
  width: 100%;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  min-width: 0;
  flex-shrink: 1;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-img-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(124, 58, 237, 0.25));
}

.brand-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.28);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.brand-title-row h1 {
  font-size: clamp(0.92rem, 3.2vw, 1.15rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  white-space: nowrap;
  line-height: 1.2;
}

.brand-badge {
  font-size: 0.58rem;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .brand-subtitle { display: none; }
  .brand-img-logo { width: 32px; height: 32px; }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-header-pref {
  padding: 5px 10px;
  background: var(--bg-inset);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  min-height: 32px;
}
.btn-header-pref:hover { border-color: var(--accent-primary); color: var(--accent-primary); background: #fff; }

.engine-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.btn-autofix-top {
  padding: 6px 11px;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.25);
  white-space: nowrap;
  transition: transform 0.15s ease;
  min-height: 32px;
}
.btn-autofix-top:active { transform: scale(0.97); }

@media (max-width: 540px) {
  .btn-autofix-top .autofix-label { display: none; }
  .btn-header-pref .pref-label { display: none; }
  .btn-autofix-top, .btn-header-pref { padding: 6px 9px; }
  .engine-badge { padding: 3px 6px; font-size: 0.68rem; }
}

.btn-header-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: #fff;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-header-icon:hover { color: var(--accent-primary); border-color: var(--accent-primary); }

/* ==========================================================================
   2. FEATURE TABS BAR (HORIZONTAL SCROLL TOUCH)
   ========================================================================== */
.feature-tabs-bar {
  padding: 6px 0;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--border-light);
  width: 100%;
}

.feature-tabs-wrapper {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--bg-inset);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.feature-tabs-wrapper::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: 1;
  min-width: max-content;
  padding: 7px 12px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.tab-btn:hover { color: var(--text-main); }
.tab-btn.active {
  background: #fff;
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   3. MAIN WORKSPACE & STUDIO
   ========================================================================== */
.main-content {
  flex: 1;
  padding: 12px 0 40px;
  width: 100%;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.2s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Mobile Studio Navigation Toggle (Éditeur vs Fautes) */
.mobile-studio-nav {
  display: none;
  margin-bottom: 10px;
  background: var(--bg-inset);
  padding: 3px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  gap: 4px;
}

@media (max-width: 1024px) {
  .mobile-studio-nav { display: flex; }
}

.mobile-switch-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.84rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.mobile-switch-btn.active {
  background: #fff;
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

.mobile-count-pill {
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: #fee2e2;
  color: #dc2626;
  font-size: 0.7rem;
  font-weight: 900;
}

/* Studio Grid */
.grammar-studio-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
  align-items: start;
  width: 100%;
}

@media (max-width: 1024px) {
  .grammar-studio-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  
  .grammar-studio-grid.show-editor-only #studio_inspector_section { display: none !important; }
  .grammar-studio-grid.show-inspector-only #studio_editor_section { display: none !important; }
}

/* ── Editor Card ── */
.editor-card {
  background: #fff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.editor-card:focus-within { border-color: var(--border-focus); }

/* Editor Toolbar */
.editor-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  width: 100%;
}

.toolbar-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.lang-select-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: #fff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  flex: 1;
  min-width: 130px;
  max-width: 100%;
}
.lang-select-box:focus-within { border-color: var(--accent-primary); }

.lang-icon { color: var(--accent-primary); flex-shrink: 0; }

.lang-select-box select {
  border: none;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  width: 100%;
}

.lang-detected-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

/* Tone Row */
.toolbar-row-tone { width: 100%; }

.tone-pill-group {
  display: flex;
  background: var(--bg-inset);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  width: 100%;
  gap: 2px;
}

.tone-pill-btn {
  flex: 1;
  padding: 4px 6px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.tone-pill-btn:hover { color: var(--text-main); }
.tone-pill-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.25);
}

/* Status Row */
.toolbar-row-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 4px;
  border-top: 1px dashed var(--border-light);
  gap: 6px;
  flex-wrap: wrap;
}

.status-left { display: flex; align-items: center; gap: 6px; }

.errors-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: #fef2f2;
  color: #dc2626;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid #fecaca;
  white-space: nowrap;
}

.btn-jump-errors {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: #f3e8ff;
  color: #7c3aed;
  border: 1px solid #d8b4fe;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-right { display: flex; align-items: center; gap: 5px; }

.btn-toolbar-action {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: #fff;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.btn-toolbar-action:hover { color: var(--text-main); border-color: var(--accent-primary); }
.btn-danger-action:hover { color: #dc2626; border-color: #dc2626; }

/* Textarea */
.editor-textarea-wrapper {
  position: relative;
  flex: 1;
  padding: 12px 14px;
  width: 100%;
  background: #fff;
}

.editor-textarea {
  width: 100%;
  min-height: 140px;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-main);
  background: #ffffff;
  resize: vertical;
  display: block;
}
.editor-textarea::placeholder { color: var(--text-dim); }

/* Studio 3-line constrained textarea */
.grammar-editor-input {
  width: 100%;
  height: 140px !important;
  min-height: 140px !important;
  max-height: 140px !important;
  padding: 12px 16px;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-main);
  background: #ffffff;
  resize: none !important;
  overflow-y: hidden;
  display: block;
  box-sizing: border-box;
}
.grammar-editor-input::placeholder { color: var(--text-dim); }

/* ==========================================================================
   TARGET PHOTO REPLICA: INTERACTIVE STYLISTIC CARD
   (Replica of mistaks card in photo)
   ========================================================================== */
.studio-target-card {
  margin: 16px 14px 14px;
  padding: 16px 18px;
  background: #ffffff;
  border: 1.5px solid #e9d5ff;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.07);
  position: relative;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.target-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.target-card-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.target-card-logo {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--accent-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.target-card-title {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text-main);
}

.btn-listen-card {
  padding: 4px 9px;
  border-radius: var(--radius-full);
  background: #f3e8ff;
  color: #7c3aed;
  border: 1px solid #d8b4fe;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.target-sentence-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}

.target-sentence-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
}

.target-sentence-content {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-main);
  word-break: break-word;
}

/* Mauve rounded highlight box with green wavy underline (like photo mistaks) */
.target-error-badge {
  display: inline-block;
  background: #c4b5fd;
  color: #1e1b4b;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  border-bottom: 2.5px wavy #10b981;
  cursor: pointer;
  transition: transform 0.1s ease;
  position: relative;
}
.target-error-badge:hover {
  transform: scale(1.03);
}

.target-sentence-content-corrected {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-main);
  word-break: break-word;
}

.target-sentence-content-corrected strong {
  font-weight: 900;
  color: #0f172a;
}

/* Green glowing checkmark badge "Corrected" */
.target-corrected-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #059669;
  font-size: 0.74rem;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
  width: fit-content;
}

.badge-check-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}

.target-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-light);
  font-size: 0.74rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.target-score-pill strong { color: var(--accent-primary); }

/* Editor Footer */
.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.editor-footer-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.btn-primary {
  padding: 8px 14px;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.25);
  white-space: nowrap;
  transition: transform 0.15s ease;
  min-height: 36px;
}
.btn-primary:active { transform: scale(0.98); }

.btn-secondary-action {
  padding: 7px 11px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: #fff;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
}
.btn-secondary-action:hover { background: var(--bg-subtle); border-color: var(--accent-primary); }

.editor-footer-stats {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .editor-footer-left { width: 100%; }
  .btn-autofix-main { flex: 1; }
  .editor-footer-stats { width: 100%; text-align: center; padding-top: 4px; border-top: 1px dashed var(--border-light); }
}

/* ==========================================================================
   4. INSPECTOR & CORRECTIONS CARD
   ========================================================================== */
.inspector-card {
  background: #fff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

@media (min-width: 1025px) {
  .inspector-card {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
}

.inspector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
  width: 100%;
}

.inspector-header h3 {
  font-size: 0.92rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.inspector-local-badge {
  font-size: 0.66rem;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

/* Category Filter Strip */
.category-filter-strip {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
.category-filter-strip::-webkit-scrollbar { display: none; }

.cat-pill {
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 800;
  border: 1px solid var(--border-light);
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.cat-pill:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.cat-pill.active { background: #f3e8ff; border-color: #d8b4fe; color: #7c3aed; }

/* Error Item Cards */
.errors-cards-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.error-item-card {
  background: #fff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
  width: 100%;
}
.error-item-card:hover { border-color: var(--accent-primary); }

.error-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.badge-category {
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.badge-category.Orthographe, .badge-category.Spelling, .badge-category.Ortografía {
  background: #fef2f2; color: #dc2626; border: 1px solid #fecaca;
}
.badge-category.Grammaire, .badge-category.Grammar, .badge-category.Gramática {
  background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe;
}
.badge-category.Accords, .badge-category.Agreement, .badge-category.Concordancia {
  background: #fdf4ff; color: #c026d3; border: 1px solid #f5d0fe;
}
.badge-category.Typographie, .badge-category.Typography, .badge-category.Tipografía {
  background: #f0f9ff; color: #0284c7; border: 1px solid #bae6fd;
}
.badge-category.Style, .badge-category.Pléonasme, .badge-category.Pleonasme {
  background: #fffbeb; color: #d97706; border: 1px solid #fde68a;
}

.error-wrong-word {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.86rem;
  color: #dc2626;
  text-decoration: line-through;
  word-break: break-word;
}

.error-message {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.error-suggestions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  width: 100%;
}

.suggestion-chip-btn {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid #bbf7d0;
  background: #f0fdf4;
  color: #16a34a;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  min-height: 34px;
  touch-action: manipulation;
}
.suggestion-chip-btn:hover { background: #16a34a; color: #fff; border-color: #16a34a; }
.suggestion-chip-btn:active { transform: scale(0.97); }

/* ==========================================================================
   5. QUIZ GAME — FULL INTERACTIVE ARENA
   ========================================================================== */
.game-arena-card {
  background: #fff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: var(--shadow-card);
  width: 100%;
}

.quiz-arena-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.quiz-title {
  font-size: clamp(1rem, 3.2vw, 1.22rem);
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.quiz-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.quiz-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quiz-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 800;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.quiz-lang-selector-box {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: #fff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 700;
}

.quiz-lang-selector-box select {
  border: none;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.game-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  width: 100%;
}

@media (max-width: 768px) {
  .game-stats-bar { grid-template-columns: repeat(2, 1fr); gap: 6px; }
}

.game-stat-box {
  padding: 10px;
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  text-align: center;
}
.game-stat-num {
  font-size: clamp(1.2rem, 2.8vw, 1.45rem);
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--accent-primary);
}
.game-stat-lbl {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.quiz-lives-row {
  font-size: 1.1rem;
  display: flex;
  justify-content: center;
  gap: 2px;
}
.quiz-life-heart.lost { filter: grayscale(1); opacity: 0.3; }

.quiz-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 700;
}

.quiz-level-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: #f3e8ff;
  color: #7c3aed;
  border: 1px solid #d8b4fe;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
}

/* Sentence Box with Auto-Expanding Input */
.quiz-sentence-box {
  padding: 22px 20px;
  border-radius: var(--radius-lg);
  border: 2px dashed #a855f7;
  background: #faf5ff;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  font-weight: 600;
  line-height: 2.2;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 14px;
  word-break: normal;
  width: 100%;
}

/* Auto-expanding input inside the error word badge */
.quiz-target-badge {
  display: inline-flex;
  align-items: baseline;
  vertical-align: baseline;
  background: #f3e8ff;
  border: 2px solid #a855f7;
  border-radius: 6px;
  padding: 0 4px;
  margin: 0 2px;
  box-shadow: 0 2px 6px rgba(168, 85, 247, 0.15);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.quiz-target-badge:focus-within {
  border-color: #7e22ce;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25);
  background: #ffffff;
}

.quiz-word-auto-input {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  font-weight: 800;
  color: #6b21a8;
  outline: none;
  text-align: center;
  vertical-align: baseline;
  margin: 0;
  padding: 0 2px;
  display: inline-block;
  box-sizing: content-box;
}

.quiz-clues-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.quiz-clues-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
}
.quiz-clues-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; }

/* Feedback & Explanations */
.quiz-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.86rem;
  margin-bottom: 10px;
  animation: fadeIn 0.2s ease;
}
.quiz-feedback.success {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #15803d;
}
.quiz-feedback.error {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  color: #dc2626;
}

.quiz-explanation-card {
  display: none;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 0.82rem;
  line-height: 1.5;
  margin-bottom: 10px;
}
.quiz-explanation-card.visible { display: block; }

.quiz-corrected-row {
  display: none;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #15803d;
  font-size: 0.88rem;
  font-weight: 700;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.quiz-corrected-row.visible { display: flex; }

.quiz-submit-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-quiz-submit-main { min-width: 140px; }

.btn-quiz-next {
  padding: 8px 14px;
  background: #f3e8ff;
  color: #7c3aed;
  border: 1.5px solid #d8b4fe;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  transition: all 0.15s ease;
}
.btn-quiz-next:hover { background: #ede9fe; }

/* ==========================================================================
   6. SITE FOOTER & MODALS
   ========================================================================== */
.main-footer {
  margin-top: auto;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 36px 0 24px;
  width: 100%;
}

.footer-top-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

@media (max-width: 768px) {
  .footer-top-row { grid-template-columns: 1fr; gap: 20px; }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--text-main);
}

.footer-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.footer-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 8px 0 12px;
  max-width: 460px;
}

.footer-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}

.dot-online {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.footer-links-col h4 {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.footer-links-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links-col a, .footer-link-btn {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
  text-align: left;
}
.footer-links-col a:hover, .footer-link-btn:hover {
  color: var(--accent-primary);
}

.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
  font-size: 0.74rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 10px;
}

.footer-social-links {
  display: flex;
  gap: 12px;
}
.footer-social-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.footer-social-links a:hover { color: var(--accent-primary); }

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.modal-card {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  animation: popIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}

.modal-title-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.modal-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}
.modal-header p {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.btn-modal-close {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}
.btn-modal-close:hover { color: var(--text-main); }

.modal-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pref-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pref-form-group label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pref-select-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-light);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  outline: none;
  background: #fff;
}
.pref-select-input:focus { border-color: var(--accent-primary); }

.voice-personas-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.voice-persona-card {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-light);
  background: var(--bg-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.voice-persona-card:hover {
  border-color: var(--accent-primary);
  background: #fdf4ff;
}
.voice-persona-card.playing {
  border-color: #10b981;
  background: #f0fdf4;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.persona-avatar { font-size: 1.4rem; }
.persona-info { display: flex; flex-direction: column; }
.persona-name { font-weight: 800; font-size: 0.84rem; color: var(--text-main); }
.persona-sub  { font-size: 0.68rem; color: var(--text-muted); }

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
}

.btn-save-onboarding { width: 100%; justify-content: center; font-size: 0.9rem; padding: 10px; }


.quiz-db-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(22, 163, 74, 0.15);
}


/* Interactive Blank Slots for Stylistic Card */
.target-slot-blank {
  display: inline-block;
  padding: 1px 8px;
  margin: 0 2px;
  background: #f8fafc;
  border: 1.5px dashed #a855f7;
  border-radius: 4px;
  color: #9333ea;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.15s ease;
  vertical-align: baseline;
  user-select: none;
}
.target-slot-blank:hover {
  background: #f3e8ff;
  border-color: #7c3aed;
  color: #7c3aed;
  transform: scale(1.02);
}

.target-slot-filled {
  font-weight: 900;
  color: #0f172a;
  background: #ecfdf5;
  padding: 1px 6px;
  margin: 0 1px;
  border-radius: 4px;
  border-bottom: 2px solid #10b981;
  display: inline-block;
  animation: popIn 0.2s ease;
}


/* ── Diff & Export Visual Styles ── */
.diff-view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}
@media (max-width: 768px) {
  .diff-view-grid { grid-template-columns: 1fr; }
}

.diff-box {
  min-height: 140px;
  max-height: 320px;
  overflow-y: auto;
  padding: 16px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.diff-box.original {
  background: #fff1f2;
  border: 1.5px solid #fecdd3;
  color: #881337;
}
.diff-box.corrected {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  color: #14532d;
}

.diff-del {
  background: #fee2e2;
  color: #dc2626;
  text-decoration: line-through;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  margin: 0 2px;
}

.diff-ins {
  background: #dcfce7;
  color: #16a34a;
  text-decoration: none;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 800;
  border-bottom: 2px solid #16a34a;
  margin: 0 2px;
}

.diff-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.btn-export-opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-export-opt:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

/* Readability Diagnostics List */
.readability-tips-list {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 768px) {
  .readability-tips-list { grid-template-columns: 1fr; }
}
.readability-tip-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}
.readability-tip-card i {
  font-size: 1.15rem;
  margin-top: 2px;
}
.readability-tip-card h4 {
  font-size: 0.88rem;
  font-weight: 800;
  margin-bottom: 3px;
}
.readability-tip-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}


/* ══════════════════════════════════════════════════════════════════════════
   LISIBILITÉ STATS CARDS & DIAGNOSTICS
   ══════════════════════════════════════════════════════════════════════════ */
.reading-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 20px;
}
@media (max-width: 1024px) {
  .reading-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .reading-stats-grid { grid-template-columns: 1fr; }
}

.reading-stat-card {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.reading-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.reading-stat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.reading-stat-title i {
  font-size: 1rem;
}

.reading-stat-val {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.reading-stat-hint {
  font-size: 0.76rem;
  color: var(--text-dim);
  line-height: 1.35;
}

/* ══════════════════════════════════════════════════════════════════════════
   ULTRA-PROFESSIONAL WHITE LEGAL & HELP MODAL HUB
   ══════════════════════════════════════════════════════════════════════════ */
.modal-legal-hub-card {
  max-width: 920px;
  width: 95vw;
  max-height: 88vh;
  background: #ffffff !important;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.legal-hub-nav {
  display: flex;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 16px 0;
  gap: 8px;
  overflow-x: auto;
}

.legal-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  background: transparent;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.legal-tab-btn:hover {
  color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.6);
}
.legal-tab-btn.active {
  background: #ffffff;
  color: var(--accent-primary);
  border-color: #e2e8f0;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.03);
}

.legal-hub-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  background: #ffffff;
  color: var(--text-main);
  line-height: 1.7;
}

.legal-section-content {
  display: none;
  animation: fadeIn 0.2s ease;
}
.legal-section-content.active {
  display: block;
}

.legal-hub-body h2 {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.legal-hub-body h3 {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin: 20px 0 8px;
}
.legal-hub-body p {
  font-size: 0.92rem;
  color: #334155;
  margin-bottom: 12px;
}
.legal-hub-body ul {
  padding-left: 20px;
  margin-bottom: 14px;
}
.legal-hub-body li {
  font-size: 0.9rem;
  color: #334155;
  margin-bottom: 6px;
}

.legal-highlight-box {
  background: #f8fafc;
  border-left: 4px solid var(--accent-primary);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  margin: 16px 0;
  font-size: 0.9rem;
  color: #1e293b;
}

/* FAQ Interactive Search & Accordion */
.faq-search-box {
  position: relative;
  margin-bottom: 20px;
}
.faq-search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.faq-search-input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s ease;
}
.faq-search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  transition: all 0.2s ease;
}
.faq-item:hover {
  border-color: #cbd5e1;
}
.faq-question {
  width: 100%;
  padding: 14px 18px;
  background: #f8fafc;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
}
.faq-question i {
  transition: transform 0.2s ease;
  color: var(--accent-primary);
}
.faq-item.open .faq-question i {
  transform: rotate(180deg);
}
.faq-answer {
  display: none;
  padding: 16px 18px;
  background: #ffffff;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.65;
  border-top: 1px solid #f1f5f9;
}
.faq-item.open .faq-answer {
  display: block;
}

.legal-hub-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  gap: 12px;
  flex-wrap: wrap;
}
