/* ==========================================================================
   Party Portions — "Butcher Paper" design system
   Kraft paper, charcoal ink, one tomato-red accent, condensed display
   numerals, tear-off shopping-list cards. Mobile-first, no frameworks.
   Light (kraft) is default; [data-theme="dark"] is the after-hours kitchen.
   ========================================================================== */

@font-face {
  font-family: "PPDisplay";
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("../fonts/display.woff2") format("woff2");
}

:root {
  --paper: #f3ead9;
  --paper-deep: #ebdfc6;
  --card: #fffdf6;
  --card-2: #fbf6ea;
  --ink: #2b251f;
  --ink-muted: #574f44;
  --ink-faint: #837a6b;
  --accent: #c8402c;
  --accent-deep: #a5321f;
  --accent-soft: rgba(200, 64, 44, 0.09);
  --line: rgba(43, 37, 31, 0.16);
  --line-soft: rgba(43, 37, 31, 0.09);
  --good: #3e7a4e;
  --shadow-card: 0 1px 2px rgba(43, 37, 31, 0.06), 0 12px 32px rgba(43, 37, 31, 0.10);
  --shadow-pop: 0 2px 4px rgba(43, 37, 31, 0.08), 0 20px 48px rgba(43, 37, 31, 0.16);
  --display: "PPDisplay", "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 74rem;
  --radius: 12px;
  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #211d18;
  --paper-deep: #1a1712;
  --card: #2c261f;
  --card-2: #332c24;
  --ink: #efe7d8;
  --ink-muted: #c2b7a4;
  --ink-faint: #948a79;
  --accent: #e2593f;
  --accent-deep: #c8402c;
  --accent-soft: rgba(226, 89, 63, 0.13);
  --line: rgba(239, 231, 216, 0.18);
  --line-soft: rgba(239, 231, 216, 0.09);
  --good: #7fc98f;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 2px 4px rgba(0, 0, 0, 0.35), 0 20px 48px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background:
    repeating-linear-gradient(96deg, transparent 0 22px, rgba(43, 37, 31, 0.014) 22px 23px),
    repeating-linear-gradient(4deg, transparent 0 34px, rgba(43, 37, 31, 0.012) 34px 35px),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.72;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img { max-width: 100%; height: auto; }
::selection { background: var(--accent); color: #fffdf6; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: 0.005em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); text-transform: uppercase; letter-spacing: 0.02em; }
h2, h3 { scroll-margin-top: 5.5rem; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin: 3rem 0 1rem; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.45rem); margin: 2rem 0 0.75rem; }
h4 { font-size: 1.08rem; margin: 1.5rem 0 0.5rem; }

p { margin: 0 0 1.15rem; }
p, li { color: var(--ink-muted); }
strong, b { color: var(--ink); }

a { color: var(--accent-deep); text-decoration: underline; text-decoration-color: rgba(200,64,44,.35); text-underline-offset: 3px; }
[data-theme="dark"] a { color: var(--accent); }
a:hover { text-decoration-color: currentColor; }

ul, ol { padding-left: 1.4rem; margin: 0 0 1.15rem; }
li { margin-bottom: 0.45rem; }

blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--ink);
}

.kicker {
  display: inline-block;
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 1.05rem;
  margin-bottom: 1.25rem;
}
[data-theme="dark"] .kicker { color: var(--accent); }

/* ---------- Layout ---------- */

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.wrap-narrow { max-width: 51rem; margin: 0 auto; padding: 0 1.25rem; }
main { display: block; }
.section { padding: 3rem 0; }

.divider {
  border: none; height: 1px; margin: 3.25rem auto; max-width: var(--maxw);
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: inset 0 3px 0 var(--accent);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.1rem;
}
.brand {
  display: flex; align-items: center; gap: 0.55rem;
  font-family: var(--display);
  font-size: 1.28rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand:hover { color: var(--accent-deep); }
.brand svg { flex: 0 0 auto; color: var(--ink); }

.site-nav { display: flex; align-items: center; gap: 1.3rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink-muted);
  font-size: 0.93rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent-deep); }
