/* ═══ The Banjo Literary Meetup — cozy library theme ═══ */

:root {
  --paper: #f6f0e4;
  --paper-lift: #fbf7ee;
  --paper-deep: #efe6d2;
  --ink: #2d2418;
  --ink-soft: #6b5c47;
  --ink-faint: #a2917a;
  --line: #ddd0b8;
  --line-soft: #e8ddc8;
  --stamp: #9c2f22;
  --accent: #8c2b1a;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --body: Georgia, "Iowan Old Style", "Times New Roman", serif;
}

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

html { color-scheme: light; scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.30 0 0 0 0 0.23 0 0 0 0 0.13 0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main { max-width: 720px; margin: 0 auto; padding: 0 16px 40px; }

h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.65rem;
  text-align: center;
  margin: 56px 0 6px;
}
h2::after {
  content: "❦";
  display: block;
  color: var(--ink-faint);
  font-size: 1rem;
  margin-top: 6px;
}

/* ── hero ─────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 56px 20px 34px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(140, 43, 26, 0.05), transparent 55%);
}
.hero-ornament { font-size: 2.1rem; margin-bottom: 8px; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 8vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
}
.tagline {
  margin-top: 10px;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 1.02rem;
}
.counters {
  display: flex;
  justify-content: center;
  gap: clamp(22px, 7vw, 52px);
  margin-top: 26px;
}
.counters > div { display: flex; flex-direction: column; }
.counters strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.7rem;
  color: var(--accent);
}
.counters span {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

/* ── timeline ─────────────────────────────────────────────────── */

.timeline {
  list-style: none;
  position: relative;
  margin-top: 34px;
  padding-left: 24px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}

.entry { position: relative; padding-bottom: 34px; }
.entry:last-child { padding-bottom: 10px; }

.month-marker { margin-bottom: 12px; }
.month-marker span {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px 12px;
}
.month-marker::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--line);
}

.hiatus .month-marker span { color: var(--ink-faint); }
.hiatus .month-marker::before { background: var(--ink-faint); }
.hiatus-note {
  color: var(--ink-faint);
  font-style: italic;
  padding-left: 4px;
}

.book-card {
  position: relative;
  background: var(--paper-lift);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 16px 16px;
  box-shadow: 0 2px 10px rgba(70, 48, 20, 0.09);
}

.book-main {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-right: 54px; /* room for the stamp */
}
.book-info {
  min-width: 0; /* let the text column shrink instead of sliding under the stamp */
  overflow-wrap: break-word;
}
.cover {
  width: 88px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  box-shadow: 2px 3px 8px rgba(70, 48, 20, 0.35), inset 0 0 2px rgba(0, 0, 0, 0.2);
  transform: rotate(-1.6deg);
  background: var(--paper-deep);
}
.book-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.22rem;
  line-height: 1.22;
}
.book-author { color: var(--ink-soft); margin-top: 3px; font-style: italic; }
.book-meta {
  margin-top: 7px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.book-award {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--accent);
}
.blurb {
  margin-top: 13px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.avg-stamp {
  position: absolute;
  top: -12px;
  right: -6px; /* hangs off the card edge like a real stamp */
  width: 64px;
  height: 64px;
  border: 2px dashed var(--stamp);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: var(--stamp);
  background: rgba(251, 247, 238, 0.88);
  transform: rotate(-8deg);
}
.avg-num { font-family: var(--serif); font-weight: 700; font-size: 1.35rem; line-height: 1; }
.avg-label { font-size: 0.56rem; text-transform: uppercase; letter-spacing: 0.13em; }

/* ratings */

.ratings {
  margin-top: 14px;
  border-top: 1px solid var(--line-soft);
  padding-top: 11px;
  display: grid;
  gap: 7px;
}
.rating-row { display: flex; align-items: center; gap: 8px; }
.member-name {
  width: 76px;
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
}
.dots { display: flex; gap: 4px; flex-wrap: nowrap; }
.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
}
.dot.full { background: var(--mc); border-color: var(--mc); }
.dot.half {
  background: linear-gradient(90deg, var(--mc) 50%, transparent 50%);
  border-color: var(--mc);
}
.score {
  margin-left: auto;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.95rem;
  min-width: 26px;
  text-align: right;
}
.rating-row.skipped .skip-note,
.skip-note { color: var(--ink-faint); font-style: italic; font-size: 0.88rem; }

