/* ============================================================
   FinBridge Venture Studio — Main Stylesheet
   UI/UX Audit & Improvement — v2.0
   Light corporate design: modern, clean, professional
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Color — Primary */
  --color-primary-300: #A855F7;
  --color-primary-500: #6B21A8;
  --color-primary-600: #581C87;
  --color-primary-10: rgba(107, 33, 168, 0.06);
  --color-primary: var(--color-primary-500);
  --color-primary-dark: var(--color-primary-600);
  --color-primary-light: var(--color-primary-300);
  --color-accent: #C4B5FD;

  /* Color — Neutral */
  --color-neutral-0: #FFFFFF;
  --color-neutral-50: #F8F7FC;
  --color-neutral-100: #F3F4F6;
  --color-neutral-200: #E5E7EB;
  --color-neutral-300: #D1D5DB;
  --color-neutral-500: #6B7280;
  --color-neutral-600: #4B5563;
  --color-neutral-700: #374151;
  --color-neutral-900: #1E1B2E;
  --color-bg: var(--color-neutral-0);
  --color-bg-alt: var(--color-neutral-50);
  --color-bg-card: var(--color-neutral-0);
  --color-surface: var(--color-neutral-0);
  --color-text: var(--color-neutral-900);
  --color-text-secondary: var(--color-neutral-500);
  --color-text-muted: var(--color-neutral-500);
  --color-heading: var(--color-neutral-900);
  --color-border: var(--color-neutral-200);

  /* Color — Semantic */
  --color-success: #10B981;
  --color-success-bg: #D1FAE5;
  --color-warning: #F59E0B;
  --color-warning-bg: #FEF3C7;
  --color-danger: #EF4444;
  --color-danger-bg: #FEE2E2;
  --color-info: #3B82F6;
  --color-info-bg: #DBEAFE;

  /* Typography — unified scale */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', 'JetBrains Mono', 'Cascadia Code', monospace;
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-md: 16px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 36px;
  --text-5xl: 48px;
  --text-6xl: 56px;
  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.55;
  --leading-relaxed: 1.75;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Spacing — 8px grid */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Border Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows — refined */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(107, 33, 168, 0.10), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 32px rgba(107, 33, 168, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 20px 48px rgba(107, 33, 168, 0.18), 0 8px 20px rgba(0, 0, 0, 0.08);

  /* Layout */
  --max-width: 1200px;
  --navbar-height: 72px;
  --navbar-bg: rgba(255, 255, 255, 0.96);

  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-family);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-primary-dark); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font-family: var(--font-family); }

/* ---------- Typography System ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-heading);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--text-5xl); font-weight: var(--font-weight-extrabold); }
h2 { font-size: var(--text-4xl); font-weight: var(--font-weight-extrabold); }
h3 { font-size: var(--text-2xl); font-weight: var(--font-weight-bold); }
h4 { font-size: var(--text-xl); font-weight: var(--font-weight-semibold); }
h5 { font-size: var(--text-lg); font-weight: var(--font-weight-semibold); }
h6 { font-size: var(--text-base); font-weight: var(--font-weight-semibold); }

p { line-height: var(--leading-relaxed); }

.text-gradient {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Container ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ---------- Buttons — unified system ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-base);
  font-family: var(--font-family);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  min-height: 44px;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background var(--transition);
}
.btn:hover::before { background: rgba(255, 255, 255, 0.08); }
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(107, 33, 168, 0.25);
}
.btn--primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
  box-shadow: 0 4px 16px rgba(107, 33, 168, 0.35);
  transform: translateY(-1px);
}
.btn--primary:active { transform: translateY(0) scale(0.98); }

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(107, 33, 168, 0.25);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border-color: transparent;
}
.btn--ghost:hover {
  background: var(--color-primary-10);
  border-color: transparent;
}

.btn--secondary {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn--secondary:hover {
  background: var(--color-neutral-200);
  border-color: var(--color-neutral-300);
  color: var(--color-text);
}

.btn--danger {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}
.btn--danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn--sm {
  padding: 7px 16px;
  font-size: var(--text-sm);
  min-height: 36px;
  border-radius: var(--radius-xs);
}
.btn--lg {
  padding: 14px 32px;
  font-size: var(--text-lg);
  min-height: 52px;
  border-radius: var(--radius-sm);
}
.btn--block { width: 100%; }
.btn--icon {
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
}

.btn:disabled, .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}
.navbar--scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}
[data-theme="dark"] .navbar { border-bottom-color: rgba(168, 85, 247, 0.15); }
[data-theme="dark"] .navbar--scrolled { box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4); }
[data-theme="dark"] .navbar__logo-text { color: #F3F2F8; }
[data-theme="dark"] .navbar__logo-icon { box-shadow: 0 2px 12px rgba(168, 85, 247, 0.45); }
[data-theme="dark"] .navbar__link { color: #9CA3AF; }
[data-theme="dark"] .navbar__link:hover, [data-theme="dark"] .navbar__link--active { color: var(--color-primary-light); background: rgba(168, 85, 247, 0.1); }
[data-theme="dark"] .navbar__burger { border-color: #3D3A50; }
[data-theme="dark"] .navbar__burger span { background: #E8E6F0; }
[data-theme="dark"] .navbar__profile-link { border-color: #3D3A50; color: #E8E6F0; }
[data-theme="dark"] .lb-row--top1 { background: rgba(245, 158, 11, 0.08); }
[data-theme="dark"] .lb-row--top2 { background: rgba(156, 163, 175, 0.08); }
[data-theme="dark"] .lb-row--top3 { background: rgba(217, 119, 6, 0.08); }
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--navbar-height);
  gap: var(--space-8);
}
.navbar__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-lg);
  color: var(--color-text);
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.navbar__logo:hover { opacity: 0.85; color: var(--color-text); }
.navbar__logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  font-weight: var(--font-weight-extrabold);
  font-size: 13px;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(107, 33, 168, 0.3);
}
.navbar__logo-text { font-size: 16px; letter-spacing: -0.01em; }
.navbar__links { display: flex; gap: 2px; }
.navbar__link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  transition: all var(--transition);
  position: relative;
}
.navbar__link:hover {
  color: var(--color-primary);
  background: var(--color-primary-10);
}
.navbar__link--active {
  color: var(--color-primary);
  background: var(--color-primary-10);
  font-weight: var(--font-weight-semibold);
}
.navbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}
.navbar__profile-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 12px 6px 6px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
  font-size: var(--text-sm);
  transition: all var(--transition);
  text-decoration: none;
}
.navbar__profile-link:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-10);
}
.navbar__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.navbar__avatar--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  font-weight: var(--font-weight-bold);
  font-size: 12px;
}
.navbar__profile-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.navbar__mobile-auth { display: none; }
.navbar__mobile-lang { display: none; }
.navbar__burger {
  display: none;
  background: none;
  border: 1.5px solid var(--color-border);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.navbar__burger:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-10);
}
.navbar__burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  margin: 4px 0;
  transition: all var(--transition);
  border-radius: 2px;
}
.navbar__burger--open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.navbar__burger--open span:nth-child(2) { opacity: 0; transform: translateX(-8px); }
.navbar__burger--open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* ---------- Hero Section ---------- */
.hero {
  padding: 100px 0 88px;
  background: linear-gradient(135deg, rgba(107,33,168,0.88) 0%, rgba(88,28,135,0.93) 100%),
              url('/images/team-hero-bg.webp') center/cover no-repeat;
  position: relative;
  overflow: hidden;
  color: #fff;
}
.hero::before {
  content: '';
  position: absolute;
  top: -140px;
  right: -100px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,181,253,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 740px;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.95);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-6);
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
}
.hero__title {
  font-size: var(--text-6xl);
  font-weight: var(--font-weight-extrabold);
  line-height: 1.05;
  color: #fff;
  margin-bottom: var(--space-5);
  letter-spacing: -0.03em;
}
.hero__title span { color: #C4B5FD; }
.hero__subtitle {
  font-size: 19px;
  line-height: var(--leading-relaxed);
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-8);
  max-width: 560px;
}
.hero__actions { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.hero .btn--primary {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.hero .btn--primary:hover {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  border-color: var(--color-accent);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.hero .btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.hero .btn--outline:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: #fff;
}

/* ---------- Section ---------- */
.section { padding: var(--space-20) 0; }
.section--alt { background: var(--color-bg-alt); }
.section--hero-about {
  background: linear-gradient(135deg, rgba(30,27,46,0.82) 0%, rgba(107,33,168,0.78) 100%),
              url('/images/team-about-section.webp') center/cover no-repeat;
  color: #fff;
}
.section--hero-about .section__title { color: #fff; }
.section--hero-about .section__subtitle { color: rgba(255,255,255,0.85); }
.section--demo-bg {
  background: linear-gradient(135deg, rgba(30,27,46,0.84) 0%, rgba(107,33,168,0.80) 100%),
              url('/images/team-demo-day.webp') center/cover no-repeat;
  color: #fff;
}
.section--demo-bg .section__title { color: #fff; }
.section--demo-bg .section__subtitle { color: rgba(255,255,255,0.85); }
.section__header { text-align: center; margin-bottom: var(--space-16); }
.section__label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: #EDE9FE;
  border-radius: var(--radius-full);
  padding: 4px 14px;
  margin-bottom: var(--space-3);
}
.section__title {
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-heading);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
  line-height: var(--leading-snug);
}
.section__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }
.stat {
  text-align: center;
  padding: var(--space-8) var(--space-5);
  background: var(--color-bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  opacity: 0;
  transition: opacity var(--transition);
}
.stat:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}
.stat:hover::before { opacity: 1; }
.stat__number {
  font-size: var(--text-5xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-primary);
  line-height: 1.1;
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}
.stat__label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }
.step {
  padding: var(--space-8) var(--space-6);
  background: var(--color-bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  position: relative;
}
.step:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-10);
  color: var(--color-primary);
  font-weight: var(--font-weight-extrabold);
  font-size: 18px;
  margin-bottom: var(--space-4);
}
.step__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  margin-bottom: var(--space-4);
  box-shadow: 0 4px 12px rgba(107, 33, 168, 0.25);
}
.step__title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-heading);
  margin-bottom: var(--space-2);
}
.step__text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ---------- Cards Grid ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-6); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  padding: var(--space-7);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(107, 33, 168, 0);
  transition: box-shadow var(--transition);
  pointer-events: none;
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  transform: translateY(-3px);
}
.card:hover::after {
  box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.4);
}
.card--restricted { opacity: 0.75; }
.card--restricted:hover { transform: none; box-shadow: var(--shadow); }
.card__cover {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
  background: linear-gradient(135deg, var(--color-primary-10) 0%, #EDE9FE 100%);
}
.card__cover-placeholder {
  width: 100%;
  height: 120px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
  background: linear-gradient(135deg, var(--color-primary-10) 0%, #EDE9FE 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  opacity: 0.6;
}
.card__status {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  align-self: flex-start;
}
.card__status--draft { background: #F3F4F6; color: #6B7280; }
.card__status--submitted { background: #EDE9FE; color: var(--color-primary); }
.card__status--screening { background: var(--color-warning-bg); color: #D97706; }
.card__status--expert_review { background: var(--color-warning-bg); color: #D97706; }
.card__status--approved { background: var(--color-success-bg); color: #059669; }
.card__status--rejected { background: var(--color-danger-bg); color: #DC2626; }
.card__status--launched { background: var(--color-info-bg); color: #2563EB; }
.card__status--voting { background: #FDF4FF; color: #9333EA; }
.card__status--recycled { background: #FFF7ED; color: #C2410C; }
.card__cover {
  display: block;
  margin: calc(var(--space-6) * -1) calc(var(--space-6) * -1) var(--space-4);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.card:hover .card__cover img { transform: scale(1.03); }
.card__title {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-2);
  color: var(--color-heading);
  line-height: var(--leading-snug);
  flex-grow: 0;
}
.card__title a { color: inherit; transition: color var(--transition); }
.card__title a:hover { color: var(--color-primary); }
.card__text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-5);
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}
.card__meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.card__meta-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.7;
}
.card--track { text-align: center; }
.card__track-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
}

/* ---------- Leaderboard ---------- */
.leaderboard { max-width: 640px; margin: 0 auto; }
.leaderboard__row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  margin-bottom: var(--space-3);
  transition: all var(--transition);
}
.leaderboard__row:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  transform: translateX(2px);
}
.leaderboard__rank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-extrabold);
  font-size: var(--text-sm);
  background: var(--color-bg-alt);
  color: var(--color-primary);
}
.leaderboard__row:first-child .leaderboard__rank {
  background: var(--color-primary);
  color: #fff;
}
.leaderboard__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  font-size: var(--text-md);
  background: #EDE9FE;
  color: var(--color-primary);
}
.leaderboard__info { flex: 1; min-width: 0; }
.leaderboard__name {
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-base);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.leaderboard__level {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  text-transform: capitalize;
  margin-top: 2px;
}
.leaderboard__points {
  font-weight: var(--font-weight-bold);
  font-size: var(--text-md);
  color: var(--color-primary);
  white-space: nowrap;
}
.leaderboard__points span {
  font-weight: var(--font-weight-normal);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  background: var(--color-bg-card);
  border-radius: var(--radius);
  border: 2px dashed var(--color-border);
}
.empty-state__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4);
  opacity: 0.3;
}
.empty-state__text {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  font-weight: var(--font-weight-medium);
}