[data-theme="dark"] .site-nav a:hover, [data-theme="dark"] .site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav .nav-all {
  border: 1.5px solid var(--accent);
  color: var(--accent-deep);
  border-radius: 999px;
  padding: 0.32rem 0.95rem;
  font-weight: 600;
}
.site-nav .nav-all:hover { background: var(--accent); color: #fffdf6; }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }

#theme-toggle {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-muted);
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}
#theme-toggle:hover { color: var(--accent-deep); transform: rotate(15deg); }
#theme-toggle .icon-sun { display: none; }
#theme-toggle .icon-moon { display: block; }
[data-theme="dark"] #theme-toggle .icon-sun { display: block; }
[data-theme="dark"] #theme-toggle .icon-moon { display: none; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 10px;
  font-size: 1.15rem;
  cursor: pointer;
}

@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .brand { font-size: 1.05rem; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper);
    border-bottom: 2px solid var(--accent);
    padding: 0.5rem 1.25rem 1rem;
    box-shadow: var(--shadow-pop);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.7rem 0; width: 100%; border-bottom: 1px dashed var(--line-soft); }
  .site-nav .nav-all { border: none; padding: 0.7rem 0; border-radius: 0; }
  .site-nav .nav-all:hover { background: none; color: var(--accent-deep); }
}

/* ---------- Hero ---------- */

.hero { text-align: center; padding: 3.4rem 0 1.5rem; }
.hero h1 { margin-bottom: 0.9rem; }
.hero h1 em { font-style: normal; color: var(--accent-deep); }
[data-theme="dark"] .hero h1 em { color: var(--accent); }
.hero .lede {
  max-width: 46rem; margin: 0 auto 0.5rem;
  font-size: 1.16rem; color: var(--ink-muted);
}

/* ---------- Calculator card ---------- */

.calc-zone { padding: 0.5rem 0 0; }

.calc-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  padding: 1.75rem 1.35rem 2rem;
  max-width: 47rem;
  margin: 1.75rem auto 0;
  /* The form is built by calculator.js, so the card ships empty and would grow
     on load — shoving the accuracy strip, ad slot and article down the page
     (measured CLS 0.15, above Google's 0.1 threshold). Reserving each food's
     measured height keeps the layout still. Values are per-food because the
     control count differs; re-measure if a SPEC gains or loses a field. */
  min-height: var(--calc-h, 480px);
}
@media (min-width: 640px) { .calc-card { padding: 2.25rem 2.6rem 2.5rem; } }
/* Mobile stacks the three steppers, so every form grows ~1.55x */
@media (max-width: 599px) {
  .calc-card { min-height: calc(var(--calc-h, 480px) * 1.55); }
}
.calc-card[data-food="planner"]         { --calc-h: 850px; }
.calc-card[data-food="pulledPork"]      { --calc-h: 620px; }
.calc-card[data-food="wings"]           { --calc-h: 570px; }
.calc-card[data-food="brisket"]         { --calc-h: 560px; }
.calc-card[data-food="cookout"]         { --calc-h: 540px; }
.calc-card[data-food="meat"],
.calc-card[data-food="steak"],
.calc-card[data-food="rice"],
.calc-card[data-food="salmon"],
.calc-card[data-food="sides"],
.calc-card[data-food="chicken"],
.calc-card[data-food="beefTenderloin"]  { --calc-h: 510px; }
.calc-card[data-food="turkey"],
.calc-card[data-food="ham"],
.calc-card[data-food="primeRib"]        { --calc-h: 480px; }
.calc-card[data-food="coffee"],
.calc-card[data-food="cornedBeef"],
.calc-card[data-food="shrimp"],
.calc-card[data-food="dessertTable"],
.calc-card[data-food="sandwichPlatter"] { --calc-h: 470px; }
.calc-card[data-food="pizza"],
.calc-card[data-food="pasta"],
.calc-card[data-food="potatoes"],
.calc-card[data-food="charcuterie"]     { --calc-h: 440px; }
.calc-card[data-food="tacoBar"]         { --calc-h: 420px; }
.calc-card[data-food="crawfish"]        { --calc-h: 390px; }
.calc-card[data-food="weddingBar"]      { --calc-h: 360px; }
.calc-card > h2 { margin: 0 0 1.4rem; font-size: 1.5rem; text-align: center; text-transform: uppercase; letter-spacing: 0.05em; }
.calc-card > h2::after {
  content: ""; display: block; width: 56px; height: 3px;
  background: var(--accent); margin: 0.6rem auto 0; border-radius: 2px;
}

