/* Carb-Loading Baker: the shop's whole visual system, in one file.
 *
 * The page borrows its look from the thing Leah already makes: her labels. Helvetica, near-black on
 * warm paper, the product name in bold, "Ingredients:" and "Contains:" as bold run-ins, hairline
 * rules, nothing decorative. The brief was "austere and simple ... not cheesy and cliche" (2026-09-22)
 * and then "very user friendly but also very robust; sexy without utility is stupid" (2026-09-26), so
 * every choice below is there to make ordering quick on a phone: 44-pixel buttons, the price beside
 * the quantity, the order summary always within reach.
 *
 * Nothing here is pure black or pure white. One accent colour (a crust brown) for links, focus and
 * the chosen state; Venmo's own blue only on the button that pays Venmo, where it is recognised.
 */

:root {
  --paper: #faf8f4;
  --panel: #f3efe8;
  --ink: #1a1a1a;
  --soft: #5d574f;
  --rule: #e0d9ce;
  --line: #cfc6b8;
  --accent: #7c4a3a;
  --accent-ink: #fdfbf7;
  --tint: #f2e9e1;
  --venmo: #0b6bcb;
  --venmo-ink: #fdfbf7;
  --err: #9a3b2f;
  --measure: 36rem;
  --stack: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", system-ui, sans-serif;
  /* Light only, also on a phone or computer set to dark mode: the page is her paper labels, and
     "think we should do the light theme" (Graham, 2026-09-27). The management screen follows.
     ONLY, because "light" alone still lets a browser that darkens sites for the reader (Chrome's
     dark theme for sites, Samsung Internet's dark mode) repaint the page, and it did: "you should
     be overriding" (Graham, 2026-09-27). Both pages also carry the same thing as a meta tag, which a
     browser reads before this file arrives. */
  color-scheme: only light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--stack);
  padding: 0 max(16px, env(safe-area-inset-right)) 5rem max(16px, env(safe-area-inset-left));
}

.top, .shop, .info, .legal { max-width: 68rem; margin: 0 auto; }

a { color: var(--accent); text-underline-offset: .18em; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

.sr, .skip {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { position: static; width: auto; height: auto; clip-path: none; display: inline-block; padding: .6rem 0; }

h2 { margin: 0 0 1rem; font-size: 1.5rem; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }

/* ---------------------------------------------------------------- the top of the page */
.top { padding: 2.5rem 0 1.5rem; }
.top h1 { margin: 0; line-height: 0; }
.mark { display: block; width: min(380px, 86%); height: auto; }
.tagline { margin: 1.4rem 0 0; max-width: var(--measure); font-size: 1.1875rem; line-height: 1.45; }
.how-short { margin: .5rem 0 0; color: var(--soft); max-width: var(--measure); }
.announce {
  margin: 1.4rem 0 0; max-width: var(--measure); padding: .7rem 1rem;
  background: var(--tint); border-left: 3px solid var(--accent); font-weight: 600;
}

/* ---------------------------------------------------------------- menu and order, side by side when there is room */
.shop { display: grid; gap: 2.5rem; padding-top: 1rem; }
@media (min-width: 60rem) {
  .shop { grid-template-columns: minmax(0, 1fr) 22rem; gap: 3.5rem; align-items: start; }
  .order { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
}

/* ---------------------------------------------------------------- menu */
.menu h3 {
  margin: 2rem 0 0; padding-bottom: .5rem; font-size: 1.125rem; font-weight: 700;
  border-bottom: 2px solid var(--ink);
}
.menu h3:first-of-type { margin-top: .25rem; }
.item { padding: 1rem 0 1.05rem; border-bottom: 1px solid var(--rule); }
.item-title { margin: 0; font-size: 1.0625rem; line-height: 1.3; font-weight: 700; }
.ingredients, .contains { margin: .35rem 0 0; font-size: .875rem; line-height: 1.5; color: var(--soft); max-width: var(--measure); }
.contains { margin-top: .15rem; }
.ingredients strong, .contains strong { color: var(--ink); font-weight: 700; }
.buy { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .7rem; }
.price { margin: 0; font-size: 1rem; font-variant-numeric: tabular-nums; }
.price strong { font-weight: 700; font-size: 1.0625rem; }
.price .unit { color: var(--soft); }
.price.none { color: var(--soft); font-size: .9375rem; }
/* The chosen state widens into the gutter instead of pushing the text in, so nothing moves under a
   thumb that is still pressing +. */
.item.picked { background: var(--tint); box-shadow: inset 3px 0 0 var(--accent); margin: 0 -.85rem; padding-left: .85rem; padding-right: .85rem; }
.empty { color: var(--soft); }

.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.stepper .step {
  width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--ink);
  font: 400 1.375rem/1 var(--stack); cursor: pointer; border-radius: 6px;
  touch-action: manipulation;
}
.stepper .step:hover { background: var(--panel); }
.stepper .step:disabled { color: var(--line); cursor: default; background: transparent; }
.stepper input {
  width: 2.75rem; height: 44px; margin: 0; padding: 0; border: 0;
  border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); border-radius: 0;
  background: transparent; color: var(--ink); text-align: center;
  font: 700 1rem var(--stack); 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; margin: 0; }

/* ---------------------------------------------------------------- the order panel */
.order-inner { background: var(--panel); border-radius: 10px; padding: 1.25rem 1.1rem 1.4rem; }
@media (min-width: 30rem) { .order-inner { padding: 1.5rem 1.5rem 1.6rem; } }
.basket { margin: 0 0 1.25rem; }
.basket-empty { margin: 0; color: var(--soft); }
.basket ul { list-style: none; margin: 0; padding: 0; }
.basket li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.basket li span:last-child { white-space: nowrap; }
.basket .total { display: flex; justify-content: space-between; padding-top: .6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.basket .to-confirm { margin: .4rem 0 0; font-size: .875rem; color: var(--soft); }

.field { margin-top: 1rem; }
.field label { display: block; font-weight: 600; font-size: .9375rem; margin-bottom: .3rem; }
.optional { font-weight: 400; color: var(--soft); }
input, textarea {
  display: block; width: 100%; margin: 0; padding: .7rem .75rem;
  font: 400 1rem/1.4 var(--stack); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 6px;
}
textarea { resize: vertical; min-height: 5.5rem; }
.hint { margin: .3rem 0 0; font-size: .8125rem; color: var(--soft); }
input[aria-invalid="true"] { border-color: var(--err); }

button { font: inherit; }
.primary {
  display: block; width: 100%; margin-top: 1.4rem; padding: .9rem 1rem; min-height: 48px;
  font: 700 1.0625rem var(--stack); color: var(--accent-ink); background: var(--ink);
  border: 0; border-radius: 6px; cursor: pointer;
}
.primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--accent)); }
.primary:disabled { opacity: .6; cursor: progress; }
.result { margin: .8rem 0 0; font-size: .9375rem; }
.result:empty { display: none; }
.result.err { color: var(--err); font-weight: 600; }
.fine { margin: .9rem 0 0; font-size: .8125rem; color: var(--soft); }
.linkish { margin-top: 1.2rem; padding: .5rem 0; background: none; border: 0; color: var(--accent); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; font-size: .9375rem; }

