/* ==========================================================================
   AgentFxTrading - Design System & Modern Trading Dashboard Styles
   Theme: Obsidian Charcoal Dark + cTrader Lime Green & High-Tech Cyan
   Accessibility: WCAG AAA Contrast, Smooth Micro-interactions, Responsive
   ========================================================================== */

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

:root {
  /* Core Backgrounds (Obsidian Charcoal Hierarchy) */
  --bg-app: #0f1216;
  --bg-surface: #161b22;
  --bg-elevated: #1f2631;
  --bg-card: #181f29;
  --bg-hover: #283240;
  --bg-glass: rgba(22, 27, 34, 0.75);
  
  /* Borders & Dividers */
  --border: #2a3441;
  --border-subtle: #202833;
  --border-bright: #3c4b5e;
  --border-accent: rgba(125, 189, 30, 0.35);

  /* cTrader Signature Lime Green & Accent System */
  --accent: #7dbd1e;
  --accent-bright: #8fd424;
  --accent-hover: #9ee628;
  --accent-soft: rgba(125, 189, 30, 0.12);
  --accent-glow: rgba(143, 212, 36, 0.35);

  /* Financial Status Colors */
  --profit: #7dbd1e;
  --profit-soft: rgba(125, 189, 30, 0.14);
  --profit-border: rgba(125, 189, 30, 0.35);

  --loss: #ef4444;
  --loss-soft: rgba(239, 68, 68, 0.14);
  --loss-border: rgba(239, 68, 68, 0.35);

  /* Strategy Specific Accent Colors */
  --cyan-tms: #00e5ff;
  --cyan-soft: rgba(0, 229, 255, 0.12);
  --cyan-border: rgba(0, 229, 255, 0.35);
  --cyan-glow: rgba(0, 229, 255, 0.25);

  --purple-judas: #c084fc;
  --purple-soft: rgba(192, 132, 252, 0.12);
  --purple-border: rgba(192, 132, 252, 0.35);

  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.12);
  
  --blue-demo: #38bdf8;
  --blue-soft: rgba(56, 189, 248, 0.14);

  /* Text & Typography */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #8e9bb0;
  --text-dim: #5a6679;

  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, Monaco, monospace;

  /* Shadows & Radii */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 24px var(--accent-glow);
  --shadow-cyan: 0 0 24px var(--cyan-glow);

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-ui);
  background-color: var(--bg-app);
  color: var(--text-primary);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  background: radial-gradient(circle at 50% 0%, rgba(125, 189, 30, 0.04) 0%, transparent 65%),
              radial-gradient(circle at 100% 30%, rgba(0, 229, 255, 0.03) 0%, transparent 50%),
              var(--bg-app);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
}

/* ==========================================================================
   Ticker Tape (Top Live Financial Marquee)
   ========================================================================== */
.ticker-wrap {
  width: 100%;
  background: #090b0e;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  position: relative;
  z-index: 110;
  height: 36px;
  display: flex;
  align-items: center;
}

.ticker-label {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-bright);
  z-index: 2;
  letter-spacing: 0.05em;
}

.ticker-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 8px var(--accent);
  animation: pulseDot 2s infinite ease-in-out;
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  padding-left: 110px;
  animation: tickerSlide 45s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.ticker-symbol {
  font-weight: 700;
  color: var(--text-primary);
}

.ticker-price {
  font-weight: 600;
}

.ticker-change {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
}

.ticker-change.up {
  color: var(--profit);
  background: var(--profit-soft);
}

.ticker-change.down {
  color: var(--loss);
  background: var(--loss-soft);
}

@keyframes tickerSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 18, 22, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-normal);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #1c2612 0%, #293816 100%);
  border: 1.5px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px var(--accent-soft);
}

.brand-info {
  display: flex;
  align-items: center;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.brand-title span {
  color: var(--accent-bright);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  flex-shrink: 0;
}

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--accent-bright);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 6-Language Dropdown */
.lang-dropdown-wrap {
  position: relative;
}

.lang-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.lang-menu-btn:hover, .lang-menu-btn.active {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--text-primary);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 5px;
  min-width: 146px;
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 150;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.lang-dropdown-menu.show {
  display: flex;
}

