:root {
  --bg: #0b0d10;
  --bg-elev: #14181d;
  --bg-card: #181d24;
  --bg-card-hover: #1d242c;
  --fg: #e9ecef;
  --fg-muted: #8a93a0;
  --fg-dim: #5d6571;
  --accent: #6ee7b7;
  --accent-soft: rgba(110, 231, 183, 0.16);
  --warn: #fcd34d;
  --bad: #f87171;
  --good: #4ade80;
  --border: #232a33;
  --border-strong: #2f3742;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  --radius: 10px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-feature-settings: "tnum", "cv11";
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 24px 24px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.brand h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.logo-dot {
  display: inline-block;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #6ee7b7, #047857 70%);
  box-shadow: 0 0 14px rgba(110, 231, 183, 0.55);
}

.tagline {
  margin: 0 0 18px 0;
  color: var(--fg-muted);
  max-width: 720px;
}

.source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding-top: 4px;
}

.src-pill {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--fg-muted);
}
.src-pill[data-state="ok"] { color: var(--good); border-color: rgba(74, 222, 128, 0.4); }
.src-pill[data-state="fail"] { color: var(--bad); border-color: rgba(248, 113, 113, 0.5); }
.src-pill[data-state="unknown"] { color: var(--fg-dim); }

.counters {
  margin-left: auto;
  font-size: 12px;
  color: var(--fg-muted);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 80px 24px;
}

.card-section {
  margin: 36px 0;
}

.card-section.hidden { display: none; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 16px;
}

.section-head h2 {
  font-size: 18px;
  margin: 0;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--fg-muted);
  font-size: 13px;
  margin: 0;
}

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

.model-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease, border-color 0.12s ease;
}
.model-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.model-card .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.model-card .slug {
  font-family: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
  color: var(--fg);
}

.model-card .status-badge {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  color: var(--fg-muted);
  background: var(--bg-elev);
  white-space: nowrap;
}
.model-card .status-badge[data-status="active"] {
  color: var(--good);
  border-color: rgba(74, 222, 128, 0.4);
}
.model-card .status-badge[data-status="dormant"] {
  color: var(--fg-dim);
}
.model-card .status-badge[data-status="unmasked"] {
  color: var(--warn);
  border-color: rgba(252, 211, 77, 0.5);
}

.model-card .desc {
  font-size: 13px;
  color: var(--fg-muted);
  margin: 0 0 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.fp-chip {
  font-size: 11.5px;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-family: ui-monospace, monospace;
}

.attribution {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
}
.attribution .top-lab {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 6px;
  color: var(--fg);
}
.attribution .conf {
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.attribution .conf-bar {
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.attribution .conf-bar > div {
  height: 100%;
  background: linear-gradient(90deg, #6ee7b7, #047857);
}
.attribution.unattributed {
  border-style: dashed;
  color: var(--fg-dim);
  font-size: 12px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--fg-dim);
  margin-top: 10px;
}

.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--bg-elev);
  color: var(--fg-muted);
  font-weight: 500;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
tbody tr:hover { background: var(--bg-card-hover); }
tbody tr:last-child td { border-bottom: none; }
td.num { font-variant-numeric: tabular-nums; text-align: right; }

#timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
#timeline li {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
#timeline li:last-child { border-bottom: none; }
#timeline .when {
  width: 130px;
  flex-shrink: 0;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--fg-muted);
}
#timeline .what {
  font-size: 13.5px;
}
#timeline .kind {
  display: inline-block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  margin-right: 8px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  color: var(--fg-muted);
}
#timeline .kind[data-kind="appeared"] { color: var(--good); border-color: rgba(74, 222, 128, 0.4); }
#timeline .kind[data-kind="attributed"] { color: var(--accent); border-color: var(--accent-soft); }
#timeline .kind[data-kind="unmasked"] { color: var(--warn); border-color: rgba(252, 211, 77, 0.5); }
#timeline .kind[data-kind="dormant"] { color: var(--fg-dim); }

.ghost-btn {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--fg-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
}
.ghost-btn:hover { color: var(--fg); border-color: var(--accent); }

.site-footer {
  max-width: 1200px;
  margin: 60px auto 0 auto;
  padding: 24px;
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 13px;
}

.detail-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.detail-block h3 {
  margin-top: 0;
  font-size: 14px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.distribution-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.distribution-bars .bar-row {
  display: grid;
  grid-template-columns: 100px 1fr 60px;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
}
.distribution-bars .bar-track {
  background: var(--border);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
}
.distribution-bars .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6ee7b7, #047857);
}
.distribution-bars .bar-val {
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--fg-muted);
}

.empty {
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--fg-muted);
  text-align: center;
  font-size: 14px;
}
