:root { --ease: cubic-bezier(0.16,1,0.3,1); }
html { scroll-behavior: smooth; }
body { background: #E8EBEF; color: #0E1116; font-family: 'Space Grotesk', sans-serif; }
.mono { font-family: 'JetBrains Mono', monospace; }
.hairline { border-color: #7D8390; }
.divide-y.hairline > :not([hidden]) ~ :not([hidden]) { border-color: #7D8390; }
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(14,17,22,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14,17,22,0.06) 1px, transparent 1px);
  background-size: 42px 42px;
}
.fade-mask-r { mask-image: linear-gradient(to right, black 85%, transparent 100%); }

/* ticker marquee - the one allowed marquee, used once per page max */
.ticker-track { display: flex; width: max-content; animation: ticker-scroll 26s linear infinite; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.btn-primary {
  background: #10B981; color: #06130D; transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  box-shadow: 0 8px 20px -8px rgba(16,185,129,.45);
}
.btn-primary:hover { transform: translateY(-2px); background: #059669; box-shadow: 0 10px 26px -6px rgba(16,185,129,.55); }
.btn-primary:active { transform: translateY(0) scale(.98); }
.btn-ghost { transition: border-color .3s var(--ease), color .3s var(--ease); }
.btn-ghost:hover { border-color: #10B981; color: #065F46; }
.btn-ghost:active { transform: scale(.98); }

.row-hover { transition: background-color .3s var(--ease); }
.row-hover:hover { background-color: rgba(14,17,22,0.035); }

.reveal { opacity: 0; transform: translateY(28px); }

.pill { transition: all .3s var(--ease); }
.pill[data-active="true"] { background: #059669; color: #06130D; border-color: #059669; }

/* track/thumb darkened from the base #10B981/rgba(14,17,22,.1) so the slider is
   perceivable as a component against the light page bg (WCAG 1.4.11, >=3:1) */
input[type=range] { -webkit-appearance: none; height: 2px; background: rgba(14,17,22,0.5); border-radius: 0; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; background: #059669; border-radius: 2px; cursor: pointer;
  box-shadow: 0 0 0 4px rgba(5,150,105,0.2);
}
input[type=range]::-moz-range-thumb {
  width: 16px; height: 16px; background: #059669; border: none; border-radius: 2px; cursor: pointer;
}

#mobile-menu { transform: translateY(-100%); transition: transform .4s var(--ease); }
#mobile-menu.open { transform: translateY(0); }

.nav-link[data-active="true"] { color: #0E1116; }
.nav-link[data-active="true"]::after { content: ''; display: block; height: 1px; background: #10B981; margin-top: 4px; }

/* Banner A - fee flow infographic (stages connected by a rail + traveling token) */
.flow-track { position: relative; min-height: 1px; }
.flow-rail { position: absolute; left: 0; right: 0; top: 34px; height: 2px; background: #7D8390; z-index: 0; }
.flow-token {
  position: absolute; left: 0%; top: 34px; width: 10px; height: 10px;
  border-radius: 50%; background: #059669; box-shadow: 0 0 0 4px rgba(5,150,105,.18); z-index: 0;
  transform: translate(-50%, -50%);
}
/* opaque panel-colour fill masks the rail/token where they pass behind a stage's
   figures (OKX logo, $ amounts, split bar) - line + token only show in the gaps
   between stages, never crossing text. Matches ambient card bg so it's invisible. */
.flow-stage { position: relative; z-index: 1; background: #F2F4F6; }
.flow-arrow { color: #7D8390; font-size: 16px; flex: none; }
.split-ribbon { display: flex; height: 28px; border-radius: 2px; overflow: hidden; background: #E8EBEF; width: 100%; }
.split-seg { display: flex; align-items: center; justify-content: center; }
.split-seg-back { background: #059669; color: #06130D; }
.split-seg-cost { background: #7D8390; color: #0E1116; }
@media (max-width: 1023px) {
  .flow-rail { left: 50%; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .flow-token { left: 50%; top: 0%; }
}

/* Banner B - UID/referral steps */
.uid-step { border: 1px solid #7D8390; background: #F2F4F6; transition: border-color .3s var(--ease), background .3s var(--ease); }
.uid-step[data-lit="true"] { border-color: #059669; background: rgba(16,185,129,.08); }
.uid-chip { border: 1px solid #059669; color: #065F46; }
.uid-dash-line { stroke: #10B981; stroke-dasharray: 4 4; fill: none; stroke-width: 1.5; }

/* Banner C - decision branches */
.branch-path { fill: none; stroke: #0E1116; stroke-opacity: .3; stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; }
.branch-path.mint { stroke: #10B981; stroke-opacity: .9; }

/* Banner D/E - payout timeline + exchange-statement card */
.payout-timeline { position: relative; display: flex; justify-content: space-between; gap: .5rem; margin-bottom: 1.5rem; }
.payout-timeline::before { content: ''; position: absolute; left: 6px; right: 6px; top: 6px; height: 2px; background: #7D8390; }
.payout-node { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: .5rem; flex: 1; text-align: center; }
.payout-dot { width: 12px; height: 12px; border-radius: 50%; background: #F2F4F6; border: 2px solid #7D8390; transition: background .3s var(--ease), border-color .3s var(--ease); }
.payout-node[data-done="true"] .payout-dot { background: #059669; border-color: #059669; }
.statement-card { border: 1px solid #7D8390; border-radius: 2px; overflow: hidden; }
.statement-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem .9rem; background: #F2F4F6; border-bottom: 1px solid #7D8390; }
.statement-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem .9rem; opacity: 0; transform: translateX(-12px); }
.statement-row:not(:last-child) { border-bottom: 1px solid rgba(125,131,144,.35); }
.statement-row[data-in="true"] { opacity: 1; transform: none; transition: opacity .45s var(--ease), transform .45s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  .ticker-track { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
