/* =============================================================
   CHAINPROP MATCH — Design System v4
   Institutional terminal: neutral graphite surfaces, one
   interactive accent, semantic colour reserved for meaning.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;600&display=swap');

/* ─── Tokens ─── */
:root {
  color-scheme: dark;
  --fg-rgb:         255, 255, 255;
  --nav-bg:         rgba(8, 9, 12, 0.72);
  --menu-bg:        rgba(8, 9, 12, 0.97);
  --scrim:          rgba(4, 5, 8, 0.78);
  --logo-tile:      #0a0b10;
  --text-on-green:  #04130d;
  --rank-gold:      #fcd34d;
  --rank-silver:    #d4d8e0;
  --rank-bronze:    #e0a36b;

  /* Surfaces */
  --bg-base:        #07080b;
  --bg-surface:     #0e1015;
  --bg-elevated:    #14171e;
  --bg-hover:       #1a1e27;
  --bg-card:        #12151b;
  --bg-inset:       #0b0d11;

  /* Lines */
  --border-subtle:  rgba(var(--fg-rgb), 0.08);
  --border-strong:  rgba(var(--fg-rgb), 0.13);
  --card-ring:      0 1px 0 rgba(255,255,255,0.045) inset, 0 1px 2px rgba(0,0,0,0.35);
  --border-glow:    rgba(124, 138, 255, 0.45);

  /* Accent + semantic (names kept for existing inline references) */
  --accent-blue:    #7c8aff;
  --accent-blue-hi: #97a3ff;
  --accent-violet:  #a78bfa;
  --accent-purple:  #a78bfa;
  --accent-cyan:    #5fd4e8;
  --accent-green:   #34d399;
  --accent-amber:   #fbbf24;
  --accent-red:     #f87171;
  --accent-pink:    #f472b6;
  --accent-solana:  #9945ff;

  --tint-blue:      rgba(124, 138, 255, 0.10);
  --tint-green:     rgba(52, 211, 153, 0.10);
  --tint-amber:     rgba(251, 191, 36, 0.10);
  --tint-red:       rgba(248, 113, 113, 0.10);
  --tint-cyan:      rgba(95, 212, 232, 0.10);
  --tint-violet:    rgba(167, 139, 250, 0.10);

  /* Text */
  --text-primary:   #eceef3;
  --text-secondary: #a1a7b5;
  --text-muted:     #6b7282;
  --text-on-accent: #0b0d1a;

  /* Gradients: used sparingly */
  --gradient-hero:  linear-gradient(100deg, #b4bcff 0%, #7c8aff 45%, #5fd4e8 100%);
  --gradient-card:  var(--bg-card);
  --gradient-green: linear-gradient(180deg, #3ee0a6, #22b884);
  --gradient-blue:  linear-gradient(180deg, #8d99ff, #6b79f5);

  /* Elevation */
  --shadow-sm:      0 1px 2px rgba(0,0,0,0.4);
  --shadow-card:    0 1px 0 rgba(var(--fg-rgb),0.03) inset, 0 12px 32px -12px rgba(0,0,0,0.6);
  --shadow-pop:     0 24px 64px -16px rgba(0,0,0,0.8), 0 0 0 1px var(--border-strong);
  --shadow-glow:    0 0 0 1px var(--border-glow), 0 8px 24px -8px rgba(124,138,255,0.35);
  --shadow-green:   0 0 0 1px rgba(52,211,153,0.4);

  /* Shape */
  --radius-xs:      4px;
  --radius-sm:      6px;
  --radius-md:      10px;
  --radius-lg:      14px;
  --radius-xl:      18px;
  --radius-full:    9999px;

  /* Type */
  --font-sans:      'Geist', 'Inter', system-ui, -apple-system, sans-serif;
  --font-display:   'Geist', 'Inter', system-ui, sans-serif;
  --font-mono:      'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --nav-h:          64px;
  --container:      1320px;
  --gutter:         24px;
  --ease:           cubic-bezier(0.2, 0.7, 0.2, 1);
  --transition:     all 0.18s var(--ease);
}

/* ─── Light theme ─── */
:root[data-theme="light"] {
  color-scheme: light;
  --fg-rgb:         15, 18, 28;
  --nav-bg:         rgba(247, 248, 250, 0.8);
  --menu-bg:        rgba(247, 248, 250, 0.98);
  --scrim:          rgba(15, 18, 28, 0.45);
  --logo-tile:      #0f1117;

  --bg-base:        #eff1f4;
  --bg-surface:     #ffffff;
  --bg-elevated:    #f0f2f5;
  --bg-hover:       #e9ecf1;
  --bg-card:        #ffffff;
  --bg-inset:       #f5f6f8;
  --card-ring:      0 1px 2px rgba(15,18,28,0.05), 0 0 0 0.5px rgba(15,18,28,0.02);

  --border-subtle:  rgba(15, 18, 28, 0.09);
  --border-strong:  rgba(15, 18, 28, 0.15);
  --border-glow:    rgba(79, 93, 232, 0.45);

  --accent-blue:    #4f5de8;
  --accent-blue-hi: #3d49d1;
  --accent-violet:  #7c3aed;
  --accent-purple:  #7c3aed;
  --accent-cyan:    #0e7490;
  --accent-green:   #047857;
  --accent-amber:   #b45309;
  --accent-red:     #dc2626;
  --accent-pink:    #db2777;

  --tint-blue:      rgba(79, 93, 232, 0.08);
  --tint-green:     rgba(4, 120, 87, 0.08);
  --tint-amber:     rgba(180, 83, 9, 0.08);
  --tint-red:       rgba(220, 38, 38, 0.08);
  --tint-cyan:      rgba(14, 116, 144, 0.08);
  --tint-violet:    rgba(124, 58, 237, 0.08);

  --text-primary:   #0f1219;
  --text-secondary: #4a5163;
  --text-muted:     #737a8c;
  --text-on-accent: #ffffff;
  --text-on-green:  #ffffff;

  --gradient-hero:  linear-gradient(100deg, #3d49d1 0%, #4f5de8 45%, #0891b2 100%);
  --gradient-green: linear-gradient(180deg, #10b981, #047857);

  --shadow-sm:      0 1px 2px rgba(15,18,28,0.06);
  --shadow-card:    0 1px 2px rgba(15,18,28,0.04), 0 12px 32px -16px rgba(15,18,28,0.18);
  --shadow-pop:     0 24px 64px -16px rgba(15,18,28,0.3), 0 0 0 1px var(--border-strong);

  --rank-gold:      #b7791f;
  --rank-silver:    #64748b;
  --rank-bronze:    #b45309;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; background: var(--bg-base); }
html.theme-anim, html.theme-anim * { transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease !important; }
body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; color: inherit; font: inherit; }
input, select, textarea { font: inherit; color: inherit; }
ul { list-style: none; }
strong { font-weight: 600; }
::selection { background: rgba(124,138,255,0.35); color: var(--text-primary); }

:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.num, .tabular { font-variant-numeric: tabular-nums; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--fg-rgb),0.08); border-radius: 10px; border: 3px solid var(--bg-base); }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--fg-rgb),0.16); }

