/* === OddsShift Arbitrage Page — rev4 (PredictionHunt-inspired) === */
/* Base: style.css (shared header, footer, theme, typography) */

/* ── Page-level layout uses shared header from style.css ── */


/* ── Live Dot (pulsing green) ── */

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #3fb950;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(63,185,80,0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(63,185,80,0); }
}


/* ── Platform Pills ── */

.pm-pill, .platform-pill.pm {
  display: inline-block;
  background: #2563EB;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 5px;
  letter-spacing: 0.02em;
}
.k-pill, .platform-pill.k {
  display: inline-block;
  background: #134e4a;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 5px;
  letter-spacing: 0.02em;
}
.gap-pill {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}
.roi-pill, .roi-badge {
  display: inline-block;
  background: #16A34A;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}
.apy-badge {
  display: inline-block;
  background: var(--bg2);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.pm-dot { display: inline-block; width: 8px; height: 8px; background: #2563EB; border-radius: 2px; margin-right: 3px; vertical-align: middle; }
.k-dot { display: inline-block; width: 8px; height: 8px; background: #134e4a; border-radius: 2px; margin-right: 3px; vertical-align: middle; }


/* ── Hero ── */

/* Compact hero: H1 left + stats right, single row */
.arb-hero-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 0 8px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
}
.arb-hero-left { flex: 1; min-width: 0; }
.arb-hero-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0;
}
.arb-hero-sub {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.4;
  margin: 2px 0 0;
}
.arb-hero-stats {
  display: flex;
  gap: 1.5rem;
  flex-shrink: 0;
}
.arb-hero-stat { text-align: center; }
.arb-hero-stat-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.arb-hero-stat-value.accent { color: var(--accent); }
.arb-hero-stat-value.green { color: #16A34A; }
.arb-hero-stat-label {
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 1px;
}
.stat-hint {
  display: none; /* removed in compact hero */
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.56rem;
  opacity: 0.7;
  margin-top: 1px;
}


/* ── Live Ticker ── */

.arb-ticker {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
  overflow: hidden;
  margin-bottom: 0.6rem;
  white-space: nowrap;
}
.arb-ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  animation: ticker-scroll 40s linear infinite;
}
.ticker-item {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ticker-sep {
  color: var(--text-muted);
  font-size: 0.6rem;
  flex-shrink: 0;
}
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-33.33%); }
}


/* ── Section shared ── */

