/* market — the counter (#1011).
 *
 * For the shop with many similar items, where a buyer arrived knowing
 * roughly what they want and is scanning for it: a trade counter's
 * language. White ground, hairline cells, condensed uppercase signage in
 * Barlow Condensed, a register of every product as a real table, yellow
 * price tags on what is reduced, and the merchant's colour as the one mark —
 * the current category, the announcement, the button that buys.
 *
 * SHARES NO RULE WITH THE OTHER THEMES (#250). What it shares is the
 * VOCABULARY: the same five palette names and three typeface names the
 * merchant chooses from, given this theme's own values.
 *
 * Barlow and Barlow Condensed are self-hosted (#1008), so they arrive from
 * the shop's own address with nothing third-party on the page.
 *
 * WHERE THIS THEME SPENDS ITS CONTRAST: on the price column and on the
 * stock state. Those are the two things being compared down the page, so
 * they are the two things that must separate at a glance. */

@font-face {
  font-family: "Barlow";
  src: url(/assets/barlow-400-396d23164d95.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Barlow";
  src: url(/assets/barlow-600-a38e4da72faa.woff2) format("woff2");
  font-weight: 600 700;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url(/assets/barlow-condensed-700-6405ebeda8b1.woff2) format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url(/assets/barlow-condensed-800-3d321fd01797.woff2) format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --radius: 0;
  --gutter: clamp(1rem, 3vw, 2.5rem);
  --measure: 34rem;
  --wide: 85rem;
  --row: 3.25rem;
  --thumb: 3rem;
  --face: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sign: "Barlow Condensed", "Arial Narrow", sans-serif;
  /* One tabular figure width, so a column of prices lines up on the
   * decimal. This is the whole point of the theme. */
  --figures: tabular-nums;
  --ink: #111111;
  --ink-soft: #666666;
  --paper: #ffffff;
  --line: #e5e5e5;
  --band: #fafafa;
  --tag: #ffd400;
  --good: #15803d;
}

/* THE MERCHANT'S PALETTE, this theme's values: the counter stays white and
 * black, and the palette names the one mark. Every mark clears 4.5:1 with
 * white on it, which is not negotiable — #241 shipped a storefront nobody
 * could read once already. */
.palette-clay { --accent: #b3400c; --accent-ink: #ffffff; }
.palette-ink { --accent: #111111; --accent-ink: #ffffff; }
.palette-kente { --accent: #0f5132; --accent-ink: #ffffff; }
.palette-cocoa { --accent: #7c2d12; --accent-ink: #ffffff; }
.palette-sky { --accent: #1e3a8a; --accent-ink: #ffffff; }

/* THE MERCHANT'S LETTERING. Three names, and this theme keeps all three
 * at the same metrics so a row is the same height whichever is chosen —
 * a list whose row height moved with the typeface would reflow the whole
 * page on a setting change. */
/* Clean is the theme's own text face; Classic and Friendly are the
 * device's serif and rounded. The signage stays Barlow Condensed whichever
 * is chosen: it is the theme, not the shop's lettering. */
.type-system { --face: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.type-serif { --face: Georgia, "Times New Roman", serif; }
.type-rounded { --face: ui-rounded, "Segoe UI", system-ui, sans-serif; }

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--face);
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
}

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

a { color: inherit; }

h1, h2, h3 {
  line-height: 1.2;
  margin: 0;
  /* A title with no spaces in it — a model number, a URL a merchant
   * pasted — pushed the product page to 938px wide at 375px. */
  overflow-wrap: anywhere;
}

h1 { font-size: 1.35rem; }
h2 { font-size: 1.05rem; }
h3 { font-size: 1rem; font-weight: 600; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- the masthead -------------------------------------------------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
  padding: 0.6rem var(--gutter);
  border-bottom: 1px solid var(--line);
  /* STICKY, which showcase's is not. On a list two hundred rows long the
   * way back to the shop and the basket count must not be two hundred
   * rows up. */
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--paper);
}

.shop-name {
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo { max-height: 1.9rem; width: auto; display: block; }

.basket-link {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.basket-count { font-variant-numeric: var(--figures); }

main { display: block; }

/* --- the banner ----------------------------------------------------- */

/* One band, not a billboard. See hero() in home.templ. */
.banner {
  padding: 1.1rem var(--gutter);
  /* THE MERCHANT'S COLOUR, when they chose one. background() emits
   * --hero-bg and a readable --hero-ink as an inline style, and this rule
   * never read either — so a shop's hero colour silently vanished on a
   * switch to this theme. */
  background: var(--hero-bg, var(--band));
  color: var(--hero-ink, var(--ink));
  border-bottom: 1px solid var(--line);
}

.banner-sub {
  margin: 0.3rem 0 0;
  /* Inherits the hero's ink: --ink-soft is chosen against the paper and
   * is not guaranteed readable on a colour the merchant picked. */
  opacity: 0.85;
  max-width: var(--measure);
}

.banner-to-list {
  display: inline-block;
  margin-top: 0.7rem;
  padding: 0.45rem 0.9rem;
  /* Inverted from the hero, as showcase's is: the accent is chosen
   * against the paper, and on a merchant's own colour it may vanish. */
  background: var(--hero-ink, var(--accent));
  color: var(--hero-bg, var(--accent-ink));
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.band {
  padding: 1rem var(--gutter) 1.4rem;
  max-width: var(--wide);
  margin: 0 auto;
}

.band > h1,
.band > h2 { margin-bottom: 0.6rem; }

.count-heading {
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.prose {
  padding: 0.8rem var(--gutter);
  max-width: var(--measure);
  margin: 0 auto;
  color: var(--ink-soft);
}

.prose p {
  margin: 0;
  /* THE MERCHANT'S LINE BREAKS ARE THEIRS. showcase has had this from
   * the start; this theme did not, so a switch to it ran "Opening hours:
   * / Monday to Friday… / Saturday…" into one line — which is losing the
   * merchant's words in the only sense a buyer can see. */
  white-space: pre-line;
}

.prose.centred { text-align: center; }
.prose.ranged-left { text-align: left; }

.empty { color: var(--ink-soft); }

/* --- the list, which is the theme ----------------------------------- */

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.rows > li { border-bottom: 1px solid var(--line); }

.row {
  display: grid;
  /* thumbnail | name | price. The thumbnail column COLLAPSES to nothing
   * when there is no image, so a list of text products has no ragged
   * left edge — see row() on why this theme does not draw an empty
   * frame where showcase does. */
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--row);
  padding: 0.45rem var(--gutter);
  text-decoration: none;
}

.row:hover { background: var(--band); }

.thumb {
  grid-column: 1;
  width: var(--thumb);
  height: var(--thumb);
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--band);
}

.row-name {
  grid-column: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.row-name h3 {
  /* One line, clipped. A wrapping title would make rows different
   * heights and destroy the column the page exists to give. */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-price {
  grid-column: 3;
  font-weight: 700;
  font-variant-numeric: var(--figures);
  white-space: nowrap;
}

.from {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-right: 0.15rem;
}

.gone {
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.rows-picked .row { background: var(--band); }

.more { margin: 0.9rem 0 0; }
.more a { font-weight: 600; }

.pager a { display: inline-flex; align-items: center; min-height: 2.75rem; }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
  margin-top: 1rem;
  font-weight: 600;
}

.pager-at {
  font-weight: 400;
  color: var(--ink-soft);
  font-variant-numeric: var(--figures);
}

/* --- one product ---------------------------------------------------- */

.detail {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1rem var(--gutter);
}

/* The facts come FIRST here and the photographs after — the reverse of
 * showcase, and the reason this is a different theme rather than a
 * palette. See productPage(). */
.facts { max-width: var(--measure); }

/* ONE PRICE ONCE THE SCRIPT ARRIVES. showcase found this in a browser and
 * this theme did not carry the fix: a single-variant product printed
 * ₵7.00 twice, one under the other. The server's summary stays for a
 * buyer with no script; the picker's price replaces it for everyone
 * else. Direct child, because the picker's own price is inside .facts
 * too. */
.shop-live .facts > .detail-price { display: none; }

.detail-price {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: var(--figures);
  margin: 0.4rem 0;
}

.shots {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.shot { margin: 0; }
.shot img { border-radius: var(--radius); display: block; }
.shot figcaption { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.2rem; }

.no-photo {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.buy-area { margin-top: 1rem; }

.picker {
  /* A fieldset, so its default border, padding and min-width are all
   * wrong here and all reset — showcase's comment, and this theme had
   * left the browser's grey frame around every picker on the site. */
  border: 0;
  margin: 0 0 0.8rem;
  min-width: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

legend.choices-heading { padding: 0; width: 100%; }

.pick {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* THE CHOSEN OPTION, found by the radio it holds. This matched
 * `[aria-pressed="true"]`, which no template writes and no script sets, so
 * nothing on any picker in this theme ever looked chosen. :has() needs no
 * class the script has to manage; where it is missing, the radio itself
 * still shows the choice. */
.pick:has(input:checked) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.pick:has(input:disabled) { color: var(--ink-soft); cursor: not-allowed; }
.pick input { accent-color: var(--accent); margin: 0; }

.pick-price { font-variant-numeric: var(--figures); font-weight: 600; }
.pick-name { font-weight: 500; }

.add, .update, .pay-again {
  display: inline-block;
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.add[disabled] { background: var(--ink-soft); cursor: not-allowed; }

.said {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  min-height: 1.2em;
}

.back { padding: 0 var(--gutter) 1.4rem; }
.back a { font-weight: 600; }

/* --- the basket drawer ---------------------------------------------- */

.basket {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1rem var(--gutter) 1.4rem;
  border-top: 1px solid var(--line);
}

.basket-lines { list-style: none; margin: 0; padding: 0; }

.basket-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}

.basket-what { min-width: 0; }
.basket-title { font-weight: 600; text-decoration: none; }
.basket-option { display: block; font-size: 0.85rem; color: var(--ink-soft); }
.basket-money { font-weight: 700; font-variant-numeric: var(--figures); }

.stepper { display: inline-flex; align-items: center; gap: 0.3rem; }

.stepper button {
  /* 2.75rem square, showcase's floor. At 2rem the smallest control in
   * the basket was a 32px target, measured at 375px. */
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font: inherit;
  cursor: pointer;
}

.stepper-at { min-width: 1.5rem; text-align: center; font-variant-numeric: var(--figures); }

.basket-remove, .basket-clear {
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-decoration: underline;
  cursor: pointer;
  /* A link-styled button is still a button a thumb has to hit: these
   * measured 20px tall. */
  min-height: 2.75rem;
  padding: 0 0.5rem;
}

.basket-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0.8rem 0;
  font-size: 1.1rem;
}

.basket-total strong { font-variant-numeric: var(--figures); }

.to-checkout { margin: 0.6rem 0; }

/* --- checkout ------------------------------------------------------- */

.checkout, .confirmation, .paying {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1rem var(--gutter) 1.6rem;
}

.troubles { margin: 0.6rem 0; }

.trouble {
  margin: 0.3rem 0;
  padding: 0.5rem 0.7rem;
  border-left: 3px solid var(--accent);
  background: var(--band);
  font-size: 0.92rem;
}

.gone-note { border-left-color: var(--ink-soft); }

.field { margin: 0.8rem 0; }
.field-name { display: block; font-weight: 600; margin-bottom: 0.2rem; }
.field-hint { display: block; font-size: 0.85rem; color: var(--ink-soft); }

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field textarea,
.field select {
  width: 100%;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: var(--paper);
  color: var(--ink);
}

.field-problem, .wrong {
  color: var(--accent);
  font-size: 0.87rem;
  font-weight: 600;
}

.choices { list-style: none; margin: 0; padding: 0; }

/* The no-script list of forms. It sat in the picker's flex row, so the
 * "Choices" heading ran beside the list and each price hung under the
 * next item's rule. One line per form, name and price apart. */
.choices li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.choices-heading { margin-top: 1rem; }


.choice-price { margin-left: auto; font-variant-numeric: var(--figures); font-weight: 600; }

.totals { margin: 0.9rem 0; }

.total-row {
  display: flex;
  justify-content: space-between;
  gap: var(--gutter);
  padding: 0.25rem 0;
}

/* A LONG VALUE KEEPS ITS DISTANCE AND ITS SIDE (#336): a value that wraps — a
 * lapsed quote's reason is a sentence — keeps a gap from its label and sits
 * at the row's end. Both sides keep flex's default shrink, and the value
 * breaks a word only when it must (break-word, not anywhere), so a long
 * label — a seller's own 60-character way name on checkout — wraps too,
 * rather than squeezing an amount to one figure a line (review). */
.total-row dt { color: var(--ink-soft); }
.total-row dd { margin: 0; font-variant-numeric: var(--figures); text-align: end; overflow-wrap: break-word; }

.total-due {
  border-top: 1px solid var(--line);
  margin-top: 0.4rem;
  padding-top: 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.total-due dt { color: var(--ink); }

.order-number { font-variant-numeric: var(--figures); }

.handoff { color: var(--ink-soft); }

.loud { font-weight: 700; }

/* --- paying --------------------------------------------------------- */

.pay { margin: 1rem 0; }

.pay-state {
  padding: 0.7rem 0.8rem;
  background: var(--band);
  border-radius: var(--radius);
  font-weight: 600;
}

.pay-wait { color: var(--ink-soft); font-size: 0.9rem; }

.address { margin-top: 0.8rem; }

/* --- the footer ----------------------------------------------------- */

.foot {
  border-top: 1px solid var(--line);
  padding: 1rem var(--gutter) 1.6rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-align: center;
}

.foot p { margin: 0.15rem 0; }
.by { font-size: 0.82rem; }

/* --- wider screens --------------------------------------------------- */

/* The list stays ONE COLUMN at every width. That is not laziness: two
 * columns of prices cannot be compared down the page, which is the only
 * thing this theme is for. What extra width buys is a wider name column
 * and a larger thumbnail, not more columns. */
@media (min-width: 46rem) {
  :root { --row: 3.75rem; --thumb: 3.5rem; --gutter: 1.25rem; }

  h1 { font-size: 1.6rem; }

  .detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.6rem;
    align-items: start;
  }

  .shots { margin-top: 0; }
}

/* --- the order page -------------------------------------------------- */

/* The three states on one line rather than three labelled rows. See
 * trackingPage(): a buyer here is checking a fact, not reading a page. */
.states {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 1rem;
  padding: 0;
}

.state {
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.87rem;
  font-weight: 600;
  background: var(--band);
}

.state-pay { color: var(--good); }
.state-how { font-weight: 400; color: var(--ink-soft); }

/* The order's lines borrow the catalogue's row, with a count between the
 * name and the money. */
.row-count {
  font-variant-numeric: var(--figures);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.rows-lines .row { grid-template-columns: 1fr auto auto; }

/* SCOPED TO .rows-lines, and the scoping is the whole fix. This read
 * `.rows .row`, which matches the catalogue too — it is more specific than
 * `.row` above, so every product list took `1fr auto auto` and the
 * thumbnail landed in the 1fr column: measured in a browser at 0px wide
 * for one product and 153px of empty space for another, pushing the name
 * against the price. The list this theme exists for, broken by the rule
 * meant for a different list. Order lines have no thumbnail, so their
 * three parts are placed explicitly rather than by the product row's
 * column numbers. */
.rows-lines .row-name { grid-column: 1; }
.rows-lines .row-count { grid-column: 2; }
.rows-lines .row-price { grid-column: 3; }

/* The seller's photo of a sent-out order (#337): never wider than the page. */
.dispatch-photo { display: block; max-width: 100%; height: auto; margin: 0.9rem 0; }
/* A LINK IN A LABELLED ROW — the rider's phone, the seller's own link (#337).
 * Unstyled it fell back to the browser's blue, about 2:1 on a dark palette;
 * found by opening the page. It takes the row's ink, like a prose link. */
.totals dd a {
  color: inherit;
  text-decoration-color: var(--ink-soft);
  text-underline-offset: 0.2em;
}
/* THE SELLER'S LINE UNDER A WAY, and a station's "you collect it" (#334).
 * Its own line inside the option, in the quieter ink. */
.pick:has(.pick-note) { flex-wrap: wrap; }
/* A LONG PLACE NAME WRAPS INSIDE ITS OPTION (review, #334): these options
 * are inline-flex, and a seller's "Accra, Kasoa and the Central Region, by
 * VIP bus" pushed one past a 375px screen. */
.pick { max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
.pick-note { flex-basis: 100%; font-size: 0.85rem; color: var(--ink-soft); }

/* THE PIN'S MAP (#334). As wide as the form and never wider, so it fits a
 * 375px phone and a narrow container alike, with no fixed width to
 * overflow; tall enough to aim a thumb at a door. */
.pin { margin-top: 0.8rem; }
.pin-map {
  width: 100%;
  height: 16rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--band);
}
.pin-said { min-height: 1.4em; margin: 0.4rem 0 0; font-size: 0.9rem; color: var(--ink-soft); }
/* The dropped pin in the theme's own colour, over the provider's map. */
.pin-mark { stroke: var(--accent); fill: var(--accent); fill-opacity: 0.35; }

/* The place search (#1501); suggestions float over the map. */
.where { display: grid; gap: 0.6rem; }
.where > * { margin: 0; }
.place-search { position: relative; display: grid; gap: 0.5rem; }
.place-results { position: absolute; inset-inline: 0; top: 100%; z-index: 1000; margin: 0; padding: 0; list-style: none; max-height: 18rem; overflow-y: auto; border: 1px solid var(--line); background: var(--paper); }
.place-option { display: grid; min-height: 2.75rem; padding: 0.5rem 0.75rem; cursor: pointer; }
.place-option[aria-selected="true"], .place-option:hover { background: var(--band); }
.place-detail { font-size: 0.85rem; color: var(--ink-soft); }
.place-here { justify-self: start; min-height: 2.75rem; padding: 0 0.9rem; border: 1px solid; border-radius: var(--radius); background: none; color: inherit; font: inherit; }

/* --- the buyer's answer to a quote (#335) --------------------------- */
.answer { margin: 1rem 0; }
.answer-total, .answer-cash { margin: 0 0 0.7rem; }
.answer-other {
  display: inline-block;
  width: 100%;
  padding: 0.7rem 1rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.answer-cancel { margin-top: 0.8rem; }
.answer-cancel summary, .offered summary { cursor: pointer; font-weight: 600; }
.answer-cancel p { color: var(--ink-soft); font-size: 0.9rem; }

.to-whatsapp { margin-top: 0.6rem; }

/* WHEN A BUYER CAN COLLECT (#723): kit.CollectHours, the week in runs. The
   theme's own ink and hairline, so the default colours stay readable. */
.hours { margin: 1.2rem 0; }
.hours-week { margin: 0; }
.hours-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.hours-row dt { color: var(--ink-soft); }
.hours-row dd { margin: 0; text-align: end; font-variant-numeric: tabular-nums; }
.hours-zone { margin: 0.5rem 0 0; color: var(--ink-soft); font-size: 0.9rem; }

/* A shop on a break (#666): its note, first on every page. */
.away { margin: 0 auto; padding: 0.75rem var(--gutter); border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 600; }

/* --- how to reach the shop (#767) ----------------------------------- */

/* kit.Contact, this theme's way: one compact line of taps under the shop's
 * name, each a whole target, the way the rows above read. */
.contact { font-style: normal; margin: 0.4rem 0; }
.contact-lead { margin: 0 0 0.25rem; font-weight: 600; }
.contact-ways { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 0.75rem; }
.foot .contact-ways { justify-content: center; }
.contact-ways a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--accent); font-weight: 600; }
.find { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink-soft); }

/* --- what the merchant says about it (#768) ------------------------- */

/* Under the photographs, headed, at the reading measure: this buyer came
 * for the facts, and reads on only if they want to. */
.about { max-width: var(--measure); margin: 1.25rem auto 0; padding: 0 var(--gutter); }
.about p { white-space: pre-line; margin: 0 0 0.75rem; line-height: 1.55; overflow-wrap: anywhere; }

/* --- the analytics consent banner (#771) ---------------------------- */

/* A compact bar pinned to the foot of the screen, two plain buttons; the
 * page stays readable and usable behind it. */
.consent { position: fixed; inset: auto 0 0 0; z-index: 20; padding: 0.6rem var(--gutter); background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -2px 8px rgb(0 0 0 / 0.08); }
.consent[hidden] { display: none; }
.consent-say { margin: 0 0 0.5rem; font-size: 0.9rem; }
.consent-ways { display: flex; gap: 0.5rem; }
.consent-yes, .consent-no { flex: 1; min-height: 2.75rem; border-radius: var(--radius); font: inherit; font-weight: 600; cursor: pointer; }
.consent-yes { background: var(--accent); color: var(--accent-ink); border: 0; }
.consent-no { background: transparent; color: var(--ink); border: 1px solid var(--line); }

/* A SALE (#1039): the was-price struck through, quieter than the price it
   sits beside, and what the customer saves. Colour from the theme's own
   ink, so it reads in both modes. */
.sale { display: inline-flex; flex-wrap: wrap; gap: 0.4em; align-items: baseline; margin-inline-start: 0.4em; font-size: 0.85em; }
.sale .was { color: var(--ink-soft); text-decoration: line-through; }
.sale .save { font-weight: 600; }
.detail-sale { margin: 0; }
.detail-sale[hidden] { display: none; }

/* THE SHOP'S COLLECTIONS (#1005): a row under the masthead that scrolls
   sideways on a phone, and "Shop by" cards. Colours from the theme's ink. */
/* THE MENU, as a stall's row of signs: bordered chips that scroll sideways,
   the current one filled in the accent so it reads at a glance. */
.menu ul { display: flex; gap: 0.5rem; margin: 0; padding: 0.5rem var(--gutter); list-style: none; overflow-x: auto; scrollbar-width: none; }
.menu a { display: inline-block; padding: 0.375rem 0.875rem; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; text-decoration: none; color: inherit; font-weight: 600; }
.menu a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
/* SHOP BY: many small tiles, as a market shows everything at once. */
.shop-by-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(8.5rem, 100%), 1fr)); gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.shop-by-card { display: grid; gap: 0.375rem; padding: 0.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: inherit; text-decoration: none; }
.shop-by-card img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--radius) / 2); }
.shop-by-blank { display: block; aspect-ratio: 1; border-radius: calc(var(--radius) / 2); background: var(--line); }
.shop-by-name { font-weight: 700; font-size: 0.9375rem; overflow-wrap: anywhere; }
.listing-count { margin: 0; font-variant-numeric: var(--figures); color: var(--ink-soft); }

/* SEARCH (#1006), as a stall's: a bordered box and a filled button in the
   accent, the one thing on the bar meant to be pressed. */
.search { display: flex; gap: 0.5rem; padding: 0.5rem var(--gutter); max-width: var(--wide); margin: 0 auto; }
.search input { flex: 1; min-width: 0; padding: 0.55rem 0.75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: inherit; font: inherit; }
.search button { padding: 0.55rem 1rem; border: 0; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; }
/* THE SORT AND FILTERS: chips in a row, as the menu's, so a buyer reads the
   filters as the same kind of control. */
.refine { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 1rem; }
.refine-sort, .refine-under, .refine-check { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.3rem 0.75rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; font-size: 0.875rem; }
.refine select, .refine input[type="number"] { border: 0; background: transparent; color: inherit; font: inherit; font-variant-numeric: var(--figures); }
.refine input[type="number"] { width: 4.5rem; }
.refine-filters { display: contents; }
.refine-check { cursor: pointer; }
.refine-check:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.refine button { padding: 0.35rem 0.9rem; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; cursor: pointer; }
.refine-clear { font-size: 0.875rem; color: var(--ink-soft); }
.nothing-matches a { font-weight: 700; }

/* THE ANNOUNCEMENT (#1007): a strip in the accent, bold, as a stall's sign. */
.announcement { padding: 0.45rem var(--gutter); background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 0.875rem; text-align: center; }
.announcement p { margin: 0; }
.announcement a { color: inherit; }
/* THE HERO PHOTOGRAPH (#1007): beside the banner's words, not behind them —
   the list below is the point, and a picture behind text would bury it. */
.banner-photographed { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 38%); column-gap: 1rem; align-items: center; }
.banner-photographed > :not(.banner-photo) { grid-column: 1; }
.banner-photo { grid-column: 2; grid-row: 1 / span 3; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }

/* MADE TO ORDER (#1009): a lead time as a stall writes it — a bold label and
   a row of filled squares, one a week. */
.made-in { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.25rem 0 0.75rem; font-weight: 700; font-size: 0.9rem; }
.made-in-scale { display: inline-flex; gap: 2px; }
.made-in-mark { inline-size: 0.6rem; block-size: 0.6rem; border-radius: 2px; background: var(--line); }
.made-in-mark-on { background: var(--accent); }
.with-you-by { margin: 0.5rem 0 0; padding: 0.5rem 0.75rem; border: 1px dashed var(--line); border-radius: var(--radius); font-weight: 600; font-variant-numeric: var(--figures); }

/* TELL ME WHEN IT'S BACK (#1013): the sold-out row's own form, a bordered
   field and a filled button, as the search bar's. */
.tell-me { margin: 0.75rem 0; padding: 0.75rem; border: 1px dashed var(--line); border-radius: var(--radius); }
.tell-me-label { display: block; margin-bottom: 0.4rem; font-weight: 700; }
.tell-me-row { display: flex; gap: 0.5rem; }
.tell-me-row input { flex: 1; min-width: 0; padding: 0.5rem 0.7rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: inherit; font: inherit; }
.tell-me-row button { padding: 0.5rem 0.9rem; border: 0; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; }
.tell-me-note, .tell-me-said, .tell-me-problem { margin: 0.5rem 0 0; font-size: 0.875rem; }
.tell-me-problem { font-weight: 700; color: var(--accent); }


/* ===================================================================
 * THE COUNTER (#1011). Everything below is the boards' layer, written
 * after the rules it refines so it reads in one place.
 * =================================================================== */

body { font-family: var(--face); }
h1, h2, .count-heading, .choices-heading, .foot-name {
  font-family: var(--sign); font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; line-height: 0.95;
}
h1 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); }
.band > h2, .count-heading, .choices-heading { font-size: clamp(1.75rem, 3vw, 2.25rem); }

/* THE MASTHEAD: the sign, the search across the middle, the basket. */
.masthead {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(1rem, 3vw, 2.5rem); align-items: center;
  max-width: var(--wide); margin: 0 auto; padding: 1.1rem var(--gutter); border: 0;
}
body > .masthead { box-shadow: 0 1px 0 var(--line); max-width: none; padding-inline: max(var(--gutter), (100% - var(--wide)) / 2 + var(--gutter)); }
.shop-name { display: inline-flex; align-items: center; gap: 0.75rem; font: 800 1.5rem var(--sign); text-transform: uppercase; text-decoration: none; }
.initials { display: grid; place-items: center; inline-size: 2.75rem; block-size: 2.75rem; background: var(--ink); color: var(--paper); font: 800 1.375rem var(--sign); }
.masthead .search { padding: 0; margin: 0; max-width: 40rem; width: 100%; justify-self: center; gap: 0; }
.masthead .search input { border: 2px solid var(--ink); border-right: 0; border-radius: 0; min-height: 2.75rem; }
.masthead .search button { border-radius: 0; background: var(--ink); color: var(--paper); font: 700 1rem var(--sign); text-transform: uppercase; padding-inline: 1.25rem; }
.basket-link { grid-column: -2; justify-self: end; font: 700 1rem var(--sign); text-transform: uppercase; text-decoration: none; display: inline-flex; gap: 0.5rem; align-items: center; min-height: 2.75rem; }
.basket-count { background: var(--accent); color: var(--accent-ink); padding: 0.1rem 0.45rem; font-family: var(--face); font-weight: 700; }
@media (max-width: 47.99rem) {
  .masthead { grid-template-columns: minmax(0, 1fr) auto; }
  .masthead .search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
}

/* THE TRADE: category tabs down the side on a wide screen, the goods beside. */
.trade { max-width: var(--wide); margin: 0 auto; padding: 1.75rem var(--gutter) 0; }
/* THE GOODS' COLUMN IS A CONTAINER: the register asks how wide IT is, not
 * the window (review of #1011: beside the side tabs at 900px the window said
 * "room for six columns" to a 580px column, and names broke letter by
 * letter). */
.trade > main { min-width: 0; container-type: inline-size; }
.trade .band, .trade .checkout, .trade .detail, .trade .about, .trade .back { padding-inline: 0; max-width: none; }
@media (min-width: 56rem) {
  .trade-sided { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2.5rem; align-items: start; }
  .side { position: sticky; top: 1.5rem; }
  .side .menu ul { display: block; padding: 0; border: 1px solid var(--line); border-bottom: 0; overflow: visible; }
  .side .menu li { border-bottom: 1px solid var(--line); }
  .side .menu a {
    display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 1rem;
    border: 0; border-radius: 0; font: 700 1.0625rem var(--sign); text-transform: uppercase; white-space: normal;
  }
  .side .menu a:hover { background: var(--band); }
  .side .menu a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
}
@media (max-width: 55.99rem) {
  .trade { padding-top: 0; }
  .side { margin-inline: calc(var(--gutter) * -1); border-bottom: 1px solid var(--line); }
  .side .menu ul { padding-inline: var(--gutter); }
  .side .menu a { border-radius: 0; font: 700 0.9375rem var(--sign); text-transform: uppercase; }
}

/* THE BANNER: a ruled panel, the words large and condensed. */
/* The merchant's own hero colour, when they chose one (background() emits
 * --hero-bg and a readable --hero-ink inline). */
.banner { border: 1px solid var(--line); padding: clamp(1.25rem, 3vw, 2.25rem); margin: 0 0 2rem; background: var(--hero-bg, var(--band)); color: var(--hero-ink, var(--ink)); }
.banner-to-list { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.25rem; margin-top: 1rem; background: var(--accent); color: var(--accent-ink); font: 700 1rem var(--sign); text-transform: uppercase; text-decoration: none; border-radius: 0; }
.banner-photo { border-radius: 0; }

/* THE DEALS: hairline cells, four across, a yellow tag on what is reduced. */
.cells { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(13rem, 50%), 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cell { position: relative; display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; padding: 1rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cell-photo { display: block; }
.cell-photo img, .cell-photo .thumb { inline-size: 100%; block-size: auto; aspect-ratio: 1; object-fit: contain; border-radius: 0; }
.cell-title { margin: 0; font: 600 0.9375rem/1.3 var(--face); }
.cell-title a { text-decoration: none; }
.cell-title a:hover { text-decoration: underline; }
.cell .row-price { font: 700 1.25rem var(--face); }
.cell .quick { margin-top: auto; }
.tag { position: absolute; left: 0; top: 0.875rem; z-index: 1; background: var(--tag); color: #111111; font: 800 0.9375rem var(--sign); padding: 0.25rem 0.75rem 0.25rem 0.75rem; clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%); }

/* THE REGISTER: every product as a row of a table — number, photograph,
 * item, stock, price, add — the price column the one that is read. */
.register { width: 100%; border-collapse: collapse; font-variant-numeric: var(--figures); }
.register th { font: 600 0.75rem var(--face); color: var(--ink-soft); text-align: left; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.625rem 0.75rem; border-bottom: 2px solid var(--ink); }
.register td { padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 0.9375rem; }
.register tr:hover td { background: var(--band); }
.register .reg-no { color: var(--ink-soft); inline-size: 3rem; }
.register .reg-photo { inline-size: 4.5rem; }
.register .thumb { inline-size: 3.5rem; block-size: 3.5rem; object-fit: contain; border-radius: 0; display: block; }
.register .reg-item a { font-weight: 600; text-decoration: none; }
.register .reg-item a:hover { text-decoration: underline; }
.reg-note { margin: 0.125rem 0 0; font-size: 0.8125rem; color: var(--ink-soft); }
.register .reg-price, .register th.reg-price { text-align: right; white-space: nowrap; }
.register .reg-price .row-price { margin: 0; font-weight: 700; font-size: 1.0625rem; }
.register .reg-add { text-align: right; inline-size: 7.5rem; }
.reg-gone td { color: var(--ink-soft); }
.stock { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; white-space: nowrap; }
.stock::before { content: ""; inline-size: 0.5rem; block-size: 0.5rem; border-radius: 50%; background: var(--good); }
.stock-out::before { background: #b91c1c; }
.row-price-sale .row-amount { background: var(--tag); color: #111111; padding: 0 0.25rem; }
@container (max-width: 44rem) {
  .register .reg-no, .register .reg-stock { display: none; }
  .register td, .register th { padding-inline: 0.4rem; }
  /* A PHONE'S REGISTER FITS ITS SCREEN: the add column as narrow as its
   * button, the button as wide as its word, the photograph smaller. */
  .register .reg-add { inline-size: 1%; }
  .register .add, .register .add-quiet { width: auto; padding-inline: 0.6rem; }
  .register .reg-photo { inline-size: 3rem; }
  .register .thumb { inline-size: 2.5rem; block-size: 2.5rem; }
  /* THE NAME KEEPS ITS WORDS (measured at 375px: a sale's was-price and
   * saving, kept on one line, took the price column to 160px and broke
   * every product name into a vertical strip of letters). The price column
   * stacks what it carries instead, and the name has a floor. */
  .register .reg-item { min-inline-size: 7rem; }
  .register .from { display: block; font-size: 0.75rem; font-weight: 400; }
  .register .reg-price { white-space: normal; inline-size: 1%; }
  .register .sale { display: flex; flex-direction: column; align-items: flex-end; gap: 0; margin: 0; }
  .register .row-price { white-space: nowrap; }
  .register .add-quiet { white-space: normal; text-align: center; max-inline-size: 5.5rem; }
}
/* THE NARROWEST PHONES: the photograph gives its column to the name. */
@container (max-width: 20rem) {
  .register .reg-photo { display: none; }
}

/* THE BUTTONS: a ruled box; filled in the mark for the one that buys. */
.add, .update, .pay-again {
  border-radius: 0; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
  font: 700 1rem var(--sign); text-transform: uppercase; letter-spacing: 0.02em; min-height: 2.75rem;
}
.add-quiet, .quick .add { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; min-height: 2.5rem; padding: 0 0.9rem; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); text-decoration: none; font: 600 0.875rem var(--face); text-transform: none; }
.quick .add:hover, .add-quiet:hover { background: var(--ink); color: var(--paper); }
.cell .quick .add, .cell .add-quiet { inline-size: 100%; }
/* A deal's own button is the filled one, as the boards draw it. */
.cell .quick .add { background: var(--ink); color: var(--paper); }

/* THE PRODUCT: photographs and the facts side by side. */
@media (min-width: 46rem) { .detail { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 3.5rem; } }
.shot img { border-radius: 0; border: 1px solid var(--line); }
/* The photographs first, on the left, as the boards draw the product; the
 * facts follow them in the document so a buyer reads the name first. */
@media (min-width: 46rem) { .detail .shots { order: -1; } }
.no-photo { display: grid; place-items: center; aspect-ratio: 1; margin: 0; border: 1px solid var(--line); background: var(--band); color: var(--ink-soft); font-size: 0.875rem; }
.detail-price { font: 700 1.75rem var(--face); }
.pick { border-radius: 0; }
.pick:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

/* THE BASKET IS A SHEET, NOT A BAND (the founder, on the first build: it ran
 * the full width of a desktop). A ruled sheet of a sheet's width, and opened
 * from the masthead's Basket it is a drawer over the page's right edge —
 * :target, so it needs no script to open or to close. */
.basket { padding: 1.5rem; background: var(--paper); border: 2px solid var(--ink); border-radius: 0; }
.basket-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.basket-top h2 { font-size: 2rem; margin: 0; }
.basket-close { font-weight: 600; }
.basket .to-checkout .add { width: 100%; }
/* A LINE IN TWO ROWS: the name, the stepper and the money; then the
 * was-price under the money and Remove under the name. */
.basket .basket-line { grid-template-columns: minmax(0, 1fr) auto auto; row-gap: 0.25rem; padding: 0.75rem 0; }
.basket .basket-remove { grid-column: 1; grid-row: 2; justify-self: start; padding-inline: 0; }
.basket .was { grid-column: 3; grid-row: 2; justify-self: end; font-size: 0.8125rem; color: var(--ink-soft); }
/* ONLY EVER A DRAWER (the founder, on the closed state: a box sat in the
 * page's flow at the bottom right, out of place on every page). Hidden
 * until the masthead's Basket opens it, at every width: over the page's
 * right edge on a wide screen, the whole width on a phone. :target, so it
 * needs no script to open or to close. */
.basket:not(:target) { display: none; }
.basket:target {
    position: fixed; inset: 0 0 0 auto; z-index: 50; margin: 0; width: min(26rem, 100%); max-width: none;
    overflow-y: auto; border-width: 0 0 0 2px; box-shadow: -24px 0 48px rgb(17 17 17 / 0.2);
}

/* CHECKOUT: the questions, and the order in a ruled box that stays in view. */
.checkout { max-width: none; }
.checkout .pay { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.checkout .questions > .choices-heading { margin: 0 0 0.75rem; }
.checkout .questions > .choices-heading:not(:first-child) { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.checkout .order { position: sticky; top: 1.5rem; border: 2px solid var(--ink); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.checkout .order .add { width: 100%; }
.checkout .total-due { border-top: 2px solid var(--ink); font: 700 1.625rem var(--sign); }
.field input, .field select, .field textarea { border: 1px solid var(--ink); border-radius: 0; min-height: 2.75rem; }
@media (max-width: 56rem) { .checkout .pay { grid-template-columns: 1fr; gap: 1.5rem; } .checkout .order { position: static; } }

/* THE FOOT: a heavy rule, then columns. */
.foot { max-width: var(--wide); margin: 5rem auto 0; padding: 0 var(--gutter); border-top: 2px solid var(--ink); text-align: left; background: none; }
.foot-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; padding: 2.5rem 0 2rem; font-size: 0.875rem; line-height: 1.7; }
.foot-name { font-size: 1.75rem; margin: 0; }
.foot-head { font-weight: 700; margin: 0 0 0.4rem; }
.foot .contact-ways { justify-content: flex-start; }
.foot .by { display: flex; justify-content: space-between; gap: 1rem; padding: 0.9rem 0 1.25rem; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--ink-soft); }
@media (max-width: 48rem) { .foot-cols { grid-template-columns: 1fr; } }

/* The announcement: a strip in the mark, as the boards open. */
.announcement { font-weight: 500; font-size: 0.875rem; padding: 0.55rem var(--gutter); }

/* THE TABS ACROSS THE TOP, on a product's own page. */
.across { border-bottom: 1px solid var(--line); }
.across .menu ul { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); gap: 0; }
.across .menu a { border: 0; border-radius: 0; padding: 0.7rem 0.9rem; font: 700 1rem var(--sign); text-transform: uppercase; }
.across .menu a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }

/* THE STEPS NUMBERED, as the boards' checkout: 01, 02, 03 beside each
 * heading, under a heavy rule. */
.checkout .questions { counter-reset: step; }
.checkout .questions > .choices-heading { counter-increment: step; display: flex; gap: 1.25rem; align-items: baseline; }
.checkout .questions > .choices-heading::before { content: "0" counter(step); font: 800 1.75rem var(--sign); min-inline-size: 2.5rem; }
.checkout .questions > .choices-heading:not(:first-child) { border-top: 2px solid var(--ink); }

/* HIDDEN MEANS HIDDEN (review of #1011): a rule that sets `display` beats the
 * browser's own [hidden], so the basket link showed "Basket 0" with no basket
 * and no script. Every `hidden` in this theme is a promise the markup makes. */
[hidden] { display: none !important; }
.checkout .pay:not(:has(.order)) { display: block; }

/* ===== The page review (the founder: check every page's alignment) ===== */

/* THE FOOT'S RULE IS THE CONTENT'S WIDTH: drawn on the padded box it ran
 * 20px past the content on each side. */
.foot { border-top: 0; }
.foot-cols { border-top: 2px solid var(--ink); }

/* THE BUTTON A BREATH BELOW THE SALE LINE: it sat 4px under it. */
.buy .add { margin-top: 0.75rem; }

/* ON A PHONE (the page review): THE FIRST PHOTOGRAPH first, as the board
 * has it, then the title, the price and the button, then the rest of the
 * gallery. Not the whole gallery first (review: four photographs put the
 * button 2.6 screens down, the very scroll this theme exists to spare a
 * buyer). The masthead stays sticky: its basket count is the only thing a
 * row's Add changes that a buyer can see, and the drawer behind it is the
 * only way to checkout. And a breath between the tabs and the page. */
@media (max-width: 45.99rem) {
  .detail { display: flex; flex-direction: column; gap: 1.25rem; }
  .detail .shots { display: contents; }
  .detail .shots > :first-child { order: -1; }
  /* A placeholder does not lead: with no photograph the title comes first. */
  .detail .shots > .no-photo:first-child { order: 0; }
  .trade { padding-top: 1rem; }
}

/* THE DRAWER'S CLOSE AT A THUMB'S SIZE (it closes a full-screen overlay on a
 * phone), and its scroll kept inside it. */
.basket-close { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: 0.5rem; margin-inline-end: -0.5rem; }
.basket:target { overscroll-behavior: contain; }

/* THE SHOP'S TERMS (#1097): read as prose, so held to the reading measure
 * inside the wide band the page shares with tracking, with its sections
 * headed the way that page heads its own. */
.terms { max-width: var(--measure); }
.terms p { line-height: 1.6; margin: 0 0 0.75rem; overflow-wrap: anywhere; }
.terms .choices-heading { margin: 1.75rem 0 0.5rem; }
/* Its link sits in the order summary, which some themes draw dark: it takes
 * the hint's own colour rather than the browser's blue. */
.shop-terms a { color: inherit; text-decoration: underline; }

/* Offered, not asked (#1514). */
.offered { margin: 0.6rem 0; }
.offered .field { margin-top: 0.6rem; }

/* THE PROMO CODE (#1525): the field and its Apply side by side, the taken
   code said under it, and its line in the totals in the shop's own colour. */
.code-row { display: flex; gap: 0.5rem; align-items: stretch; }
.code-row input { flex: 1 1 auto; min-width: 0; text-transform: uppercase; }
.code-row .code-apply { flex: none; inline-size: auto; min-height: 2.75rem; padding-inline: 1.25rem; }
.code-taken { color: var(--accent); }
.total-discount dd { color: var(--accent); }

.timeline{list-style:none;margin:.75rem 0 1.25rem;padding:0}
.timeline-step{position:relative;display:flex;gap:.75rem;padding-bottom:1rem}
.timeline-step:last-child{padding-bottom:0}
.timeline-step:not(:last-child)::before{content:"";position:absolute;left:calc(.5rem - 1px);top:1.25rem;bottom:.125rem;width:2px;background:var(--line)}
.timeline-done:not(:last-child)::before,.timeline-done .timeline-mark{background:var(--accent)}
.timeline-mark{flex:none;box-sizing:border-box;width:1rem;height:1rem;margin-top:.1875rem;border-radius:50%;border:2px solid var(--ink-soft)}
.timeline-done .timeline-mark,.timeline-now .timeline-mark{border-color:var(--accent)}
.timeline-now .timeline-mark{box-shadow:inset 0 0 0 3px var(--accent)}
.timeline-words{display:flex;flex-direction:column;gap:.125rem;min-width:0}
.timeline-next .timeline-title,.timeline-at{color:var(--ink-soft)}
.timeline-now .timeline-title{font-weight:600}
.timeline-at{font-size:.875em;font-variant-numeric:tabular-nums}
