/* ============================================================
   reMind Corporate Portal — Design System
   Apple-inspired dark theme with refreshed branding
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Custom Properties ──────────────────────────────── */
:root {
  /* Brand Colors */
  --brand-gold: #F5A623;
  --brand-gold-light: #FFD580;
  --brand-indigo: #6366F1;
  --brand-violet: #8B5CF6;
  --brand-teal: #06B6D4;
  --brand-emerald: #10B981;
  --brand-rose: #F43F5E;
  --brand-amber: #F59E0B;

  /* Surfaces — Dark (default) */
  --bg-primary: #0A0A0F;
  --bg-secondary: #111118;
  --bg-secondary-rgb: 17, 17, 24;
  --bg-tertiary: #1A1A24;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-strong: rgba(255, 255, 255, 0.08);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-accent: rgba(99, 102, 241, 0.3);

  /* Text */
  --text-primary: #F5F5F7;
  --text-secondary: rgba(245, 245, 247, 0.6);
  --text-tertiary: rgba(245, 245, 247, 0.4);
  --text-inverse: #0A0A0F;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #6366F1 0%, #8B5CF6 40%, #F5A623 100%);
  --gradient-gold: linear-gradient(135deg, #F5A623, #FFD580);
  --gradient-indigo: linear-gradient(135deg, #6366F1, #8B5CF6);
  --gradient-surface: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
  --gradient-glow: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(99, 102, 241, 0.06), transparent 40%);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.15);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 72px;
  --space-4xl: 120px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-pill: 9999px;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --sidebar-width: 260px;
  --sidebar-collapsed: 68px;
  --header-height: 64px;
  --content-max: 1200px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
}

/* ── Light Mode Theme ──────────────────────────────────── */
[data-theme="light"] {
  --bg-primary: #F8F9FC;
  --bg-secondary: #FFFFFF;
  --bg-secondary-rgb: 255, 255, 255;
  --bg-tertiary: #F0F1F5;
  --bg-card: rgba(0, 0, 0, 0.02);
  --bg-card-hover: rgba(0, 0, 0, 0.04);
  --bg-glass: rgba(0, 0, 0, 0.03);
  --bg-glass-strong: rgba(0, 0, 0, 0.06);

  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-medium: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.15);
  --border-accent: rgba(99, 102, 241, 0.25);

  --text-primary: #1A1A2E;
  --text-secondary: rgba(26, 26, 46, 0.6);
  --text-tertiary: rgba(26, 26, 46, 0.4);
  --text-inverse: #F5F5F7;

  --gradient-surface: linear-gradient(180deg, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0) 100%);
  --gradient-glow: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(99, 102, 241, 0.04), transparent 40%);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.08);
}

[data-theme="light"] .hero::before {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
}

[data-theme="light"] .timeline-dot {
  background: var(--bg-secondary);
}

[data-theme="light"] .nav-item.active {
  background: rgba(99, 102, 241, 0.08);
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: var(--brand-indigo);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--brand-violet); }

img { max-width: 100%; display: block; }

/* ── Typography Scale ───────────────────────────────────── */
.text-hero {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.text-h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.text-h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.text-h3 {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.text-body {
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-secondary);
}

.text-caption {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-tertiary);
}