/* ---------- Application Cards ---------- */
.app-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: var(--space-5);
}
.app-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.app-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}
.app-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}
.app-card__title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-heading);
  line-height: var(--leading-tight);
  margin: 0;
}
.app-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.app-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
}
.app-card__progress {
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
}
.app-card__progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 2px;
  transition: width 0.6s ease;
}
.app-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

/* ---------- CTA Section ---------- */
.cta {
  padding: var(--space-20) 0;
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}
.cta__title {
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-4);
  color: #fff;
  letter-spacing: -0.02em;
}
.cta__text {
  font-size: var(--text-lg);
  opacity: 0.9;
  margin-bottom: var(--space-8);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: var(--leading-relaxed);
}
.cta .btn--primary {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.cta .btn--primary:hover {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  border-color: var(--color-accent);
}

/* ---------- Footer ---------- */
.footer {
  padding: var(--space-12) 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}
.footer__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-8);
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-base);
}
.footer__brand-text { color: var(--color-text); }
.footer__columns {
  display: flex;
  gap: var(--space-12);
  justify-content: center;
}
.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer__links a {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: color var(--transition);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.footer__links a:hover { color: var(--color-primary); }
.footer__copy {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: right;
}

/* ---------- Form ---------- */
.form { max-width: 560px; margin: 0 auto; }
.form__group { margin-bottom: var(--space-6); }
.form__label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.form__label span { color: var(--color-danger); margin-left: 2px; }
.form__input, .form__textarea, .form__select {
  width: 100%;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  font-size: var(--text-md);
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: var(--leading-normal);
}
.form__input:focus, .form__textarea:focus, .form__select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.10);
}
.form__input::placeholder, .form__textarea::placeholder {
  color: var(--color-neutral-300);
}
.form__select--sm {
  padding: 6px 10px;
  font-size: var(--text-sm);
  width: auto;
  min-width: 130px;
}
.form__textarea {
  min-height: 120px;
  resize: vertical;
  line-height: var(--leading-relaxed);
}
.form__hint {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: var(--space-1);
  line-height: var(--leading-normal);
}
.form__error {
  font-size: var(--text-xs);
  color: var(--color-danger);
  margin-top: var(--space-1);
  display: flex;
  align-items: center;
  gap: 4px;
}
.form__input--error, .form__textarea--error {
  border-color: var(--color-danger);
}
.form__input--filled {
  border-color: var(--color-success) !important;
  background: rgba(16, 185, 129, 0.03);
}

/* ---------- Login Page ---------- */
.login-page {
  min-height: calc(100vh - var(--navbar-height) - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-6);
  background: var(--color-bg-alt);
}
.login-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: var(--space-12);
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-xl);
}
.login-card__title {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}
.login-card__text {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
}

/* ---------- Profile Page ---------- */
.profile { padding: var(--space-16) 0; }
.profile__header {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-bottom: var(--space-10);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-border);
}
.profile__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: var(--font-weight-extrabold);
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(107, 33, 168, 0.3);
}
.profile__avatar-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(107, 33, 168, 0.15);
  box-shadow: 0 4px 16px rgba(107, 33, 168, 0.2);
}
.profile__name {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-extrabold);
  letter-spacing: -0.02em;
}
.profile__role {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  background: #EDE9FE;
  color: var(--color-primary);
  margin-top: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.profile__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-10);
}

/* ---------- Detail Page ---------- */
.detail { padding: var(--space-16) 0; }
.detail__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  transition: color var(--transition);
  font-weight: var(--font-weight-medium);
}
.detail__back:hover { color: var(--color-primary); }
.detail__back svg { transition: transform var(--transition); }
.detail__back:hover svg { transform: translateX(-2px); }
.detail__title {
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
  line-height: var(--leading-snug);
}
.detail__meta {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  flex-wrap: wrap;
  align-items: center;
}
.detail__body { max-width: 720px; }
.detail__section { margin-bottom: var(--space-8); }
.detail__section-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-3);
  color: var(--color-heading);
}
.detail__section-text {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ---------- 404 Page ---------- */
.not-found {
  min-height: calc(100vh - var(--navbar-height) - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-16) var(--space-6);
}
.not-found__code {
  font-size: 120px;
  font-weight: var(--font-weight-extrabold);
  color: var(--color-accent);
  line-height: 1;
  letter-spacing: -0.04em;
}
.not-found__title {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-bold);
  margin: var(--space-4) 0 var(--space-3);
}
.not-found__text {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
  max-width: 400px;
}

/* ---------- Page Header ---------- */
.page-header {
  padding: var(--space-12) 0 var(--space-10);
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}
.page-header__title {
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}
.page-header__subtitle {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}
.page-header__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  transition: color var(--transition);
  font-weight: var(--font-weight-medium);
}
.page-header__back:hover { color: var(--color-primary); }
.page-header__meta {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-2);
  flex-wrap: wrap;
}

/* ---------- Admin Panel ---------- */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: var(--space-8);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0;
  overflow-x: auto;
}
.admin-tab {
  padding: 11px var(--space-6);
  border: none;
  background: none;
  cursor: pointer;
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  font-family: var(--font-family);
  white-space: nowrap;
}
.admin-tab:hover { color: var(--color-primary); }
.admin-tab--active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}
.admin-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  gap: var(--space-4);
}
.admin-panel__header h2 {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  margin: 0;
}
.admin-form {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: var(--space-7);
  margin-bottom: var(--space-6);
  border: 1px solid var(--color-border);
}
.admin-form h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-5);
}
.admin-form__row { display: flex; gap: var(--space-4); align-items: flex-start; }
.admin-form__actions { display: flex; gap: var(--space-3); margin-top: var(--space-4); }
.admin-filter { display: flex; gap: var(--space-3); margin-bottom: var(--space-5); flex-wrap: wrap; }
.admin-table-wrapper { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--color-border); }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.admin-table th {
  text-align: left;
  padding: 12px var(--space-4);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  border-bottom: 2px solid var(--color-border);
  background: var(--color-bg-alt);
  white-space: nowrap;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-table td {
  padding: 12px var(--space-4);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--color-bg-alt); }
.admin-table a { color: var(--color-primary); font-weight: var(--font-weight-medium); }

/* ---------- Agents Grid & Agent Card ---------- */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-4);
}
.agent-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  position: relative;
}
.agent-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}
.agent-card--disabled {
  opacity: 0.55;
  background: var(--color-bg-alt);
}
.agent-card--disabled:hover {
  opacity: 0.7;
}
.agent-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.agent-card__emoji {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-10);
  border-radius: var(--radius);
  flex-shrink: 0;
}
.agent-card__name {
  font-size: var(--text-md);
  font-weight: var(--font-weight-bold);
  color: var(--color-heading);
  line-height: 1.3;
}
.agent-card__role {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 2px;
}
.agent-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}
.agent-card__badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--color-primary-10);
  color: var(--color-primary);
}