/* ── stats ────────────────────────────────────────────────────── */

.section-note {
  text-align: center;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 26px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.stat-tile {
  background: var(--paper-lift);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px 15px 13px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 1px 6px rgba(70, 48, 20, 0.06);
}
.stat-kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--accent);
  font-weight: 700;
}
.stat-value {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.14rem;
  line-height: 1.25;
}
.stat-detail { font-size: 0.83rem; color: var(--ink-soft); }

/* chart */

.chart-card {
  margin-top: 14px;
  background: var(--paper-lift);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 14px 8px;
  box-shadow: 0 1px 6px rgba(70, 48, 20, 0.06);
}
.chart-card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.02rem;
  margin: 0 0 4px 4px;
}
#chart-box { position: relative; }
#chart-box svg { display: block; width: 100%; height: auto; }
.gridline { stroke: var(--line-soft); stroke-width: 1; }
.tick { fill: var(--ink-faint); font-size: 11px; font-family: var(--body); }
.trend { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.pt .hit { fill: transparent; cursor: pointer; }
.pt .mark {
  fill: var(--accent);
  stroke: var(--paper-lift);
  stroke-width: 2;
}
.pt:focus { outline: none; }
.pt:focus .mark, .pt:hover .mark { r: 6; }
.pt-label {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--body);
}
.chart-tip {
  position: absolute;
  transform: translate(-50%, calc(-100% - 14px));
  background: var(--ink);
  color: var(--paper);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 0.8rem;
  line-height: 1.35;
  pointer-events: none;
  white-space: nowrap;
  z-index: 2;
  box-shadow: 0 3px 10px rgba(40, 25, 8, 0.3);
}
.chart-tip strong { display: block; font-family: var(--serif); }

/* ── members ──────────────────────────────────────────────────── */

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.member-card {
  background: var(--paper-lift);
  border: 1px solid var(--line);
  border-top: 3px solid var(--mc);
  border-radius: 10px;
  padding: 15px 16px;
  box-shadow: 0 1px 6px rgba(70, 48, 20, 0.06);
}
.member-card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}
.member-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mc);
  flex-shrink: 0;
}
.member-card dl { display: grid; gap: 6px; }
.member-card dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.member-card dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  flex-shrink: 0;
}
.member-card dd { font-size: 0.9rem; text-align: right; }
.member-card .mini { color: var(--ink-faint); }

/* ── footer ───────────────────────────────────────────────────── */

footer {
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.83rem;
  font-style: italic;
  padding: 34px 20px 44px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

/* ── scroll reveal ────────────────────────────────────────────── */

html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
html.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── wider screens ────────────────────────────────────────────── */

@media (min-width: 700px) {
  .timeline { padding-left: 34px; }
  .month-marker::before { left: -34px; }
  .book-card { padding: 22px 22px 18px; }
  .book-main { padding-right: 78px; }
  .cover { width: 128px; }
  .book-title { font-size: 1.42rem; }
  .book-meta { font-size: 0.8rem; }
  .avg-stamp { width: 76px; height: 76px; right: 14px; top: -14px; }
  .avg-num { font-size: 1.5rem; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .member-name { width: 86px; }
  .dot { width: 12px; height: 12px; }
}

/* tiny phones: keep ten dots on one line */
@media (max-width: 359px) {
  .dot { width: 9px; height: 9px; }
  .dots { gap: 3px; }
  .member-name { width: 64px; }
}
