:root {
  --bg: #fbf9f6;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --line: #e6e2da;
  --accent: #8a4a2c;
  --accent-soft: #f1e7df;
  --like: #2f7d3a;
  --steal: #c14d2a;
  --interesting: #9a7a1f;
  --anti: #8a2c2c;
  --max-width: 1080px;
  --radius: 4px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Iowan Old Style", "Charter", Georgia, serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
  flex-wrap: wrap;
}
.brand { font-weight: 600; letter-spacing: 0.02em; }
.topbar nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; }
.topbar nav a { color: var(--muted); }
.topbar nav a:hover, .topbar nav a.active { color: var(--ink); }
.count {
  display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px;
  border-radius: 999px; background: var(--accent); color: white;
  font-size: 12px; text-align: center; font-family: ui-sans-serif, system-ui, sans-serif;
}

main { max-width: var(--max-width); margin: 0 auto; padding: 32px 24px 80px; }

h1, h2, h3 { font-weight: 600; line-height: 1.2; }
h1 { font-size: 36px; margin: 8px 0 16px; }
h2 { font-size: 26px; margin: 32px 0 12px; }
h3 { font-size: 20px; margin: 24px 0 8px; }
p { margin: 0 0 12px; }
.lede { font-size: 19px; color: var(--muted); max-width: 70ch; }

.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: var(--accent-soft); }
.card .body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.card h3 { margin: 0 0 4px; font-size: 17px; }
.card .meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.card .tagline { font-size: 14px; color: var(--ink); flex: 1; }
.card .card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }

.reactions { display: inline-flex; gap: 4px; align-items: center; }
.reactions button {
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  padding: 4px 8px; font-size: 16px; line-height: 1;
  transition: background 0.1s, border-color 0.1s, transform 0.1s;
}
.reactions button:hover { background: var(--accent-soft); }
.reactions button.active { border-color: var(--ink); background: white; transform: scale(1.05); }
.reactions button[data-reaction="like"].active { border-color: var(--like); }
.reactions button[data-reaction="steal"].active { border-color: var(--steal); background: #fdeee6; }
.reactions button[data-reaction="interesting"].active { border-color: var(--interesting); }
.reactions button[data-reaction="anti"].active { border-color: var(--anti); }

.note { margin-top: 8px; }
.note.hidden { display: none; }
.note textarea {
  width: 100%; min-height: 60px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-size: 14px; background: white; resize: vertical;
}

.detail-hero { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 32px; }
@media (min-width: 760px) { .detail-hero { grid-template-columns: 1.4fr 1fr; } }
.detail-hero img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); }
.detail-hero .meta-block { font-size: 15px; }
.detail-hero .meta-block dl { margin: 0; }
.detail-hero .meta-block dt { color: var(--muted); font-size: 13px; margin-top: 8px; }
.detail-hero .meta-block dd { margin: 2px 0 0; }

.rubric-section { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
.rubric-section h3 { margin-top: 0; }

.move {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 12px; margin: 8px 0;
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
}
.move .text { flex: 1; }
.move .tag-row { margin-top: 4px; }
.tag { display: inline-block; font-size: 12px; color: var(--muted); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; margin-right: 4px; font-family: ui-sans-serif, system-ui, sans-serif; }

.ratings { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-top: 8px; }
.ratings span strong { color: var(--ink); }

.synth-claim {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin: 10px 0;
}
.synth-claim .evidence { font-size: 13px; color: var(--muted); margin-top: 6px; }
.synth-claim .evidence a { color: var(--muted); }

.rec {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin: 12px 0;
}
.rec .num { font-size: 13px; color: var(--muted); font-family: ui-sans-serif, system-ui, sans-serif; }
.rec h3 { margin: 4px 0 8px; }

.footnote {
  border-top: 1px solid var(--line);
  padding: 16px 24px;
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--muted); flex-wrap: wrap;
}
.footnote .ghost { background: transparent; border: 1px solid var(--line); padding: 6px 12px; border-radius: var(--radius); color: var(--ink); }
.footnote .ghost:hover { background: white; }
.footnote .ghost.danger:hover { border-color: var(--anti); color: var(--anti); }

.empty { color: var(--muted); padding: 40px 0; text-align: center; }
.placeholder-img {
  width: 100%; aspect-ratio: 16 / 10;
  background: repeating-linear-gradient(45deg, var(--accent-soft) 0 10px, white 10px 20px);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 13px;
}

.status-pill {
  display: inline-block; font-size: 11px; padding: 2px 8px;
  border-radius: 999px; font-family: ui-sans-serif, system-ui, sans-serif;
  background: var(--accent-soft); color: var(--accent); margin-left: 6px;
}
.status-pill.seed { background: #e8f0e6; color: var(--like); }
.status-pill.pending { background: #f3eee0; color: var(--interesting); }
