/* Printmenship on the taste-skill kit (public/assets). The :root block is start.mjs's, as printed
   (palette white-mint-tiles, type archivo, radius soft); the font itself is self-hosted by next/font,
   since the site's CSP keeps fonts on its own origin. Below it: the few rules the kit leaves to the
   page, then the store, product, cart, checkout and order pages, all on the kit's tokens. */

/* the palette, fonts and type settings live in brand.css, shared with the admin panel */

/* ------------------------------------------------------------------ page-level additions */

/* the mint mark disappears on white: in the bar it takes the ink (the footer's dark ground keeps the mint) */
.nav .mark { background: var(--ink); }
/* the Printmenship badge (Logo/kit): one colour, cut-outs show the ground. Ink in the bar, the ground's text colour
   in the footer (white on charcoal). A touch larger than the kit's 22px dealt marks: the hexagon needs the room. */
.mark[data-mark="printmenship"] { --mark: url("/assets/brand/printmenship-mark.svg"); width: 26px; height: 26px; }
.nav .mark[data-mark="printmenship"] { background: var(--ink); }
.footer__mark .mark[data-mark="printmenship"], .footer .nav__logo .mark[data-mark="printmenship"] {
  background: currentColor; width: 1em; height: 1em; }
@media (max-width: 639px) { .nav__logo .mark[data-mark="printmenship"] { width: 22px; height: 22px; } }

/* the cart in the bar: a word and its count on a desktop, the icon alone on a phone */
.nav__cart { gap: var(--s-2); }
.nav__cart-icon { display: none; }
.nav__count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums;
}
@media (max-width: 1023px) {
  /* a shop keeps its cart in reach: the cart stays in the bar beside the menu button */
  .nav:not(.is-open) .nav__actions > .nav__cart { display: inline-flex; }
}
@media (max-width: 639px) {
  .nav:not(.is-open) .nav__actions > .btn--primary { display: none; }
  .nav:not(.is-open) .nav__actions > .nav__cart { width: 44px; height: 44px; justify-content: center; padding: 0; position: relative; }
  .nav:not(.is-open) .nav__cart .nav__cart-icon { display: block; }
  .nav:not(.is-open) .nav__cart .nav__cart-label { display: none; }
  .nav:not(.is-open) .nav__cart .nav__count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; font-size: 11px; padding: 0 5px; }
  .nav:not(.is-open) .nav__cart::before { display: none; }
}

/* the range: the category list in two columns, each row closed by a hairline */
.range-list { columns: 2; column-gap: var(--gutter); margin: 0; }
.range-list li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.range-list a {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 48px;
  font-size: var(--t-body); font-weight: 500; transition: color var(--dur) var(--ease);
}
.range-list a::after { content: "\2192"; color: var(--muted); transition: transform var(--dur) var(--ease), color var(--dur) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .range-list a:hover::after { transform: translateX(3px); color: var(--ink); }
}
.range-more { margin-top: var(--s-6); }
.range-photo { --ratio: 100%; }
.custom-photo { --ratio: 100%; background: #eef2f7; }
@media (max-width: 1023px) { .custom-photo { --ratio: 62%; } }
@media (max-width: 1023px) {
  .range-photo, .custom-photo { margin-top: var(--s-7); }
  .range-photo { --ratio: 62%; }
}
@media (max-width: 639px) {
  .range-list { columns: 1; }
  .range-photo { --ratio: 75%; }
}
.tile--square { --tile-ratio: 1 / 1; }
.product-row .tile__media { background: var(--surface); }

/* the statement's label sits 24px over the sentence */
.statement .t-label { color: var(--muted); margin-bottom: var(--s-5); }

/* ------------------------------------------------------------------ inner pages
   Store, product, cart, checkout and order pages are tools, not landing screens: they keep the kit's
   type, colours, buttons and edges, and run at their natural height under the fixed bar. */
.page { padding: calc(var(--nav) + var(--s-8)) 0 var(--s-9); }
@media (max-width: 639px) { .page { padding-top: calc(var(--nav) + var(--s-6)); padding-bottom: var(--s-8); } }

.page-head { display: grid; gap: var(--s-4); margin-bottom: var(--s-7); max-width: 760px; }
.page-head h1 { font-size: var(--t-h2); line-height: 1.08; letter-spacing: var(--display-tracking); }
.page-head p { font-size: var(--t-lead); line-height: 1.5; color: var(--ink); max-width: 60ch; }
.page-head .muted { color: var(--muted); }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-5); padding: 0; font-size: var(--t-small); color: var(--muted); }
.crumbs a { color: var(--muted); transition: color var(--dur) var(--ease); }
.crumbs a:hover { color: var(--ink); }
.crumbs li + li::before { content: "/"; margin-right: var(--s-2); color: var(--line-strong); }
.crumbs [aria-current="page"] { color: var(--ink); }

