:root {
  --bg-base: #0b0d12;
  --bg-surface: #131720;
  --bg-elevated: #1a1f2e;
  --border: #232a3a;
  --border-strong: #2f3a52;
  --text-primary: #e5e7eb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent: #06b6d4;
  --accent-hover: #0891b2;
  --accent-soft: rgba(6, 182, 212, 0.12);
  --purple: #a78bfa;
  --positive: #10b981;
  --negative: #ef4444;
  --warning: #f59e0b;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-feature-settings: 'tnum' 1;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1440px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  color: var(--text-primary);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b0d12;
  font-weight: 700;
  font-size: 14px;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #0b0d12;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #0b0d12;
}

.btn-secondary {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Hero ---------- */

.hero {
  padding: 96px 0 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.eyebrow {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
  position: relative;
}

.hero h1 {
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  font-weight: 700;
  position: relative;
}

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

.hero p {
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 36px;
  position: relative;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  position: relative;
}

/* ---------- Sections ---------- */

section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Feature grid ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

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

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 18px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.feature-card h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 18px;
  flex: 1;
}

.feature-card .demo-link {
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- How section ---------- */

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.how-card {
  background: transparent;
}

.how-step {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 12px;
  font-weight: 500;
}

.how-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.how-card p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- Methodology block ---------- */

.methodology {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}

.methodology h3 {
  font-size: 22px;
  margin-bottom: 24px;
  font-weight: 600;
}

.methodology ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 32px;
}

.methodology li {
  padding-left: 20px;
  position: relative;
  font-size: 14px;
  color: var(--text-secondary);
}

.methodology li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

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

/* ---------- Contact / CTA ---------- */

.contact {
  text-align: center;
  padding: 80px 0;
}

.contact h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 14px;
}

.contact p {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto 28px;
}

.contact-email {
  display: inline-block;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  padding: 12px 22px;
  border-radius: var(--radius);
  color: var(--accent);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 16px;
  transition: all 0.15s ease;
}

.contact-email:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-secondary);
}

/* ---------- Tool page layout ---------- */

.tool-page {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.tool-header {
  padding: 32px 24px 24px;
  border-bottom: 1px solid var(--border);
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.tool-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.tool-breadcrumb a {
  color: var(--text-muted);
}

.tool-breadcrumb a:hover {
  color: var(--text-secondary);
}

.tool-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.tool-title h1 {
  font-size: 24px;
  font-weight: 600;
}

.tool-title .meta {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.tool-description {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 700px;
}

.tool-body {
  padding: 24px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* ---------- Status chip ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.chip-live {
  background: rgba(16, 185, 129, 0.1);
  color: var(--positive);
}

.chip-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 6px var(--positive);
  animation: pulse 2s infinite;
}

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

/* ---------- Tape Stream table ---------- */

.controls {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
}

.search-input {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  width: 240px;
  transition: border-color 0.15s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.filter-chip {
  padding: 6px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.filter-chip:hover {
  border-color: var(--border-strong);
}

.tape-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.tape-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.tape-table th.numeric {
  text-align: right;
}

.tape-table td {
  padding: 11px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.tape-table td.numeric {
  text-align: right;
}

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

.tape-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.symbol-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.side-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.side-dot.call { background: var(--positive); }
.side-dot.put { background: var(--negative); }

.size-cell.large {
  color: var(--accent);
  font-weight: 600;
}

.mult-cell {
  font-weight: 500;
}

.mult-cell.high {
  color: var(--purple);
}

/* ---------- Cards / charts ---------- */

.tool-grid {
  display: grid;
  gap: 16px;
}

.tool-grid.two-col {
  grid-template-columns: 2fr 1fr;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  font-weight: 500;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.kpi {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.kpi-value {
  font-size: 22px;
  font-weight: 600;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.kpi-value.positive { color: var(--positive); }
.kpi-value.negative { color: var(--negative); }
.kpi-value.accent { color: var(--accent); }

.chart-container {
  position: relative;
  height: 460px;
}

.chart-container.tall {
  height: 560px;
}

.legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* ---------- Notice banner ---------- */

.notice {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--warning);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notice::before {
  content: 'i';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--warning);
  color: var(--bg-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  flex-shrink: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero h1 { font-size: 40px; }
  .hero p { font-size: 17px; }
  .features { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .methodology ul { grid-template-columns: 1fr; }
  .tool-grid.two-col { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .nav-links { gap: 16px; }
  .nav-links a:not(.btn) { display: none; }
}
