/* ============ Dinnerbell design tokens ============ */
:root {
  --bg: #fbf7f1;
  --surface: #ffffff;
  --surface-2: #f5efe6;
  --surface-3: #ece4d7;
  --text: #1f1a16;
  --muted: #776b60;
  --border: #e9e0d2;
  --primary: #d9482b;
  --primary-hover: #c33d22;
  --primary-ink: #ffffff;
  --primary-soft: #fde8e1;
  --herb: #2f6b4f;
  --herb-soft: #e2f0e7;
  --saffron: #b7790b;
  --saffron-soft: #fcf1d8;
  --bad: #b3261e;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(60, 40, 20, .05), 0 8px 24px rgba(60, 40, 20, .07);
  --shadow-lift: 0 2px 4px rgba(60, 40, 20, .06), 0 16px 40px rgba(60, 40, 20, .12);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17130f; --surface: #221d18; --surface-2: #2b251f; --surface-3: #352e27; --text: #f3ece4; --muted: #ab9e91;
    --border: #3a322a; --primary: #f06a4b; --primary-hover: #f47f63; --primary-ink: #1a120d; --primary-soft: #3e2219;
    --herb: #7fcca1; --herb-soft: #1d3326; --saffron: #e9b54f; --saffron-soft: #3a2f18; --bad: #f2867e;
    --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lift: 0 8px 28px rgba(0,0,0,.45); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17130f; --surface: #221d18; --surface-2: #2b251f; --surface-3: #352e27; --text: #f3ece4; --muted: #ab9e91;
  --border: #3a322a; --primary: #f06a4b; --primary-hover: #f47f63; --primary-ink: #1a120d; --primary-soft: #3e2219;
  --herb: #7fcca1; --herb-soft: #1d3326; --saffron: #e9b54f; --saffron-soft: #3a2f18; --bad: #f2867e;
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lift: 0 8px 28px rgba(0,0,0,.45); color-scheme: dark;
}

/* ============ Base ============ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15.5px/1.55 var(--font-body); min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; margin: 0 0 .4rem; }
h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 .75rem; }
a { color: var(--primary); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin-bottom: .4rem; }
.ok { color: var(--herb); }
.bad { color: var(--bad); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* Visually hidden but still in the page text and accessibility tree (what browser AIs read). */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; }

/* ============ Layout ============ */
.shell { display: flex; align-items: flex-start; flex: 1; }
.shell > main { flex: 1; min-width: 0; max-width: 1040px; margin: 0 auto; padding: 2rem 24px 4rem; }
.stack > * + * { margin-top: 1.1rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; min-width: 140px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; }
.two-col { display: grid; grid-template-columns: 1fr 1.45fr; gap: 1.1rem; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } .shell > main { padding: 1.25rem 16px 3rem; } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.page-head p { margin: 0; }

/* ============ Top bar ============ */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: .7rem 24px; display: flex; align-items: center; gap: 1.25rem; }
.brand { display: flex; align-items: center; gap: .55rem; background: none; border: 0; padding: 0; cursor: pointer; color: var(--text); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; }
.logo { display: inline-flex; }
nav { display: flex; gap: .2rem; margin-right: auto; }
.nav { background: none; border: 0; padding: .45rem .85rem; border-radius: 999px; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; }
.nav:hover { color: var(--text); background: var(--surface-2); }
.nav.active { color: var(--text); background: var(--surface-3); }
.topbar-right { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--herb); color: #fff; font-weight: 600; font-size: .9rem; }
.nav { white-space: nowrap; }
@media (max-width: 760px) {
  .brand-name { display: none; } #sim-toggle { display: none; }
  .topbar-inner { gap: .4rem; padding: .6rem 16px; }
  nav { margin-right: 0; min-width: 0; }
  .nav { padding: .4rem .6rem; font-size: .9rem; }
}
@media (max-width: 560px) { #plan-badge { display: none; } }

/* ============ Cards, tags, buttons ============ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.4rem; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 500; padding: .2rem .6rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tag.accent { background: var(--primary-soft); color: var(--primary); }
.tag.good { background: var(--herb-soft); color: var(--herb); }
.tag.warn { background: var(--saffron-soft); color: var(--saffron); }
.tag.link { cursor: pointer; border: 0; font: inherit; font-size: .78rem; }
.tag.link:hover { color: var(--primary); }
.meta { display: flex; flex-wrap: wrap; gap: .35rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: .62rem 1.15rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, transform .1s, box-shadow .15s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.big { padding: .85rem 1.5rem; font-size: 1.02rem; }
.btn.small { padding: .35rem .8rem; font-size: .85rem; }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); text-decoration: underline; cursor: pointer; }
#sim-toggle[aria-pressed="true"] { background: var(--saffron-soft); color: var(--saffron); }

/* ============ Forms ============ */
input[type=text], input[type=number], textarea, select { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .6rem .75rem; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 76px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); }
label.field { display: block; }
label.field > span, .label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .9rem; }
.q { padding: 1.1rem 0; border-top: 1px solid var(--border); }
.q:first-child { border-top: 0; padding-top: 0; }
.q-label { display: block; font-weight: 600; margin-bottom: .6rem; }
.q-hint { font-weight: 400; color: var(--muted); font-size: .85rem; margin-left: .35rem; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: .42rem .9rem; font: inherit; font-size: .9rem; cursor: pointer; transition: all .12s; }
.chip:hover { border-color: var(--primary); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }

/* Selectable tiles (store, AI) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.tile { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: border-color .12s, background .12s; }
.tile:hover { border-color: var(--muted); }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile .tile-icon { font-size: 1.4rem; }
.tile strong { font-size: .95rem; }
.tile:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.tile:has(input:checked)::after { content: '✓'; position: absolute; top: .55rem; right: .7rem; color: var(--primary); font-weight: 700; }
.tile:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Numbered sections (onboarding / settings) */
.section-head { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1rem; }
.num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .9rem; }
.section-head p { margin: 0; }

/* ============ Stepper ============ */
.stepper { display: flex; gap: .4rem; list-style: none; margin: 0; padding: 0; counter-reset: s; flex-wrap: wrap; }
.stepper li { display: flex; align-items: center; gap: .45rem; font-size: .86rem; font-weight: 500; color: var(--muted); }
.stepper li::before { counter-increment: s; content: counter(s); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.stepper li + li::before { margin-left: 0; }
.stepper li:not(:last-child)::after { content: ''; width: 28px; height: 2px; background: var(--border); border-radius: 2px; margin-left: .2rem; }
.stepper li.done { color: var(--text); }
.stepper li.done::before { content: '✓'; background: var(--herb); color: #fff; }
.stepper li.current { color: var(--text); font-weight: 600; }
.stepper li.current::before { background: var(--primary); color: var(--primary-ink); }

/* ============ Landing ============ */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center; padding: 1.5rem 0 1rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.04; margin-bottom: 1rem; }
.hero h1 em { font-style: italic; color: var(--primary); }
.hero .lede { font-size: 1.12rem; color: var(--muted); max-width: 34rem; margin-bottom: 1.5rem; }
.hero-visual { position: relative; min-height: 390px; }
.hv-card { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); padding: 1rem; }
.hv-recipe { top: 0; left: 12%; right: 0; }
.hv-recipe .band { height: 96px; margin: -1rem -1rem .8rem; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.hv-ai { bottom: 8px; right: 2%; width: 54%; display: flex; gap: .7rem; align-items: center; }
.hv-ai .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--herb); animation: pulse 1.4s ease-in-out infinite; flex: none; }
.hv-cart { bottom: 48px; left: 0; width: 48%; }
.hv-cart div { display: flex; justify-content: space-between; font-size: .84rem; padding: .2rem 0; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } .hero-visual { min-height: 380px; } }
.trust { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .86rem; }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.1rem; }
.how .card { box-shadow: none; }
.how .big-num { font-family: var(--font-display); font-size: 2.2rem; color: var(--primary); line-height: 1; margin-bottom: .5rem; }
.byo { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 700px) { .byo { grid-template-columns: 1fr; } }
.byo .card { background: var(--surface-2); box-shadow: none; border-color: transparent; }
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; max-width: 720px; }
.price-card ul { padding-left: 1.1rem; margin: .5rem 0 1rem; }
.price-card li { margin-bottom: .3rem; }
.price { font-family: var(--font-display); font-size: 2rem; font-weight: 600; }
.price-card.featured { border: 2px solid var(--primary); }
.section-title { text-align: left; margin: 2.5rem 0 1rem; }

