:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --code-bg: #f0efea;
  --text: #1d1f24;
  --muted: #5b606b;
  --border: #e2e1dc;
  --accent: #6b3fa0;
  --accent-text: #ffffff;
  --gold: #b07d00;
  --dim: #7a7f89;
  --terminal-bg: #15171c;
  --terminal-text: #e6e6e6;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #161920;
    --code-bg: #1b1f27;
    --text: #e7e8ea;
    --muted: #a2a7b1;
    --border: #2a2f39;
    --accent: #9d6fe0;
    --accent-text: #0f1115;
    --gold: #f2c14e;
    --dim: #8c919b;
    --terminal-bg: #0b0d10;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--accent);
}

code,
pre {
  font-family: var(--mono);
  font-size: 0.88em;
  font-variant-ligatures: none;
}

code {
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

pre {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.35;
}

pre code {
  background: none;
  padding: 0;
  font-size: 1em;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--text);
}

.hero {
  padding: 4rem 16px 3rem;
  text-align: center;
}

.hero-art {
  display: inline-block;
  max-width: 100%;
  margin: 0 auto 2rem;
  background: none;
  border: none;
  color: var(--accent);
  font-size: clamp(0.55rem, 1.9vw, 1.05rem);
  text-align: left;
}

h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.2;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.8rem;
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.15rem;
  margin: 2rem 0 0.75rem;
}

.lead {
  max-width: 640px;
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.button {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.install {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
}

.install pre {
  margin: 0;
  min-width: 0;
}

.copy {
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0.45rem 0.9rem;
}

.requirements {
  color: var(--muted);
  font-size: 0.9rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  padding-bottom: 2rem;
}

.features article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
}

.features h3 {
  margin-top: 0;
}

.features p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.section {
  padding: 3rem 16px;
  border-top: 1px solid var(--border);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 1.5rem;
  align-items: start;
}

.grid > div {
  min-width: 0;
}

.label {
  margin: 0 0 0.4rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}

.terminal {
  background: var(--terminal-bg);
  color: var(--terminal-text);
  border-color: var(--terminal-bg);
}

.terminal .gold {
  color: #f2c14e;
}

.terminal .dim {
  color: #8c919b;
}

.table {
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.filter {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.search {
  flex: 1 1 240px;
  max-width: 360px;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.count {
  color: var(--muted);
  font-size: 0.9rem;
}

.gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.font-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  min-width: 0;
}

.font-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.font-card pre {
  margin: 0;
  background: none;
  border: none;
  padding: 0;
}

.credits h1 {
  margin-bottom: 1rem;
}

.credits h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
}

.checks {
  padding-left: 1.25rem;
}

.checks li {
  margin-bottom: 0.5rem;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.legal {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.7;
}

.endorsement {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
}

.hero .endorsement {
  margin-top: 2.5rem;
}

.endorsement img {
  display: block;
  height: 20px;
  width: auto;
}

.endorsement:hover {
  color: var(--text);
}
