/* The pages to read: a seller's door and its products, the rules, the terms, the numbers, the pages for a store's
   owner and for people with an assistant. One sheet of paper on the water; the shared look is base.css. */

.doc {
  flex: none;
  width: calc(100% - 2 * var(--gutter));
  max-width: 780px;
  margin: clamp(20px, 5vw, 56px) auto clamp(40px, 7vw, 80px);
  padding: clamp(22px, 5vw, 46px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-2);
}
:root[data-theme="dark"] .doc { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.doc > :first-child { margin-top: 0; }
.doc > :last-child { margin-bottom: 0; }

h1 { margin: 0 0 10px; font-size: clamp(28px, 5vw, 40px); line-height: 1.08; letter-spacing: -0.045em; font-weight: 660; color: var(--ink); text-wrap: balance; }
h2 { margin: 34px 0 8px; font-size: 21px; line-height: 1.2; letter-spacing: -0.03em; font-weight: 640; color: var(--ink); }
p { margin: 0 0 14px; color: var(--ink-2); line-height: 1.6; text-wrap: pretty; }
.by { margin: 0 0 22px; font-size: 17px; line-height: 1.55; color: var(--muted); }
.text { white-space: pre-line; margin: 26px 0 0; }
.note { margin: 12px 0 0; font-size: 14px; color: var(--muted); }

/* a product's price and stock, as the marketplace's pages show them too */
.price { margin: 22px 0 2px; font-family: var(--font-mono); font-size: 34px; font-weight: 580; letter-spacing: -0.045em; line-height: 1.1; color: var(--ink); }
.stock { margin: 0 0 18px; font-size: 15px; font-weight: 520; color: var(--good); }
.elsewhere { margin: 4px 0 6px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
/* a document of the project as a page (/channel): headings, tables that scroll on a phone, lists with bullets */
.docbody h2 { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); }
.docbody h3 { margin: 26px 0 8px; font-size: 17px; line-height: 1.3; letter-spacing: -0.02em; font-weight: 640; color: var(--ink); }
.docbody .table { overflow-x: auto; margin: 6px 0 18px; border: 1px solid var(--line); border-radius: 14px; }
.docbody table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.docbody th, .docbody td { padding: 10px 12px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); color: var(--ink-2); }
.docbody th { border-top: 0; font-weight: 600; color: var(--ink); background: var(--surface-2); }
/* a field's name is never broken inside: the names wrap between one another */
.docbody td:first-child code { white-space: nowrap; overflow-wrap: normal; }
.docbody ul.doc-list { list-style: disc; margin: 4px 0 16px; padding-left: 22px; }
.docbody ul.doc-list li { display: list-item; padding: 3px 0; border: 0; line-height: 1.6; }
.docbody pre { margin: 6px 0 18px; }
/* A seller's door (hosted.ts): the product, the door's other products, paying, paid. The product is the biggest
   thing on its page; then the price, the name, a few facts of the door's own, and one button that names the sum. */