.calc-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; margin-bottom: 0.4rem; }
@media (min-width: 600px) {
  .calc-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .calc-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.field label, .field .flabel {
  display: block;
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.45rem;
  font-weight: 600;
}

.field select, .field input[type="number"], .field input[type="date"], .field input[type="time"], .field input[type="text"] {
  width: 100%;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 1.02rem;
  padding: 0.72rem 0.85rem;
  font-family: var(--sans);
  min-height: 44px;
}
.field select:focus, .field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Stepper: − [ 24 ] + */
.stepper { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card-2); }
.stepper button {
  width: 46px; min-height: 46px;
  background: none; border: none;
  font-size: 1.35rem; color: var(--accent-deep);
  cursor: pointer; font-family: var(--display);
}
[data-theme="dark"] .stepper button { color: var(--accent); }
.stepper button:hover { background: var(--accent-soft); }
.stepper input {
  flex: 1; width: 100%; min-width: 0;
  border: none; background: none; text-align: center;
  font-family: var(--display); font-size: 1.35rem; font-weight: 600;
  color: var(--ink); font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper input:focus { outline: none; }

/* Segmented control */
.seg { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card-2); }
.seg button {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 0.5rem 0.8rem;
  background: none; border: none;
  border-right: 1px solid var(--line-soft);
  font-family: var(--sans); font-size: 0.92rem; font-weight: 500;
  color: var(--ink-muted); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.seg button:last-child { border-right: none; }
.seg button[aria-pressed="true"] {
  background: var(--accent); color: #fffdf6; font-weight: 700;
}

/* Leftovers slider */
.slider-row { display: flex; align-items: center; gap: 0.9rem; }
.slider-row output {
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  color: var(--accent-deep); min-width: 7.5em; text-align: right;
}
[data-theme="dark"] .slider-row output { color: var(--accent); }
input[type="range"] {
  flex: 1; appearance: none; -webkit-appearance: none;
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent) var(--fill, 0%), var(--line) var(--fill, 0%));
  outline: none; cursor: pointer; min-height: 44px; background-clip: content-box;
  padding: 19px 0;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--card);
  box-shadow: 0 2px 6px rgba(43,37,31,0.35);
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--card);
  box-shadow: 0 2px 6px rgba(43,37,31,0.35);
}

.calc-note { text-align: center; font-size: 0.85rem; color: var(--ink-faint); margin: 1rem 0 0; }

/* Shown when a food deliberately ignores the kids/big-eater multipliers */
.guest-note {
  font-size: 0.84rem;
  color: var(--ink-faint);
  margin: -0.25rem 0 0.9rem;
  padding-left: 0.1rem;
  font-style: italic;
}

.accuracy-strip {
  max-width: 47rem;
  margin: 0.9rem auto 0;
  text-align: center;
  font-size: 0.84rem;
  color: var(--ink-faint);
  padding: 0 1.25rem;
}

/* ---------- Tear-off shopping list (the result) ---------- */

.list-card {
  position: relative;
  max-width: 47rem;
  margin: 1.9rem auto 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-pop);
  padding: 2rem 1.35rem 1.6rem;
}
@media (min-width: 640px) { .list-card { padding: 2.2rem 2.6rem 1.8rem; } }
/* perforated tear edge */
.list-card::before {
  content: "";
  position: absolute; top: -9px; left: 0; right: 0; height: 10px;
  background:
    linear-gradient(-45deg, transparent 33.3%, var(--card) 33.3%) 0 0 / 14px 20px repeat-x,
    linear-gradient(45deg, transparent 33.3%, var(--card) 33.3%) 0 0 / 14px 20px repeat-x;
  filter: drop-shadow(0 -1px 1px rgba(43,37,31,0.12));
}
.list-card[hidden] { display: none; }

