/* ============================================================
   Predikted - Design System
   Dark-first. Inter + JetBrains Mono. Electric indigo accent.
   ============================================================ */

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

:root {
  /* Surfaces */
  --bg-deep: #0B0E1A;
  --bg-surface: #10141F;
  --bg-elevated: #181D2C;
  --border: #252B3D;
  --border-strong: #323A52;

  /* Text */
  --text-high: #F5F7FA;
  --text-medium: #A8B0C2;
  --text-low: #6B7286;

  /* Accent */
  --accent: #5B8DEF;
  --accent-hover: #7AA3F2;
  --accent-pressed: #4A78D4;
  --accent-soft: #1E2A4D;

  /* Signals */
  --signal-yes: #00E08A;
  --signal-no: #FF5A5F;
  --signal-warning: #FFB547;
  --signal-info: #5B8DEF;

  /* Type scale */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 32px;
  --text-4xl: 40px;
  --text-5xl: 56px;
  --text-6xl: 72px;

  /* Families */
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Spacing */
  --pad-x: clamp(20px, 5vw, 80px);
  --max-w: 1200px;

  /* Misc */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-deep);
  color: var(--text-high);
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}

body { overflow-x: hidden; }

/* Tabular numerals everywhere by default for numbers */
.num, .stat-value, table td, .mono { font-variant-numeric: tabular-nums; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-high);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--text-5xl); font-weight: 800; line-height: 1.05; }
h2 { font-size: var(--text-3xl); line-height: 1.2; }
h3 { font-size: var(--text-xl); line-height: 1.3; }
h4 { font-size: var(--text-base); line-height: 1.4; font-weight: 600; }
p { margin: 0; color: var(--text-high); }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent-hover); }

.eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-medium);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1.5px;
  background: var(--accent);
  display: inline-block;
}

.lead {
  font-size: var(--text-lg);
  color: var(--text-medium);
  line-height: 1.55;
  text-wrap: pretty;
  max-width: 64ch;
}

.mono { font-family: var(--mono); }

/* ---------- Layout primitives ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.section { padding: 96px 0; border-top: 1px solid var(--border); }
.section:first-of-type { border-top: none; }
.section-tight { padding: 64px 0; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Top nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(140%);
  background: rgba(11, 14, 26, 0.78);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-high);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: var(--text-lg);
}
.brand svg { width: 22px; height: 22px; color: var(--accent); }
.brand:hover { color: var(--text-high); }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--text-medium);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-high); }
.nav-cta { display: flex; gap: 10px; align-items: center; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  font-family: var(--sans);
  font-size: var(--text-sm);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: transparent; border-color: var(--border-strong); color: var(--text-high); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-medium); }
.btn-ghost:hover { color: var(--text-high); }
.btn-lg { padding: 14px 26px; font-size: var(--text-base); }
.btn-arrow::after {
  content: "→";
  font-family: var(--mono);
  transition: transform 160ms ease;
}
.btn:hover .btn-arrow::after, .btn-arrow:hover::after { transform: translateX(3px); }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 200ms ease, transform 200ms ease, background 200ms ease;
}
.card:hover { border-color: var(--border-strong); }
.card-link { text-decoration: none; color: inherit; display: block; }
.card-link:hover { border-color: var(--accent); transform: translateY(-2px); color: inherit; text-decoration: none; }

.card-eyebrow {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.card-title {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.card-body { color: var(--text-medium); font-size: var(--text-sm); line-height: 1.6; }
.card-link-cta {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Hero & sections ---------- */
.hero {
  padding: 96px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
}
@media (max-width: 1000px) { .hero-grid { grid-template-columns: 1fr; gap: 48px; } }

.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

/* trust strip */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 40px;
  align-items: center;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--text-low);
  letter-spacing: 0.05em;
}
.trust-strip span { display: inline-flex; align-items: center; gap: 8px; }
.trust-dot {
  width: 6px;
  height: 6px;
  background: var(--signal-yes);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px rgba(0, 224, 138, 0.6);
}

