:root {
  color-scheme: dark;
  --bg: #07100f;
  --bg-2: #0b1816;
  --panel: #0e1c1a;
  --panel-2: #14231f;
  --line: rgba(199, 229, 213, 0.12);
  --line-strong: rgba(199, 229, 213, 0.24);
  --text: #eef7f2;
  --muted: #9fb4aa;
  --muted-2: #6f8580;
  --soft: #c8d8d0;
  --green: #4ee7a1;
  --green-dim: #2a8a63;
  --cyan: #61d8ff;
  --amber: #f4c95d;
  --danger: #ff7d7d;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.18);
  --radius: 10px;
  --radius-sm: 6px;
}

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% -10%, rgba(78, 231, 161, 0.12), transparent 32rem),
    radial-gradient(circle at 92% 6%, rgba(97, 216, 255, 0.06), transparent 28rem),
    linear-gradient(180deg, #07100f 0%, #081311 42%, #0a1311 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 15, 0.84);
  backdrop-filter: blur(18px);
  transition: box-shadow 0.2s;
}

.site-header.elevated {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px; height: 34px;
  border: 1px solid rgba(78, 231, 161, 0.4);
  border-radius: 8px;
  background: rgba(78, 231, 161, 0.08);
  color: var(--green);
}
.brand-mark.small { width: 26px; height: 26px; border-radius: 6px; }

.brand-text {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
  gap: 4px;
}

.brand-name {
  display: inline-block;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.015em;
  line-height: 1;
  color: var(--text);
  white-space: nowrap;
}
.brand-ai {
  color: var(--green);
  font-weight: 600;
}
.brand-sub {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--muted-2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 26px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
}
.site-nav a { transition: color 0.15s; }
.site-nav a:hover { color: var(--text); }

.nav-cta {
  border: 1px solid var(--line-strong);
  background: rgba(78, 231, 161, 0.08);
  color: var(--green);
  padding: 9px 16px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.nav-cta:hover {
  background: rgba(78, 231, 161, 0.16);
  border-color: rgba(78, 231, 161, 0.4);
}

/* ========== SHARED ========== */
.section-shell {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.eyebrow.amber { color: var(--amber); }
.eyebrow.center { display: flex; justify-content: center; }
.eyebrow .dot, .eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(78, 231, 161, 0.85);
}
.eyebrow .dot { background: none; padding: 0; }
.eyebrow.amber::before { background: var(--amber); box-shadow: 0 0 12px rgba(244, 201, 93, 0.7); }
.eyebrow .dot.live {
  position: relative;
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(78, 231, 161, 0.7); }
  50% { box-shadow: 0 0 0 6px rgba(78, 231, 161, 0); }
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 880px;
  margin-bottom: 22px;
  font-size: clamp(40px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.hero-h1-em {
  color: var(--green);
  font-style: normal;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 700;
}

h3 {
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 600;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 40px;
}
.section-heading.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-sub {
  color: var(--muted);
  font-size: 15.5px;
  max-width: 680px;
}

/* ========== HERO ========== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.95fr);
  gap: 56px;
  align-items: center;
  min-height: calc(100vh - 64px);
  padding: 64px 0 56px;
}

.hero-lede {
  max-width: 600px;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.55;
  margin-bottom: 22px;
}

.thesis-line {
  max-width: 640px;
  padding: 14px 18px;
  border-left: 2px solid var(--green);
  border-radius: 0 6px 6px 0;
  background: rgba(78, 231, 161, 0.05);
  color: var(--soft);
  font-size: 14.5px;
  line-height: 1.55;
}
.thesis-line em {
  font-style: normal;
  color: var(--text);
}
.thesis-line .thesis-em {
  color: var(--green);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 26px;
}
.hero-actions.center { justify-content: center; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #051411;
}
.button.primary:hover {
  background: #5cf0ac;
  box-shadow: 0 6px 24px rgba(78, 231, 161, 0.32);
}
.button.secondary {
  background: rgba(255, 255, 255, 0.025);
  color: var(--soft);
}
.button.secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-strong);
}

.proof-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.proof-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 4px;
}
.proof-strip span:not(.proof-label) {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12.5px;
}

/* ========== TERMINAL PREVIEW ========== */
.terminal-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 32, 28, 0.96), rgba(11, 22, 20, 0.96));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.terminal-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}
.terminal-topbar .dot-red,
.terminal-topbar .dot-amber,
.terminal-topbar .dot-green {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.dot-red { background: var(--danger); }
.dot-amber { background: var(--amber); }
.dot-green { background: var(--green); }

.terminal-topbar strong {
  margin-left: 8px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  font-weight: 500;
}
.terminal-clock {
  margin-left: auto;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
}

.terminal-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}
.terminal-tabs .tab {
  padding: 9px 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: var(--muted);
  border-right: 1px solid var(--line);
}
.terminal-tabs .tab.active {
  color: var(--green);
  background: rgba(78, 231, 161, 0.06);
  border-bottom: 1px solid var(--green);
  margin-bottom: -1px;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}