/* ---------------------------------------------------------------- after sending */
.done h3 { margin: 0 0 .5rem; font-size: 1.375rem; line-height: 1.25; }
.done:focus { outline: none; }
.done-items { list-style: none; margin: 1rem 0 0; padding: 0; }
.done-items li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.done-total { margin: .6rem 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.pay { margin-top: 1.25rem; }
.venmo {
  display: flex; align-items: center; justify-content: center; min-height: 52px; padding: .8rem 1rem;
  background: var(--venmo); color: var(--venmo-ink); border-radius: 6px;
  font-weight: 700; font-size: 1.0625rem; text-decoration: none;
}
.venmo:focus-visible { outline-color: var(--venmo); }
.pay-qr { display: none; text-align: center; }
.pay-qr img { display: block; margin: 0 auto; padding: 10px; background: #fdfbf7; border-radius: 6px; }
.pay-qr p { margin: .5rem 0 0; font-size: .875rem; color: var(--soft); }
/* A phone gets the button that opens the Venmo app; a computer, which has no Venmo app, gets the code
   to scan with a phone. Decided by what the device can do, not by how wide its window is. */
@media (hover: hover) and (pointer: fine) {
  .pay-app { display: none; }
  .pay-qr { display: block; }
}
.pay-by-hand { margin: 1rem 0 0; font-size: .9375rem; }
.pay-note { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .4rem 0 0; }
.pay-note code {
  padding: .35rem .5rem; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  font: 600 .875rem/1.4 var(--stack); word-break: break-word;
}
.copy {
  min-height: 36px; padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 6px;
  background: var(--paper); color: var(--ink); cursor: pointer; font-size: .875rem;
}
.unpriced { margin: 1rem 0 0; padding: .7rem .9rem; background: var(--tint); border-left: 3px solid var(--accent); }
.done-pickup { margin-top: 1rem; font-size: .9375rem; }
.done-pickup p { margin: .4rem 0 0; }

/* ---------------------------------------------------------------- orders paused from the management screen */
.closed-note, .closed-banner { display: none; }
[data-orders="closed"] .closed-note { display: block; }
[data-orders="closed"] .closed-note p:first-child { margin-top: 0; font-weight: 600; }
[data-orders="closed"] .closed-banner { display: block; margin: 0 0 1rem; color: var(--soft); }
[data-orders="closed"] .order-form, [data-orders="closed"] .stepper, [data-orders="closed"] .bar,
[data-orders="closed"] #again { display: none !important; }
.order.is-done #order-h { display: none; }

/* ---------------------------------------------------------------- how, allergies, about */
.info { display: grid; gap: 2.5rem; margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--rule); }
@media (min-width: 60rem) { .info { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; } }
.info h2 { font-size: 1.25rem; }
.info p, .info li { max-width: var(--measure); }
.info p { margin: 0 0 .8rem; }
.steps { margin: 0 0 1rem; padding-left: 1.3rem; }
.steps li { margin: 0 0 .5rem; padding-left: .2rem; }
.steps li::marker { font-weight: 700; }

/* ---------------------------------------------------------------- the lines the law asks for */
.legal { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 2px solid var(--ink); font-size: .875rem; }
.legal p { margin: 0 0 .25rem; }
.legal .statement { margin-top: .6rem; font-style: italic; }

.noscript { max-width: var(--measure); margin: 1rem auto; padding: .8rem 1rem; background: var(--tint); }

/* ---------------------------------------------------------------- the bar that follows a phone down the menu */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem max(16px, env(safe-area-inset-right)) calc(.7rem + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: var(--ink); color: var(--paper);
}
.bar[hidden] { display: none; }
.bar-text { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-go {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem; border-radius: 6px;
  background: var(--paper); color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap;
}
@media (min-width: 60rem) { .bar { display: none !important; } }

@media (min-width: 40rem) {
  body { padding-left: max(32px, env(safe-area-inset-left)); padding-right: max(32px, env(safe-area-inset-right)); }
  .top { padding-top: 3.5rem; }
}