/* =============================================================
   NAVIGATION
   ============================================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--text-primary);
}
.nav-logo .logo-icon {
  width: 30px; height: 30px;
  background: var(--accent-blue);
  color: var(--text-on-accent);
  border-radius: 8px;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 1px rgba(var(--fg-rgb),0.12) inset, 0 4px 14px -4px rgba(124,138,255,0.6);
}
.nav-logo span { color: var(--text-primary); }
.nav-logo .logo-muted { color: var(--text-muted); font-weight: 500; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: rgba(var(--fg-rgb),0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.nav-links a:hover { color: var(--text-primary); background: rgba(var(--fg-rgb),0.04); }
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-hover);
  box-shadow: 0 0 0 1px var(--border-strong) inset;
}
.nav-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(52,211,153,0.18);
  animation: pulse 2s ease-in-out infinite;
}
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* ─── Mobile nav ─── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  padding: 0 9px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(var(--fg-rgb),0.03);
}
.hamburger span { width: 18px; height: 1.5px; background: var(--text-primary); border-radius: 1px; transition: var(--transition); display: block; }
.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--menu-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px var(--gutter) 20px;
  z-index: 999;
  display: none;
}
.mobile-menu.open { display: block; animation: fadeDown 0.2s var(--ease); }
.mobile-menu a {
  display: block;
  padding: 12px 12px;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
}
.mobile-menu a:hover, .mobile-menu a.active { color: var(--text-primary); background: var(--bg-elevated); }

/* =============================================================
   LAYOUT PRIMITIVES
   ============================================================= */
.page { padding-top: var(--nav-h); min-height: 100vh; }

.section { padding: 88px var(--gutter); }
.section-tight { padding-top: 0; }
.section-alt {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.section-inner { max-width: var(--container); margin: 0 auto; }
.section-header { margin-bottom: 36px; }
.section-header.center { text-align: center; }
.section-header.center .sub { margin-left: auto; margin-right: auto; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-blue);
  margin-bottom: 12px;
}
.section-tag::before {
  content: '';
  width: 14px; height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.section-header.center .section-tag { justify-content: center; }
.section h2, .h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.8vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.gradient, .section h2 .gradient { color: var(--text-secondary); background: none; -webkit-text-fill-color: currentColor; }
.section p.sub, p.sub { font-size: 0.98rem; color: var(--text-secondary); max-width: 580px; line-height: 1.6; }

/* =============================================================
   HERO
   ============================================================= */
.hero {
  position: relative;
  padding: 112px var(--gutter) 72px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(124,138,255,0.16) 0%, transparent 70%),
    radial-gradient(30% 30% at 85% 30%, rgba(95,212,232,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(var(--fg-rgb),0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--fg-rgb),0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 0%, transparent 100%);
  pointer-events: none;
}
.hero-content { position: relative; max-width: 920px; margin: 0 auto; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(var(--fg-rgb),0.03);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 14px 6px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 28px;
}
.hero-badge .dot {
  width: 7px; height: 7px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(52,211,153,0.18);
  animation: pulse 2s ease-in-out infinite;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6.2vw, 4.6rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin-bottom: 22px;
}
.hero h1 .gradient {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.6;
}
.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

/* ─── KPI strip ─── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 880px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
}
.stat-item {
  padding: 22px 24px;
  text-align: left;
  border-right: 1px solid var(--border-subtle);
}
.stat-item:last-child { border-right: none; }
.stat-value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; }

/* =============================================================
   BUTTONS
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  transition: var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary {
  background: var(--accent-blue);
  color: var(--text-on-accent);
  box-shadow: 0 1px 0 rgba(var(--fg-rgb),0.25) inset, 0 6px 20px -8px rgba(124,138,255,0.7);
}
.btn-primary:hover { background: var(--accent-blue-hi); transform: translateY(-1px); }
.btn-secondary {
  background: rgba(var(--fg-rgb),0.03);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-secondary:hover { background: rgba(var(--fg-rgb),0.07); border-color: rgba(var(--fg-rgb),0.2); }
.btn-green {
  background: var(--accent-green);
  color: var(--text-on-green);
  box-shadow: 0 1px 0 rgba(var(--fg-rgb),0.25) inset, 0 6px 20px -8px rgba(52,211,153,0.7);
}
.btn-green:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn .arrow { transition: transform 0.18s var(--ease); }
.btn:hover .arrow { transform: translateX(2px); }

/* =============================================================
   CARDS, TAGS, BADGES
   ============================================================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-ring);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
  overflow: hidden;
}
.card:hover { border-color: var(--border-strong); }
.card-pad { padding: 24px; }

.tag, .badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.4;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: rgba(var(--fg-rgb),0.04);
  color: var(--text-secondary);
  white-space: nowrap;
}
.badge {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-xs);
  padding: 3px 7px;
}
.tag-blue, .badge-blue       { background: var(--tint-blue);   color: var(--accent-blue-hi); border-color: rgba(124,138,255,0.22); }
.tag-green, .badge-green     { background: var(--tint-green);  color: var(--accent-green);   border-color: rgba(52,211,153,0.22); }
.tag-violet, .tag-purple     { background: var(--tint-violet); color: var(--accent-violet);  border-color: rgba(167,139,250,0.22); }
.tag-cyan                    { background: var(--tint-cyan);   color: var(--accent-cyan);    border-color: rgba(95,212,232,0.22); }
.tag-amber, .badge-amber     { background: var(--tint-amber);  color: var(--accent-amber);   border-color: rgba(251,191,36,0.25); }
.tag-warn                    { background: var(--tint-amber);  color: var(--accent-amber);   border-color: rgba(251,191,36,0.25); }
.tag-warn::before            { content: '!'; font-weight: 700; font-size: 0.66rem; width: 12px; height: 12px; border-radius: 50%; display: inline-grid; place-items: center; background: rgba(251,191,36,0.2); }
.badge-subtle                { background: rgba(var(--fg-rgb),0.04); color: var(--text-secondary); border-color: var(--border-subtle); text-transform: none; letter-spacing: 0; font-family: var(--font-sans); font-size: 0.72rem; }

/* =============================================================
   FIRM GRID CARD
   ============================================================= */
.firms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.firm-card { padding: 22px; position: relative; background: var(--bg-card); display: flex; flex-direction: column; }
.firm-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); border-color: var(--border-strong); }
.firm-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.firm-logo-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; }
.firm-logo {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  overflow: hidden;
}
.firm-name { font-weight: 650; font-size: 1rem; letter-spacing: -0.015em; margin-bottom: 2px; }
.firm-meta { font-size: 0.76rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trust-badge {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
}
.trust-score {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.trust-label { font-size: 0.66rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.firm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.firm-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}
.firm-stat { background: var(--bg-inset); padding: 12px 10px; }
.firm-stat-val { font-size: 0.95rem; font-weight: 500; color: var(--text-primary); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.firm-stat-key { font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; }
.firm-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }

.promo-code-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-inset);
  border: 1px dashed rgba(52,211,153,0.35);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  flex: 1;
  min-width: 0;
}
.promo-code-box span { font-size: 0.72rem; color: var(--text-muted); }
.promo-code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-green);
  cursor: pointer;
  letter-spacing: 0.02em;
}
.promo-code:hover { text-decoration: underline; text-underline-offset: 3px; }