.text-label {
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.text-gradient {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gold {
  color: var(--brand-gold);
}

/* ── Layout ─────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 12px;
  left: 12px;
  width: calc(var(--sidebar-width) - 24px);
  height: calc(100vh - 24px);
  background: rgba(var(--bg-secondary-rgb, 30,30,34), 0.75);
  backdrop-filter: blur(40px) saturate(1.8);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
  overflow-x: visible;
  overflow-y: visible;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05);
}

[data-theme="light"] .sidebar {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
}

.sidebar.collapsed {
  width: 68px;
}

.sidebar.collapsed .sidebar-brand,
.sidebar.collapsed .nav-group-label,
.sidebar.collapsed .sidebar-footer-text {
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.sidebar.collapsed .sidebar-header {
  justify-content: center;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.sidebar.collapsed .nav-item span:not(.nav-icon) {
  display: none;
}

.sidebar.collapsed .nav-item.active::before {
  left: 0;
}

.sidebar.collapsed + .main-content,
.sidebar.collapsed ~ .main-content {
  margin-left: var(--sidebar-collapsed);
}

.sidebar-header {
  padding: var(--space-lg) var(--space-lg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  position: relative; /* Added to anchor the collapse button */
}

[data-theme="light"] .sidebar-header {
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* ── Siri-Style Animated Brain Logo ─────────────────── */
.sidebar-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  /* Removed background and overflow:hidden to allow gradients to pop out */
  z-index: 1;
}

.sidebar-logo svg {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.sidebar-logo::before,
.sidebar-logo::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 40%;
  z-index: 0;
  opacity: 0.9;
  mix-blend-mode: screen;
  pointer-events: none;
}

.sidebar-logo::before {
  background: conic-gradient(from 0deg, #8B5CF6, #FF6B8A, transparent 60%);
  filter: blur(5px);
  animation: orbitSpin 3s linear infinite;
}

.sidebar-logo::after {
  background: conic-gradient(from 180deg, #007AFF, #5AC8FA, transparent 60%);
  filter: blur(5px);
  animation: orbitSpinReverse 4s linear infinite;
}

@keyframes orbitSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes orbitSpinReverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

.siri-orb {
  width: 36px;
  height: 36px;
  position: relative;
  filter: blur(3px) brightness(1.3);
  clip-path: url(#brain-clip);
}

.orb-layer {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
}

.orb-1 {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  background: radial-gradient(circle at 30% 30%, #ff00ff, #8b5cf6, #4f46e5);
  animation: orbFloat1 3s ease-in-out infinite;
}

.orb-2 {
  width: 70%;
  height: 70%;
  top: 15%;
  left: 20%;
  background: radial-gradient(circle at 70% 40%, #00ffff, #06b6d4, #3b82f6);
  animation: orbFloat2 4s ease-in-out infinite;
  opacity: 0.9;
}

.orb-3 {
  width: 60%;
  height: 60%;
  top: 25%;
  left: 5%;
  background: radial-gradient(circle at 40% 70%, #00ff88, #10b981, #06d6a0);
  animation: orbFloat3 5s ease-in-out infinite;
  opacity: 0.85;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(5px, -4px) scale(1.15); }
  66% { transform: translate(-4px, 5px) scale(0.9); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-6px, 4px) scale(1.2); }
  66% { transform: translate(4px, -5px) scale(0.85); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(4px, 6px) scale(1.1); }
  66% { transform: translate(-5px, -4px) scale(1.15); }
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-name {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.sidebar-brand-sub {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-sm) var(--space-sm);
  min-height: 0;
  direction: rtl; /* Move scrollbar to the left */
}

.sidebar-nav > * {
  direction: ltr; /* Reset content direction */
}

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { 
  background: var(--gradient-hero); 
  border-radius: 4px;
}

.nav-group {
  margin-bottom: var(--space-md);
}

.sidebar.collapsed .nav-group {
  margin-bottom: var(--space-xs);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

[data-theme="light"] .sidebar.collapsed .nav-group {
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.sidebar.collapsed .nav-group:last-child {
  border-bottom: none;
}

.sidebar.collapsed .sidebar-footer {
  display: none;
}

.nav-group-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-xs);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  user-select: none;
  position: relative;
}

.nav-item:hover {
  background: var(--bg-glass-strong);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.12);
  color: var(--brand-indigo);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--brand-indigo);
}

/* nav-icon base handled via SVG icon block below */

.sidebar-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-subtle);
}

.sidebar-footer-text {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  text-align: center;
  line-height: 1.5;
  transition: opacity var(--duration-normal) var(--ease-out);
}

/* ── Sidebar Toggle Button ─────────────────────────────── */
.sidebar-collapse-btn {
  position: absolute;
  bottom: -13px;
  right: -13px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  color: var(--text-tertiary);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 110;
  transition: all var(--duration-fast) var(--ease-out);
  box-shadow: var(--shadow-sm);
  opacity: 0;
}

.sidebar:hover .sidebar-collapse-btn,
.sidebar-collapse-btn:focus {
  opacity: 1;
}

.sidebar-collapse-btn:hover {
  background: var(--brand-indigo);
  color: white;
  border-color: var(--brand-indigo);
}

.sidebar.collapsed .sidebar-collapse-btn {
  opacity: 1;
  transform: rotate(180deg);
}

/* ── Theme Toggle ──────────────────────────────────────── */

.theme-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  transition: all 0.2s;
}
.theme-toggle:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--brand-indigo);
  transform: rotate(15deg);
}

.theme-toggle:hover {
  background: var(--bg-glass-strong);
  border-color: var(--border-strong);
  color: var(--text-primary);
  transform: scale(1.05);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform var(--duration-normal) var(--ease-out);
}

.theme-toggle:hover svg {
  transform: rotate(15deg);
}

.theme-icon-light,
.theme-icon-dark {
  display: none;
}

[data-theme="light"] .theme-icon-dark { display: block; }
[data-theme="light"] .theme-icon-light { display: none; }
html:not([data-theme="light"]) .theme-icon-light { display: block; }
html:not([data-theme="light"]) .theme-icon-dark { display: none; }

/* ── SVG Nav Icons ─────────────────────────────────────── */
.nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Section SVG Icons ─────────────────────────────────── */
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: var(--space-sm);
  vertical-align: middle;
}

.section-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Main Content ───────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.page-section {
  display: none;
  padding: var(--space-2xl) var(--space-2xl);
  max-width: var(--content-max);
  margin: 0 auto;
  animation: pageIn 0.4s var(--ease-out);
}

.page-section.active {
  display: block;
}

@keyframes pageIn {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-surface);
  pointer-events: none;
}

.card:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
}

/* Metric Cards (Home Dashboard) */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, var(--gradient-indigo));
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.metric-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.metric-card:hover::after {
  opacity: 1;
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
}

