/* ============================================================
   ENTROLYST DESIGN SYSTEM
   Institutional-grade PSX trading terminal
   ============================================================ */

:root {
  /* Backgrounds */
  --bg-base: #05070A;
  --bg-panel: #0A0D13;
  --bg-elevated: #11151E;
  --bg-input: #11151E;

  /* Brand */
  --accent-cyan: #00C6FF;
  --accent-mint: #00FF94;
  --accent-gradient: linear-gradient(135deg, #00C6FF 0%, #00FF94 100%);
  --accent-gradient-soft: linear-gradient(135deg, rgba(0,198,255,0.12) 0%, rgba(0,255,148,0.12) 100%);

  /* Data */
  --positive: #00FF94;
  --negative: #FF3B5C;
  --neutral: #64748B;
  --text-primary: #E5E9F0;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  /* Borders */
  --border: #1A1F2B;
  --border-bright: #2A3142;

  /* Shadows */
  --shadow-panel: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow-cyan: 0 0 32px rgba(0,198,255,0.15);
  --shadow-glow-mint: 0 0 32px rgba(0,255,148,0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Background grid + ambient glows */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(26, 31, 43, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 31, 43, 0.4) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
}

body::after {
  content: '';
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 800px;
  background: radial-gradient(ellipse at center,
    rgba(0, 198, 255, 0.08) 0%,
    rgba(0, 255, 148, 0.04) 40%,
    transparent 70%);
  pointer-events: none;
  z-index: 0;
}

main, header, nav, section, footer { position: relative; z-index: 1; }

/* ============ TYPOGRAPHY ============ */
.eyebrow {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-mint);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent-mint);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-mint);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.section-title {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-transform: none;
  color: var(--text-primary);
}

.section-title-uppercase {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--text-secondary);
}

.mono { font-family: 'JetBrains Mono', monospace; }
.text-positive { color: var(--positive); }
.text-negative { color: var(--negative); }
.text-neutral { color: var(--neutral); }
.text-secondary { color: var(--text-secondary); }

.num {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* ============ LAYOUT ============ */
.container {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 768px) {
  .container { padding: 0 20px; }
}

section { padding: 96px 0; }
@media (max-width: 768px) {
  section { padding: 64px 0; }
}

/* ============ MAIN NAV ============ */
.main-nav {
  background: rgba(10, 13, 19, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  color: var(--text-primary);
}
.brand-mark {
  width: 110px; height: 32px;
  position: relative;
  display: grid; place-items: center;
}
.brand-mark svg { width: 100%; height: 100%; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-name {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.brand-name span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.02em;
}
.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}
.nav-actions {
  display: flex; align-items: center; gap: 12px;
}
.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 10px 18px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-bright);
  background: var(--bg-elevated);
}
.btn-primary {
  background: var(--accent-gradient);
  color: #001218;
  font-weight: 700;
}
.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 24px rgba(0, 255, 148, 0.3);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--accent-mint);
  border: 1px solid rgba(0, 255, 148, 0.3);
}
.btn-outline:hover {
  border-color: var(--accent-mint);
  background: rgba(0, 255, 148, 0.06);
  box-shadow: 0 0 24px rgba(0, 255, 148, 0.1);
}
.btn-lg { padding: 14px 26px; font-size: 14px; }

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