/* =============================================================
   QUICK FILTER BAR (home)
   ============================================================= */
.quickfilter {
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px var(--gutter) 0;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.quickfilter-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.quickfilter .filter-pills { margin-top: 0; }

/* =============================================================
   PAYOUT FEED
   ============================================================= */
.payout-feed {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-ring);
  overflow: hidden;
}
.payout-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}
.payout-feed-header h3 { font-size: 0.88rem; font-weight: 600; display: flex; align-items: baseline; gap: 8px; }
.payout-feed-header h3 small { font-size: 0.74rem; color: var(--text-muted); font-weight: 400; }
.live-indicator {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem; letter-spacing: 0.1em;
  color: var(--accent-green); font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--tint-green);
  border: 1px solid rgba(52,211,153,0.22);
}
.live-dot { width: 6px; height: 6px; background: var(--accent-green); border-radius: 50%; animation: pulse 1.5s ease-in-out infinite; }
.payout-list { max-height: 420px; overflow-y: auto; }
.payout-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s var(--ease);
  animation: slideIn 0.4s var(--ease);
}
.payout-item:last-child { border-bottom: none; }
.payout-item:hover { background: rgba(var(--fg-rgb),0.02); }
.payout-chain-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}
.payout-info { flex: 1; min-width: 0; display: grid; gap: 1px; }
.payout-firm { font-size: 0.86rem; font-weight: 600; }
.payout-wallet { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }
.payout-amount { font-size: 0.9rem; font-weight: 500; color: var(--accent-green); font-family: var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.payout-time { font-size: 0.7rem; color: var(--text-muted); text-align: right; white-space: nowrap; margin-top: 2px; }
.tx-link { font-size: 0.7rem; color: var(--text-muted); font-family: var(--font-mono); transition: color 0.15s; justify-self: start; }
.tx-link:hover { color: var(--accent-cyan); }

/* =============================================================
   FILTER BAR / FORM CONTROLS
   ============================================================= */
.filter-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.filter-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filter-group { display: flex; flex-direction: column; gap: 6px; min-width: 170px; flex: 1; }
.filter-group.shrink { flex: 0 0 auto; min-width: 0; }
.filter-label { font-size: 0.74rem; color: var(--text-muted); font-weight: 500; }

.filter-select, .filter-input, .calc-input, .compare-swap-dropdown {
  height: 40px;
  background-color: var(--bg-inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 0 12px;
  font-size: 0.86rem;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
select.filter-select, select.calc-input, select.compare-swap-dropdown {
  padding-right: 34px;
  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='%236b7282' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.filter-select:hover, .filter-input:hover, .calc-input:hover, .compare-swap-dropdown:hover { border-color: rgba(var(--fg-rgb),0.2); }
.filter-select:focus, .filter-input:focus, .calc-input:focus, .compare-swap-dropdown:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(124,138,255,0.18);
}
.filter-select option, .calc-input option, .compare-swap-dropdown option { background: var(--bg-elevated); color: var(--text-primary); }

.filter-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}
.pill:hover { color: var(--text-primary); border-color: rgba(var(--fg-rgb),0.22); background: rgba(var(--fg-rgb),0.03); }
.pill.active { background: var(--tint-blue); border-color: rgba(124,138,255,0.5); color: var(--accent-blue-hi); }
.pill.active::before {
  content: '';
  width: 10px; height: 10px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ─── Results bar + segmented view toggle ─── */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.results-count { font-size: 0.86rem; color: var(--text-muted); }
.results-count strong { color: var(--text-primary); font-family: var(--font-mono); font-weight: 500; }
.results-actions { display: flex; align-items: center; gap: 10px; }
.view-toggle {
  display: inline-flex;
  padding: 3px;
  background: var(--bg-inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
}
.view-toggle .btn {
  height: 28px;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  box-shadow: none;
}
.view-toggle .btn:hover { color: var(--text-primary); }
.view-toggle .btn.active { background: var(--bg-hover); color: var(--text-primary); box-shadow: 0 0 0 1px var(--border-strong) inset, var(--shadow-sm); }

/* =============================================================
   COMPARE TABLE
   ============================================================= */
.compare-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  box-shadow: var(--card-ring);
}
.compare-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.86rem; }
.compare-table th, .compare-table td {
  padding: 13px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.compare-table td + td, .compare-table th + th { border-left: 1px solid var(--border-subtle); }
.compare-table thead th {
  background: var(--bg-surface) !important;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  vertical-align: bottom;
  position: sticky;
  top: 0;
  z-index: 10;
}
.compare-table thead th:first-child {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
}
.compare-table tbody tr { transition: background 0.15s; }
.compare-table tbody tr:not(.compare-metric-group-row):hover td { background: rgba(var(--fg-rgb),0.02); }
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table .metric-name {
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500 !important;
  position: sticky;
  left: 0;
  background: var(--bg-card);
  z-index: 2;
}
.compare-table .best { color: var(--accent-green); font-weight: 600; }
.compare-table .best::before { content: '● '; font-size: 0.55rem; vertical-align: 2px; }
.compare-table .warn { color: var(--accent-amber); }
.compare-table .bad { color: var(--accent-red); }
.compare-table small { display: block; margin-top: 2px; }
.badge-warn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.74rem;
  background: var(--tint-amber);
  border: 1px solid rgba(251,191,36,0.28);
  color: var(--accent-amber);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.col-header { display: flex; flex-direction: column; gap: 4px; }
.col-header .firm-h { font-weight: 700; font-size: 0.85rem; color: var(--text-primary); }
.col-header .chain-h { font-size: 0.7rem; color: var(--text-muted); }

/* =============================================================
   SOLVENCY
   ============================================================= */
.solvency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.solvency-card { padding: 20px; }
.solvency-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.solvency-firm { font-weight: 650 !important; font-size: 0.98rem !important; letter-spacing: -0.015em; }
.health-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.health-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.health-excellent { background: var(--tint-green); color: var(--accent-green); border: 1px solid rgba(52,211,153,0.25); }
.health-good      { background: var(--tint-amber); color: var(--accent-amber); border: 1px solid rgba(251,191,36,0.25); }
.health-risk      { background: var(--tint-red);   color: var(--accent-red);   border: 1px solid rgba(248,113,113,0.25); }
.progress-bar { height: 6px; background: rgba(var(--fg-rgb),0.06); border-radius: var(--radius-full); overflow: hidden; margin: 8px 0; }
.progress-fill { height: 100%; border-radius: var(--radius-full); transition: width 0.8s var(--ease); }
.treasury-amount { font-size: 0.8rem; color: var(--text-muted); }
.treasury-amount strong { font-family: var(--font-mono); font-weight: 500; font-size: 1.05rem; color: var(--text-primary); margin: 0 2px; }

/* =============================================================
   CALCULATOR
   ============================================================= */
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.calc-panel { padding: 28px; }
.calc-heading {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.calc-heading .step {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--accent-blue);
  background: var(--tint-blue);
  border: 1px solid rgba(124,138,255,0.25);
  border-radius: var(--radius-xs);
  padding: 2px 6px;
}
.calc-divider { border: none; border-top: 1px solid var(--border-subtle); margin: 26px 0 22px; }
.calc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.calc-fields .full { grid-column: 1 / -1; }
.calc-input-group { margin-bottom: 18px; }
.calc-input-group label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.calc-input-group label span {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-size: 0.82rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 1px 7px;
}
.calc-input { width: 100%; font-variant-numeric: tabular-nums; }
.range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(var(--fg-rgb),0.08);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
  margin: 10px 0 4px;
}
.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--text-primary);
  border: 4px solid var(--accent-blue);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  transition: transform 0.15s;
}
.range-input::-webkit-slider-thumb:hover { transform: scale(1.12); }
.range-input::-moz-range-thumb {
  width: 12px; height: 12px;
  background: var(--text-primary);
  border: 4px solid var(--accent-blue);
  border-radius: 50%;
  cursor: grab;
}
.range-input:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 6px; }
.calc-result-box {
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px 18px;
}
.result-metric { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border-subtle); }
.result-metric:last-child { border-bottom: none; }
.result-label { font-size: 0.84rem; color: var(--text-secondary); }
.result-value { font-weight: 500; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 0.98rem; }
.result-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}
.prob-bar { margin-top: 20px; }
.prob-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.84rem; color: var(--text-secondary); margin-bottom: 10px; }
.prob-label #probPct { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 500; }
.prob-note { font-size: 0.74rem; color: var(--text-muted); margin-top: 8px; }

