/* ==========================================================================
   Mad Batter Cakes — styles.css
   Design language: "The tea-time tin."
   Shortbread cream ground, bottle-green ink, jam-orange CTA, pistachio highlight.
   Fraunces (headings) + DM Sans (body).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Colour system — CSS custom properties (light default, dark override)
   Two-role tokens are split (bug #1): tokens that sit on always-dark bands
   (--cream, --accent-dark, --on-brand, --ink-fixed) are FIXED and do not flip.
   -------------------------------------------------------------------------- */
:root {
  --ground:      #FAF3E6; /* page background */
  --surface:     #FFFFFF; /* card fill */
  --ink:         #1F2F2A; /* body text */
  --muted:       #4F5E57; /* secondary text */
  --brand:       #B5461F; /* CTA fill */
  --brand-text:  #B5461F; /* accent text / ticks / links on normal surfaces */
  --accent-dark: #F6C3A8; /* accent text on always-dark bands — FIXED */
  --pistachio:   #CFE3B5; /* highlight fill — dark text on it, never white */
  --ink-fixed:   #1F2F2A; /* dark text on pistachio — FIXED */
  --on-brand:    #FFFFFF; /* text on brand fills — FIXED */
  --cream:       #F4EBDD; /* text on always-dark bands — FIXED */
  --band:        #1F2F2A; /* always-dark header/hero/footer/CTA/treat panel */

  --border:      #E4D9C4; /* visible card border in light (bug #16) */
  --border-dark: #35463F; /* surface border in dark (bug: surface >=1.2:1) */

  --radius:      14px;
  --radius-sm:   10px;
  --maxw:        1120px;
  --gap:         clamp(1rem, 2.5vw, 1.75rem);

  --font-head: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --shadow: 0 1px 2px rgba(31, 47, 42, 0.06), 0 6px 24px rgba(31, 47, 42, 0.06);
}

html[data-theme="dark"] {
  --ground:   #17211E;
  --surface:  #22302B;
  --ink:      #F4EBDD;
  --muted:    #C3CFC7;
  --brand:    #B5461F;      /* identical in dark (bug #7: white >=4.5:1 — #B5461F vs #FFF ~4.7:1) */
  --brand-text: #F2A98A;    /* lighter accent for links/ticks on normal dark surfaces */
  --band:     #0E1513;      /* even deeper on dark */
  --border:   #35463F;
}

/* --------------------------------------------------------------------------
   2. Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere; /* bug #3: no overflow from long text */
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-text); text-underline-offset: 2px; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: var(--on-brand);
  padding: 0.6rem 1rem;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   3. Layout helpers
   bug #4: never use `padding: X 0` on an element that is also `.container`.
   `.container` controls horizontal gutter only. Vertical rhythm = `.section`.
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--tight { padding-block: clamp(1.75rem, 4vw, 2.75rem); }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--brand-text);
  margin: 0 0 0.5rem;
}

.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

.muted { color: var(--muted); }

.center { text-align: center; }
.center .lede, .center .eyebrow { margin-inline: auto; }

.stack > * + * { margin-top: 1rem; }

/* gingham-stitch divider motif */
.stitch {
  height: 6px;
  border: 0;
  margin: 0;
  background-image: repeating-linear-gradient(
    90deg,
    var(--brand) 0, var(--brand) 8px,
    transparent 8px, transparent 16px
  );
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   4. Buttons
   bug #10 / #6: anchors used as buttons; dark-band link rules must NOT
   override button text (handled in the dark-band section with explicit
   a.btn--* exceptions).
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.1;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.btn--primary:hover { background: #9c3a18; border-color: #9c3a18; color: var(--on-brand); }

.btn--ghost {
  background: transparent;
  color: var(--brand-text);
  border-color: var(--brand-text);
}
.btn--ghost:hover { background: rgba(181, 70, 31, 0.08); color: var(--brand-text); }

.btn--pistachio { background: var(--pistachio); color: var(--ink-fixed); border-color: var(--pistachio); }
.btn--pistachio:hover { background: #bcd69c; border-color: #bcd69c; color: var(--ink-fixed); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* --------------------------------------------------------------------------
   5. Header / nav
   Always-dark band. bug #3: hide header CTA <=480px, brand name wraps,
   nav own row <=700px.
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--band);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 66px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--cream);
  text-decoration: none;
  margin-right: auto;
  overflow-wrap: anywhere; /* brand name wraps (bug #3) */
}
.brand:hover { text-decoration: none; }
.brand .brand__dot { color: var(--accent-dark); }

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.nav a {
  color: var(--cream);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
}
.nav a:hover { background: rgba(255, 255, 255, 0.08); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent-dark); }

