:root {
  --bg: #f8f9fc;
  --surface: #ffffff;
  --card: #ffffff;
  --card-hover: #f1f3f9;
  --border: #e2e5ee;
  --border-light: #d0d4e0;
  --text: #1a1d2b;
  --text-secondary: #5a6078;
  --text-muted: #8890a6;
  --accent: #6366f1;
  --accent-light: #4f46e5;
  --accent-dim: rgba(99, 102, 241, 0.1);
  --green: #059669;
  --green-dim: rgba(5, 150, 105, 0.1);
  --red: #dc2626;
  --red-dim: rgba(220, 38, 38, 0.08);
  --yellow: #d97706;
  --yellow-dim: rgba(217, 119, 6, 0.1);
  --poly: #7c3aed;
  --poly-dim: rgba(124, 58, 237, 0.1);
  --kalshi: #2563eb;
  --kalshi-dim: rgba(37, 99, 235, 0.08);
  --betfair: #059669;
  --betfair-dim: rgba(5, 150, 105, 0.08);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.08);
  --transition: 0.2s ease;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  --max-width: 1320px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

/* ─── Navigation ─── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.nav-brand svg {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-link.active {
  color: var(--accent-light);
  background: var(--accent-dim);
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

/* ─── Stats Bar ─── */

.stats-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.stats-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.stats-bar-inner::-webkit-scrollbar {
  display: none;
}

.stats-bar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 13px;
}

.stats-bar-label {
  color: var(--text-muted);
}

.stats-bar-value {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stats-bar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ─── Container / Layout ─── */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.page-section {
  padding: 48px 0;
}

.page-section + .page-section {
  border-top: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
}

.section-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

.section-link:hover {
  gap: 8px;
}

/* ─── Market Cards ─── */

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.market-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}