.insight-card { padding: 20px 22px; background: linear-gradient(180deg, rgba(124,138,255,0.06), transparent 80%), var(--bg-card); }
.insight-card h4, .match-card h4 { font-size: 0.9rem; font-weight: 650; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.insight-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7; }
.insight-card strong { color: var(--text-primary); }
.match-card { padding: 20px 22px; margin-top: 16px; }
.match-list { display: flex; flex-direction: column; gap: 8px; }
.match-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px;
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.match-row .left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.match-row .payout-chain-icon { width: 32px; height: 32px; }
.match-row strong { font-size: 0.88rem; }
.match-row .meta { font-size: 0.74rem; color: var(--text-muted); }
.match-row .code { text-align: right; font-size: 0.7rem; color: var(--text-muted); }
.match-row .code div { font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent-green); }

/* =============================================================
   FOOTER
   ============================================================= */
.footer {
  background: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  padding: 64px var(--gutter) 28px;
}
.footer-inner { max-width: var(--container); margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand p { font-size: 0.86rem; color: var(--text-muted); margin-top: 14px; line-height: 1.7; max-width: 320px; }
.footer-social { display: flex; gap: 8px; margin-top: 20px; }
.footer-social a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  transition: var(--transition);
}
.footer-social a:hover { color: var(--text-primary); border-color: var(--border-strong); background: rgba(var(--fg-rgb),0.03); }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 0.86rem; color: var(--text-secondary); padding: 5px 0; transition: color 0.15s; }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}
.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); }
.chain-icons { display: flex; gap: 6px; }
.chain-icon-sm {
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-xs);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

/* =============================================================
   ANIMATION
   ============================================================= */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); background: rgba(52,211,153,0.06); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px) scale(0.99); } to { opacity: 1; transform: none; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 20px rgba(124,138,255,0.2); } 50% { box-shadow: 0 0 40px rgba(124,138,255,0.4); } }
@keyframes scroll-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.fade-up { animation: fadeUp 0.7s var(--ease) both; }
.fade-up-delay-1 { animation-delay: 0.08s; }
.fade-up-delay-2 { animation-delay: 0.16s; }
.fade-up-delay-3 { animation-delay: 0.24s; }
.fade-up-delay-4 { animation-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .ticker-track { animation: none !important; }
}

/* =============================================================
   TICKER
   ============================================================= */
.ticker-wrapper {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  padding: 11px 0;
  white-space: nowrap;
  position: relative;
}
.ticker-wrapper::before, .ticker-wrapper::after { content: ''; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2; pointer-events: none; }
.ticker-wrapper::before { left: 0; background: linear-gradient(to right, var(--bg-surface), transparent); }
.ticker-wrapper::after { right: 0; background: linear-gradient(to left, var(--bg-surface), transparent); }
.ticker-wrapper:hover .ticker-track { animation-play-state: paused; }
.ticker-track { display: inline-flex; animation: scroll-ticker 40s linear infinite; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-right: 1px solid var(--border-subtle);
}
.ticker-item strong { color: var(--text-primary); font-weight: 600; }
.ticker-item .opt-badge {
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
}
.ticker-amount { font-weight: 500; color: var(--accent-green); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ticker-chain { font-size: 0.72rem; color: var(--text-muted); }

/* =============================================================
   TABS (generic)
   ============================================================= */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 28px; }
.tab-btn {
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--text-primary); border-bottom-color: var(--accent-blue); }

/* =============================================================
   PAGE HEADER (sub-pages)
   ============================================================= */
