/* ==============================
   Growity.ai — Shared Styles
   ============================== */

/* ===== Theme tokens ===== */
:root {
  --surface-page: #09090b;
  --surface-card: #0E0E10;
  --surface-sidebar: #0a0a0c;
  --surface-input: #1F1F22;
  --surface-nav: rgba(9,9,11,0.8);
  --surface-dropdown: #18181b;
  --surface-hover: rgba(255,255,255,0.05);
  --surface-subtle: rgba(255,255,255,0.03);
  --surface-muted: rgba(255,255,255,0.06);
  --surface-overlay: rgba(0,0,0,0.6);

  --text-primary: #ffffff;
  --text-secondary: #e4e4e7;
  --text-tertiary: #a1a1aa;
  --text-muted: #71717a;
  --text-faint: #52525b;
  --text-disabled: #3f3f46;

  --border-default: rgba(255,255,255,0.08);
  --border-medium: rgba(255,255,255,0.14);
  --border-strong: rgba(255,255,255,0.20);

  --scrollbar-thumb: rgba(255,255,255,0.1);
  --scrollbar-thumb-hover: rgba(255,255,255,0.2);
  --toggle-track: #3f3f46;
  --progress-bg: #27272a;

  --shadow-card: none;
  --shadow-dropdown: none;

  --accent-bg: rgba(59,130,246,0.15);
  --accent-text: #60a5fa;
  --accent-border: rgba(59,130,246,0.3);

  --chart-blue-from: #1d4ed8;
  --chart-blue-to: #3b82f6;
  --chart-blue-highlight: #60a5fa;
  --chart-purple-from: #6d28d9;
  --chart-purple-to: #a855f7;
  --chart-purple-highlight: #c084fc;
  --chart-cyan-from: #0e7490;
  --chart-cyan-to: #06b6d4;

  /* Spacing scale — also in app.css; needed here so shared partials
     (nav, footer) render on pages without app.css (blog, docs). */
  --spacing-sm: 0.5rem;
  --spacing: 1rem;
  --spacing-lg: 2rem;
}

/* Light: slate-tinted surfaces for hierarchy (Refactoring UI: blue-tinted grays) */
[data-theme="light"] {
  --surface-page: #ffffff;              /* clean white */
  --surface-card: #ffffff;             /* white cards float above gray page */
  --surface-sidebar: #fbfcfd;
  --surface-input: #ffffff;
  --surface-nav: #ffffff;
  --surface-dropdown: #ffffff;
  --surface-hover: rgba(0,0,0,0.04);
  --surface-subtle: #f6f6f7;
  --surface-muted: #ededef;            /* slightly darker warm gray */
  --surface-overlay: rgba(0,0,0,0.4);

  --text-primary: #16161a;            /* Quo: rgb(22,22,26) */
  --text-secondary: #43434a;          /* Quo: rgb(67,67,74) */
  --text-tertiary: #5b5b5c;           /* Quo: rgb(91,91,92) */
  --text-muted: #71717a;              /* darker for white-bg contrast */
  --text-faint: #8a8a93;              /* darker than neutral-400 */
  --text-disabled: #b4b4bc;           /* darker than neutral-300 */

  --border-default: #e8e8eb;          /* neutral-200 */
  --border-medium: #d4d4d9;           /* neutral-300 */
  --border-strong: #a1a1aa;           /* neutral-400 */

  --scrollbar-thumb: rgba(0,0,0,0.18);
  --scrollbar-thumb-hover: rgba(0,0,0,0.3);
  --toggle-track: #d4d4d9;            /* neutral-300 */
  --progress-bg: #e8e8eb;             /* neutral-200 */

  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-dropdown: 0 4px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);

  --accent-bg: #eff6ff;               /* blue-50 */
  --accent-text: #2563eb;             /* blue-600 */
  --accent-border: #93c5fd;           /* blue-300 */

  --chart-blue-from: #3b82f6;
  --chart-blue-to: #60a5fa;
  --chart-blue-highlight: #93c5fd;
  --chart-purple-from: #7c3aed;
  --chart-purple-to: #a78bfa;
  --chart-purple-highlight: #c4b5fd;
  --chart-cyan-from: #0891b2;
  --chart-cyan-to: #22d3ee;
}


[data-theme="dark"] {
  --surface-page: #09090b;
  --surface-card: #0E0E10;
  --surface-sidebar: #0a0a0c;
  --surface-input: #1F1F22;
  --surface-nav: rgba(9,9,11,0.8);
  --surface-dropdown: #18181b;
  --surface-hover: rgba(255,255,255,0.05);
  --surface-subtle: rgba(255,255,255,0.03);
  --surface-muted: rgba(255,255,255,0.06);
  --surface-overlay: rgba(0,0,0,0.6);

  --text-primary: #ffffff;
  --text-secondary: #e4e4e7;
  --text-tertiary: #a1a1aa;
  --text-muted: #71717a;
  --text-faint: #52525b;
  --text-disabled: #3f3f46;

  --border-default: rgba(255,255,255,0.08);
  --border-medium: rgba(255,255,255,0.14);
  --border-strong: rgba(255,255,255,0.20);

  --scrollbar-thumb: rgba(255,255,255,0.1);
  --scrollbar-thumb-hover: rgba(255,255,255,0.2);
  --toggle-track: #3f3f46;
  --progress-bg: #27272a;

  --shadow-card: none;
  --shadow-dropdown: none;

  --accent-bg: rgba(59,130,246,0.15);
  --accent-text: #60a5fa;
  --accent-border: rgba(59,130,246,0.3);

  --chart-blue-from: #1d4ed8;
  --chart-blue-to: #3b82f6;
  --chart-blue-highlight: #60a5fa;
  --chart-purple-from: #6d28d9;
  --chart-purple-to: #a855f7;
  --chart-purple-highlight: #c084fc;
  --chart-cyan-from: #0e7490;
  --chart-cyan-to: #06b6d4;
}