.metric-value {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.metric-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.metric-sublabel {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  margin-top: var(--space-xs);
}

/* ── Feature Grid ───────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: all var(--duration-normal) var(--ease-out);
}

.feature-card:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.feature-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Tables ─────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead {
  background: var(--bg-tertiary);
}

.data-table th {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: var(--space-md) var(--space-lg);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--bg-glass);
}

.data-table .text-strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Tags & Badges ──────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.tag-indigo {
  background: rgba(99, 102, 241, 0.12);
  color: var(--brand-indigo);
}

.tag-gold {
  background: rgba(245, 166, 35, 0.12);
  color: var(--brand-gold);
}

.tag-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: var(--brand-emerald);
}

.tag-rose {
  background: rgba(244, 63, 94, 0.12);
  color: var(--brand-rose);
}

.tag-teal {
  background: rgba(6, 182, 212, 0.12);
  color: var(--brand-teal);
}

/* ── Section Layout ─────────────────────────────────────── */
.section-header {
  margin-bottom: var(--space-2xl);
}

.section-header .text-label {
  margin-bottom: var(--space-sm);
}

.section-header .text-h1 {
  margin-bottom: var(--space-md);
}

.section-header .text-body {
  max-width: 640px;
}

.section-block {
  margin-bottom: var(--space-3xl);
}

.section-block-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-2xl) 0;
}

/* ── Accordion (Needs Page) ─────────────────────────────── */
.accordion {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid var(--border-subtle);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
  user-select: none;
}

.accordion-header:hover {
  background: var(--bg-glass);
}

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

.accordion-priority {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.accordion-title {
  font-weight: 600;
  font-size: 0.9375rem;
}

.accordion-chevron {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  transition: transform var(--duration-normal) var(--ease-out);
}

.accordion-item.open .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-out);
}

.accordion-body-inner {
  padding: 0 var(--space-xl) var(--space-xl) var(--space-xl);
}

.accordion-item.open .accordion-body {
  max-height: 800px;
}

/* ── Timeline ───────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: var(--space-2xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-subtle);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-2xl);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--space-2xl) + 8px);
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--brand-indigo);
  background: var(--bg-primary);
  z-index: 1;
}

.timeline-dot.active {
  background: var(--brand-indigo);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.timeline-phase {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-indigo);
  margin-bottom: var(--space-xs);
}

.timeline-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.timeline-content {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Hero Section ───────────────────────────────────────── */
.hero {
  position: relative;
  padding: var(--space-4xl) 0 var(--space-3xl);
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  letter-spacing: 0.01em;
}

.hero-tagline-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6), 0 0 16px rgba(16, 185, 129, 0.3);
  animation: taglinePulse 2.5s ease-in-out infinite;
}

@keyframes taglinePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(16, 185, 129, 0.6), 0 0 16px rgba(16, 185, 129, 0.3); }
  50% { opacity: 0.5; box-shadow: 0 0 4px rgba(16, 185, 129, 0.3), 0 0 8px rgba(16, 185, 129, 0.1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

/* ── Stat Banner ────────────────────────────────────────── */
.stat-banner {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  padding: var(--space-2xl) 0;
  margin-bottom: var(--space-2xl);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-value[style*="color"] {
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  background-clip: initial;
}

.stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-top: var(--space-xs);
}

/* ── Architecture Diagram ───────────────────────────────── */
.arch-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-2xl);
}

.arch-layer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.arch-node {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-medium);
  background: var(--bg-glass);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  min-width: 120px;
  transition: all var(--duration-normal) var(--ease-out);
}

.arch-node:hover {
  border-color: var(--brand-indigo);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-2px);
}

.arch-connector {
  width: 2px;
  height: 32px;
  background: var(--border-medium);
  position: relative;
}

.arch-connector::after {
  content: '▼';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.5rem;
  color: var(--text-tertiary);
}

/* ── Partner Tiers ──────────────────────────────────────── */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.partner-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: all var(--duration-normal) var(--ease-out);
}

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

.partner-category {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

/* ── Roadmap Steps ──────────────────────────────────────── */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.roadmap-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.roadmap-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, var(--gradient-indigo));
}

.roadmap-quarter {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

/* Generic bullet list */
.bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.bullet-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.bullet-list li::before {
  content: '•';
  position: absolute;
  left: 8px;
  color: var(--text-tertiary);
  font-size: 1.2rem;
}

/* Check list (for feature highlights) */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--brand-emerald);
  font-weight: 700;
}

