/* GILLIONS tracker — dark vault, gold leaf */

:root {
  --bg: #0b0a07;
  --bg-raise: #14120c;
  --bg-raise-2: #1b1811;
  --line: rgba(228, 196, 106, 0.18);
  --line-strong: rgba(228, 196, 106, 0.38);
  --gold: #e8c56a;
  --gold-hi: #fff1b8;
  --gold-mid: #c9a227;
  --gold-dim: #8a6d2a;
  --cream: #f4efe3;
  --muted: #9b917d;
  --muted-2: #6f6758;
  --danger: #e39a7a;
  --ok: #9fce7a;
  --warn: #e0b15a;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-ui: "Outfit", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 18px;
  --max: 1080px;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
}

.bg-glow {
  pointer-events: none;
  position: fixed;
  inset: -20% -10% auto;
  height: 70vh;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201, 162, 39, 0.16), transparent 58%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 241, 184, 0.05), transparent 40%);
  z-index: 0;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cpath d='M0 140L140 0' stroke='rgba(232,197,106,0.05)' stroke-width='1'/%3E%3C/svg%3E");
}

main, footer {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

/* Full-bleed poster. The gold GILLIONS word sits ~66–85% down the art,
   so the counter card only overlaps the dark chair edge below it. */
.banner {
  position: relative;
  z-index: 1;
  width: 100%;
  background: #080705;
  overflow: hidden;
}

.banner-frame {
  width: min(100%, calc(min(78vh, 860px) * 2048 / 1368));
  margin: 0 auto;
}

.banner-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.banner-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(8, 7, 5, 0.78) 0%, rgba(8, 7, 5, 0.28) 60%, transparent 100%);
  padding-bottom: 36px;
}

.banner .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 8px;
}

.banner .status,
.banner .ca-btn {
  background: rgba(11, 10, 7, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.banner-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18%;
  max-height: 120px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(11, 10, 7, 0.4) 40%, var(--bg) 100%);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  color: var(--gold);
  background: linear-gradient(180deg, #1d1a12, #100e0a);
  box-shadow: inset 0 1px 0 rgba(255, 241, 184, 0.15);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 3px;
}

.top-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-2);
  box-shadow: 0 0 0 0 rgba(159, 206, 122, 0.0);
}

.status[data-state="live"] { color: var(--ok); }
.status[data-state="live"] .status-dot {
  background: var(--ok);
  animation: pulse 2.2s ease-out infinite;
}
.status[data-state="loading"] { color: var(--warn); }
.status[data-state="loading"] .status-dot { background: var(--warn); }
.status[data-state="error"] { color: var(--danger); }
.status[data-state="error"] .status-dot { background: var(--danger); }
.status[data-state="cached"] { color: var(--warn); }
.status[data-state="cached"] .status-dot { background: var(--warn); }
.status[data-state="polling"] { color: var(--warn); }
.status[data-state="polling"] .status-dot {
  background: var(--warn);
  animation: pulse 2.8s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(159, 206, 122, 0.55); }
  100% { box-shadow: 0 0 0 8px rgba(159, 206, 122, 0); }
}

.ca-btn, .copy-full {
  font-family: inherit;
  cursor: pointer;
  color: var(--cream);
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.8rem;
}

.ca-btn:hover, .copy-full:hover, .ca-btn:focus-visible, .copy-full:focus-visible {
  border-color: var(--gold);
  outline: none;
}

.ca-short, .mono, .ca-full {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.hero {
  margin: -32px 0 28px;
  padding: 36px 32px 28px;
  background:
    linear-gradient(180deg, rgba(232, 197, 106, 0.07), rgba(232, 197, 106, 0.015));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 241, 184, 0.08);
  text-align: center;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 500;
}

.hero-amount-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  margin: 10px 0 4px;
  flex-wrap: wrap;
}

.hero-amount {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: clamp(2.6rem, 8.6vw, 5.6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff8d6 0%, #e8c56a 48%, #b8892a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold-hi);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  min-height: 1em;
}

.hero-unit {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--gold);
  letter-spacing: 0.12em;
}

.hero-usd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-note {
  max-width: 42rem;
  margin: 14px auto 0;
  color: var(--muted-2);
  font-size: 0.86rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 28px;
  text-align: left;
}