.list-kicker {
  font-family: var(--display); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint);
  text-align: center; margin-bottom: 0.4rem;
}
.buy-line { text-align: center; margin: 0.2rem 0 0.4rem; }
.buy-line .num {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(3rem, 10vw, 4.6rem);
  line-height: 1; color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
[data-theme="dark"] .buy-line .num { color: var(--accent); }
.buy-line .unit {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.2rem, 3.5vw, 1.7rem);
  color: var(--ink); margin-left: 0.35rem;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.buy-line .buy-label { display: block; font-size: 0.95rem; color: var(--ink-muted); margin-top: 0.35rem; }

.serve-line {
  text-align: center; font-size: 0.98rem; color: var(--ink-muted);
  border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line);
  padding: 0.7rem 0; margin: 1.1rem 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.8rem;
}
.serve-line b { font-variant-numeric: tabular-nums; }

.pkg-hint {
  text-align: center; font-size: 0.95rem; color: var(--ink);
  background: var(--accent-soft);
  border: 1px dashed var(--accent);
  border-radius: 10px;
  padding: 0.65rem 1rem; margin: 0 0 1.2rem;
}

.list-rows { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.list-rows li { margin: 0; }
.list-rows label {
  display: flex; align-items: baseline; gap: 0.8rem;
  padding: 0.62rem 0.2rem;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 1rem; color: var(--ink);
  cursor: pointer;
}
.list-rows input[type="checkbox"] {
  width: 19px; height: 19px; accent-color: var(--accent);
  flex: 0 0 auto; transform: translateY(2px); cursor: pointer;
}
.list-rows .qty {
  margin-left: auto; font-family: var(--display); font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--accent-deep);
  white-space: nowrap; padding-left: 0.75rem;
}
[data-theme="dark"] .list-rows .qty { color: var(--accent); }
.list-rows label:has(input:checked) { opacity: 0.45; text-decoration: line-through; }

.list-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
  justify-content: space-between;
  padding-top: 0.4rem;
}
.verified-badge {
  display: inline-block;
  font-size: 0.8rem; font-weight: 600;
  color: var(--good); text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--good) 45%, transparent);
  border-radius: 999px; padding: 0.3rem 0.85rem;
}
.verified-badge:hover { background: color-mix(in srgb, var(--good) 12%, transparent); }
.list-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* Scheduler timeline */
.sched-card {
  max-width: 47rem; margin: 1.4rem auto 0;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem;
}
@media (min-width: 640px) { .sched-card { padding: 1.6rem 2.6rem; } }
.sched-card h3 { margin: 0 0 1rem; font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.06em; }
.sched-steps { list-style: none; padding: 0; margin: 0; position: relative; }
.sched-steps::before {
  content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px;
  width: 2px; background: var(--line);
}
.sched-steps li {
  position: relative; padding: 0 0 1.05rem 2.1rem; margin: 0;
  color: var(--ink-muted); font-size: 0.98rem;
}
.sched-steps li:last-child { padding-bottom: 0; }
.sched-steps li::before {
  content: ""; position: absolute; left: 3px; top: 7px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--accent);
}
.sched-steps b { color: var(--ink); }
.sched-steps .sched-date {
  font-family: var(--display); font-weight: 600; color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .sched-steps .sched-date { color: var(--accent); }
.sched-warn {
  margin-top: 1rem; font-size: 0.92rem;
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 0.75rem 1rem; color: var(--ink);
}

/* ---------- Buttons ---------- */

.btn-accent {
  display: block; width: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #fffdf6;
  font-weight: 700; font-size: 1.06rem;
  font-family: var(--display); letter-spacing: 0.08em; text-transform: uppercase;
  border: none; border-radius: 10px;
  padding: 0.95rem 1rem; min-height: 48px;
  cursor: pointer; margin-top: 0.9rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 20px rgba(200, 64, 44, 0.3);
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(200, 64, 44, 0.4); }
.btn-accent:active { transform: translateY(0); }

.btn-ghost {
  display: inline-block;
  background: none;
  border: 1.5px solid var(--line);
  color: var(--ink-muted);
  border-radius: 10px;
  padding: 0.55rem 1.15rem; min-height: 44px;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; font-family: var(--sans);
  text-decoration: none;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); }