.roadmap-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.roadmap-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.roadmap-items li {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.roadmap-items li::before {
  content: '→';
  color: var(--brand-indigo);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Scroll Animations ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Mobile Nav Toggle ──────────────────────────────────── */
.mobile-toggle {
  display: none;
  position: fixed;
  top: var(--space-md);
  left: var(--space-md);
  z-index: 200;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 90;
}

/* ── Page Header ────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-lg);
  margin-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--border-subtle);
}

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

.header-date {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* ── List Styles ────────────────────────────────────────── */
.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.check-list li::before {
  content: '✓';
  color: var(--brand-emerald);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Info Callout ───────────────────────────────────────── */
.callout {
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-lg) 0;
  border-left: 3px solid;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.callout-info {
  background: rgba(99, 102, 241, 0.06);
  border-color: var(--brand-indigo);
}

.callout-warning {
  background: rgba(245, 166, 35, 0.06);
  border-color: var(--brand-gold);
}

.callout-success {
  background: rgba(16, 185, 129, 0.06);
  border-color: var(--brand-emerald);
}

/* ── Team Card ──────────────────────────────────────────── */
.team-card {
  display: flex;
  gap: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
}

.team-avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-xl);
  background: var(--gradient-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
}

.team-info {
  flex: 1;
}

.team-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.team-role {
  font-size: 0.875rem;
  color: var(--brand-gold);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.team-bio {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Competitive Position Matrix ────────────────────────── */
.position-matrix {
  position: relative;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 1;
  margin: 0 auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
}

.matrix-axis-x, .matrix-axis-y {
  position: absolute;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.matrix-axis-x {
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
}

.matrix-axis-y {
  top: 50%;
  left: var(--space-md);
  transform: rotate(-90deg) translateX(-50%);
  transform-origin: left center;
}

.matrix-dot {
  position: absolute;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--duration-normal) var(--ease-out);
}

.matrix-dot:hover {
  transform: scale(1.1);
  z-index: 5;
}

.matrix-dot.self {
  background: var(--gradient-hero);
  color: white;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
  z-index: 3;
}

.matrix-dot.competitor {
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .stat-banner {
    gap: var(--space-xl);
    flex-wrap: wrap;
  }

  .stat-value {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-overlay.active {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .page-section {
    padding: var(--space-xl) var(--space-lg);
  }

  .hero {
    padding: var(--space-3xl) 0 var(--space-2xl);
  }

  .stat-banner {
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
  }

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

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

  .team-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ── Utility ────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.w-full { width: 100%; }

/* ── Counter Animation ──────────────────────────────────── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.counter-animate {
  animation: countUp 0.5s var(--ease-out) forwards;
}

/* ============================================================
   PREMIUM VISUAL POLISH
   ============================================================ */

/* ── Scroll Progress Bar ───────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--gradient-hero);
  z-index: 500;
  transition: width 50ms linear;
  border-radius: 0 2px 2px 0;
}

/* ── Animated Hero Gradient Mesh ───────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  animation: floatOrb 15s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-80px, 60px) scale(1.15); }
  66% { transform: translate(40px, -40px) scale(0.9); }
  100% { transform: translate(-30px, 80px) scale(1.1); }
}

/* Second orb for depth */
.hero::before {
  animation: floatOrb2 20s ease-in-out infinite alternate !important;
}

@keyframes floatOrb2 {
  0% { transform: translateX(-50%) translate(0, 0) scale(1); }
  50% { transform: translateX(-50%) translate(60px, -40px) scale(1.2); }
  100% { transform: translateX(-50%) translate(-40px, 30px) scale(0.95); }
}

/* ── Animated Hero Title Gradient ──────────────────────── */
.text-gradient {
  background-size: 200% 200%;
  animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ── Staggered Card Entrance ───────────────────────────── */
.feature-grid .feature-card,
.metric-grid .metric-card,
.partner-grid .partner-card,
.roadmap-grid .roadmap-card {
  opacity: 0;
  transform: translateY(20px);
  animation: cardReveal 0.5s var(--ease-out) forwards;
}

.feature-grid .feature-card:nth-child(1),
.metric-grid .metric-card:nth-child(1),
.partner-grid .partner-card:nth-child(1),
.roadmap-grid .roadmap-card:nth-child(1) { animation-delay: 0.05s; }

.feature-grid .feature-card:nth-child(2),
.metric-grid .metric-card:nth-child(2),
.partner-grid .partner-card:nth-child(2),
.roadmap-grid .roadmap-card:nth-child(2) { animation-delay: 0.1s; }

.feature-grid .feature-card:nth-child(3),
.metric-grid .metric-card:nth-child(3),
.partner-grid .partner-card:nth-child(3),
.roadmap-grid .roadmap-card:nth-child(3) { animation-delay: 0.15s; }

.feature-grid .feature-card:nth-child(4),
.metric-grid .metric-card:nth-child(4),
.partner-grid .partner-card:nth-child(4),
.roadmap-grid .roadmap-card:nth-child(4) { animation-delay: 0.2s; }

.feature-grid .feature-card:nth-child(5),
.metric-grid .metric-card:nth-child(5),
.partner-grid .partner-card:nth-child(5),
.roadmap-grid .roadmap-card:nth-child(5) { animation-delay: 0.25s; }

.feature-grid .feature-card:nth-child(6),
.metric-grid .metric-card:nth-child(6),
.partner-grid .partner-card:nth-child(6),
.roadmap-grid .roadmap-card:nth-child(6) { animation-delay: 0.3s; }

.feature-grid .feature-card:nth-child(n+7),
.metric-grid .metric-card:nth-child(n+7) { animation-delay: 0.35s; }

@keyframes cardReveal {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Shimmer Hover Border on Cards ─────────────────────── */
.metric-card,
.feature-card,
.partner-card,
.roadmap-card {
  position: relative;
  overflow: hidden;
}

.metric-card::before,
.feature-card::before,
.partner-card::before,
.roadmap-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent 30%, rgba(99, 102, 241, 0.3) 50%, transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
  pointer-events: none;
  background-size: 300% 300%;
  animation: shimmerBorder 3s linear infinite;
}

.metric-card:hover::before,
.feature-card:hover::before,
.partner-card:hover::before,
.roadmap-card:hover::before {
  opacity: 1;
}

@keyframes shimmerBorder {
  0% { background-position: 100% 0%; }
  100% { background-position: -100% 0%; }
}

/* ── Enhanced Page Transition ──────────────────────────── */
@keyframes pageIn {
  0% { opacity: 0; transform: translateY(16px) scale(0.995); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.page-section.active {
  animation: pageIn 0.5s var(--ease-out);
}

/* ── Stat Banner Glow ──────────────────────────────────── */
.stat-item {
  position: relative;
}

.stat-value {
  position: relative;
  filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.15));
}

/* ── Enhanced Metric Cards ─────────────────────────────── */
.metric-card:hover .metric-icon {
  transform: scale(1.1) rotate(-3deg);
  transition: transform 0.3s var(--ease-spring);
}

.metric-icon {
  transition: transform 0.3s var(--ease-out);
}

.metric-card:hover .metric-value {
  transform: scale(1.02);
}

.metric-value {
  transition: transform 0.2s var(--ease-out);
}

/* ── Accordion Smooth Height ───────────────────────────── */
.accordion-item {
  transition: background var(--duration-fast) var(--ease-out);
}

.accordion-item.open {
  background: var(--bg-glass);
}

.accordion-chevron {
  transition: transform var(--duration-normal) var(--ease-spring);
}

/* ── Enhanced Table Row Hover ──────────────────────────── */
.data-table tbody tr {
  transition: background var(--duration-fast) var(--ease-out);
}

.data-table tbody tr:hover {
  background: var(--bg-glass-strong);
}

/* ── Tag Hover Pop ─────────────────────────────────────── */
.tag {
  transition: transform var(--duration-fast) var(--ease-spring),
              box-shadow var(--duration-fast) var(--ease-out);
}

.tag:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-sm);
}

/* ── Sidebar Nav Item Enhanced ─────────────────────────── */
.nav-item {
  transition: all var(--duration-fast) var(--ease-out);
}

.nav-item .nav-icon svg {
  transition: transform var(--duration-fast) var(--ease-spring);
}

.nav-item:hover .nav-icon svg {
  transform: scale(1.15);
}

.nav-item.active .nav-icon svg {
  transform: scale(1.1);
}

/* ── Team Avatar Glow ──────────────────────────────────── */
.team-avatar {
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.25);
  transition: box-shadow var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}

.team-card:hover .team-avatar {
  box-shadow: 0 0 50px rgba(99, 102, 241, 0.35);
  transform: scale(1.05);
}

/* ── Architecture Diagram Pulse ────────────────────────── */
.arch-node {
  transition: all var(--duration-normal) var(--ease-out);
}

.arch-node:hover {
  border-color: var(--brand-indigo);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

/* ── Callout Left Border Glow ──────────────────────────── */
.callout-info { box-shadow: -4px 0 12px -4px rgba(99, 102, 241, 0.15); }
.callout-warning { box-shadow: -4px 0 12px -4px rgba(245, 166, 35, 0.15); }
.callout-success { box-shadow: -4px 0 12px -4px rgba(16, 185, 129, 0.15); }

/* ── Hero Tagline Pulse ────────────────────────────────── */
.hero-tagline {
  animation: taglinePulse 4s ease-in-out infinite;
}

@keyframes taglinePulse {
  0%, 100% { border-color: var(--border-medium); }
  50% { border-color: rgba(99, 102, 241, 0.3); }
}

/* ── Timeline Dot Pulse ────────────────────────────────── */
.timeline-dot.active {
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 0 24px rgba(99, 102, 241, 0.6); }
}

/* ── Glassmorphism Card Enhanced ────────────────────────── */
.card-glass {
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
  transition: box-shadow var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}

.card-glass:hover {
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08),
              var(--shadow-md);
  transform: translateY(-2px);
}

/* ── Keyboard Hint ─────────────────────────────────────── */
.kbd-hint {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  z-index: 50;
  opacity: 0;
  animation: fadeInHint 1s 3s forwards;
  pointer-events: none;
}

@keyframes fadeInHint {
  to { opacity: 0.6; }
}

/* ── Smooth Body Transition for Theme ──────────────────── */
body, .sidebar, .main-content, .metric-card, .feature-card,
.partner-card, .roadmap-card, .card-glass, .data-table,
.accordion, .callout, .team-card, .timeline-dot {
  transition: background var(--duration-normal) var(--ease-out),
              color var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

/* ── Selection Color ──────────────────────────────────── */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: var(--text-primary);
}

/* ── Focus Visible ─────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--brand-indigo);
  outline-offset: 2px;
}

/* ── Scrollbar Styling ─────────────────────────────────── */
.main-content::-webkit-scrollbar { width: 6px; }
.main-content::-webkit-scrollbar-track { background: transparent; }
.main-content::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 3px;
}
.main-content::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong);
}

/* ── Accordion ──────────────────────────────────────── */
.accordion { display: flex; flex-direction: column; gap: 2px; }
.accordion-item { background: var(--surface-secondary); border-radius: 12px; overflow: hidden; border: 1px solid var(--border-primary); }
.accordion-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; cursor: pointer; font-weight: 600; font-size: 0.95rem;
  color: var(--text-primary); transition: background 0.2s;
}
.accordion-header:hover { background: var(--surface-tertiary); }
.accordion-chevron { font-size: 0.7rem; transition: transform 0.3s ease; color: var(--text-tertiary); }
.accordion-item.open .accordion-chevron { transform: rotate(180deg); }
.accordion-content {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 20px;
}
.accordion-item.open .accordion-content {
  max-height: 3000px; padding: 12px 20px 24px;
}

