:root {
  --bg: #070b14;
  --bg-elevated: #0d1424;
  --surface: rgba(15, 23, 42, 0.86);
  --surface-solid: #0f172a;
  --surface-hover: #162038;
  --ink: #f1f5f9;
  --muted: #94a3b8;
  --subtle: #64748b;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.26);
  --cyan: #38bdf8;
  --cyan-strong: #0284c7;
  --cyan-soft: rgba(56, 189, 248, 0.12);
  --rose: #fb7185;
  --rose-soft: rgba(244, 63, 94, 0.14);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.14);
  --emerald: #34d399;
  --emerald-soft: rgba(52, 211, 153, 0.14);
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 85% -10%, rgba(56, 189, 248, 0.13), transparent 60%),
    radial-gradient(ellipse 60% 45% at 10% 0%, rgba(244, 63, 94, 0.08), transparent 55%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}

.shell {
  width: min(1340px, 94vw);
  margin: 0 auto;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 11, 20, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  flex-wrap: wrap;
}

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

.brand-mark {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--cyan), #818cf8);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.65);
  display: inline-block;
}

.brand-name {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  color: #fff;
}

.brand-sub {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  border-left: 1px solid var(--border);
  padding-left: 10px;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mono-pill {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.9);
  color: var(--muted);
}

.mono-pill.accent {
  background: var(--cyan-soft);
  color: var(--cyan);
  border-color: rgba(56, 189, 248, 0.32);
  font-weight: 600;
}

.nav-cta {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan-strong), #2563eb);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

/* Hero */
.hero {
  border-bottom: 1px solid var(--border);
  padding: 40px 0 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 24px;
  align-items: start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.71rem;
  letter-spacing: 0.08em;
  color: var(--cyan);
  font-weight: 600;
  background: var(--cyan-soft);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 999px;
  padding: 4px 12px;
  margin: 0 0 14px;
}

h1 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(2rem, 3.8vw, 3.05rem);
  line-height: 1.08;
  margin: 0 0 14px;
  letter-spacing: -0.03em;
  color: #f8fafc;
}

h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--cyan), #818cf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: 1rem;
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 24px;
}

/* Search Dock */
.search-dock {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
  padding: 14px 16px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-dock:focus-within {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14), 0 20px 44px rgba(0, 0, 0, 0.5);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.search-icon {
  font-size: 1.25rem;
  color: var(--cyan);
}

#search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--sans);
  font-size: 0.96rem;
  background: transparent;
  color: #fff;
}

#search-input::placeholder {
  color: var(--subtle);
}

.ghost-btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  padding: 6px 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ghost-btn:hover {
  border-color: var(--cyan);
  color: #fff;
  background: var(--surface-hover);
}

.quick-chips {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding-top: 11px;
}

.chip-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--subtle);
}

.chip {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.75);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.14s ease;
}

.chip:hover {
  background: var(--cyan-soft);
  color: var(--cyan);
  border-color: rgba(56, 189, 248, 0.45);
}

/* Early Lag Panel */
.early-lag-panel {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--emerald);
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(52, 211, 153, 0);
  }
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  animation: pulse 2.2s infinite;
}

.panel-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 6px 0 12px;
}

.lag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.lag-item {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  font-size: 0.84rem;
}

.lag-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--cyan);
  margin-bottom: 4px;
}

.lag-item a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.12s ease;
}

.lag-item a:hover {
  color: var(--cyan);
}

/* Intel Strip */
.intel-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 26px 0;
}

.intel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.intel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.intel-head h2 {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #e2e8f0;
  margin: 0;
}

.mono-note {
  font-family: var(--mono);
  font-size: 0.69rem;
  color: var(--subtle);
}

.source-pills {
  display: grid;
  gap: 6px;
}

.source-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.55);
  font-family: var(--mono);
  font-size: 0.74rem;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.14s ease;
}

.source-btn:hover {
  border-color: rgba(56, 189, 248, 0.4);
  color: #fff;
  background: var(--surface-hover);
}

.source-btn.active {
  background: var(--cyan-soft);
  color: var(--cyan);
  border-color: rgba(56, 189, 248, 0.55);
  font-weight: 600;
}

.bar-list {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  gap: 5px;
  cursor: pointer;
  padding: 3px 4px;
  border-radius: 6px;
  transition: background 0.12s ease;
}

.bar-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.bar-label-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: #cbd5e1;
}

