:root {
  --bg-0: #07090d;
  --bg-1: #0c1118;
  --bg-2: #121925;
  --bg-3: #1a2332;
  --border: #1f2a3a;
  --border-strong: #2b3a52;
  --text-1: #e6edf7;
  --text-2: #97a3b6;
  --text-3: #5b6577;
  --accent: #7aa2ff;
  --accent-2: #38d6c2;
  --gold: #f5c451;
  --pos: #2ec27e;
  --neg: #ff5d6c;
  --neutral: #97a3b6;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --glow-accent: 0 0 24px rgba(122, 162, 255, 0.25);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--text-1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

body {
  background:
    radial-gradient(ellipse 1200px 600px at 50% -200px, rgba(122, 162, 255, 0.08), transparent 60%),
    radial-gradient(ellipse 800px 400px at 90% 10%, rgba(56, 214, 194, 0.06), transparent 60%),
    var(--bg-0);
  background-attachment: fixed;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 28px 80px;
}

/* ===== Header ===== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  color: #0a0f18;
  box-shadow: var(--glow-accent);
}
.brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-sub {
  color: var(--text-3);
  font-size: 12px;
}
.header-meta {
  display: flex;
  gap: 16px;
  color: var(--text-2);
  font-size: 12px;
}
.header-meta b {
  color: var(--text-1);
}

/* ===== Stats row ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122, 162, 255, 0.4), transparent);
}
.stat-label {
  color: var(--text-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stat-value {
  font-size: 26px;
  font-weight: 700;
  margin-top: 6px;
  letter-spacing: -0.02em;
}
.stat-sub {
  color: var(--text-2);
  font-size: 12px;
  margin-top: 2px;
}

/* ===== Filter bar ===== */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.search-input {
  flex: 1 1 280px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-1);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 162, 255, 0.15);
}
.chip {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
  transition: all 0.12s;
}
.chip:hover {
  border-color: var(--border-strong);
  color: var(--text-1);
}
.chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0f18;
  border-color: transparent;
  font-weight: 600;
}
.select {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-1);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}