.market-grid > div {
  min-height: 130px;
  padding: 14px 16px;
  background: rgba(10, 20, 18, 0.98);
  display: flex;
  flex-direction: column;
}

.metric-label {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.metric-value {
  display: block;
  margin: 8px 0 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.metric-value.cyan { color: var(--cyan); }
.metric-value.amber { color: var(--amber); }

.market-grid small {
  color: var(--soft);
  font-size: 12px;
  line-height: 1.4;
}
.metric-src {
  margin-top: auto;
  padding-top: 8px;
  color: var(--muted-2);
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
}

.signal-card {
  padding: 18px 20px;
  border-top: 1px solid var(--line);
}
.signal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}
.signal-tag {
  display: block;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}
.signal-header strong {
  font-size: 15px;
}
.signal-conf {
  flex-shrink: 0;
  padding: 4px 9px;
  border: 1px solid rgba(78, 231, 161, 0.32);
  border-radius: 5px;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  background: rgba(78, 231, 161, 0.06);
}
.signal-card p {
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 12px;
}

.code-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #050d0c;
  padding: 10px 12px;
}
.code-block-title {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-2);
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
}
.code-block pre {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--soft);
  white-space: pre-wrap;
  word-break: break-word;
}
.hl-c { color: var(--muted-2); }
.hl-k { color: var(--cyan); }
.hl-n { color: var(--amber); }
.hl-s { color: #ffb86c; }

/* ========== SECTION BANDS ========== */
.workflow-band,
.brief-band,
.boundary-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.workflow-band,
.feature-section,
.brief-band,
.pricing-section,
.boundary-band,
.final-cta,
.backtest-section,
.trust-section {
  padding: 80px 0;
}

/* ========== WORKFLOW ========== */
.workflow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.workflow li {
  padding: 22px 18px;
  border-left: 1px solid var(--line);
  position: relative;
}
.workflow li:first-child { border-left-color: var(--green); }
.workflow li:last-child { border-right: 1px solid var(--line); }

.workflow li::after {
  content: "";
  position: absolute;
  top: 36px;
  right: -7px;
  width: 14px;
  height: 1px;
  background: var(--green-dim);
  z-index: 1;
}
.workflow li:last-child::after { display: none; }

.workflow li::before {
  content: "";
  position: absolute;
  top: 32px;
  right: -9px;
  width: 6px; height: 6px;
  border-top: 1px solid var(--green);
  border-right: 1px solid var(--green);
  transform: rotate(45deg);
  z-index: 2;
}
.workflow li:last-child::before { display: none; }

.wf-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.wf-num {
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 600;
}
.wf-tag {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.workflow li p {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0;
}

/* ========== FEATURE GRID ========== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 35, 31, 0.6), rgba(11, 24, 22, 0.6));
  transition: all 0.2s;
}
.feature-grid article:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.feature-icon {
  width: 36px; height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(78, 231, 161, 0.32);
  border-radius: 7px;
  background: rgba(78, 231, 161, 0.06);
  color: var(--green);
  font-size: 16px;
  margin-bottom: 12px;
}
.feature-grid p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

/* ========== BACKTEST SHOWCASE ========== */
.backtest-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  align-items: stretch;
}
.backtest-meta {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 35, 31, 0.7), rgba(11, 22, 20, 0.7));
}
.meta-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.meta-row:last-child { border-bottom: 0; padding-bottom: 0; }
.meta-row:first-child { padding-top: 0; }
.meta-row span {
  color: var(--muted-2);
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.meta-row strong {
  color: var(--soft);
  font-size: 13.5px;
  font-weight: 600;
}
.meta-row strong.warn { color: var(--amber); }

.code-window {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #050d0c;
  overflow: hidden;
}
.code-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--line);
}
.code-window-title {
  margin-left: 10px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
}
.code-window code {
  display: block;
  padding: 18px 20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--soft);
  white-space: pre;
  overflow-x: auto;
}

