/* vibeindex — dark theme */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #0d0d10;
  color: #e6e6ea;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: #d97757; text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  background: rgba(255,255,255,0.05);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 13px;
}
h1, h2, h3 { margin: 0; font-weight: 600; }
h2 { font-size: 17px; letter-spacing: -0.01em; }
h3 { font-size: 14px; color: #b8b8c0; text-transform: uppercase;
     letter-spacing: 0.06em; margin-bottom: 10px; }

.hero {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 36px;
  border-bottom: 1px solid #1f1f24;
  background: linear-gradient(180deg, #131318 0%, #0d0d10 100%);
}
.brand { display: flex; align-items: baseline; gap: 14px; }
.logo {
  display: inline-block; width: 30px; height: 30px;
  background: #d97757; color: #0d0d10;
  border-radius: 8px; text-align: center; line-height: 30px;
  font-weight: 800; font-size: 18px; transform: translateY(2px);
}
.name { font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.tagline { color: #88888f; font-size: 13px; }

.nav { display: flex; gap: 22px; }
.nav a { color: #b8b8c0; font-size: 13px; }
.nav a:hover { color: #fff; text-decoration: none; }

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 36px 60px;
}

/* Headline numbers */
.headline {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
.number-block {
  background: linear-gradient(180deg, #1a1a20 0%, #131318 100%);
  border: 1px solid #232329;
  border-radius: 14px;
  padding: 22px 24px;
}
.number-block.secondary { padding: 18px 20px; }
.number-label {
  color: #88888f; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.number {
  font-size: 52px; font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.05; color: #fff;
  font-feature-settings: 'tnum';
}
.number-sm {
  font-size: 28px; font-weight: 600; letter-spacing: -0.02em;
  color: #f0f0f4;
  font-feature-settings: 'tnum';
}
.wow {
  margin-top: 6px;
  font-size: 14px; color: #b8b8c0;
}
.wow.up { color: #4ade80; }
.wow.down { color: #f87171; }

/* Cards */
.card {
  background: #131318;
  border: 1px solid #232329;
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 22px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
  flex-wrap: wrap;
}
.muted { color: #88888f; }
.muted.small { font-size: 12px; }
.center { text-align: center; }

.chart-wrap { position: relative; height: 320px; margin-bottom: 8px; }
.caption { color: #88888f; font-size: 13px; margin: 8px 0 0; }
.legend {
  display: flex; flex-wrap: wrap; gap: 10px 16px;
  font-size: 12px; color: #b8b8c0;
}
.legend .item { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid #1e1e23;
  vertical-align: middle;
}
th {
  color: #88888f; font-weight: 500;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  background: #15151a;
}
td.num, th.num { text-align: right; font-feature-settings: 'tnum'; }
tbody tr:hover { background: rgba(255,255,255,0.02); }
.dot-color {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; margin-right: 8px;
  vertical-align: middle;
}
.agent-name { font-weight: 600; color: #fff; }
.up { color: #4ade80; }
.down { color: #f87171; }
.flat { color: #b8b8c0; }
.small-table th, .small-table td { padding: 6px 10px; font-size: 12px; }

/* Movers */
.movers-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
}
.mover-list { list-style: none; padding: 0; margin: 0; }
.mover-list li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 12px;
  border-bottom: 1px solid #1e1e23;
}
.mover-list li:last-child { border-bottom: none; }
.mover-list .name { font-weight: 600; }
.mover-list .pct { font-feature-settings: 'tnum'; font-size: 14px; }

/* Repos selector */
#repos-select {
  background: #1a1a20; color: #e6e6ea;
  border: 1px solid #2a2a31; border-radius: 8px;
  padding: 6px 10px; font-size: 13px;
}
.repo-cell-name { color: #fff; font-weight: 500; }
.repo-cell-desc { color: #88888f; font-size: 12px; margin-top: 2px; max-width: 480px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Caveats */
.caveats {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.025);
  border-radius: 10px;
  border: 1px solid #1e1e23;
}
.caveats summary {
  cursor: pointer; color: #b8b8c0; font-size: 13px; font-weight: 500;
}
.caveats ul { margin: 10px 0 0 18px; padding: 0; color: #b8b8c0; font-size: 13px; }
.caveats li { margin-bottom: 6px; }

footer {
  display: flex; justify-content: space-between;
  padding: 22px 36px;
  color: #5e5e66; font-size: 12px;
  border-top: 1px solid #1f1f24;
  margin-top: 40px;
}

@media (max-width: 880px) {
  .hero { padding: 16px 20px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .nav { flex-wrap: wrap; }
  main { padding: 20px; }
  .headline { grid-template-columns: 1fr 1fr; }
  .number { font-size: 40px; }
  .movers-grid { grid-template-columns: 1fr; }
}