.header-cta { margin-left: 0.25rem; }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: var(--cream);
  cursor: pointer;
}
.theme-toggle:hover { background: rgba(255, 255, 255, 0.1); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }

/* --------------------------------------------------------------------------
   6. Hero (always-dark band)
   -------------------------------------------------------------------------- */
.hero { background: var(--band); color: var(--cream); overflow: hidden; }
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.hero__copy { min-width: 0; }
.hero h1 { color: var(--cream); }
.hero .lede { color: var(--cream); opacity: 0.92; }
.hero__media { min-width: 0; }
.hero__media img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  box-shadow: var(--shadow);
}
.img-note {
  font-size: 0.78rem;
  margin-top: 0.5rem;
  color: var(--cream);
  opacity: 0.75;
}

/* --------------------------------------------------------------------------
   7. Proof strip
   -------------------------------------------------------------------------- */
.proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: center;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.proof li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}
.proof .stat { font-family: var(--font-head); font-weight: 600; color: var(--brand-text); }
.proof .proof-src { color: var(--muted); font-size: 0.85rem; }

/* --------------------------------------------------------------------------
   8. Cards / grids  (bug #16: light cards rely on visible border)
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.grid > * { min-width: 0; } /* bug #3 */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--ground); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.4rem; }
.card__body h3 { margin: 0; }
.card__body p { margin: 0; color: var(--muted); }

/* note chip — bug #17: dark-enough text on tint for >=4.5:1 in light */
.note-chip {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--pistachio);
  color: var(--ink-fixed);
}

/* [NEEDS CONTENT] marker */
.needs-content {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  border: 1px dashed var(--brand-text);
  color: var(--brand-text);
  background: transparent;
}

/* --------------------------------------------------------------------------
   9. Pistachio band (bug #8: ghost buttons inside use --ink-fixed)
   -------------------------------------------------------------------------- */
.band-pistachio { background: var(--pistachio); color: var(--ink-fixed); }
.band-pistachio h1, .band-pistachio h2, .band-pistachio h3, .band-pistachio p { color: var(--ink-fixed); }
.band-pistachio .eyebrow { color: var(--ink-fixed); }
.band-pistachio .btn--ghost {
  color: var(--ink-fixed);
  border-color: var(--ink-fixed);
}
.band-pistachio .btn--ghost:hover { background: rgba(31, 47, 42, 0.1); color: var(--ink-fixed); }

/* --------------------------------------------------------------------------
   10. ALWAYS-DARK BANDS — explicit light-on-dark overrides (bug #1)
   Applies to .hero, .band, .site-header, .site-footer, .footer-bottom,
   and the Treat table panel (.order-message). Covers h1-h4, p, li, a,
   .muted, chips, ghost buttons, dl.nap dt/dd, stats, notes, img-note,
   eyebrow, and demo-note.
   -------------------------------------------------------------------------- */
.hero, .band, .site-header, .site-footer, .footer-bottom, .order-message {
  color: var(--cream);
}
.hero h1, .hero h2, .hero h3, .hero h4,
.band h1, .band h2, .band h3, .band h4,
.site-footer h1, .site-footer h2, .site-footer h3, .site-footer h4,
.order-message h1, .order-message h2, .order-message h3, .order-message h4 {
  color: var(--cream);
}
.hero p, .hero li,
.band p, .band li,
.site-footer p, .site-footer li,
.footer-bottom p,
.order-message p, .order-message li {
  color: var(--cream);
}
.hero .muted, .band .muted, .site-footer .muted, .order-message .muted {
  color: var(--cream);
  opacity: 0.78;
}
/* accent text on dark bands must use the FIXED --accent-dark, never --brand-text */
.hero .eyebrow, .band .eyebrow, .site-footer .eyebrow, .order-message .eyebrow,
.hero .stat, .band .stat, .site-footer .stat, .order-message .stat,
.hero .proof-src, .band .proof-src {
  color: var(--accent-dark);
}
/* plain links on dark bands (not buttons) */
.hero a:not(.btn), .band a:not(.btn),
.site-footer a:not(.btn), .footer-bottom a:not(.btn),
.order-message a:not(.btn) {
  color: var(--accent-dark);
}
.hero a:not(.btn):hover, .band a:not(.btn):hover,
.site-footer a:not(.btn):hover, .footer-bottom a:not(.btn):hover,
.order-message a:not(.btn):hover { color: var(--accent-dark); }

/* dl.nap on dark bands (bug #1 explicitly) */
.site-footer dl.nap dt, .band dl.nap dt { color: var(--accent-dark); font-weight: 700; }
.site-footer dl.nap dd, .band dl.nap dd { color: var(--cream); }

