/* ===================================================================
   IndustryScope — style.css
   Industrial-modern design system: navy + teal + cool slate
   =================================================================== */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  hanging-punctuation: first last;
}

/* ===== DESIGN TOKENS ===== */
:root {
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1rem    + 1.5vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
}

/* ===== LIGHT MODE ===== */
:root, [data-theme="light"] {
  --color-bg:               #f4f6f9;
  --color-surface:          #ffffff;
  --color-surface-2:        #f0f2f6;
  --color-surface-offset:   #e6e9f0;
  --color-surface-offset-2: #dde1ea;
  --color-surface-dynamic:  #d2d7e2;
  --color-divider:          #c8cdd9;
  --color-border:           #bec5d3;

  --color-text:             #0f172a;
  --color-text-muted:       #64748b;
  --color-text-faint:       #94a3b8;
  --color-text-inverse:     #f8fafc;

  --color-primary:          #0891b2;
  --color-primary-hover:    #0e7490;
  --color-primary-active:   #155e75;
  --color-primary-highlight: #e0f7fa;
  --color-primary-glow:     rgba(8, 145, 178, 0.12);

  --color-success:          #059669;
  --color-success-highlight: #d1fae5;
  --color-warning:          #d97706;
  --color-warning-highlight: #fef3c7;
  --color-error:            #dc2626;
  --color-error-highlight:  #fee2e2;

  --color-chart-1: #0891b2;
  --color-chart-2: #6366f1;
  --color-chart-3: #f59e0b;
  --color-chart-4: #10b981;
  --color-chart-5: #ef4444;
  --color-chart-6: #8b5cf6;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.1);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);

  --hero-gradient: linear-gradient(135deg, #f4f6f9 0%, #e8edf5 50%, #dce4f0 100%);
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --color-bg:               #0b1120;
  --color-surface:          #131c31;
  --color-surface-2:        #172340;
  --color-surface-offset:   #1c2a4a;
  --color-surface-offset-2: #233254;
  --color-surface-dynamic:  #2a3a5e;
  --color-divider:          #233254;
  --color-border:           #2d3f63;

  --color-text:             #e2e8f0;
  --color-text-muted:       #94a3b8;
  --color-text-faint:       #64748b;
  --color-text-inverse:     #0f172a;

  --color-primary:          #22d3ee;
  --color-primary-hover:    #06b6d4;
  --color-primary-active:   #0891b2;
  --color-primary-highlight: #0c3644;
  --color-primary-glow:     rgba(34, 211, 238, 0.1);

  --color-success:          #34d399;
  --color-success-highlight: #064e3b;
  --color-warning:          #fbbf24;
  --color-warning-highlight: #451a03;
  --color-error:            #f87171;
  --color-error-highlight:  #450a0a;

  --color-chart-1: #22d3ee;
  --color-chart-2: #818cf8;
  --color-chart-3: #fbbf24;
  --color-chart-4: #34d399;
  --color-chart-5: #f87171;
  --color-chart-6: #a78bfa;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255,255,255,0.03);

  --hero-gradient: linear-gradient(135deg, #0b1120 0%, #0f1a33 50%, #131f40 100%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0b1120;
    --color-surface: #131c31;
    --color-surface-2: #172340;
    --color-surface-offset: #1c2a4a;
    --color-surface-offset-2: #233254;
    --color-surface-dynamic: #2a3a5e;
    --color-divider: #233254;
    --color-border: #2d3f63;
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-text-faint: #64748b;
    --color-text-inverse: #0f172a;
    --color-primary: #22d3ee;
    --color-primary-hover: #06b6d4;
    --color-primary-active: #0891b2;
    --color-primary-highlight: #0c3644;
    --color-primary-glow: rgba(34, 211, 238, 0.1);
    --hero-gradient: linear-gradient(135deg, #0b1120 0%, #0f1a33 50%, #131f40 100%);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.03);
    --color-chart-1: #22d3ee;
    --color-chart-2: #818cf8;
    --color-chart-3: #fbbf24;
    --color-chart-4: #34d399;
    --color-chart-5: #f87171;
    --color-chart-6: #a78bfa;
  }
}

/* ===== BODY ===== */
body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); text-wrap: balance; line-height: 1.15; }
p, li, figcaption { text-wrap: pretty; max-width: 72ch; }
img, picture, video, svg { display: block; max-width: 100%; }
canvas { display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
ul[role="list"], ol[role="list"] { list-style: none; }
button { cursor: pointer; background: none; border: none; }

::selection {
  background: var(--color-primary-highlight);
  color: var(--color-text);
}

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

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

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

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.header-vela-logo {
  height: 28px;
  width: auto;
  flex-shrink: 0;
  display: inline-block;
}

[data-theme="dark"] .header-vela-logo {
  filter: brightness(0) invert(0.85);
}

.logo-text {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.header-badge {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: background var(--transition-interactive),
              color var(--transition-interactive),
              border-color var(--transition-interactive);
}
.theme-toggle:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

/* ===== HERO SECTION ===== */
.hero-section {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-6);
  background: var(--hero-gradient);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, var(--color-primary-glow), transparent),
    radial-gradient(ellipse 40% 40% at 80% 80%, var(--color-primary-glow), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 680px;
  text-align: center;
  animation: fadeInUp 0.6s var(--ease-out) both;
}

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

.hero-overline {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: var(--space-4);
}

.hero-accent {
  background: linear-gradient(135deg, var(--color-primary), var(--color-chart-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-10);
  max-width: 100%;
}

/* Hero Form */
.hero-form {
  margin-bottom: var(--space-8);
}

.input-wrapper {
  display: flex;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-1);
  box-shadow: var(--shadow-lg);
  transition: border-color var(--transition-interactive),
              box-shadow var(--transition-interactive);
}
.input-wrapper:focus-within {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg), 0 0 0 3px var(--color-primary-glow);
}