/* ---------- Analytics Charts ---------- */
.analytics-charts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.analytics-chart-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  position: relative;
}
.analytics-chart-card h3,
.analytics-chart-card h4 {
  font-size: var(--text-md);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-4);
  color: var(--color-heading);
}
/* Wrapper that constrains the canvas height */
.analytics-chart-card .chart-wrap {
  position: relative;
  width: 100%;
  height: 300px;
}
.analytics-chart-card .chart-wrap canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}

/* ---------- Admin Sidebar Layout ---------- */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-6);
  min-height: 600px;
}
.admin-sidebar {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4) 0;
  height: fit-content;
  position: sticky;
  top: 88px;
}
.admin-sidebar__group { padding: 0 var(--space-3); margin-bottom: var(--space-4); }
.admin-sidebar__label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  padding: 4px var(--space-2);
  margin-bottom: var(--space-1);
}
.admin-sidebar .admin-tab {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: 9px var(--space-3);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: var(--text-sm);
  font-family: inherit;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
  font-weight: var(--font-weight-medium);
}
.admin-sidebar .admin-tab:hover { background: var(--color-bg-alt); }
.admin-sidebar .admin-tab--active {
  background: var(--color-primary-10);
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
}
.admin-content { min-width: 0; overflow-x: hidden; }
.admin-panel { padding: var(--space-2) 0; }

/* ---------- Detail Tabs ---------- */
.detail-tabs {
  display: flex;
  gap: 2px;
  margin: var(--space-6) 0 0;
  border-bottom: 2px solid var(--color-border);
  overflow-x: auto;
  scrollbar-width: none;
}
.detail-tabs::-webkit-scrollbar { display: none; }
.detail-tab {
  padding: 11px var(--space-5);
  background: none;
  border: none;
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  font-family: inherit;
  white-space: nowrap;
}
.detail-tab:hover { color: var(--color-primary); }
.detail-tab--active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}
.detail-tab-pane { display: none; padding: var(--space-6) 0; }
.detail-tab-pane--active { display: block; }

/* ---------- Review Grid ---------- */
.review-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.form__weight {
  font-weight: var(--font-weight-normal);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

/* ---------- Review Cards ---------- */
.reviews-summary { display: flex; flex-direction: column; gap: var(--space-3); }
.review-card {
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  transition: box-shadow var(--transition);
}
.review-card:hover { box-shadow: var(--shadow-sm); }
.review-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}
.review-card__verdict {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.review-card__verdict--go { background: #dcfce7; color: #16a34a; }
.review-card__verdict--recycle { background: #fef3c7; color: #d97706; }
.review-card__verdict--kill { background: #fee2e2; color: #dc2626; }
.review-card__score {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}
.review-card__comment {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
}

/* ---------- Voting ---------- */
.voting-block { }
.voting-buttons { display: flex; gap: var(--space-3); }
.btn--vote {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px var(--space-5);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  border: 2px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  transition: all var(--transition);
  min-height: 44px;
}
.btn--vote:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-10); }
.btn--vote--active.btn--vote-up { border-color: #16a34a; color: #16a34a; background: #f0fdf4; }
.btn--vote--active.btn--vote-down { border-color: #dc2626; color: #dc2626; background: #fef2f2; }

/* ---------- Comments ---------- */
.comment-form { display: flex; flex-direction: column; gap: var(--space-3); }
.comment-item {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}
.comment-item:last-child { border-bottom: none; }
.comment-item__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.comment-item__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  font-size: var(--text-sm);
  flex-shrink: 0;
}
.comment-item__name {
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-sm);
  color: var(--color-heading);
}
.comment-item__date {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}
.comment-item__text {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
}

/* ---------- Legal Pages ---------- */
.legal-page { padding-bottom: var(--space-10); }
.legal-page__content {
  max-width: 800px;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
  color: var(--color-text);
}
.legal-page__content h2 {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  margin: var(--space-10) 0 var(--space-4);
  color: var(--color-heading);
}
.legal-page__content h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  margin: var(--space-6) 0 var(--space-3);
  color: var(--color-heading);
}
.legal-page__content p { margin-bottom: var(--space-4); }
.legal-page__content ul, .legal-page__content ol {
  margin: 0 0 var(--space-4) var(--space-6);
}
.legal-page__content li { margin-bottom: var(--space-2); }
.legal-page__content a { color: var(--color-primary); text-decoration: underline; }
.legal-page__content a:hover { text-decoration: none; }

.legal-table-wrap { overflow-x: auto; margin-bottom: var(--space-6); border-radius: var(--radius-sm); border: 1px solid var(--color-border); }
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.legal-table th {
  text-align: left;
  padding: 12px var(--space-4);
  font-weight: var(--font-weight-semibold);
  background: var(--color-bg-alt);
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}
.legal-table td {
  padding: 12px var(--space-4);
  border-bottom: 1px solid var(--color-border);
}
.legal-table tr:last-child td { border-bottom: none; }

/* ---------- FAQ ---------- */
.faq-category { margin-bottom: var(--space-10); }
.faq-category__title {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-4);
  color: var(--color-heading);
}
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: var(--space-2);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-item__question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: var(--space-4) var(--space-5);
  gap: var(--space-4);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-heading);
  font-family: inherit;
  line-height: var(--leading-snug);
  transition: background var(--transition);
}
.faq-item__question:hover { background: var(--color-bg-alt); }
.faq-item__icon {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--color-text-secondary);
}
.faq-item__question[aria-expanded="true"] .faq-item__icon { transform: rotate(180deg); }
.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 var(--space-5);
  color: var(--color-text);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}
.faq-item__answer--open {
  max-height: 600px;
  padding: 0 var(--space-5) var(--space-4);
}
.faq-item__answer p { margin-bottom: var(--space-3); }
.faq-item__answer ol { margin: 0 0 var(--space-3) var(--space-5); }
.faq-item__answer li { margin-bottom: var(--space-1); }
.faq-item__answer a { color: var(--color-primary); }

/* ---------- Consent Checkbox ---------- */
.form__group--consent { margin-top: var(--space-6); }
.form__checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
  line-height: var(--leading-normal);
}
.form__checkbox {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--color-primary);
  cursor: pointer;
}
.form__checkbox-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}
.form__checkbox-text a { color: var(--color-primary); text-decoration: underline; }
.form__checkbox-text a:hover { text-decoration: none; }

/* ---------- About Studio ---------- */
.about-studio { max-width: 800px; margin: 0 auto; text-align: center; }
.about-studio__text {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.about-studio__disclaimer {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-style: italic;
  margin-top: var(--space-4);
}
.stats__disclaimer {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-style: italic;
  margin-top: var(--space-5);
  text-align: center;
}

/* ---------- Steps (6-column variant) ---------- */
.steps--6 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Expandable Track (Stage-Gate) ---------- */
.track {
  display: flex;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}
.track__step {
  flex: 0 0 auto;
  width: calc(100% / 6);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--color-border);
  transition: all var(--transition-slow);
  overflow: hidden;
  cursor: pointer;
  background: var(--color-bg);
}
.track__step:last-child { border-right: none; }
.track__step:hover { background: var(--color-bg-alt); }
.track__step.is-active {
  width: 38%;
  background: linear-gradient(135deg, #F5F0FF 0%, #FAF8FF 100%);
}
.track__top {
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
  min-height: 120px;
  justify-content: center;
}
.track__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(107,33,168,0.2);
  flex-shrink: 0;
}
.track__num {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-primary-light);
  letter-spacing: 0.05em;
}
.track__title {
  font-size: 12px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  line-height: var(--leading-snug);
}
.track__detail {
  padding: 0 20px 20px;
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all var(--transition-slow);
}
.track__step.is-active .track__detail { opacity: 1; max-height: 120px; }
.track__bar { height: 4px; background: var(--color-border); margin-top: auto; }
.track__step.is-active .track__bar {
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
}

/* ---------- AI Mentor ---------- */
.ai-mentor { max-width: 700px; margin: 0 auto; }
.ai-mentor__content { text-align: center; }
.ai-mentor__text {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  margin-bottom: var(--space-6);
}
.ai-mentor__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  text-align: left;
  max-width: 480px;
  margin: 0 auto var(--space-8);
}
.ai-mentor__feature {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-base);
  color: var(--color-text);
}
.ai-mentor__feature svg { flex-shrink: 0; color: var(--color-primary); }

/* ---------- FAQ Home Block ---------- */
.faq-home { max-width: 700px; margin: 0 auto; }

