/* CardPortfolio - design tokens, v2 (dark theme)
   Type: Sora (display/headings - geometric, friendly, not a stiff serif) + Inter (body/UI)
   Palette: near-black base with warm gold accent (kept from the brand, not swapped for
   the generic acid-green-on-black look) - green/red reserved strictly for market-style
   up/down indicators, where that convention is information, not decoration.
*/

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

:root {
  --bg: #0B0D12;
  --bg-panel: #12151D;
  --bg-panel-raised: #181C26;
  --text: #E7E9EE;
  --text-muted: #939AAA;
  --line: #262B36;
  --gold: #E8B75C;
  --gold-soft: rgba(232, 183, 92, 0.14);
  --green: #34D399;
  --red: #F87171;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3, .display {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: 2.3rem; line-height: 1.2; font-weight: 700; }
h2 { font-size: 1.4rem; line-height: 1.3; }
h3 { font-size: 1.1rem; }

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

p { max-width: 62ch; color: var(--text); }

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

/* Card library: filters + expandable table */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 28px;
  padding: 16px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.filter-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 160px; min-width: 140px; }
.filter-field label { font-size: 0.76rem; color: var(--text-muted); }
.filter-field input, .filter-field select { margin: 0; }
.filter-count { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }

.card-table { width: 100%; border-collapse: collapse; }
.card-table thead th {
  text-align: left;
  font-family: 'Sora', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.card-row {
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.card-row:hover { background: var(--bg-panel); }
.card-row td { padding: 14px 12px; font-size: 0.92rem; }
.card-row .row-name { font-weight: 600; color: #fff; }
.card-row .row-issuer { color: var(--text-muted); font-size: 0.85rem; }
.card-row .chevron { transition: transform 0.15s ease; display: inline-block; color: var(--gold); }
.card-row.expanded .chevron { transform: rotate(90deg); }
.card-detail-row td {
  padding: 0 12px 20px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-panel);
}
.card-detail-row { display: none; }
.card-detail-row.open { display: table-row; }
.card-detail-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 12px;
  font-size: 0.88rem;
  color: #C7CCD6;
}
.card-detail-col { flex: 1 1 200px; }
.card-detail-col h4 { font-family: 'Sora', sans-serif; font-size: 0.8rem; color: var(--text-muted); margin: 0 0 6px 0; font-weight: 600; }
.no-results { color: var(--text-muted); padding: 24px 0; }

/* --- Ticker bar --- */
.ticker-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #05070A;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  height: 34px;
  display: flex;
  align-items: center;
}
.ticker-track {
  display: inline-flex;
  animation: ticker-scroll 38s linear infinite;
  will-change: transform;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 22px;
  font-size: 0.78rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
  border-right: 1px solid var(--line);
}
.ticker-item .t-name { color: #C7CCD6; font-weight: 600; }
.ticker-item .t-up { color: var(--green); }
.ticker-item .t-down { color: var(--red); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

.site-header {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  background: var(--bg);
}
.site-header .shell {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.wordmark {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #FFFFFF;
}
.wordmark span { color: var(--gold); }
.site-nav a {
  margin-left: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.site-nav a:hover { color: var(--text); }
.site-nav a.nav-cta {
  margin-left: 20px;
  background: var(--gold);
  color: #17130A;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 16px;
}
.site-nav a.nav-cta:hover { background: #F0C578; color: #17130A; text-decoration: none; }

.hero {
  padding: 64px 0 44px;
  border-bottom: 1px solid var(--line);
}
.hero .tagline {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: none;
}
.hero .cta-row { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--gold);
  color: #17130A;
}
.btn-primary:hover { background: #F0C578; text-decoration: none; }
.btn-secondary {
  background: transparent;
  border: 1px solid #3A4152;
  color: var(--text);
}
.btn-secondary:hover { background: var(--bg-panel-raised); text-decoration: none; }
.btn-text {
  background: none;
  border: none;
  padding: 0;
  color: var(--gold);
  font-weight: 600;
  text-decoration: underline;
}

section { padding: 44px 0; }
section + section { border-top: 1px solid var(--line); }

/* Ledger-style line items */
.line-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.line-item:first-child { border-top: 1px solid var(--line); }
.line-item .label { font-weight: 500; color: var(--text); }
.line-item .value {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  color: #FFFFFF;
}
.value-positive { color: var(--green); }
.value-negative { color: var(--red); }

/* Free vs Premium comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}
.compare-table th, .compare-table td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.4;
  vertical-align: top;
}
.compare-table th {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--bg-panel);
}
.compare-table th.col-premium, .compare-table td.col-premium {
  background: var(--gold-soft);
}
.compare-table th.col-premium { color: var(--gold); position: relative; }
.best-value-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #17130A;
  background: var(--gold);
  padding: 2px 8px;
  border-radius: 3px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
}
.compare-table td.col-free { color: var(--text-muted); }
.compare-table td.col-premium { color: var(--text); }
.compare-table .feature-col { color: var(--text); font-weight: 500; }

/* Quiz */
.quiz-step { display: none; }
.quiz-step.active { display: block; }
.step-marker {
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 8px;
}
.quiz-question { margin-bottom: 24px; }
.option-list { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; }
.option-btn {
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.98rem;
  font-family: 'Inter', sans-serif;
  color: var(--text);
}
.option-btn:hover { border-color: var(--gold); }
.option-btn.selected {
  border-color: var(--gold);
  background: var(--gold-soft);
}
.field-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  margin-top: 16px;
}
input[type="number"], input[type="text"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.98rem;
  background: var(--bg-panel);
  color: var(--text);
}
select { appearance: auto; }
textarea { min-height: 90px; }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 32px; }

.reasoning-block {
  background: var(--bg-panel);
  border-left: 3px solid var(--gold);
  padding: 18px 20px;
  margin: 24px 0;
  font-size: 0.98rem;
  color: #C7CCD6;
  border-radius: 0 4px 4px 0;
}
.quiz-why {
  background: var(--bg-panel);
  border-left: 3px solid var(--gold);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-radius: 0 4px 4px 0;
}
.quiz-why strong { color: var(--gold); }
.quiz-intro {
  background: var(--bg-panel-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px 22px;
  margin-bottom: 32px;
}
.quiz-intro h2 { margin-bottom: 8px; }
.quiz-intro p { font-size: 0.92rem; color: var(--text-muted); margin: 0; max-width: none; }

.card-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}
.verified-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
}

.rule-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  border: 1px solid rgba(232, 183, 92, 0.4);
  padding: 2px 8px;
  border-radius: 3px;
  margin-right: 6px;
  margin-bottom: 6px;
}
.lead-label { color: var(--gold); font-weight: 700; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.site-footer a { color: var(--text-muted); }

.disclosure-strip {
  background: #05070A;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
}
.disclosure-strip a { color: var(--gold); }

@media (max-width: 600px) {
  h1 { font-size: 1.85rem; }
  .hero { padding: 44px 0 30px; }
}