/* ===== Table ===== */
.table-wrap {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 1200px;
}
thead th {
  background: var(--bg-2);
  color: var(--text-2);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 12px 14px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-strong);
  position: sticky;
  top: 0;
  z-index: 1;
}
thead th:first-child,
thead th.l {
  text-align: left;
}
thead th.sortable {
  cursor: pointer;
  user-select: none;
}
thead th.sortable:hover {
  color: var(--text-1);
}
thead th.sortable.active {
  color: var(--accent);
}
thead th.sortable.active::after {
  content: ' ↓';
}
thead th.sortable.active.asc::after {
  content: ' ↑';
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.08s;
}
tbody tr:hover {
  background: rgba(122, 162, 255, 0.04);
}
tbody td {
  padding: 12px 14px;
  text-align: right;
  white-space: nowrap;
}
tbody td:first-child,
tbody td.l {
  text-align: left;
}
.code-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.code-cell .code {
  font-weight: 700;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.code-cell .name {
  color: var(--text-2);
  font-size: 11px;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-3);
  color: var(--text-2);
  border: 1px solid var(--border-strong);
}
.badge.stock {
  background: rgba(122, 162, 255, 0.12);
  color: var(--accent);
  border-color: rgba(122, 162, 255, 0.3);
}
.badge.bond {
  background: rgba(56, 214, 194, 0.12);
  color: var(--accent-2);
  border-color: rgba(56, 214, 194, 0.3);
}
.badge.balance {
  background: rgba(245, 196, 81, 0.12);
  color: var(--gold);
  border-color: rgba(245, 196, 81, 0.3);
}
.num {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.pos {
  color: var(--pos);
}
.neg {
  color: var(--neg);
}
.muted {
  color: var(--text-3);
}

/* ===== Detail page ===== */
.back-link {
  color: var(--text-2);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}
.detail-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 20px;
}
.hero-code {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-name {
  font-size: 16px;
  color: var(--text-1);
  font-weight: 500;
  margin: 2px 0 4px;
}
.hero-owner {
  color: var(--text-2);
  font-size: 13px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 18px 36px;
  align-content: center;
}
.hero-stat .label {
  color: var(--text-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero-stat .value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2px;
}
.section {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}
.section h3 {
  margin: 0 0 14px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
  font-weight: 600;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.kv {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 8px 16px;
  font-size: 13px;
}
.kv dt {
  color: var(--text-3);
}
.kv dd {
  margin: 0;
  color: var(--text-1);
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
.kv dd a {
  overflow-wrap: anywhere;
  word-break: break-all;
}
.perf-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}
.perf-cell {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.perf-cell .label {
  color: var(--text-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.perf-cell .value {
  font-size: 18px;
  font-weight: 700;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.chart-wrap {
  position: relative;
  height: 380px;
}

.bar {
  display: grid;
  grid-template-columns: 130px 1fr 56px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}
.bar .label {
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar .track {
  height: 8px;
  background: var(--bg-3);
  border-radius: 999px;
  overflow: hidden;
}
.bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
}
.bar .pct {
  text-align: right;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.holding-list {
  display: grid;
  gap: 6px;
}
.holding-row {
  display: grid;
  grid-template-columns: 70px 1fr 80px 70px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}
.holding-row .ticker {
  font-weight: 700;
  color: var(--accent);
}
.holding-row .industry {
  color: var(--text-2);
  font-size: 12px;
}
.holding-row .price {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.holding-row .pct {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.fee-table th,
.fee-table td {
  padding: 8px 10px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
.fee-table th:first-child,
.fee-table td:first-child {
  text-align: left;
}
.fee-table th {
  color: var(--text-3);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.empty {
  color: var(--text-3);
  font-style: italic;
  text-align: center;
  padding: 20px;
}

/* Loading */
.loader {
  text-align: center;
  padding: 60px;
  color: var(--text-2);
}

/* ===== Top nav (shared) ===== */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 20px;
  margin-bottom: 24px;
  background: rgba(12, 17, 24, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 14px;
  position: sticky;
  top: 12px;
  z-index: 50;
}
.topnav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-1);
  text-decoration: none;
  font-weight: 700;
}
.topnav .brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  box-shadow: var(--glow-accent);
  overflow: hidden;
  flex-shrink: 0;
}
.topnav .brand-logo svg {
  width: 100%;
  height: 100%;
}
.topnav .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.topnav .brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-1);
}
.topnav .brand-sub {
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 1px;
}
.topnav .nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.topnav .nav-link {
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.12s;
}
.topnav .nav-link:hover {
  background: var(--bg-2);
  color: var(--text-1);
  text-decoration: none;
}
.topnav .nav-link.active {
  background: var(--bg-3);
  color: var(--accent);
}
.topnav .nav-cta {
  background: linear-gradient(135deg, var(--gold), #ffb347);
  color: #1a1100;
  border: none;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.12s;
  font-family: inherit;
}
.topnav .nav-cta b {
  font-family: 'Menlo', 'Consolas', monospace;
  letter-spacing: 0.04em;
}
.topnav .nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(245, 196, 81, 0.3);
}
.topnav .nav-cta.copied {
  background: linear-gradient(135deg, var(--pos), #5ee7a0);
}
.topnav .nav-cta .copy-hint {
  opacity: 0.7;
  font-size: 11px;
}

/* ===== Floating CTA ===== */
.floating-cta {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), var(--glow-accent);
  z-index: 100;
  max-width: 280px;
}
.floating-cta .floating-label {
  color: var(--text-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.floating-cta .floating-code {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  cursor: pointer;
  letter-spacing: 0.04em;
  user-select: none;
}
.floating-cta .floating-code:hover {
  color: var(--accent);
}
.floating-cta .copy-mini {
  font-size: 14px;
  opacity: 0.7;
}

/* ===== Site footer ===== */
.site-footer {
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.footer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(122, 162, 255, 0.08), rgba(56, 214, 194, 0.08));
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  margin-bottom: 20px;
}
.footer-cta-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 4px;
}
.footer-cta-sub {
  color: var(--text-2);
  font-size: 13px;
}
.footer-cta-sub b {
  color: var(--gold);
  font-family: 'Menlo', 'Consolas', monospace;
}
.footer-meta {
  color: var(--text-3);
  font-size: 12px;
  text-align: center;
  padding-bottom: 20px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.12s;
  font-family: inherit;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0f18;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(122, 162, 255, 0.3);
  text-decoration: none;
}
.btn-ghost {
  background: var(--bg-2);
  color: var(--text-1);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--bg-3);
  text-decoration: none;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #ffb347);
  color: #1a1100;
}
.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(245, 196, 81, 0.3);
  text-decoration: none;
}

/* ===== Landing hero ===== */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 40px 0 60px;
}
.hero-eyebrow {
  display: inline-block;
  background: rgba(122, 162, 255, 0.1);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 18px;
  border: 1px solid rgba(122, 162, 255, 0.3);
}
.hero h1 {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 18px;
}
.hero h1 .grad {
  background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 540px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.referral-box {
  background: linear-gradient(135deg, rgba(245, 196, 81, 0.12), rgba(122, 162, 255, 0.08));
  border: 1px dashed rgba(245, 196, 81, 0.4);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 460px;
}
.referral-box .ref-label {
  color: var(--text-3);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.referral-box .ref-code {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.05em;
}
.referral-box .ref-copy {
  margin-left: auto;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  color: var(--text-1);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
}
.referral-box .ref-copy:hover {
  background: var(--bg-3);
}
.hero-visual {
  position: relative;
  background:
    radial-gradient(circle at 20% 0%, rgba(122, 162, 255, 0.2), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(56, 214, 194, 0.15), transparent 60%);
  border-radius: 20px;
  padding: 4px;
}
.leaderboard-card {
  background: linear-gradient(180deg, rgba(12, 17, 24, 0.95), rgba(7, 9, 13, 0.95));
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lb-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lb-icon {
  font-size: 24px;
  filter: drop-shadow(0 0 8px rgba(245, 196, 81, 0.4));
}
.lb-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-1);
}
.lb-sub {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}
.lb-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--pos);
  background: rgba(46, 194, 126, 0.12);
  border: 1px solid rgba(46, 194, 126, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
}
.lb-pulse span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--pos);
  border-radius: 50%;
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.4); }
}
.lb-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lb-row {
  display: grid;
  grid-template-columns: 28px 76px 1fr 72px;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.12s;
}
.lb-row:hover {
  border-color: var(--accent);
  transform: translateX(2px);
  text-decoration: none;
}
.lb-row.skeleton {
  background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2));
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  height: 42px;
  border: 1px solid var(--border);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.lb-rank {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-3);
  text-align: center;
}
.lb-row:nth-child(1) .lb-rank { color: var(--gold); }
.lb-row:nth-child(2) .lb-rank { color: #c0c0c0; }
.lb-row:nth-child(3) .lb-rank { color: #cd7f32; }
.lb-code {
  font-weight: 700;
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.lb-bar {
  display: block;
  height: 6px;
  background: var(--bg-3);
  border-radius: 999px;
  overflow: hidden;
}
.lb-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
}
.lb-pct {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 15px;
  color: var(--pos);
}
.lb-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
}
.lb-footer b {
  color: var(--text-1);
}

/* ===== Trust strip ===== */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 24px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 40px;
}
.trust-item {
  text-align: center;
}
.trust-item .num {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}
.trust-item .label {
  color: var(--text-2);
  font-size: 12px;
  margin-top: 4px;
}