/* ============ LIVE TICKER TAPE ============ */
.ticker-tape {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  height: 38px;
  overflow: hidden;
  position: relative;
}
.ticker-tape::before, .ticker-tape::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.ticker-tape::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-panel), transparent);
}
.ticker-tape::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg-panel), transparent);
}
.ticker-track {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0;
  animation: ticker-scroll 90s linear infinite;
  white-space: nowrap;
  width: max-content;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  border-right: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.ticker-symbol {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.ticker-price { color: var(--text-secondary); }
.ticker-change { font-weight: 600; }
.ticker-change.up { color: var(--positive); }
.ticker-change.down { color: var(--negative); }

/* ============ HERO ============ */
.hero {
  padding: 80px 0 64px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}
.hero-headline {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 24px 0 24px;
  color: var(--text-primary);
}
.hero-headline .accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 540px;
  margin-bottom: 36px;
}
.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-meta {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.hero-meta-item .label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.hero-meta-item .value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}
.hero-meta-item .value .unit {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 4px;
}

/* ============ TERMINAL MOCKUP (HERO) ============ */
.terminal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 24px 60px rgba(0,0,0,0.5),
    0 0 0 1px rgba(0, 198, 255, 0.06),
    0 0 80px rgba(0, 198, 255, 0.08);
  position: relative;
}
.terminal-header {
  background: var(--bg-elevated);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.terminal-header-left {
  display: flex; align-items: center; gap: 14px;
}
.terminal-dots { display: flex; gap: 6px; }
.terminal-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border-bright);
}
.terminal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.terminal-status {
  display: flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--positive);
  text-transform: uppercase;
}
.terminal-status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 8px var(--positive);
  animation: pulse 1.6s ease-in-out infinite;
}

/* Index strip */
.index-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.index-cell {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
}
.index-cell:last-child { border-right: none; }
.index-cell .label {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.index-cell .value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.index-cell .change {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  margin-top: 2px;
}

/* Terminal body grid */
.terminal-body {
  display: grid;
  grid-template-columns: 200px 1fr 180px;
  min-height: 380px;
}
@media (max-width: 700px) {
  .terminal-body { grid-template-columns: 1fr; }
  .terminal-body > div + div { border-left: none !important; border-top: 1px solid var(--border); }
}
.terminal-col { border-right: 1px solid var(--border); }
.terminal-col:last-child { border-right: none; }
.terminal-col-header {
  background: var(--bg-elevated);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.terminal-col-title {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.terminal-col-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
}

/* Watchlist */
.watchlist-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s;
}
.watchlist-row:hover { background: var(--bg-elevated); }
.watchlist-row.active {
  background: rgba(0, 198, 255, 0.04);
  border-left: 2px solid var(--accent-cyan);
  padding-left: 10px;
}
.watchlist-symbol {
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}
.watchlist-price { color: var(--text-secondary); text-align: right; }
.watchlist-change { font-weight: 600; text-align: right; min-width: 48px; }

/* Chart */
.chart-area {
  padding: 0;
  position: relative;
  height: 100%;
}
.chart-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  flex-wrap: wrap;
  gap: 10px;
}
.chart-ticker-block {
  display: flex; align-items: baseline; gap: 10px;
}
.chart-symbol {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}
.chart-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}
.chart-change {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--positive);
}
.chart-tf {
  display: flex; gap: 4px;
}
.chart-tf button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px;
  cursor: pointer;
  border-radius: 3px;
  letter-spacing: 0.04em;
}
.chart-tf button.active {
  background: var(--bg-panel);
  color: var(--accent-mint);
  border-color: var(--border-bright);
}
.chart-svg-wrap {
  padding: 12px;
  position: relative;
}
.chart-svg { width: 100%; height: 200px; display: block; }