.page-header {
  position: relative;
  padding: 64px var(--gutter) 44px;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  isolation: isolate;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(50% 120% at 0% 0%, rgba(124,138,255,0.10), transparent 60%),
    linear-gradient(rgba(var(--fg-rgb),0.03) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(var(--fg-rgb),0.03) 1px, transparent 1px) 0 0 / 56px 56px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
}
.page-header-inner { max-width: var(--container); margin: 0 auto; }
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.page-header h1 .gradient { color: var(--text-secondary); }
.page-header p { font-size: 1rem; color: var(--text-secondary); max-width: 640px; }
.page-header .section { padding-top: 40px; }
.page-body { padding-top: 40px; }
.legend-dot { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.legend-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.legend-green { color: var(--accent-green); }
.legend-amber { color: var(--accent-amber); }

/* =============================================================
   TX EXPLORER / GENERIC DATA TABLE
   ============================================================= */
.tx-table-wrap { overflow-x: auto; }
.tx-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.tx-table th, .tx-table td { padding: 12px 18px; text-align: left; border-bottom: 1px solid var(--border-subtle); white-space: nowrap; }
.tx-table th { font-size: 0.72rem; font-weight: 500; color: var(--text-muted); background: var(--bg-surface); position: sticky; top: 0; }
.tx-table tbody tr:last-child td { border-bottom: none; }
.tx-table tr:hover td { background: rgba(var(--fg-rgb),0.02); }
.tx-table td:nth-child(4) { font-family: var(--font-mono); font-weight: 500 !important; }
.tx-hash { font-family: var(--font-mono); color: var(--text-secondary); transition: color 0.15s; }
.tx-hash:hover { color: var(--accent-cyan); }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.status-confirmed { background: var(--tint-green); color: var(--accent-green); border: 1px solid rgba(52,211,153,0.22); }
.status-flagged   { background: var(--tint-red);   color: var(--accent-red);   border: 1px solid rgba(248,113,113,0.22); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

.table-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

/* ─── Toolbar ─── */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar .filter-select { min-width: 132px; height: 36px; font-size: 0.82rem; }

/* ─── KPI cards (payouts) ─── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 48px;
}
.stat-card { background: var(--bg-card); padding: 20px 22px; }
.stat-card-label { font-size: 0.76rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.stat-card-label::before { content: ''; width: 6px; height: 6px; border-radius: 2px; background: var(--c, var(--accent-blue)); }
.stat-card-value { font-family: var(--font-mono); font-size: 1.55rem; font-weight: 500; letter-spacing: -0.03em; margin-top: 8px; font-variant-numeric: tabular-nums; }

/* ─── Leaderboard ─── */
.block { margin-bottom: 52px; }
.leaderboard {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-ring);
  overflow: hidden;
}
.leader-row {
  display: grid;
  grid-template-columns: 44px 1fr minmax(120px, 30%) 80px;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.leader-row:last-child { border-bottom: none; }
.leader-row:hover { background: rgba(var(--fg-rgb),0.02); }
.leader-rank {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}
.leader-rank.r1 { color: var(--rank-gold); border-color: rgba(252,211,77,0.35); background: rgba(252,211,77,0.08); }
.leader-rank.r2 { color: var(--rank-silver); border-color: rgba(212,216,224,0.3); background: rgba(212,216,224,0.06); }
.leader-rank.r3 { color: var(--rank-bronze); border-color: rgba(224,163,107,0.35); background: rgba(224,163,107,0.08); }
.leader-info strong { font-size: 0.92rem; }
.leader-info span { font-size: 0.76rem; color: var(--text-muted); margin-left: 6px; }
.leader-bar { height: 6px; border-radius: var(--radius-full); background: rgba(var(--fg-rgb),0.06); overflow: hidden; }
.leader-bar > i { display: block; height: 100%; border-radius: inherit; background: var(--accent-green); }
.leader-time { text-align: right; font-family: var(--font-mono); font-size: 0.9rem; font-weight: 500; color: var(--accent-green); }
.leader-time small { display: block; font-family: var(--font-sans); font-size: 0.68rem; color: var(--text-muted); font-weight: 400; }

/* ─── Notice / callout ─── */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  margin-bottom: 20px;
}
.notice-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
  flex-shrink: 0;
  color: var(--accent-blue);
  background: var(--tint-blue);
}
.notice strong { font-size: 0.88rem; display: block; margin-bottom: 2px; }
.notice p { font-size: 0.82rem; color: var(--text-secondary); margin: 0; line-height: 1.6; }
.notice-amber { background: rgba(251,191,36,0.05); border-color: rgba(251,191,36,0.22); }
.notice-amber .notice-icon { color: var(--accent-amber); background: var(--tint-amber); }
.notice-amber strong { color: var(--accent-amber); }

/* =============================================================
   WIZARD
   ============================================================= */
.split-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.split-grid .sub { margin-bottom: 22px; }
.wizard-card { max-width: 600px; margin: 0 auto; padding: 28px; text-align: left; }
.wizard-card:hover { transform: none; }
.wizard-step { display: none; }
.wizard-step.active { display: block; animation: fadeUp 0.35s var(--ease); }
.wizard-step h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 650; letter-spacing: -0.02em; margin-bottom: 4px; }
.wizard-step p { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 20px; }
.wizard-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wizard-option {
  padding: 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-inset);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  position: relative;
}
.wizard-option:hover { border-color: rgba(var(--fg-rgb),0.22); background: var(--bg-elevated); }
.wizard-option.selected { border-color: var(--accent-blue); background: var(--tint-blue); box-shadow: 0 0 0 3px rgba(124,138,255,0.14); }
.wizard-option.selected::after {
  content: '';
  position: absolute; top: 14px; right: 14px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0d1a' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.wizard-option .opt-icon { font-size: 1.8rem; margin-bottom: 8px; }
.opt-badge, .wizard-option .opt-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  margin-bottom: 10px;
  letter-spacing: 0.06em;
}
.wizard-option.selected .opt-badge { color: var(--accent-blue-hi); border-color: rgba(124,138,255,0.3); background: rgba(124,138,255,0.12); }
.wizard-option .opt-label { font-size: 0.92rem; font-weight: 600; }
.wizard-option .opt-sub { font-size: 0.76rem; color: var(--text-muted); margin-top: 2px; }
.wizard-progress { display: flex; gap: 6px; justify-content: flex-start; margin-bottom: 24px; }
.w-dot { height: 4px; width: 28px; border-radius: var(--radius-full); background: rgba(var(--fg-rgb),0.1); transition: var(--transition); }
.w-dot.active { background: var(--accent-blue); width: 44px; }
.wizard-step > .btn { width: 100%; margin-top: 18px; }
.wizard-result-card { background: var(--bg-inset); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 20px; margin: 20px 0; text-align: left; }

/* ─── Feature cards ─── */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border-subtle); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; }
.feature-card { background: var(--bg-card); padding: 28px; transition: background 0.2s; }
.feature-card:hover { background: var(--bg-elevated); }
.feature-card h3 { font-size: 1rem; font-weight: 650; letter-spacing: -0.015em; margin: 18px 0 8px; }
.feature-card p { font-size: 0.87rem; color: var(--text-secondary); line-height: 1.65; }
.feature-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
}
.feature-icon-badge {
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid currentColor;
  margin-bottom: 14px;
}

/* ─── Toast ─── */
.toast-stack { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 12px 16px 12px 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-pop);
  max-width: 380px;
  animation: slideUp 0.25s var(--ease);
  pointer-events: auto;
}
.toast-icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; color: var(--accent-green); background: var(--tint-green); }
.toast.info .toast-icon { color: var(--accent-blue); background: var(--tint-blue); }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: all 0.2s var(--ease); }

/* =============================================================
   FIRM LISTING TABLE
   ============================================================= */
.pfm-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  box-shadow: var(--card-ring);
}
.pfm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.pfm-table thead th {
  background: var(--bg-surface);
  padding: 12px 18px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  text-align: left;
}
.pfm-row { cursor: pointer; transition: background 0.15s var(--ease); }
.pfm-row td { padding: 16px 18px; vertical-align: middle; border-bottom: 1px solid var(--border-subtle); white-space: nowrap; transition: background 0.15s; }
.pfm-row:last-child td { border-bottom: none; }
.pfm-row:hover td { background: rgba(var(--fg-rgb),0.025); }
.pfm-row:hover .pfm-btn-firm { background: var(--accent-blue); color: var(--text-on-accent); border-color: var(--accent-blue); }

.pfm-rank-cell { width: 56px; text-align: center; }
.pfm-rank-badge {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}
.pfm-rank-1 { color: var(--rank-gold); border-color: rgba(252,211,77,0.35); background: rgba(252,211,77,0.08); }
.pfm-rank-2 { color: var(--rank-silver); border-color: rgba(212,216,224,0.3); background: rgba(212,216,224,0.06); }
.pfm-rank-3 { color: var(--rank-bronze); border-color: rgba(224,163,107,0.35); background: rgba(224,163,107,0.08); }