.market-card:hover {
  background: var(--card-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: inherit;
}

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

.market-card-question {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.market-card-prices {
  display: flex;
  gap: 16px;
  align-items: center;
}

.market-card-price {
  text-align: center;
}

.market-card-price-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.market-card-price-value {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.market-card-price-value.yes {
  color: var(--green);
}

.market-card-price-value.no {
  color: var(--red);
}

.market-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.market-card-meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.market-card-meta-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.market-card-meta-right span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── Platform Badges ─── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-poly {
  background: var(--poly-dim);
  color: var(--poly);
}

.badge-kalshi {
  background: var(--kalshi-dim);
  color: var(--kalshi);
}

.badge-betfair {
  background: var(--betfair-dim);
  color: var(--betfair);
}

.badge-arb {
  background: var(--green-dim);
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.badge-category {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-secondary);
}

/* ─── Arb Indicator ─── */

.arb-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.arb-indicator.positive {
  background: var(--green-dim);
  color: var(--green);
}

.arb-indicator.hot {
  background: var(--yellow-dim);
  color: var(--yellow);
}

.arb-indicator.negative {
  color: var(--text-muted);
}

/* ─── Filter / Search Bar ─── */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.search-input {
  flex: 1;
  min-width: 240px;
  padding: 10px 16px 10px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition);
}

.search-input:focus {
  border-color: var(--accent);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.search-wrapper svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.filter-select {
  padding: 10px 32px 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238890a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color var(--transition);
}

.filter-select:focus {
  border-color: var(--accent);
}

.filter-select option {
  background: var(--surface);
  color: var(--text);
}

.filter-checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-chip {
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.filter-chip:hover {
  border-color: var(--border-light);
  color: var(--text);
}

.filter-chip.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent-light);
}

.filter-chip.poly.active {
  border-color: var(--poly);
  background: var(--poly-dim);
  color: var(--poly);
}

.filter-chip.kalshi.active {
  border-color: var(--kalshi);
  background: var(--kalshi-dim);
  color: var(--kalshi);
}

.filter-chip.betfair.active {
  border-color: var(--betfair);
  background: var(--betfair-dim);
  color: var(--betfair);
}

/* ─── Tables ─── */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color var(--transition);
}

.table th:hover {
  color: var(--text-secondary);
}

.table th.sorted {
  color: var(--accent-light);
}

.table th .sort-arrow {
  margin-left: 4px;
  opacity: 0.4;
}

.table th.sorted .sort-arrow {
  opacity: 1;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.table tbody tr {
  transition: background var(--transition);
}

.table tbody tr:hover {
  background: rgba(99, 102, 241, 0.03);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table .market-question-cell {
  white-space: normal;
  max-width: 360px;
  line-height: 1.4;
}

.table .number {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13px;
}

.table .positive {
  color: var(--green);
  font-weight: 600;
}

.table .hot {
  color: var(--yellow);
  font-weight: 700;
}

.table .negative {
  color: var(--text-muted);
}

/* ─── Tabs ─── */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tab {
  padding: 12px 20px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  user-select: none;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--accent-light);
  border-bottom-color: var(--accent);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 1px 6px;
  margin-left: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ─── Arb Detail Card ─── */

.arb-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.arb-card:hover {
  border-color: var(--border-light);
}

.arb-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.arb-card-platforms {
  display: flex;
  gap: 6px;
  align-items: center;
}

.arb-card-metrics {
  display: flex;
  gap: 16px;
  align-items: center;
}

.arb-card-question {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.arb-card-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.arb-card-side {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.arb-card-side-title {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.arb-card-side-question {
  font-size: 13px;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.arb-card-side-prices {
  font-size: 12px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* ─── Market Detail ─── */

.market-detail-header {
  padding: 40px 0 32px;
}

.market-detail-question {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.3;
  margin-bottom: 16px;
}

.market-detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 14px;
}

.market-detail-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-comparison {
  margin-bottom: 32px;
}

.price-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.price-card-platform {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.price-card-platform.poly { color: var(--poly); }
.price-card-platform.kalshi { color: var(--kalshi); }
.price-card-platform.betfair { color: var(--betfair); }

.price-card-prices {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.price-card-price {
  text-align: center;
}

.price-card-price-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-card-price-value {
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.price-card-volume {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── Category Cards ─── */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.category-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
  display: block;
  color: inherit;
  box-shadow: var(--shadow);
}

.category-card:hover {
  background: var(--card-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: inherit;
}

.category-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
  background: var(--accent-dim);
}

.category-card-name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: capitalize;
}

.category-card-count {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ─── Loading / Empty States ─── */

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  color: var(--text-muted);
  gap: 16px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

/* ─── Footer ─── */

.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 48px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-link {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-link:hover {
  color: var(--text-secondary);
}

/* ─── Utility Classes ─── */

.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-accent { color: var(--accent-light); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.font-mono { font-family: var(--font-mono); }
.font-tabular { font-variant-numeric: tabular-nums; }

.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.hidden { display: none !important; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.direction-tag {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.direction-tag.buy-k {
  background: var(--kalshi-dim);
  color: var(--kalshi);
}

.direction-tag.buy-p {
  background: var(--poly-dim);
  color: var(--poly);
}

/* ─── Quick Links / Category Chips ─── */

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-link {
  padding: 10px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  text-transform: capitalize;
}

.quick-link:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* ─── Market Summary (compact header) ─── */

.market-summary {
  padding: 28px 0 20px;
}

.market-summary-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.market-summary-desc {
  color: var(--text-secondary);
  font-size: 15px;
  margin-top: 6px;
  line-height: 1.5;
}

/* ─── Highlights Strip ─── */

.highlights-section {
  padding-bottom: 8px;
}

.highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.highlight-block {
  min-width: 0;
}

.highlight-section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Compact Trending Items ─── */

.trending-compact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trending-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  color: inherit;
  gap: 12px;
}

.trending-item:hover {
  background: var(--card-hover);
  border-color: var(--border-light);
  color: inherit;
}

.trending-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.trending-item-question {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trending-item-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.trending-item-price {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.trending-item-price.yes {
  color: var(--green);
}

.trending-item-vol {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ─── Compact Arb Items ─── */

.arb-compact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.arb-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  color: inherit;
  gap: 12px;
}

.arb-item:hover {
  background: var(--card-hover);
  border-color: var(--border-light);
  color: inherit;
}

.arb-item-left {
  min-width: 0;
}

.arb-item-question {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arb-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ─── Table Market Link ─── */

.table-market-link {
  color: var(--text);
  font-weight: 500;
}

.table-market-link:hover {
  color: var(--accent-light);
}

/* ─── Show More Button ─── */

.show-more {
  text-align: center;
  padding: 20px 0 8px;
}

.show-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}

.show-more-btn:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  color: var(--accent-light);
}

.show-more-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ─── Auto-refresh indicator ─── */

.refresh-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.refresh-indicator .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

/* ─── Pricing Page ─── */

.pricing-hero {
  text-align: center;
  padding: 48px 0 32px;
}

.pricing-hero-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.pricing-hero-desc {
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.5;
}

.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}

.pricing-toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  user-select: none;
}

.pricing-toggle-label.active {
  color: var(--text);
  font-weight: 600;
}

.pricing-save-tag {
  display: inline-block;
  padding: 2px 7px;
  background: var(--green-dim);
  color: var(--green);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
}

.pricing-toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--border);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition);
  padding: 0;
}

.pricing-toggle-switch.annual {
  background: var(--accent);
}

.pricing-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.pricing-toggle-switch.annual .pricing-toggle-knob {
  transform: translateX(20px);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
  align-items: start;
}

.pricing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.pricing-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg);
}

.pricing-card.featured:hover {
  box-shadow: 0 0 0 1px var(--accent), 0 8px 30px rgba(99, 102, 241, 0.12);
}

.pricing-card-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  white-space: nowrap;
}

.pricing-card-header {
  margin-bottom: 24px;
}

.pricing-card-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.pricing-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.pricing-card-price {
  margin-bottom: 4px;
}

.pricing-amount {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

.pricing-period {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-billed {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  min-height: 20px;
}

.pricing-cta {
  display: block;
  text-align: center;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: all var(--transition);
  margin-bottom: 28px;
  margin-top: 20px;
}

.pricing-cta.primary {
  background: var(--accent);
  color: white;
}

.pricing-cta.primary:hover {
  background: var(--accent-light);
  color: white;
}

.pricing-cta.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.pricing-cta.secondary:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.pricing-features {
  list-style: none;
  padding: 0;
}

.pricing-features li {
  padding: 7px 0;
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.pricing-features li::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.pricing-features li.highlight {
  color: var(--text);
  font-weight: 600;
  padding-top: 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 12px;
}

.pricing-features li.highlight::before {
  display: none;
}

.pricing-faq {
  max-width: 800px;
  margin: 64px auto 0;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.pricing-faq-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
}

.pricing-faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.pricing-faq-item h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.pricing-faq-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ─── Breadcrumbs ─── */

.breadcrumbs {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.breadcrumbs-list {
  display: flex;
  gap: 6px;
  list-style: none;
  padding: 8px 0;
  font-size: 13px;
}

.breadcrumbs-item {
  display: inline-flex;
  align-items: center;
}

.breadcrumbs-item + .breadcrumbs-item::before {
  content: "\203A";
  color: var(--text-muted);
  margin: 0 8px;
}

.breadcrumbs-item a {
  color: var(--text-muted);
}

.breadcrumbs-item a:hover {
  color: var(--text-secondary);
}

.breadcrumbs-item span {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ─── Predictions Pages ─── */

.predictions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.predictions-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
  cursor: pointer;
  display: block;
  color: inherit;
  box-shadow: var(--shadow);
}

.predictions-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-light);
}

.predictions-card-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.predictions-card-count {
  font-size: 14px;
  color: var(--text-secondary);
}

.predictions-card-type {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 8px;
}

.predictions-card-type.asset {
  background: var(--green-dim);
  color: var(--green);
}

.predictions-card-type.category {
  background: var(--accent-dim);
  color: var(--accent);
}

.topic-header {
  padding: 32px 0 24px;
}

.topic-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.topic-header p {
  color: var(--text-secondary);
  font-size: 15px;
}

.topic-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.topic-stats-item {
  display: flex;
  flex-direction: column;
  padding: 16px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 140px;
}

.topic-stats-item .label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.topic-stats-item .value {
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.related-topics {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.related-topics h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.related-topics-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.related-topic-link {
  padding: 8px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
}

.related-topic-link:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--card-hover);
}

/* ─── Compare Pages ─── */

.compare-hero {
  text-align: center;
  padding: 40px 0 32px;
}

.compare-hero h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.compare-hero p {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.compare-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.compare-card.poly {
  border-top: 3px solid var(--poly);
}

.compare-card.kalshi {
  border-top: 3px solid var(--kalshi);
}

.compare-platform {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

.compare-platform.poly {
  color: var(--poly);
}

.compare-platform.kalshi {
  color: var(--kalshi);
}

.compare-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.compare-stat:last-child {
  border-bottom: none;
}

.compare-stat-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.compare-stat-value {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.compare-content {
  max-width: 800px;
  margin: 40px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.compare-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

.compare-content h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
}

.compare-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

/* ─── Calculator / Tool Pages ─── */

.calc-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 0;
}

.calc-header {
  margin-bottom: 32px;
}

.calc-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.calc-header p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.5;
}

.calc-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 16px;
}

.calc-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-input-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.calc-input-group input {
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px;
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color var(--transition);
}

.calc-input-group input:focus {
  border-color: var(--accent);
}

.calc-input-group input::placeholder {
  color: var(--text-muted);
}

.calc-input-group .unit {
  font-size: 12px;
  color: var(--text-muted);
}

.calc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 8px;
}

.calc-btn:hover {
  background: var(--accent-light);
}

.calc-result {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.calc-result-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.calc-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.calc-result-item {
  text-align: center;
}

.calc-result-item .label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.calc-result-item .value {
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.calc-result-item .value.positive {
  color: var(--green);
}

.calc-result-item .value.negative {
  color: var(--red);
}

.calc-explanation {
  max-width: 720px;
  margin: 32px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.calc-explanation h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.calc-explanation p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

/* ─── Pagination ─── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 0;
}

.pagination-link {
  padding: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
}

.pagination-link:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.pagination-info {
  font-size: 14px;
  color: var(--text-muted);
}

/* ─── Learn Pages ─── */

.learn-hero {
  text-align: center;
  padding: 40px 0 32px;
}

.learn-hero h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.learn-hero p {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.learn-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: block;
  color: inherit;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.learn-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-light);
  color: inherit;
}

.learn-card-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 12px;
}

.learn-card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.learn-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.learn-card-read {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-light);
}

/* ─── Article Pages ─── */

.article-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 0 48px;
}

.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 12px;
}

.article-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.article-body h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
}

.article-body h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
}

.article-body p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.article-body strong {
  color: var(--text);
  font-weight: 600;
}

/* ─── Resolved Markets ─── */

.resolved-badge-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.resolved-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--text-muted);
  color: white;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.resolved-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.resolved-outcome {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  margin-bottom: 32px;
}

.resolved-outcome h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.resolved-outcome p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

/* ─── Visually Hidden ─── */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Movers Page ─── */

.movers-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.movers-tab {
  padding: 8px 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}

.movers-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.movers-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* ─── Embed Config Page ─── */

.embed-config {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}

.embed-config-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.embed-preview-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.embed-config-label {
  font-size: 14px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
}

.embed-type-select {
  display: flex;
  gap: 8px;
}

.embed-type-btn, .embed-theme-btn {
  padding: 8px 20px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 14px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.embed-type-btn.active, .embed-theme-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.embed-code-wrap {
  margin-top: 12px;
}

.embed-preview-frame {
  min-height: 200px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ─── Weekly Summary Page ─── */

.weekly-header {
  margin-bottom: 32px;
}

.weekly-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.weekly-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.weekly-stat-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.weekly-stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

.weekly-section {
  margin-bottom: 40px;
}

.weekly-section .section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ─── Badge Variants ─── */

.badge-green {
  background: rgba(16, 185, 129, 0.12);
  color: var(--green);
}

.badge-red {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
}

/* ─── Activity Feed ─── */

.activity-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 24px;
}

.activity-refresh {
  text-align: center;
}

/* ─── Portfolio Tracker ─── */

.portfolio-hero {
  margin-bottom: 24px;
}

.portfolio-input-wrap {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 8px;
}

.portfolio-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.portfolio-section {
  margin-bottom: 32px;
}

/* ─── Creator / Event Detail ─── */

.stat-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ─── Responsive ─── */

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-mobile-toggle {
    display: block;
  }

  .highlights {
    grid-template-columns: 1fr;
  }

  .market-grid {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .arb-card-sides {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-wrapper {
    min-width: auto;
  }

  .tabs {
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .market-detail-question {
    font-size: 22px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .stats-bar-inner {
    gap: 20px;
  }

  .page-section {
    padding: 32px 0;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .price-comparison-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .pricing-hero-title {
    font-size: 28px;
  }

  .pricing-faq-grid {
    grid-template-columns: 1fr;
  }

  .predictions-grid {
    grid-template-columns: 1fr;
  }

  .compare-grid {
    grid-template-columns: 1fr;
  }

  .compare-hero h1 {
    font-size: 24px;
  }

  .calc-row {
    grid-template-columns: 1fr;
  }

  .calc-container {
    padding: 24px 0;
  }

  .topic-stats {
    gap: 12px;
  }

  .topic-header h1 {
    font-size: 22px;
  }

  .learn-grid {
    grid-template-columns: 1fr;
  }

  .learn-hero h1 {
    font-size: 24px;
  }

  .article-header h1 {
    font-size: 24px;
  }

  .embed-config {
    grid-template-columns: 1fr;
  }

  .weekly-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .portfolio-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .portfolio-input-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .activity-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .container {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .market-card-prices {
    flex-direction: column;
    gap: 8px;
  }

  .table {
    font-size: 13px;
  }

  .table th, .table td {
    padding: 10px 12px;
  }

  .weekly-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Calculator & Tool Pages ─── */

.page-title { font-size: 28px; margin-bottom: 8px; }
.page-subtitle-sm { margin-bottom: 24px; }
.page-subtitle-lg { margin-bottom: 32px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }
.calc-grid-narrow { max-width: 480px; }
.calc-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.calc-card-title { margin-bottom: 16px; font-weight: 600; }
.calc-input-label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.calc-input { width: 100%; padding: 8px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 14px; }
.calc-input-lg { width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 16px; }
.calc-btn { padding: 10px 32px; background: var(--accent); color: #fff; border: none; border-radius: var(--radius); font-size: 14px; font-weight: 600; cursor: pointer; }
.calc-btn-wrap { text-align: center; margin-bottom: 24px; }
.calc-result-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.calc-result-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.calc-result-label { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.calc-result-value { font-size: 20px; }
.calc-result-value-lg { font-size: 24px; }
.calc-explanation { margin-top: 40px; max-width: 720px; }
.content-prose { color: var(--text-secondary); line-height: 1.7; }
.content-prose p { margin-bottom: 12px; }
.section-gap { margin-top: 32px; }
.section-title-sm { margin-bottom: 16px; }
.topic-stats { display: flex; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.input-group { margin-bottom: 12px; }
.input-group-lg { margin-bottom: 16px; }
.api-code-block { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; overflow-x: auto; margin-bottom: 24px; }
.api-endpoint { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.api-endpoint-desc { margin-top: 8px; color: var(--text-secondary); }
.api-endpoint-params { margin-top: 8px; font-size: 13px; color: var(--text-muted); }