[data-theme="dark"] .btn-ghost:hover { color: var(--accent); }

.calc-card.computing { animation: card-think 0.6s ease-in-out infinite; }
@keyframes card-think {
  0%, 100% { box-shadow: var(--shadow-pop); }
  50% { box-shadow: 0 2px 4px rgba(43,37,31,0.08), 0 20px 56px rgba(200, 64, 44, 0.28); }
}

/* ---------- Ad slots (reserved, empty at launch, zero CLS when filled) ---------- */

.ad-slot {
  display: grid; place-items: center;
  border: 1px dashed var(--line-soft);
  border-radius: 8px;
  color: var(--ink-faint);
  margin: 2rem auto;
  max-width: 47rem;
}
.ad-slot::after {
  content: "advertisement";
  font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase;
  opacity: 0.55;
}
.ad-slot-below-tool { min-height: 280px; }
.ad-slot-mid-article { min-height: 250px; }
.ad-slot-footer { min-height: 90px; margin-bottom: 0; }

/* ---------- Article / content ---------- */

.article { padding: 1rem 0 2rem; }
.article h2 { border-bottom: 2px solid var(--line-soft); padding-bottom: 0.55rem; }
.byline {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 1.2rem 0 1.8rem;
  font-size: 0.88rem; color: var(--ink-faint);
}
.byline .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent);
  display: grid; place-items: center;
  font-family: var(--display); font-size: 1.05rem;
  color: #fffdf6; font-weight: 700; flex: 0 0 auto;
  letter-spacing: 0.03em;
}
.byline b { color: var(--ink-muted); display: block; font-size: 0.95rem; }

.featured-img { margin: 0 0 2rem; }
.featured-img img {
  width: 100%; height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-card);
}

.callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 1.2rem 1.5rem;
  margin: 1.75rem 0;
  box-shadow: var(--shadow-card);
}
.callout p:last-child { margin-bottom: 0; }

table {
  width: 100%; border-collapse: collapse;
  margin: 1.5rem 0; font-size: 0.95rem;
  background: var(--card);
}
.table-scroll { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--line-soft); border-radius: 10px; }
.table-scroll table { margin: 0; min-width: 540px; }
th, td { text-align: left; padding: 0.68rem 0.9rem; border-bottom: 1px solid var(--line-soft); }
thead th {
  font-family: var(--display); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em; font-size: 0.82rem;
  color: #fffdf6; background: var(--ink);
  border-bottom: 2px solid var(--accent);
}
[data-theme="dark"] thead th { background: var(--paper-deep); color: var(--ink); }
tbody th[scope="row"] { font-weight: 600; color: var(--ink); background: var(--card-2); white-space: nowrap; }
td { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--accent-soft); }
.table-credit {
  font-size: 0.78rem; color: var(--ink-faint);
  text-align: right; margin: -0.9rem 0 1.75rem; font-style: italic;
}

/* ---------- Roundup list (Wave 3 guides) ---------- */

.roundup-item {
  border-left: 3px solid var(--line);
  padding: 0.1rem 0 0.1rem 1.25rem;
  margin: 0 0 1.75rem;
  transition: border-color 0.2s ease;
}
.roundup-item:hover { border-left-color: var(--accent); }
.roundup-item h3 { margin: 0 0 0.5rem; }
.roundup-item p:last-child { margin-bottom: 0; }
.qty-line {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem;
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  margin: 0.75rem 0 0 !important;
  font-size: 0.92rem; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.qty-line span {
  font-family: var(--display); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-deep);
}
[data-theme="dark"] .qty-line span { color: var(--accent); }