/* ── Form Elements ──────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--text-primary); margin-bottom: 8px; }
.form-input, .form-textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border-primary);
  border-radius: 8px; background: var(--surface-primary); color: var(--text-primary);
  font-size: 0.9rem; font-family: inherit; transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.form-input:focus, .form-textarea:focus {
  outline: none; border-color: var(--brand-indigo);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.form-textarea { resize: vertical; min-height: 60px; }
.radio-group, .checkbox-group { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 4px; }
.radio-group label, .checkbox-group label {
  display: flex; align-items: center; gap: 6px; font-size: 0.85rem;
  color: var(--text-secondary); cursor: pointer; padding: 6px 12px;
  border-radius: 8px; border: 1px solid var(--border-primary); transition: all 0.2s;
  background: var(--surface-primary);
}
.radio-group label:hover, .checkbox-group label:hover {
  border-color: var(--brand-indigo); background: var(--surface-tertiary);
}
.radio-group input[type="radio"]:checked + span,
.checkbox-group input[type="checkbox"]:checked + span { font-weight: 600; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; height: 6px;
  border-radius: 3px; background: var(--border-primary); outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px;
  border-radius: 50%; background: var(--brand-indigo); cursor: pointer;
  border: 2px solid var(--surface-primary); box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.mb-sm { margin-bottom: 8px; }
.mt-sm { margin-top: 8px; }

/* ── Callout Success ────────────────────────────────── */
.callout-success {
  background: rgba(16,185,129,0.08); border-left: 4px solid var(--brand-emerald);
}
[data-theme="light"] .callout-success {
  background: rgba(16,185,129,0.06);
}