/* ---------- Leaderboard Page ---------- */
.podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
  padding: var(--space-6) 0;
}
.podium__place {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 160px;
}
.podium__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: var(--font-weight-extrabold);
  color: #fff;
  margin-bottom: var(--space-2);
}
.podium__avatar--gold { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 4px 12px rgba(245,158,11,0.3); }
.podium__avatar--silver { background: linear-gradient(135deg, #9ca3af, #6b7280); }
.podium__avatar--bronze { background: linear-gradient(135deg, #d97706, #92400e); }
.podium__name { font-weight: var(--font-weight-bold); font-size: var(--text-sm); text-align: center; color: var(--color-heading); }
.podium__level { font-size: var(--text-xs); color: var(--color-text-secondary); margin: 2px 0; }
.podium__points { font-size: var(--text-md); font-weight: var(--font-weight-extrabold); color: var(--color-primary); margin-bottom: var(--space-2); }
.podium__bar {
  width: 100%;
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  border-radius: 8px 8px 0 0;
}
.podium__bar--gold { background: linear-gradient(to top, #f59e0b, #fbbf24); height: 80px; line-height: 80px; }
.podium__bar--silver { background: linear-gradient(to top, #6b7280, #9ca3af); height: 60px; line-height: 60px; }
.podium__bar--bronze { background: linear-gradient(to top, #92400e, #d97706); height: 48px; line-height: 48px; }

.lb-table { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--space-10); }
.lb-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 13px var(--space-5);
  border-radius: var(--radius);
  background: var(--color-bg);
  transition: background var(--transition);
  border: 1px solid transparent;
}
.lb-row:hover { background: var(--color-bg-alt); border-color: var(--color-border); }
.lb-row--top1 { background: #fffbeb; border-left: 3px solid #f59e0b; border-color: transparent; border-left-color: #f59e0b; }
.lb-row--top2 { background: #f9fafb; border-left: 3px solid #9ca3af; border-color: transparent; border-left-color: #9ca3af; }
.lb-row--top3 { background: #fff7ed; border-left: 3px solid #d97706; border-color: transparent; border-left-color: #d97706; }
.lb-row--me { background: var(--color-primary-10); border-left: 3px solid var(--color-primary); border-color: transparent; border-left-color: var(--color-primary); }
.lb-row__rank {
  width: 32px;
  text-align: center;
  font-weight: var(--font-weight-extrabold);
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  flex-shrink: 0;
}
.lb-row--top1 .lb-row__rank { color: #f59e0b; }
.lb-row--top2 .lb-row__rank { color: #6b7280; }
.lb-row--top3 .lb-row__rank { color: #d97706; }
.lb-row__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  font-size: var(--text-sm);
  flex-shrink: 0;
}
.lb-row__info { flex: 1; min-width: 0; }
.lb-row__name {
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-base);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-row__level { font-size: var(--text-xs); color: var(--color-text-secondary); margin-top: 1px; }
.lb-row__score {
  font-weight: var(--font-weight-bold);
  font-size: var(--text-md);
  color: var(--color-primary);
  white-space: nowrap;
}
.lb-row__score span { font-weight: var(--font-weight-normal); font-size: var(--text-sm); color: var(--color-text-secondary); }

/* ---------- Projects Filters ---------- */
.projects-filters {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}
.projects-filters__search { flex: 1; min-width: 200px; }
.projects-filters__search .form__input { margin-bottom: 0; }
.projects-count {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  align-items: center;
  margin-top: var(--space-10);
  flex-wrap: wrap;
}
.pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  transition: all var(--transition);
  text-decoration: none;
}
.pagination__link:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-10); }
.pagination__link--active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ---------- Files ---------- */
.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
  transition: all var(--transition);
  background: var(--color-bg);
}
.file-item:hover { border-color: var(--color-accent); background: var(--color-bg-alt); }
.file-item a { font-weight: var(--font-weight-medium); font-size: var(--text-sm); }
.file-upload { margin-top: var(--space-4); }

/* ---------- News ---------- */
.news-list { display: flex; flex-direction: column; gap: var(--space-6); }
.news-card {
  padding: var(--space-6);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.news-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}
.news-card__meta {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}
.news-card__title {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-snug);
}
.news-card__title a { color: var(--color-text); transition: color var(--transition); }
.news-card__title a:hover { color: var(--color-primary); }
.news-card__excerpt {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}
.news-card__link { font-size: var(--text-sm); font-weight: var(--font-weight-semibold); }
.news-article__content {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
}

/* ---------- Markdown content in news ---------- */
.news-article__content h1,
.news-article__content h2,
.news-article__content h3 {
  margin-top: 1.4em;
  margin-bottom: 0.5em;
}
.news-article__content ul,
.news-article__content ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}
.news-article__content a { color: var(--color-primary); text-decoration: underline; }
.news-article__content blockquote {
  border-left: 3px solid var(--color-primary);
  padding-left: var(--space-3);
  margin: 1em 0;
  color: var(--color-text-muted);
}
.news-article__content code {
  background: var(--color-bg-alt);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-size: 0.9em;
  font-family: var(--font-mono);
}
.news-article__content pre {
  background: var(--color-bg-alt);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  border: 1px solid var(--color-border);
}
.news-article__content pre code { background: none; padding: 0; }

/* ---------- Toast Notifications ---------- */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--color-neutral-900);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: toastSlideIn 0.3s ease-out;
  max-width: 360px;
}
.toast--success { background: #065f46; border-left: 3px solid var(--color-success); }
.toast--error { background: #7f1d1d; border-left: 3px solid var(--color-danger); }
.toast--warning { background: #78350f; border-left: 3px solid var(--color-warning); }
.toast--info { background: #1e3a5f; border-left: 3px solid var(--color-info); }

/* ---------- Badge / Tag ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.02em;
}
.badge--primary { background: #EDE9FE; color: var(--color-primary); }
.badge--success { background: var(--color-success-bg); color: #059669; }
.badge--warning { background: var(--color-warning-bg); color: #D97706; }
.badge--danger { background: var(--color-danger-bg); color: #DC2626; }
.badge--info { background: var(--color-info-bg); color: #2563EB; }
.badge--neutral { background: var(--color-neutral-100); color: var(--color-neutral-600); }

/* ---------- Divider ---------- */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-6) 0;
}

/* ---------- Mentor Chat ---------- */
.mentor-chat {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.mentor-chat__messages {
  height: 420px;
  min-height: 180px;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
  resize: vertical;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}
.mentor-chat__resize-hint {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  opacity: 0.5;
  margin-bottom: var(--space-2);
  user-select: none;
}
.mentor-msg {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  min-width: 0;
  animation: fadeIn 0.25s ease-out;
}
.mentor-msg--user { flex-direction: row-reverse; }
.mentor-msg__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  flex-shrink: 0;
  background: var(--color-primary);
  color: #fff;
}
.mentor-msg--user .mentor-msg__avatar {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.mentor-msg__bubble {
  padding: 12px var(--space-4);
  border-radius: var(--radius);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  max-width: 90%;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}
.mentor-msg--assistant .mentor-msg__bubble { max-width: 95%; }
.mentor-msg--user .mentor-msg__bubble { white-space: pre-wrap; }
.mentor-msg--assistant .mentor-msg__bubble {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--color-border);
}
.mentor-msg--user .mentor-msg__bubble {
  background: var(--color-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.mentor-chat__input {
  display: flex;
  gap: var(--space-2);
  align-items: flex-end;
}
.mentor-chat__input .form__textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 200px;
  overflow-y: auto;
  transition: height 0.1s ease;
  field-sizing: content;
}
.mentor-chat__input .btn { padding: 10px var(--space-4); flex-shrink: 0; align-self: flex-end; }

/* ---------- Agent avatar colors ---------- */
.mentor-msg__avatar--mentor { background: #7c3aed; color: #fff; }
.mentor-msg__avatar--assist { background: #2563eb; color: #fff; }
.mentor-msg__avatar--financial_analyst { background: #0891b2; color: #fff; }
.mentor-msg__avatar--lawyer { background: #4338ca; color: #fff; }
.mentor-msg__avatar--it_architect { background: #b45309; color: #fff; }
.mentor-msg__avatar--cto { background: #6b21a8; color: #fff; }
.mentor-msg__avatar--accountant { background: #0d9488; color: #fff; }
.mentor-msg__avatar--risk_manager { background: #dc2626; color: #fff; }
.mentor-msg__avatar--product_manager { background: #9333ea; color: #fff; }
.mentor-msg__avatar--market_researcher { background: #059669; color: #fff; }
.mentor-msg__avatar--critic { background: #e11d48; color: #fff; }
.mentor-msg__avatar--general_mentor { background: #7c3aed; color: #fff; }

/* ---------- Typing Indicator ---------- */
.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 11px var(--space-4) !important;
}
.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-text-secondary);
  opacity: 0.4;
  animation: typingBounce 1.4s infinite ease-in-out both;
}
.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ---------- Markdown in chat bubbles ---------- */
/* ── Chat markdown content styling ── */
.mentor-msg__bubble .md-content {
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--color-text);
}
.mentor-msg__bubble .md-content > *:first-child { margin-top: 0; }
.mentor-msg__bubble .md-content > *:last-child { margin-bottom: 0; }
.mentor-msg__bubble .md-content p {
  margin: 0 0 10px;
  line-height: 1.65;
}
.mentor-msg__bubble .md-content p:last-child { margin-bottom: 0; }
.mentor-msg__bubble .md-content h1,
.mentor-msg__bubble .md-content h2,
.mentor-msg__bubble .md-content h3,
.mentor-msg__bubble .md-content h4,
.mentor-msg__bubble .md-content h5,
.mentor-msg__bubble .md-content h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-snug);
  margin: var(--space-4) 0 var(--space-2);
  color: var(--color-text);
}
.mentor-msg__bubble .md-content h2 { font-size: 17px; }
.mentor-msg__bubble .md-content h3 { font-size: 15px; }
.mentor-msg__bubble .md-content h4 { font-size: 14px; }
.mentor-msg__bubble .md-content h5,
.mentor-msg__bubble .md-content h6 { font-size: 13px; }
.mentor-msg__bubble .md-content strong {
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}
.mentor-msg__bubble .md-content em { font-style: italic; }

/* Lists */
.mentor-msg__bubble .md-content ul,
.mentor-msg__bubble .md-content ol {
  margin: 8px 0;
  padding-left: 22px;
}
.mentor-msg__bubble .md-content ul { list-style: disc; }
.mentor-msg__bubble .md-content ol { list-style: decimal; }
.mentor-msg__bubble .md-content li {
  margin-bottom: 5px;
  line-height: 1.6;
  padding-left: 4px;
}
.mentor-msg__bubble .md-content li::marker {
  color: var(--color-primary-light);
}
.mentor-msg__bubble .md-content li > ul,
.mentor-msg__bubble .md-content li > ol {
  margin-top: 4px;
  margin-bottom: 4px;
}
.mentor-msg__bubble .md-content li > p {
  margin-bottom: 4px;
}

/* Links */
.mentor-msg__bubble .md-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mentor-msg__bubble .md-content a:hover {
  color: var(--color-primary-dark);
  text-decoration: none;
}
/* Blockquotes */
.mentor-msg__bubble .md-content blockquote {
  border-left: 3px solid var(--color-primary-light);
  margin: 12px 0;
  padding: 8px 14px;
  background: rgba(107, 33, 168, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-text-secondary);
}
.mentor-msg__bubble .md-content blockquote p { margin: 0 0 4px; }
.mentor-msg__bubble .md-content blockquote p:last-child { margin-bottom: 0; }

/* Inline code */
.mentor-msg__bubble .md-content code {
  background: rgba(107, 33, 168, 0.08);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-size: 0.88em;
  font-family: var(--font-mono);
  word-break: break-word;
}
/* Code blocks */
.mentor-msg__bubble .md-content pre {
  background: #1e1b2e;
  color: #e2e0ea;
  padding: 14px var(--space-4);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 12px 0;
  font-size: 13px;
  line-height: var(--leading-normal);
}
.mentor-msg__bubble .md-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  color: inherit;
  word-break: normal;
}

/* Code block container with language label */
.mentor-msg__bubble .md-content .md-code-block {
  position: relative;
  margin: 10px 0;
}
.mentor-msg__bubble .md-content .md-code-block .md-code-lang {
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.6;
}
.mentor-msg__bubble .md-content .md-code-block pre {
  margin: 0;
}

/* Tables — fully styled and scrollable */
.mentor-msg__bubble .md-content .md-table-wrap {
  overflow-x: auto;
  margin: 12px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  -webkit-overflow-scrolling: touch;
}
.mentor-msg__bubble .md-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.5;
  min-width: 300px;
}
.mentor-msg__bubble .md-content thead {
  background: var(--color-surface);
}
.mentor-msg__bubble .md-content th {
  text-align: left;
  padding: 10px 14px;
  font-weight: var(--font-weight-semibold);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--color-text-secondary);
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}
.mentor-msg__bubble .md-content td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  color: var(--color-text);
}
.mentor-msg__bubble .md-content tbody tr:last-child td {
  border-bottom: none;
}
.mentor-msg__bubble .md-content tbody tr:nth-child(even) {
  background: rgba(124, 58, 237, 0.02);
}
.mentor-msg__bubble .md-content tbody tr:hover td {
  background: rgba(124, 58, 237, 0.05);
}

/* Horizontal rules */
.mentor-msg__bubble .md-content hr {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-4) 0;
}

/* Images */
.mentor-msg__bubble .md-content img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 8px 0;
}

/* Strikethrough */
.mentor-msg__bubble .md-content del {
  text-decoration: line-through;
  opacity: 0.7;
}

/* Checkboxes */
.mentor-msg__bubble .md-content input[type="checkbox"] {
  margin-right: 6px;
  accent-color: var(--color-primary);
}

/* Numbered/emoji section headers (common in AI output) */
.mentor-msg__bubble .md-content p > strong:first-child:last-child {
  display: block;
  margin-top: 6px;
  margin-bottom: 2px;
  font-size: 14px;
}

/* ---------- Mentor Layout ---------- */
.mentor-layout {
  display: flex;
  gap: var(--space-4);
  min-height: 500px;
  min-width: 0;
}
.mentor-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.mentor-sidebar__header {
  padding: var(--space-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
}
.mentor-sidebar__title { font-weight: var(--font-weight-semibold); font-size: var(--text-sm); }
.mentor-sidebar__list { flex: 1; overflow-y: auto; }
.mentor-session {
  padding: 10px var(--space-3);
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}
.mentor-session:hover { background: var(--color-primary-10); }
.mentor-session--active {
  background: var(--color-primary-10);
  border-left: 3px solid var(--color-primary);
}
.mentor-session__name {
  font-weight: var(--font-weight-medium);
  font-size: var(--text-sm);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mentor-session__preview {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mentor-session__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 4px;
}
.mentor-session__actions { display: flex; gap: 2px; }
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--text-xs);
  padding: 2px 4px;
  border-radius: var(--radius-xs);
  opacity: 0.5;
  transition: opacity var(--transition);
}
.btn-icon:hover { opacity: 1; background: var(--color-border); }

/* ---------- Quick action buttons ---------- */
.mentor-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}
.mentor-msg__agent {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 4px;
  opacity: 0.9;
}

/* ---------- AI Content Assist Panel ---------- */
.ai-content-panel {
  margin-top: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  animation: fadeIn 0.2s ease-out;
}
.ai-content-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.ai-content-panel__actions .btn {
  font-size: var(--text-sm);
}
.ai-result-preview {
  line-height: var(--leading-relaxed);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ---------- Split Form (Submit page) ---------- */
.split-view {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-6);
  align-items: start;
}
.split-view__pane--form {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.split-form {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.split-form__title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-4);
  color: var(--color-heading);
}
.split-form .quill-editor {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}
.split-form .quill-editor:focus-within { border-color: var(--color-primary); }
.split-form .quill-editor .ql-toolbar {
  border: none;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  padding: 6px var(--space-2);
}
.split-form .quill-editor .ql-container {
  border: none;
  font-family: var(--font-family);
  font-size: var(--text-md);
  min-height: 120px;
}
.split-form .quill-editor .ql-editor {
  padding: 11px var(--space-4);
  line-height: var(--leading-relaxed);
}
.split-form .quill-editor .ql-editor.ql-blank::before {
  font-style: normal;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.split-form .quill-editor .ql-toolbar .ql-formats { margin-right: var(--space-2); }
.split-form .quill-editor .ql-toolbar button { width: 24px; height: 24px; }

.split-view__pane--chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.chat-pane { display: none; min-width: 0; }
.chat-pane--active { display: block; }

.split-form__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.split-form__badge {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-success);
  background: rgba(22, 163, 74, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
}

.readiness-panel {
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
}
.readiness-bar {
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.readiness-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-success));
  border-radius: 3px;
  transition: width 0.5s ease;
}
.readiness-info {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}
.readiness-missing {
  font-size: 11px;
  color: var(--color-text-muted);
  max-width: 60%;
  text-align: right;
}

.field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.btn-lock {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  opacity: 0.4;
  transition: opacity var(--transition);
}
.btn-lock:hover { opacity: 1; }
.form-field[data-locked="true"] {
  border-left: 3px solid var(--color-success);
  padding-left: var(--space-2);
  border-radius: 2px;
}
.form-field[data-locked="true"] .quill-editor {
  background: rgba(34, 197, 94, 0.03);
}
.form-field[data-locked="true"] .btn-lock { opacity: 1; }

.quill-editor {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  transition: border-color var(--transition);
}
.quill-editor:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(107,33,168,0.1);
}
.quill-editor--filled {
  border-color: var(--color-success);
  background: rgba(22, 163, 74, 0.03);
}

.drop-zone {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(107, 33, 168, 0.08);
  border: 3px dashed var(--color-primary);
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  pointer-events: none;
}
.drop-zone--active { display: flex; }

.form__input--filled {
  border-color: var(--color-success) !important;
  background: rgba(22, 163, 74, 0.03);
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  animation: fadeIn 0.2s ease-out;
}
.modal-content {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 700px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.25s ease-out;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 1;
}
.modal-header h3 { margin: 0; font-size: var(--text-lg); font-weight: var(--font-weight-bold); }
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--color-text-muted);
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { color: var(--color-text); background: var(--color-bg-alt); }
.modal-body {
  padding: var(--space-6);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}
.modal-body h4 { margin: var(--space-4) 0 var(--space-2); font-size: var(--text-base); font-weight: var(--font-weight-semibold); }
.modal-body ul { padding-left: var(--space-5); margin: var(--space-2) 0; }
.modal-body li { margin-bottom: var(--space-1); }
.modal-body pre { background: var(--color-bg-alt); padding: var(--space-3); border-radius: var(--radius-sm); overflow-x: auto; font-size: 13px; }

/* ---------- Kanban board ---------- */
.kanban-columns { display: flex; gap: var(--space-3); overflow-x: auto; padding-bottom: var(--space-2); }
.kanban-col {
  min-width: 180px;
  flex: 1;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.kanban-col__head {
  padding: 10px var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
}
.kanban-col__count {
  background: var(--color-border);
  padding: 1px 8px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
}
.kanban-col__cards { padding: var(--space-2); display: flex; flex-direction: column; gap: var(--space-2); }
.kanban-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px;
  transition: all var(--transition);
}
.kanban-card a { text-decoration: none; color: var(--color-text); }
.kanban-card:hover { box-shadow: var(--shadow-sm); border-color: var(--color-accent); }

/* ---------- Pairwise Voting ---------- */
.pairwise-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-6);
  align-items: stretch;
}
.pairwise-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: var(--font-weight-extrabold);
  color: var(--color-primary);
  background: var(--color-primary-10);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  align-self: center;
  margin: 0 auto;
  letter-spacing: -0.02em;
}
.pairwise-card {
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}
.pairwise-card:hover { border-color: var(--color-primary-light); box-shadow: var(--shadow-md); }
.pairwise-card__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-4); }
.pairwise-card__elo {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  background: var(--color-primary-10);
  padding: 4px var(--space-3);
  border-radius: var(--radius-full);
}
.pairwise-card__title {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-4);
  line-height: var(--leading-snug);
}
.pairwise-card__section {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-3);
}
.pairwise-card__section strong { color: var(--color-text); }
.pairwise-card__actions { margin-top: auto; padding-top: var(--space-5); display: flex; flex-direction: column; align-items: center; }