.arb-section { margin-bottom: 2.5rem; }
.arb-section:first-of-type { margin-bottom: 2rem; margin-top: 0; }
.arb-section-header { margin-bottom: 0.5rem; }
.arb-section-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.arb-section-title .sub {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.arb-section-intro {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.green-text { color: #16A34A; font-weight: 700; }
.green { color: #16A34A; }
.red { color: #f85149; }


/* ── Category Tags ── */

.arb-tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.arb-tag.politics { background: #eef2ff; color: #4338ca; }
.arb-tag.crypto { background: #fef3c7; color: #b45309; }
.arb-tag.finance { background: #ecfdf5; color: #059669; }
.arb-tag.sports { background: #fef2f2; color: #dc2626; }
.arb-tag.tech { background: #f5f3ff; color: #7c3aed; }
.arb-tag.world { background: #ecfeff; color: #0891b2; }


/* ═══ FEATURED CARDS ═══ */

.arb-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 2rem;
  align-items: start;
}
.arb-featured-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  transition: box-shadow 0.2s;
  cursor: pointer;
}
.arb-featured-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.arb-featured-card.hot {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 20px rgba(255,140,0,0.08);
}

/* Card interior padding */
.arb-featured-card {
  padding: 1.25rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.arb-featured-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

/* Summary line — gap + ROI */
.arb-featured-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 0.75rem;
}
.arb-gap-inline {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
}

/* CTA hint */
.arb-featured-cta {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

/* Locked cards 2-3: blur prices, show gap+ROI */
.arb-featured-card.card-locked .arb-featured-platforms { filter: blur(4px); user-select: none; pointer-events: none; }
.arb-featured-card.card-locked .arb-featured-cta { content: "Unlock ›"; }
.arb-featured-card.card-locked .arb-featured-cta::before { content: "\01F512 "; }

/* ═══ FULL-WIDTH DETAIL PANEL ═══ */
.arb-detail-panel {
  display: none;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--bg);
  margin-top: -0.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  animation: panelSlide 0.25s ease;
}
.arb-detail-panel.open {
  display: block;
}
@keyframes panelSlide {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.arb-detail-content {
  display: none;
}
.arb-detail-content.active {
  display: block;
}

.arb-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.arb-detail-title {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.arb-detail-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.arb-detail-close:hover {
  background: var(--bg2);
  color: var(--text);
}

.arb-detail-body {
  padding: 1rem 1.25rem 1.25rem;
}
.arb-detail-body .arb-breakdown {
  margin-bottom: 1rem;
}
.arb-detail-body .arb-featured-actions {
  margin-bottom: 0.75rem;
}
.arb-detail-body .arb-featured-meta {
  text-align: left;
}

.arb-featured-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.arb-time-ago {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
}
.arb-featured-market {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 1rem;
  min-height: 4.05em; /* 3 lines at line-height 1.35 */
}

.arb-featured-platforms {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1rem;
}
.platform-price-block {
  display: flex;
  align-items: center;
  gap: 6px;
}
.platform-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 5px;
  color: #fff;
}
.platform-side {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}
.platform-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.arb-vs {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Legacy gap block — kept for table detail views */
.arb-featured-gap {
  text-align: center;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
}
.arb-gap-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.arb-gap-unit {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* COST / PAYOUT / EDGE breakdown */
.arb-breakdown {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.arb-brk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  gap: 8px;
}
.arb-brk-row + .arb-brk-row { border-top: 1px solid var(--border); }
.arb-brk-row.edge {
  background: rgba(22,163,74,0.04);
}
.brk-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
  width: 60px;
}
.arb-brk-row span { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.arb-featured-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 0.75rem;
}
.arb-trade-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s;
  text-align: center;
}
.arb-trade-btn:hover { opacity: 0.85; }
.arb-trade-btn.pm { background: #2563EB; color: #fff; }
.arb-trade-btn.k { background: #134e4a; color: #fff; }

.arb-featured-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
}


/* ═══ TOOLBAR ═══ */

.arb-toolbar {
  border: 1px solid var(--border);
  border-bottom: none;
  background: var(--bg2);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.arb-categories {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.arb-categories::-webkit-scrollbar { display: none; }

.arb-cat {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 20px;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 32px;
}
.arb-cat:hover { border-color: var(--accent); color: var(--accent); }
.arb-cat.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.arb-filters {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.arb-filter {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}
.arb-filter-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 5px 8px;
  border-radius: 20px;
  width: 52px;
  text-align: center;
  transition: all 0.15s;
}
.arb-filter-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255,140,0,0.12);
}
.arb-filter-unit {
  font-size: 0.65rem;
  color: var(--text-muted);
}
.arb-filter select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 5px 28px 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.arb-filter select:hover { border-color: var(--accent); color: var(--accent); }
.arb-filter select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255,140,0,0.12);
}
.arb-results-count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: auto;
}
.arb-results-count span { color: var(--accent); font-weight: 700; }


/* ═══ GAP TABLE ═══ */

.arb-gap-table {
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.arb-gap-header {
  display: grid;
  grid-template-columns: 2.5fr 70px 70px 70px 70px 80px 75px 36px;
  padding: 8px 16px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
/* Hide Category header */
.arb-gap-header .arb-col-cat { display: none; }

.arb-gap-row {
  display: grid;
  grid-template-columns: 2.5fr 70px 70px 70px 70px 80px 75px 36px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s;
  align-items: center;
}
/* Hide Category column in rows */
.arb-gap-row .arb-col-cat { display: none; }

/* Closes: prevent wrapping */
.arb-col-time { white-space: nowrap; }
.arb-gap-row:last-of-type { border-bottom: none; }
.arb-gap-row:hover { background: var(--bg2); }
.arb-gap-row.expanded { background: var(--bg2); }
/* Locked rows — unified paywall style */
.arb-gap-row.locked { opacity: 0.5; }
.arb-gap-row.locked .arb-col-pm,
.arb-gap-row.locked .arb-col-k,
.arb-gap-row.locked .arb-col-vol,
.arb-gap-row.locked .arb-col-time { filter: blur(3px); user-select: none; }
.arb-gap-row.locked:hover { background: rgba(255,140,0,0.03); cursor: pointer; }
.arb-gap-row.locked .arb-expand-btn {
  all: unset;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.05em;
  background: rgba(255,140,0,0.08);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255,140,0,0.2);
  cursor: pointer;
}
.arb-gap-row.locked .arb-expand-btn svg { display: none; }
.arb-gap-row.locked .arb-expand-btn::after { content: "PRO"; }

.arb-market-name {
  font-weight: 600;
  font-size: 0.78rem;
  line-height: 1.3;
}
.arb-gap-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}
.arb-expand-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.arb-expand-btn:hover { border-color: var(--accent); color: var(--accent); }


/* ═══ EXPANDED ROW DETAIL ═══ */

.arb-gap-detail {
  display: none;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}
.arb-gap-detail.open { display: block; }

/* AI Verdict — FIRST element */
.arb-verdict {
  background: linear-gradient(135deg, rgba(37,99,235,0.04), rgba(22,163,74,0.04));
  border: 1px solid rgba(37,99,235,0.15);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.verdict-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #2563EB;
  background: rgba(37,99,235,0.08);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.verdict-who {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.verdict-text {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.55;
}
.arb-verdict.blurred {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
}

/* COST/PAYOUT/EDGE in expanded row */
.arb-gap-detail .arb-breakdown { margin-bottom: 1rem; }

/* Trade links in expanded row */
.arb-trade-links {
  display: flex;
  gap: 10px;
}
.arb-trade-links .arb-trade-btn { flex: 1; }

/* Locked overlay */
.arb-gap-detail.locked-detail { position: relative; min-height: 120px; }
.arb-locked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(248,247,245,0.85);
  backdrop-filter: blur(2px);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  z-index: 2;
}


/* ═══ TABLE FOOTER ═══ */

.arb-table-footer {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.arb-table-meta {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
}
.arb-alert-cta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.arb-alert-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 10px 24px;
  text-decoration: none;
  text-align: center;
  border-radius: 6px;
  transition: opacity 0.15s;
}
.arb-alert-btn:hover { opacity: 0.85; }


/* ═══ CORRELATED MARKETS ═══ */

.arb-chain-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 1rem;
}
.arb-chain-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  background: var(--bg);
}
.arb-chain-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}
.arb-chain-badge.conflict { color: #b45309; background: #fef3c7; padding: 3px 8px; border-radius: 4px; }

.arb-chain-pair {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 0.75rem;
}
.arb-chain-market { flex: 1; text-align: center; }
.arb-chain-label {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.arb-chain-name {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 6px;
}
.arb-chain-price {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
}
.arb-chain-vs {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  align-self: center;
}
.arb-chain-logic {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.55;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: var(--bg2);
  border-radius: 6px;
}
.arb-chain-edge {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.arb-chain-edge-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}
.arb-chain-links {
  display: flex;
  gap: 8px;
}
.arb-chain-links .arb-trade-btn { flex: 1; padding: 8px 12px; font-size: 0.7rem; }

.arb-gap-footer {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
}


/* ═══ CALCULATOR ═══ */

.arb-calc {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  background: var(--bg);
}
.arb-calc-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.arb-calc-field {}
.arb-calc-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.arb-calc-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
}
.arb-calc-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  -moz-appearance: textfield;
}
.arb-calc-input::-webkit-inner-spin-button,
.arb-calc-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.arb-calc-unit {
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  flex-shrink: 0;
}

.arb-calc-results {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-bottom: 1rem;
}
.arb-calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dim);
}
.arb-calc-row.highlight {
  font-weight: 700;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
}

.arb-calc-verdict {
  padding: 12px 16px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}
.arb-calc-verdict.verdict-green { background: #ecfdf5; color: #059669; }
.arb-calc-verdict.verdict-red { background: #fef2f2; color: #dc2626; }
.arb-calc-verdict.verdict-yellow { background: #fffbeb; color: #b45309; }
.verdict-icon { font-size: 1.1rem; }

.arb-calc-note {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
}
.arb-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.arb-link:hover { text-decoration: underline; }


/* ═══ HOW IT WORKS ═══ */

.arb-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
}
.arb-panel-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.arb-panel-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}
.arb-panel-title .sub {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
}

.arb-step-row {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.arb-step-row:last-child { border-bottom: none; }
.arb-step-num {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
  flex-shrink: 0;
  width: 32px;
}
.arb-step-title {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.arb-step-desc {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.55;
}
.arb-step-detail {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 6px;
}
.arb-step-detail .accent { color: var(--accent); font-weight: 600; }


/* ═══ OBSERVER ═══ */

.arb-observer-text {
  padding: 1.25rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.6;
}
.arb-observer-text ul {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}
.arb-observer-text li { margin-bottom: 0.5rem; }


/* ═══ FAQ ═══ */

.arb-faq-list {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.arb-faq-item {
  border-bottom: 1px solid var(--border);
}
.arb-faq-item:last-child { border-bottom: none; }
.arb-faq-question {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.arb-faq-question::before {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}
.arb-faq-item[open] .arb-faq-question::before { content: '\2212'; }
.arb-faq-question::-webkit-details-marker { display: none; }
.arb-faq-answer {
  padding: 0 16px 14px 42px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.6;
}


/* ═══ CTA GRID ═══ */

.arb-cta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.arb-cta-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.arb-cta-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(255,140,0,0.06);
}
.arb-cta-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}
.arb-cta-desc {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 8px;
}
.arb-cta-link {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}

/* Footer overrides */
.arb-last-updated { font-size: 0.68rem; color: var(--text-muted); margin: 0 0 0.4rem; opacity: 0.7; }
.arb-footer-social { display: flex; gap: 1rem; margin-top: 0.3rem; }
.arb-footer-social a { color: var(--text-muted); text-decoration: none; font-size: 0.72rem; transition: color 0.2s; }
.arb-footer-social a:hover { color: var(--accent); }


/* ═══ FLOATING FILTER FAB (mobile only) ═══ */

.filter-fab {
  display: none; /* shown on mobile via media query */
  position: fixed;
  bottom: 80px;
  right: 16px;
  z-index: 50;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 28px;
  padding: 12px 18px;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  align-items: center;
  gap: 6px;
  transition: transform 0.15s, background 0.15s;
}
.filter-fab:active { transform: scale(0.95); }
.filter-fab.active { background: var(--text); }




/* ═══════════════════════════════════════════════════
   DARK MODE OVERRIDES (html:not(.light) = dark)
   ═══════════════════════════════════════════════════ */

html:not(.light) .arb-tag.politics { background: rgba(67,56,202,0.15); color: #818cf8; }
html:not(.light) .arb-tag.crypto { background: rgba(180,83,9,0.15); color: #fbbf24; }
html:not(.light) .arb-tag.finance { background: rgba(5,150,105,0.15); color: #34d399; }
html:not(.light) .arb-tag.sports { background: rgba(220,38,38,0.15); color: #f87171; }
html:not(.light) .arb-tag.tech { background: rgba(124,58,237,0.15); color: #a78bfa; }
html:not(.light) .arb-tag.world { background: rgba(8,145,178,0.15); color: #22d3ee; }

html:not(.light) .arb-verdict {
  background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(22,163,74,0.08));
  border-color: rgba(37,99,235,0.25);
}
html:not(.light) .verdict-badge {
  color: #93c5fd;
  background: rgba(37,99,235,0.15);
}

html:not(.light) .arb-calc-verdict.verdict-green { background: rgba(5,150,105,0.12); color: #34d399; }
html:not(.light) .arb-calc-verdict.verdict-red { background: rgba(220,38,38,0.12); color: #f87171; }
html:not(.light) .arb-calc-verdict.verdict-yellow { background: rgba(180,83,9,0.12); color: #fbbf24; }

html:not(.light) .arb-locked-overlay {
  background: rgba(13,17,23,0.85);
}

html:not(.light) .arb-chain-badge.conflict { background: rgba(180,83,9,0.15); color: #fbbf24; }
html:not(.light) .arb-chain-logic { background: var(--bg2); }

html:not(.light) .arb-brk-row.edge { background: rgba(22,163,74,0.08); }

html:not(.light) .arb-featured-card.hot {
  box-shadow: 0 0 0 1px var(--accent), 0 0 24px rgba(255,140,0,0.12);
}

html:not(.light) .apy-badge {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
  color: var(--text-dim);
}


/* ═══════════════════════════════════════════════════
   MOBILE RESPONSIVE (max-width: 768px)
   ═══════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* Hero compact: stack on mobile */
  .arb-hero-compact {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 0 16px;
  }
  .arb-hero-title {
    font-size: 1.25rem;
    white-space: normal;
    line-height: 1.3;
    margin-bottom: 12px;
  }
  .arb-hero-sub { display: none; }
  .arb-hero-stats {
    display: flex;
    gap: 0;
    width: 100%;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 12px;
  }
  .arb-hero-stat {
    flex: 1;
    text-align: center;
  }
  .arb-hero-stat:not(:last-child) {
    border-right: 1px solid var(--border);
  }
  .arb-hero-stat-value { font-size: 1.1rem; }
  .arb-hero-stat-label { font-size: 0.55rem; margin-top: 2px; }

  /* Ticker: single item rotate */
  .arb-ticker { padding: 6px 16px; }
  .arb-ticker-track {
    animation: none;
    flex-wrap: nowrap;
    overflow: hidden;
    width: 100%;
  }
  .ticker-item { min-width: 100%; justify-content: center; }
  .ticker-sep { display: none; }

  /* Featured cards: stack */
  .arb-featured-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Toolbar: categories always visible, filters behind FAB */
  .arb-toolbar {
    padding: 8px 0;
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .arb-categories {
    max-width: 100%;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .arb-filters {
    display: none; /* hide advanced filters by default */
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .arb-toolbar.mobile-open .arb-filters {
    display: grid;
  }
  .arb-filter { min-width: 0; }
  .arb-filter-input { width: 100%; }
  .arb-filter select { width: 100%; min-width: 0; }
  .arb-results-count { grid-column: 1 / -1; text-align: right; margin-left: 0; }

  /* FAB hidden — filters not functional yet */
  .filter-fab { display: none !important; }

  /* Gap table: CARD LAYOUT like compare page */
  .arb-gap-header { display: none; }
  .arb-gap-table {
    border: none;
    border-radius: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .arb-gap-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas:
      "market  market  market"
      "pm      gap     k"
      "roi     roi     roi";
    gap: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
  }
  .arb-gap-row:last-of-type { border-bottom: 1px solid var(--border); }

  .arb-col-market {
    grid-area: market;
    margin-bottom: 8px;
  }
  .arb-market-name { font-size: 0.88rem; font-weight: 700; line-height: 1.3; }
  .arb-col-cat { display: none; } /* tag already in market col */

  .arb-col-pm {
    grid-area: pm;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }
  .arb-col-pm::before {
    content: "POLYMARKET";
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
  }
  .arb-col-gap {
    grid-area: gap;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }
  .arb-col-gap::before {
    content: "GAP";
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
  }
  .arb-col-k {
    grid-area: k;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }
  .arb-col-k::before {
    content: "KALSHI";
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
  }

  .arb-col-roi {
    grid-area: roi;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }
  .arb-col-roi::after {
    content: "Details \203A";
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
  }

  /* Hide vol, time, action on mobile cards */
  .arb-col-vol { display: none; }
  .arb-col-time { display: none; }
  .arb-col-action { display: none; }

  /* Mobile locked rows: blur PM/K, show gap+ROI, PRO badge */
  .arb-gap-row.locked .arb-col-pm,
  .arb-gap-row.locked .arb-col-k { filter: blur(3px); user-select: none; }
  .arb-gap-row.locked .arb-col-gap { filter: none; opacity: 1; }
  .arb-gap-row.locked .arb-col-roi .roi-badge { filter: none; opacity: 1; }
  .arb-gap-row.locked .arb-col-roi::after {
    content: "Unlock \203A";
    color: var(--accent);
  }
  .arb-gap-row.locked .arb-col-roi::before {
    content: "\01F512  PRO";
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
  }

  /* Expanded detail: stack */
  .arb-gap-detail { padding: 1rem; }
  .arb-verdict { padding: 0.75rem 1rem; }
  .arb-trade-links { flex-direction: column; }
  .arb-trade-links .arb-trade-btn { min-height: 44px; } /* Touch target */

  /* Featured card actions: stack */
  .arb-featured-actions { flex-direction: column; }
  .arb-featured-actions .arb-trade-btn { min-height: 44px; }

  /* Featured card: tighter padding on mobile */
  .arb-featured-card { padding: 1rem; }

  /* Detail panel: full-width, tighter */
  .arb-detail-body { padding: 0.75rem 1rem 1rem; }
  .arb-detail-header { padding: 0.75rem 1rem; }
  .arb-detail-body .arb-featured-actions { flex-direction: column; }
  .arb-detail-body .arb-trade-btn { min-height: 44px; }

  /* Touch targets */
  .arb-cat { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 16px; }
  .arb-expand-btn { width: 44px; height: 44px; }

  /* Chain cards: stack pair */
  .arb-chain-pair { flex-direction: column; gap: 8px; }
  .arb-chain-vs { align-self: center; }
  .arb-chain-links { flex-direction: column; }
  .arb-chain-links .arb-trade-btn { min-height: 44px; }

  /* Calculator: stack */
  .arb-calc-inputs { grid-template-columns: 1fr; }
  .arb-calc-input { padding: 12px; }

  /* CTA grid: stack */
  .arb-cta-grid { grid-template-columns: 1fr; }

  /* Body padding for sticky bar */
  body { padding-bottom: 56px; }
}


/* ═══ Mobile ticker rotation (JS optional, CSS fallback) ═══ */
@media (max-width: 768px) {
  .arb-ticker-track {
    animation: ticker-mobile 15s step-end infinite;
  }
  @keyframes ticker-mobile {
    0% { transform: translateX(0); }
    20% { transform: translateX(-100%); }
    40% { transform: translateX(-200%); }
    60% { transform: translateX(-300%); }
    80% { transform: translateX(-400%); }
    100% { transform: translateX(0); }
  }
}

/* ── Direct Answer (AEO) ── */
.arb-direct-answer {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.65;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}
.arb-direct-answer strong { color: var(--text); font-weight: 600; }
.arb-updated {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .arb-direct-answer { font-size: 0.85rem; padding: 12px 0; }
}