.stat {
  background: rgba(11, 10, 7, 0.55);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px 16px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat-value {
  font-family: var(--font-ui);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--gold-hi);
  margin-top: 4px;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  line-height: 1.2;
}

.stat-value-sm { font-size: 1.28rem; }

.stat-hint {
  color: var(--muted-2);
  font-size: 0.78rem;
  margin-top: 4px;
  min-height: 1.2em;
}

.panel {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 8px;
  margin: 0 0 18px;
}

.panel.residual {
  padding: 18px 22px;
  background: #16130c;
}

.panel.residual p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.panel.residual strong {
  color: var(--gold-hi);
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.panel h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.7rem;
  margin: 0;
  letter-spacing: 0.02em;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.panel-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.table-wrap { overflow-x: auto; }

.feed {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.feed th {
  text-align: left;
  color: var(--muted-2);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}

.feed td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(228, 196, 106, 0.08);
  vertical-align: middle;
}

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

.feed a {
  color: var(--gold);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.feed a:hover { text-decoration: underline; color: var(--gold-hi); }

.feed .empty td {
  color: var(--muted);
  text-align: center;
  padding: 28px 8px;
}

.amount-cell {
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-weight: 500;
  color: var(--gold-hi);
  white-space: nowrap;
}

.time-cell { white-space: nowrap; }
.time-cell small {
  display: block;
  color: var(--muted-2);
  font-size: 0.75rem;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--gold);
}

.badge.residual {
  color: var(--danger);
  border-color: rgba(227, 154, 122, 0.35);
}

.row-residual td { opacity: 0.82; }

.how { padding-bottom: 18px; }
.how ol {
  margin: 12px 0 8px;
  padding-left: 1.2rem;
  color: var(--muted);
}
.how li { margin: 0 0 8px; }

footer {
  padding: 12px 0 48px;
  color: var(--muted);
}

.footer-cas { display: grid; gap: 8px; margin-bottom: 16px; }

.ca-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ca-k {
  width: 88px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.copy-full {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  max-width: 100%;
}

.ca-full {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(72vw, 520px);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 14px;
}

.footer-links a {
  color: var(--gold);
  text-decoration: none;
}

.footer-links a:hover { text-decoration: underline; color: var(--gold-hi); }

.disclaimer {
  font-size: 0.78rem;
  color: var(--muted-2);
  max-width: 46rem;
}

.th-short { display: none; }

@media (max-width: 800px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .hero { padding: 28px 18px 20px; margin-top: -24px; }
  .banner .top { padding-top: 12px; }
  .brand-name { letter-spacing: 0.1em; font-size: 1.3rem; }
}

@media (max-width: 560px) {
  main, footer, .banner .top { width: min(var(--max), calc(100% - 20px)); }
  .ca-btn .ca-short { display: none; }
  .stats { grid-template-columns: 1fr; }
  .stat-value { font-size: 1.7rem; }
  .feed th:nth-child(4),
  .feed td:nth-child(4) { display: none; }
  #feed-table {
    table-layout: fixed;
    width: 100%;
    font-size: 0.82rem;
  }
  #feed-table th,
  #feed-table td { padding: 10px 6px; }
  #feed-table th:nth-child(1),
  #feed-table td:nth-child(1) { width: 32%; }
  #feed-table th:nth-child(2),
  #feed-table td:nth-child(2) { width: 30%; }
  #feed-table th:nth-child(3),
  #feed-table td:nth-child(3) { width: 12%; text-align: center; }
  #feed-table th:nth-child(5),
  #feed-table td:nth-child(5) { width: 26%; overflow: hidden; }
  #feed-table a {
    font-size: 0.72rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #feed-table .amount-cell { font-size: 0.82rem; }
  #feed-table .th-long { display: none; }
  #feed-table .th-short { display: inline; }
  .panel { padding: 18px 14px 6px; }
  .hero { margin-top: -20px; }
  .banner-fade { height: 16%; max-height: 72px; }
}

@media (max-width: 380px) {
  .banner .top { gap: 8px; }
  .brand { gap: 8px; min-width: 0; }
  .brand-mark { width: 36px; height: 36px; font-size: 22px; }
  .brand-name { font-size: 1.12rem; letter-spacing: 0.08em; }
  .brand-sub {
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }
}

