:root {
  --bg: #0f0a1e;
  --surface: #1a1230;
  --surface-2: #241a3d;
  --border: #2e2348;
  --text: #f2eef8;
  --muted: #a79ec2;
  --accent: #8b5cf6;
  --accent-2: #ec4899;
  --good: #34d399;
  --radius: 10px;
  --max: 980px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
}
a { color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(15, 10, 30, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
}
.brand { font-weight: 800; font-size: 1.2rem; text-decoration: none; letter-spacing: -0.02em; }
.brand span { color: var(--accent); }
.site-header nav a { text-decoration: none; color: var(--muted); font-size: 0.95rem; }
.site-header nav a:hover { color: var(--text); }

.hero { padding: 60px 0 30px; }
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.025em;
  background: linear-gradient(90deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede { font-size: 1.1rem; color: var(--muted); max-width: 62ch; margin: 0 0 12px; }
.meta { color: var(--muted); font-size: 0.9rem; margin: 0; }

.ranking { padding: 20px 0 80px; }
.apps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.app {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  scroll-margin-top: 80px;
}
.app:hover { border-color: var(--accent); }
.app-head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.rank {
  font-weight: 800;
  color: var(--accent);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  min-width: 2.5em;
}
.app-head h2 { margin: 0; font-size: 1.25rem; letter-spacing: -0.01em; flex: 1; }
.app-head h2 a { text-decoration: none; }
.app-head h2 a:hover { color: var(--accent); }
.rating { font-weight: 700; color: var(--good); font-variant-numeric: tabular-nums; }
.rating .out { color: var(--muted); font-weight: 500; font-size: 0.85em; }

.bar { background: var(--surface-2); height: 6px; border-radius: 3px; overflow: hidden; margin: 4px 0 14px; }
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 3px;
}
.blurb { margin: 0 0 14px; color: #d6cfe6; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 20px; margin: 0 0 12px; }
.facts div { margin: 0; }
.facts dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 2px; }
.facts dd { margin: 0; font-size: 0.92rem; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.tags li {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 4px 0; }

@media (max-width: 500px) {
  .hero { padding: 40px 0 20px; }
  .app { padding: 16px; }
  .app-head h2 { font-size: 1.1rem; }
}

/* ---- layout ---- */
.section { padding: 28px 0; }
.section h2 { font-size: 1.5rem; letter-spacing: -0.015em; margin: 0 0 8px; }
.section-lede { color: var(--muted); max-width: 68ch; margin: 0 0 20px; }
.site-header nav { display: flex; gap: 16px; flex-wrap: wrap; }
.more-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.more-link:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- app cards (homepage + bucket pages) ---- */
.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  list-style: none;
}
.app-card:hover { border-color: var(--accent); }
.app-card .app-head h3 { margin: 0; font-size: 1.2rem; flex: 1; }
.app-card .app-head h3 a { text-decoration: none; }
.app-card .app-head h3 a:hover { color: var(--accent); }
.app-card .blurb { margin: 10px 0 12px; }

/* ---- badges ---- */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface-2);
  text-decoration: none;
  vertical-align: middle;
}
.badge-nsfw { color: var(--accent-2); border-color: var(--accent-2); background: transparent; }
.badge-type { color: var(--accent); }
.badge-app { color: var(--text); }
.badge-app:hover { border-color: var(--accent); }
.badge-unverified { color: #fbbf24; border-color: #fbbf24; background: transparent; }
.rating.unrated { color: var(--muted); font-weight: 600; }

/* ---- entity pages ---- */
.breadcrumbs { padding: 16px 20px 0; font-size: 0.85rem; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }
.entity { padding: 24px 20px 80px; }
.entity-head h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); margin: 0 0 8px; letter-spacing: -0.02em; }
.entity section { margin: 36px 0 0; }
.entity section h2 { font-size: 1.35rem; margin: 0 0 12px; }
.source-note { font-size: 0.85rem; color: var(--muted); margin: 10px 0 0; }
.source-note a { color: var(--accent); }

/* ---- tables ---- */
.table-scroll { overflow-x: auto; }
.facts-table, .index-table, .compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.facts-table th, .facts-table td,
.index-table th, .index-table td,
.compare-table th, .compare-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.facts-table tr:last-child > *, .index-table tbody tr:last-child > *, .compare-table tbody tr:last-child > * { border-bottom: 0; }
.facts-table th[scope="row"], .compare-table th[scope="row"] {
  color: var(--muted); font-weight: 600; width: 34%;
}
.index-table thead th, .compare-table thead th {
  background: var(--surface-2); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
}
.index-table a, .compare-table a, .facts-table a { color: var(--text); }
.index-table a:hover, .compare-table a:hover, .facts-table a:hover { color: var(--accent); }

/* ---- benchmark ---- */
.benchmark {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.benchmark.pending { border-style: dashed; color: var(--muted); }
.benchmark.pending p { margin: 0; }
.benchmark.pending strong { color: var(--text); }
.score-row { display: flex; gap: 32px; margin-bottom: 8px; }
.score { display: flex; flex-direction: column; }
.score-num { font-size: 2rem; font-weight: 800; color: var(--good); font-variant-numeric: tabular-nums; }
.score-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

/* ---- timeline ---- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.timeline > li:last-child { border-bottom: 0; }
.timeline time { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.timeline-body h3 { margin: 8px 0 6px; font-size: 1.05rem; }
.timeline-body p { margin: 0; color: #d6cfe6; font-size: 0.95rem; }
@media (max-width: 500px) {
  .timeline > li { grid-template-columns: 1fr; gap: 4px; }
}

/* ---- change list (homepage) ---- */
.change-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.change-list li { color: #d6cfe6; }
.change-list time { color: var(--muted); font-size: 0.85rem; margin-right: 8px; font-variant-numeric: tabular-nums; }
.change-list a { color: var(--text); font-weight: 600; }
.change-list a:hover { color: var(--accent); }

/* ---- bucket grid ---- */
.bucket-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px;
}
.bucket-grid a {
  display: block; height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
}
.bucket-grid a:hover { border-color: var(--accent); }
.bucket-grid h3 { margin: 0 0 6px; font-size: 1.05rem; }
.bucket-grid p { margin: 0; color: var(--muted); font-size: 0.88rem; }

/* ---- alt links ---- */
.alt-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.alt-links a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}
.alt-links a:hover { border-color: var(--accent); color: var(--accent); }

/* ---- FAQ ---- */
.faq { margin: 36px 0 0; }
.faq h2 { font-size: 1.35rem; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 18px;
  margin: 0 0 10px;
}
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; }
.faq details p { margin: 0 0 14px; color: #d6cfe6; }

/* ---- newsletter ---- */
.newsletter {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px;
}
.newsletter h2 { margin: 0 0 8px; font-size: 1.3rem; }
.newsletter p { color: var(--muted); margin: 0 0 16px; max-width: 62ch; }
.newsletter form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter input[type="email"] {
  flex: 1; min-width: 220px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}
.newsletter button {
  padding: 10px 20px;
  border-radius: 8px;
  border: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}
.newsletter button:hover { filter: brightness(1.1); }

/* ---- footer ---- */
.site-footer nav { margin: 8px 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