/* Market depth */
.depth-row {
  display: grid;
  grid-template-columns: 50px 1fr 60px;
  gap: 6px;
  align-items: center;
  padding: 5px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.depth-bar {
  position: absolute;
  top: 0; bottom: 0;
  right: 0;
  z-index: 0;
  opacity: 0.15;
}
.depth-row.bid .depth-bar { background: var(--positive); }
.depth-row.ask .depth-bar { background: var(--negative); }
.depth-price, .depth-size, .depth-total { z-index: 1; position: relative; }
.depth-price { font-weight: 600; }
.depth-row.bid .depth-price { color: var(--positive); }
.depth-row.ask .depth-price { color: var(--negative); }
.depth-size { color: var(--text-secondary); text-align: right; }
.depth-total { color: var(--text-muted); text-align: right; font-size: 9px; }
.depth-spread {
  padding: 8px 12px;
  text-align: center;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}
.depth-spread strong { color: var(--text-primary); font-weight: 600; }

/* Trade blotter */
.terminal-blotter {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
.blotter-header {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.blotter-title {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-secondary);
}
.blotter-rows {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}
.blotter-cell {
  padding: 7px 14px;
  border-right: 1px solid var(--border);
}
.blotter-cell:last-child { border-right: none; }
.blotter-cell .lbl {
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}

/* ============ STATS BAR ============ */
.stats-bar {
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
@media (max-width: 800px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}
.stat-item {
  padding: 0 32px;
  border-right: 1px solid var(--border);
  position: relative;
}
.stat-item:last-child { border-right: none; }
@media (max-width: 800px) {
  .stat-item { border-right: none; padding: 0 16px; }
  .stat-item:nth-child(odd) { border-right: 1px solid var(--border); }
}
.stat-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
}
.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-suffix {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 4px;
  -webkit-text-fill-color: var(--text-secondary);
}
.stat-desc {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============ SECTION HEADERS ============ */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.section-header-left { max-width: 640px; }
.section-header h2 {
  margin-top: 14px;
}
.section-header-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-top: 14px;
  max-width: 560px;
}

/* ============ FEATURES GRID ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
}
.feature-card {
  background: var(--bg-panel);
  padding: 32px 28px;
  position: relative;
  transition: background 0.25s;
  cursor: pointer;
}
.feature-card:hover {
  background: var(--bg-elevated);
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon {
  width: 44px; height: 44px;
  background: var(--accent-gradient-soft);
  border: 1px solid rgba(0, 255, 148, 0.15);
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--accent-mint);
  font-size: 18px;
  margin-bottom: 20px;
}
.feature-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.feature-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.feature-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
}
.feature-spec {
  display: flex;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.feature-spec-item .k { color: var(--text-muted); display: block; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 2px; }
.feature-spec-item .v { color: var(--text-primary); font-weight: 600; }

/* ============ TERMINAL DEEP DIVE SECTION ============ */
.deep-dive {
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.dd-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  overflow-x: auto;
}
.dd-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 16px 24px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.dd-tab:hover { color: var(--text-primary); }
.dd-tab.active {
  color: var(--accent-mint);
  border-bottom-color: var(--accent-mint);
}

.dd-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 1000px) {
  .dd-content { grid-template-columns: 1fr; }
}
.dd-panel { display: none; }
.dd-panel.active { display: grid; }
@media (max-width: 1000px) {
  .dd-panel.active { display: block; }
}

.dd-list {
  list-style: none;
  margin-top: 24px;
}
.dd-list li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.dd-list li:last-child { border-bottom: none; }
.dd-list-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 600;
  min-width: 32px;
  letter-spacing: 0.04em;
}
.dd-list-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}
.dd-list-content p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Mini terminal panel for deep dive */
.mini-terminal {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-panel);
}
.mini-terminal-header {
  background: var(--bg-elevated);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mini-terminal-title {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-secondary);
}
.mini-terminal-body { padding: 16px; }

/* Heatmap */