.bar-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f43f5e, #fb923c);
}

.bar-fill.teal {
  background: linear-gradient(90deg, #0ea5e9, #34d399);
}

/* Feed Toolbar & Table */
.feed-section {
  margin-bottom: 42px;
}

.feed-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

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

.section-title {
  font-family: var(--sans);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 0.73rem;
}

.select-wrap span {
  color: var(--subtle);
}

.select-wrap select {
  border: none;
  background: var(--surface-solid);
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink);
  outline: none;
  max-width: 170px;
  cursor: pointer;
}

.action-btn {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.14s ease;
}

.action-btn:hover {
  background: var(--cyan-soft);
  border-color: var(--cyan);
  color: var(--cyan);
}

.table-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.ledger-table th {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  padding: 12px 14px;
  background: rgba(13, 20, 36, 0.95);
  color: var(--muted);
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}

.ledger-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.ledger-table tbody tr {
  cursor: pointer;
  transition: background 0.12s ease;
}

.ledger-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.06);
}

.score-badge {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.76rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.score-crit {
  color: var(--rose);
  background: var(--rose-soft);
  border-color: rgba(244, 63, 94, 0.32);
}

.score-high {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: rgba(251, 191, 36, 0.32);
}

.score-mid {
  color: var(--cyan);
  background: var(--cyan-soft);
  border-color: rgba(56, 189, 248, 0.3);
}

.source-tag {
  font-family: var(--mono);
  font-size: 0.71rem;
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
}

.date-cell {
  font-family: var(--mono);
  font-size: 0.75rem;
  white-space: nowrap;
  color: var(--muted);
}

.record-title {
  font-weight: 600;
  color: #f8fafc;
  margin-bottom: 3px;
}

.record-sub {
  font-size: 0.76rem;
  color: var(--muted);
}

.trigger-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.trig-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.empty-state {
  padding: 32px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.84rem;
}

.hidden {
  display: none !important;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* Monetization Grid */
.monetize-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 48px;
}

.offer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.offer-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.offer-card.featured {
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(13, 24, 48, 0.92) 100%);
  box-shadow: 0 18px 40px rgba(2, 132, 199, 0.16);
}

.offer-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.06em;
}

.offer-card h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  margin: 8px 0 10px;
  line-height: 1.25;
  color: #f8fafc;
}

.offer-card p {
  font-size: 0.89rem;
  color: var(--muted);
  margin: 0 0 12px;
}

.offer-list {
  margin: 0 0 18px;
  padding-left: 18px;
  font-size: 0.84rem;
  color: #cbd5e1;
}

.offer-list li {
  margin-bottom: 6px;
}

code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: rgba(30, 41, 59, 0.9);
  color: var(--cyan);
  padding: 2px 6px;
  border-radius: 5px;
}

.offer-footer {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: grid;
  gap: 12px;
}

.offer-price {
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

.offer-price span {
  font-weight: 400;
  font-size: 0.73rem;
  color: var(--muted);
}

.offer-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-solid,
.btn-outline {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.14s ease;
}

.btn-solid {
  background: linear-gradient(135deg, var(--cyan-strong), #2563eb);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-solid:hover {
  filter: brightness(1.1);
}

.btn-outline {
  background: rgba(30, 41, 59, 0.6);
  color: var(--ink);
  border: 1px solid var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0 32px;
  font-size: 0.82rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 18px;
  font-family: var(--mono);
  font-size: 0.76rem;
}

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

.footer-links a:hover {
  text-decoration: underline;
}

/* Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 15, 0.72);
  backdrop-filter: blur(6px);
  z-index: 60;
  display: flex;
  justify-content: flex-end;
}

.drawer {
  width: min(540px, 95vw);
  height: 100%;
  background: #0b1120;
  border-left: 1px solid var(--border-strong);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.6);
  padding: 26px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-title {
  font-family: var(--sans);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0;
  color: #f8fafc;
}

.drawer-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #cbd5e1;
}

.drawer-section h3 {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--subtle);
  margin: 0 0 6px;
}

.drawer-section p {
  margin: 0;
  font-size: 0.92rem;
  color: #e2e8f0;
}

.drawer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

@media (max-width: 980px) {
  .hero-grid,
  .intel-strip,
  .monetize-grid {
    grid-template-columns: 1fr;
  }
  .offer-cta-row {
    grid-template-columns: 1fr;
  }
}