/* a small label over a title (a product's category): 13px at 500, sentence case, never tracked capitals */
.eyebrow { display: inline-block; font-size: var(--t-label); font-weight: 500; line-height: 1.4; color: var(--muted); }
a.eyebrow:hover { color: var(--ink); }

.stack { display: grid; gap: var(--s-4); }
.row { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.hint { font-size: var(--t-small); color: var(--muted); line-height: 1.5; }
.error-text { font-size: var(--t-small); color: color-mix(in oklab, #d92d20 72%, var(--ink)); font-weight: 500; }
.pm-block { width: 100%; }

/* ------------------------------------------------------------------ store: filters beside the grid */
.store { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-6); align-items: start; }
.store__filters { grid-column: 1 / span 3; }
.store__results { grid-column: 4 / -1; min-width: 0; }
@media (max-width: 1023px) {
  .store__filters, .store__results { grid-column: 1 / -1; }
}

.filters { display: grid; gap: 0; }
.filters__toggle { display: none; }
.filter { padding: var(--s-5) 0; border-top: 1px solid var(--line); }
.filter:first-child { border-top: 0; padding-top: 0; }
.filter h2 { font: 500 var(--t-body)/1.4 var(--font-text); letter-spacing: 0; margin-bottom: var(--s-3); }
.filter ul { display: grid; gap: 0; }
.filter li a {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 36px;
  color: var(--muted); font-size: var(--t-body); transition: color var(--dur) var(--ease);
}
.filter li a:hover, .filter li a[aria-current="true"] { color: var(--ink); }
.filter li a[aria-current="true"] { font-weight: 500; }
.filter li a[aria-current="true"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); margin-right: calc(-1 * var(--s-1)); order: -1; }
.filter li a span:first-child { margin-right: auto; }
.filter .count { font-variant-numeric: tabular-nums; font-size: var(--t-small); color: var(--muted); }
@media (max-width: 1023px) {
  .filters { border: 1px solid var(--line); border-radius: var(--r-md); }
  .filters__toggle {
    display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 var(--s-4);
    font-weight: 500; cursor: pointer; list-style: none;
  }
  .filters__toggle::-webkit-details-marker { display: none; }
  .filters__toggle::after { content: "+"; font-size: 20px; color: var(--muted); }
  .filters[open] > .filters__toggle::after { content: "\2212"; }
  .filters__body { padding: 0 var(--s-4) var(--s-4); }
  .filter:first-child { padding-top: var(--s-4); border-top: 1px solid var(--line); }
}
@media (min-width: 1024px) {
  /* a sidebar on a desktop: shown before the script opens the details element (FiltersPanel) */
  .filters::details-content { content-visibility: visible; display: contents; }
}

.store__bar { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; justify-content: space-between; margin-bottom: var(--s-6); }
.store__count { font-size: var(--t-small); color: var(--muted); }
.search { position: relative; flex: 1 1 320px; max-width: 520px; }
.search input {
  width: 100%; height: 48px; padding: 0 var(--s-4) 0 44px; border: 1px solid var(--field-line); border-radius: var(--r-sm);
  background: var(--bg); color: var(--ink); font: 400 var(--t-body)/1.4 var(--font-text);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.search input:hover, .sort select:hover { border-color: var(--ink); }
.search svg { position: absolute; left: 16px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.sort { display: flex; align-items: center; gap: var(--s-3); font-size: var(--t-small); color: var(--muted); }
.sort select {
  height: 48px; padding: 0 40px 0 var(--s-4); border: 1px solid var(--field-line); border-radius: var(--r-sm); background: var(--bg); color: var(--ink);
  font: 400 var(--t-body)/1.4 var(--font-text); appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.sort noscript .btn { margin-left: var(--s-2); }

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-7) var(--gutter); }
@media (max-width: 1279px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .product-grid { gap: var(--s-6) var(--gutter); } }

.product-card { display: grid; gap: var(--s-3); align-content: start; color: inherit; }
.product-card__media { position: relative; overflow: clip; aspect-ratio: 4 / 5; border-radius: var(--r-md); background: var(--surface); }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .product-card:hover .product-card__media img { transform: scale(1.03); } }
.product-card__flag {
  position: absolute; top: var(--s-3); left: var(--s-3); display: inline-flex; align-items: center; height: 24px; padding: 0 var(--s-2);
  border-radius: var(--r-sm); background: var(--bg); color: var(--ink); font-size: var(--t-label); font-weight: 500;
}
.product-card__meta { display: grid; gap: var(--s-1); }
.product-card__line { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); }
.product-card__line h3 { font: 500 var(--t-body)/1.35 var(--font-text); letter-spacing: 0; }
.product-card__price { flex: none; font-variant-numeric: tabular-nums; font-weight: 500; }
.product-card__price small { font-size: var(--t-label); color: var(--muted); font-weight: 400; margin-right: 4px; }
.product-card__sold { color: var(--muted); font-size: var(--t-small); }

