/* Sigil Trust — dark mode, minimal */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #2e3440;
  --surface: #3b4252;
  --surface-hover: #434c5e;
  --border: #434c5e;
  --text: #e5e5e5;
  --text-muted: #939db1;
  --accent: #8fbcbb;
  --green: #a3be8c;
  --yellow: #ebcb8b;
  --red: #bf616a;
  --grey: #636363;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
    Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

.container {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 5%;
}

/* ── Nav ── */

.nav {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-brand:hover {
  text-decoration: none;
  color: var(--accent);
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
}
.nav-links a {
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}
.nav-links a.active {
  color: var(--text);
}

/* ── Main ── */

main {
  padding: 3rem 5%;
  min-height: calc(100vh - 7.5rem);
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 1rem 0;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
  color: var(--text-muted);
}

/* ── Hero ── */

.hero {
  text-align: center;
  padding: 4rem 5%;
  margin: -3rem -5% 2.5rem;
  border-bottom: 1px solid var(--border);
}
.hero-headline {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1rem;
  line-height: 1.3;
  letter-spacing: -0.03em;
}
.hero-sub {
  max-width: 36rem;
  margin: 0 auto 1.5rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}
.hero-cta {
  display: inline-block;
  padding: 0.625rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: opacity 0.15s;
}
.hero-cta:hover {
  text-decoration: none;
  opacity: 0.85;
}

/* ── Filters ── */

.filters {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.filter-label {
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.filter-active {
  background: var(--accent);
  color: var(--bg);
  padding: 0.1875rem 0.625rem;
  border-radius: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
}
.filter-link {
  padding: 0.1875rem 0.625rem;
  border-radius: 0.25rem;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: border-color 0.15s, color 0.15s;
}
.filter-link:hover {
  border-color: var(--text-muted);
  color: var(--text);
  text-decoration: none;
}

/* ── Tables ── */

.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
.table th,
.table td {
  padding: 0.625rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table th {
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.table td:nth-child(2) {
  white-space: normal;
  word-break: break-all;
}
.table tbody tr {
  transition: background 0.1s;
}
.table tbody tr:hover {
  background: var(--surface);
}
.rank-col {
  width: 2.5rem;
  text-align: center;
  color: var(--text-muted);
}

/* ── Scores ── */

.score {
  font-weight: 600;
  padding: 0.1875rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.8125rem;
}
.score-green {
  background: rgba(163, 190, 140, 0.12);
  color: var(--green);
}
.score-yellow {
  background: rgba(235, 203, 139, 0.12);
  color: var(--yellow);
}
.score-red {
  background: rgba(191, 97, 106, 0.12);
  color: var(--red);
}
.score-grey {
  background: rgba(99, 99, 99, 0.12);
  color: var(--grey);
}
.badge-provisional {
  font-size: 0.6875rem;
  color: var(--grey);
  font-style: italic;
  margin-left: 0.25rem;
}

/* ── Outcomes ── */

.outcome {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.1875rem 0.5rem;
  border-radius: 0.25rem;
}
.outcome-success {
  background: rgba(163, 190, 140, 0.12);
  color: var(--green);
}
.outcome-negative {
  background: rgba(191, 97, 106, 0.12);
  color: var(--red);
}

.mono {
  font-family: var(--mono);
  font-size: 0.75rem;
}

/* ── Trust card (tool detail) ── */

.trust-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}
.trust-score-big {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}
.trust-label {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-top: 0.375rem;
}
.trust-label.green {
  color: var(--green);
}
.trust-label.yellow {
  color: var(--yellow);
}
.trust-label.red {
  color: var(--red);
}
.trust-label.grey {
  color: var(--grey);
}
.trust-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.stat {
  text-align: center;
}
.stat-value {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
}
.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}
.empty-hint {
  color: var(--text-muted);
  font-style: italic;
}
.tool-title {
  word-break: break-all;
}
.tool-summary {
  color: var(--text-muted);
  margin: -0.5rem 0 1.5rem;
}

/* ── Badge embed ── */

.badge-embed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 2rem;
}
.badge-embed h3 {
  margin-top: 0;
}

/* ── Code blocks ── */

.code-block {
  background: var(--surface);
  color: var(--text);
  padding: 0.875rem 1.125rem;
  border-radius: 0.375rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid var(--border);
}

/* ── About ── */

.about-section {
  margin-bottom: 2.5rem;
}
.about-section ul {
  padding-left: 1.25rem;
}
.about-section li {
  margin-bottom: 0.5rem;
}
.score-table td {
  padding: 0.5rem 0.75rem;
}

/* ── Empty / error states ── */

.empty-state {
  text-align: center;
  padding: 4rem 0;
  color: var(--text-muted);
}
.error-page {
  text-align: center;
  padding: 4rem 0;
}
.error-page h1 {
  font-size: 3rem;
  color: var(--text-muted);
}

/* ── Download ── */

.dl-intro {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}
.dl-section {
  margin-bottom: 2.5rem;
}
.dl-section h3 {
  margin-top: 1rem;
}
.dl-table .checksum {
  font-size: 0.6875rem;
  color: var(--text-muted);
}
.skill-details {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}
.skill-details summary {
  padding: 0.75rem 1.125rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: color 0.15s;
}
.skill-details summary:hover {
  color: var(--text);
}
.skill-details[open] summary {
  border-bottom: 1px solid var(--border);
}
.skill-content {
  padding: 1.125rem;
}
.skill-content h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem;
  color: var(--text-muted);
}
.dl-privacy ul {
  padding-left: 1.25rem;
}
.dl-privacy li {
  margin-bottom: 0.5rem;
}

/* ── Footer ── */

.footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Responsive ── */

@media (max-width: 40rem) {
  .table th:nth-child(n + 5),
  .table td:nth-child(n + 5) {
    display: none;
  }
  .trust-stats {
    gap: 1.25rem;
  }
  .stat-value {
    font-size: 1rem;
  }
  .hero-headline {
    font-size: 1.5rem;
  }
}