/* ========== BRIEF ========== */
.brief-layout {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 50px;
  align-items: start;
}
.brief-layout p {
  color: var(--muted);
}
.brief-checks {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 8px;
}
.brief-checks li {
  position: relative;
  padding-left: 22px;
  color: var(--soft);
  font-size: 14px;
}
.brief-checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.brief-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 35, 31, 0.85), rgba(11, 22, 20, 0.85));
  box-shadow: var(--shadow);
}
.brief-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}
.brief-meta span {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
}
.brief-meta .brief-tickers {
  color: var(--green);
}

.brief-card h3 {
  margin-bottom: 16px;
  font-size: 18px;
  line-height: 1.35;
}
.brief-card dl {
  display: grid;
  gap: 14px;
  margin: 0;
}
.brief-card dt {
  margin-bottom: 4px;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.brief-card dd {
  margin: 0;
  color: var(--soft);
  font-size: 13.5px;
  line-height: 1.55;
}
.brief-card dd.warn { color: var(--amber); }
.brief-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--muted-2);
}

/* ========== TRUST ========== */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.trust-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  background: rgba(255, 255, 255, 0.015);
}
.trust-stat {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.trust-grid span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* ========== PRICING ========== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.pricing-grid article {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 35, 31, 0.5), rgba(11, 22, 20, 0.5));
  display: flex;
  flex-direction: column;
  position: relative;
}
.featured-plan {
  border-color: rgba(78, 231, 161, 0.45) !important;
  background: linear-gradient(180deg, rgba(42, 77, 65, 0.5), rgba(13, 31, 27, 0.7)) !important;
  box-shadow: 0 12px 36px rgba(78, 231, 161, 0.12);
}
.plan-badge {
  position: absolute;
  top: -10px;
  left: 24px;
  padding: 3px 10px;
  background: var(--green);
  color: #051411;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.plan-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}
.plan {
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.plan-target {
  color: var(--muted);
  font-size: 12.5px;
}
.pricing-grid h3 {
  margin: 0 0 18px;
  font-size: 36px;
  letter-spacing: -0.02em;
}
.pricing-grid h3 span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  margin-left: 4px;
}
.pricing-grid ul {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 8px;
  flex: 1;
}
.pricing-grid li {
  color: var(--soft);
  font-size: 13.5px;
  position: relative;
  padding-left: 16px;
}
.pricing-grid li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}
.plan-cta {
  width: 100%;
}

/* ========== BOUNDARY ========== */
.boundary-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 32px;
  border: 1px solid rgba(244, 201, 93, 0.36);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(244, 201, 93, 0.04), rgba(244, 201, 93, 0.02));
}
.boundary-icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border: 1px solid rgba(244, 201, 93, 0.4);
  border-radius: 8px;
  background: rgba(244, 201, 93, 0.06);
  color: var(--amber);
}
.boundary-content p {
  color: var(--soft);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
  max-width: 760px;
}
.boundary-content p strong {
  color: var(--text);
  background: rgba(244, 201, 93, 0.1);
  padding: 1px 6px;
  border-radius: 3px;
}
.boundary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
}
.boundary-list li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 13.5px;
}
.boundary-list li::before {
  content: "✗";
  position: absolute;
  left: 0;
  color: var(--amber);
  font-weight: 700;
}