.media-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: color-mix(in oklab, var(--ink) 30%, transparent); }

.empty-state {
  display: grid; gap: var(--s-4); justify-items: start; padding: var(--s-8) var(--s-7);
  background: var(--surface); border-radius: var(--r-lg);
}
.empty-state h2 { font-size: var(--t-h3); }
.empty-state p { color: var(--ink); max-width: 52ch; }
@media (max-width: 639px) { .empty-state { padding: var(--s-7) var(--s-5); } }

/* ------------------------------------------------------------------ product page */
.product-detail { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-7); align-items: start; }
.product-detail > .gallery { grid-column: 1 / span 7; }
.product-detail > .buy-col { grid-column: 9 / -1; display: grid; gap: var(--s-7); }
@media (max-width: 1023px) {
  .product-detail > .gallery, .product-detail > .buy-col { grid-column: 1 / -1; }
}
.gallery { display: grid; gap: var(--s-3); }
.gallery-main { aspect-ratio: 1 / 1; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.thumb {
  width: 72px; height: 72px; padding: 0; border-radius: var(--r-sm); overflow: hidden; cursor: pointer;
  background: var(--surface); border: 1px solid transparent; opacity: .7; transition: opacity var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.thumb:hover { opacity: 1; }
.thumb[aria-pressed="true"] { opacity: 1; border-color: var(--ink); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.buy-box { display: grid; gap: var(--s-6); }
.buy-box h1 { font-size: var(--t-h2); line-height: 1.08; }
.buy-box .summary { font-size: var(--t-lead); line-height: 1.5; }
.price-display { display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; }
.price-display .amount { font-family: var(--font-display); font-size: var(--t-stat); line-height: 1; letter-spacing: var(--display-tracking); font-variant-numeric: tabular-nums; }
.price-display .tax { font-size: var(--t-small); color: var(--muted); }

.option-group { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: var(--s-3); }
.option-group legend { padding: 0; margin-bottom: var(--s-3); font-weight: 500; display: flex; gap: var(--s-2); align-items: baseline; }
.option-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.option-chip {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-4);
  border: 1px solid var(--line-strong); border-radius: var(--r-btn); background: var(--bg); color: var(--ink);
  font: 400 var(--t-body)/1 var(--font-text); cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.option-chip:hover:not(:disabled) { border-color: var(--ink); }
.option-chip:active:not(:disabled) { transform: translateY(1px) scale(.985); }
.option-chip[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.option-chip:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.option-chip .delta { font-size: var(--t-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.option-chip[aria-checked="true"] .delta { color: color-mix(in oklab, var(--bg) 75%, var(--ink)); }
.option-chip-check { display: none; }

.qty { display: inline-flex; align-items: center; height: var(--btn-h); border: 1px solid var(--line-strong); border-radius: var(--r-btn); }
.qty button { width: 44px; height: 100%; border: 0; background: none; color: var(--ink); font-size: 20px; cursor: pointer; }
.qty button:hover:not(:disabled) { background: var(--surface); }
.qty button:disabled { opacity: .35; cursor: not-allowed; }
/* a disabled button (Unavailable, Choose colour, Placing order…) reads as off, not as a live primary action */
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.qty output { min-width: 36px; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }
.buy-actions { display: flex; gap: var(--s-3); align-items: stretch; }
.buy-actions .btn { flex: 1; }
.buy-actions .btn svg:not(.m-arrow) { width: 18px; height: 18px; }

.details { display: grid; gap: var(--s-4); padding-top: var(--s-6); border-top: 1px solid var(--line); }
.details h2 { font: 500 var(--t-lead)/1.4 var(--font-text); letter-spacing: 0; }
.description { white-space: pre-line; line-height: 1.7; max-width: 64ch; }
.notes { display: grid; gap: 0; border-top: 1px solid var(--line); }
.notes li { display: grid; gap: var(--s-1); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.notes strong { font-weight: 500; }
.notes span { color: var(--muted); font-size: var(--t-small); }

/* ------------------------------------------------------------------ cart, checkout, order */
.cart-layout, .checkout-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-6); align-items: start; }
.cart-layout > :first-child, .checkout-layout > :first-child { grid-column: 1 / span 7; }
.cart-layout > :last-child, .checkout-layout > :last-child { grid-column: 9 / -1; }
/* 1024 to 1279: the summary takes five columns, not four, so a line like "1 × Earbud clamshell case" fits */
@media (min-width: 1024px) and (max-width: 1279px) {
  .cart-layout > :last-child, .checkout-layout > :last-child { grid-column: 8 / -1; }
}
@media (max-width: 1023px) {
  .cart-layout > *, .checkout-layout > * { grid-column: 1 / -1 !important; }
}
.box { background: var(--surface); border-radius: var(--r-lg); padding: var(--s-7); }
@media (max-width: 639px) { .box { padding: var(--s-5); } }
.box-title { font: 500 var(--t-lead)/1.4 var(--font-text); letter-spacing: 0; margin-bottom: var(--s-5); }

.cart-line { display: grid; grid-template-columns: 96px 1fr auto; gap: var(--s-4); align-items: start; padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.cart-line:first-child { padding-top: 0; }
.cart-line:last-child { border-bottom: 0; padding-bottom: 0; }
.cart-line .thumb-lg { width: 96px; height: 96px; border-radius: var(--r-md); overflow: hidden; background: var(--bg); }
.cart-line .thumb-lg img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-controls { display: grid; gap: var(--s-2); justify-items: end; }
.cart-line .qty { height: 40px; }
.cart-line .qty button { width: 40px; }
@media (max-width: 639px) {
  .cart-line { grid-template-columns: 72px 1fr; }
  .cart-line .thumb-lg { width: 72px; height: 72px; }
  .cart-line-controls { grid-column: 1 / -1; justify-items: stretch; }
}

.totals { display: grid; gap: var(--s-3); }
.totals .row { justify-content: space-between; flex-wrap: nowrap; }
.totals .grand { padding-top: var(--s-4); border-top: 1px solid var(--line); font-weight: 500; font-size: var(--t-lead); }
.totals .grand span:last-child { font-variant-numeric: tabular-nums; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.form-grid > .field--full { grid-column: 1 / -1; }
@media (max-width: 639px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field label { font-size: var(--t-small); font-weight: 500; }
.field :is(input, select, textarea) { height: 48px; border-color: var(--field-line); }
.field textarea { height: auto; }
.field :is(input, select, textarea):focus { outline: 2px solid var(--action); outline-offset: 0; border-color: var(--action); }
.field :is(input, select, textarea)[aria-invalid="true"] { border: 2px solid color-mix(in oklab, #d92d20 72%, var(--ink)); }
.checkbox { display: inline-flex; align-items: center; gap: var(--s-3); min-height: 44px; cursor: pointer; }
.checkbox input { width: 20px; height: 20px; accent-color: var(--ink); }

.form-error {
  display: grid; gap: var(--s-2); padding: var(--s-4); border-radius: var(--r-md);
  background: color-mix(in oklab, #d92d20 8%, var(--bg)); color: color-mix(in oklab, #d92d20 72%, var(--ink)); font-size: var(--t-small); font-weight: 500;
}
.form-success { padding: var(--s-4); border-radius: var(--r-md); background: color-mix(in oklab, var(--p-accent) 40%, var(--bg)); font-size: var(--t-small); }

.timeline { display: grid; gap: 0; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 var(--s-5) var(--s-7); color: var(--muted); }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 20px; bottom: 0; width: 1px; background: var(--line-strong); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 4px; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--bg); }
.timeline li.done { color: var(--ink); }
.timeline li.done::after { background: var(--ink); border-color: var(--ink); }
.timeline li.current::after { box-shadow: 0 0 0 4px color-mix(in oklab, var(--p-accent) 70%, transparent); }

.toast-region { position: fixed; left: 50%; bottom: var(--s-5); translate: -50% 0; z-index: 60; display: grid; gap: var(--s-2); width: min(92vw, 420px); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-md);
  background: var(--p-inv-bg); color: var(--p-inv-ink); font-size: var(--t-small); font-weight: 500;
}
.toast.is-error { background: color-mix(in oklab, #d92d20 80%, #000); }

.spinner { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: pm-spin .7s linear infinite; }
@keyframes pm-spin { to { transform: rotate(360deg); } }

/* the footer on inner pages: the same columns, no close, natural height */
.site-footer { padding: var(--s-9) 0 var(--s-6); }
.site-footer .closing__links { gap: var(--s-8); }
@media (max-width: 639px) { .site-footer { padding-top: var(--s-8); } }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.6s; }
  .product-card__media img, .range-list a::after { transition: none; }
}

/* the photo hero on its light backdrop: the ground behind the photograph is the backdrop's own grey, so the
   dark words read before the file arrives (the kit's default ground is a near-black for dark crops) */
@media (min-width: 1024px) { .hero--photo[data-tone="light"] { background: #c9d1d2; } }

/* a phone stacks the range's list, the steps, and the questions past one screen (the footer is .g2m):
   each takes two phone screens (--hm), so nothing runs into the next section */
@media (max-width: 639px) {
  #range, #process, #faq { --hm: 2; }
}

/* the cart's toast rises 8px into place once (no library): opacity and a short lift */
.toast { animation: pm-toast-in 260ms var(--ease) both; }
@keyframes pm-toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* ------------------------------------------------------------------ check fixes (consistency.mjs) */
.custom-links { gap: var(--s-6); }
/* the questions' picture: the lattice close-up beside the answers (a plain figure, so the page keeps two
   photo frames, not three) */
.faq-figure { margin: 0; border-radius: var(--r-lg); overflow: clip; background: var(--surface); aspect-ratio: 4 / 3; }
.faq-figure > img { width: 100%; height: 100%; object-fit: cover; }
#faq .section-head p .link { display: inline; }
#faq .section-head p .link::after { content: none; }
@media (max-width: 1023px) { .faq-figure { aspect-ratio: 16 / 9; margin-top: var(--s-7); } }

/* the footer's three link columns end on the right line; on a tablet they share the row in thirds */
@media (min-width: 640px) and (max-width: 1023px) {
  .closing__links .footer__col { grid-column: auto / span 4 !important; }
}

/* the steps, held still: one screen on a tablet (each step a row, its picture at most 22svh), two on a phone
   and under reduced motion, so the next section starts on a whole screen */
@media (max-width: 639px) {
  main > #process[data-moment]:not(.is-live) { height: auto; min-height: calc(2 * 100svh); }
}
@media (prefers-reduced-motion: reduce) {
  main > #process[data-moment] { height: auto; min-height: calc(2 * 100svh); }
}
@media (min-width: 640px) and (max-width: 1023px) {
  #process:not(.is-live) .mo-pc__visual > img { max-height: 16svh; }
  /* the range keeps one tablet screen: its photograph a wide strip under the list */
  .range-photo { --ratio: 40%; }
}

/* below 1024 the close's big button is the page's own button (48px, 16px label), so "Shop the store" reads
   the same in the bar, the hero and the close */
@media (max-width: 1023px) {
  .btn--xl, .btn--xl.btn--wide { width: 100%; height: var(--btn-h); font: 500 var(--t-body)/1 var(--font-text); letter-spacing: 0; }
}
/* the hero's four facts need the full desktop width; from 1024 to 1279 the words keep the first screen alone */
@media (min-width: 1024px) and (max-width: 1279px) { .hero--photo .hero__facts { display: none; } }

/* a phone: the two-screen sections end in a taller picture instead of an empty band, so the space between
   sections stays even (the steps' pictures 4:3, the questions' close-up 4:5) */
@media (max-width: 639px) {
  #process:not(.is-live) .mo-pc__visual > img { aspect-ratio: 4 / 3; max-height: 34svh; }
  .faq-figure { aspect-ratio: 4 / 5; }
}

/* a tablet: the questions and their picture stack past one screen, so the section takes two there */
@media (min-width: 640px) and (max-width: 1023px) { #faq { --h: 2; } }
@media (min-width: 640px) and (max-width: 1023px) {
  /* its picture takes what the words leave of the two screens, so the section ends on the picture */
  #faq > .wrap { display: flex; flex-direction: column; }
  #faq .faq-figure { flex: 1 1 auto; aspect-ratio: auto; min-height: 280px; }
}

/* a phone: two cards a row leave 165px each, so the price goes under the name, and the cart's controls
   sit in one row at their own width */
@media (max-width: 639px) {
  .product-card__line { flex-direction: column; align-items: flex-start; gap: var(--s-1); }
  .product-card__line h3 { font-size: var(--t-small); }
  .product-card__price { font-size: var(--t-small); }
  .cart-line-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
}

/* the phone sheet is solid from its first frame: the kit fades the whole sheet in from opacity 0, which
   showed the hero through it. The sheet stays opaque and only its rows fade and slide in. */
@media (max-width: 1023px) {
  html:not([data-motion="off"]) .nav.is-open .nav__links { opacity: 1; transform: none; transition: none; }
  @starting-style { html:not([data-motion="off"]) .nav.is-open .nav__links { opacity: 1; transform: none; } }
  html:not([data-motion="off"]) .nav.is-open .nav__links > .nav__item {
    transition: opacity var(--m-panel, 240ms) var(--m-ease, ease), transform var(--m-panel, 240ms) var(--m-ease, ease);
  }
  @starting-style { html:not([data-motion="off"]) .nav.is-open .nav__links > .nav__item { opacity: 0; transform: translateY(-8px); } }
}

/* contact: the page puts the form and the other ways to reach us side by side, like checkout */
.contact-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-6); align-items: start; }
.contact-layout > :first-child { grid-column: 1 / span 7; }
.contact-layout > :last-child { grid-column: 9 / -1; }
@media (min-width: 1024px) and (max-width: 1279px) { .contact-layout > :last-child { grid-column: 8 / -1; } }
/* stacked below 1024: the selector matches the two above so it outranks them */
@media (max-width: 1023px) { .contact-layout > :first-child, .contact-layout > :last-child { grid-column: 1 / -1; } }
.contact-details { display: grid; gap: var(--s-4); margin: 0; }
.contact-details__row { display: grid; gap: var(--s-1); }
.contact-details__row dt { color: var(--muted); }
.contact-details__row dd { margin: 0; font-size: var(--t-body); }
#contact .contact-details { margin-top: var(--s-6); }
.contact-form { position: relative; }
.footer__address { display: grid; gap: var(--s-1); margin-top: var(--s-4); font-style: normal; color: var(--muted); font-size: var(--t-small); }
.footer__note { color: var(--muted); }


/* ---------------------------------------------------------------- phones and tablets: sections fit their content
   The kit sizes every section to one or two whole screens. On a phone that left screens of blank ground
   under short sections (the statement, the range, the steps, the questions), so scrolling the home page
   felt broken: long swipes over nothing. Below 1024 a section is as tall as its content, with a steady
   rhythm between sections. (The hero keeps its first screen; the pinned steps only go live from 1024.) */
@media (max-width: 1023px) {
  main > :is(section, .section):not(.hero, .section--hero),
  main > #process[data-moment]:not(.is-live) {
    height: auto; min-height: 0;
    padding: calc(var(--nav) + var(--s-6)) 0 var(--s-7);
  }
  main > :is(section, .section):not(.hero, .section--hero) > :is(.wrap, .container) { height: auto; }
  #faq .faq-figure { flex: none; min-height: 0; aspect-ratio: 4 / 3; }
}
@media (max-width: 639px) {
  main > :is(section, .section):not(.hero, .section--hero),
  main > #process[data-moment]:not(.is-live) {
    padding: calc(var(--nav) + var(--s-5)) 0 var(--s-6);
  }
  #faq .faq-figure { aspect-ratio: 4 / 3; }
}
/* the open phone menu: the page under it must not scroll (iOS ignores overflow on body alone), and a
   swipe at the end of the sheet must not run on into the page */
html:has(> body.nav-locked) { overflow: hidden; }
.nav.is-open .nav__links { overscroll-behavior: contain; }