/* ── Check List ─────────────────────────────────────── */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  position: relative; padding-left: 24px; margin-bottom: 8px;
  font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5;
}
.check-list li::before {
  content: '✓'; position: absolute; left: 0; color: var(--brand-emerald); font-weight: 700;
}

/* ── Cross List (Red X) ────────────────────────────── */
.cross-list { list-style: none; padding: 0; margin: 0; }
.cross-list li {
  position: relative; padding-left: 24px; margin-bottom: 8px;
  font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5;
}
.cross-list li::before {
  content: '✕'; position: absolute; left: 0; color: var(--brand-rose); font-weight: 700;
}

/* ── Print Styles ──────────────────────────────────────── */
@media print {
  .sidebar, .mobile-toggle, .mobile-overlay, .theme-toggle,
  .sidebar-collapse-btn, .scroll-progress, .kbd-hint,
  .comment-fab, .comment-panel, .comment-overlay { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .page-section { display: block !important; page-break-before: always; }
  .page-section:first-child { page-break-before: avoid; }
  body { background: white; color: black; }
}

/* ── Comment System ─────────────────────────────────── */
.comment-fab { display: none !important;
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(var(--bg-secondary-rgb), 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}
.comment-fab:hover {
  background: var(--brand-indigo);
  color: white;
  border-color: var(--brand-indigo);
  transform: scale(1.1);
}
.comment-count {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-rose);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
}

.comment-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.comment-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.comment-panel {
  position: fixed;
  top: 12px;
  right: -400px;
  width: 380px;
  height: calc(100vh - 24px);
  background: rgba(var(--bg-secondary-rgb), 0.85);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: right 0.35s var(--ease-out);
  box-shadow: -8px 0 32px rgba(0,0,0,0.3);
}
[data-theme="light"] .comment-panel {
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: -8px 0 32px rgba(0,0,0,0.08);
}
.comment-panel.open {
  right: 12px;
}

.comment-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
[data-theme="light"] .comment-panel-header {
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.comment-panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.comment-panel-close {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.comment-panel-close:hover { color: var(--brand-rose); }

.comment-thread {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  min-height: 0;
}

.comment-empty {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  padding: 40px 0;
}

.comment-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
[data-theme="light"] .comment-item {
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.comment-meta strong {
  font-size: 0.85rem;
  color: var(--text-primary);
}
.comment-time {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}
.comment-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.comment-reply {
  margin-left: 16px;
  padding: 8px 0 8px 12px;
  border-left: 2px solid var(--brand-indigo);
  margin-top: 8px;
}
.comment-reply-btn {
  background: none;
  border: none;
  color: var(--brand-indigo);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  padding: 0;
}
.comment-reply-btn:hover { text-decoration: underline; }

.comment-form {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
[data-theme="light"] .comment-form {
  border-top: 1px solid rgba(0,0,0,0.06);
}
.comment-author {
  padding: 8px 12px;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  background: var(--surface-primary, var(--bg-primary));
  color: var(--text-primary);
  font-size: 0.8rem;
  font-family: inherit;
}
.comment-input {
  padding: 8px 12px;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  background: var(--surface-primary, var(--bg-primary));
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
}
.comment-author:focus, .comment-input:focus {
  outline: none;
  border-color: var(--brand-indigo);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.comment-submit {
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: var(--brand-indigo);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.comment-submit:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

/* Core Capabilities Modal */
.interactive-card {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.interactive-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.15);
}
.interactive-card::after {
  content: "Click to read more";
  position: absolute;
  top: 1.5rem; right: 24px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--brand-emerald);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.2s ease;
}
.interactive-card:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Content Box */
.modal-content-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 24px;
  width: 90%;
  max-width: 600px;
  padding: 40px;
  position: relative;
  transform: scale(0.95) translateY(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05) inset, 0 32px 80px -16px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  gap: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.modal-overlay.active .modal-content-box {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  background: var(--bg-glass);
  border: none;
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.modal-close-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
  transform: rotate(90deg);
}
.modal-close-btn svg {
  width: 20px;
  height: 20px;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
.modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
}
.modal-icon svg {
  width: 24px; height: 24px; stroke-width: 2;
}
.modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0;
}
.modal-body {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
}
.modal-body p {
  margin-bottom: 16px;
}
.modal-body p:last-child {
  margin-bottom: 0;
}
.modal-impact {
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid var(--brand-emerald);
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  margin-top: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ── Premium Master-Level Overrides ─────────────────────── */

/* Refined Data Tables */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 1.5rem;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.data-table thead th {
  background: var(--bg-glass);
  color: var(--text-tertiary);
  font-size: 0.70rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.data-table tbody tr {
  transition: background 0.2s ease;
}
.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.015);
}
.data-table tbody td {
  padding: 1.25rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.925rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  line-height: 1.5;
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}
.data-table .text-strong {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Premium Mode Cards (Decline Adaptation) */
.mode-card {
  background: rgba(255, 255, 255, 0.015);
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}
.mode-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--mode-color, rgba(255,255,255,0.1)), transparent);
  opacity: 0.6;
}
.mode-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  border-color: rgba(255, 255, 255, 0.08);
}
.mode-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.75rem;
}
.mode-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--mode-color);
  box-shadow: 0 0 10px var(--mode-color);
}
.mode-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.mode-quote {
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1.5rem;
  padding-left: 14px;
  border-left: 2px solid rgba(255,255,255,0.08);
}
.mode-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ──────────────────────────────────────────────────────
   COMMENTS & FEEDBACK DRAWER
   ────────────────────────────────────────────────────── */