/* ---------- Cohort Cards ---------- */
.cohort-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-4); }
.cohort-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  transition: all var(--transition);
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.cohort-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-accent); transform: translateY(-2px); }
.cohort-card__name { font-size: var(--text-lg); font-weight: var(--font-weight-bold); margin-bottom: var(--space-2); }
.cohort-card__meta { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-3); }
.cohort-card__desc { font-size: var(--text-sm); color: var(--color-text-secondary); margin-bottom: var(--space-4); line-height: var(--leading-normal); word-wrap: break-word; overflow-wrap: break-word; }
.cohort-card__footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.cohort-card__count { font-size: var(--text-sm); font-weight: var(--font-weight-semibold); color: var(--color-primary); }
.cohort-status {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cohort-status--open { background: #D1FAE5; color: #059669; }
.cohort-status--screening { background: #FEF3C7; color: #D97706; }
.cohort-status--active { background: #EDE9FE; color: var(--color-primary); }
.cohort-status--completed { background: #F3F4F6; color: #6B7280; }

/* ---------- Cookie Banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--color-neutral-900);
  color: #fff;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  animation: slideUp 0.3s ease;
}
.cookie-banner__text { font-size: var(--text-sm); line-height: var(--leading-normal); max-width: 600px; }
.cookie-banner__text a { color: var(--color-accent); text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: var(--space-2); flex-shrink: 0; }
.cookie-banner__btn {
  padding: 8px var(--space-5);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}
.cookie-banner__btn--accept { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.cookie-banner__btn--accept:hover { background: var(--color-primary-light); }
.cookie-banner__btn--reject { background: transparent; color: #fff; border-color: rgba(255,255,255,0.3); }
.cookie-banner__btn--reject:hover { border-color: #fff; }

/* ---------- Language Switcher ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
}
.lang-switch__btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lang-switch__btn:hover { color: var(--color-primary); background: var(--color-primary-10); }
.lang-switch__btn--active { color: var(--color-primary); font-weight: var(--font-weight-bold); }

/* ---------- Mobile form toggle ---------- */
.mobile-form-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-sm);
  background: var(--color-primary-10);
  color: var(--color-primary);
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  font-family: inherit;
  cursor: pointer;
  min-height: 44px;
  transition: all var(--transition);
}
.mobile-form-toggle:active { background: var(--color-primary); color: #fff; }
.split-view__pane--collapsed { display: none !important; }

/* ============================================================
   Animations & Micro-interactions
   ============================================================ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}
@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.animate-fade-in { animation: fadeIn 0.35s ease-out both; }
.animate-fade-in-up { animation: fadeInUp 0.4s ease-out both; }
.animate-pulse { animation: pulse 1.5s ease-in-out infinite; }
.animate-scale-in { animation: scaleIn 0.25s ease-out both; }

/* Staggered animation for lists */
.animate-stagger > *:nth-child(1) { animation-delay: 0ms; }
.animate-stagger > *:nth-child(2) { animation-delay: 60ms; }
.animate-stagger > *:nth-child(3) { animation-delay: 120ms; }
.animate-stagger > *:nth-child(4) { animation-delay: 180ms; }
.animate-stagger > *:nth-child(5) { animation-delay: 240ms; }
.animate-stagger > *:nth-child(6) { animation-delay: 300ms; }

/* Scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Button interactions */
.btn { transition: all var(--transition); }
.btn:active { transform: scale(0.97); }

/* Card hover */
.card, .app-card, .agent-card, .mentor-session, .stat, .step, .news-card, .cohort-card {
  transition: all var(--transition);
}

/* Form focus transitions */
.form__input:focus, .form__textarea:focus, .form__select:focus,
.quill-editor:focus-within {
  transition: border-color 0.15s, box-shadow 0.15s;
}

/* Navbar link transitions */
.navbar__link { transition: color 0.15s, background 0.15s; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--color-neutral-100) 25%, var(--color-neutral-50) 50%, var(--color-neutral-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ============================================================
   Dark Theme
   ============================================================ */

[data-theme="dark"] {
    --color-bg: #0F0D1A;
    --color-bg-alt: #1A1726;
    --color-bg-card: #1E1B2E;
    --color-surface: #1E1B2E;
    --color-text: #E8E6F0;
    --color-text-secondary: #9CA3AF;
    --color-text-muted: #6B7280;
    --color-heading: #F3F2F8;
    --color-border: #2D2A3E;
    --color-neutral-100: #2D2A3E;
    --color-neutral-200: #3D3A50;
    --color-neutral-300: #4D4A60;
    --color-primary-10: rgba(168, 85, 247, 0.12);
    --navbar-bg: rgba(15, 13, 26, 0.92);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.5);
}

/* ---- Dark theme component overrides ---- */
[data-theme="dark"] .section__label {
  background: rgba(168, 85, 247, 0.2);
  color: var(--color-primary-light);
}
[data-theme="dark"] .footer {
  background: #0A0818;
  border-top-color: #2D2A3E;
}
[data-theme="dark"] .footer__brand-text { color: #E8E6F0; }
[data-theme="dark"] .footer__links a { color: #9CA3AF; }
[data-theme="dark"] .footer__links a:hover { color: var(--color-primary-light); }
[data-theme="dark"] .footer__copy { color: #6B7280; }
[data-theme="dark"] .text-gradient {
  background: linear-gradient(135deg, var(--color-primary-light) 0%, #E9D5FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #2D2A3E 25%, #1E1B2E 50%, #2D2A3E 75%);
  background-size: 200% 100%;
}
/* Badges and status labels with hardcoded light bg */
[data-theme="dark"] .card__status--submitted,
[data-theme="dark"] .badge--primary,
[data-theme="dark"] .cohort-status--active {
  background: rgba(168, 85, 247, 0.2);
  color: var(--color-primary-light);
}
[data-theme="dark"] .card__status--screening { background: rgba(59, 130, 246, 0.15); color: #93C5FD; }
[data-theme="dark"] .card__status--approved { background: rgba(16, 185, 129, 0.15); color: #6EE7B7; }
[data-theme="dark"] .card__status--rejected { background: rgba(239, 68, 68, 0.15); color: #FCA5A5; }
/* Form inputs */
[data-theme="dark"] .form__input,
[data-theme="dark"] .form__textarea,
[data-theme="dark"] .form__select {
  background: var(--color-bg-card);
  border-color: var(--color-border);
  color: var(--color-text);
}
[data-theme="dark"] .form__input::placeholder,
[data-theme="dark"] .form__textarea::placeholder {
  color: var(--color-text-muted);
}
/* Track card icons with inline styles need override */
[data-theme="dark"] .card__track-icon[style*="#f0fdf4"] { background: rgba(22, 163, 106, 0.12) !important; }
[data-theme="dark"] .card__track-icon[style*="#fef3c7"] { background: rgba(217, 119, 6, 0.12) !important; }
/* Leaderboard avatar */
[data-theme="dark"] .leaderboard__avatar {
  background: rgba(168, 85, 247, 0.2);
  color: var(--color-primary-light);
}

/* ============================================================
   Accessibility — WCAG AA
   ============================================================ */

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
:focus:not(:focus-visible) { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* Skip to main content */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-sm);
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ============================================================
   Responsive — Mobile First
   ============================================================ */

@media (max-width: 1200px) {
  .container { padding: 0 var(--space-5); }
  .split-view { grid-template-columns: 1fr 340px; }
}

@media (max-width: 1024px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps--6 { grid-template-columns: repeat(2, 1fr); }
  .cards--3 { grid-template-columns: repeat(2, 1fr); }
  .track { flex-wrap: wrap; }
  .track__step { width: calc(100% / 3) !important; border-bottom: 1px solid var(--color-border); }
  .track__step.is-active { width: calc(100% / 3) !important; }
  .hero__title { font-size: var(--text-5xl); }
  .analytics-charts { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .agents-grid { grid-template-columns: 1fr 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__columns { gap: var(--space-8); }
  .footer__copy { text-align: center; }
}

@media (max-width: 768px) {
  /* Navbar */
  .navbar__links {
    display: none;
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: var(--space-4) var(--space-6);
    gap: 2px;
    box-shadow: var(--shadow-md);
    z-index: 99;
  }
  .navbar__links--open { display: flex; }
  .navbar__actions { display: none; }
  .navbar__inner > .lang-switch { display: none; }
  .navbar__inner > .theme-toggle { display: none; }
  .navbar__mobile-controls {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding-top: var(--space-2);
  }
  .theme-toggle--mobile {
    display: inline-flex;
  }
  .navbar__mobile-auth {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding-top: var(--space-3);
    margin-top: var(--space-2);
    border-top: 1px solid var(--color-border);
  }
  .navbar__mobile-lang {
    display: inline-flex;
    gap: 2px;
    padding-top: var(--space-2);
  }
  .navbar__burger { display: block; }

  /* Hero */
  .hero { padding: 64px 0 52px; }
  .hero__title { font-size: 34px; }
  .hero__subtitle { font-size: var(--text-md); }

  /* Sections */
  .section { padding: var(--space-16) 0; }
  .section__title { font-size: var(--text-3xl); }
  .section__header { margin-bottom: var(--space-10); }

  /* Stats */
  .stats { grid-template-columns: 1fr 1fr; gap: var(--space-4); }

  /* Steps */
  .steps { grid-template-columns: 1fr; }
  .steps--6 { grid-template-columns: 1fr; }

  /* Cards */
  .cards { grid-template-columns: 1fr; }
  .cards--3 { grid-template-columns: 1fr; }

  /* Track */
  .track { flex-direction: column; border-radius: var(--radius-sm); }
  .track__step { width: 100% !important; border-right: none; border-bottom: 1px solid var(--color-border); }
  .track__step.is-active { width: 100% !important; }
  .track__top { flex-direction: row; text-align: left; min-height: auto; padding: var(--space-4); gap: var(--space-3); }
  .track__detail { padding: 0 var(--space-4) var(--space-4); }

  /* Footer */
  .footer { padding: var(--space-8) 0; }
  .footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
    text-align: center;
  }
  .footer__columns {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    width: 100%;
  }
  .footer__links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
  }
  .footer__copy { text-align: center; }

  /* Profile */
  .profile__header { flex-direction: column; text-align: center; }
  .profile__stats { grid-template-columns: 1fr; }

  /* Leaderboard */
  .leaderboard__row { padding: var(--space-3); gap: var(--space-3); }
  .leaderboard__avatar { width: 34px; height: 34px; font-size: var(--text-sm); }
  .leaderboard__name { font-size: var(--text-sm); }
  .leaderboard__points { font-size: var(--text-sm); }

  /* Admin */
  .admin-tabs { flex-wrap: wrap; }
  .admin-tab { padding: 9px var(--space-4); font-size: var(--text-sm); }
  .admin-panel__header { flex-direction: column; gap: var(--space-3); align-items: flex-start; }
  .admin-form__row { flex-direction: column; }
  .admin-filter { flex-direction: column; }
  .admin-table { font-size: var(--text-xs); }
  .admin-table th, .admin-table td { padding: 10px var(--space-2); }
  .agents-grid { grid-template-columns: 1fr; }
  .cohort-cards { grid-template-columns: 1fr; }
  .cohort-card { padding: var(--space-4); }
  .cohort-card__footer { flex-direction: column; gap: var(--space-2); align-items: flex-start; }

  /* CTA */
  .cta__title { font-size: var(--text-3xl); }
  .cta__text { font-size: var(--text-md); }

  /* Detail */
  .detail__title { font-size: var(--text-3xl); }
  .review-grid { grid-template-columns: 1fr; }
  .detail-tabs { overflow-x: auto; }
  .detail-tab { white-space: nowrap; padding: 9px var(--space-4); font-size: var(--text-sm); }
  .voting-buttons { flex-direction: column; }

  /* Leaderboard page */
  .podium { flex-direction: column; align-items: center; gap: var(--space-6); }
  .podium__place { width: 100%; max-width: 200px; }
  .podium__bar { height: 40px !important; line-height: 40px !important; }
  .lb-legend__items { grid-template-columns: repeat(2, 1fr); }
  .lb-row { padding: var(--space-3); gap: var(--space-3); }

  /* Split view */
  .split-view { grid-template-columns: 1fr; }
  .split-view__pane--form { position: static; max-height: none; }
  .mobile-form-toggle { display: flex; }

  /* Mentor */
  .mentor-layout { flex-direction: column; }
  .mentor-sidebar { width: 100%; max-height: 180px; }
  .mentor-chat__messages { height: 50vh; min-height: 150px; }
  .mentor-chat__resize-hint { display: none; }

  /* iOS zoom prevention */
  .form__input, .form__textarea, .form__select { font-size: 16px; }
  .split-form .form__input, .split-form .form__textarea { font-size: 16px; padding: 10px var(--space-3); }

  /* Apple HIG — min touch target 44px */
  .btn { min-height: 44px; }
  .btn--sm { min-height: 36px; }

  /* Pairwise */
  .pairwise-grid { grid-template-columns: 1fr; }
  .pairwise-vs { display: none; }
  /* Application cards */
  .app-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero__title { font-size: 28px; }
  .hero__actions { flex-direction: column; }
  .stat__number { font-size: var(--text-4xl); }
  .login-card { padding: var(--space-8) var(--space-6); }
  .container { padding: 0 var(--space-4); }

  .leaderboard__row { flex-wrap: wrap; }
  .leaderboard__info { min-width: 0; }

  .mentor-chat__input { gap: var(--space-1); }
  .mentor-chat__input .btn { padding: 10px var(--space-3); }
  .chat-mode-toggle__btn { font-size: var(--text-sm); padding: 6px 10px; }
  .split-form { padding: var(--space-4); }
  .split-form__title { font-size: var(--text-md); }

  .admin-form { padding: var(--space-5) var(--space-4); }
  .section__title { font-size: var(--text-2xl); }
  .hero__badge { font-size: var(--text-xs); }
}

@media (max-width: 320px) {
  .hero__title { font-size: 24px; }
  .hero__subtitle { font-size: var(--text-sm); }
  .stats { grid-template-columns: 1fr; }
  .btn--lg { padding: 13px var(--space-6); font-size: var(--text-base); }
}

/* ============================================================
   Utility Classes
   ============================================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.text-lg { font-size: var(--text-lg); }
.font-bold { font-weight: var(--font-weight-bold); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-medium { font-weight: var(--font-weight-medium); }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }

.w-full { width: 100%; }
.max-w-sm { max-width: 480px; }
.max-w-md { max-width: 640px; }
.max-w-lg { max-width: 800px; }
.mx-auto { margin-left: auto; margin-right: auto; }

.hidden { display: none !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: 0;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rounded { border-radius: var(--radius-sm); }
.rounded-full { border-radius: var(--radius-full); }
.border { border: 1px solid var(--color-border); }
.bg-alt { background: var(--color-bg-alt); }
.bg-card { background: var(--color-bg-card); }

.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }

/* ============================================================
   Submit Page — komanda.ai-inspired redesign
   ============================================================ */

/* ── Submit Hero ── */
.submit-hero {
  padding: var(--space-16) 0 var(--space-8);
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
  text-align: center;
}
.submit-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  max-width: 640px;
  margin: 0 auto;
}
.submit-hero__avatar-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  animation: scaleIn 0.4s ease-out;
}
.submit-hero__avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary-light);
  box-shadow: 0 0 0 6px rgba(107, 33, 168, 0.08), var(--shadow-md);
  transition: transform 0.3s ease;
}
.submit-hero__avatar-wrap:hover .submit-hero__avatar {
  transform: scale(1.05);
}
.submit-hero__status-dot {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-success);
  border: 3px solid var(--color-bg);
  animation: pulse 2s ease-in-out infinite;
}
.submit-hero__title {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-heading);
  letter-spacing: -0.02em;
  line-height: var(--leading-tight);
  margin: 0;
}
.submit-hero__subtitle {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 520px;
}

/* ── Action Cards ── */
.submit-actions {
  padding: 0 0 var(--space-12);
}
.action-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.action-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--color-bg-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  font-family: inherit;
  color: inherit;
  min-height: 140px;
}
.action-card:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.action-card:active {
  transform: translateY(-1px);
}
.action-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.action-card__icon--primary {
  background: rgba(107, 33, 168, 0.1);
  color: var(--color-primary);
}
.action-card__icon--blue {
  background: rgba(59, 130, 246, 0.1);
  color: #3B82F6;
}
.action-card__icon--green {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
}
.action-card__icon--amber {
  background: rgba(245, 158, 11, 0.1);
  color: #F59E0B;
}
.action-card__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.action-card__title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-heading);
  margin: 0;
}
.action-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  margin: 0;
}

/* ── Submit Input Bar (hero) ── */
.submit-input-bar {
  max-width: 720px;
  margin: 0 auto;
}
.submit-input-bar__inner {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-bg-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.submit-input-bar__inner:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.1), var(--shadow-sm);
}
.submit-input-bar__textarea {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  font-family: inherit;
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  padding: var(--space-2);
  min-height: 44px;
  max-height: 200px;
  background: transparent;
  color: var(--color-text);
}
.submit-input-bar__textarea::placeholder {
  color: var(--color-text-muted);
}
.submit-input-bar__actions {
  display: flex;
  gap: var(--space-1);
  align-items: center;
}
.submit-input-bar__btn {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all 0.2s;
}
.submit-input-bar__btn:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}
.submit-input-bar__send {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.submit-input-bar__send:hover {
  background: var(--color-primary-dark);
  transform: scale(1.05);
}

/* ── Recent Chats History ── */
.recent-chats {
  max-width: 720px;
  margin: var(--space-6) auto 0;
  animation: fadeIn 0.4s ease;
}
.recent-chats__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  padding: 0 var(--space-2);
}
.recent-chats__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.recent-chats__title svg {
  opacity: 0.6;
}
.recent-chats__all {
  font-size: var(--text-xs);
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.recent-chats__all:hover {
  color: var(--color-primary-light);
}
.recent-chats__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-alt, rgba(255,255,255,0.03));
  border: 1px solid var(--color-border);
}
.recent-chat {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
  cursor: pointer;
}
.recent-chat:hover {
  background: rgba(139, 92, 246, 0.08);
}
.recent-chat__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-primary-10, rgba(139, 92, 246, 0.1));
  color: var(--color-primary);
}
.recent-chat__body {
  flex: 1;
  min-width: 0;
}
.recent-chat__name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.recent-chat__preview {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  margin-top: 1px;
}
.recent-chat__meta {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.recent-chat__time {
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.recent-chat__count {
  font-size: 10px;
  color: var(--color-primary);
  background: var(--color-primary-10, rgba(139, 92, 246, 0.1));
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .recent-chats {
    margin-top: var(--space-4);
  }
  .recent-chat {
    padding: var(--space-2) var(--space-3);
  }
  .recent-chat__icon {
    width: 32px;
    height: 32px;
  }
}

/* ── Workspace Layout ── */
.submit-workspace {
  padding: 0;
  height: calc(100vh - var(--navbar-height, 72px));
  overflow: hidden;
}
.submit-workspace .container {
  max-width: 100%;
  padding: 0;
  height: 100%;
}
.workspace-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: 100%;
  overflow: hidden;
}
.workspace-layout--form-open {
  grid-template-columns: 240px 1fr 480px;
}

/* ── Workspace Sidebar ── */
.workspace-sidebar {
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}
.workspace-sidebar__header {
  padding: var(--space-3) var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
}
.workspace-sidebar__title {
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-sm);
  color: var(--color-heading);
}
.workspace-sidebar__list {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2) 0;
}
.workspace-sidebar__empty {
  padding: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-align: center;
}
.workspace-sidebar__back {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  border-top: 1px solid var(--color-border);
  transition: all 0.2s;
}
.workspace-sidebar__back:hover {
  color: var(--color-primary);
  background: var(--color-primary-10);
}