.input-icon {
  flex-shrink: 0;
  margin-left: var(--space-4);
  color: var(--color-text-faint);
}

.input-wrapper input {
  flex: 1;
  border: none;
  background: transparent;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  outline: none;
  min-width: 0;
}
.input-wrapper input::placeholder { color: var(--color-text-faint); }

.btn-analyze {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: background var(--transition-interactive),
              transform var(--transition-interactive),
              box-shadow var(--transition-interactive);
}
.btn-analyze:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-analyze:active {
  transform: translateY(0);
  background: var(--color-primary-active);
}

.hero-hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-3);
}

/* Example chips */
.hero-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.examples-label {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: 500;
}

.example-chip {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: background var(--transition-interactive),
              color var(--transition-interactive),
              border-color var(--transition-interactive);
}
.example-chip:hover {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* ===== LOADING SECTION ===== */
.loading-section {
  padding: var(--space-24) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
}

.loading-content {
  text-align: center;
  max-width: 400px;
}

.loading-spinner {
  margin-bottom: var(--space-8);
}

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

.spinner-arc {
  animation: spin 1s linear infinite;
  transform-origin: center;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-align: left;
  margin-bottom: var(--space-8);
}

.loading-step {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  transition: color 0.3s ease;
}
.loading-step.active {
  color: var(--color-primary);
  font-weight: 500;
}
.loading-step.done {
  color: var(--color-success);
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  flex-shrink: 0;
  transition: background 0.3s ease, transform 0.3s ease;
}
.loading-step.active .step-dot {
  background: var(--color-primary);
  transform: scale(1.3);
}
.loading-step.done .step-dot {
  background: var(--color-success);
}

.loading-progress {
  height: 4px;
  background: var(--color-surface-offset);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-chart-2));
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* ===== DASHBOARD ===== */
.dashboard-section {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 var(--space-6) var(--space-16);
  animation: dashEnter 0.5s var(--ease-out) both;
}

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

/* Top Bar */
.dash-topbar {
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--color-divider);
  margin-bottom: var(--space-6);
}

.dash-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.dash-company-name {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dash-sector-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 600;
}

.dash-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-success-highlight);
  color: var(--color-success);
  font-size: var(--text-xs);
  font-weight: 600;
}

.btn-new-analysis {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: background var(--transition-interactive),
              color var(--transition-interactive),
              border-color var(--transition-interactive);
}
.btn-new-analysis:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

/* KPI Row */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-interactive),
              transform var(--transition-interactive);
}
.kpi-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.kpi-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2);
}

.kpi-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums lining-nums;
  margin-bottom: var(--space-1);
}

.kpi-delta {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-faint);
}
.kpi-delta-up { color: var(--color-success); }
.kpi-delta-down { color: var(--color-error); }

/* Charts */
.charts-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.charts-grid-reverse {
  grid-template-columns: 1fr 1.4fr;
}
.charts-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.chart-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.chart-header {
  padding: var(--space-5) var(--space-6) 0;
}

