:root {
  --cream-50:  #FBF4F6;
  --cream-100: #F6EAEE;
  --cream-200: #ECD6DE;
  --beet-100:  #E8A9C0;
  --beet-300:  #C7497A;
  --beet-500:  #A8204E;
  --beet-700:  #7B1535;
  --beet-900:  #4A0C20;
  --leaf:      #4A7C3A;
  --leaf-dark: #2F4D24;
  --gold:      #E0A82E;
  --soil:      #3D2B1F;
  --muted:     #8A6072;
  --shadow-sm: 0 1px 2px rgba(74, 12, 32, 0.05), 0 2px 8px rgba(74, 12, 32, 0.05);
  --shadow:    0 1px 3px rgba(74, 12, 32, 0.07), 0 8px 24px rgba(74, 12, 32, 0.08);
  --radius:    16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background:
    radial-gradient(ellipse at top, #FFE3EE 0%, transparent 70%),
    linear-gradient(180deg, var(--cream-50) 0%, var(--cream-100) 100%);
  background-attachment: fixed;
  color: var(--soil);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main { max-width: 1100px; margin: 0 auto; padding: 0 24px 40px; }

/* Update banner */
.update-banner {
  display: flex; align-items: center; gap: 10px;
  max-width: 1100px; margin: 16px auto 0; padding: 10px 18px;
  background: var(--cream-200); border-radius: 999px;
  font-size: 0.86rem; color: var(--beet-700); width: fit-content;
}
.update-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--leaf);
  box-shadow: 0 0 0 0 rgba(74,124,58,0.5); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74,124,58,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(74,124,58,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,124,58,0); }
}
.banner-drift { color: var(--muted); font-style: italic; }
.banner-update-link {
  background: none; border: none; color: var(--beet-500);
  font-weight: 600; cursor: pointer; font-size: 0.86rem;
}
.banner-update-link:hover { text-decoration: underline; }

/* Header */
.masthead { text-align: center; padding: 40px 24px 24px; max-width: 1100px; margin: 0 auto; }
.logo { width: 64px; height: 64px; margin-bottom: 4px; filter: drop-shadow(0 4px 8px rgba(168,32,78,0.25)); }
.masthead h1 {
  font-family: 'Fraunces', Georgia, serif; font-weight: 900;
  font-size: clamp(2.4rem, 5.5vw, 4rem); letter-spacing: -0.03em;
  line-height: 1.05; margin: 8px 0 10px;
  background: linear-gradient(135deg, var(--beet-500), var(--beet-700));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.masthead .kicker { font-size: 1.05rem; color: var(--muted); margin: 0; }
/* Sister-site cross-link (→ One Million Beers) */
.logo-row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.logo-row .logo { margin-bottom: 0; }
.sister-link {
  display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
  text-decoration: none; opacity: 0.85; transition: transform 0.14s ease, opacity 0.14s ease;
}
.sister-link:hover { transform: translateY(-2px) rotate(4deg); opacity: 1; }
.sister-icon { width: 38px; height: 38px; filter: drop-shadow(0 2px 4px rgba(122,74,26,0.25)); }
.sister-tag { font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold); }
.howto-btn {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 7px;
  background: white; border: 1px solid var(--cream-200); color: var(--beet-700);
  padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 0.88rem;
  cursor: pointer; box-shadow: var(--shadow-sm); transition: transform 0.1s;
}
.howto-btn:hover { transform: translateY(-1px); }

/* Card primitive */
.card {
  background: white; border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); border: 1px solid rgba(168,32,78,0.06); margin-bottom: 24px;
}
.card h2 {
  font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 1.65rem;
  letter-spacing: -0.02em; margin: 0 0 6px; color: var(--beet-900);
}
.muted { color: var(--muted); margin: 0 0 22px; font-size: 0.95rem; }

/* Hero */
.hero {
  text-align: center; padding: 48px 28px 36px;
  background: radial-gradient(ellipse at center top, #FFD9E8 0%, white 60%), white;
  border: 1px solid rgba(168,32,78,0.18);
}
.hero-label {
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted);
  font-size: 0.78rem; font-weight: 700; margin: 0 0 12px;
}
.hero-counter { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; }
.counter {
  font-family: 'Fraunces', Georgia, serif; font-weight: 900;
  font-size: clamp(3.6rem, 11vw, 7.5rem); letter-spacing: -0.045em;
  color: var(--beet-500); font-variant-numeric: tabular-nums;
}
.counter-of { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: clamp(1.2rem, 3vw, 2rem); color: var(--muted); }
.progress-track { height: 14px; background: var(--cream-200); border-radius: 999px; overflow: hidden; margin: 22px auto 10px; max-width: 640px; }
.progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--beet-300), var(--beet-500), var(--gold));
  border-radius: 999px; transition: width 1.4s cubic-bezier(0.22,1,0.36,1);
}
.progress-pct { color: var(--beet-700); font-weight: 700; margin: 0 0 18px; }
.pull-btn {
  background: linear-gradient(135deg, var(--beet-500), var(--beet-700)); color: white;
  border: none; padding: 12px 26px; border-radius: 999px; font-size: 1rem; font-weight: 700;
  cursor: pointer; box-shadow: 0 6px 16px rgba(168,32,78,0.3); transition: transform 0.08s;
  display: inline-flex; align-items: center; gap: 8px;
}
.pull-btn:active { transform: scale(0.94) rotate(-3deg); }
.pull-quip { color: var(--muted); margin: 12px 0 0; min-height: 1.2em; font-style: italic; }

