/* RikdomChart - rikdom-site.css */

:root {
  --page:    #ffffff;
  --soft:    #f3f7fc;
  --ink:     #0c1b2e;
  --muted:   #536070;
  --line:    #dce4f0;
  --nav:     #0b1929;
  --hero:    #0d2247;
  --blue:    #1358c4;
  --blue-h:  #0e45a0;
  --green:   #1a8c3c;
  --green-h: #14702f;
  --gold:    #c78a00;
  --red:     #c43232;
  --panel:   #ffffff;
  --canvas-bg: #f8fbff;
  --sh:      0 2px 16px rgba(10,24,50,.09);
  --r:       3px;
}

html[data-theme="dark"] {
  --page:    #07111f;
  --soft:    #0b1728;
  --ink:     #edf5ff;
  --muted:   #9aaac0;
  --line:    #203148;
  --nav:     #050d18;
  --hero:    #09162a;
  --blue:    #4d9dff;
  --blue-h:  #7bb7ff;
  --green:   #2cbf64;
  --green-h: #41d679;
  --gold:    #e4a62a;
  --red:     #f06464;
  --panel:   #0d1a2c;
  --canvas-bg: #0a1525;
  --sh:      0 16px 32px rgba(0,0,0,.28);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--nav);
}
.navbar {
  width: min(1200px, 100% - 40px);
  margin: 0 auto;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.06rem;
  color: #fff;
  white-space: nowrap;
}
.brand img { width: 28px; height: 28px; object-fit: contain; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: .9rem;
}
.nav-links a { color: rgba(255,255,255,.7); transition: color 130ms; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.site-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
.language-menu { position: relative; }
.language-trigger,
.theme-toggle {
  height: 40px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  color: #eef5ff;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(3,11,24,.16), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(18px);
  transition: transform 130ms, background 130ms, border-color 130ms, box-shadow 130ms, color 130ms;
}
.language-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 118px;
  padding: 0 12px 0 10px;
}
.lang-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  color: #96cbff;
  flex-shrink: 0;
}
.lang-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}
.lang-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.lang-badge {
  color: #8fc9ff;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.lang-current {
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
}
.lang-chevron {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .68;
  flex-shrink: 0;
}
.language-menu.is-open .lang-chevron { transform: rotate(225deg) translateY(-1px); }
.language-list {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  min-width: 238px;
  padding: 10px;
  border: 1px solid rgba(140,174,215,.18);
  border-radius: 18px;
  background: rgba(8,18,34,.96);
  box-shadow: 0 24px 46px rgba(2,8,18,.38);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(.98);
  transition: opacity 130ms, transform 130ms;
}
.language-menu.is-open .language-list {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.language-option {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #c9d8eb;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 130ms, border-color 130ms, color 130ms, transform 130ms;
}
.language-option-badge {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.06);
  color: #9ed2ff;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  flex-shrink: 0;
}
.language-option-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.language-option-code {
  color: #8fb9dd;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.language-option-name {
  color: #eef5ff;
  font-size: .92rem;
  font-weight: 600;
}
.language-option-check {
  width: 18px;
  height: 18px;
  margin-left: auto;
  color: #4d9dff;
  opacity: 0;
  transform: scale(.82);
  transition: opacity 130ms, transform 130ms;
  flex-shrink: 0;
}
.language-option-check svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}
.language-option:hover,
.language-option.is-active {
  background: rgba(77,157,255,.14);
  border-color: rgba(77,157,255,.24);
  color: #fff;
  transform: translateX(2px);
}
.language-option:hover .language-option-badge,
.language-option.is-active .language-option-badge {
  background: rgba(77,157,255,.18);
  border-color: rgba(77,157,255,.26);
  color: #d3ecff;
}
.language-option:hover .language-option-code,
.language-option.is-active .language-option-code { color: #9fd2ff; }
.language-option.is-active .language-option-check {
  opacity: 1;
  transform: scale(1);
}
.theme-toggle {
  width: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: #ffd672;
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}
.theme-toggle.is-dark { color: #eef5ff; }
.language-trigger:hover,
.theme-toggle:hover,
.language-menu.is-open .language-trigger {
  background: rgba(255,255,255,.14);
  border-color: rgba(138,197,255,.52);
  box-shadow: 0 18px 34px rgba(2,8,18,.26), 0 0 0 4px rgba(77,157,255,.12);
  transform: translateY(-1px);
}
.language-trigger:focus-visible,
.theme-toggle:focus-visible,
.language-option:focus-visible {
  outline: none;
  border-color: rgba(138,197,255,.58);
  box-shadow: 0 0 0 4px rgba(77,157,255,.18);
}

/* BUTTONS */
.button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: var(--r);
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 130ms, border-color 130ms, transform 110ms;
  text-decoration: none;
}
.button:hover, .btn:hover { transform: translateY(-1px); }

.button-primary, .btn-dl {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.button-primary:hover, .btn-dl:hover {
  background: var(--green-h);
  border-color: var(--green-h);
}
.btn-blue {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-blue:hover { background: var(--blue-h); border-color: var(--blue-h); }

.button-quiet, .btn-ghost {
  background: transparent;
  color: rgba(255,255,255,.85);
  border-color: rgba(255,255,255,.4);
}
.button-quiet:hover, .btn-ghost:hover { border-color: rgba(255,255,255,.75); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-lg { height: 48px; padding: 0 28px; font-size: .94rem; }

/* LAYOUT */
main { min-height: 70vh; }
.container { width: min(1200px, 100% - 40px); margin: 0 auto; }

/* HOME HERO */
.hero {
  background: linear-gradient(150deg, #0b1929 40%, #0d2e5c 100%);
  padding: 54px 0 50px;
  color: #fff;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0,0.9fr) minmax(360px,1.1fr);
  gap: 48px;
  align-items: center;
}
.platform-flow-layout,
.where-flow-layout {
  display: grid;
  grid-template-columns: minmax(280px,.58fr) minmax(620px,1.42fr);
  gap: 44px;
  align-items: center;
}
.platform-flow-layout .section-head,
.where-flow-layout .section-head { max-width: 430px; }
.hero h1 {
  color: #fff;
  font-size: 2.45rem;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 16px;
}
.hero .lead {
  color: rgba(255,255,255,.78);
  font-size: .96rem;
  max-width: 500px;
  margin-bottom: 22px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.micro-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }
.micro-list span {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.7);
  font-size: .78rem;
  border: 1px solid rgba(255,255,255,.16);
}

.market-hero {
  position: relative;
  isolation: isolate;
  min-height: 620px;
  padding: 0;
  overflow: hidden;
  background: #07111f;
}
.market-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5,14,27,.96) 0%, rgba(7,17,31,.78) 38%, rgba(7,17,31,.26) 72%, rgba(5,14,27,.64) 100%),
    linear-gradient(180deg, rgba(7,17,31,.18) 0%, rgba(7,17,31,.78) 100%);
}
.market-rain-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}
.market-hero-inner {
  position: relative;
  z-index: 2;
  min-height: inherit;
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(220px, 340px);
  gap: 56px;
  align-items: end;
  padding: 86px 0 70px;
}
.market-hero-copy { align-self: center; }
.market-hero .kicker {
  color: #89c8ff;
  margin-bottom: 14px;
}
.market-hero h1 {
  color: #fff;
  font-size: 3.05rem;
  line-height: 1.02;
  margin-bottom: 14px;
}
.market-hero .lead {
  color: rgba(255,255,255,.80);
  max-width: 445px;
  margin-bottom: 24px;
}
.market-hero-readout {
  justify-self: end;
  width: min(100%, 330px);
  color: rgba(255,255,255,.82);
  border-top: 1px solid rgba(255,255,255,.22);
  padding-top: 18px;
}
.readout-main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 14px;
  align-items: baseline;
  margin-bottom: 16px;
}
.readout-symbol {
  grid-column: 1 / -1;
  color: #89c8ff;
  font-size: .76rem;
  font-weight: 800;
}
.readout-main strong {
  color: #fff;
  font-size: 1.62rem;
  line-height: 1;
}
.readout-up {
  color: #42d77d;
  font-size: .92rem;
  font-weight: 800;
}
.readout-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 0;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .86rem;
}
.readout-row span { color: rgba(255,255,255,.54); }
.readout-row strong { color: #fff; font-weight: 800; }

/* INNER PAGE HERO */
.page-title {
  background: linear-gradient(150deg, #0b1929 40%, #0d2e5c 100%);
  padding: 50px 0 46px;
  color: #fff;
}
.page-title .kicker {
  color: rgba(255,255,255,.5);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 12px;
}
.page-title h1 {
  color: #fff;
  font-size: 2.35rem;
  line-height: 1.08;
  font-weight: 700;
  margin-bottom: 14px;
  max-width: 760px;
}
.page-title .lead {
  color: rgba(255,255,255,.72);
  font-size: 1rem;
  max-width: 640px;
  margin-bottom: 0;
}

.speed-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(19,88,196,.16);
  background: rgba(19,88,196,.08);
  color: var(--blue);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.speed-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 6px rgba(19,88,196,.10);
}
.hero .speed-pill,
.page-title .speed-pill {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.18);
  color: #fff;
}
.hero .speed-pill::before,
.page-title .speed-pill::before {
  box-shadow: 0 0 0 6px rgba(255,255,255,.12);
}