/* ---------- FAQ ---------- */

.faq details { border-bottom: 1px solid var(--line-soft); padding: 0.2rem 0; }
.faq summary {
  cursor: pointer;
  padding: 0.95rem 2rem 0.95rem 0;
  font-family: var(--display); font-size: 1.12rem; font-weight: 600;
  color: var(--ink);
  list-style: none; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 0.25rem; top: 50%;
  transform: translateY(-50%);
  color: var(--accent); font-size: 1.5rem; font-family: var(--sans); font-weight: 400;
}
.faq details[open] summary::after { content: "−"; }
.faq .faq-a { padding: 0 0 1.2rem; }
.faq .faq-a p:last-child { margin-bottom: 0; }

/* ---------- Hub / spoke cards ---------- */

.spoke-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin: 2rem 0;
}
@media (min-width: 640px) { .spoke-grid { grid-template-columns: repeat(3, 1fr); gap: 1.1rem; } }
@media (min-width: 980px) { .spoke-grid { grid-template-columns: repeat(4, 1fr); } }

.spoke-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.2rem 1.1rem 1.1rem;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-card);
}
.spoke-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.spoke-card .sc-icon { color: var(--accent-deep); margin-bottom: 0.5rem; }
[data-theme="dark"] .spoke-card .sc-icon { color: var(--accent); }
.spoke-card h3 {
  margin: 0 0 0.3rem; font-size: 1.02rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink);
}
.spoke-card p { margin: 0; font-size: 0.86rem; color: var(--ink-faint); line-height: 1.5; }

.breadcrumbs { font-size: 0.84rem; color: var(--ink-faint); padding: 1.2rem 1.25rem 0; }
.breadcrumbs a { color: var(--ink-faint); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-deep); }
.breadcrumbs span[aria-current] { color: var(--ink-muted); font-weight: 600; }

/* ---------- Related links ---------- */

.related {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.6rem 1.75rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-card);
}
.related h2 { margin: 0 0 0.9rem; font-size: 1.25rem; border: none; padding: 0; }
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { padding: 0.42rem 0; border-bottom: 1px dashed var(--line-soft); }
.related li:last-child { border: none; }
.related li::before { content: "→ "; color: var(--accent); font-weight: 700; }

/* ---------- Event presets (homepage) ---------- */

.preset-chips { display: flex; flex-wrap: wrap; gap: 0.55rem; justify-content: center; margin: 0 0 1.3rem; }
.preset-chips button {
  border: 1.5px solid var(--line);
  background: var(--card-2);
  border-radius: 999px;
  padding: 0.45rem 1.05rem; min-height: 44px;
  font-size: 0.9rem; font-weight: 600; color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.preset-chips button:hover, .preset-chips button[aria-pressed="true"] {
  border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft);
}

.menu-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 0.4rem 0 0.6rem; }
@media (min-width: 640px) { .menu-picker { grid-template-columns: repeat(3, 1fr); } }
.menu-picker label {
  display: flex; align-items: center; gap: 0.55rem;
  border: 1px solid var(--line-soft);
  background: var(--card-2);
  border-radius: 9px;
  padding: 0.55rem 0.7rem; min-height: 44px;
  font-size: 0.92rem; color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.menu-picker label:hover { border-color: var(--accent); }
.menu-picker label:has(input:checked) {
  border-color: var(--accent); background: var(--accent-soft);
  color: var(--ink); font-weight: 600;
}
.menu-picker input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); flex: 0 0 auto; }

/* ---------- Seasonal banner ---------- */