/* Grid */
.grid { display: grid; gap: 24px; }
.stats-grid { grid-template-columns: repeat(4, 1fr); }
.two-col { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .stats-grid { grid-template-columns: repeat(2,1fr); } .two-col { grid-template-columns: 1fr; } }

.stat-card { text-align: center; padding: 22px; }
.stat-label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; font-weight: 700; color: var(--muted); margin: 0 0 8px; }
.stat-value { font-family: 'Fraunces', Georgia, serif; font-weight: 900; font-size: 2.2rem; color: var(--beet-700); margin: 0 0 6px; }
.stat-foot { font-size: 0.8rem; color: var(--muted); margin: 0; }

/* Fake bar chart */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 10px; }
.bars .bar { flex: 1; background: linear-gradient(180deg, var(--beet-300), var(--beet-500)); border-radius: 6px 6px 0 0; min-height: 4px; transition: height 1s cubic-bezier(0.22,1,0.36,1); }

/* Leaderboards */
.lb { list-style: none; margin: 0; padding: 0; }
.lb li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--cream-100); }
.lb li:last-child { border-bottom: none; }
.lb-rank { font-family: 'Fraunces', serif; font-weight: 900; color: var(--beet-300); width: 28px; font-size: 1.1rem; }
.lb-name { flex: 1; font-weight: 600; }
.lb-sub { color: var(--muted); font-size: 0.82rem; font-weight: 400; }
.lb-count { font-family: 'Fraunces', serif; font-weight: 700; color: var(--beet-700); }

