:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --card: rgba(255, 255, 255, 0.06);
  --card-hover: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-dark: #082f49;
  --ember: #fb923c;
  --ember-glow: rgba(251, 146, 60, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, var(--ember-glow), transparent 60%),
    radial-gradient(ellipse 900px 600px at 100% 0%, rgba(56, 189, 248, 0.18), transparent 55%),
    linear-gradient(160deg, var(--bg), var(--bg-alt) 60%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Plain body text (paragraphs, headings, lists) stays a comfortable reading
   width even though .wrap is wide -- cards, charts, and grids (shortcode
   output sits inline among these same elements) are untouched by this rule
   and use the full container, so the page doesn't feel narrow/empty. */
article p,
article ul,
article ol,
article blockquote,
article h2,
article h3 {
  max-width: 70ch;
}

header.site {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}
header.site .brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.meat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  overflow-x: auto;
}
.meat-tabs a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.meat-tabs a:hover {
  color: var(--text);
  text-decoration: none;
  border-color: var(--border);
}
.meat-tabs a.active {
  color: var(--ember);
  background: rgba(251, 146, 60, 0.12);
  border-color: rgba(251, 146, 60, 0.35);
}

main { padding: 2.5rem 0 4rem; }

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 2rem; margin-bottom: 0.25rem; }

.post-meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.5rem; }
.post-meta .pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.8rem;
  margin-right: 0.4rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}
.stat-grid .stat { text-align: center; }
.stat .value { font-size: 1.4rem; font-weight: 700; color: var(--accent); }
.stat .label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }

.prep-notes { color: var(--muted); margin: 1rem 0 0; font-size: 0.95rem; }

.rating-row { display: flex; align-items: center; gap: 0.75rem; margin: 0.5rem 0; }
.rating-row .label { width: 120px; flex-shrink: 0; color: var(--muted); font-size: 0.9rem; }
.rating-row .bar-bg { flex: 1; display: block; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.rating-row .bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.rating-row .score { width: 2.5rem; text-align: right; color: var(--text); font-weight: 600; }

.chart-card { padding: 1rem 1rem 1.5rem; overflow-x: auto; }
.chart-card .u-legend { font-size: 0.8rem; color: var(--muted); }
/* Fixed-width, tabular-figure values so hover readings don't reflow the
   legend and shift every series marker/label sideways as digit count changes. */
.chart-card .u-legend .u-value {
  display: inline-block;
  min-width: 4.5em;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

.chart-actions { display: flex; justify-content: flex-end; margin: -0.5rem 0 0.5rem; }
.chart-actions button {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.chart-actions button:hover { color: var(--text); border-color: var(--accent); }
.chart-hint { color: var(--muted); font-size: 0.78rem; margin: 0.5rem 0 0; }

details.advanced { margin: 1.5rem 0; }
details.advanced summary { cursor: pointer; color: var(--accent); font-weight: 600; }

.cook-list { list-style: none; padding: 0; margin: 0; }
.cook-list li {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  background: var(--card);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.cook-list li:hover {
  background: var(--card-hover);
  border-color: rgba(251, 146, 60, 0.35);
  transform: translateY(-2px);
}
.cook-list h2 { margin: 0 0 0.25rem; font-size: 1.25rem; }
.cook-list h2 a { color: var(--text); }
.cook-list h2 a:hover { color: var(--ember); text-decoration: none; }
.cook-list .summary { color: var(--muted); margin: 0.4rem 0 0; }

.meat-tags a {
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.meat-tags a:hover {
  color: var(--ember);
  border-color: var(--ember);
  text-decoration: none;
}

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

.hero {
  text-align: center;
  padding: 3.5rem 0 2.5rem;
}
.hero .hero-icon {
  width: 130px;
  height: auto;
  margin: 0 auto 0.75rem;
  display: block;
}
.hero h1 {
  font-size: 2.75rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text), var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { color: var(--muted); max-width: 46ch; margin: 0.75rem auto 0; font-size: 1.05rem; }

.section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 2.5rem 0 1rem;
}
.section-title:first-child { margin-top: 0; }

.featured {
  border: 1px solid rgba(251, 146, 60, 0.3);
  border-radius: 18px;
  padding: 2rem;
  background:
    linear-gradient(160deg, rgba(251, 146, 60, 0.08), rgba(56, 189, 248, 0.05)),
    var(--card);
  box-shadow: 0 20px 60px -20px rgba(251, 146, 60, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.featured:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 70px -18px rgba(251, 146, 60, 0.35);
}
.featured .eyebrow {
  color: var(--ember);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.featured h2 { font-size: 1.6rem; margin: 0 0 0.5rem; }
.featured h2 a { color: var(--text); }
.featured h2 a:hover { color: var(--ember); text-decoration: none; }
.featured .summary { color: var(--muted); margin: 0.5rem 0 1.25rem; max-width: 60ch; }
.featured .stat-grid { margin-top: 0; }

.meat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.9rem;
}
.meat-grid a {
  display: block;
  text-align: center;
  padding: 1.25rem 0.75rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.meat-grid a:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 146, 60, 0.4);
  background: var(--card-hover);
  text-decoration: none;
}
.meat-grid .name {
  font-weight: 700;
  font-size: 1.05rem;
}
.meat-grid .count {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 3rem 1.5rem;
  border: 1px dashed var(--border);
  border-radius: 14px;
}