/* ---------- Code visual (hero side) ---------- */
.code-frame {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}
.code-frame-head {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--text-low);
}
.dot-row { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.code-frame pre {
  margin: 0;
  padding: 22px 24px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-high);
  overflow-x: auto;
  font-feature-settings: "calt", "liga" 0;
}
.code-frame .tok-kw { color: #C792EA; }
.code-frame .tok-fn { color: var(--accent); }
.code-frame .tok-str { color: var(--signal-yes); }
.code-frame .tok-num { color: #FFB547; }
.code-frame .tok-com { color: var(--text-low); font-style: italic; }
.code-frame .tok-cls { color: #FFCB6B; }

/* ---------- Stat blocks ---------- */
.stat {
  padding: 28px 0;
  border-top: 1px solid var(--border);
}
.stat-value {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-feature-settings: "tnum", "ss01";
}
.stat-label {
  margin-top: 12px;
  font-size: var(--text-sm);
  color: var(--text-medium);
  line-height: 1.4;
}
.stat-source {
  margin-top: 8px;
  font-size: var(--text-xs);
  color: var(--text-low);
  font-family: var(--mono);
}
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
@media (max-width: 880px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Section heading ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.section-head .lead { margin-top: 12px; }
.section-head-meta {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--text-low);
  letter-spacing: 0.04em;
}

/* ---------- Entry-cards (3 niveaux d'entrée) ---------- */
.entry-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-decoration: none;
  color: inherit;
  transition: border-color 220ms, transform 220ms, background 220ms;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
}
.entry-card:hover {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(91, 141, 239, 0.04), transparent);
  color: inherit;
  text-decoration: none;
}
.entry-tag {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--text-low);
  letter-spacing: 0.06em;
}
.entry-card h3 { font-size: var(--text-2xl); letter-spacing: -0.015em; }
.entry-card p { color: var(--text-medium); font-size: var(--text-sm); line-height: 1.6; }
.entry-card-cta {
  margin-top: auto;
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Service grid (2x4) ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 1000px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .service-grid { grid-template-columns: 1fr; } }

.service-cell {
  background: var(--bg-surface);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
  transition: background 200ms;
  position: relative;
}
.service-cell:hover { background: var(--bg-elevated); color: inherit; text-decoration: none; }
.service-cell .idx {
  font-family: var(--mono);
  color: var(--text-low);
  font-size: var(--text-xs);
}
.service-cell h4 { font-size: var(--text-lg); }
.service-cell p { font-size: var(--text-sm); color: var(--text-medium); line-height: 1.55; }
.service-cell .arrow {
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: var(--mono);
  color: var(--text-low);
  transition: color 180ms, transform 180ms;
}
.service-cell:hover .arrow { color: var(--accent); transform: translate(3px, -3px); }

/* ---------- Process stepper (horizontal) ---------- */
.stepper {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
@media (max-width: 1000px) {
  .stepper { grid-template-columns: repeat(2, 1fr); }
  .step { border-bottom: 1px solid var(--border); }
  .step:nth-last-child(-n+2) { border-bottom: none; }
}
.step {
  padding: 28px 20px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step:last-child { border-right: none; }
.step-num {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--accent);
}
.step-title { font-weight: 600; font-size: var(--text-base); }
.step-desc { font-size: var(--text-sm); color: var(--text-medium); line-height: 1.55; }

/* ---------- Vertical stepper (used inside service pages) ---------- */
.vsteps { display: flex; flex-direction: column; gap: 0; }
.vstep {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
}
.vstep:last-child { border-bottom: 1px solid var(--border); }
.vstep-num {
  font-family: var(--mono);
  font-size: var(--text-sm);
  color: var(--accent);
  font-weight: 600;
}
.vstep h3 { font-size: var(--text-xl); margin-bottom: 8px; }
.vstep p { color: var(--text-medium); font-size: var(--text-base); max-width: 60ch; }

/* ---------- Promise blocks (what you get / don't promise) ---------- */
.promise-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 880px) { .promise-grid { grid-template-columns: 1fr; } }