.comments-fab {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-indigo), var(--brand-violet));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.comments-fab:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.6);
}

.comments-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100vh;
  background: var(--bg-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid var(--border-color);
  z-index: 1001;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0,0,0,0.2);
}

.comments-drawer.open {
  right: 0;
}

[data-theme="light"] .comments-drawer {
  background: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .comments-drawer {
  background: rgba(15, 15, 20, 0.9);
}

.drawer-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-title {
  font-size: 1.25rem;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.drawer-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

[data-theme="light"] .drawer-close:hover { background: rgba(0, 0, 0, 0.05); }

.drawer-context {
  padding: 1rem 1.5rem;
  background: rgba(99, 102, 241, 0.05);
  border-bottom: 1px solid var(--border-color);
}

.context-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-indigo);
  margin-bottom: 4px;
  font-weight: 700;
}



.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.comment-card {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  position: relative;
}

.comment-card::before {
  content: "";
  position: absolute;
  top: 1.25rem;
  left: -1px;
  width: 3px;
  height: 20px;
  background: var(--brand-indigo);
  border-radius: 0 4px 4px 0;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.8rem;
}

.comment-author {
  font-weight: 600;
  color: var(--text-primary);
}

.comment-tag {
  background: rgba(99, 102, 241, 0.1);
  color: var(--brand-indigo);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.7rem;
}

.comment-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.drawer-footer textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-primary);
  resize: vertical;
  min-height: 80px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  margin-bottom: 12px;
}

.drawer-footer textarea:focus {
  border-color: var(--brand-indigo);
}

.btn-submit-note {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--brand-indigo);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-submit-note:hover {
  background: #4F46E5;
}

/* ──────────────────────────────────────────────────────
   SECURITY AUTH PORTAL
   ────────────────────────────────────────────────────── */
#auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-main);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
}

#auth-overlay.unlocked {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 3.5rem 2.5rem;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: authFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes authFadeUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

.auth-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.auth-logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
  line-height: 1.5;
}

.auth-key-container {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2rem;
}

.auth-key-box {
  width: 100%;
  height: 52px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.2s;
  outline: none;
}

.auth-key-box:focus {
  border-color: var(--brand-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn-auth {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  background: var(--brand-indigo);
  color: white;
  border: none;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  letter-spacing: 0.5px;
}

.btn-auth:hover {
  background: #4F46E5;
  transform: translateY(-2px);
}

.btn-auth:active {
  transform: translateY(0);
}

.auth-error {
  color: var(--brand-rose);
  font-size: 0.85rem;
  margin-top: 1rem;
  min-height: 20px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s;
}

.auth-error.visible {
  opacity: 1;
}

/* Guest Blur Effect */
body.guest-mode .text-gradient.sensitive,
body.guest-mode .stat-value,
body.guest-mode .feature-desc.sensitive,
body.guest-mode td.sensitive,
body.guest-mode .pricing-amount {
  filter: blur(8px);
  user-select: none;
  pointer-events: none;
  transition: filter 0.8s ease;
}
\n
.fab-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 20px;
  border: 2px solid var(--brand-indigo);
  opacity: 0;
  animation: pulseRing 2.5s cubic-bezier(0.21, 0.53, 0.56, 0.8) infinite;
  pointer-events: none;
}

@keyframes pulseRing {
  0% { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}


/* ──────────────────────────────────────────────────────
   PREMIUM CHAT TEXTAREA
   ────────────────────────────────────────────────────── */
#comment-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  resize: none;
  height: 80px;
  margin-bottom: 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}
#comment-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--brand-indigo);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2), 0 0 0 3px rgba(99, 102, 241, 0.2);
}
#comment-input::placeholder {
  color: var(--text-tertiary);
  font-weight: 400;
}
.drawer-footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 24px 24px 24px;
  background: var(--bg-glass-strong);
  border-top: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.drawer-content {
  height: calc(100vh - 220px);
  padding-bottom: 20px;
}