/* img-note on dark */
.hero .img-note, .band .img-note { color: var(--cream); opacity: 0.75; }

/* chips on dark bands */
.band .note-chip, .order-message .note-chip,
.hero .note-chip {
  background: rgba(246, 195, 168, 0.18);
  color: var(--accent-dark);
}

/* bug #6: dark-band link colour rules must NOT override button text,
   including :hover. Re-assert button colours after the a:not(.btn) rules. */
.hero a.btn--primary, .band a.btn--primary,
.site-header a.btn--primary, .site-footer a.btn--primary,
.order-message a.btn--primary {
  color: var(--on-brand);
  border-color: var(--brand);
}
.hero a.btn--primary:hover, .band a.btn--primary:hover,
.site-header a.btn--primary:hover, .site-footer a.btn--primary:hover,
.order-message a.btn--primary:hover { color: var(--on-brand); }

/* ghost buttons on dark bands — both a.btn--ghost and button.btn--ghost,
   including :hover (bug #1 + #6) */
.hero a.btn--ghost, .hero button.btn--ghost,
.band a.btn--ghost, .band button.btn--ghost,
.site-header a.btn--ghost, .site-header button.btn--ghost,
.site-footer a.btn--ghost, .site-footer button.btn--ghost,
.order-message a.btn--ghost, .order-message button.btn--ghost {
  color: var(--cream);
  border-color: rgba(244, 235, 221, 0.5);
  background: transparent;
}
.hero a.btn--ghost:hover, .hero button.btn--ghost:hover,
.band a.btn--ghost:hover, .band button.btn--ghost:hover,
.site-header a.btn--ghost:hover, .site-header button.btn--ghost:hover,
.site-footer a.btn--ghost:hover, .site-footer button.btn--ghost:hover,
.order-message a.btn--ghost:hover, .order-message button.btn--ghost:hover {
  color: var(--cream);
  border-color: var(--cream);
  background: rgba(244, 235, 221, 0.12);
}
.hero a.btn--pistachio, .band a.btn--pistachio,
.site-footer a.btn--pistachio, .order-message a.btn--pistachio {
  color: var(--ink-fixed);
  border-color: var(--pistachio);
}

/* --------------------------------------------------------------------------
   11. Generic band
   -------------------------------------------------------------------------- */
.band { background: var(--band); }
.band--cta .container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.band--cta .band__media { min-width: 0; }
.band--cta .band__media img {
  width: 100%; border-radius: var(--radius);
  aspect-ratio: 3 / 2; object-fit: cover; box-shadow: var(--shadow);
}

/* how-to-order steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.steps > * { min-width: 0; }
.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.2rem;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-family: var(--font-head);
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.steps li h3 { margin: 0 0 0.3rem; }
.steps li p { margin: 0; color: var(--muted); }

/* --------------------------------------------------------------------------
   12. Footer (always-dark band)
   -------------------------------------------------------------------------- */
.site-footer { background: var(--band); }
.site-footer .container { padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.footer-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1.4fr 1fr 1fr;
}
.footer-grid > * { min-width: 0; } /* bug #3 */
.footer-grid h3 { color: var(--cream); font-size: 1.1rem; }
.footer-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.footer-nav a { color: var(--cream); text-decoration: none; }
.footer-nav a:hover { color: var(--accent-dark); text-decoration: underline; }

dl.nap { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 0.75rem; }
dl.nap dt { min-width: 0; }
dl.nap dd { margin: 0; min-width: 0; overflow-wrap: anywhere; } /* bug #3 */

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p { margin: 0; font-size: 0.9rem; }

/* demo-note: solid dark background band, explicit light text (bug #1) */
.demo-note {
  background: #0E1513;
  color: var(--cream);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  font-size: 0.9rem;
}
.demo-note strong { color: var(--accent-dark); }
.footer-bottom .demo-note strong { color: var(--accent-dark); }

/* --------------------------------------------------------------------------
   13. Contact / find-us
   -------------------------------------------------------------------------- */
.findus { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.findus > * { min-width: 0; } /* bug #3 */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.4rem;
  box-shadow: var(--shadow);
}
.contact-card h3 { margin-top: 0; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.contact-list > * { min-width: 0; }
.email-line { overflow-wrap: anywhere; }

/* ==========================================================================
   14. SIGNATURE FEATURE — Treat table planner
   ========================================================================== */
.planner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--gap);
  align-items: start;
}
.planner > * { min-width: 0; }

.planner fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.3rem;
  margin: 0 0 1.25rem;
  background: var(--surface);
}
.planner legend {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  padding: 0 0.4rem;
  color: var(--ink);
}