.promise-col {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  background: var(--bg-surface);
}
.promise-col h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: var(--text-lg);
}
.promise-tag {
  font-family: var(--mono);
  font-size: var(--text-xs);
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.promise-tag.yes { background: rgba(0, 224, 138, 0.12); color: var(--signal-yes); }
.promise-tag.no { background: rgba(255, 90, 95, 0.12); color: var(--signal-no); }

.promise-list { list-style: none; margin: 0; padding: 0; }
.promise-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
  color: var(--text-high);
  line-height: 1.55;
}
.promise-list li:first-child { border-top: none; padding-top: 0; }
.promise-list .mark {
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1.6;
}
.promise-list .mark.yes { color: var(--signal-yes); }
.promise-list .mark.no { color: var(--signal-no); }

/* ---------- Callouts ---------- */
.callout {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  border-left: 3px solid var(--signal-warning);
  background: rgba(255, 181, 71, 0.06);
  padding: 20px 24px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--text-sm);
  line-height: 1.6;
}
.callout-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 181, 71, 0.15);
  color: var(--signal-warning);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
}
.callout strong { color: var(--text-high); }
.callout p { color: var(--text-medium); }

.callout-info { border-left-color: var(--signal-info); background: rgba(91, 141, 239, 0.06); }
.callout-info .callout-icon { background: rgba(91, 141, 239, 0.15); color: var(--signal-info); }
.callout-danger { border-left-color: var(--signal-no); background: rgba(255, 90, 95, 0.06); }
.callout-danger .callout-icon { background: rgba(255, 90, 95, 0.15); color: var(--signal-no); }

/* ---------- Final CTA band ---------- */
.cta-band {
  background:
    radial-gradient(ellipse at top, rgba(91, 141, 239, 0.10), transparent 60%),
    var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 64px clamp(32px, 6vw, 80px);
  text-align: center;
  margin: 32px 0;
}
.cta-band h2 { font-size: var(--text-4xl); margin-bottom: 16px; }
.cta-band p { color: var(--text-medium); max-width: 52ch; margin: 0 auto 28px; }
.cta-band .row { justify-content: center; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 40px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h5 {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-low);
  margin: 0 0 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a {
  color: var(--text-medium);
  text-decoration: none;
  font-size: var(--text-sm);
}
.footer ul a:hover { color: var(--text-high); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--text-low);
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
.footer-brand-block { max-width: 280px; }
.footer-brand-block p { font-size: var(--text-sm); color: var(--text-medium); margin-top: 14px; line-height: 1.55; }

/* ---------- Tables ---------- */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.tbl thead th {
  text-align: left;
  background: var(--bg-elevated);
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-low);
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.tbl tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-high);
}
.tbl tbody tr:hover td { background: var(--bg-surface); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .pos { color: var(--signal-yes); }
.tbl .neg { color: var(--signal-no); }
.tbl .mono { font-family: var(--mono); }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: var(--text-xs);
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.pill-yes { background: rgba(0, 224, 138, 0.12); color: var(--signal-yes); }
.pill-no { background: rgba(255, 90, 95, 0.12); color: var(--signal-no); }
.pill-neutral { background: var(--bg-elevated); color: var(--text-medium); }

/* ---------- Breadcrumb ---------- */
.crumb {
  display: flex;
  gap: 8px;
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--text-low);
  letter-spacing: 0.04em;
  padding: 24px 0 0;
}
.crumb a { color: var(--text-low); text-decoration: none; }
.crumb a:hover { color: var(--text-medium); }
.crumb span { color: var(--text-medium); }

/* ---------- Pricing cards ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 880px) { .pricing { grid-template-columns: 1fr; } }
.tier {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tier.featured { border-color: var(--accent); background: linear-gradient(180deg, rgba(91, 141, 239, 0.06), transparent 40%), var(--bg-surface); }
.tier-name { font-family: var(--mono); font-size: var(--text-xs); color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; }
.tier-price { font-size: var(--text-3xl); font-weight: 800; letter-spacing: -0.02em; }
.tier-price small { font-size: var(--text-sm); color: var(--text-medium); font-weight: 500; }
.tier-desc { font-size: var(--text-sm); color: var(--text-medium); }
.tier-list { list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.tier-list li {
  font-size: var(--text-sm);
  color: var(--text-high);
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  line-height: 1.5;
}
.tier-list li::before { content: "✓"; color: var(--accent); font-family: var(--mono); }

/* ---------- FAQ ---------- */
.faq details {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-base);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  color: var(--text-high);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  color: var(--accent);
  font-size: var(--text-lg);
  font-weight: 400;
  transition: transform 200ms;
}
.faq details[open] summary::after { content: "−"; }
.faq details p {
  margin-top: 14px;
  color: var(--text-medium);
  max-width: 64ch;
  font-size: var(--text-sm);
  line-height: 1.65;
}