.pfm-firm-cell { display: flex; align-items: center; gap: 12px; }
.pfm-firm-logo-wrap {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: grid; place-items: center;
  border: 1px solid var(--border-strong);
  padding: 6px;
  flex-shrink: 0;
}
.pfm-firm-logo-img { width: 100%; height: 100%; object-fit: contain; }
.pfm-firm-title { font-weight: 650; font-size: 0.95rem; letter-spacing: -0.015em; color: var(--text-primary); display: flex; align-items: center; gap: 4px; }
.pfm-firm-sub { font-size: 0.74rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; margin-top: 1px; }
.pfm-firm-sub .split { color: var(--accent-green); font-weight: 500; }
.pfm-favorite-btn {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 6px;
  color: var(--text-muted);
  transition: var(--transition);
}
.pfm-favorite-btn:hover { color: var(--accent-amber); background: rgba(251,191,36,0.1); }
.pfm-favorite-btn.favorited { color: var(--accent-amber); }

.pfm-rating-badge { display: inline-flex; flex-direction: column; gap: 5px; min-width: 88px; }
.pfm-rating-score { display: inline-flex; align-items: baseline; gap: 4px; }
.pfm-rating-pill { font-family: var(--font-mono); font-weight: 600; font-size: 0.95rem; }
.pfm-rating-pill small { color: var(--text-muted); font-weight: 400; font-size: 0.72rem; }
.pfm-score-track { height: 4px; border-radius: var(--radius-full); background: rgba(var(--fg-rgb),0.07); overflow: hidden; width: 88px; }
.pfm-score-track > i { display: block; height: 100%; border-radius: inherit; }
.pfm-reviews-count { font-size: 0.72rem; color: var(--text-muted); }
.pfm-country-cell { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--text-secondary); }
.pfm-year-circle {
  display: inline-grid; place-items: center;
  min-width: 28px; height: 24px;
  padding: 0 6px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}
.pfm-assets-tags { display: flex; flex-wrap: wrap; gap: 4px; max-width: 220px; }
.pfm-asset-tag {
  background: rgba(var(--fg-rgb),0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  font-size: 0.7rem;
  padding: 1px 7px;
  color: var(--text-secondary);
}
.pfm-platform { font-size: 0.82rem; color: var(--text-secondary); }
.pfm-chains { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }
.pfm-alloc { font-family: var(--font-mono); font-weight: 500; color: var(--text-primary); }
.pfm-alloc-label { font-size: 0.7rem; color: var(--text-muted); }

.pfm-promo-box {
  display: inline-flex;
  align-items: stretch;
  border: 1px dashed rgba(52,211,153,0.35);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  overflow: hidden;
}
.pfm-promo-discount {
  color: var(--accent-green);
  background: var(--tint-green);
  font-weight: 600;
  padding: 5px 8px;
  display: grid; place-items: center;
}
.pfm-promo-code {
  font-family: var(--font-mono);
  padding: 5px 9px;
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.15s;
}
.pfm-promo-code:hover { background: rgba(52,211,153,0.1); }
.pfm-promo-code .copy { font-size: 0.62rem; color: var(--text-muted); letter-spacing: 0.06em; }

.pfm-btn-firm {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-weight: 600;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  transition: var(--transition);
}
.pfm-btn-firm:hover { background: var(--accent-blue); color: var(--text-on-accent); border-color: var(--accent-blue); }

.empty-state { text-align: center; padding: 64px 24px; color: var(--text-muted); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
.empty-state strong { display: block; color: var(--text-primary); font-size: 1rem; margin-bottom: 4px; }

/* =============================================================
   FIRM DETAIL MODAL
   ============================================================= */
.pfm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  overflow-y: auto;
  padding: 40px 20px;
}
.pfm-modal-backdrop.active { display: flex; justify-content: center; align-items: flex-start; animation: fadeIn 0.2s ease; }
.pfm-modal-content {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  box-shadow: var(--shadow-pop);
  position: relative;
  overflow: hidden;
  animation: slideUp 0.3s var(--ease);
}
.pfm-modal-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-base);
  position: sticky;
  top: 0;
  z-index: 5;
}
.modal-bar-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.modal-bar-group .filter-select { height: 34px; min-width: 170px; font-size: 0.82rem; }
.pfm-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  transition: var(--transition);
}
.pfm-back-btn:hover { color: var(--text-primary); background: rgba(var(--fg-rgb),0.05); }

.pfm-detail-hero {
  padding: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(70% 120% at 0% 0%, rgba(124,138,255,0.07), transparent 60%);
}
.pfm-hero-left { display: flex; gap: 22px; align-items: flex-start; min-width: 0; }
.pfm-hero-left > div:last-child { flex: 1; min-width: 0; }
.pfm-hero-logo {
  width: 80px; height: 80px;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  display: grid; place-items: center;
  padding: 12px;
  flex-shrink: 0;
}
.pfm-hero-logo img { width: 100%; height: 100%; object-fit: contain; }
.detail-title { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; margin-bottom: 6px; }
.detail-tagline { color: var(--text-secondary); font-size: 0.92rem; max-width: 560px; margin-bottom: 14px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pfm-hero-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  margin-top: 22px;
  border-radius: var(--radius-md);
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}
.pfm-meta-item { background: var(--bg-inset); padding: 12px 14px; }
.pfm-meta-item .meta-label { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 3px; }
.pfm-meta-item .meta-value { font-size: 0.86rem; font-weight: 600; color: var(--text-primary); }
.meta-value.mono { font-family: var(--font-mono); font-weight: 500; color: var(--accent-cyan); }

.pfm-hero-right {
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  align-self: start;
}
.pfm-big-score { font-family: var(--font-mono); font-size: 3rem !important; font-weight: 500 !important; letter-spacing: -0.04em; line-height: 1; text-align: center; margin-bottom: 6px; }
.score-caption { text-align: center; font-family: var(--font-mono); color: var(--text-muted); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px; }
.score-rows { display: flex; flex-direction: column; font-size: 0.82rem; }
.score-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border-subtle); }
.score-row span:first-child { color: var(--text-muted); }
.score-row span:last-child { font-family: var(--font-mono); font-weight: 500; }
.pfm-score-subtitle { text-align: center; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 16px; }
.pfm-rating-bars { display: flex; flex-direction: column; gap: 6px; }
.pfm-bar-row { display: flex; align-items: center; gap: 8px; font-size: 0.72rem; color: var(--text-secondary); }
.pfm-bar-track { flex: 1; height: 6px; background: rgba(var(--fg-rgb),0.06); border-radius: 3px; overflow: hidden; }
.pfm-bar-fill { height: 100%; background: var(--accent-blue); border-radius: 3px; }

.pfm-promo-banner {
  margin: 24px 32px 0;
  background: linear-gradient(90deg, rgba(52,211,153,0.09), rgba(52,211,153,0.02));
  border: 1px solid rgba(52,211,153,0.25);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.promo-banner-left { display: flex; align-items: center; gap: 14px; }
.promo-banner-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--accent-green); background: var(--tint-green); border: 1px solid rgba(52,211,153,0.25); flex-shrink: 0; }
.promo-banner-title { font-weight: 650; font-size: 0.95rem; }
.promo-banner-sub { font-size: 0.82rem; color: var(--text-secondary); }
.promo-banner-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.promo-banner-right .promo-code-box { padding: 0 14px; height: 34px; flex: 0 0 auto; }
.promo-banner-right .promo-code { font-size: 0.92rem; }