/* SECTIONS */
.section { padding: 58px 0; }
.section-soft {
  background: var(--soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* CTA DARK */
.cta-block {
  background: linear-gradient(150deg, #0b1929 40%, #0d2e5c 100%);
  padding: 74px 0;
  text-align: center;
  color: #fff;
}
.cta-block h2 { color: #fff; font-size: 2.1rem; margin-bottom: 12px; }
.cta-block p { color: rgba(255,255,255,.7); font-size: 1.06rem; margin-bottom: 30px; }

/* TYPOGRAPHY */
.kicker {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
}
h1 { margin-bottom: 20px; color: var(--ink); font-size: 2.6rem; line-height: 1.08; font-weight: 700; }
h2 { margin-bottom: 16px; color: var(--ink); font-size: 1.72rem; line-height: 1.2; font-weight: 700; }
h3 { margin-bottom: 8px; color: var(--ink); font-size: 1.06rem; line-height: 1.3; font-weight: 700; }
p { margin-bottom: 1rem; }
.lead { max-width: 660px; color: var(--muted); font-size: 1rem; }
.section-head { max-width: 780px; margin-bottom: 32px; }
.section-head p { color: var(--muted); }

/* DIAGRAM */
.mqr-manual-panel {
  max-width: 760px;
}
.mqr-manual-panel .section-head {
  margin-bottom: 22px;
}
.tech-panel {
  border: 1px solid rgba(12,27,46,.14);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
  box-shadow: 0 14px 34px rgba(10,24,50,.10);
  color: var(--ink);
  overflow: hidden;
}
.tech-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(12,27,46,.10);
  background: #0b1929;
  color: #fff;
}
.tech-panel-head span {
  color: rgba(255,255,255,.62);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .10em;
}
.tech-panel-head strong {
  font-size: .92rem;
  font-weight: 800;
  text-align: right;
}
.tech-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--blue);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.architecture-grid {
  display: grid;
  grid-template-columns: .9fr 1.18fr .9fr;
  gap: 1px;
  background: rgba(12,27,46,.10);
}
.architecture-column {
  min-height: 300px;
  padding: 28px 26px;
  background: rgba(255,255,255,.88);
}
.architecture-column-primary {
  background: #f0f6ff;
}
.architecture-column h3,
.compatibility-grid h3 {
  font-size: 1.18rem;
  margin-bottom: 10px;
}
.architecture-column p,
.compatibility-grid p {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
}
.tech-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
  color: #23344a;
  font-size: .88rem;
  font-weight: 700;
}
.tech-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tech-list li span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(26,140,60,.10);
}
.tech-module-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
  margin-top: 26px;
}
.tech-module-grid span {
  padding: 13px 14px;
  border: 1px solid rgba(19,88,196,.14);
  background: #fff;
  color: #0b2444;
  font-size: .82rem;
  font-weight: 800;
}
.backtest-dashboard {
  display: grid;
  grid-template-columns: minmax(340px,1.08fr) minmax(280px,.72fr) minmax(300px,.86fr);
  gap: 0;
  min-height: 286px;
}
.backtest-dashboard > section {
  padding: 24px;
  border-right: 1px solid rgba(12,27,46,.10);
}
.backtest-dashboard > section:last-child { border-right: 0; }
.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: .82rem;
}
.chart-head strong { color: var(--ink); }
.equity-bars {
  position: relative;
  height: 158px;
  display: flex;
  align-items: end;
  gap: 9px;
  padding: 18px 14px 0;
  border-left: 1px solid rgba(12,27,46,.12);
  border-bottom: 1px solid rgba(12,27,46,.12);
  background:
    repeating-linear-gradient(to top, transparent 0 35px, rgba(12,27,46,.05) 36px),
    linear-gradient(180deg, rgba(19,88,196,.04), rgba(26,140,60,.04));
}
.equity-bars i {
  flex: 1;
  min-width: 8px;
  background: linear-gradient(180deg, #1a8c3c, #66c98c);
}
.equity-line {
  height: 3px;
  margin: 16px 14px 0;
  background: linear-gradient(90deg, #1358c4, #1a8c3c);
}
.backtest-metrics {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  background: #f7fafd;
}
.backtest-metrics div {
  padding: 14px 15px;
  border: 1px solid rgba(12,27,46,.10);
  background: #fff;
}
.backtest-metrics span,
.result-table div:first-child span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.backtest-metrics strong {
  display: block;
  color: var(--ink);
  font-size: 1.38rem;
  line-height: 1.1;
  margin-top: 4px;
}
.result-table {
  display: grid;
  align-content: start;
  gap: 0;
}
.result-table div {
  display: grid;
  grid-template-columns: .55fr .85fr .7fr .9fr;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(12,27,46,.10);
  font-size: .9rem;
}
.result-table div:not(:first-child) span:nth-child(2),
.result-table div:not(:first-child) span:first-of-type {
  color: var(--green);
  font-weight: 800;
}
.compatibility-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr 1fr;
  gap: 1px;
  background: rgba(12,27,46,.10);
}
.compatibility-grid section {
  min-height: 230px;
  padding: 28px 26px;
  background: rgba(255,255,255,.90);
}
.compatibility-core {
  background: #f0f6ff !important;
}
.compatibility-core strong {
  display: inline-flex;
  margin-top: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(19,88,196,.18);
  background: #fff;
  color: var(--blue);
  font-size: .86rem;
}
.compatibility-status {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 1px;
  background: rgba(12,27,46,.10);
  border-top: 1px solid rgba(12,27,46,.10);
}
.compatibility-status span {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: #fff;
  color: #23344a;
  font-size: .84rem;
  font-weight: 800;
}
.compatibility-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}
/* FEATURE ITEMS (left-border style) */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 24px;
}
.feat-grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.feat-item {
  padding: 28px 26px;
  border-left: 3px solid var(--blue);
  background: var(--soft);
  border-radius: 0 var(--r) var(--r) 0;
}
.feat-item.green { border-color: var(--green); }
.feat-item.gold  { border-color: var(--gold); }
.feat-item h3 { margin-bottom: 8px; font-size: 1.08rem; }
.feat-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(199,138,0,.13);
  color: #9a6a00;
  border: 1px solid rgba(199,138,0,.22);
  vertical-align: middle;
  margin-left: 5px;
  line-height: 1.6;
}
.feat-item p { margin-bottom: 0; color: var(--muted); font-size: .96rem; }