/* radio / option rows */
.opt-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.opt {
  position: relative;
  display: inline-flex;
}
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border: 2px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  background: var(--ground);
  font-weight: 500;
  user-select: none;
}
/* bug #13: selected visible without colour alone — outline + tick */
.opt input:checked + label {
  border-color: var(--brand-text);
  box-shadow: inset 0 0 0 1px var(--brand-text);
  font-weight: 700;
}
.opt input:checked + label::before {
  content: "✓";
  font-weight: 800;
  color: var(--brand-text);
}
.opt input:focus-visible + label { outline: 3px solid var(--brand); outline-offset: 2px; }

/* treat tiles (checkbox, larger) */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.7rem; }
.tiles > * { min-width: 0; }
.tile { position: relative; }
.tile input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tile label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--ground);
  cursor: pointer;
  font-weight: 500;
  height: 100%;
}
.tile .tile__shape { font-size: 1.3rem; line-height: 1; }
.tile input:checked + label {
  border-color: var(--brand-text);
  box-shadow: inset 0 0 0 1px var(--brand-text);
  font-weight: 700;
}
.tile input:checked + label::after {
  content: "✓";
  margin-left: auto;
  font-weight: 800;
  color: var(--brand-text);
}
.tile input:focus-visible + label { outline: 3px solid var(--brand); outline-offset: 2px; }

/* dependent blocks */
.dependent[hidden] { display: none; }
.dependent {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

.field-label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.text-input, .date-input, .textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.65rem 0.8rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}
.textarea { resize: vertical; min-height: 4.5rem; }
.char-count { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }

/* stepper */
.stepper { display: inline-flex; align-items: center; gap: 0.75rem; }
.stepper button {
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 2px solid var(--brand-text);
  background: transparent;
  color: var(--brand-text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.stepper button:hover { background: rgba(181, 70, 31, 0.08); }
.stepper .stepper__value {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.2rem;
  min-width: 7.5rem;
  text-align: center;
}

/* --- live table preview (plate panel) --- */
.table-preview {
  position: sticky;
  top: 84px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}
.table-preview h3 { margin-top: 0; }
.plate {
  position: relative;
  min-height: 220px;
  border-radius: 50% / 18%;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(207, 227, 181, 0.35), transparent 70%),
    var(--ground);
  border: 2px dashed var(--border);
  padding: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-content: center;
  justify-content: center;
}
.plate__empty { color: var(--muted); text-align: center; max-width: 24ch; }
.treat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.treat-chip .treat-chip__shape { font-size: 1.1rem; }
.preview-note { font-size: 0.82rem; color: var(--muted); margin-top: 0.8rem; margin-bottom: 0; }

/* --- order message (ALWAYS-DARK panel, bug #1) --- */
.order-message {
  background: var(--band);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 1.3rem;
  margin-top: 1.5rem;
}
.order-message h3 { color: var(--cream); margin-top: 0; }
.message-text {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(244, 235, 221, 0.18);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--cream);
  min-height: 3rem;
  white-space: pre-wrap;
}
.message-text.is-empty { color: var(--cream); opacity: 0.7; font-style: italic; }
.send-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.1rem; }
.copy-status { font-size: 0.85rem; color: var(--accent-dark); margin: 0.6rem 0 0; min-height: 1.1rem; }

/* page intro */
.page-head { background: var(--band); color: var(--cream); }
.page-head .container { padding-block: clamp(2.2rem, 5vw, 3.5rem); }
.page-head h1 { color: var(--cream); }
.page-head .eyebrow { color: var(--accent-dark); }
.page-head .lede { color: var(--cream); opacity: 0.92; }

/* prose */
.prose { max-width: 68ch; }
.prose p { margin-bottom: 1.1rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }

/* --------------------------------------------------------------------------
   15. Responsive — bug #3
   nav own row <=700px; hide header CTA <=480px; brand wraps; no overflow@320.
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero .container,
  .band--cta .container,
  .planner { grid-template-columns: 1fr; }
  .band--cta .band__media { order: -1; }
  .table-preview { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .site-header .container { padding-block: 0.6rem; }
  .nav {
    order: 3;
    flex-basis: 100%;    /* nav on its own row */
    width: 100%;
    justify-content: flex-start;
    gap: 0.1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .header-cta { display: none; } /* hide header CTA (bug #3) */
  body { font-size: 1rem; }
  .btn { width: 100%; } /* full-width stacked CTAs on small screens */
  .btn-row .btn { flex: 1 1 100%; }
  .send-row .btn { flex: 1 1 100%; }
  .stepper { width: 100%; justify-content: space-between; }
  .stepper .stepper__value { min-width: 0; flex: 1; }
}

@media (max-width: 360px) {
  h1 { font-size: 1.8rem; }
  .tiles { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
