/* GitHub Hall of Shame — clean editorial.
   Dark navy, single red accent, one serif for headlines, monospace
   for data. The fraud is the content; the chrome stays quiet. */

:root {
  --bg: #0d1117;
  --bg-soft: #161b22;
  --card: #161b22;
  --border: #21262d;
  --border-soft: #1c222a;

  --fg: #e6edf3;
  --fg-mute: #8b949e;
  --fg-dim: #6e7681;

  --red: #cf222e;
  --red-bright: #f85149;
  --red-soft: rgba(248, 81, 73, 0.1);

  --serif: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--fg-dim);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.12s, text-decoration-color 0.12s;
}
a:hover {
  color: var(--red-bright);
  text-decoration-color: var(--red-bright);
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─────────── HEADER ─────────── */
header {
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}

/* Off-axis spotlight, dim */
header::before {
  content: '';
  position: absolute;
  top: -200px;
  left: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(248, 81, 73, 0.05), transparent 60%);
  pointer-events: none;
}

.eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  color: var(--red-bright);
  margin: 0 0 18px;
  letter-spacing: 0;
}

.display {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.15;
  margin: 0 0 24px;
  letter-spacing: -0.015em;
  color: var(--fg);
  max-width: 800px;
}

.display strong {
  color: var(--red-bright);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.lede {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  margin: 0 0 20px;
  max-width: 640px;
  color: var(--fg-mute);
}

.meta-line {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--fg-dim);
  margin: 0;
}

.meta-line a {
  color: var(--fg-mute);
}

/* ─────────── SECTIONS ─────────── */
section {
  padding: 64px 0;
}

section.wall-section {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  margin-bottom: 32px;
  max-width: 720px;
}

h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.section-sub {
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-mute);
  margin: 0;
  max-width: 600px;
}

.section-sub code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--fg);
}

/* ─────────── REPO CARDS (THE WALL) ─────────── */
.tombstone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.tombstone {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.12s, background 0.12s;
}

.tombstone:hover {
  border-color: var(--fg-dim);
  background: var(--bg-soft);
  text-decoration: none;
}

.tombstone .rank {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-dim);
  margin: 0 0 8px;
}

.tombstone .repo-name {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  color: var(--fg);
  margin: 0 0 14px;
  word-break: break-all;
  line-height: 1.45;
}

.tombstone .pct {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 30px;
  line-height: 1;
  color: var(--red-bright);
  margin: 0;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.tombstone .pct-label {
  font-size: 12px;
  color: var(--fg-dim);
  margin: 4px 0 14px;
}

.tombstone .breakdown {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-mute);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.tombstone .breakdown strong {
  color: var(--fg);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Hide the inducted stamp — drop entirely */
.tombstone .inducted {
  display: none;
}

/* ─────────── TRENDING ─────────── */
.tabs {
  margin-top: 16px;
  display: flex;
  gap: 4px;
}

.tab {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-mute);
  padding: 6px 14px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.12s;
}

.tab:hover {
  color: var(--fg);
  border-color: var(--fg-dim);
}

.tab.active {
  background: var(--bg-soft);
  color: var(--fg);
  border-color: var(--fg-dim);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.cert {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.12s, background 0.12s;
}

.cert:hover {
  border-color: var(--fg-dim);
  background: var(--bg-soft);
  text-decoration: none;
}

.cert-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.cert .repo {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  color: var(--fg);
  word-break: break-all;
  line-height: 1.45;
}

.cert .today {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dim);
  white-space: nowrap;
}

/* Dot + plain status — replaces the old "stamps" */
.cert-stamp {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg);
}

.cert-stamp::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cert-stamp.shame {
  color: var(--fg);
}
.cert-stamp.shame::before {
  background: var(--red-bright);
  box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.15);
}

.cert-stamp.clean {
  color: var(--fg-mute);
}
.cert-stamp.clean::before {
  background: var(--fg-dim);
}

.cert-stamp .stamp-icon {
  display: none;
}

.cert-stamp .stamp-text {
  flex: 1;
}

.cert-stamp .stamp-text strong {
  font-weight: 500;
  color: var(--fg);
  margin-right: 8px;
}

.cert-stamp.clean .stamp-text strong {
  color: var(--fg-mute);
}

.cert-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dim);
  display: flex;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.snapshot-warning {
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--fg-dim);
  max-width: 720px;
}

/* ─────────── HOW (algorithm) ─────────── */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.how-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
}

.how-card .how-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dim);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.how-card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.how-card p {
  margin: 0;
  color: var(--fg-mute);
  font-size: 14px;
  line-height: 1.55;
}

/* ─────────── SEARCH TABLE ─────────── */
#searchInput {
  width: 100%;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 14px;
  margin-bottom: 12px;
  transition: border-color 0.12s, box-shadow 0.12s;
}

#searchInput::placeholder {
  color: var(--fg-dim);
}

#searchInput:focus {
  outline: none;
  border-color: var(--red-bright);
  box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.15);
}

.table-wrapper {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-x: auto;
  max-height: 560px;
  overflow-y: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead {
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
}

th {
  padding: 10px 14px;
  text-align: left;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  color: var(--fg-mute);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

th.num {
  text-align: right;
}

th:hover {
  color: var(--fg);
}

th.sorted-desc::after {
  content: ' ↓';
}
th.sorted-asc::after {
  content: ' ↑';
}

td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-soft);
  font-variant-numeric: tabular-nums;
  color: var(--fg-mute);
  font-family: var(--mono);
}

td.num {
  text-align: right;
}

tbody tr:hover {
  background: var(--bg-soft);
}

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

td a {
  color: var(--fg);
  text-decoration-color: transparent;
}

td a:hover {
  color: var(--red-bright);
  text-decoration-color: var(--red-bright);
}

.pct-cell {
  color: var(--red-bright);
}

.pct-cell.medium {
  color: var(--fg);
}

.pct-cell.low {
  color: var(--fg-mute);
}

#tableFooter {
  margin-top: 10px;
  font-size: 12px;
  color: var(--fg-dim);
  text-align: right;
}

.meta {
  color: var(--fg-dim);
  font-size: 13px;
}

/* ─────────── EXTENSION ─────────── */
.ext-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 32px;
  text-align: center;
}

.ext-box h2 {
  margin-bottom: 8px;
}

.ext-box p {
  max-width: 560px;
  margin: 0 auto 20px;
  color: var(--fg-mute);
  font-size: 15px;
}

.ext-preview {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.badge-demo {
  padding: 5px 10px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid;
}

.badge-demo.good {
  color: var(--fg);
  border-color: var(--border);
  background: var(--bg-soft);
}

.badge-demo.bad {
  color: var(--red-bright);
  border-color: rgba(248, 81, 73, 0.4);
  background: var(--red-soft);
}

/* ─────────── FOOTER ─────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  color: var(--fg-dim);
  font-size: 13px;
  text-align: center;
}

footer p {
  margin: 4px 0;
}

footer a {
  color: var(--fg-mute);
}

footer code {
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
  font-family: var(--mono);
  color: var(--fg);
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 720px) {
  .container {
    padding: 0 16px;
  }
  header {
    padding: 48px 0 36px;
  }
  section {
    padding: 48px 0;
  }
  .display {
    font-size: 28px;
  }
  h2 {
    font-size: 22px;
  }
  .tombstone .pct {
    font-size: 26px;
  }
  .ext-box {
    padding: 24px 20px;
  }
  th,
  td {
    padding: 8px 10px;
    font-size: 12px;
  }
}