.single-box {
  width: 100% !important;
  max-width: 320px;
  letter-spacing: 4px;
  font-size: 1.2rem;
  padding: 14px 20px;
}

/* ──────────────────────────────────────────────────────
   SHARE SELECT DROPDOWN
   ────────────────────────────────────────────────────── */
.share-toggle-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 0.8rem;
  padding: 8px 12px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2024%2024%20%22%20fill%3D%22none%22%20stroke%3D%22%239BA3AF%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
  transition: all 0.2s ease;
}
.share-toggle-select:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.share-toggle-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}


/* ──────────────────────────────────────────────────────
   PREMIUM SELECT DROPDOWNS (Context & Share)
   ────────────────────────────────────────────────────── */
.context-select, .share-toggle-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  padding: 10px 14px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%239BA3AF%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  margin-top: 8px;
}
.context-select:hover, .share-toggle-select:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}
.context-select:focus, .share-toggle-select:focus {
  border-color: var(--brand-indigo);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1), 0 0 0 2px rgba(99, 102, 241, 0.2);
}
.context-select option, .share-toggle-select option {
  background: #1E1E24;
  color: #FFFFFF;
}
.share-toggle-select {
  width: auto;
  font-size: 0.85rem;
  padding: 8px 12px;
  padding-right: 32px;
  margin-top: 0;
}

/* ──────────────────────────────────────────────────────
   INTELLIGENCE DROPZONE (Sidebar)
   ────────────────────────────────────────────────────── */
.sidebar-dropzone {
  margin: 0 24px 16px 24px;
  padding: 14px 16px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}
.sidebar-dropzone:hover, .sidebar-dropzone.drag-active {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}
.sidebar-dropzone.drag-active::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  box-shadow: inset 0 0 0 2px var(--brand-indigo);
  border-radius: 12px;
  pointer-events: none;
}
.sidebar-dropzone.assessing {
  background: rgba(250, 204, 21, 0.1);
  border-color: var(--brand-gold);
}
.sidebar-dropzone.assessing .dropzone-icon svg {
  animation: spin 2s linear infinite;
  stroke: var(--brand-gold);
}
.dropzone-icon {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s;
}
.sidebar-dropzone:hover .dropzone-icon {
  color: var(--brand-indigo);
}
.dropzone-text {
  display: flex;
  flex-direction: column;
}
.dropzone-title {
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}
.dropzone-sub {
  font-family: var(--font-primary);
  font-size: 0.70rem;
  color: var(--text-secondary);
  opacity: 0.8;
}

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

/* ═══════════════════════════════════════════════════════════
   CITATION SYSTEM — In-Text References
   ═══════════════════════════════════════════════════════════ */

@keyframes citeShimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.cite-ref {
  display: inline;
  font-size: 0.7em;
  font-weight: 800;
  vertical-align: super;
  line-height: 1;
  padding: 1px 4px;
  margin: 0 1px;
  border-radius: 4px;
  background: linear-gradient(
    120deg,
    var(--brand-indigo) 0%,
    var(--brand-violet) 25%,
    var(--brand-rose) 50%,
    var(--brand-violet) 75%,
    var(--brand-indigo) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  animation: citeShimmer 4s linear infinite;
  transition: all 0.2s ease;
}

.cite-ref:hover {
  animation: citeShimmer 1s linear infinite;
  transform: scale(1.15);
  filter: brightness(1.3);
}

/* Citation tooltip */
.cite-tooltip {
  position: fixed;
  z-index: 9999;
  width: 360px;
  max-width: 90vw;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 30px rgba(99, 102, 241, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cite-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.cite-tooltip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--brand-indigo), var(--brand-violet), var(--brand-rose));
}

.cite-tooltip-ref {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--brand-indigo), var(--brand-violet));
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  margin-right: 10px;
  flex-shrink: 0;
}

.cite-tooltip-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 10px;
}

.cite-tooltip-authors {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.cite-tooltip-year {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--brand-indigo);
  margin-left: 6px;
}

.cite-tooltip-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.cite-tooltip-brief {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.cite-tooltip-action {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--brand-indigo);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

/* Source table badge */
.cite-ref-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-indigo), var(--brand-violet));
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
}

/* Tag violet for therapeutic framework category */
.tag-violet {
  background: rgba(139, 92, 246, 0.12);
  color: var(--brand-violet);
}

.tag-teal {
  background: rgba(6, 182, 212, 0.12);
  color: var(--brand-teal, #06B6D4);
}