.pfm-nav-tabs {
  display: flex;
  gap: 4px;
  padding: 0 32px;
  margin-top: 24px;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
}
.pfm-nav-tabs::-webkit-scrollbar { display: none; }
.pfm-tab-pill {
  padding: 12px 14px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
  white-space: nowrap;
}
.pfm-tab-pill:hover { color: var(--text-primary); }
.pfm-tab-pill.active { color: var(--text-primary); border-bottom-color: var(--accent-blue); }

.pfm-detail-body { padding: 28px 32px 36px; }
.pfm-detail-body h3 { font-family: var(--font-display); font-size: 1.2rem !important; font-weight: 650 !important; letter-spacing: -0.02em; }
.pfm-detail-body h4 { font-weight: 650; letter-spacing: -0.01em; }
.pfm-detail-body .card:hover { transform: none; box-shadow: none; }

.pfm-subnav-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
.pfm-subnav-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-right: 1px solid var(--border-subtle);
  padding-right: 16px;
  align-self: start;
}
.pfm-subnav-item {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: left;
  transition: var(--transition);
  white-space: nowrap;
}
.pfm-subnav-item:hover { color: var(--text-primary); background: rgba(var(--fg-rgb),0.04); }
.pfm-subnav-item.active { color: var(--text-primary); background: var(--bg-hover); box-shadow: inset 2px 0 0 var(--accent-blue); }

.pfm-challenges-table-wrap { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); margin-top: 16px; }
.pfm-challenges-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.pfm-challenges-table th, .pfm-challenges-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border-subtle); white-space: nowrap; }
.pfm-challenges-table th { background: var(--bg-base); color: var(--text-muted); font-size: 0.72rem; font-weight: 500; }
.pfm-challenges-table tbody tr:last-child td { border-bottom: none; }
.pfm-challenges-table tr:hover td { background: rgba(var(--fg-rgb),0.02); }

