:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-deep: #050d18;
  --card: rgba(10, 21, 37, 0.94);
  --card-soft: rgba(18, 29, 46, 0.94);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #edf2ff;
  --muted: #91a4c3;
  --accent: #5aa9ff;
  --green: #33d17a;
  --blue: #4d88ff;
  --orange: #ff9f43;
  --red: #ff6b7d;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.035), transparent 14%),
    linear-gradient(180deg, #010305 0%, #04070c 38%, #050912 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,0.055), transparent 18%),
    linear-gradient(180deg, rgba(255,255,255,0.015), transparent 22%),
    radial-gradient(circle at 50% 120%, rgba(0,0,0,0.82), rgba(0,0,0,0.15) 45%, transparent 72%);
  opacity: 0.9;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, transparent 0%, rgba(0,0,0,0.18) 55%, rgba(0,0,0,0.48) 100%);
  z-index: 0;
}

.fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.78;
  z-index: 0;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(88px);
  pointer-events: none;
  opacity: 0.10;
  z-index: 0;
  animation: floatAmbient 14s ease-in-out infinite;
}

.ambient-one {
  width: 340px;
  height: 340px;
  top: 80px;
  left: -100px;
  background: rgba(255, 255, 255, 0.08);
}

.ambient-two {
  width: 280px;
  height: 280px;
  top: 360px;
  right: -70px;
  background: rgba(255, 255, 255, 0.06);
  animation-delay: -5s;
}

.page-shell {
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
  position: relative;
  z-index: 1;
}

.top-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 10px 16px;
  margin-bottom: 18px;
  border-radius: 18px;
}

.top-strip-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.top-strip-logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  flex: 0 0 auto;
}

.top-strip-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.05;
}

.top-strip-brand-kicker {
  color: #8ebeff;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.62rem;
  font-weight: 700;
}

.top-strip-brand-name {
  color: #f3f7ff;
  font-size: 0.9rem;
  font-weight: 800;
}

.exchange-ribbon {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  margin-bottom: 20px;
}

.exchange-ribbon-label {
  color: #8ebeff;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.exchange-ribbon-viewport {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, black 12%, black 88%, transparent 100%);
}

.exchange-ribbon-track {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  animation: tickerScroll 54s linear infinite;
}

.exchange-ribbon:hover .exchange-ribbon-track {
  animation-play-state: paused;
}

.exchange-ribbon-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  white-space: nowrap;
}

.exchange-ribbon-name {
  color: #dbe7fa;
  font-weight: 600;
}

.reveal-target {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-target.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.value-pulse {
  animation: valuePulse 0.65s ease;
}

.top-strip-promo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  min-width: 0;
  flex: 1 1 auto;
}

#promoStripText {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-strip-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(90,169,255,0.16);
  color: #d7e7ff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.top-strip-nav {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.top-strip-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.top-strip-nav a:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.site-footer {
  margin-top: 28px;
  padding: 28px 34px;
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(160px, 0.8fr) minmax(160px, 0.8fr) minmax(220px, 1fr);
  gap: 28px;
  align-items: start;
}

.site-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.site-footer-logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.site-footer-logo {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  flex: 0 0 auto;
}

.site-footer-brand-name {
  color: #f3f7ff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-footer-copy {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}

.site-footer-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-footer-links a,
.site-footer-contact a {
  color: var(--text-soft);
  font-size: 0.98rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.site-footer-links a:hover,
.site-footer-contact a:hover {
  color: #f3f7ff;
}

.site-footer-contact {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.legal-shell {
  display: grid;
  gap: 24px;
}

.legal-hero {
  padding: 32px 34px;
  display: grid;
  gap: 18px;
}

.legal-eyebrow {
  color: #8ebeff;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 800;
}

.legal-hero h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.legal-hero p {
  margin: 0;
  max-width: 860px;
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.75;
}

.legal-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
  color: var(--text-soft);
  font-weight: 600;
}

.legal-meta-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #33d17a;
  flex: 0 0 auto;
}

.legal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 24px;
}

.legal-article,
.legal-aside {
  padding: 30px 34px;
}

.legal-article {
  display: grid;
  gap: 26px;
}

.legal-section {
  display: grid;
  gap: 10px;
}

