/* ── Reset & base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #faf9f7;
  --surface:   #ffffff;
  --border:    #e2ddd8;
  --text:      #1a1816;
  --muted:     #6b6560;
  --accent:    #2d5f3f;
  --accent-lt: #e8f2ec;
  --tag-bg:    #f0ece8;
  --tag-active:#2d5f3f;
  --tag-active-text: #ffffff;
  --radius:    4px;
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-sans:  "Helvetica Neue", Arial, sans-serif;
}

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Layout ───────────────────────────────────────────────────── */
header, main {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

header {
  padding-top: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--text);
  margin-bottom: 2rem;
}

/* ── Header ───────────────────────────────────────────────────── */
h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: normal;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.meta {
  margin-top: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Controls ─────────────────────────────────────────────────── */
.controls {
  margin-bottom: 2rem;
}

#search {
  display: block;
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  margin-bottom: 0.85rem;
}
#search:focus { border-color: var(--accent); }
#search::placeholder { color: var(--muted); }

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

.tag-btn {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.tag-btn:hover { border-color: var(--accent); color: var(--accent); }
.tag-btn.active {
  background: var(--tag-active);
  border-color: var(--tag-active);
  color: var(--tag-active-text);
}

/* ── Bibliography list ────────────────────────────────────────── */
.bibliography {
  list-style: none;
  padding: 0;
}

.bibliography li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(-