.lang-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 4px;
  transition: all var(--transition-fast);
  text-align: left;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
}

.lang-opt:hover {
  background: var(--bg-hover);
  color: var(--accent-bright);
}

.lang-opt.active {
  background: var(--accent-soft);
  color: var(--accent-bright);
  font-weight: 700;
}

/* GitHub Stars Pill */
.github-star-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.github-star-pill:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-soft);
  transform: translateY(-1px);
}

.star-count {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--accent-bright);
}

/* Primary CTA Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #0d1208;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
  box-shadow: 0 2px 10px rgba(125, 189, 30, 0.3);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 4px 18px var(--accent-glow);
  transform: translateY(-2px);
  color: #050803;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent-bright);
  transform: translateY(-1px);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 56px 0 48px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 1100px) {
  .hero-grid {
    grid-template-columns: 1fr 1.05fr;
    align-items: center;
    gap: 48px;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--profit-border);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-bright);
  width: fit-content;
}

.hero-pill-badge .sparkle {
  color: var(--accent-bright);
}

.hero-title {
  font-size: 2.85rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.15rem;
  }
}

@media (max-width: 540px) {
  .header-content {
    height: 56px;
    gap: 8px;
  }
  .brand-title {
    font-size: 1.05rem;
  }
  .brand-logo-icon {
    width: 32px;
    height: 32px;
  }
  .brand-badge {
    display: none;
  }
  .brand-subtitle {
    display: none;
  }
  .github-star-pill {
    display: none;
  }
  .header-content .btn-primary {
    display: none;
  }
  .hero-title {
    font-size: 1.55rem;
    line-height: 1.25;
    word-break: break-word;
  }
  .hero-description {
    font-size: 0.9rem;
  }
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #8fd424 0%, #00e5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 580px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}

.hero-trust-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 6px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.trust-item svg {
  color: var(--accent-bright);
}

/* ==========================================================================
   Interactive Hero Live Trading Dashboard Widget
   ========================================================================== */
.hero-dashboard-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  position: relative;
}