/* ── Session items ── */
.session-item {
  padding: 10px var(--space-4);
  cursor: pointer;
  transition: background 0.15s;
  border-left: 3px solid transparent;
}
.session-item:hover {
  background: var(--color-primary-10);
}
.session-item--active {
  background: var(--color-primary-10);
  border-left-color: var(--color-primary);
}
.session-item__name {
  font-weight: var(--font-weight-medium);
  font-size: var(--text-sm);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-heading);
}
.session-item__preview {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.session-item__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 4px;
}
.session-item__actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s;
}
.session-item:hover .session-item__actions {
  opacity: 1;
}

/* ── Workspace Chat ── */
.workspace-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-surface);
  overflow: hidden;
  position: relative;
}
.workspace-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  flex-shrink: 0;
  min-height: 48px;
}
.workspace-chat__header-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.workspace-chat__session-name {
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-sm);
  color: var(--color-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}
.workspace-chat__header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.workspace-chat__header-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all 0.2s;
  flex-shrink: 0;
}
.workspace-chat__header-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-10);
}
.workspace-chat__header-btn--active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-10);
}
.workspace-chat__messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-4);
  scroll-behavior: smooth;
}
.workspace-chat__input {
  display: flex;
  gap: var(--space-2);
  align-items: flex-end;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  flex-shrink: 0;
}
.workspace-chat__textarea {
  flex: 1;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px var(--space-4);
  font-family: inherit;
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  resize: none;
  min-height: 52px;
  max-height: 240px;
  overflow-y: auto;
  transition: border-color 0.2s;
  background: var(--color-bg-card);
  color: var(--color-text);
}
.workspace-chat__textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.08);
}
.workspace-chat__textarea::placeholder {
  color: var(--color-text-muted);
}
.workspace-chat__attach {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all 0.2s;
  flex-shrink: 0;
}
.workspace-chat__attach:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}
.workspace-chat__send {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.workspace-chat__send:hover {
  background: var(--color-primary-dark);
}
.workspace-chat__send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Agent Team Bar ── */
.agent-team-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  overflow-x: auto;
  flex-shrink: 0;
}
.agent-team-bar__label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  white-space: nowrap;
}
.agent-team-bar__chips {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}
.agent-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-bg-card);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  transition: all 0.2s;
  white-space: nowrap;
}
.agent-chip:hover {
  border-color: var(--color-primary-light);
  background: var(--color-primary-10);
}
.agent-chip--active {
  border-color: var(--color-primary);
  background: var(--color-primary-10);
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
  box-shadow: 0 0 0 2px var(--color-primary-10);
}
.agent-chip--leader {
  border-color: var(--color-primary-light);
  background: linear-gradient(135deg, var(--color-primary-10), transparent);
}
.agent-chip--leader.agent-chip--active {
  background: var(--color-primary-10);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}
