:root {
  color-scheme: light dark;
  --bg: #0f1115;
  --panel: #161a21;
  --text: #e6e8eb;
  --muted: #9aa2ad;
  --accent: #6ea8fe;
  --border: #252b34;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fa;
    --panel: #ffffff;
    --text: #1c2026;
    --muted: #5b6573;
    --accent: #1f5fbf;
    --border: #e3e6ea;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.brand { font-weight: 600; color: var(--text); }
.site-header nav { display: flex; gap: 1rem; font-size: .95rem; }

main {
  max-width: 62rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

h1 { font-size: 1.6rem; margin: 0 0 .5rem; }
h2 { font-size: 1.15rem; margin: 1.75rem 0 .75rem; }
p { margin: .5rem 0; }
.lead { color: var(--muted); margin-bottom: 1.5rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.card h3 { margin: 0; font-size: 1.05rem; }
.card .meta { color: var(--muted); font-size: .875rem; }
.card .desc { color: var(--muted); font-size: .9rem; flex: 1; }

.tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag {
  font-size: .75rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .1rem .5rem;
}

.button {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .45rem .8rem;
  background: transparent;
  color: var(--accent);
  font-size: .92rem;
}
.button:hover { text-decoration: none; border-color: var(--accent); }

table.files { width: 100%; border-collapse: collapse; margin-top: .5rem; }
table.files th, table.files td {
  text-align: left;
  padding: .5rem .25rem;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
}

code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em;
  word-break: break-all;
}

.note {
  border-left: 3px solid var(--accent);
  padding: .5rem .9rem;
  background: var(--panel);
  color: var(--muted);
  margin: 1rem 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  color: var(--muted);
  font-size: .85rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  max-width: 62rem;
  margin: 0 auto;
}
