:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #24292f;
  --muted: #57606a;
  --border: #d0d7de;
  --accent: #0969da;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(860px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero {
  margin-bottom: 1.25rem;
}

h1 {
  margin: 0 0 0.35rem;
  font-size: 2rem;
  line-height: 1.2;
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.controls {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: #f6f8fa;
}

#search,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: #fff;
  color: var(--text);
  padding: 0.5rem 0.6rem;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.filter-row label {
  display: grid;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.result-count {
  margin: 0.5rem 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.category-section {
  margin: 1.5rem 0;
}

.category-section h2 {
  margin: 0 0 0.35rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.25rem;
  line-height: 1.3;
}

.category-section ul {
  margin: 0.5rem 0 0;
  padding-left: 1.35rem;
}

.link-item {
  margin: 0.25rem 0;
}

.link-item a {
  color: var(--accent);
  text-decoration: none;
}

.link-item a:hover {
  text-decoration: underline;
}

.link-item span {
  color: var(--muted);
}

[hidden] {
  display: none !important;
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 1rem, 860px);
    padding-top: 1rem;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }
}