.agent-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: box-shadow 0.3s;
}
.agent-chip__dot--pulse {
  animation: dotPulse 1.5s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; }
  50% { box-shadow: 0 0 0 4px transparent; }
}
.agent-chip--active .agent-chip__dot {
  box-shadow: 0 0 6px 1px currentColor;
}
.agent-chip__role {
  color: var(--color-text-muted);
  font-weight: var(--font-weight-normal);
}
.agent-chip--active .agent-chip__role {
  color: var(--color-primary);
}

/* ── Workspace Form ── */
.workspace-form {
  background: var(--color-bg-card);
  border-left: 1px solid var(--color-border);
  padding: var(--space-5);
  height: 100%;
  overflow-y: auto;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.workspace-form--collapsed {
  display: none !important;
}
.workspace-form .form {
  flex: 1;
  overflow-y: auto;
  padding-right: var(--space-2);
}
.workspace-form .form::-webkit-scrollbar {
  width: 5px;
}
.workspace-form .form::-webkit-scrollbar-track {
  background: transparent;
}
.workspace-form .form::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}
.workspace-form .form::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}
.workspace-form__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.workspace-form__header-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.workspace-form__title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-heading);
  margin: 0;
}
.workspace-form__badge {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-success);
  background: rgba(22, 163, 74, 0.1);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.workspace-form__toggle {
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all 0.2s;
}
.workspace-form__toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.workspace-form__toggle--flipped svg {
  transform: rotate(180deg);
}