.heat-cell {
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.92);
  position: relative;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
  padding: 4px 2px;
  min-height: 44px;
}
.heat-cell .heat-sym {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
}
.heat-cell .pct {
  font-size: 8px;
  font-weight: 600;
  opacity: 0.9;
  margin-top: 0;
  line-height: 1;
}
.heatmap {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-auto-rows: minmax(48px, auto);
  grid-auto-flow: dense;
  gap: 4px;
}
.heat-xl { grid-column: span 2; grid-row: span 2; min-height: 96px; }
.heat-lg { grid-column: span 2; grid-row: span 1; }
.heat-md { grid-column: span 1; grid-row: span 1; }
.heat-sm { grid-column: span 1; grid-row: span 1; }
@media (max-width: 700px) {
  .heatmap { grid-template-columns: repeat(4, 1fr); }
  .heat-xl { grid-column: span 2; grid-row: span 2; }
  .heat-lg { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 460px) {
  .heatmap { grid-template-columns: repeat(3, 1fr); }
  .heat-xl { grid-column: span 2; grid-row: span 2; }
  .heat-lg { grid-column: span 1; grid-row: span 1; }
}

.heat-cell:hover { transform: scale(1.06); z-index: 2; filter: brightness(1.08); }
.heat-cell .pct {
  font-size: 8px;
  opacity: 0.85;
  margin-top: 2px;
}
.heat-up-1 { background: rgba(0, 255, 148, 0.15); color: var(--positive); }
.heat-up-2 { background: rgba(0, 255, 148, 0.3); color: var(--positive); }
.heat-up-3 { background: rgba(0, 255, 148, 0.5); color: #001218; }
.heat-up-4 { background: rgba(0, 255, 148, 0.85); color: #001218; }
.heat-dn-1 { background: rgba(255, 59, 92, 0.15); color: var(--negative); }
.heat-dn-2 { background: rgba(255, 59, 92, 0.3); color: var(--negative); }
.heat-dn-3 { background: rgba(255, 59, 92, 0.5); color: #fff; }
.heat-dn-4 { background: rgba(255, 59, 92, 0.85); color: #fff; }
.heat-flat { background: var(--bg-elevated); color: var(--text-muted); }

/* News feed */
.news-feed { display: flex; flex-direction: column; gap: 0; }
.news-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
}
.news-item:last-child { border-bottom: none; }
.news-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.news-headline {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 4px;
}
.news-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-secondary);
  display: flex;
  gap: 12px;
}
.news-tag {
  color: var(--accent-cyan);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ============ USE CASES ============ */
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 900px) {
  .use-cases-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .use-cases-grid { grid-template-columns: 1fr; }
}
.use-case-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.use-case-card:hover {
  border-color: rgba(0, 255, 148, 0.3);
  transform: translateY(-2px);
}
.use-case-card::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0, 198, 255, 0.08), transparent 70%);
  pointer-events: none;
}
.uc-icon {
  font-size: 22px;
  color: var(--accent-mint);
  margin-bottom: 20px;
}
.uc-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.uc-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}
.uc-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.uc-features li {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.uc-features li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 9px;
  color: var(--accent-mint);
}

/* ============ FINAL CTA ============ */
.cta-section {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at center,
    rgba(0, 198, 255, 0.12) 0%,
    rgba(0, 255, 148, 0.06) 35%,
    transparent 70%);
  pointer-events: none;
}
.cta-content {
  position: relative;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.cta-content h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 20px 0 16px;
}
.cta-content h2 .accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cta-content p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 36px;
}
.cta-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-footnote {
  margin-top: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* ============ FOOTER ============ */
footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 64px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand .brand-mark { width: 110px; height: 32px; }
.footer-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 320px;
}
.footer-social {
  display: flex;
  gap: 10px;
}
.footer-social a {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  transition: all 0.2s;
}
.footer-social a:hover {
  color: var(--accent-mint);
  border-color: rgba(0, 255, 148, 0.3);
}
.footer-col h5 {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent-mint); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
}
.footer-disclaimer {
  max-width: 720px;
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.6;
  letter-spacing: 0.02em;
  font-family: 'Inter', sans-serif;
}

/* ============ ANIMATIONS ============ */
@keyframes flicker-up {
  0% { background: rgba(0, 255, 148, 0.3); }
  100% { background: transparent; }
}
@keyframes flicker-down {
  0% { background: rgba(255, 59, 92, 0.3); }
  100% { background: transparent; }
}
.flash-up { animation: flicker-up 0.6s ease-out; }
.flash-down { animation: flicker-down 0.6s ease-out; }

