@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --text: #1a1a18;
  --muted: #6b6b63;
  --accent: #e85d04;
  --border: #e8e6df;
  --shadow: 0 1px 3px rgba(26, 26, 24, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

header {
  padding: 3rem 1.5rem 2rem;
  max-width: 920px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.tagline { color: var(--muted); font-size: 1.05rem; max-width: 42rem; }

.meta { margin-top: 1rem; font-size: 0.875rem; color: var(--muted); }
.meta a { color: var(--accent); }

.controls {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.controls-inner {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

#search {
  flex: 1;
  min-width: 200px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: var(--surface);
}

#search:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.filter-btn {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
}

.filter-btn:hover { border-color: var(--accent); color: var(--text); }
.filter-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); }

#count { font-size: 0.8125rem; color: var(--muted); white-space: nowrap; }

main { max-width: 920px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

section { margin-bottom: 2.5rem; }

section h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.group-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 1.25rem 0 0.5rem;
}

.card {
  display: block;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
}

.card:hover { border-color: var(--accent); transform: translateY(-1px); }

.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.card-name { font-weight: 600; font-size: 0.95rem; }
.card-members { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.card-desc { font-size: 0.875rem; color: var(--muted); margin-top: 0.35rem; }

.badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: #fef3eb;
  color: var(--accent);
  margin-left: 0.5rem;
  vertical-align: middle;
}

.empty { text-align: center; padding: 3rem; color: var(--muted); }

footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

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