.legal-section h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.legal-section p,
.legal-section li {
  color: var(--text-soft);
  line-height: 1.75;
  font-size: 0.98rem;
}

.legal-section p {
  margin: 0;
}

.legal-section ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.legal-aside {
  display: grid;
  gap: 16px;
  align-content: start;
}

.legal-aside-card {
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
}

.legal-aside-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.legal-aside-card strong,
.legal-aside-card a {
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.legal-aside-card a:hover {
  color: #ffffff;
}

.card {
  position: relative;
  overflow: hidden;
  background: rgba(10, 14, 20, 0.84);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: fadeUp 0.7s ease both;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), transparent 24%);
  pointer-events: none;
}

.eyebrow, .section-kicker, .panel-label, .metric-label, .search-box span {
  color: #8ebeff;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 700;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.95fr);
  gap: 20px;
  margin-bottom: 20px;
}

.hero-copy, .hero-panel {
  padding: 32px;
}

.hero-copy::before,
.hero-panel::before {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 180px;
  height: 2px;
  background: linear-gradient(90deg, rgba(90,169,255,0.85), rgba(90,169,255,0));
  opacity: 0.65;
}

.hero-copy h1 {
  margin: 12px 0 14px;
  font-size: clamp(2.6rem, 4vw, 4.6rem);
  line-height: 1.02;
  max-width: 760px;
}

