:root {
  --bg: #000000;         /* pure black — outer page, side rails, gaps */
  --panel: #1c1f24;      /* antracite — buckets, ad cards, content blocks */
  --panel-2: #16191e;    /* slightly darker — table headers, bucket heads */
  --line: #2a2f37;
  --line-soft: #20242b;
  --text: #e6edf3;
  --muted: #8a97a6;
  --accent: #4cc9f0;       /* cyan — used for "live data" signals */
  --brand: #8ecae6;        /* pastel sky blue — secondary brand accent */
  --brand-soft: rgba(142, 202, 230, 0.12);
  --brand-line: rgba(142, 202, 230, 0.50);
  --good: #21d07a;
  --bad: #ff5d6c;
  --warn: #f5b301;
  --am: #4cc9f0;
  --pm: #b388ff;
  --row-flash: rgba(142, 202, 230, 0.20);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--muted); font-weight: 400; }
.small { font-size: 12px; }

/* ---------- TOPBAR ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px;
  background: #000;
  border-bottom: 1px solid rgba(142, 202, 230, 0.28);
  box-shadow: 0 1px 0 rgba(142, 202, 230, 0.08), 0 8px 24px rgba(0, 0, 0, 0.6);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand h1 { margin: 0; font-size: 18px; letter-spacing: 0.2px; }
.flag-us {
  flex-shrink: 0;
  display: block;
  width: 72px; height: 38px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.14), 0 3px 10px rgba(0,0,0,0.5);
}
.topbar { padding: 6px 20px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-refresh {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.topbar-refresh b { color: var(--text); font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.live { background: var(--good); box-shadow: 0 0 0 0 rgba(33,208,122,0.7); animation: pulse 1.6s infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(33,208,122,0.65); }
  70%  { box-shadow: 0 0 0 10px rgba(33,208,122,0); }
  100% { box-shadow: 0 0 0 0 rgba(33,208,122,0); }
}
.meta { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.sep { opacity: 0.5; }
.status {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line);
}
.status.idle    { color: var(--muted); }
.status.fetching{ color: var(--accent); border-color: var(--accent); }
.status.ok      { color: var(--good); border-color: var(--good); }
.status.err     { color: var(--bad); border-color: var(--bad); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  overflow-x: hidden;
  overflow-y: visible;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1100px 380px at 20% -40%, rgba(76,201,240,0.18), transparent 60%),
    radial-gradient(900px 320px at 90% -20%, rgba(179,136,255,0.16), transparent 65%),
    linear-gradient(180deg, #0c1219 0%, #0b0f14 100%);
}
.hero-inner {
  max-width: 1920px;
  margin: 0 auto;
  padding: 36px 24px 44px;
  display: flex; flex-direction: row; align-items: center; justify-content: space-between;
  gap: 32px;
}
.hero-copy { display: flex; flex-direction: column; gap: 14px; min-width: 0; flex: 1 1 auto; padding-bottom: 4px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  align-self: flex-start;
  font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  padding: 5px 11px; border-radius: 999px;
}
.topbar-clock { flex-shrink: 0; flex-wrap: nowrap; align-self: center; }
.eyebrow .dot { width: 7px; height: 7px; }
.eyebrow-sep { opacity: 0.45; }
.eyebrow .clock {
  display: inline-flex; align-items: center; gap: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.6px;
  color: #e6edf3;
}
.eyebrow .clock-label {
  font-size: 10px;
  color: var(--accent);
  opacity: 0.85;
}
.hero-title {
  margin: 6px 0 0;
  font-size: clamp(24px, 3.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  white-space: nowrap;
  background: linear-gradient(180deg, #ffffff 0%, #b8c5d6 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-slogan {
  margin: 0;
  padding-bottom: 4px;
  font-size: clamp(14px, 1.5vw, 17px);
  color: #c2cdd9;
  line-height: 1.7;
  overflow: visible;
}
.hero-stats {
  display: flex; flex-wrap: nowrap; gap: 10px;
  flex: 0 0 auto;
  align-self: center;
}
.hero-stats > div {
  position: relative;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 16px;
  background: rgba(18,24,33,0.7);
  border: 1px solid var(--line);
  border-top: 2px solid var(--brand);
  border-radius: 10px;
  min-width: 132px;
}
.hero-stats b {
  font-size: 22px; font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.hero-stats span {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted);
}

/* ---------- LAYOUT ---------- */
.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  gap: 16px;
  padding: 16px;
  max-width: 1920px;
  margin: 0 auto;
}
.rail { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 70px; align-self: start; }
.main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* ---------- ADS ---------- */
.ad {
  position: relative;
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
/* IAB standard sizes */
.ad-mrec     { width: 300px; height: 250px; } /* Medium Rectangle */
.ad-halfpage { width: 300px; height: 600px; } /* Half Page */
.ad-text     { width: 100%; min-height: 90px; padding: 12px 16px; }
.ad-tag {
  position: absolute; top: 6px; right: 8px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted);
}