/* ============ Recipe cards ============ */
.band { height: 110px; display: grid; place-items: center; font-size: 3rem; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.band-0 { background: linear-gradient(135deg, #f9c9b4, #f3a07f); }
.band-1 { background: linear-gradient(135deg, #cfe5c9, #9fcca0); }
.band-2 { background: linear-gradient(135deg, #f8e2a8, #f1c46a); }
.band-3 { background: linear-gradient(135deg, #d9d2f0, #b5a9e3); }
:root[data-theme="dark"] .band { filter: saturate(.85) brightness(.88); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .band { filter: saturate(.85) brightness(.88); } }
.option { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.option:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.option .body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.option .body p { margin: 0; }
.option .grow { flex: 1; }
.stats { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .84rem; color: var(--muted); }
.stats span { display: inline-flex; align-items: center; gap: .3rem; }
.kids { font-size: .86rem; background: var(--surface-2); border-radius: 10px; padding: .55rem .7rem; }

/* Recipe page */
.recipe-hero { padding: 0; overflow: hidden; }
.recipe-hero .band { height: 150px; font-size: 4rem; border-radius: 0; }
.recipe-hero .body { padding: 1.4rem 1.5rem 1.5rem; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; margin-top: 1rem; }
.stat { background: var(--surface-2); border-radius: var(--radius); padding: .7rem .9rem; }
.stat .k { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat .v { font-weight: 600; font-size: 1.02rem; }
ul.ing { list-style: none; margin: 0; padding: 0; }
ul.ing li { display: flex; gap: .6rem; padding: .5rem 0; border-bottom: 1px dashed var(--border); }
ul.ing li:last-child { border-bottom: 0; }
ul.ing .qty { min-width: 6.5rem; font-weight: 600; }
ol.steps { list-style: none; margin: 0; padding: 0; counter-reset: st; }
ol.steps li { position: relative; padding: 0 0 1rem 2.6rem; counter-increment: st; }
ol.steps li::before { content: counter(st); position: absolute; left: 0; top: -.1rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .85rem; }
ol.steps li .tag { margin-left: .2rem; vertical-align: 1px; }

/* Shopping list */
.shop-list { list-style: none; margin: 0; padding: 0; }
.shop-aisle { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 1rem 0 .4rem; }
.shop-aisle:first-child { padding-top: 0; }
.shop-item { display: flex; align-items: flex-start; gap: .8rem; padding: .65rem .2rem; border-top: 1px solid var(--border); }
.shop-item.off { opacity: .5; }
.shop-item .name { flex: 1; }
.shop-item .qty { color: var(--muted); font-size: .86rem; text-align: right; }
.shop-item .bought { font-size: .82rem; color: var(--muted); margin-top: .15rem; }

/* Shop / status cards */
.shop-cta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: var(--text); color: var(--bg); border: 0; }
.shop-cta h2 { color: var(--bg); }
.shop-cta .muted { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.shop-cta .linkbtn { color: var(--bg); }
.banner.warn { background: var(--saffron-soft); border-color: transparent; box-shadow: none; }
.banner.good { background: var(--herb-soft); border-color: transparent; box-shadow: none; }
.banner h2 { display: flex; align-items: center; gap: .5rem; }

/* ============ Handoff ============ */
.handoff { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem; align-items: center; border: 2px solid var(--primary); }
@media (max-width: 760px) { .handoff { grid-template-columns: 1fr; } }
.handoff-steps { list-style: none; margin: .4rem 0 .8rem; padding: 0; counter-reset: h; }
.handoff-steps li { position: relative; padding-left: 2.4rem; margin-bottom: .9rem; counter-increment: h; }
.handoff-steps li::before { content: counter(h); position: absolute; left: 0; top: -.05rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: .82rem; }
.phrase { display: flex; align-items: center; gap: .5rem; margin-top: .45rem; padding: .45rem .45rem .45rem .85rem; background: var(--surface-2); border-radius: 12px; width: fit-content; max-width: 100%; flex-wrap: wrap; }
.phrase code { font-family: var(--font-body); font-size: 1rem; font-weight: 600; }
.assistant-mock { background: var(--surface-2); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; gap: .55rem; font-size: .88rem; }
.assistant-mock .who { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.bubble { padding: .55rem .8rem; border-radius: 14px; max-width: 90%; }
.bubble.user { align-self: flex-end; background: var(--primary); color: var(--primary-ink); border-bottom-right-radius: 4px; }
.bubble.ai { background: var(--surface); border-bottom-left-radius: 4px; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.live { grid-column: 1 / -1; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .7rem .9rem; border-radius: 12px; background: var(--surface-2); }
.live .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); animation: pulse 1.4s ease-in-out infinite; }
.live.working .dot { background: var(--herb); }
@keyframes pulse { 50% { opacity: .3; } }

/* Debug view of the AI section */
.ai-task { background: var(--surface-2); box-shadow: none; }
.task-text { white-space: pre-wrap; word-break: break-word; font: .78rem/1.45 ui-monospace, Menlo, monospace; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .8rem; max-height: 260px; overflow: auto; margin: .75rem 0; }
textarea.flash { animation: flash 1s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--primary); } 100% { box-shadow: 0 0 0 3px transparent; } }

/* ============ Recipes list ============ */
.meal-card { padding: 0; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.meal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.meal-card .band { height: 90px; font-size: 2.4rem; }
.meal-card .body { padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.meal-card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.sponsored { border-style: dashed; box-shadow: none; display: flex; flex-direction: column; justify-content: center; gap: .4rem; min-height: 200px; background: var(--surface-2); }
.sponsored .label-ad { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.limit-meter { display: flex; align-items: center; gap: .6rem; font-size: .86rem; color: var(--muted); }
.limit-meter .bar { width: 90px; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.limit-meter .bar i { display: block; height: 100%; background: var(--primary); border-radius: 6px; }
.empty { text-align: center; padding: 3rem 1rem; }
.empty .big { font-size: 3rem; margin-bottom: .5rem; }

/* ============ Modal, toast, demo note ============ */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 14, 10, .45); display: grid; place-items: center; z-index: 40; padding: 16px; backdrop-filter: blur(2px); }
.modal { max-width: 460px; width: 100%; box-shadow: var(--shadow-lift); }
.modal ul { padding-left: 1.1rem; }
.toast { position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: .65rem 1.2rem; border-radius: 999px; font-size: .9rem; z-index: 50; box-shadow: var(--shadow-lift); max-width: calc(100vw - 32px); text-align: center; }
.demo-note { background: var(--saffron-soft); color: var(--text); border-radius: 12px; padding: .6rem .85rem; font-size: .88rem; margin: 0; }

/* ============ Footer ============ */
.footer { border-top: 1px solid var(--border); margin-top: 2rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 1.75rem 24px; display: flex; gap: 1.5rem; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.footer-inner p { margin: .2rem 0 0; }
.footer-links { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ============ Demo assistant panel ============ */
#sim { display: none; }
body.sim-open #sim { display: flex; flex-direction: column; width: 360px; flex: none; position: sticky; top: 57px; height: calc(100vh - 57px); background: var(--surface); border-left: 1px solid var(--border); }
@media (max-width: 1000px) { body.sim-open #sim { position: fixed; right: 0; top: 57px; z-index: 15; width: min(360px, 100vw); box-shadow: var(--shadow-lift); } }
.sim-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; padding: .9rem 1rem; border-bottom: 1px solid var(--border); background: var(--saffron-soft); }
.sim-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.sim-msg { padding: .55rem .8rem; border-radius: 14px; font-size: .9rem; max-width: 92%; background: var(--surface-2); }
.sim-msg.user { align-self: flex-end; background: var(--primary); color: var(--primary-ink); }
.sim-msg.step { background: none; color: var(--muted); padding: .1rem .2rem; font-size: .84rem; }
.sim-msg.step::before { content: '→ '; }
.sim-msg.warn { background: var(--saffron-soft); color: var(--text); }
.sim-input { border-top: 1px solid var(--border); padding: .75rem; display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.sim-input .row { width: 100%; flex-wrap: nowrap; }
.shop-cta > div { flex: 1 1 320px; }

/* Reply box shown on every page while a task is active */
#ai-task-root:not(:empty) { margin-top: 1.1rem; }
.reply-card { border-style: dashed; box-shadow: none; }
.reply-form textarea { min-height: 70px; font: .85rem/1.4 ui-monospace, Menlo, monospace; }
.reply-form .row { margin-top: .5rem; }
.debug-task { background: var(--surface-2); border-radius: 12px; padding: .9rem; margin-bottom: .8rem; }

.reply-card.receipt { border-style: solid; border-color: transparent; background: var(--herb-soft); }