.season-banner {
  max-width: var(--maxw);
  margin: 1rem auto 0;
  padding: 0 1.25rem;
}
.season-banner .sb-inner {
  display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap;
  background: var(--accent-soft);
  border: 1px dashed var(--accent);
  border-radius: 10px;
  padding: 0.7rem 1.1rem;
  font-size: 0.94rem; color: var(--ink);
}
.season-banner b { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 3px solid var(--accent);
  margin-top: 4rem;
  padding: 3rem 0 2.5rem;
  background: var(--paper-deep);
}
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (min-width: 860px) { .footer-cols { grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr; } }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 860px) { .footer-brand { grid-column: auto; } }
.fb-name {
  font-family: var(--display); font-weight: 700; font-size: 1.25rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink);
  margin-bottom: 0.5rem;
}
.fb-verified { font-size: 0.82rem; }
/* Footer column headings are h2 (not h4) so the document outline never skips a
   level — they're just styled small. */
.site-footer h2 {
  font-family: var(--display); font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--accent-deep); margin: 0 0 0.9rem;
  border: none; padding: 0; line-height: 1.3;
}
[data-theme="dark"] .site-footer h2 { color: var(--accent); }
.site-footer p, .site-footer li { font-size: 0.88rem; color: var(--ink-faint); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: var(--ink-muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent-deep); text-decoration: underline; }
.footer-bottom {
  margin-top: 2.4rem; padding-top: 1.4rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.8rem; color: var(--ink-faint);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

/* ---------- Cookie banner ---------- */

#cookie-banner {
  position: fixed; bottom: 1rem; left: 50%;
  transform: translateX(-50%);
  width: min(44rem, calc(100vw - 2rem));
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  padding: 1.2rem 1.5rem;
  z-index: 100;
}
#cookie-banner p { font-size: 0.9rem; margin: 0 0 0.9rem; color: var(--ink-muted); }
#cookie-banner .cb-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
#cookie-banner .cb-btn { width: auto; padding: 0.55rem 1.4rem; font-size: 0.9rem; margin: 0; min-height: 44px; }

/* ---------- Reading progress + scroll top ---------- */

#read-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  z-index: 60;
}

#scroll-top {
  position: fixed; right: 1.15rem; bottom: 1.15rem;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card);
  border: 1.5px solid var(--accent);
  color: var(--accent-deep);
  cursor: pointer; z-index: 90;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  box-shadow: var(--shadow-pop);
}
[data-theme="dark"] #scroll-top { color: var(--accent); }
#scroll-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
#scroll-top:hover { transform: translateY(-2px); background: var(--accent); color: #fffdf6; }
#scroll-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- TOC ---------- */

.toc {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 0.5rem 1.25rem;
  margin: 1.75rem 0;
}
.toc summary {
  cursor: pointer;
  font-family: var(--display); font-size: 1rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink); padding: 0.5rem 0; list-style: none;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::before { content: "☰ "; color: var(--accent); font-size: 0.9rem; }
.toc ol { margin: 0.25rem 0 0.75rem; padding-left: 1.4rem; }
.toc li { margin-bottom: 0.35rem; font-size: 0.92rem; }
.toc a { color: var(--ink-muted); text-decoration: none; }
.toc a:hover { color: var(--accent-deep); text-decoration: underline; }

/* ---------- Inline CTA ---------- */

.cta-inline {
  display: flex; align-items: center; gap: 1.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin: 2rem 0; flex-wrap: wrap;
  box-shadow: var(--shadow-card);
}
.cta-inline p { margin: 0; flex: 1 1 16rem; font-size: 0.95rem; color: var(--ink-muted); }
.cta-inline p strong { color: var(--ink); }
.cta-inline a.btn-accent { display: inline-block; width: auto; padding: 0.65rem 1.3rem; font-size: 0.92rem; margin: 0; text-decoration: none; }

/* ---------- Unit toggle ---------- */

.unit-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.unit-toggle button {
  background: var(--card-2); border: none; padding: 0.5rem 1.1rem; min-height: 44px;
  font-size: 0.82rem; font-weight: 700; color: var(--ink-faint); cursor: pointer;
}
.unit-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* Print letterhead lives in the DOM but only shows on paper (see print.css) */
.pdf-brand { display: none; }

/* ---------- Motion & a11y ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