.widget-topbar {
  background: var(--bg-elevated);
  border-bottom: 2px solid var(--accent);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.widget-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.widget-dots {
  display: flex;
  gap: 6px;
}

.widget-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.widget-dot.red { background: #ef4444; }
.widget-dot.yellow { background: #f59e0b; }
.widget-dot.green { background: #10b981; }

.widget-heading {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-bright);
  letter-spacing: -0.01em;
}

.widget-mode-toggle {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.mode-btn {
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.mode-btn.active.demo {
  background: var(--blue-soft);
  color: var(--blue-demo);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.mode-btn.active.real {
  background: var(--profit-soft);
  color: var(--profit);
  border: 1px solid rgba(125, 189, 30, 0.4);
}

/* Killzones Bar */
.killzones-bar {
  background: #11151a;
  border-bottom: 1px solid var(--border-subtle);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.killzone-badge-list {
  display: flex;
  align-items: center;
  gap: 12px;
}

.killzone-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
}

.killzone-item.active {
  color: var(--accent-bright);
  font-weight: 600;
}

.kz-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
}

.killzone-item.active .kz-dot {
  background: var(--accent-bright);
  box-shadow: 0 0 6px var(--accent);
  animation: pulseDot 1.5s infinite;
}

.utc-clock {
  color: var(--text-secondary);
  font-size: 0.7rem;
}

/* Widget KPI Grid */
.widget-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

@media (max-width: 540px) {
  .widget-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.widget-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
}

.widget-kpi-label {
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.widget-kpi-val {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.widget-kpi-val.profit { color: var(--profit); }
.widget-kpi-val.cyan { color: var(--cyan-tms); }

/* Widget Positions Table */
.widget-table-wrap {
  overflow-x: auto;
  padding: 0 14px 10px;
}

.widget-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
  text-align: left;
}

.widget-table th {
  padding: 8px 6px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.04em;
}

.widget-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  white-space: nowrap;
}

.widget-table tr:hover {
  background: var(--bg-hover);
}

.badge-engine {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-engine.tms {
  background: var(--cyan-soft);
  color: var(--cyan-tms);
  border: 1px solid var(--cyan-border);
}

.badge-engine.judas {
  background: var(--purple-soft);
  color: var(--purple-judas);
  border: 1px solid var(--purple-border);
}

.chip-side {
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.65rem;
}
.chip-side.buy { background: var(--profit-soft); color: var(--profit); }
.chip-side.sell { background: var(--loss-soft); color: var(--loss); }

/* Live AI Reasoning Terminal */
.widget-terminal-wrap {
  border-top: 1px solid var(--border);
  background: #090c0f;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: #11161d;
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.terminal-filters {
  display: flex;
  align-items: center;
  gap: 4px;
}

.t-filter-btn {
  font-size: 0.64rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
}

.t-filter-btn.active, .t-filter-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border);
}

.terminal-body {
  height: 120px;
  overflow-y: auto;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.55;
  color: #c9d1d9;
}

.terminal-row {
  display: block;
  padding: 2px 0;
  word-break: break-all;
}

.t-tag {
  font-weight: 700;
  margin-right: 6px;
}
.t-tag.llm { color: #f9e2af; }
.t-tag.gate { color: #89b4fa; }
.t-tag.event { color: #a6e3a1; }
.t-tag.snapshot { color: #cdd6f4; }
.t-tag.warn { color: #fab387; }

/* ==========================================================================
   Metrics Highlight Grid (Key Numbers)
   ========================================================================== */
.metrics-section {
  padding: 20px 0 40px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 900px) {
  .metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

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

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.metric-number {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.metric-number.highlight {
  color: var(--accent-bright);
}

.metric-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.section-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-bright);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Dual Strategy Engines Section
   ========================================================================== */
.strategy-section {
  padding: 64px 0;
  background: linear-gradient(180deg, transparent 0%, rgba(22, 27, 34, 0.6) 100%);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.strategy-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.strat-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all var(--transition-normal);
}

.strat-tab-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.strat-tab-btn.active.tms {
  background: var(--bg-elevated);
  color: var(--cyan-tms);
  border-color: var(--cyan-tms);
  box-shadow: 0 0 16px var(--cyan-glow);
}

.strat-tab-btn.active.judas {
  background: var(--bg-elevated);
  color: var(--purple-judas);
  border-color: var(--purple-judas);
  box-shadow: 0 0 16px rgba(192, 132, 252, 0.3);
}

.strategy-display-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 992px) {
  .strategy-display-panel {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
  }
}

.strat-info-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.strat-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  width: fit-content;
}

.strat-badge-pill.tms { background: var(--cyan-soft); color: var(--cyan-tms); border: 1px solid var(--cyan-border); }
.strat-badge-pill.judas { background: var(--purple-soft); color: var(--purple-judas); border: 1px solid var(--purple-border); }

.strat-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.strat-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.strat-feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

.strat-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.strat-feature-item svg {
  color: var(--accent-bright);
  flex-shrink: 0;
  margin-top: 3px;
}

.strat-visual-col {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.strat-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.strat-code-title {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
}

.strat-code-block {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: #e2e8f0;
  overflow-x: auto;
}

.strat-code-block .keyword { color: #f472b6; }
.strat-code-block .var { color: #38bdf8; }
.strat-code-block .fn { color: #a3e635; }
.strat-code-block .num { color: #facc15; }
.strat-code-block .comment { color: #64748b; }

/* ==========================================================================
   8-Layer Risk Shield (Institutional Protection Bento Grid)
   ========================================================================== */
.risk-section {
  padding: 72px 0;
}

.risk-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .risk-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .risk-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.risk-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition-normal);
  position: relative;
}

.risk-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.risk-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-bright);
}

.risk-layer-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dim);
}

.risk-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.risk-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.risk-formula {
  margin-top: auto;
  padding: 6px 10px;
  background: var(--bg-card);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-bright);
  border-left: 2px solid var(--accent);
}

/* ==========================================================================
   Multi-LLM & Token Savings Calculator
   ========================================================================== */
.llm-section {
  padding: 72px 0;
  background: linear-gradient(180deg, rgba(22, 27, 34, 0.6) 0%, transparent 100%);
  border-top: 1px solid var(--border-subtle);
}

.llm-provider-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

.llm-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.llm-badge:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  transform: translateY(-2px);
}

.llm-badge svg {
  width: 18px;
  height: 18px;
}

.calculator-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  box-shadow: var(--shadow-md);
}

@media (min-width: 960px) {
  .calculator-card {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
  }
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.calc-heading {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.calc-val-display {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-bright);
}

.calc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  outline: none;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-bright);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-glow);
  transition: transform var(--transition-fast);
}

.calc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.calc-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

.calc-results-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.calc-result-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.calc-big-saving {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.saving-percent {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent-bright);
  line-height: 1;
}

.saving-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.calc-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.calc-row .label { color: var(--text-muted); }
.calc-row .value { font-family: var(--font-mono); font-weight: 700; color: var(--text-primary); }
.calc-row.highlight .value { color: var(--accent-bright); font-size: 1rem; }

/* ==========================================================================
   Live WebUI Showcase (Actual Screenshots Tabs)
   ========================================================================== */
.showcase-section {
  padding: 72px 0;
}

.showcase-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}

.showcase-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.showcase-tab-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.showcase-tab-btn.active {
  background: var(--bg-elevated);
  color: var(--accent-bright);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-soft);
}

.showcase-preview-frame {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.preview-topbar {
  background: var(--bg-elevated);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-url-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.showcase-img-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8.5;
  background: #000;
}

.showcase-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.showcase-img.active {
  display: block;
}

.preview-caption-bar {
  padding: 14px 20px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.caption-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.caption-tags {
  display: flex;
  gap: 8px;
}

.caption-tag {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--accent-bright);
  border: 1px solid var(--border);
}

/* ==========================================================================
   Architecture & Flow
   ========================================================================== */
.arch-section {
  padding: 72px 0;
  background: linear-gradient(180deg, transparent 0%, rgba(22, 27, 34, 0.6) 100%);
  border-top: 1px solid var(--border-subtle);
}

.arch-flow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 900px) {
  .arch-flow-grid {
    grid-template-columns: repeat(4, 1fr);
    position: relative;
  }
}

.arch-step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.arch-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--accent);
  color: var(--accent-bright);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arch-step-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

.arch-step-desc {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.arch-tech-badge {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cyan-tms);
}

/* ==========================================================================
   Quick Start Terminal (4-Step Tabbed Setup)
   ========================================================================== */
.quickstart-section {
  padding: 72px 0;
}

.quickstart-frame {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.quickstart-nav {
  display: flex;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.qs-tab-btn {
  padding: 14px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.qs-tab-btn:hover {
  color: var(--text-primary);
}

.qs-tab-btn.active {
  color: var(--accent-bright);
  border-bottom-color: var(--accent-bright);
  background: var(--bg-surface);
}

.quickstart-pane {
  display: none;
  padding: 24px;
}

.quickstart-pane.active {
  display: block;
}

.code-box {
  background: #090c0f;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  position: relative;
}

.code-box pre {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #f1f5f9;
  overflow-x: auto;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent-bright);
}

.copy-btn.copied {
  background: var(--profit-soft);
  border-color: var(--profit);
  color: var(--profit);
}

/* ==========================================================================
   FAQ Section (Accordion for SEO & Rich Snippets)
   ========================================================================== */
.faq-section {
  padding: 72px 0;
  border-top: 1px solid var(--border-subtle);
}

.faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item.open {
  border-color: var(--accent);
}

.faq-question {
  width: 100%;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  font-size: 1.02rem;
  font-weight: 700;
  color: #ffffff;
  background: none;
}

.faq-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-bright);
  transition: transform var(--transition-normal);
  flex-shrink: 0;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 22px 20px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  border-top: 1px solid transparent;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #080a0d;
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 340px;
}

.footer-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent-bright);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.footer-disclaimer {
  font-size: 0.74rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-top: 12px;
}

/* ==========================================================================
   Accessibility & Motion Preferences
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

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