/* ─── Modal content helpers ─── */
.content-lead { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.75; margin: 10px 0 22px; max-width: 72ch; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 24px; }
.kv-card { background: var(--bg-inset); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 14px 16px; }
.kv-label { font-size: 0.74rem; color: var(--text-muted); }
.kv-value { font-weight: 600; font-size: 0.98rem; margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kv-value.big { font-family: var(--font-mono); font-weight: 500; font-size: 1.35rem; letter-spacing: -0.02em; }

/* =============================================================
   COMPARE HUB
   ============================================================= */
.compare-hub { margin-bottom: 20px; }
.compare-vs-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
}
.compare-hub-head { text-align: center; margin-bottom: 22px; }
.compare-hub-head h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 4px; }
.compare-hub-head p { color: var(--text-secondary); font-size: 0.88rem; }
.compare-hub-head strong { color: var(--text-primary); }
.compare-selector-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  max-width: 820px;
  margin: 0 auto 22px;
}
.compare-select-card {
  background: var(--bg-inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: var(--transition);
  position: relative;
}
.compare-select-card:hover { border-color: rgba(var(--fg-rgb),0.2); }
.compare-select-label { font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; }
.compare-select-firm { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.compare-select-firm strong { font-size: 1.02rem; display: block; letter-spacing: -0.015em; }
.compare-select-firm span { font-size: 0.76rem; color: var(--text-muted); }
.compare-select-card .filter-select { width: 100%; }
.compare-vs-badge {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.compare-controls {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}
.compare-controls .label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.compare-controls .filter-select { min-width: 200px; height: 34px; font-size: 0.82rem; }
.compare-controls .group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.compare-presets-wrap { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.compare-presets-wrap .label { font-size: 0.76rem; color: var(--text-muted); margin-right: 4px; }
.compare-preset-pill {
  height: 28px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  padding: 0 12px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.compare-preset-pill:hover { background: var(--tint-blue); border-color: rgba(124,138,255,0.45); color: var(--accent-blue-hi); }

.compare-col-header-box { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 4px; position: relative; text-transform: none; letter-spacing: 0; }
.compare-col-name { font-family: var(--font-display); font-size: 1.02rem; font-weight: 650; color: var(--text-primary); cursor: pointer; letter-spacing: -0.015em; }
.compare-col-name:hover { color: var(--accent-blue-hi); }
.compare-col-sub { font-size: 0.72rem; color: var(--text-muted); font-weight: 400; }
.compare-col-logo {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--logo-tile);
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
  padding: 8px;
  flex-shrink: 0;
}
.compare-col-logo img { width: 100%; height: 100%; object-fit: contain; }
.compare-swap-dropdown { height: 30px; font-size: 0.74rem; width: 100%; margin-top: 4px; color: var(--text-secondary); }
.compare-col-header-box .btn { width: 100%; margin-top: 4px; }
.compare-col-remove-btn {
  position: absolute;
  top: 0; right: 0;
  width: 24px; height: 24px;
  border-radius: 6px;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  line-height: 1;
  display: grid; place-items: center;
  transition: var(--transition);
}
.compare-col-remove-btn:hover { background: var(--tint-red); color: var(--accent-red); border-color: rgba(248,113,113,0.35); }
.compare-metric-group-row td {
  background: var(--bg-base) !important;
  font-family: var(--font-mono);
  font-weight: 500 !important;
  color: var(--accent-blue) !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem !important;
  padding: 10px 18px !important;
  position: sticky;
  left: 0;
}

/* =============================================================
   THEME TOGGLE
   ============================================================= */
.theme-toggle {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: rgba(var(--fg-rgb),0.03);
  color: var(--text-secondary);
  transition: var(--transition);
}
.theme-toggle:hover { color: var(--text-primary); background: rgba(var(--fg-rgb),0.07); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ─── Firm card header alignment ─── */
.firm-card-header { align-items: flex-start; }
.firm-logo-wrap { align-items: flex-start; flex: 1; }
.firm-logo-wrap > div:last-child { min-width: 0; }
.trust-badge { flex-shrink: 0; min-width: 72px; }
.trust-label { white-space: nowrap; }
.firm-name { line-height: 1.3; }

/* ─── Compare: selected-firm grid ─── */
.compare-firm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 0 auto 22px;
}
.compare-firm-grid.pair {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  max-width: 820px;
  align-items: center;
}
.compare-select-card .compare-col-remove-btn { top: 12px; right: 12px; }
.compare-add-card {
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 18px;
  min-height: 100%;
}
.compare-add-card .filter-select { width: 100%; }
.compare-count-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.72rem;
  padding: 2px 8px; border-radius: var(--radius-full);
  background: var(--tint-blue); color: var(--accent-blue-hi);
  border: 1px solid rgba(124,138,255,0.25);
}
.dd-type { font-size: 0.74rem; font-weight: 500; margin-left: 4px; }
.dd-static { color: var(--accent-green); }
.dd-trailing { color: var(--accent-amber); }

/* ─── Wizard result ─── */
.wizard-match { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.wizard-match .pfm-firm-logo-wrap { width: 52px; height: 52px; }
.wizard-match-name { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.02em; }
.wizard-match-score { margin-left: auto; text-align: right; }
.wizard-match-score b { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 500; display: block; line-height: 1; }
.wizard-match-score span { font-size: 0.68rem; color: var(--text-muted); }
.wizard-reasons { display: grid; gap: 6px; margin: 4px 0 14px; }
.wizard-reasons li { font-size: 0.84rem; color: var(--text-secondary); display: flex; gap: 8px; align-items: baseline; }
.wizard-reasons li::before { content: '✓'; color: var(--accent-green); font-weight: 700; }
.wizard-reasons li.miss::before { content: '–'; color: var(--text-muted); }
.wizard-alts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.78rem; color: var(--text-muted); }
.wizard-alt { height: 28px; padding: 0 10px; border-radius: var(--radius-full); border: 1px solid var(--border-strong); font-size: 0.78rem; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 6px; }
.wizard-alt:hover { color: var(--text-primary); border-color: var(--accent-blue); }
.wizard-alt b { font-family: var(--font-mono); font-weight: 500; color: var(--text-muted); }
.wizard-actions { display: flex; gap: 8px; margin-top: 16px; }
.wizard-actions .btn { flex: 1; }
.wizard-back { font-size: 0.8rem; color: var(--text-muted); margin-top: 10px; display: inline-block; }
.wizard-back:hover { color: var(--text-primary); }
.wizard-option.shake { animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

/* ─── Calculator matches ─── */
.match-row { cursor: pointer; transition: border-color 0.15s, background 0.15s; align-items: flex-start; }
.match-row:hover { border-color: var(--border-strong); background: var(--bg-elevated); }
.match-row .left { align-items: flex-start; }
.match-row .leader-rank { width: 24px; height: 24px; font-size: 0.72rem; margin-top: 5px; }
.match-checks { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 0.72rem; }
.match-checks .ok { color: var(--accent-green); }
.match-checks .ok::before { content: '✓ '; }
.match-checks .no { color: var(--text-muted); text-decoration: line-through; }
.match-warn { font-size: 0.72rem; color: var(--accent-amber); margin-top: 4px; }
.match-row .code { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.match-row .code span { font-size: 0.72rem; color: var(--text-muted); }
.match-fit { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 500; color: var(--text-primary) !important; }
.match-fit small { font-size: 0.7rem; color: var(--text-muted); }
.match-cost { color: var(--text-secondary) !important; }

/* ─── FUNDED/MATCH wordmark ─── */
.nav-logo.wordmark {
  font-family: var(--font-mono);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  gap: 0;
  color: var(--text-primary);
}
.nav-logo.wordmark .wm-slash { color: var(--accent-blue); margin: 0 0.12em; font-weight: 500; }
.nav-logo.wordmark { gap: 12px; }
.fm-mark { display: inline-flex; align-items: center; font-weight: 600; letter-spacing: 0.02em; }
.fm-mark .b { color: var(--text-muted); font-weight: 400; }
.fm-mark .s { color: var(--accent-blue); font-weight: 500; margin: 0 0.05em; }
.fm-divider { width: 1px; height: 18px; background: var(--border-strong); }
.fm-logo { width: 32px; height: 32px; border-radius: 50%; display: block; flex-shrink: 0; }
.footer-brand .fm-logo { width: 36px; height: 36px; }
.fm-name { display: inline-flex; align-items: center; }
.footer-brand .nav-logo.wordmark { font-size: 1.1rem; }

/* ─── Footer legal row ─── */
.footer-legal { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-legal nav { display: flex; gap: 18px; flex-wrap: wrap; padding-left: 18px; border-left: 1px solid var(--border-strong); }
.footer-legal nav a { font-size: 0.8rem; color: var(--text-secondary); transition: color 0.15s; }
.footer-legal nav a:hover { color: var(--text-primary); }
@media (max-width: 640px) { .footer-legal nav { padding-left: 0; border-left: none; } }

/* ─── Legal pages ─── */
.legal { max-width: 760px; }
.legal-meta { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-muted); margin-bottom: 28px; }
.legal h2 { font-size: 1.1rem; font-weight: 650; letter-spacing: -0.015em; margin: 32px 0 10px; }
.legal p, .legal li { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.75; }
.legal p + p { margin-top: 10px; }
.legal ul { list-style: disc; padding-left: 20px; display: grid; gap: 6px; }
.legal strong { color: var(--text-primary); }
.legal a { color: var(--accent-blue); text-decoration: underline; text-underline-offset: 3px; }
.legal code { font-family: var(--font-mono); font-size: 0.85em; background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: 4px; padding: 1px 5px; }
.ph { background: var(--tint-amber); color: var(--accent-amber); border-radius: 4px; padding: 0 4px; font-weight: 500; }

/* ─── Footer: brand left, platform links flush right ─── */
.footer-grid.split { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.footer-grid.split .footer-col { min-width: 160px; }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .calc-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-grid { grid-template-columns: 1fr; gap: 56px; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .pfm-detail-hero { grid-template-columns: 1fr; padding: 24px; }
  .pfm-promo-banner { margin: 20px 24px 0; }
  .pfm-nav-tabs { padding: 0 24px; }
  .pfm-detail-body { padding: 24px; }
  .pfm-subnav-layout { grid-template-columns: 1fr; gap: 20px; }
  .pfm-subnav-menu { border-right: none; border-bottom: 1px solid var(--border-subtle); padding: 0 0 12px; flex-direction: row; overflow-x: auto; }
  .pfm-subnav-item.active { box-shadow: inset 0 -2px 0 var(--accent-blue); }
}
@media (max-width: 768px) {
  :root { --gutter: 16px; --nav-h: 58px; }
  .section { padding: 60px var(--gutter); }
  .hero { padding: 72px var(--gutter) 48px; }
  .hero-cta { margin-bottom: 44px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(-n+2) { border-bottom: 1px solid var(--border-subtle); }
  .stat-value { font-size: 1.3rem; }
  .firms-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .wizard-options { grid-template-columns: 1fr 1fr; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .filter-group { min-width: 0; }
  .firm-stats { grid-template-columns: repeat(3, 1fr); }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid .stat-card:last-child { grid-column: 1 / -1; }
  .feature-grid { grid-template-columns: 1fr; }
  .leader-row { grid-template-columns: 36px 1fr 70px; }
  .leader-bar { display: none; }
  .leader-info span { display: block; margin-left: 0; }
  .calc-fields { grid-template-columns: 1fr; }
  .calc-panel { padding: 20px; }
  .compare-selector-row, .compare-firm-grid.pair { grid-template-columns: 1fr; gap: 10px; }
  .compare-vs-badge { margin: 0 auto; }
  .compare-vs-panel { padding: 18px; }
  .pfm-hero-left { flex-direction: column; gap: 16px; }
  .pfm-hero-logo { width: 64px; height: 64px; }
  .detail-title { font-size: 1.5rem; }
  .pfm-backdrop-pad, .pfm-modal-backdrop { padding: 0; }
  .pfm-modal-content { border-radius: 0; min-height: 100%; }
  .page-header { padding: 44px var(--gutter) 32px; }
  .results-bar { align-items: stretch; }
  .toast-stack { left: 16px; right: 16px; bottom: 16px; align-items: stretch; }
  .toast { max-width: none; }
}
@media (max-width: 480px) {
  .wizard-options { grid-template-columns: 1fr; }
  .nav-inner { gap: 12px; }
  .nav-logo .logo-muted { display: none; }
  .nav-actions { gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; }
}