/* Borscht */
.borscht { text-align: center; }
.borscht-gauge { height: 28px; background: var(--cream-200); border-radius: 999px; overflow: hidden; max-width: 560px; margin: 0 auto 14px; }
.borscht-fill { height: 100%; width: 0; background: linear-gradient(90deg, #C7497A, #7B1535); border-radius: 999px; transition: width 1.8s ease; }
.borscht-read { font-family: 'Fraunces', serif; font-weight: 900; font-size: 2rem; color: var(--beet-500); margin: 0 0 6px; }
.borscht-note { margin: 0; }

/* Facts */
.facts { display: grid; gap: 14px; }
.fact { display: flex; gap: 12px; align-items: flex-start; }
.fact-mark { color: var(--beet-300); font-family: 'Fraunces', serif; font-weight: 900; font-size: 1.3rem; line-height: 1; }
.fact p { margin: 0; }

/* Heatmap */
.heatmap { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.heatmap .cell { aspect-ratio: 1; border-radius: 3px; background: var(--beet-100); }

/* Footer */
.footer { text-align: center; padding: 32px 24px 64px; color: var(--muted); font-size: 0.9rem; }
.footer p { margin: 4px 0; }
.footer a { color: var(--beet-500); font-weight: 600; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-fine { font-size: 0.78rem; opacity: 0.8; }

/* Origin note — the whole "beet is a typo of beer" premise */
.origin-note {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #FFF4DE 0%, #FBE9D2 100%);
  border: 1px dashed #D99A3C; border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 24px;
}
.origin-icon { width: 52px; height: 52px; flex: 0 0 auto; }
.origin-note p { margin: 0; font-size: 0.98rem; color: #6B4A1E; line-height: 1.55; }
.origin-note strong { color: var(--beet-700); }
.origin-note a { color: var(--beet-500); font-weight: 700; text-decoration: none; white-space: nowrap; }
.origin-note a:hover { text-decoration: underline; }

/* Live bar on the "through thyme" chart */
.bars .bar.live { background: linear-gradient(180deg, var(--gold), #C98A1E); box-shadow: 0 0 0 2px rgba(224,168,46,0.25); }

/* ETA projections */
.eta-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 760px) { .eta-grid { grid-template-columns: repeat(2, 1fr); } }
.eta-cell { background: var(--cream-50); border: 1px solid var(--cream-200); border-radius: 12px; padding: 16px; text-align: center; }
.eta-label { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.66rem; font-weight: 700; color: var(--muted); margin: 0 0 8px; }
.eta-big { font-family: 'Fraunces', serif; font-weight: 900; font-size: 1.9rem; color: var(--beet-500); margin: 0 0 6px; }
.eta-sub { font-size: 0.78rem; color: var(--muted); margin: 0; }

/* Personal harvest */
.harvest { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.harvest-main { text-align: center; }
.harvest-num { font-family: 'Fraunces', serif; font-weight: 900; font-size: 3.4rem; color: var(--beet-500); margin: 0; line-height: 1; font-variant-numeric: tabular-nums; }
.harvest-label { font-size: 0.8rem; color: var(--muted); margin: 6px 0 0; }
.harvest-meta { display: flex; gap: 22px; flex: 1; flex-wrap: wrap; }
.harvest-meta > div { display: flex; flex-direction: column; }
.harvest-meta span { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.4rem; color: var(--beet-700); }
.harvest-meta small { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.badge { font-size: 0.7rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: var(--cream-200); color: var(--muted); border: 1px solid transparent; }
.badge.got { background: linear-gradient(135deg, var(--beet-300), var(--beet-500)); color: white; }
.harvest-foot { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.ghost-btn { background: none; border: 1px solid var(--cream-200); color: var(--muted); padding: 9px 16px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.ghost-btn:hover { color: var(--beet-500); border-color: var(--beet-300); }
.harvest-note { margin: 14px 0 0; font-style: italic; }

/* Milestones */
.milestones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .milestones { grid-template-columns: 1fr; } }
.ms { background: var(--cream-50); border: 1px solid var(--cream-200); border-radius: 12px; padding: 16px; }
.ms-n { font-family: 'Fraunces', serif; font-weight: 900; font-size: 1.5rem; color: var(--beet-300); margin: 0; }
.ms-who { font-weight: 700; margin: 4px 0 4px; }
.ms-note { font-size: 0.82rem; color: var(--muted); margin: 0; }

/* Farmer of the Week */
.fotw-champ { display: flex; align-items: center; gap: 14px; background: radial-gradient(ellipse at left, #FFD9E8 0%, var(--cream-50) 80%); border: 1px solid rgba(168,32,78,0.18); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.crown { font-size: 1.6rem; color: var(--gold); }
.fotw-name { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.2rem; margin: 0; }
.fotw-sub { font-size: 0.8rem; color: var(--muted); margin: 2px 0 0; }
.fotw-num { margin-left: auto; font-family: 'Fraunces', serif; font-weight: 900; font-size: 1.8rem; color: var(--beet-500); }
.fotw-board { font-size: 0.95rem; }

/* Rivalries */
.rivalry { margin-bottom: 18px; }
.rivalry:last-child { margin-bottom: 0; }
.rivalry-row { display: flex; justify-content: space-between; font-weight: 600; font-size: 0.9rem; }
.rivalry-bar { height: 12px; background: var(--gold); border-radius: 999px; overflow: hidden; margin: 6px 0; }
.rivalry-a { height: 100%; background: linear-gradient(90deg, var(--beet-500), var(--beet-300)); }
.rivalry-nums { color: var(--beet-700); font-family: 'Fraunces', serif; }
.rivalry-note { font-family: 'Inter', sans-serif; font-weight: 400; font-size: 0.74rem; color: var(--muted); align-self: center; text-align: center; flex: 1; padding: 0 8px; }

/* Typo Desk */
.typos { list-style: none; margin: 0; padding: 0; }
.typo { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--cream-100); flex-wrap: wrap; }
.typo:last-child { border-bottom: none; }
.typo-typed { font-family: 'Fraunces', serif; font-weight: 700; color: var(--beet-700); background: var(--cream-100); padding: 3px 9px; border-radius: 7px; white-space: nowrap; }
.typo-ruling { flex: 1; min-width: 200px; font-size: 0.92rem; }
.typo-verdict { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.v-counts { background: #E3F0DA; color: #3F6B2E; }
.v-fixed { background: #FBEFD2; color: #8A6516; }
.v-purged { background: #F3DDE4; color: var(--beet-700); }
.v-nope { background: #EFE0E5; color: #8A6072; }
.typo-foot { margin: 18px 0 0; font-style: italic; }

/* Fun facts share .facts / .fact styles */

/* Overlay */
.overlay { position: fixed; inset: 0; background: rgba(74,12,32,0.5); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 50; backdrop-filter: blur(3px); }
.overlay[hidden] { display: none; }
.overlay-card { background: white; border-radius: var(--radius); padding: 32px; max-width: 460px; width: 100%; box-shadow: var(--shadow); position: relative; }
.overlay-close { position: absolute; top: 14px; right: 18px; background: none; border: none; font-size: 1.6rem; color: var(--muted); cursor: pointer; line-height: 1; }
.steps { padding-left: 20px; }
.steps li { margin: 8px 0; }