/* CARDS */
.card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.card-grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.card-grid.four { grid-template-columns: repeat(4,minmax(0,1fr)); }
.card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  display: block;
  transition: box-shadow 140ms, border-color 140ms;
}
.card:hover { box-shadow: var(--sh); border-color: #b8cadf; }
.card h3 { font-size: 1.02rem; }
.card p { margin-bottom: 0; color: var(--muted); font-size: .94rem; }
.icon-box { display: none; }

/* FLOW STRIP */
.flow-strip {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--panel);
}
.flow-step {
  padding: 24px 20px;
  border-right: 1px solid var(--line);
  border-top: 3px solid var(--blue);
}
.flow-step:last-child { border-right: none; }
.step-number {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  margin-bottom: 12px;
}
.flow-step h3 { font-size: 1rem; margin-bottom: 6px; }
.flow-step p { margin-bottom: 0; color: var(--muted); font-size: .91rem; }

/* BADGES */
.badge-grid, .logo-wall { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.market-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  transition: border-color 130ms;
}
.market-badge:hover { border-color: var(--blue); }
.badge-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--hero);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .78rem;
}
.badge-logo {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  object-fit: contain;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.market-badge strong { display: block; font-size: .9rem; color: var(--ink); font-weight: 600; }
.market-badge span { display: block; font-size: .78rem; color: var(--muted); }
.market-group + .market-group { margin-top: 28px; }
.market-group h3 { margin-bottom: 14px; font-size: 1.04rem; }
.market-group-copy {
  margin: 0 0 14px;
  max-width: 760px;
  color: var(--muted);
  font-size: .94rem;
}

/* MEDIA SHOWCASE */
.section-media { padding-top: 18px; }
.media-showcase {
  display: grid;
  grid-template-columns: minmax(0,1.35fr) minmax(320px,.65fr);
  gap: 18px;
  align-items: stretch;
}
.media-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--sh);
}
.media-card-large { display: grid; grid-template-rows: auto 1fr; }
.media-stack { display: grid; gap: 18px; }
.media-frame {
  position: relative;
  background: #07111f;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.platform-media,
.media-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame.media-missing .platform-media,
.media-thumb.media-missing img { display: none; }
.media-fallback {
  display: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px) 0 0 / 100% 12.5%,
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px) 0 0 / 10% 100%,
    radial-gradient(circle at 72% 28%, rgba(77,157,255,.18), transparent 34%),
    #101820;
}
.media-frame.media-missing .media-fallback,
.media-thumb.media-missing .media-fallback { display: block; }
.media-fallback-light {
  background:
    linear-gradient(rgba(19,88,196,.08) 1px, transparent 1px) 0 0 / 100% 12.5%,
    linear-gradient(90deg, rgba(19,88,196,.06) 1px, transparent 1px) 0 0 / 10% 100%,
    #f7fbff;
}
.media-fallback::before {
  content: "";
  position: absolute;
  left: 9%;
  right: 7%;
  top: 59%;
  height: 3px;
  background: #28c4d6;
  transform: rotate(-12deg);
  transform-origin: left center;
  border-radius: 10px;
  opacity: .9;
}
.media-fallback::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 12%;
  top: 46%;
  height: 22%;
  background: linear-gradient(135deg, rgba(44,191,100,.34), rgba(77,157,255,.16));
  clip-path: polygon(0 85%, 10% 62%, 18% 74%, 26% 38%, 36% 45%, 48% 18%, 58% 34%, 68% 25%, 78% 8%, 88% 30%, 100% 12%, 100% 100%, 0 100%);
}
.media-fallback span {
  position: absolute;
  bottom: 15%;
  width: 8px;
  height: 30px;
  background: #fff;
  border: 1px solid rgba(40,196,214,.68);
  box-shadow: 26px -42px 0 -1px #2cbf64, 52px -18px 0 -1px #fff, 78px -68px 0 -1px #2cbf64, 104px -36px 0 -1px #fff, 130px -92px 0 -1px #2cbf64;
}
.media-fallback span:nth-child(1) { left: 18%; }
.media-fallback span:nth-child(2) { left: 42%; bottom: 27%; }
.media-fallback span:nth-child(3) { left: 66%; bottom: 35%; }
.media-fallback i {
  position: absolute;
  left: 22%;
  right: 18%;
  top: 30%;
  height: 20%;
  background: rgba(19,88,196,.11);
  border-top: 2px solid rgba(19,88,196,.35);
  transform: skewY(-7deg);
}
.media-caption {
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line);
}
.media-caption.compact { padding: 14px 16px 16px; }
.media-caption h3 { margin-bottom: 6px; font-size: 1rem; }
.media-caption p { margin-bottom: 0; color: var(--muted); font-size: .92rem; }
.media-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}
.media-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--panel);
  overflow: hidden;
}
.media-thumb .media-fallback { display: block; }
.media-thumb:not(.media-missing) .media-fallback { display: none; }