/* ========== FINAL CTA ========== */
.final-cta {
  text-align: center;
}
.final-cta .eyebrow.center { margin-left: auto; margin-right: auto; }
.final-cta h2 {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.final-cta p {
  max-width: 580px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: 15.5px;
}

/* ========== FOOTER ========== */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  padding: 40px 0 24px;
}
.footer-shell {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--soft);
  font-size: 14px;
}
.footer-brand .brand-name { font-size: 14px; }
.footer-brand .brand-sub { font-size: 9px; }
.footer-links {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 13.5px;
  color: var(--muted);
}
.footer-links a:hover { color: var(--text); }
.footer-cta {
  border: 1px solid var(--line-strong);
  background: rgba(78, 231, 161, 0.08);
  color: var(--green);
  padding: 7px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.footer-cta:hover { background: rgba(78, 231, 161, 0.16); }

.footer-fine {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 12px;
}

/* ========== MODAL ========== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 10, 9, 0.78);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fadeIn 0.18s;
}
.modal-backdrop[hidden] {
  display: none;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: linear-gradient(180deg, #0e1c1a, #0a1816);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.22s;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal h3 {
  font-size: 22px;
  margin-bottom: 6px;
}
.modal > p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 22px;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s;
}
.modal-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

#demoForm {
  display: grid;
  gap: 14px;
}
#demoForm label {
  display: grid;
  gap: 5px;
  font-size: 12.5px;
  color: var(--muted);
}
#demoForm label span em {
  font-style: normal;
  color: var(--muted-2);
}
#demoForm input,
#demoForm select,
#demoForm textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.32);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.15s;
}
#demoForm input:focus,
#demoForm select:focus,
#demoForm textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(78, 231, 161, 0.12);
}
#demoForm textarea { resize: vertical; min-height: 64px; }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.modal-actions .button { flex: 1; }

.modal-success {
  padding: 14px;
  border: 1px solid rgba(78, 231, 161, 0.32);
  border-radius: 7px;
  background: rgba(78, 231, 161, 0.06);
}
.modal-success[hidden],
#demoForm[hidden] {
  display: none;
}
.modal-success strong {
  display: block;
  color: var(--green);
  margin-bottom: 6px;
}
.modal-success p {
  margin: 0;
  color: var(--soft);
  font-size: 13.5px;
}
.modal-success a { color: var(--green); }

/* ========== RESPONSIVE ========== */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; gap: 36px; min-height: auto; padding-top: 48px; }
  .workflow { grid-template-columns: repeat(2, 1fr); }
  .workflow li::after, .workflow li::before { display: none; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .backtest-grid { grid-template-columns: 1fr; }
  .brief-layout, .pricing-grid, .trust-grid {
    grid-template-columns: 1fr;
  }
  .market-grid { grid-template-columns: 1fr; }
  .boundary-card { grid-template-columns: 1fr; }
  .boundary-list { grid-template-columns: 1fr; }
  .site-nav { display: none; }
}

@media (max-width: 640px) {
  .site-header { padding: 12px 18px; }
  .section-shell { width: calc(100% - 28px); }
  h1 { font-size: 36px; }
  .hero-lede { font-size: 16px; }
  .terminal-tabs .tab { padding: 8px 10px; font-size: 10.5px; }
  .workflow { grid-template-columns: 1fr; }
  .workflow li { border-left: 2px solid var(--line); border-right: 0 !important; }
  .feature-grid { grid-template-columns: 1fr; }
  .boundary-card { padding: 22px; }
  .code-window code { font-size: 11px; padding: 14px; }
  .footer-shell { flex-direction: column; align-items: flex-start; }
  .modal { padding: 24px 20px; }
  .workflow-band, .feature-section, .brief-band,
  .pricing-section, .boundary-band, .final-cta,
  .backtest-section, .trust-section { padding: 56px 0; }
}