/* ---------- BUCKETS ---------- */
.bucket {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.bucket-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel-2);
}
.bucket-head h2 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.bucket-head .count {
  font-size: 12px; color: var(--muted);
  padding: 2px 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
}
.badge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  padding: 2px 8px; border-radius: 4px; color: #0b0f14;
}
.badge.am    { background: var(--am); }
.badge.pm    { background: var(--pm); }
.badge.other { background: var(--muted); }

/* ---------- TABLE ---------- */
.table-wrap { overflow-x: hidden; }
table.earn { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; table-layout: fixed; }
table.earn th, table.earn td {
  padding: 9px 10px; text-align: left;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.earn th { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; background: var(--panel-2); position: sticky; top: 0; }
table.earn td.num, table.earn th.num { text-align: right; }
table.earn td.sym, table.earn th.sym { font-weight: 700; }
table.earn tr.empty td { color: var(--muted); padding: 20px; text-align: center; white-space: normal; }
table.earn tr:hover td { background: rgba(255,255,255,0.015); }

/* Column widths — sized so the 8 columns fit the main column without overflow. */
table.earn col.col-sym    { width: 9%; }
table.earn col.col-name   { width: auto; }
table.earn col.col-est    { width: 8%; }
table.earn col.col-eps    { width: 8%; }
table.earn col.col-surp   { width: 9%; }
table.earn col.col-rev    { width: 10%; }
table.earn col.col-time   { width: 8%; }
table.earn col.col-filing { width: 10%; }

/* Surprise % colors */
.surp-good { color: var(--good); font-weight: 700; }
.surp-bad  { color: var(--bad);  font-weight: 700; }

/* Scheduled / upcoming row */
table.earn tr.scheduled td { background: rgba(142, 202, 230, 0.04); }
table.earn tr.scheduled td.sym .ticker { color: var(--brand); }
.badge-upcoming {
  display: inline-block;
  padding: 2px 9px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: 999px;
}

/* Filter bar */
.filterbar {
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.4);
}
.filterbar-inner {
  max-width: 1920px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.filter-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--muted); font-weight: 600;
}
.filter-group { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px;
  font-size: 12px; font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.filter-btn:hover { color: var(--text); border-color: var(--brand-line); }
.filter-btn.active {
  color: var(--text);
  background: var(--brand-soft);
  border-color: var(--brand-line);
}
.filter-count {
  display: inline-block;
  padding: 1px 7px;
  font-size: 11px;
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.filter-btn.active .filter-count {
  background: var(--brand-soft);
  color: var(--brand);
}

/* Company name is the only field allowed to wrap to two lines if needed. */
table.earn td:nth-child(2) { white-space: normal; line-height: 1.3; }

.sym-cell {
  display: inline-flex; align-items: center; gap: 8px;
}
.sym-cell .ticker { color: var(--text); }

.actual-cell {
  display: inline-flex; align-items: baseline; gap: 6px; justify-content: flex-end;
}
.actual-cell .val { font-weight: 700; }
.actual-cell .pending { color: var(--muted); font-style: italic; }
.actual-cell .beat { color: var(--good); }
.actual-cell .miss { color: var(--bad); }
.actual-cell .inline-est { font-size: 11px; color: var(--muted); }

.pill {
  display: inline-block; padding: 2px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 600; border: 1px solid var(--line);
}
.pill.waiting  { color: var(--muted); }
.pill.reported { color: var(--good); border-color: var(--good); background: rgba(33,208,122,0.08); }
.pill.beat     { color: var(--good); border-color: var(--good); background: rgba(33,208,122,0.10); }
.pill.miss     { color: var(--bad);  border-color: var(--bad);  background: rgba(255,93,108,0.10); }
.pill.inline   { color: var(--warn); border-color: var(--warn); }

.flash {
  animation: flash 2.2s ease-out;
}
@keyframes flash {
  0%   { background: var(--row-flash); }
  100% { background: transparent; }
}

/* ---------- CONTENT BLOCKS (About / FAQ on home, prose on policy pages) ---------- */
.content-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 26px;
  color: #cdd6e0;
  line-height: 1.65;
}
.content-block + .content-block { margin-top: 0; }
.content-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.content-block p { margin: 0 0 12px; font-size: 14px; }
.content-block p:last-child { margin-bottom: 0; }
.content-block a { color: var(--accent); }
.content-block strong { color: var(--text); }
.content-block em { color: #b8c5d6; font-style: normal; background: rgba(76,201,240,0.08); padding: 1px 5px; border-radius: 3px; }

.faq-item { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.faq-item:first-of-type { border-top: 0; padding-top: 0; }
.faq-item h3 { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--text); }
.faq-item p { font-size: 13.5px; }

/* Prose layout used by standalone policy pages */
.prose {
  max-width: 820px;
  margin: 32px auto;
  padding: 0 24px;
  color: #cdd6e0;
  line-height: 1.7;
  font-size: 15px;
}
.prose h1 { font-size: 30px; letter-spacing: -0.02em; margin: 0 0 8px; color: var(--text); }
.prose .lede { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.prose h2 { font-size: 18px; margin: 26px 0 10px; color: var(--text); }
.prose p, .prose li { margin: 0 0 12px; }
.prose ul { padding-left: 22px; }
.prose a { color: var(--accent); }
.prose strong { color: var(--text); }
.prose .updated { color: var(--muted); font-size: 12px; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.prose ol { padding-left: 22px; }
.prose ol li { margin-bottom: 8px; }

/* Blog list cards */
.blog-list { display: flex; flex-direction: column; gap: 14px; margin: 24px 0; }
.blog-card {
  display: block;
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.1s;
}
.blog-card:hover { border-color: var(--brand); transform: translateY(-1px); text-decoration: none; }
.blog-card h2 { margin: 8px 0 8px; font-size: 19px; color: var(--text); letter-spacing: -0.01em; }
.blog-card p { margin: 0 0 10px; font-size: 14px; color: #b8c5d6; line-height: 1.55; }
.blog-tag {
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  padding: 3px 9px; border-radius: 999px;
}
.blog-meta { font-size: 12px; color: var(--muted); }

/* ---------- FOOT ---------- */
.foot {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px 24px;
  color: var(--muted); font-size: 12px;
  border-top: 1px solid var(--line);
  max-width: 1920px; margin: 20px auto 0;
}
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot-nav { display: flex; gap: 14px; flex-wrap: wrap; }
.foot-nav a { color: var(--muted); }
.foot-nav a:hover { color: var(--brand); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .rail { flex-direction: row; flex-wrap: wrap; position: static; justify-content: center; }
  .ad-halfpage { display: none; }
}
@media (max-width: 1100px) {
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .hero-stats { flex-wrap: wrap; align-self: stretch; }
}
@media (max-width: 900px) {
  .hero-title { white-space: normal; }
}
@media (max-width: 640px) {
  .ad-mrec { width: 100%; max-width: 320px; }
  .topbar { flex-direction: column; gap: 6px; align-items: flex-start; }
  table.earn th, table.earn td { padding: 8px 10px; font-size: 12px; }
  .hero-inner { padding: 28px 18px 24px; }
  .hero-stats > div { flex: 1 1 45%; min-width: 0; }
}