/* ---------- Wallet/profile chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: var(--text-xs);
  color: var(--text-medium);
  font-family: var(--mono);
}
.chip-bar { width: 4px; height: 4px; background: var(--accent); border-radius: 50%; }

/* ---------- Decorative grid bg ---------- */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(91, 141, 239, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 141, 239, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at top right, black, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }

/* ---------- Inline kbd-like ---------- */
.kbd {
  font-family: var(--mono);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent);
}

/* ---------- Diagram (architecture) ---------- */
.diagram {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  position: relative;
  overflow: hidden;
}
.diagram-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}
@media (max-width: 800px) {
  .diagram-row { grid-template-columns: 1fr; }
  .diagram-arrow { transform: rotate(90deg); margin: 8px auto; }
}
.diagram-node {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}
.diagram-node .node-label {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--text-low);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.diagram-node .node-title { font-weight: 600; font-size: var(--text-base); }
.diagram-node .node-sub { color: var(--text-medium); font-size: var(--text-xs); margin-top: 4px; font-family: var(--mono); }
.diagram-arrow {
  font-family: var(--mono);
  color: var(--accent);
  font-size: var(--text-lg);
}

/* ---------- Blog prose ---------- */
.prose { max-width: 68ch; margin: 0 auto; }
.prose h2 { font-size: var(--text-2xl); margin: 48px 0 16px; }
.prose h3 { font-size: var(--text-lg); margin: 32px 0 12px; }
.prose p { font-size: var(--text-lg); color: var(--text-high); line-height: 1.7; margin: 0 0 20px; text-wrap: pretty; }
.prose p strong { color: var(--text-high); font-weight: 600; }
.prose ul { padding-left: 20px; margin: 0 0 24px; color: var(--text-high); }
.prose li { margin: 8px 0; line-height: 1.65; }
.prose code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

/* ---------- Misc utilities ---------- */
.muted { color: var(--text-medium); }
.dim { color: var(--text-low); }
.center { text-align: center; }
.mt-sm { margin-top: 12px; }
.mt-md { margin-top: 24px; }
.mt-lg { margin-top: 48px; }
.spacer { height: 32px; }

.divider-label {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--text-low);
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}
.divider-label::before, .divider-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Selection */
::selection { background: rgba(91, 141, 239, 0.35); color: var(--text-high); }

/* ============================================================
   Dashboard mock (hero visual)
   ============================================================ */
.dash {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 70px -24px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
}
.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  font-family: var(--mono);
  font-size: var(--text-xs);
}
.dash-title { display: inline-flex; align-items: center; gap: 10px; color: var(--text-high); font-weight: 600; }
.dash-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal-yes);
  box-shadow: 0 0 8px rgba(0, 224, 138, 0.8);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}