/* ===== Section heading ===== */
.section-h {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 0 4px;
}
.section-h h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-h .section-sub {
  color: var(--text-2);
  font-size: 13px;
  margin-top: 4px;
}
.section-h a {
  font-size: 13px;
}

/* ===== Article cards ===== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.article-card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  text-decoration: none;
  color: var(--text-1);
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.article-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(122, 162, 255, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.15s;
}
.article-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  text-decoration: none;
}
.article-card:hover::before {
  opacity: 1;
}
.article-card .tag {
  position: relative;
  display: inline-block;
  background: rgba(122, 162, 255, 0.12);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  align-self: flex-start;
  margin-bottom: 12px;
}
.article-card h3 {
  position: relative;
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.article-card p {
  position: relative;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 14px;
  flex: 1;
}
.article-card .meta {
  position: relative;
  color: var(--text-3);
  font-size: 12px;
  display: flex;
  gap: 12px;
}

/* ===== Article (single page) ===== */
.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 0;
}
.article-body .tag {
  display: inline-block;
  background: rgba(122, 162, 255, 0.12);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 16px;
}
.article-body h1 {
  font-size: 36px;
  letter-spacing: -0.02em;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 14px;
}
.article-body .article-meta {
  color: var(--text-3);
  font-size: 13px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.article-body h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 40px 0 14px;
  scroll-margin-top: 80px;
}
.article-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 10px;
}
.article-body p,
.article-body li {
  color: var(--text-1);
  font-size: 16px;
  line-height: 1.7;
}
.article-body p {
  margin: 0 0 16px;
}
.article-body ul,
.article-body ol {
  padding-left: 22px;
  margin: 0 0 18px;
}
.article-body li {
  margin-bottom: 6px;
}
.article-body strong {
  color: var(--text-1);
  font-weight: 700;
}
.article-body code {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--gold);
}
.article-body blockquote {
  margin: 18px 0;
  padding: 14px 20px;
  background: rgba(122, 162, 255, 0.06);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  color: var(--text-2);
  font-style: italic;
}
.article-body .callout {
  background: linear-gradient(135deg, rgba(245, 196, 81, 0.08), rgba(122, 162, 255, 0.06));
  border: 1px solid rgba(245, 196, 81, 0.3);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 24px 0;
  font-size: 15px;
}
.article-body .callout b {
  color: var(--gold);
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 24px;
  font-size: 14px;
}
.article-body table th,
.article-body table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.article-body table th {
  background: var(--bg-2);
  font-weight: 600;
  color: var(--text-2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cta-block {
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 24px;
  margin: 36px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.cta-block .cta-text {
  flex: 1;
}
.cta-block .cta-text h4 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
}
.cta-block .cta-text p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
}
.cta-block .cta-text b {
  color: var(--gold);
  font-family: 'Menlo', 'Consolas', monospace;
}

/* ===== Featured funds preview ===== */
.fund-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 40px;
}
.fund-mini-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  text-decoration: none;
  color: var(--text-1);
  transition: all 0.12s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fund-mini-card:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-2px);
}
.fund-mini-card .head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.fund-mini-card .code {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.fund-mini-card .return {
  font-size: 22px;
  font-weight: 800;
  color: var(--pos);
}
.fund-mini-card .meta-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-2);
  font-size: 12px;
}
.fund-mini-card .desc {
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

/* ===== DCA Simulator ===== */
.dca-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  margin-bottom: 30px;
}
.dca-form {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}
.dca-form label {
  display: block;
  color: var(--text-2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  margin-top: 14px;
}
.dca-form label:first-of-type {
  margin-top: 0;
}
.dca-form input[type='number'],
.dca-form input[type='text'],
.dca-form input[type='range'] {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-1);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
  font-family: inherit;
}
.dca-form input[type='text']:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 162, 255, 0.15);
}
.dca-form input[type='range'] {
  padding: 0;
  height: 6px;
  background: var(--bg-3);
  border: none;
}
.dca-form .range-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.dca-form .quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 8px;
}
.dca-form .quick-amounts button {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 6px 4px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.1s;
}
.dca-form .quick-amounts button:hover {
  background: var(--bg-3);
  color: var(--accent);
  border-color: var(--accent);
}
.dca-result {
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}
.dca-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.dca-summary .stat {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}
.dca-summary .label {
  color: var(--text-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dca-summary .value {
  font-size: 22px;
  font-weight: 800;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.dca-summary .value.pos {
  color: var(--pos);
}

/* ===== Compare page ===== */
.compare-shell {
  margin-bottom: 30px;
}
.compare-controls {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.compare-controls .select {
  min-width: 280px;
}
.compare-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.compare-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}
.compare-card .remove {
  float: right;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-3);
  border-radius: 6px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 12px;
}
.compare-card .code {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
}
.compare-card .name {
  color: var(--text-2);
  font-size: 12px;
  margin-bottom: 16px;
}
.compare-card .row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.compare-card .row .lbl {
  color: var(--text-3);
}
.compare-card .row .val {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ===== Quiz ===== */
.quiz-shell {
  max-width: 720px;
  margin: 0 auto;
}
.quiz-progress {
  background: var(--bg-2);
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
}
.quiz-progress .fill {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  height: 100%;
  transition: width 0.3s;
}
.quiz-card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}
.quiz-card h2 {
  margin: 0 0 22px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.quiz-options {
  display: grid;
  gap: 10px;
}
.quiz-option {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-1);
  padding: 14px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  text-align: left;
  transition: all 0.12s;
}
.quiz-option:hover {
  border-color: var(--accent);
  background: var(--bg-3);
}
.quiz-result {
  text-align: center;
  padding: 32px;
}
.quiz-result .result-badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(122, 162, 255, 0.12);
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}
.quiz-result h2 {
  font-size: 28px;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 900px) {
  .stats,
  .trust-strip,
  .article-grid,
  .fund-mini-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2,
  .grid-3,
  .hero,
  .dca-shell {
    grid-template-columns: 1fr;
  }
  .detail-hero {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .perf-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero h1 {
    font-size: 32px;
  }
  .topnav {
    flex-wrap: wrap;
  }
  .topnav .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }
  .footer-cta {
    flex-direction: column;
    align-items: flex-start;
  }
  .floating-cta {
    bottom: 12px;
    right: 12px;
    padding: 10px 14px;
  }
  .floating-cta .floating-code {
    font-size: 14px;
  }
}
@media (max-width: 600px) {
  .stats,
  .trust-strip,
  .article-grid,
  .fund-mini-grid {
    grid-template-columns: 1fr;
  }
}