.hero-copy p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.06rem;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.asset-switcher {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.asset-chip {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.asset-chip:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: var(--border-strong);
}

.asset-chip.active {
  color: #fff;
  background: rgba(90,169,255,0.16);
  border-color: rgba(90,169,255,0.32);
}

.hero-cta-row {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.hero-cta:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.hero-cta-primary {
  background: linear-gradient(180deg, #315f9d, #254977);
}

.hero-cta-secondary {
  background: rgba(255,255,255,0.04);
}

.status-pill, .countdown-pill, .delta-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.05);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(51, 209, 122, 0.52);
  animation: pulseDot 1.8s ease infinite;
}

.countdown-pill strong { color: var(--text); }

.hero-metrics {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.hero-metric-card {
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.hero-metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.05);
}

.hero-metric-card span, .metric-card p, .route-leg span, .route-summary span,
.calculator-field small, .calculator-footnote, .arb-row span, .profit-box span, th, td, .empty-state,
.search-box input, .input-prefix span {
  color: var(--muted);
}

.hero-metric-card strong, .metric-card strong, .route-leg strong, .route-summary strong {
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
  color: var(--text);
}

.hero-panel {
  display: flex;
  flex-direction: column;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-head h2 {
  margin: 8px 0 0;
  font-size: 2.2rem;
}

.delta-badge.positive { color: #baf7d6; background: rgba(51,209,122,0.14); }
.delta-badge.negative { color: #ffd0d7; background: rgba(255,107,125,0.14); }
.delta-badge.neutral { color: #ffe2ad; background: rgba(255,159,67,0.14); }

.route-legs {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.route-leg {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.route-leg p {
  margin: 8px 0 0;
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 700;
}

.route-arrow {
  font-size: 1.7rem;
  color: #8ebeff;
  font-weight: 700;
  animation: moveArrow 1.8s ease-in-out infinite;
}

.route-summary {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.route-summary > div {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.route-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 18px;
}

.primary-button, .range-switcher button, .th-sort-btn, .arb-action, .table-pagination-button, .table-pagination-page {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.primary-button {
  height: 48px;
  border-radius: 14px;
  background: #27456f;
  color: #fff;
  font-weight: 700;
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.route-action-buy { background: #1f7a48; }
.route-action-sell { background: #295aa8; }

.scanner-marquee {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  margin-bottom: 20px;
}

.scanner-marquee-label {
  color: #8ebeff;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.scanner-marquee-viewport {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, black 12%, black 88%, transparent 100%);
}

.scanner-marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  animation: tickerScroll 44s linear infinite;
}

.scanner-marquee:hover .scanner-marquee-track {
  animation-play-state: paused;
}

.ticker-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  white-space: nowrap;
}

.ticker-pill-pair {
  color: #dce8ff;
  font-weight: 700;
}

.ticker-pill-route { color: var(--muted); }
.ticker-pill-spread { color: #baf7d6; }
.scanner-marquee-empty { color: var(--muted); }

.dashboard { display: grid; gap: 20px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-card {
  padding: 22px;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: rgba(15, 28, 48, 0.98);
}

.metric-card strong {
  font-size: 1.7rem;
  margin-top: 12px;
}

.metric-card p {
  margin: 10px 0 0;
  line-height: 1.55;
}

.strip-card, .table-card, .calculator-card, .chart-card {
  padding: 24px;
}

.card-head, .markets-head, .strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card-head h3 {
  margin: 8px 0 0;
  font-size: 1.5rem;
}

.range-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.05);
}

.range-switcher button {
  min-width: 56px;
  height: 40px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.range-switcher button.active {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

.range-switcher button:hover { transform: translateY(-1px); }

.chart-canvas-wrap {
  height: 340px;
  margin-top: 20px;
}

.spread-card-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.opportunities-layout {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
  align-items: stretch;
}

.opportunity-featured {
  padding: 24px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.07);
  background:
    radial-gradient(circle at top right, rgba(90,169,255,0.14), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.opportunity-featured-header,
.opportunity-featured-metrics,
.opportunity-featured-route {
  display: flex;
  align-items: center;
}

.opportunity-featured-header,
.opportunity-featured-metrics {
  justify-content: space-between;
  gap: 12px;
}

.opportunity-featured-kicker {
  color: #8ebeff;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
}

.opportunity-featured-spread {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(51,209,122,0.12);
  color: #baf7d6;
  font-weight: 800;
}

.opportunity-featured-pair {
  margin: 16px 0 0;
  font-size: 2rem;
}

.opportunity-featured-route {
  gap: 14px;
  margin-top: 22px;
}

.opportunity-featured-leg {
  flex: 1;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.035);
}

.opportunity-featured-leg span {
  color: var(--muted);
  font-size: 0.9rem;
}

.opportunity-featured-leg strong {
  display: block;
  margin-top: 12px;
  font-size: 1.2rem;
}

.opportunity-featured-arrow {
  color: #8ebeff;
  font-size: 1.6rem;
  font-weight: 800;
}

.opportunity-featured-metrics {
  margin-top: auto;
  padding-top: 18px;
}

.opportunity-featured-metrics > div {
  flex: 1;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.06);
}

.opportunity-featured-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.opportunity-featured-metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
}

.spread-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
  animation: fadeUp 0.55s ease both;
  animation-delay: var(--card-delay, 0ms);
}

.spread-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
}

.spread-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.spread-card-pair {
  display: block;
  color: #8ebeff;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.spread-card-spread {
  display: block;
  margin-top: 8px;
  font-size: 1.5rem;
}

.spread-card-route {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.spread-card-exchange {
  min-height: 68px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.spread-card-arrow {
  color: #8ebeff;
  font-weight: 700;
}

.spread-card-exchange .exchange-brand { justify-content: flex-start; }

.search-box { min-width: 260px; }

.search-box input, .input-prefix, .market-combobox-trigger {
  width: 100%;
  margin-top: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  font: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.search-box input {
  padding: 13px 14px;
}

.search-box input:focus,
.market-combobox-search input:focus,
.input-prefix:focus-within,
.market-combobox.open .market-combobox-trigger,
.market-combobox-trigger:focus {
  outline: none;
  border-color: rgba(90,169,255,0.45);
  background: rgba(255,255,255,0.06);
}

.table-wrap {
  margin-top: 20px;
  overflow: auto;
}

.table-wrap table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.col-rank { width: 56px; }
.col-pair { width: 150px; }
.col-exchange { width: 250px; }
.col-price { width: 140px; }
.col-volume { width: 140px; }
.col-volume-share { width: 150px; }

th, td {
  padding: 18px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

th {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

tbody tr {
  animation: fadeUp 0.45s ease both;
  animation-delay: var(--row-delay, 0ms);
}

tbody tr:hover {
  background: rgba(255,255,255,0.025);
}

.th-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.th-sort {
  display: inline-flex;
  gap: 4px;
}

.th-sort-btn {
  background: transparent;
  color: var(--muted);
  padding: 0;
  min-width: 16px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.th-sort-btn.active { color: #8ebeff; }

.th-sort-btn:hover {
  color: #dbe8ff;
  transform: translateY(-1px);
}

.rank-cell, .buy-price-cell, .sell-price-cell, .net-spread-cell, .profit-usd-cell {
  font-variant-numeric: tabular-nums;
}

.table-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.06);
  font-weight: 800;
}

.table-badge.positive {
  background: rgba(51,209,122,0.10);
  color: #baf7d6;
}

.table-badge.negative {
  background: rgba(255,107,125,0.10);
  color: #ffd0d7;
}

.profit-cell-wrap {
  display: grid;
  gap: 4px;
}

.table-pagination {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.table-pagination-info { color: var(--muted); }

.table-pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-pagination-pages {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-pagination-button, .table-pagination-page {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--text);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.table-pagination-page.active {
  background: rgba(90,169,255,0.16);
  color: #fff;
}

.table-pagination-button:hover:not(:disabled),
.table-pagination-page:hover:not(.active) {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.table-pagination-gap { color: var(--muted); }

.calculator-controls, .calculator-layout {
  display: grid;
  gap: 18px;
}

.calculator-controls {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.calculator-field { display: block; }

.calculator-field small {
  display: block;
  margin-top: 8px;
}

.input-prefix {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: rgba(6, 13, 25, 0.95);
}

.input-prefix input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.market-combobox {
  position: relative;
  margin-top: 8px;
}

.market-combobox-trigger {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  color: var(--text);
}

.market-combobox-trigger-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.market-combobox-trigger-label span:last-child,
.market-combobox-option-title-text,
.exchange-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-combobox-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 40;
  border-radius: 18px;
  border: 1px solid rgba(110, 160, 255, 0.16);
  background: linear-gradient(180deg, rgba(17, 27, 43, 0.98), rgba(14, 21, 35, 0.98));
  box-shadow: 0 18px 44px rgba(0,0,0,0.34);
  overflow: hidden;
  animation: fadeScale 0.2s ease;
  transform-origin: top center;
  backdrop-filter: blur(12px);
}

.market-combobox-search {
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}

.market-combobox-search input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(110, 160, 255, 0.18);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font: inherit;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.market-combobox-search input::placeholder {
  color: rgba(215, 227, 250, 0.5);
}

.market-combobox-search input:focus {
  border-color: rgba(110, 160, 255, 0.42);
  background: rgba(255,255,255,0.06);
  box-shadow: inset 0 0 0 1px rgba(110, 160, 255, 0.12);
}

.market-combobox-list {
  max-height: 320px;
  overflow: auto;
  padding: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 166, 214, 0.45) transparent;
}

.market-combobox-list::-webkit-scrollbar {
  width: 8px;
}

.market-combobox-list::-webkit-scrollbar-track {
  background: transparent;
}

.market-combobox-list::-webkit-scrollbar-thumb {
  background: rgba(140, 166, 214, 0.35);
  border-radius: 999px;
}

.market-combobox-list::-webkit-scrollbar-thumb:hover {
  background: rgba(140, 166, 214, 0.55);
}

.market-combobox-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 0;
  background: rgba(255,255,255,0.02);
  color: var(--text);
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.market-combobox-option + .market-combobox-option {
  margin-top: 8px;
}

.market-combobox-option:hover,
.market-combobox-option.active {
  background: rgba(96, 144, 237, 0.12);
  transform: translateY(-1px);
}

.market-combobox-option-main { min-width: 0; }

.market-combobox-option-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.market-combobox-option-title-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.market-combobox-option-pair {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1;
}

.market-combobox-option-price {
  font-weight: 700;
  white-space: nowrap;
}

.market-combobox-empty {
  padding: 16px 12px;
  color: var(--muted);
  text-align: center;
}

.calculator-layout {
  grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr);
  align-items: center;
  margin-top: 22px;
}

.arb-card {
  min-height: 380px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

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

.arb-topline, .arb-row, .profit-box, .exchange-brand {
  display: flex;
  align-items: center;
}

.arb-topline, .arb-row, .profit-box {
  justify-content: space-between;
  gap: 12px;
}

.arb-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
}

.arb-badge.buy {
  background: rgba(51,209,122,0.14);
  color: #baf7d6;
}

.arb-badge.sell {
  background: rgba(77,136,255,0.14);
  color: #bbd3ff;
}

.arb-metrics {
  margin-top: 18px;
  display: grid;
  gap: 0;
}

.arb-row {
  min-height: 58px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.arb-row strong { font-size: 1.4rem; }

.arb-flow { text-align: center; }

.arb-flow strong {
  display: block;
  font-size: 1.8rem;
}

.arb-flow span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.4;
}

.flow-line {
  height: 2px;
  margin: 20px auto;
  width: 100%;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.0) 0 14px, currentColor 14px 28px);
  animation: flowDash 1.3s linear infinite;
}

.flow-buy { color: #33d17a; }
.flow-sell { color: #4d88ff; }

.profit-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.profit-box-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profit-pill {
  min-width: 84px;
  text-align: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  font-weight: 800;
}

.arb-action {
  width: 100%;
  height: 54px;
  margin-top: 18px;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.arb-action:hover:not(:disabled) { transform: translateY(-1px); }
.arb-action:disabled { opacity: 0.6; cursor: not-allowed; }
.arb-action-buy { background: #1f7a48; }
.arb-action-sell { background: #295aa8; }

.calculator-footnote {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.exchange-brand {
  gap: 10px;
  min-width: 0;
}

.exchange-logo-wrap {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
}

.exchange-logo-wrap-small {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.exchange-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.exchange-logo[hidden] { display: none !important; }

.exchange-fallback {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text);
}

.exchange-logo-wrap.has-image .exchange-fallback { display: none; }

.empty-state {
  text-align: center;
  padding: 32px 16px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes valuePulse {
  0% { transform: translateY(0); filter: brightness(1); }
  40% { transform: translateY(-2px); filter: brightness(1.16); }
  100% { transform: translateY(0); filter: brightness(1); }
}

@keyframes fadeScale {
  from {
    opacity: 0;
    transform: scale(0.98) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(51,209,122,0.52); }
  70% { box-shadow: 0 0 0 9px rgba(51,209,122,0); }
  100% { box-shadow: 0 0 0 0 rgba(51,209,122,0); }
}

@keyframes moveArrow {
  0%, 100% { transform: translateX(0); opacity: 0.82; }
  50% { transform: translateX(6px); opacity: 1; }
}

@keyframes flowDash {
  from { background-position: 0 0; }
  to { background-position: 28px 0; }
}

@keyframes tickerScroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

@keyframes floatAmbient {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, 18px, 0); }
}

@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; }
  .exchange-ribbon,
  .scanner-marquee { grid-template-columns: 1fr; }
  .opportunities-layout { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-grid { grid-template-columns: 1fr; }
  .hero-metrics,
  .stats-grid,
  .spread-card-grid,
  .calculator-controls,
  .calculator-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .calculator-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 16px;
  }

  .top-strip {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-strip-brand,
  .top-strip-promo,
  .top-strip-nav {
    flex-wrap: wrap;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 20px;
  }

  .legal-hero,
  .legal-article,
  .legal-aside {
    padding: 22px 20px;
  }

  .site-footer-contact {
    justify-content: flex-start;
  }

  .hero-copy,
  .hero-panel,
  .exchange-ribbon,
  .strip-card,
  .table-card,
  .calculator-card,
  .metric-card,
  .chart-card {
    padding: 20px;
  }

  .top-strip-logo {
    width: 38px;
    height: 38px;
  }

  .hero-copy h1 { font-size: 2.4rem; }

  .hero-metrics,
  .stats-grid,
  .spread-card-grid,
  .calculator-controls,
  .route-summary,
  .route-actions {
    grid-template-columns: 1fr;
  }

  .hero-cta-row { flex-direction: column; }
  .opportunity-featured-route,
  .opportunity-featured-metrics {
    flex-direction: column;
    align-items: stretch;
  }
  .route-legs { grid-template-columns: 1fr; }
  .route-arrow { display: none; }
  .card-head, .markets-head, .strip-head { flex-direction: column; align-items: flex-start; }
  .search-box { width: 100%; min-width: 0; }
}