.dash-badge {
  font-size: 9px;
  padding: 2px 6px;
  background: rgba(0, 224, 138, 0.15);
  color: var(--signal-yes);
  border-radius: 3px;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.dash-meta { color: var(--text-low); }

.dash-chart-wrap {
  position: relative;
  padding: 24px 18px 12px;
  background:
    linear-gradient(to right, var(--border) 1px, transparent 1px) 0 0 / 12.5% 100%,
    linear-gradient(to bottom, var(--border) 1px, transparent 1px) 0 0 / 100% 25%,
    var(--bg-surface);
  background-blend-mode: normal;
}
.dash-chart-wrap::before {
  content: "";
  position: absolute; inset: 24px 18px 12px;
  background-image:
    linear-gradient(to right, rgba(37, 43, 61, 0.6) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(37, 43, 61, 0.6) 1px, transparent 1px);
  background-size: 12.5% 25%;
  pointer-events: none;
}
.dash-chart {
  position: relative;
  width: 100%;
  height: 180px;
  display: block;
}
.dash-y-labels {
  position: absolute;
  top: 24px;
  bottom: 12px;
  left: 6px;
  width: 36px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-low);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: right;
  pointer-events: none;
}
.dash-x-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 30px 12px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-low);
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
}
.dash-stat {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-stat:last-child { border-right: none; }
.dash-stat .lbl {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-low);
  text-transform: uppercase;
}
.dash-stat .v {
  font-family: var(--sans);
  font-weight: 700;
  font-size: var(--text-lg);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--text-high);
}
.dash-stat .v.pos { color: var(--signal-yes); }

.dash-feed {
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
}
.dash-feed-row {
  display: grid;
  grid-template-columns: 56px 1fr 72px 60px 56px;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-medium);
  align-items: center;
}
.dash-feed-row:last-child { border-bottom: none; }
.dash-feed-row .t { color: var(--text-low); }
.dash-feed-row .mkt { color: var(--text-high); font-family: var(--sans); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-feed-row .side { font-weight: 600; }
.dash-feed-row .side.y { color: var(--signal-yes); }
.dash-feed-row .side.n { color: var(--signal-no); }
.dash-feed-row .px { text-align: right; color: var(--text-high); font-variant-numeric: tabular-nums; }
.dash-feed-row .pl.pos { color: var(--signal-yes); text-align: right; }
.dash-feed-row .pl.neg { color: var(--signal-no); text-align: right; }

/* ============================================================
   Orderbook ladder pair (arb visual)
   ============================================================ */
.ladder-board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: stretch;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
@media (max-width: 880px) {
  .ladder-board { grid-template-columns: 1fr; }
}
.book {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.book-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--text-medium);
}
.book-head strong { color: var(--text-high); }
.book-head .tag {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.08em;
}
.book-head .tag.y { background: rgba(0, 224, 138, 0.15); color: var(--signal-yes); }
.book-head .tag.n { background: rgba(255, 90, 95, 0.15); color: var(--signal-no); }

.book-rows {
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 0;
}
.book-row {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  align-items: center;
  gap: 10px;
  padding: 4px 14px;
  position: relative;
  color: var(--text-medium);
}
.book-row .px { font-variant-numeric: tabular-nums; color: var(--text-high); }
.book-row .sz { font-variant-numeric: tabular-nums; color: var(--text-low); text-align: right; }
.book-row .meter {
  height: 16px;
  background: rgba(37, 43, 61, 0.4);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.book-row .meter > span {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(91, 141, 239, 0.18);
}
.book-row.ask .meter > span { background: rgba(255, 90, 95, 0.22); }
.book-row.bid .meter > span { background: rgba(0, 224, 138, 0.22); }
.book-row.best-ask {
  background: linear-gradient(90deg, rgba(91, 141, 239, 0.10), transparent);
}
.book-row.best-ask::before {
  content: "BEST ASK";
  position: absolute;
  left: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 70%;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.book-spread {
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-low);
  padding: 6px 0;
  letter-spacing: 0.06em;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
  margin: 4px 0;
}

.arb-meter {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 18px;
  background: linear-gradient(180deg, rgba(91, 141, 239, 0.08), transparent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  text-align: center;
  min-width: 140px;
  position: relative;
}
.arb-meter .arb-eq {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.arb-meter .arb-big {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-high);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin: 6px 0;
}
.arb-meter .arb-edge {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--signal-yes);
  padding: 4px 10px;
  background: rgba(0, 224, 138, 0.10);
  border-radius: 999px;
  margin-top: 8px;
}
.arb-meter .arb-fire {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.arb-meter::after {
  content: "↔";
  position: absolute;
  left: -28px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  color: var(--text-low);
  font-size: 20px;
}
@media (max-width: 880px) { .arb-meter::after { display: none; } }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