/* Sparkline target lines — theme-aware */
.sparkline-target { stroke: rgba(255,255,255,0.06); }
[data-theme="light"] .sparkline-target { stroke: #e5e7eb; }

/* Buttons — modern: larger, rounder, more padding */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  min-width: 120px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--surface-card);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0,0,0,.07), inset 0 0 0 1px rgba(197,197,201,.5);
}
.btn:hover {
  background: var(--surface-input);
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  height: 48px;
  padding: 12px 24px;
  background: #2563eb;
  color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.07);
}
.btn-primary:hover {
  background: #1d4ed8;
}
.btn-primary:active { transform: scale(0.98); }
.btn-lg {
  height: 52px;
  padding: 14px 32px;
  border-radius: 16px;
  font-size: 15px;
}

/* Primary CTA button — white on dark, dark on light */
[data-theme="light"] .cta-invert {
  background: #0f172a !important;
  color: #ffffff !important;
}
[data-theme="light"] .cta-invert:hover {
  background: #1e293b !important;
}

/* Dark card (CTA sections, pricing cards) — theme-aware */
.card-dark {
  background: linear-gradient(to bottom right, #0E0E10, #111114);
}
[data-theme="light"] .card-dark {
  background: var(--surface-card) !important;
  box-shadow: 0 0 0 1px var(--border-default);
}

/* Hero gradient text — theme-aware */
.hero-gradient-text {
  background-image: linear-gradient(to bottom, #ffffff, #ffffff, #a1a1aa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme="light"] .hero-gradient-text {
  background-image: linear-gradient(to bottom, #0f172a, #0f172a, #94a3b8) !important;
}

/* Traction banner gradient — theme-aware */
.traction-banner-bg {
  background: linear-gradient(to right, rgba(8,145,178,0.12), #0E0E10, rgba(29,78,216,0.12));
}
[data-theme="light"] .traction-banner-bg {
  background: linear-gradient(to right, rgba(8,145,178,0.08), var(--surface-card), rgba(29,78,216,0.08)) !important;
}

/* App main content */
.app-layout main { background: var(--surface-card); }
#state-empty {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* Light theme: sidebar — no border, bg contrast handles separation */

/* Active nav item — same as hover */

/* Light theme: -400 → -600 text (sharp on white, exact Tailwind values)
   !important needed to beat Tailwind CDN JIT which injects styles dynamically */
[data-theme="light"] .text-emerald-300 { color: #059669 !important; } /* emerald-600 */
[data-theme="light"] .text-emerald-400 { color: #059669 !important; } /* emerald-600 */
[data-theme="light"] .text-red-400 { color: #dc2626 !important; }     /* red-600 */
[data-theme="light"] .text-amber-400 { color: #d97706 !important; }   /* amber-600 */
[data-theme="light"] .text-purple-400 { color: #9333ea !important; }  /* purple-600 */
[data-theme="light"] .text-cyan-400 { color: #0891b2 !important; }    /* cyan-600 */
[data-theme="light"] .text-blue-400 { color: #2563eb !important; }    /* blue-600 */
[data-theme="light"] .text-rose-400 { color: #e11d48 !important; }    /* rose-600 */
[data-theme="light"] .text-green-400 { color: #16a34a !important; }   /* green-600 */
[data-theme="light"] .text-sky-400 { color: #0284c7 !important; }    /* sky-600 */
[data-theme="light"] .text-sky-300 { color: #0284c7 !important; }    /* sky-600 */
[data-theme="light"] .text-violet-400 { color: #7c3aed !important; } /* violet-600 */
[data-theme="light"] .text-violet-300 { color: #7c3aed !important; } /* violet-600 */
[data-theme="light"] .text-indigo-400 { color: #4f46e5 !important; } /* indigo-600 */
[data-theme="light"] .text-indigo-300 { color: #4f46e5 !important; } /* indigo-600 */
[data-theme="light"] .text-fuchsia-400 { color: #c026d3 !important; } /* fuchsia-600 */
[data-theme="light"] .text-amber-300 { color: #d97706 !important; }  /* amber-600 */
[data-theme="light"] .text-purple-300 { color: #9333ea !important; } /* purple-600 */
[data-theme="light"] .text-blue-300 { color: #2563eb !important; }   /* blue-600 */
[data-theme="light"] .text-cyan-300 { color: #0891b2 !important; }   /* cyan-600 */
[data-theme="light"] .text-red-300 { color: #dc2626 !important; }    /* red-600 */
[data-theme="light"] .text-red-400\/60 { color: rgb(220 38 38 / 0.6) !important; }

/* Light theme: /10 → -50, /20 → -100 backgrounds (exact Tailwind) */
[data-theme="light"] .bg-emerald-500\/10 { background-color: #ecfdf5 !important; } /* emerald-50 */
[data-theme="light"] .bg-emerald-500\/20 { background-color: #d1fae5 !important; } /* emerald-100 */
[data-theme="light"] .bg-red-500\/10 { background-color: #fef2f2 !important; }     /* red-50 */
[data-theme="light"] .bg-red-500\/20 { background-color: #fee2e2 !important; }     /* red-100 */
[data-theme="light"] .bg-red-500\/5 { background-color: #fef2f2 !important; }      /* red-50 */
[data-theme="light"] .bg-amber-500\/10 { background-color: #fffbeb !important; }   /* amber-50 */
[data-theme="light"] .bg-amber-500\/20 { background-color: #fef3c7 !important; }   /* amber-100 */
[data-theme="light"] .bg-purple-500\/10 { background-color: #faf5ff !important; }  /* purple-50 */
[data-theme="light"] .bg-purple-500\/20 { background-color: #f3e8ff !important; }  /* purple-100 */
[data-theme="light"] .bg-blue-500\/10 { background-color: #eff6ff !important; }    /* blue-50 */
[data-theme="light"] .bg-blue-500\/20 { background-color: #dbeafe !important; }    /* blue-100 */
[data-theme="light"] .bg-cyan-500\/10 { background-color: #ecfeff !important; }    /* cyan-50 */
[data-theme="light"] .bg-cyan-500\/20 { background-color: #cffafe !important; }   /* cyan-100 */
[data-theme="light"] .bg-violet-500\/10 { background-color: #f5f3ff !important; } /* violet-50 */
[data-theme="light"] .bg-violet-500\/20 { background-color: #ede9fe !important; } /* violet-100 */
[data-theme="light"] .bg-indigo-500\/10 { background-color: #eef2ff !important; } /* indigo-50 */
[data-theme="light"] .bg-indigo-500\/20 { background-color: #e0e7ff !important; } /* indigo-100 */
[data-theme="light"] .bg-fuchsia-500\/10 { background-color: #fdf4ff !important; } /* fuchsia-50 */
[data-theme="light"] .bg-zinc-500\/10 { background-color: #ffffff !important; }    /* white */
[data-theme="light"] .bg-white\/10 { background-color: #ffffff !important; }       /* white */

/* Light theme: /20 borders → -200 (exact Tailwind) */
[data-theme="light"] .border-emerald-500\/20 { border-color: #a7f3d0 !important; } /* emerald-200 */
[data-theme="light"] .border-red-500\/20 { border-color: #fecaca !important; }     /* red-200 */
[data-theme="light"] .border-amber-500\/20 { border-color: #fde68a !important; }   /* amber-200 */
[data-theme="light"] .border-blue-500\/20 { border-color: #bfdbfe !important; }    /* blue-200 */
[data-theme="light"] .border-purple-500\/20 { border-color: #e9d5ff !important; }  /* purple-200 */
[data-theme="light"] .border-violet-500\/20 { border-color: #ddd6fe !important; } /* violet-200 */
[data-theme="light"] .border-indigo-500\/20 { border-color: #c7d2fe !important; } /* indigo-200 */
[data-theme="light"] .border-fuchsia-500\/20 { border-color: #f5d0fe !important; } /* fuchsia-200 */
[data-theme="light"] .border-cyan-500\/20 { border-color: #a5f3fc !important; }   /* cyan-200 */
[data-theme="light"] .border-zinc-500\/20 { border-color: #e5e7eb !important; }    /* gray-200 */

/* Dark island: restore dark-theme Tailwind colors inside [data-theme="dark"]
   nested within a light-theme page. Higher specificity beats the light overrides above. */
[data-theme="light"] [data-theme="dark"] .text-emerald-300 { color: #6ee7b7 !important; }
[data-theme="light"] [data-theme="dark"] .text-emerald-400 { color: #34d399 !important; }
[data-theme="light"] [data-theme="dark"] .text-red-400 { color: #f87171 !important; }
[data-theme="light"] [data-theme="dark"] .text-amber-400 { color: #fbbf24 !important; }
[data-theme="light"] [data-theme="dark"] .text-purple-400 { color: #c084fc !important; }
[data-theme="light"] [data-theme="dark"] .text-cyan-400 { color: #22d3ee !important; }
[data-theme="light"] [data-theme="dark"] .text-blue-400 { color: #60a5fa !important; }
[data-theme="light"] [data-theme="dark"] .text-rose-400 { color: #fb7185 !important; }
[data-theme="light"] [data-theme="dark"] .text-green-400 { color: #4ade80 !important; }
[data-theme="light"] [data-theme="dark"] .text-violet-300 { color: #c4b5fd !important; }
[data-theme="light"] [data-theme="dark"] .text-violet-400 { color: #a78bfa !important; }
[data-theme="light"] [data-theme="dark"] .text-indigo-300 { color: #a5b4fc !important; }
[data-theme="light"] [data-theme="dark"] .text-fuchsia-400 { color: #e879f9 !important; }
[data-theme="light"] [data-theme="dark"] .bg-emerald-500\/10 { background-color: rgb(16 185 129 / 0.1) !important; }
[data-theme="light"] [data-theme="dark"] .bg-emerald-500\/20 { background-color: rgb(16 185 129 / 0.2) !important; }
[data-theme="light"] [data-theme="dark"] .bg-red-500\/10 { background-color: rgb(239 68 68 / 0.1) !important; }
[data-theme="light"] [data-theme="dark"] .bg-red-500\/20 { background-color: rgb(239 68 68 / 0.2) !important; }
[data-theme="light"] [data-theme="dark"] .bg-violet-500\/10 { background-color: rgb(139 92 246 / 0.1) !important; }
[data-theme="light"] [data-theme="dark"] .bg-amber-500\/10 { background-color: rgb(245 158 11 / 0.1) !important; }
[data-theme="light"] [data-theme="dark"] .bg-blue-500\/10 { background-color: rgb(59 130 246 / 0.1) !important; }
[data-theme="light"] [data-theme="dark"] .bg-white\/10 { background-color: rgba(255,255,255,0.1) !important; }
[data-theme="light"] [data-theme="dark"] .bg-zinc-500\/10 { background-color: rgba(255,255,255,0.1) !important; }
[data-theme="light"] [data-theme="dark"] .border-emerald-500\/20 { border-color: rgb(16 185 129 / 0.2) !important; }
[data-theme="light"] [data-theme="dark"] .border-red-500\/20 { border-color: rgb(239 68 68 / 0.2) !important; }
[data-theme="light"] [data-theme="dark"] .border-violet-500\/20 { border-color: rgb(139 92 246 / 0.2) !important; }
[data-theme="light"] [data-theme="dark"] .border-amber-500\/20 { border-color: rgb(245 158 11 / 0.2) !important; }
[data-theme="light"] [data-theme="dark"] .border-blue-500\/20 { border-color: rgb(59 130 246 / 0.2) !important; }
[data-theme="light"] [data-theme="dark"] .border-fuchsia-500\/20 { border-color: rgb(217 70 239 / 0.2) !important; }

/* Theme toggle — removed. The site is light-only; hide any switcher markup. */
.tw { display: none !important; }

/* Layout combos — mirrored from app.css so shared partials (nav, footer)
   lay out correctly on pages that don't load app.css (blog, docs). Pure
   layout, no token dependency; identical to app.css so no conflict where
   both files load. */
.flex-inl { display: inline-flex; }
.gap-sm { gap: var(--spacing-sm); }
.gap { gap: var(--spacing); }
.gap-lg { gap: var(--spacing-lg); }
.row-sta-sta { display: flex; flex-direction: row; justify-content: flex-start; align-items: flex-start; }
.row-sta-cen { display: flex; flex-direction: row; justify-content: flex-start; align-items: center; }
.row-sta-end { display: flex; flex-direction: row; justify-content: flex-start; align-items: flex-end; }
.row-sta-str { display: flex; flex-direction: row; justify-content: flex-start; align-items: stretch; }
.row-cen-sta { display: flex; flex-direction: row; justify-content: center; align-items: flex-start; }
.row-cen-cen { display: flex; flex-direction: row; justify-content: center; align-items: center; }
.row-cen-end { display: flex; flex-direction: row; justify-content: center; align-items: flex-end; }
.row-cen-str { display: flex; flex-direction: row; justify-content: center; align-items: stretch; }
.row-end-sta { display: flex; flex-direction: row; justify-content: flex-end; align-items: flex-start; }
.row-end-cen { display: flex; flex-direction: row; justify-content: flex-end; align-items: center; }
.row-end-end { display: flex; flex-direction: row; justify-content: flex-end; align-items: flex-end; }
.row-bet-sta { display: flex; flex-direction: row; justify-content: space-between; align-items: flex-start; }
.row-bet-cen { display: flex; flex-direction: row; justify-content: space-between; align-items: center; }
.row-bet-str { display: flex; flex-direction: row; justify-content: space-between; align-items: stretch; }
.col-sta-sta { display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; }
.col-sta-cen { display: flex; flex-direction: column; justify-content: flex-start; align-items: center; }
.col-sta-end { display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-end; }
.col-sta-str { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; }
.col-cen-sta { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.col-cen-cen { display: flex; flex-direction: column; justify-content: center; align-items: center; }
.col-cen-end { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; }
.col-end-sta { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; }
.col-end-cen { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.col-bet-sta { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; }
.col-bet-cen { display: flex; flex-direction: column; justify-content: space-between; align-items: center; }
.col-bet-str { display: flex; flex-direction: column; justify-content: space-between; align-items: stretch; }

/* Select — custom chevron visible in both themes */
select {
  appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}

/* Base — Quo typography */
* {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: rgba(59, 130, 246, 0.3); }
body {
  background: var(--surface-page);
  font-size: 15px;
  line-height: normal;
  font-weight: 425;
}
body.app-layout { overflow-x: hidden; display: flex; flex-direction: column; }
body.app-layout main { display: flex; flex-direction: column; flex: 1 0 auto; }
body.auth-pending { visibility: hidden; }
body.app-layout { opacity: 0; }
body.app-ready { opacity: 1; transition: opacity 0.15s ease; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }

/* Tab active indicator */
.tab-active {
  color: var(--text-primary);
  border-bottom: 2px solid #3b82f6;
}



/* Mini chart bars animation */
@keyframes grow-bar {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
.chart-bar {
  transform-origin: bottom;
  animation: grow-bar 0.6s ease-out forwards;
}

/* Toggle switch */
.toggle-track {
  background-color: var(--toggle-track);
  cursor: pointer;
  transition: background-color 0.2s;
}
.toggle-track.active {
  background-color: #3b82f6;
}
.toggle-thumb {
  transition: transform 0.2s;
}
.toggle-track.active .toggle-thumb {
  transform: translateX(16px);
}

/* Small toggle (campaigns page) */
.toggle-sm { width: 32px; height: 18px; border-radius: 9px; position: relative; cursor: pointer; transition: background 0.2s; }
.toggle-sm::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: white; transition: transform 0.2s;
}
.toggle-sm.on { background: #22c55e; }
.toggle-sm.off { background: var(--toggle-track); }
.toggle-sm.on::after { transform: translateX(14px); }

/* Fade-up animations (public pages only) */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fade-up 0.5s ease-out forwards; }
.fade-up-1 { animation-delay: 0.05s; opacity: 0; }
.fade-up-2 { animation-delay: 0.12s; opacity: 0; }
.fade-up-3 { animation-delay: 0.19s; opacity: 0; }
.fade-up-4 { animation-delay: 0.26s; opacity: 0; }

/* Disable fade-up in app pages */
body.app-layout .fade-up,
body.app-layout .fade-up-1,
body.app-layout .fade-up-2,
body.app-layout .fade-up-3,
body.app-layout .fade-up-4,
body.app-layout .fade-up-5,
body.app-layout .fade-up-6 { animation: none; opacity: 1; transform: none; }
.fade-up-5 { animation-delay: 0.33s; opacity: 0; }
.fade-up-6 { animation-delay: 0.40s; opacity: 0; }

/* Pulse ring (home page KPIs) */
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.15); opacity: 0.1; }
  100% { transform: scale(1); opacity: 0.4; }
}
.pulse-ring { animation: pulse-ring 3s ease-in-out infinite; }

/* Dashed border pattern */
.dashed-border {
  border: 2px dashed rgba(255,255,255,0.05);
  border-radius: 12px;
}
[data-theme="light"] .dashed-border {
  border-color: rgba(0,0,0,0.08);
}

/* Login / auth page animations */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fade-in-up 0.5s ease-out forwards; }
.animate-fade-in-delay-1 { animation: fade-in-up 0.5s ease-out 0.1s forwards; opacity: 0; }
.animate-fade-in-delay-2 { animation: fade-in-up 0.5s ease-out 0.2s forwards; opacity: 0; }
.animate-fade-in-delay-3 { animation: fade-in-up 0.6s ease-out 0.45s forwards; opacity: 0; }

/* Auth button */
.auth-btn {
  transition: all 0.15s ease;
}
.auth-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}
.auth-btn:active {
  transform: scale(0.985);
}

/* Magic link input */
.magic-input:focus {
  border-color: rgba(59, 130, 246, 0.5);
}

/* SSO code input — bg set here (not via inline `bg-[...]`) so both
   themes get a clean white fill rather than the muted/transparent tint
   that blended into the card. Separation comes from the border. */
.code-input {
  caret-color: #16161a;
  color: #16161a;
  background: #ffffff;
  transition: all 0.15s ease;
}
.code-input:focus,
.code-input:focus-visible {
  background: #ffffff;
  border-color: rgba(59, 130, 246, 0.5);
}
.code-input.filled {
  background: #ffffff;
  border-color: var(--border-strong);
}
/* Kill the Chrome / Safari autofill yellow-grey overlay on these
   one-char OTP boxes — it reads as a grey-on-white focus state. */
.code-input:-webkit-autofill,
.code-input:-webkit-autofill:hover,
.code-input:-webkit-autofill:focus,
.code-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
          box-shadow: 0 0 0 1000px #ffffff inset;
  -webkit-text-fill-color: #16161a;
  caret-color: #16161a;
}

/* Radio card */
.radio-card { cursor: pointer; transition: all 0.2s; }
.radio-card:hover { border-color: var(--border-strong); }
.radio-card.selected { border-color: rgba(59,130,246,0.4); background: rgba(59,130,246,0.05); }
.radio-card .radio-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.radio-card.selected .radio-dot { border-color: #3b82f6; }
.radio-card.selected .radio-dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #3b82f6; }

/* Input field */
.input-field:focus { border-color: rgba(59,130,246,0.5); }

/* Clickable table row */
.row-link { cursor: pointer; }
.row-link:hover { background: var(--surface-subtle); }

/* Activity row highlight (methodology drawer source) */
.activity-highlight { position: relative; }
.activity-highlight::after {
  content: '';
  position: absolute;
  inset: -6px -8px;
  border-radius: 8px;
  border: 1px solid rgba(59,130,246,0.3);
  background: rgba(59,130,246,0.05);
  pointer-events: none;
  animation: activity-highlight-in 0.4s ease-out;
}
@keyframes activity-highlight-in {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

/* Deviation bar */
.deviation-bar { position: relative; height: 4px; border-radius: 2px; overflow: hidden; }

/* Breadcrumb separator */
.bc-sep { color: var(--text-disabled); margin: 0 2px; }

/* Level container fade (public pages only) */
.level-container { animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
body.app-layout .level-container { animation: none; }

/* Channel select card (campaign setup) */
.channel-option { cursor: pointer; transition: all 0.2s; }
.channel-option:hover { border-color: var(--border-strong); background: var(--surface-muted); }
.channel-option.selected { border-color: rgba(59,130,246,0.4); background: rgba(59,130,246,0.05); }

/* Step indicator (campaign setup) */
.step-dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; transition: all 0.3s; }
.step-dot.pending { background: var(--surface-hover); border: 1px solid var(--border-medium); color: var(--text-muted); }
.step-dot.active { background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.3); color: var(--accent-text); }
.step-dot.done { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); color: #34d399; }
[data-theme="light"] .step-dot.done { color: #059669; }
.step-line { height: 2px; flex: 1; background: var(--border-default); transition: background 0.3s; }
.step-line.done { background: rgba(16,185,129,0.3); }

/* Step content fade */
.step-content { animation: fadeUp 0.25s ease-out; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
body.app-layout .step-content { animation: none; }

/* Range slider */
input[type="range"] { -webkit-appearance: none; height: 4px; border-radius: 2px; background: var(--border-medium); outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #3b82f6; cursor: pointer; border: 2px solid #1e3a5f; }

/* Onboarding step card */
.step-card { transition: all 0.3s ease; }
.step-card.active { border-color: rgba(59, 130, 246, 0.3); background: rgba(59, 130, 246, 0.03); }
.step-card.completed { border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.03); }

/* Spin slow */
@keyframes spin-slow {
  to { transform: rotate(360deg); }
}
.animate-spin-slow { animation: spin-slow 1.5s linear infinite; }

/* Onboarding pulse ring */
@keyframes pulse-ring-box {
  0% { box-shadow: none; }
  70% { box-shadow: none; }
  100% { box-shadow: none; }
}

/* Custom select chevron */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}
select option {
  background: var(--surface-dropdown);
  color: var(--text-secondary);
}

/* Row hover (admin) */
.row-hover:hover { background: var(--surface-subtle); }

/* Sparkline path animation (analytics) */
@keyframes drawLine {
  from { stroke-dashoffset: 300; }
  to { stroke-dashoffset: 0; }
}
.spark-line { stroke-dasharray: 300; animation: drawLine 1.5s ease-out forwards; }

/* Heatmap cell (analytics) */
.heat-cell { transition: all 0.15s; border-radius: 3px; }
.heat-cell:hover { transform: scale(1.3); z-index: 10; }

/* Campaign dropdown (analytics) */
#campaign-dd-options {
  animation: ddIn 0.15s ease-out;
  transform-origin: top right;
}
@keyframes ddIn {
  from { opacity: 0; transform: scaleY(0.95) translateY(-4px); }
  to { opacity: 1; transform: scaleY(1) translateY(0); }
}
.camp-dd-option[data-selected="true"] { background: rgba(59, 130, 246, 0.05); }
.camp-dd-option[data-selected="true"] .camp-dd-check { opacity: 1; }

/* Print styles (report) */
@media print {
  body.app-layout { overflow: visible; }
  #sidebar-container, #header-container, #footer-container,
  #copy-toast, #share-btn, .period-tab, #channel-dropdown { display: none !important; }
  .rounded-xl { break-inside: avoid; }
}

/* Table scroll (mobile) */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Import flow row transitions */
.import-row {
  transition: all 0.4s ease;
  overflow: hidden;
}
.import-row.collapsing {
  opacity: 0;
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  border-color: transparent !important;
}
.import-row.expanding {
  animation: import-row-expand 0.4s ease forwards;
}
@keyframes import-row-expand {
  from { opacity: 0; max-height: 0; transform: translateY(-8px); }
  to { opacity: 1; max-height: 80px; transform: translateY(0); }
}
.import-row.dimmed {
  opacity: 0.4;
}
.import-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  animation: import-badge-in 0.3s ease forwards;
}
@keyframes import-badge-in {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}
.import-channel-header {
  animation: import-header-slide 0.35s ease forwards;
}
@keyframes import-header-slide {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}
.import-summary-bar {
  transition: width 1s ease;
}

/* Import simulation — progress bar */
.sim-progress-track {
  height: 3px;
  border-radius: 2px;
  background: var(--border-default);
  overflow: hidden;
}
.sim-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: #3b82f6;
  transition: background 0.5s;
}
.sim-progress-bar.done {
  background: #22c55e;
}

/* Import simulation — KPI cards */
.sim-kpi-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 8px;
  border-radius: 12px;
  border: 1px solid var(--border-default);
  background: var(--surface-card);
}
@media (min-width: 640px) {
  .sim-kpi-card { padding: 16px 12px; }
}
.sim-kpi-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
@media (min-width: 640px) {
  .sim-kpi-label { font-size: 11px; }
}
.sim-kpi-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
@media (min-width: 640px) {
  .sim-kpi-value { font-size: 24px; }
}
.sim-kpi-delta {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-faint);
  min-height: 14px;
}
@media (min-width: 640px) {
  .sim-kpi-delta { font-size: 11px; min-height: 16px; }
}
.sim-kpi-delta.up { color: #22c55e; }
.sim-kpi-delta.down { color: #22c55e; }
.sim-kpi-delta.spend { color: #f59e0b; }
[data-theme="light"] .sim-kpi-delta.up,
[data-theme="light"] .sim-kpi-delta.down { color: #16a34a; }
[data-theme="light"] .sim-kpi-delta.spend { color: #d97706; }

/* Import simulation — commentary */
.sim-commentary {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(59,130,246,0.05);
  border: 1px solid rgba(59,130,246,0.12);
  margin-bottom: 16px;
  transition: opacity 0.3s;
}
@media (min-width: 640px) {
  .sim-commentary { align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 20px; }
}
.sim-commentary-icon {
  width: 16px;
  height: 16px;
  color: var(--accent-text);
  flex-shrink: 0;
  margin-top: 1px;
}
.sim-commentary span {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}
@media (min-width: 640px) {
  .sim-commentary span { font-size: 13px; }
}

/* Import simulation — summary banner */
.sim-summary {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid rgba(16,185,129,0.2);
  background: rgba(16,185,129,0.05);
  animation: import-row-expand 0.4s ease forwards;
}

/* Import simulation — row fade-out for dead channels */
.import-row.dying {
  opacity: 0.4;
  transition: opacity 0.6s ease;
}
.import-row.dead {
  opacity: 0;
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  border-color: transparent !important;
  transition: all 0.5s ease;
}

/* Report highlight row */
.report-highlight {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-default);
}

/* ==============================
   Public Pages — Prose / Typography
   ============================== */

/* Article prose container — long-form reading typography (serif body, sans headings, Medium-like rhythm) */
.prose { color: var(--text-primary); max-width: 42rem; font-family: "Lora", Georgia, Cambria, "Times New Roman", serif; font-size: 1.125rem; line-height: 1.75; font-weight: 400; }
/* Global `* { font-family: Inter }` applies Inter directly to every descendant, beating inheritance.
   Force prose descendants to inherit the serif container font; explicit overrides below (headings/code/tables) still win on higher specificity. */
.prose * { font-family: inherit; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-family: "Inter", system-ui, -apple-system, sans-serif; letter-spacing: -0.01em; }
.prose h2 { color: var(--text-primary); font-size: 1.6rem; font-weight: 700; margin: 2.5rem 0 0.9rem; line-height: 1.3; }
.prose h3 { color: var(--text-primary); font-size: 1.3rem; font-weight: 600; margin: 2rem 0 0.6rem; line-height: 1.35; }
.prose h4 { color: var(--text-primary); font-size: 1.1rem; font-weight: 600; margin: 1.6rem 0 0.5rem; }
.prose p { margin: 0 0 1.6em; }
.prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; transition: color 0.15s; }
.prose a:hover { color: var(--accent-text); }
.prose strong, .prose b { color: var(--text-primary); font-weight: 400 !important; }
.prose ul, .prose ol { margin: 0 0 1.6rem; padding-left: 1.5rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin: 0.5rem 0; }
.prose li::marker { color: var(--text-faint); }
.prose hr { border: none; border-top: 1px solid var(--border-default); margin: 2.75rem 0; }
.prose blockquote { border-left: 3px solid var(--accent-text); padding: 0.5rem 1.25rem; margin: 1.75rem 0; background: var(--accent-bg); border-radius: 0 8px 8px 0; color: var(--text-primary); font-style: italic; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-hover); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.85em; color: var(--text-secondary); }
.prose pre { background: var(--surface-muted); border: 1px solid var(--border-default); border-radius: 8px; padding: 1rem 1.25rem; overflow-x: auto; margin: 1.75rem 0; }
.prose pre code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: none; padding: 0; font-size: 0.85rem; color: var(--text-primary); }

/* Prose tables */
.prose table { width: 100%; border-collapse: collapse; margin: 1.75rem 0; font-size: 0.95rem; font-family: "Inter", system-ui, -apple-system, sans-serif; }
.prose thead th { text-align: left; padding: 0.6rem 0.75rem; color: var(--text-primary); font-weight: 700; border-bottom: 1px solid var(--border-medium); white-space: nowrap; }
.prose tbody td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border-default); }
.prose tbody tr:hover { background: var(--surface-subtle); }

/* Table of contents sidebar */
.toc { position: sticky; top: 5rem; }
.toc a { display: block; padding: 0.3rem 0; color: var(--text-tertiary); font-size: 0.85rem; text-decoration: none; transition: color 0.15s; border-left: 2px solid transparent; padding-left: 0.75rem; }
.toc a:hover { color: var(--text-primary); }
.toc a.active { color: var(--accent-text); border-left-color: var(--accent-text); }

/* Docs sidebar navigation */
.docs-sidebar { position: sticky; top: 5rem; }
.docs-sidebar a { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; border-radius: 6px; color: var(--text-tertiary); font-size: 0.9rem; text-decoration: none; transition: all 0.15s; }
.docs-sidebar a:hover { color: var(--text-secondary); background: var(--surface-hover); }
.docs-sidebar a.active { color: var(--accent-text); background: var(--accent-bg); font-weight: 500; }
.docs-sidebar .section-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); padding: 0.5rem 0.75rem; margin-top: 1rem; }

/* Blog article card */
.article-card { display: block; border-radius: 12px; overflow: hidden; background: var(--surface-card); transition: transform 0.2s, box-shadow 0.2s; }
.article-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.article-card .card-img { aspect-ratio: 16/9; object-fit: cover; width: 100%; display: block; }
.article-card .card-body { padding: 1.25rem 1.5rem 1.5rem; }
.article-card-featured { display: grid; grid-template-columns: 1fr 1fr; border-radius: 16px; overflow: hidden; background: var(--surface-card); transition: transform 0.2s, box-shadow 0.2s; }
.article-card-featured:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.article-card-featured .card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-card-featured .card-body { padding: 2rem 2.5rem; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 768px) { .article-card-featured { grid-template-columns: 1fr; } .article-card-featured .card-img { aspect-ratio: 16/9; } }

/* Blog post row — text-forward feed snippet: title on its own line, then excerpt + thumbnail, meta at the bottom */
.post-row { display: block; padding: 1.5rem 0; border-bottom: 1px solid var(--border-default); }
.post-row:last-child { border-bottom: 0; }
.post-row:hover .post-row-title { color: var(--brand-600, #2563eb); }
.post-row-title { font-size: 1.25rem; line-height: 1.3; font-weight: 600; color: var(--text-primary); transition: color 0.15s; margin-bottom: 0.4rem; }
.post-row-body { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.post-row-text { flex: 1 1 auto; min-width: 0; }
.post-row-excerpt { font-size: 0.95rem; line-height: 1.55; color: var(--text-tertiary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-row-thumb { flex: none; width: 112px; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--surface-card); }
.post-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.post-row:hover .post-row-thumb img { transform: scale(1.04); }
.post-row-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 13px; color: var(--text-faint); margin-top: 0.85rem; }
.post-row-meta .dot { width: 6px; height: 6px; border-radius: 9999px; flex: none; }
.post-row-meta .sep { width: 3px; height: 3px; border-radius: 9999px; background: var(--text-disabled); flex: none; }
/* Featured: same row, more weight on the lead */
.post-row--featured { padding-top: 0; }
.post-row--featured .post-row-title { font-size: 1.625rem; }
.post-row--featured .post-row-excerpt { font-size: 1.0625rem; -webkit-line-clamp: 3; }
.post-row--featured .post-row-thumb { width: 160px; aspect-ratio: 3 / 2; }
@media (max-width: 640px) {
  .post-row { padding: 1.25rem 0; }
  .post-row-title { font-size: 1.0625rem; }
  .post-row-body { gap: 1rem; }
  .post-row-thumb { width: 72px; aspect-ratio: 1 / 1; }
  .post-row--featured .post-row-title { font-size: 1.25rem; }
  .post-row--featured .post-row-thumb { width: 80px; aspect-ratio: 1 / 1; }
}

/* Docs section card */
.doc-card { display: block; border-radius: 12px; overflow: hidden; background: var(--surface-card); transition: transform 0.2s, box-shadow 0.2s; }
.doc-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.doc-card .card-img { aspect-ratio: 16/9; object-fit: cover; width: 100%; display: block; }
.doc-card .card-body { padding: 1.25rem 1.5rem 1.5rem; }
.doc-card.coming-soon { opacity: 0.5; pointer-events: none; }
.doc-card-featured { display: grid; grid-template-columns: 1fr 1fr; border-radius: 16px; overflow: hidden; background: var(--surface-card); transition: transform 0.2s, box-shadow 0.2s; }
.doc-card-featured:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.doc-card-featured .card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.doc-card-featured .card-body { padding: 2rem 2.5rem; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 768px) { .doc-card-featured { grid-template-columns: 1fr; } .doc-card-featured .card-img { aspect-ratio: 16/9; } }

/* Cookie consent banner — light, centered toast. Built by the GA consent block in head-common. */
.cookie-consent {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 20px;
  width: calc(100% - 40px); max-width: 730px; z-index: 99999;
  background: #fff; color: #18181b;
  border: 1px solid rgba(0,0,0,0.08); border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.18);
  padding: 16px 20px;
  font: 14px/1.5 system-ui, -apple-system, sans-serif;
  display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center;
}
.cookie-consent-text { flex: 1 1 360px; }
.cookie-consent-text a { color: #2563eb; text-decoration: underline; }
.cookie-consent-actions { display: flex; gap: 8px; flex: 0 0 auto; margin-left: auto; }
.cookie-consent-btn { padding: 8px 16px; border-radius: 8px; cursor: pointer; font: inherit; border: 1px solid transparent; }
.cookie-consent-reject { border-color: rgba(0,0,0,0.15); background: transparent; color: #52525b; }
.cookie-consent-accept { background: #2563eb; color: #fff; font-weight: 600; }
