/* Market's web store. Colours are the apps' Theme.swift (Flock's, Grazing's palette), light and dark. */
:root {
  --paper: #EEF1EA; --panel: #F7F8F3; --ink: #16201A; --ink2: #516056; --ink3: #636E66; --line: #D2D8CB;
  --brick: #B6472C; --wheat: #D3A02C; --pasture: #3F7A45; --water: #2F6F8F; --on-accent: #FFFFFF;
  --chip: #E1E7DA;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F130D; --panel: #161B12; --ink: #E9EDE1; --ink2: #A4B0A2; --ink3: #7B8878; --line: #28301F;
    --brick: #D16A4E; --wheat: #E0B354; --pasture: #5A9A62; --water: #5C9FBF; --on-accent: #0F130D;
    --chip: #222A1C;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
main { max-width: 640px; margin: 0 auto; padding: 20px 16px 32px; }
a { color: var(--pasture); }
h1 { font-size: 28px; line-height: 1.15; margin: 8px 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink2); margin: 28px 4px 8px; font-weight: 600; }
p { margin: 6px 0; }
.muted { color: var(--ink2); }
.small { font-size: 14px; }
.loading { padding: 40px 0; text-align: center; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.stack > * + * { margin-top: 10px; }
.row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.name { font-weight: 600; }
.price { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink2); }
.note { font-size: 14px; color: var(--ink2); }
.warn { font-size: 14px; color: var(--brick); }
.desc { font-size: 14px; color: var(--ink2); font-style: italic; }

/* Where: one button per handover */
.choice {
  display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--panel); border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 16px;
}
.choice[aria-pressed="true"] { border-color: var(--pasture); box-shadow: inset 0 0 0 1px var(--pasture); }
.choice:focus-visible, .chip:focus-visible, .step button:focus-visible, .btn:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--water); outline-offset: 2px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  font: inherit; font-size: 15px; cursor: pointer; border: 0; border-radius: 999px; padding: 8px 14px;
  background: var(--chip); color: var(--ink);
}
.chip[aria-pressed="true"] { background: var(--pasture); color: var(--on-accent); }

/* What: a stepper per product */
.step { display: flex; align-items: center; gap: 4px; flex: none; }
.step button {
  width: 40px; height: 40px; border-radius: 50%; border: 0; font-size: 22px; line-height: 1; cursor: pointer;
  background: var(--chip); color: var(--pasture);
}
.step button:disabled { opacity: 0.35; cursor: default; }
.step output { min-width: 28px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.off { opacity: 0.55; }

/* You */
label { display: block; font-size: 14px; color: var(--ink2); margin: 10px 0 4px; }
input, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px;
}
textarea { min-height: 70px; resize: vertical; }

.total { display: flex; justify-content: space-between; font-weight: 600; font-size: 19px; font-variant-numeric: tabular-nums; }
.btn {
  display: block; width: 100%; margin-top: 16px; font: inherit; font-weight: 600; font-size: 18px; cursor: pointer;
  border: 0; border-radius: 14px; padding: 14px; background: var(--pasture); color: var(--on-accent);
}
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.quiet { background: transparent; color: var(--brick); border: 1.5px solid var(--line); font-weight: 500; }
.error { background: color-mix(in srgb, var(--brick) 12%, var(--panel)); border-color: var(--brick); color: var(--ink); }

.badge { display: inline-block; font-size: 14px; font-weight: 600; padding: 4px 10px; border-radius: 999px; color: var(--on-accent); }
.badge.requested { background: var(--wheat); color: #16201A; }
.badge.confirmed { background: var(--pasture); }
.badge.declined, .badge.cancelled { background: var(--brick); }
.lines { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lines td { padding: 6px 0; vertical-align: top; border-bottom: 1px solid var(--line); }
.lines td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.timeline li:last-child { border-bottom: 0; }

.foot { max-width: 640px; margin: 0 auto; padding: 0 16px 32px; font-size: 13px; color: var(--ink3); text-align: center; }
.foot a { color: var(--ink3); }