@keyframes scan {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.4; }
  100% { transform: translateY(380px); opacity: 0; }
}
.scanline {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  pointer-events: none;
  animation: scan 4s linear infinite;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ MOBILE NAV ============ */
.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 38px; height: 38px;
  border-radius: 6px;
  cursor: pointer;
}
@media (max-width: 900px) {
  .mobile-toggle { display: grid; place-items: center; }
}

  .reveal { opacity: 1; transform: none; }
}


/* ===== Hero animations (no positional float) ===== */
@keyframes chartDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes chartFillIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; r: 3.5; }
  50% { opacity: 0.55; }
}
.chart-svg path[stroke] {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: chartDraw 2.2s ease-out 0.35s forwards;
}
.chart-svg path[fill] {
  opacity: 0;
  animation: chartFillIn 1.2s ease 1.1s forwards;
}
.chart-svg circle {
  animation: pulse 1.6s ease-in-out infinite;
}
/* Ensure scanline runs on hero terminal */
.terminal { position: relative; overflow: hidden; }
.terminal > .scanline {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  pointer-events: none;
  animation: scan 4s linear infinite;
  z-index: 5;
}
@media (prefers-reduced-motion: reduce) {
  .chart-svg path[stroke], .chart-svg path[fill], .terminal > .scanline, .chart-svg circle {
    animation: none !important;
  }
  .chart-svg path[stroke] { stroke-dashoffset: 0; }
  .chart-svg path[fill] { opacity: 1; }
  .reveal { opacity: 1; transform: none; }
}


/* ============================================================
   RESPONSIVE — small screens (phones / narrow tablets)
   ============================================================ */