.chart-title {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.chart-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.chart-body {
  padding: var(--space-4) var(--space-6) var(--space-6);
  height: 280px;
  position: relative;
}

.chart-body-donut {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Section headers */
.section-header {
  margin-bottom: var(--space-5);
  margin-top: var(--space-4);
}

.section-title-dash {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* Trends */
.trends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.trend-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-interactive), transform var(--transition-interactive);
}
.trend-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.trend-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  color: var(--color-primary);
}

.trend-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.trend-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Recommendations */
.reco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.reco-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: box-shadow var(--transition-interactive), transform var(--transition-interactive);
}
.reco-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.reco-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.reco-category {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}
.reco-category[data-cat="Shopfloor"] { background: #e0f2fe; color: #0369a1; }
.reco-category[data-cat="Supply Chain"] { background: #ede9fe; color: #6d28d9; }
.reco-category[data-cat="Organization"] { background: #fef3c7; color: #92400e; }
.reco-category[data-cat="Digital"] { background: #e0e7ff; color: #4338ca; }
.reco-category[data-cat="Energy"] { background: #d1fae5; color: #065f46; }

[data-theme="dark"] .reco-category[data-cat="Shopfloor"] { background: #082f49; color: #7dd3fc; }
[data-theme="dark"] .reco-category[data-cat="Supply Chain"] { background: #2e1065; color: #c4b5fd; }
[data-theme="dark"] .reco-category[data-cat="Organization"] { background: #451a03; color: #fde68a; }
[data-theme="dark"] .reco-category[data-cat="Digital"] { background: #1e1b4b; color: #a5b4fc; }
[data-theme="dark"] .reco-category[data-cat="Energy"] { background: #022c22; color: #6ee7b7; }

.reco-priority {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}
.reco-priority-haute {
  background: var(--color-error-highlight);
  color: var(--color-error);
}
.reco-priority-moyenne {
  background: var(--color-warning-highlight);
  color: var(--color-warning);
}

.reco-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.3;
}

.reco-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.reco-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
  margin-top: auto;
}

.reco-impact {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-success);
}

.reco-timeline {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* ===== VELA CTA BANNER ===== */
.vela-cta-banner {
  margin-bottom: var(--space-8);
  background: linear-gradient(135deg, var(--color-primary-highlight), var(--color-surface-offset));
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  position: relative;
  overflow: hidden;
}
.vela-cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 100% 50%, var(--color-primary-glow), transparent);
  pointer-events: none;
}
.vela-cta-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.vela-cta-text {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}
.vela-cta-text svg {
  color: var(--color-primary);
  flex-shrink: 0;
}
.vela-cta-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition-interactive), transform var(--transition-interactive);
}
.vela-cta-link:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  padding: var(--space-8) var(--space-6);
}

.footer-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-brand {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.footer-link {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-interactive);
}
.footer-link:hover { color: var(--color-primary-hover); }

.footer-disclaimer {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-style: italic;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-section {
    min-height: auto;
    padding: var(--space-16) var(--space-4);
  }

  .hero-title {
    font-size: var(--text-2xl);
  }

  .input-wrapper {
    flex-direction: column;
    border-radius: var(--radius-lg);
    padding: var(--space-2);
  }

  .input-icon { display: none; }

  .input-wrapper input {
    width: 100%;
    text-align: center;
  }

  .btn-analyze {
    width: 100%;
    justify-content: center;
    border-radius: var(--radius-md);
  }

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

  .charts-grid,
  .charts-grid-reverse,
  .charts-grid-3 {
    grid-template-columns: 1fr;
  }

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

  .dash-topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .header-badge { display: none; }
}

@media (max-width: 480px) {
  .kpi-row {
    grid-template-columns: 1fr;
  }

  .hero-examples {
    gap: var(--space-1);
  }

  .dash-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* ===== STAGGER ANIMATION UTILITY ===== */
.stagger-in > * {
  opacity: 0;
  animation: staggerFade 0.4s var(--ease-out) both;
}
.stagger-in > *:nth-child(1) { animation-delay: 0ms; }
.stagger-in > *:nth-child(2) { animation-delay: 60ms; }
.stagger-in > *:nth-child(3) { animation-delay: 120ms; }
.stagger-in > *:nth-child(4) { animation-delay: 180ms; }
.stagger-in > *:nth-child(5) { animation-delay: 240ms; }
.stagger-in > *:nth-child(6) { animation-delay: 300ms; }

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