.doc.doc-wide { max-width: 1040px; }
.door-product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.door-product.no-pic { grid-template-columns: minmax(0, 620px); }
.door-gallery { position: sticky; top: 86px; min-width: 0; }
/* the picture's square is there before the picture is: nothing under it moves when it comes */
.door-pic { aspect-ratio: 1 / 1; background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.door-pic img { display: block; width: 100%; height: 100%; object-fit: contain; }
.door-pics { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.door-pics li { display: block; padding: 0; border: 0; }
.door-pics img { display: block; width: 76px; height: 76px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.door-info { min-width: 0; }
.door-price { margin: 2px 0 8px; font-size: clamp(36px, 4.2vw, 46px); font-weight: 680; letter-spacing: -0.045em; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--ink); }
.door-info h1 { margin: 0 0 8px; font-size: clamp(20px, 2.3vw, 26px); line-height: 1.25; letter-spacing: -0.025em; font-weight: 600; }
.door-info .stock { margin: 0 0 18px; font-size: 14.5px; }
.door-info .elsewhere { margin: -6px 0 18px; }
/* A card's options (size, colour): a row of choices each; the one picked is filled, one with nothing in stock is struck. */
.door-opts { margin: 0 0 16px; }
.door-opts-name { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.door-opts-name b { font-weight: 620; color: var(--ink); }
.door-opts-row { display: flex; flex-wrap: wrap; gap: 8px; }
.door-opt { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 44px; padding: 0 14px; font-size: 15px; font-weight: 560; color: var(--ink); text-decoration: none; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; }
.door-opt:hover { border-color: var(--brand-line); }
.door-opt.on { color: var(--brand-ink); background: var(--brand-soft); border: 2px solid var(--brand); padding: 0 13px; }
.door-opt.none { color: var(--muted); text-decoration: line-through; background: var(--surface-2); }
.door-facts { margin: 0 0 20px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; }
.door-facts > div { display: flex; justify-content: space-between; gap: 18px; padding: 13px 16px; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.4; }
.door-facts > div:first-child { border-top: 0; }
.door-facts dt { flex: none; color: var(--muted); }
.door-facts dd { margin: 0; text-align: right; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.door-facts dd a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.door-facts dd a:hover { color: var(--brand-ink); }
.door-buy .pay { width: 100%; min-height: 56px; border-radius: 16px; }
/* Buy now, or put it in the cart with the seller's other products (one payment, one delivery). */
.door-buy[data-item] { display: flex; gap: 10px; align-items: stretch; }
.door-buy[data-item] .pay { flex: 1 1 auto; width: auto; }
.door-buy .act.door-cart { flex: 0 0 auto; min-height: 56px; padding: 0 18px; border-radius: 16px; font-size: 15px; }
.door-trust { margin: 12px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.door-info .text { margin: 22px 0 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15.5px; }
.door-more { margin-top: clamp(32px, 5vw, 56px); }
.door-more h2 { margin: 0 0 16px; }
.door-more .note a { color: var(--ink-2); }
/* the door's products as pictures: four in a row, two on a phone */
.door-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 16px; }
.door-tile { display: grid; align-content: start; gap: 3px; min-width: 0; color: var(--ink); text-decoration: none; }
.door-tile-pic { display: block; aspect-ratio: 1 / 1; margin-bottom: 7px; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.door-tile-pic img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform 0.25s ease; }
.door-tile:hover .door-tile-pic img { transform: scale(1.03); }
.door-tile-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 14.5px; font-weight: 520; line-height: 1.35; color: var(--ink-2); }
.door-tile:hover .door-tile-title { color: var(--brand-ink); }
.door-tile-price { font-size: 15px; font-weight: 660; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--ink); }
.door-tile:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 16px; }
.doc-door > h1 + .door-grid, .doc-door > .by + .door-grid { margin-top: 26px; }

/* paying on the network's own page: the order in short and who gets the money on the left, Stripe's own form on the
   right. On a phone it is one column, and the form is as wide as the screen. */
#checkout { min-height: 420px; margin: 0; }
.checkout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(22px, 4vw, 48px); align-items: start; }
.checkout-what { position: sticky; top: 86px; min-width: 0; }
.checkout-what h1 { margin: 0 0 18px; font-size: clamp(22px, 3vw, 30px); }
.checkout-sum { display: flex; gap: 12px; align-items: center; margin: 0 0 14px; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; }
.checkout-sum img { flex: none; width: 56px; height: 56px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.checkout-id { flex: 1 1 auto; min-width: 0; }
.checkout-title, .checkout-seller { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.checkout-title { font-size: 15.5px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.checkout-seller { margin-top: 2px; font-size: 13.5px; line-height: 1.3; color: var(--muted); }
.checkout-total { flex: none; margin: 0; font-size: 16px; font-weight: 640; font-variant-numeric: tabular-nums; color: var(--ink); }
.checkout-qty { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 15px; color: var(--ink-2); }
.checkout-each { font-size: 13.5px; color: var(--muted); }
.qty { display: inline-flex; align-items: center; margin-left: auto; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.qty-step { display: grid; place-items: center; width: 44px; height: 44px; font-size: 20px; line-height: 1; color: var(--ink); text-decoration: none; }
a.qty-step:hover { background: var(--brand-soft); color: var(--brand-ink); }
.qty-step.off { color: var(--line-2); }
.qty-n { min-width: 34px; text-align: center; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.checkout-lines { display: grid; grid-template-columns: 1fr max-content; gap: 8px 18px; margin: 0 0 16px; padding: 14px 0 0; border-top: 1px solid var(--line); font-size: 15px; }
.checkout-lines dt { color: var(--muted); }
.checkout-lines dd { margin: 0; text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.checkout-lines .sum { font-size: 19px; font-weight: 660; letter-spacing: -0.01em; color: var(--ink); }
/* The card is held until the seller confirms the piece (holds.ts): one calm line next to the sum. */
.checkout-hold { position: relative; margin: -4px 0 14px; padding: 0 0 0 26px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.checkout-hold::before { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--brand, #0a6cf5); box-sizing: border-box; background: radial-gradient(circle at 50% 50%, var(--brand, #0a6cf5) 0 3px, transparent 3.5px); }
.checkout-trust { margin: 0 0 14px; padding: 13px 15px; font-size: 14.5px; font-weight: 560; line-height: 1.45; color: var(--ink); background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 14px; }
.checkout-points { margin: 0; padding: 0; list-style: none; }
.checkout-points li { display: block; position: relative; margin: 0; padding: 4px 0 4px 24px; border: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.checkout-points li::before { content: "✓"; position: absolute; left: 2px; top: 4px; font-weight: 700; color: var(--good); }
/* Stripe's form is a light one whatever the theme: its sheet stays white, and the words on it dark */
.checkout-form { min-width: 0; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 20px; }
.checkout-form .note { margin: 6px 12px 10px; color: #5b6c84; }
.checkout-form .note a { color: #0052cc; }

/* paid: the mark, the sum, to whom; what happens next; the way back to the search */
.doc.doc-paid { max-width: 560px; margin-top: clamp(16px, 3vw, 36px); padding: clamp(22px, 4vw, 36px); }
.paid-head { margin: 0 0 20px; text-align: center; }
.paid-mark { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 14px; color: var(--surface-solid); background: var(--good); border-radius: 50%; }
.paid-head h1 { margin: 0 0 6px; font-size: 19px; line-height: 1.2; letter-spacing: -0.01em; font-weight: 640; color: var(--good); }
.paid-sum { margin: 0 0 12px; font-size: clamp(42px, 10vw, 54px); font-weight: 680; letter-spacing: -0.045em; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--ink); }
.paid-to { max-width: 42ch; margin: 0 auto; font-size: 15px; line-height: 1.5; color: var(--muted); }
.doc-paid h2 { margin: 24px 0 6px; font-size: 17px; }
ol.next { margin: 0; padding: 0 0 0 22px; }
ol.next li { display: list-item; padding: 4px 0; border: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.paid-go { display: grid; gap: 10px; margin: 24px 0 0; }
.paid-go .pay { width: 100%; }
.paid-more { display: flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 18px; font-size: 15.5px; font-weight: 600; color: var(--ink); text-align: center; text-decoration: none; background: var(--surface); border: 1px solid var(--line-2); border-radius: 15px; }
.paid-more:hover { border-color: var(--brand-line); color: var(--brand-ink); }
.doc-paid .note { margin-top: 16px; text-align: center; }

@media (max-width: 900px) {
  .door-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* A phone: the sheet is the screen. The picture goes from edge to edge, the button that names the sum stays at the
   bottom in the place of the tabs, and Stripe's form is as wide as the screen. */
@media (max-width: 760px) {
  .doc.doc-door, .doc.doc-pay { width: 100%; margin: 0; padding: 20px 16px 30px; border-width: 0; border-radius: 0; box-shadow: none; }
  /* no blur behind the sheet here: a blurred sheet would hold the button to itself, not to the screen */
  :root[data-theme="dark"] .doc.doc-door { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .door-product { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .door-gallery { position: static; margin: -20px -16px 18px; }
  .door-pic { border-width: 0; border-radius: 0; }
  .door-pics { padding: 0 16px; }
  .door-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .page.page-buy { padding-bottom: calc(75px + env(safe-area-inset-bottom, 0px)); }
  .page-buy .tabs, .page-pay .tabs { display: none; }
  .door-buy {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    -webkit-backdrop-filter: saturate(1.5) blur(16px);
    backdrop-filter: saturate(1.5) blur(16px);
    border-top: 1px solid var(--line-2);
  }
  .door-buy .pay { min-height: 54px; }
  .door-buy .act.door-cart { width: 54px; min-height: 54px; padding: 0; }
  .door-buy .act.door-cart .lbl { display: none; }
  .door-trust { margin-top: 0; }
  .page.page-pay { padding-bottom: 0; }
  .doc.doc-pay { padding-top: 18px; }
  .checkout { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .checkout-what { display: contents; }
  .checkout-what h1 { margin-bottom: 14px; }
  .checkout-form { order: 2; margin: 2px -16px 0; padding: 0; border-width: 1px 0; border-radius: 0; }
  .checkout-points { order: 3; margin-top: 16px; }
}
.pay { min-height: 54px; padding: 0 26px; font-size: 17px; border-radius: 15px; }
button.pay { font-family: inherit; }

/* what is typed and what is quoted */
pre,
.code {
  margin: 8px 0 16px;
  padding: 14px 16px;
  font: 13.5px/1.55 var(--font-mono);
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
code { padding: 1px 6px; font: 13.5px/1.4 var(--font-mono); color: var(--ink); background: var(--brand-soft); border-radius: 6px; overflow-wrap: anywhere; }
pre code { padding: 0; background: none; }
input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  margin: 0 0 12px;
  padding: 13px 15px;
  font: inherit;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { margin-bottom: 16px; min-height: 96px; }
input[type="text"]:focus-visible,
input[type="password"]:focus-visible,
textarea:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.said { padding: 13px 16px; border: 1px solid var(--brand-line); border-radius: 14px; background: var(--brand-soft); color: var(--ink); }
/* a rule to pick: the mark, then the rule's words in one block beside it; a label over a field stays plain text */
.pickrule { display: block; padding: 11px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.pickrule:has(> input) { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; cursor: pointer; }
.pickrule > input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--brand); }
/* many choices at once (the kinds of product a seller has): two columns of boxes, one on a phone */
.picks { columns: 2; column-gap: 22px; margin: 0 0 18px; }
.picks label { display: block; padding: 7px 0; color: var(--ink-2); break-inside: avoid; }
li form { margin: 0; }
li form button { min-height: 40px; padding: 0 16px; font: inherit; font-size: 14.5px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; }
@media (max-width: 560px) {
  .picks { columns: 1; }
}

/* lists: steps are numbered, everything else is rows with what it costs or counts at the end */
ol { margin: 8px 0 16px; padding-left: 22px; color: var(--ink-2); }
ol li { display: list-item; padding: 3px 0; border: 0; }
ol li::marker { color: var(--brand-ink); font-weight: 600; }
ul { list-style: none; margin: 24px 0 0; padding: 0; }
li { display: flex; gap: 14px; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
li a { color: var(--ink); font-weight: 540; text-decoration: none; }
li a:hover { color: var(--brand-ink); text-decoration: underline; }
li span { font-family: var(--font-mono); font-size: 14.5px; letter-spacing: -0.02em; color: var(--muted); white-space: nowrap; }
/* rows whose count says several things (the demand index): the count wraps under the name on a narrow screen */
.rows li { flex-wrap: wrap; row-gap: 4px; }
.rows li span { white-space: normal; text-align: right; margin-left: auto; }

@media (max-width: 560px) {
  .doc { width: calc(100% - 20px); border-radius: 22px; }
  .pay { width: 100%; }
}

/* A seller's shop window (hosted.ts `sellerPage`): who they are, what buyers said and the eBay record they chose to
   show, their terms, a search of their own products, the products, the reviews, and a code a phone opens it with. */
.shop-head { display: flex; gap: 22px; align-items: flex-start; }
.shop-mark { flex: none; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 34px; font-weight: 700; letter-spacing: -0.03em; box-shadow: var(--shadow-2); }
:root[data-theme="dark"] .shop-mark { color: #00122b; }
.shop-id { min-width: 0; }
.shop-id h1 { margin: 4px 0 6px; }
.shop-about { margin: 0 0 14px; max-width: 70ch; font-size: 16.5px; line-height: 1.55; color: var(--muted); }
.shop-trust { display: flex; flex-wrap: wrap; gap: 8px; }
.trust-rate, .trust-none, .trust-ebay, .trust-fee { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px; font-size: 14px; line-height: 1.3; color: var(--ink-2); text-decoration: none; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.trust-rate b { font-weight: 680; color: var(--ink); font-variant-numeric: tabular-nums; }
a.trust-rate:hover, a.trust-ebay:hover { border-color: var(--brand-line); color: var(--brand-ink); }
.trust-none { color: var(--muted); }
.trust-src { font-weight: 680; color: var(--ink); white-space: nowrap; }
.trust-ebay::after { content: "↗"; font-size: 13px; color: var(--muted); }
.trust-fee { color: var(--good); border-color: transparent; background: transparent; padding-left: 4px; }
.shop-terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 24px 0 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.shop-terms > div { padding: 13px 16px; border-left: 1px solid var(--line); }
.shop-terms > div:first-child { border-left: 0; }
.shop-terms dt { font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.shop-terms dd { margin: 4px 0 0; font-size: 14.5px; font-weight: 560; line-height: 1.4; color: var(--ink); }
.shop-find { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: space-between; margin: 28px 0 20px; }
.shop-find form { display: flex; gap: 8px; flex: 1 1 320px; max-width: 480px; }
.shop-find input[type="search"] { flex: 1 1 auto; min-width: 0; height: 46px; padding: 0 15px; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; }
.shop-find input[type="search"]:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.shop-find button { flex: none; height: 46px; padding: 0 18px; font: inherit; font-size: 15px; font-weight: 620; color: var(--btn-ink); background: var(--btn); border: 0; border-radius: 14px; box-shadow: var(--btn-shadow); cursor: pointer; }
.shop-sort { display: flex; flex-wrap: wrap; gap: 6px; }
.shop-sort a { padding: 8px 13px; font-size: 14px; font-weight: 540; color: var(--ink-2); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; }
.shop-sort a:hover { border-color: var(--line-2); color: var(--ink); }
.shop-sort a[aria-current] { color: var(--brand-ink); background: var(--brand-soft); border-color: var(--brand-line); }
.shop-found { margin: -6px 0 18px; font-size: 14.5px; color: var(--muted); }
.shop-found a { color: var(--brand-ink); }
.doc-shop .door-grid { margin-top: 4px; }
.doc-shop .shop-head + .door-grid, .doc-shop .shop-terms + .door-grid { margin-top: 28px; }

.stars { display: inline-block; flex: none; vertical-align: -2px; }
.stars-off { fill: var(--line-2); }
.stars-on { fill: var(--amber); }
.shop-reviews { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: 76px; }
.reviews-head { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.reviews-head h2 { margin: 0; }
.reviews-sum { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; color: var(--muted); }
.reviews-sum b { font-size: 17px; font-weight: 680; color: var(--ink); }
.reviews-empty { max-width: 68ch; font-size: 15.5px; color: var(--ink-2); }
.reviews-ebay { margin: 0; }
.review-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.review { padding: 16px 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; }
.review-top { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.review-who { font-size: 13.5px; color: var(--muted); }
.review-text { margin: 10px 0 10px; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); overflow-wrap: anywhere; }
.review-what { margin: 8px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.review-ok { font-weight: 640; color: var(--good); }
.review-ok::before { content: "✓ "; }
.shop-share { display: flex; gap: 22px; align-items: center; margin-top: 40px; padding: 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 20px; }
.shop-qr { flex: none; display: block; width: 132px; height: 132px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.shop-share h2 { margin: 0 0 6px; font-size: 18px; }
.shop-share p { margin: 0 0 6px; font-size: 14.5px; color: var(--muted); }
.shop-share .shop-url { font-family: var(--font-mono); font-size: 14.5px; letter-spacing: -0.02em; color: var(--ink); overflow-wrap: anywhere; }
/* on a product's page the seller's stars and eBay record sit in the facts, as plain words */
.fact-rate { display: block; margin-top: 4px; }
.door-facts .trust-rate, .door-facts .trust-ebay { min-height: 0; padding: 0; background: none; border: 0; font-size: 13.5px; font-weight: 540; }
.door-facts .trust-ebay { gap: 4px; }
.door-product + .shop-reviews { margin-top: 48px; }

/* rating a seller: five stars to press, a few words, a name to sign with */
.review-order { margin: 0 0 20px; }
.star-pick { margin: 0 0 6px; padding: 0; border: 0; }
.star-pick legend { margin: 0 0 6px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.star-row { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-row label { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; cursor: pointer; }
.star-row svg { width: 40px; height: 40px; fill: var(--line-2); transition: fill 0.12s ease, transform 0.12s ease; }
.star-row input:checked ~ label svg, .star-row label:hover svg, .star-row label:hover ~ label svg { fill: var(--amber); }
.star-row label:hover svg { transform: scale(1.06); }
.star-row input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }
.review-label { display: block; margin: 16px 0 6px; font-size: 14.5px; font-weight: 600; color: var(--ink); }

@media (max-width: 760px) {
  /* the letter beside the name, then what the seller says of the shop and the trust lines as wide as the screen */
  .shop-head { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px 14px; align-items: center; }
  .shop-id { display: contents; }
  .shop-mark { width: 52px; height: 52px; font-size: 24px; }
  .shop-id h1 { margin: 0; font-size: clamp(26px, 7vw, 32px); }
  .shop-about, .shop-trust { grid-column: 1 / -1; }
  .shop-about { margin: 0; font-size: 16px; }
  .trust-since { display: none; }
  /* on a phone the products come first: the seller's terms follow them, before the reviews */
  .doc-shop { display: flex; flex-direction: column; }
  .doc-shop > .shop-terms { order: 1; margin-top: 28px; }
  .doc-shop > .shop-reviews { order: 2; }
  .doc-shop > .shop-share { order: 3; }
  .shop-terms { grid-template-columns: minmax(0, 1fr); }
  .shop-terms > div { display: flex; gap: 14px; justify-content: space-between; border-left: 0; border-top: 1px solid var(--line); }
  .shop-terms > div:first-child { border-top: 0; }
  .shop-terms dt { flex: none; padding-top: 2px; }
  .shop-terms dd { margin: 0; text-align: right; }
  .shop-find { margin: 22px 0 16px; }
  .shop-find form { flex-basis: 100%; max-width: none; }
  .shop-sort { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .shop-sort a { flex: none; }
  .review-list { grid-template-columns: minmax(0, 1fr); }
  .shop-share { gap: 16px; padding: 14px; }
  .shop-qr { width: 108px; height: 108px; }
}