/* ── Mentor msg avatar with image ── */
.mentor-msg__avatar img {
  border-radius: 50%;
  object-fit: cover;
}
.mentor-msg__avatar--user-styled {
  background: var(--color-bg-alt) !important;
  color: var(--color-text) !important;
  border: 1px solid var(--color-border);
  font-size: var(--text-xs);
}

/* ── Submit page responsive ── */
@media (max-width: 1400px) {
  .workspace-layout--form-open {
    grid-template-columns: 220px 1fr 420px;
  }
}

@media (max-width: 1200px) {
  .workspace-layout {
    grid-template-columns: 200px 1fr;
  }
  .workspace-layout--form-open {
    grid-template-columns: 200px 1fr 380px;
  }
  .action-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }
  .workspace-layout--form-open {
    grid-template-columns: 1fr;
  }
  .workspace-sidebar {
    display: none;
  }
  .workspace-form {
    position: fixed;
    top: var(--navbar-height, 72px);
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 90vw;
    z-index: 200;
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    border-left: 1px solid var(--color-border);
    background: var(--color-bg-card);
  }
  .workspace-form-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 199;
  }
}

@media (max-width: 768px) {
  .submit-hero {
    padding: var(--space-10) 0 var(--space-6);
  }
  .submit-hero__title {
    font-size: var(--text-2xl);
  }
  .submit-hero__avatar-wrap {
    width: 90px;
    height: 90px;
  }
  .submit-hero__avatar {
    width: 90px;
    height: 90px;
  }
  .action-cards {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }
  .action-card {
    min-height: 120px;
    padding: var(--space-4);
  }
  .action-card__icon {
    width: 40px;
    height: 40px;
  }
  .action-card__icon svg {
    width: 22px;
    height: 22px;
  }
  .workspace-form {
    width: 100%;
    max-width: 100vw;
  }
  .mobile-form-toggle {
    display: flex !important;
    position: fixed;
    bottom: var(--space-4);
    left: var(--space-4);
    right: var(--space-4);
    z-index: 100;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-sm);
    background: var(--color-bg-card);
    color: var(--color-primary);
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);
    font-family: inherit;
    cursor: pointer;
    box-shadow: var(--shadow-md);
  }
  .agent-team-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .workspace-chat__session-name {
    max-width: 150px;
  }
}

@media (max-width: 480px) {
  .action-cards {
    grid-template-columns: 1fr;
  }
  .submit-hero__title {
    font-size: var(--text-xl);
  }
  .submit-hero__subtitle {
    font-size: var(--text-sm);
  }
  .workspace-chat__input {
    padding: var(--space-2) var(--space-3);
  }
}

/* ── Form overlay (hidden by default) ── */
.workspace-form-overlay {
  display: none;
}

/* ── Custom scrollbar for chat messages ── */
.workspace-chat__messages::-webkit-scrollbar {
  width: 6px;
}
.workspace-chat__messages::-webkit-scrollbar-track {
  background: transparent;
}
.workspace-chat__messages::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}
.workspace-chat__messages::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* ============================================================
   Print Styles
   ============================================================ */

@media print {
  .navbar, .footer, .cookie-banner, .toast-container { display: none !important; }
  .container { max-width: 100%; padding: 0; }
  .card { break-inside: avoid; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 12px; color: #666; }
}

/* ============================================================
   Pipeline / Funnel — Redesigned Kanban (#225)
   ============================================================ */

/* --- Metrics bar --- */
.pipeline-metrics {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-5);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
  gap: var(--space-2);
}
.pipeline-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
  padding: var(--space-2) var(--space-3);
}
.pipeline-metric__num {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-primary);
  line-height: 1.1;
}
.pipeline-metric__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
  margin-top: 2px;
  white-space: nowrap;
}
.pipeline-metric--arrow {
  font-size: 20px;
  color: var(--color-neutral-300);
  min-width: auto;
  padding: 0 2px;
  flex-direction: row;
  align-items: center;
}
.pipeline-metric--success .pipeline-metric__num {
  color: var(--color-success);
}
.pipeline-metric--conversion {
  background: var(--color-primary-10);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-accent);
}
.pipeline-metric--conversion .pipeline-metric__num {
  color: var(--color-primary-dark);
}
.pipeline-metric--sep {
  width: 1px;
  height: 40px;
  background: var(--color-border);
  min-width: 1px;
  padding: 0;
  margin: 0 var(--space-2);
}

/* --- Filters bar --- */
.pipeline-filters {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
  align-items: center;
}

/* --- Board wrapper --- */
.kanban-board {
  overflow-x: auto;
  padding-bottom: var(--space-4);
}

/* --- Kanban columns --- */
.kanban-columns {
  display: flex;
  gap: var(--space-3);
  min-width: max-content;
  padding-bottom: var(--space-2);
}
.kanban-col {
  width: 220px;
  flex-shrink: 0;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
}
.kanban-col__head {
  padding: 10px var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-card);
  gap: var(--space-2);
}
.kanban-col__count {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  min-width: 24px;
  text-align: center;
}
.kanban-col__cards {
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
  min-height: 80px;
}

/* --- Kanban card --- */
.kanban-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 10px 8px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.kanban-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--color-accent);
}
.kanban-card__title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-snug);
}
.kanban-card__title a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition);
}
.kanban-card__title a:hover { color: var(--color-primary); }
.kanban-card__author {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 3px;
}
.kanban-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: 2px;
}
.kanban-card__scores {
  display: flex;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.kanban-card__scores span {
  display: flex;
  align-items: center;
  gap: 2px;
}
.kanban-card__date {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.kanban-card__footer {
  margin-top: 2px;
}
.kanban-card__cohort {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  background: var(--color-primary-10);
  color: var(--color-primary);
  letter-spacing: 0.02em;
}
.kanban-card__actions {
  margin-top: 4px;
}
.kanban-card__status-select {
  width: 100%;
  padding: 5px 8px !important;
  font-size: var(--text-xs) !important;
  min-height: auto !important;
  border-radius: var(--radius-xs) !important;
  cursor: pointer;
}

/* --- Empty states --- */
.kanban-empty-col {
  padding: var(--space-4) var(--space-3);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
}
.pipeline-empty {
  padding: var(--space-12) var(--space-8);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-base);
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  border: 1px dashed var(--color-border);
}
.pipeline-empty--error {
  color: var(--color-danger);
  border-color: var(--color-danger-bg);
  background: var(--color-danger-bg);
}
.pipeline-loading {
  padding: var(--space-12) var(--space-8);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .pipeline-metrics {
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
  }
  .pipeline-metric__num { font-size: var(--text-xl); }
  .pipeline-metric--sep { display: none; }
  .kanban-col { width: 180px; }
}