.section-media-platform { padding-top: 26px; }
.presentation-card { margin-bottom: 24px; }
.presentation-frame {
  aspect-ratio: 16 / 9;
  background: #02060c;
}
.presentation-frame .presentation-video {
  object-fit: contain;
  background: #02060c;
}
.presentation-frame iframe.presentation-video {
  border: 0;
}
.presentation-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5.2%;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 0 5.5%;
  pointer-events: none;
}
.presentation-overlay.is-hidden {
  display: none;
}
.presentation-overlay-text {
  display: inline;
  max-width: min(100%, 980px);
  color: #ffffff;
  background: rgba(10, 14, 20, .68);
  padding: .18em .38em;
  border-radius: 2px;
  font-family: "Segoe UI", system-ui, Arial, sans-serif;
  font-size: clamp(.86rem, .99vw, 1.03rem);
  font-weight: 600;
  line-height: 1.24;
  text-align: center;
  white-space: pre-line;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .42);
}
.presentation-caption {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.presentation-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.presentation-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.presentation-meta {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
}
.presentation-caption-toggle {
  min-width: 174px;
}
.presentation-caption-toggle.is-active {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(19,88,196,.08);
}
.presentation-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.presentation-topics span {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: .8rem;
  font-weight: 600;
}
.presentation-note {
  margin-bottom: 0;
  color: var(--muted);
  font-size: .92rem;
}
.media-showcase-platform {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.section-media-platform .platform-media {
  object-fit: cover;
  object-position: center;
  background: transparent;
}
.media-showcase-platform .media-card-hero .media-frame {
  aspect-ratio: 16 / 9;
}
.media-grid-videos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.media-grid-videos .media-frame {
  aspect-ratio: 16 / 9;
}

/* INDICATOR TABLE */
.table-list { display: flex; flex-direction: column; }
.table-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: .96rem;
}
.table-row:first-child { border-top: 1px solid var(--line); }
.table-row strong { flex: 0 0 200px; color: var(--ink); font-weight: 600; }
.table-row span { color: var(--muted); }

/* CODE */
.code-panel { background: #0e1c30; border-radius: var(--r); overflow: hidden; }
.code-title {
  padding: 10px 16px;
  background: #172b44;
  color: rgba(255,255,255,.55);
  font-family: monospace;
  font-size: .82rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.code-panel pre { margin: 0; padding: 20px 18px; overflow-x: auto; }
.code-panel code { color: #c8e0ff; font-family: "Cascadia Code","Consolas",monospace; font-size: .88rem; line-height: 1.7; white-space: pre; }

/* DOWNLOAD PANEL */
.download-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.download-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 32px 36px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.download-panel h2 { margin-bottom: 8px; }
.download-panel p { margin-bottom: 0; color: var(--muted); max-width: 500px; }
.download-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.setup-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 800px;
  margin: 0 auto;
}
.setup-step {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.setup-print {
  max-width: 100%;
  border-radius: calc(var(--r) - 2px);
  box-shadow: 0 8px 30px rgba(15,35,65,.1);
  border: 1px solid rgba(15,35,65,.1);
  display: block;
  height: auto;
}

.setup-step-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.setup-step-head .step-number {
  flex: 0 0 auto;
}
.setup-step h3 {
  margin-bottom: 6px;
  font-size: 1.02rem;
}
.setup-step p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: .92rem;
}

/* NOTE */
.note {
  padding: 12px 16px;
  background: var(--soft);
  border-left: 3px solid var(--line);
  color: var(--muted);
  font-size: .88rem;
  border-radius: 0 var(--r) var(--r) 0;
  margin-top: 18px;
}

.download-panel .note {
  background: linear-gradient(135deg, rgba(255, 236, 214, .95), rgba(255, 224, 224, .93));
  border: 1px solid rgba(208, 83, 26, .28);
  border-left: 4px solid #d0531a;
  color: #7a2f12;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(208, 83, 26, .12);
}

html[data-theme="dark"] .button-quiet,
html[data-theme="dark"] .btn-ghost {
  color: rgba(255,255,255,.9);
  border-color: rgba(255,255,255,.35);
}
html[data-theme="dark"] .language-list,
html[data-theme="dark"] .theme-list { background: #fff; border-color: rgba(15,35,65,.12); }
html[data-theme="dark"] .language-option,
html[data-theme="dark"] .theme-option { color: #536070; }
html[data-theme="dark"] .language-option .lang-badge { color: #536b8a; }
html[data-theme="dark"] .language-option:hover,
html[data-theme="dark"] .language-option.is-active,
html[data-theme="dark"] .theme-option:hover,
html[data-theme="dark"] .theme-option.is-active { background: #eaf2ff; color: #0b62d8; }
html[data-theme="dark"] .language-option.is-active .lang-badge { color: #0b62d8; }
html[data-theme="dark"] .speed-pill {
  background: rgba(77,157,255,.14);
  border-color: rgba(77,157,255,.24);
  color: #9fd2ff;
}
html[data-theme="dark"] .speed-pill::before { box-shadow: 0 0 0 6px rgba(77,157,255,.14); }
html[data-theme="dark"] .hero .speed-pill,
html[data-theme="dark"] .page-title .speed-pill {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.18);
  color: #fff;
}
html[data-theme="dark"] .hero .speed-pill::before,
html[data-theme="dark"] .page-title .speed-pill::before { box-shadow: 0 0 0 6px rgba(255,255,255,.12); }
html[data-theme="dark"] .feat-badge {
  background: rgba(228,166,42,.14);
  border-color: rgba(228,166,42,.24);
  color: #ffd470;
}
html[data-theme="dark"] .section-soft { background: #091526; }
html[data-theme="dark"] .card,
html[data-theme="dark"] .feat-item,
html[data-theme="dark"] .flow-strip,
html[data-theme="dark"] .flow-step,
html[data-theme="dark"] .market-badge,
html[data-theme="dark"] .download-panel,
html[data-theme="dark"] .setup-step { color: var(--ink); }
html[data-theme="dark"] .download-panel .note {
  background: linear-gradient(135deg, rgba(154, 61, 23, .34), rgba(132, 30, 30, .34));
  border-color: rgba(255, 146, 88, .42);
  border-left-color: #ff9258;
  color: #ffd9c3;
  box-shadow: 0 10px 26px rgba(255, 146, 88, .14);
}
html[data-theme="dark"] .presentation-meta,
html[data-theme="dark"] .presentation-topics span {
  background: rgba(77,157,255,.10);
  border-color: rgba(77,157,255,.18);
  color: var(--ink);
}
html[data-theme="dark"] .presentation-caption-toggle.is-active {
  background: rgba(77,157,255,.14);
  border-color: rgba(77,157,255,.28);
  color: #9fd2ff;
}
html[data-theme="dark"] .setup-print {
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
}
html[data-theme="dark"] .tech-panel {
  border-color: rgba(77,157,255,.18);
  background: linear-gradient(180deg, #0d1a2c 0%, #091526 100%);
  box-shadow: 0 18px 46px rgba(0,0,0,.34);
}
html[data-theme="dark"] .architecture-grid,
html[data-theme="dark"] .compatibility-grid,
html[data-theme="dark"] .compatibility-status { background: rgba(255,255,255,.08); }
html[data-theme="dark"] .architecture-column,
html[data-theme="dark"] .compatibility-grid section,
html[data-theme="dark"] .compatibility-status span,
html[data-theme="dark"] .backtest-metrics,
html[data-theme="dark"] .backtest-metrics div {
  background: #0d1a2c;
  color: var(--ink);
}
html[data-theme="dark"] .architecture-column-primary,
html[data-theme="dark"] .compatibility-core { background: #10213a !important; }
html[data-theme="dark"] .tech-list,
html[data-theme="dark"] .compatibility-status span,
html[data-theme="dark"] .tech-module-grid span { color: var(--ink); }
html[data-theme="dark"] .tech-module-grid span,
html[data-theme="dark"] .compatibility-core strong { background: #091526; }
html[data-theme="dark"] .equity-bars {
  border-color: rgba(255,255,255,.14);
  background:
    repeating-linear-gradient(to top, transparent 0 35px, rgba(255,255,255,.05) 36px),
    linear-gradient(180deg, rgba(77,157,255,.05), rgba(44,191,100,.05));
}

/* INLINE ACTIONS */
.inline-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* FOOTER */
.footer {
  background: var(--nav);
  color: rgba(255,255,255,.5);
  font-size: .88rem;
  padding: 28px 0;
}
.footer-inner {
  width: min(1200px, 100% - 40px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  gap: 18px;
}
.footer-inner > :first-child { justify-self: start; }
.footer-inner > :last-child {
  justify-self: end;
  text-align: right;
}
.footer-inner a { color: rgba(255,255,255,.6); }
.footer-inner a:hover { color: #fff; }

.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.footer-social-link {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.8);
  transition: transform 130ms, border-color 130ms, background 130ms, color 130ms;
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.12);
  color: #fff;
}

.footer-social-link:focus-visible {
  outline: 2px solid rgba(77,157,255,.45);
  outline-offset: 2px;
}

.footer-social-icon {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
}

.footer-social-icon svg {
  width: 100%;
  height: 100%;
}

html[data-theme="dark"] .footer-social-link {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: rgba(237,245,255,.8);
}

html[data-theme="dark"] .footer-social-link:hover,
html[data-theme="dark"] .footer-social-link:focus-visible {
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: #fff;
}

html[data-theme="dark"] .footer-social-link:focus-visible {
  outline-color: rgba(123,183,255,.32);
}

/* RESPONSIVE */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .platform-flow-layout,
  .where-flow-layout { grid-template-columns: 1fr; }
  .architecture-grid,
  .backtest-dashboard,
  .compatibility-grid { grid-template-columns: 1fr; }
  .architecture-column,
  .compatibility-grid section { min-height: auto; }
  .backtest-dashboard > section { border-right: 0; border-bottom: 1px solid rgba(12,27,46,.10); }
  .backtest-dashboard > section:last-child { border-bottom: 0; }
  .compatibility-status { grid-template-columns: 1fr; }
  .market-hero { min-height: 690px; }
  .market-hero::before {
    background:
      linear-gradient(180deg, rgba(5,14,27,.96) 0%, rgba(7,17,31,.74) 54%, rgba(7,17,31,.86) 100%);
  }
  .market-hero-inner {
    grid-template-columns: 1fr;
    gap: 38px;
    align-items: end;
    padding: 78px 0 52px;
  }
  .market-hero-readout { justify-self: start; max-width: 360px; }
  .hero h1 { font-size: 2.05rem; }
  .market-hero h1 { font-size: 2.75rem; }
  .page-title h1 { font-size: 2rem; }
  .feat-grid { grid-template-columns: 1fr; gap: 14px; }
  .media-showcase { grid-template-columns: 1fr; }
  .presentation-head { flex-direction: column; }
  .media-showcase-platform .media-card-hero .media-frame { aspect-ratio: 16 / 9; }
  .media-grid-videos { grid-template-columns: 1fr; gap: 16px; }
  .badge-grid, .logo-wall, .card-grid.four { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 660px) {
  .nav-links { display: none; }
  .navbar { width: min(100% - 24px, 1200px); gap: 12px; }
  .nav-actions .button-primary { display: none; }
  .market-hero { min-height: 650px; }
  .market-hero-inner { padding: 58px 0 42px; gap: 30px; }
  .hero h1 { font-size: 1.85rem; }
  .market-hero h1 { font-size: 2.2rem; }
  .market-hero .lead { font-size: .94rem; }
  .market-hero .hero-actions .button { width: 100%; justify-content: center; }
  .market-hero-readout { width: 100%; }
  .readout-main strong { font-size: 1.35rem; }
  .page-title h1 { font-size: 1.65rem; }
  h2 { font-size: 1.45rem; }
  .container { width: min(100% - 24px, 1200px); }
  .flow-strip { grid-template-columns: 1fr 1fr; }
  .table-row { flex-direction: column; gap: 6px; }
  .table-row strong { flex-basis: auto; }
  .badge-grid, .logo-wall, .card-grid, .card-grid.four { grid-template-columns: 1fr; }
  .media-split { grid-template-columns: 1fr; }
  .presentation-actions { align-items: stretch; }
  .presentation-meta,
  .presentation-caption-toggle { width: 100%; justify-content: center; }
  .presentation-overlay {
    bottom: 7%;
    padding: 0 4.5%;
  }
  .presentation-overlay-text {
    font-size: clamp(.75rem, 2.85vw, .9rem);
    line-height: 1.22;
  }
  .download-panel { flex-direction: column; align-items: flex-start; }
  .cta-block h2 { font-size: 1.9rem; }
  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .footer-inner > :first-child,
  .footer-inner > :last-child {
    justify-self: center;
    text-align: center;
  }
}