@media (max-width: 900px) {
  .nav-inner { height: 52px; gap: 10px; }
  .nav-actions .btn-ghost { display: none; }
  .nav-actions .btn-primary { padding: 8px 12px; font-size: 12px; }
  .brand-name { font-size: 15px; }
  .hero { padding: 40px 0 48px; }
  .hero-headline { font-size: clamp(28px, 8vw, 40px); margin: 16px 0; }
  .hero-sub { font-size: 14px; margin-bottom: 24px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-meta { gap: 20px; }
  .hero-meta-item .value { font-size: 18px; }
  .index-strip { grid-template-columns: repeat(2, 1fr); }
  .index-cell:nth-child(2n) { border-right: none; }
  .index-cell:nth-child(n+3) { border-top: 1px solid var(--border); }
  .terminal-header { flex-wrap: wrap; gap: 8px; }
  .terminal-title { font-size: 10px; }
  .chart-info-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .chart-tf { flex-wrap: wrap; }
  .lt-row, .last-trade-grid, .lt-g { grid-template-columns: 1fr 1fr !important; }
  .dd-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; gap: 8px; padding-bottom: 4px; }
  .dd-tab { flex: 0 0 auto; white-space: nowrap; font-size: 12px; padding: 8px 12px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: left; }
  /* Mobile dropdown nav */
  .nav-links.nav-open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px 16px;
    z-index: 200;
    gap: 0;
  }
  .nav-links.nav-open a {
    display: block;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  section { padding: 48px 0; }
  .hero { padding: 28px 0 36px; }
  .hero-headline { font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; }
  .hero-meta { flex-direction: column; gap: 14px; }
  .ticker-item { padding: 0 14px; font-size: 11px; }
  .index-strip { grid-template-columns: 1fr 1fr; }
  .index-cell { padding: 10px; }
  .index-cell .value { font-size: 13px; }
  .terminal-body { min-height: 0; }
  .watchlist-row { padding: 8px 10px; font-size: 10px; }
  .heatmap { grid-template-columns: repeat(4, 1fr) !important; gap: 3px; }
  .heat-cell { min-height: 40px; font-size: 9px; }
  .heat-cell .heat-sym { font-size: 9px; }
  .heat-cell .pct { font-size: 7px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .features-grid { grid-template-columns: 1fr !important; }
  .feature-card { padding: 20px 16px; }
  .section-title { font-size: clamp(22px, 7vw, 32px); }
  .cta-section .btn, .cta-buttons { flex-direction: column; width: 100%; }
  .cta-buttons .btn { width: 100%; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 24px; }
  .btn-lg { padding: 12px 16px; font-size: 13px; }
  .mini-terminal-header { flex-wrap: wrap; gap: 6px; }
  .dd-list { padding-left: 0; }
}

@media (max-width: 400px) {
  .heatmap { grid-template-columns: repeat(2, 1fr) !important; }
  .brand-name { font-size: 13px; }
  .nav-actions .btn-primary { display: none; }
}


/* ---- Mobile polish v2 ---- */
@media (max-width: 900px) {
  .main-nav { position: sticky; top: 0; }
  .nav-inner { position: relative; }
  .ticker-tape { height: 34px; }
  .terminal {
    max-width: 100%;
    overflow: hidden;
  }
  .terminal-body {
    grid-template-columns: 1fr !important;
  }
  .terminal-body > div {
    border-right: none !important;
    border-top: 1px solid var(--border);
  }
  .terminal-body > div:first-child { border-top: none; }
  /* hide L2 depth column on very narrow to reduce clutter - still show on 600+ */
  .index-strip { grid-template-columns: 1fr 1fr; }
  .chart-svg-wrap { min-height: 160px; }
  .chart-svg { width: 100%; height: 160px; }
}

@media (max-width: 600px) {
  /* Hide tertiary terminal panels for app-like focus */
  .terminal-col.depth-col,
  .terminal .depth-panel { }
  .last-trade-table,
  .lt-table { font-size: 10px; overflow-x: auto; display: block; }
  .hero-cta .btn-outline { font-size: 13px; }
  body { overflow-x: hidden; }
  .container { max-width: 100%; }
}

/* Auth pages shared */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 60px;
  position: relative;
  z-index: 1;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 32px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45), 0 0 40px rgba(0,198,255,0.06);
}
.auth-card .brand {
  margin-bottom: 28px;
  justify-content: center;
}
.auth-card h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  text-align: center;
}
.auth-card .auth-sub {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 28px;
  line-height: 1.5;
}
.auth-form label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.auth-form .field {
  margin-bottom: 18px;
}
.auth-form input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-form input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0,198,255,0.12);
}
.auth-form input::placeholder {
  color: var(--text-muted);
}
.auth-error {
  display: none;
  background: rgba(255, 59, 92, 0.12);
  border: 1px solid rgba(255, 59, 92, 0.35);
  color: var(--negative);
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.auth-error.show { display: block; }
.auth-success {
  display: none;
  background: rgba(0, 255, 148, 0.1);
  border: 1px solid rgba(0, 255, 148, 0.35);
  color: var(--positive);
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.auth-success.show { display: block; }
.auth-form .btn {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  padding: 13px 18px;
}
.auth-footer {
  text-align: center;
  margin-top: 22px;
  font-size: 13px;
  color: var(--text-secondary);
}
.auth-footer a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
}
.auth-footer a:hover { text-decoration: underline; }
.auth-demo {
  margin-top: 20px;
  padding: 12px;
  background: var(--bg-elevated);
  border-radius: 8px;
  border: 1px dashed var(--border-bright);
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.6;
}
.auth-demo strong { color: var(--text-secondary); }
.auth-top {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.auth-top .nav-inner { height: 52px; }
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; border-radius: 10px; }
  .auth-card h1 { font-size: 20px; }
  .auth-wrap { padding: 24px 16px 48px; }
}


.brand-mark { width: 110px; height: 32px; display: grid; place-items: center; flex-shrink: 0; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.auth-page .brand-mark, .auth-page .brand-mark svg, .auth-page .brand-mark img { width: 110px; height: 32px; }
