/* -------------------------------------------------------------
   The Ledger — design tokens
   A financial-ledger aesthetic: deep ink-green background,
   parchment text, warm gold as the primary accent, with each
   asset class carrying its own secondary accent color.
------------------------------------------------------------- */
:root {
  --bg:        #0F1611;
  --surface:   #161F19;
  --surface-2: #1C2620;
  --line:      #2A362E;
  --text:      #EDE6D6;
  --text-muted:#93A199;
  --gold:      #C9A227;
  --crypto:    #4A8FA6;
  --stocks:    #B4645A;
  --forex:     #7A9A6E;
  --up:        #7CA97A;
  --down:      #C1584D;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* -------------------- Ticker tape (signature element) -------------------- */
.ticker-tape {
  background: #0A0F0C;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  padding: 9px 0;
}
.ticker-track {
  display: inline-flex;
  animation: scroll-left 42s linear infinite;
}
@keyframes scroll-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 0 22px;
  border-right: 1px solid var(--line);
  color: var(--text-muted);
}
.tk-symbol { color: var(--text); font-weight: 600; letter-spacing: 0.02em; }
.tk-price { color: var(--text); }
.tk-up { color: var(--up); }
.tk-down { color: var(--down); }

/* -------------------- Header / nav -------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}
.brand-mark { color: var(--gold); font-size: 24px; }
.site-nav {
  display: flex;
  gap: 26px;
  flex: 1;
  font-size: 14.5px;
  font-weight: 500;
}
.site-nav a {
  color: var(--text-muted);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav a:hover { color: var(--text); }
.site-nav a.active { color: var(--gold); border-bottom-color: var(--gold); }
.header-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 7px;
}
.dot-live {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--up);
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(124,169,122,0.18);
}

@media (max-width: 780px) {
  .header-inner { flex-wrap: wrap; row-gap: 12px; }
  .site-nav { order: 3; width: 100%; overflow-x: auto; gap: 18px; }
  .header-meta { order: 2; margin-left: auto; }
}

/* -------------------- Hero -------------------- */
.hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: end;
}
.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--gold);
  margin: 0 0 14px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 1.08;
  font-weight: 600;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.hero p.lede {
  font-size: 16.5px;
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0;
}
.hero-snapshot {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 22px 24px;
}
.hero-snapshot h3 {
  margin: 0 0 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 500;
}
.snap-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13.5px;
}
.snap-row:first-of-type { border-top: none; }
.snap-name { color: var(--text-muted); }
.snap-price { font-weight: 600; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 38px; }
}

/* -------------------- Section titles -------------------- */
.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  margin: 0;
}
.section-head .view-all {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
}
.section-head .view-all:hover { color: var(--gold); }

/* -------------------- Ledger cards (homepage grid) -------------------- */
.ledger-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 1000px) { .ledger-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ledger-grid { grid-template-columns: 1fr; } }

.ledger-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 3px solid var(--card-accent, var(--gold));
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.ledger-card:hover { transform: translateY(-2px); }
.ledger-card .card-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--card-accent, var(--gold));
}
.ledger-card .card-lead {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
}
.ledger-card .card-sub {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
}
.ledger-card .card-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.ledger-card .card-list li {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
}
.ledger-card .card-list li:first-child { border-top: none; }
.ledger-card .card-footer {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.ledger-card .card-footer:hover { color: var(--card-accent, var(--gold)); }

/* -------------------- Movers / data table -------------------- */
.table-wrap { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th, .data-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 500;
}
.data-table td.num, .data-table td.price { font-family: var(--font-mono); }
.data-table tr:hover td { background: var(--surface); }
.class-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid var(--line);
  color: var(--text-muted);
}

.chg-up { color: var(--up); font-family: var(--font-mono); font-weight: 500; }
.chg-down { color: var(--down); font-family: var(--font-mono); font-weight: 500; }

/* -------------------- Asset page: hero price block -------------------- */
.asset-hero {
  padding: 52px 0 40px;
  border-bottom: 1px solid var(--line);
}
.asset-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.asset-hero h1 {
  font-family: var(--font-display);
  font-size: 44px;
  margin: 6px 0 8px;
}
.asset-price-block {
  font-family: var(--font-mono);
}
.asset-price-block .price {
  font-size: 40px;
  font-weight: 600;
  display: block;
}
.chart-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 20px 20px 6px;
  margin-top: 30px;
}
.chart-card .chart-caption {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}
.line-chart { width: 100%; height: auto; display: block; }

/* -------------------- Intro copy blocks on asset pages -------------------- */
.intro-copy {
  max-width: 68ch;
  color: var(--text-muted);
  font-size: 15.5px;
}
.intro-copy strong { color: var(--text); }

/* -------------------- Footer -------------------- */
.site-footer {
  padding: 44px 0 26px;
  background: var(--surface);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 22px;
}
.footer-note {
  color: var(--text-muted);
  font-size: 12.5px;
  max-width: 48ch;
  margin: 8px 0 0;
}
.footer-links {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--gold); }
.footer-copy {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin: 0;
}
