/* brandonlehmanshow.com: the Patriot Store (index, product pages, bag, checkout).
   Tokens, type roles, nav and footer come from experience.css; the drawer, bag
   lines and the quantity stepper from cart.css. Every value here maps to a token
   or a rule in .claude/skills/brandon-lehman-design/SKILL.md (section 0 records
   the 2026-09-29 store decisions). Pages are generated by scripts/build-shop.mjs
   from site/shop/products.json. Structure borrowed from the Mobbin e-commerce
   research in docs/research-2026-09-28/mobbin-ecommerce (grid, quick add,
   drawer, bag, checkout), never their colours or chrome. */

/* 1. Cross-document View Transition store <-> PDP. Firefox has no support and
   simply navigates. Only the clicked card image is named (inline head script),
   the PDP hero is named below; the root crossfade stays under reduced motion,
   movement is dropped there by not naming anything. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--t-layout); animation-timing-function: var(--ease-out); }
::view-transition-group(pdp-hero) { animation-duration: var(--t-layout); animation-timing-function: var(--ease-in-out); }

/* 2. Page frame: the fixed transparent nav sits over the page, so the first
   section starts below it; the store index starts with the full-bleed hero
   under the nav instead. */
/* Short pages (bag, checkout) keep the footer at the bottom of the viewport. */
body.shop { display: flex; flex-direction: column; min-height: 100svh; }
body.shop > main { flex: 1 0 auto; }
body.shop > .footer { width: 100%; }
.shop main { padding-top: var(--nav-h); }
.shop--index main { padding-top: 0; }
@media (max-width: 1024px) { .shop main { padding-top: var(--nav-h-mobile); } .shop--index main { padding-top: 0; } }

/* 3. Store hero: the store-room render full-bleed (width/height from the file,
   cover, at most 72svh; phones keep 440px so the copy has a room to sit in),
   three scrims (top for the nav, left and bottom for the copy, the bottom one
   landing on --bg so the hero runs into the toolbar without a seam). */
.store-hero { position: relative; isolation: isolate; background: var(--bg-deep); }
.store-hero__img {
  width: 100%; height: clamp(440px, 56.25vw, 72svh);
  object-fit: cover; object-position: 62% 55%;
}
.store-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(22, 16, 11, 0.55) 0%, transparent 22%),
    var(--scrim-hero),
    linear-gradient(180deg, transparent 45%, rgba(28, 22, 16, 0.9) 88%, var(--bg) 100%);
}
/* Phones: the render crops to the rail, so the copy gets a taller room and a
   deeper lower scrim instead of sitting on the printed logos. */
@media (max-width: 699px) {
  .store-hero__img { height: clamp(520px, 72svh, 640px); object-position: 58% 50%; }
  .store-hero::after {
    background:
      linear-gradient(180deg, rgba(22, 16, 11, 0.55) 0%, transparent 18%),
      linear-gradient(180deg, transparent 30%, rgba(22, 16, 11, 0.82) 58%, rgba(28, 22, 16, 0.96) 84%, var(--bg) 100%);
  }
}
.store-hero__copy {
  position: absolute; inset: auto 0 0 0; z-index: 1;
  padding-bottom: clamp(32px, 5vw, 72px);
}
.store-hero__title { max-width: 12ch; }
.store-hero__line { margin-top: var(--s-4); color: var(--ink-85); max-width: 44ch; }

/* 4. Toolbar: sticky under the nav. Collection filters as text buttons (the
   active one underlined), the live count, and a native select for sort. When
   the nav leaves on scroll-down the stuck toolbar follows it up (shop.js sets
   .is-stuck from a sentinel; html.nav-hidden comes from experience.js). */
.catalog { position: relative; }
.toolbar-sentinel { height: 1px; margin-bottom: -1px; }
.toolbar {
  position: sticky; top: var(--nav-h); z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav-hidden .toolbar.is-stuck { translate: 0 calc(-1 * var(--nav-h)); }
@media (max-width: 1024px) {
  .toolbar { top: var(--nav-h-mobile); }
  .nav-hidden .toolbar.is-stuck { translate: 0 calc(-1 * var(--nav-h-mobile)); }
}
.toolbar__inner { display: flex; align-items: center; gap: var(--s-2) var(--s-6); min-height: 60px; }
.toolbar__filters { display: flex; gap: 0 var(--s-5); min-width: 0; }
.filter {
  display: inline-flex; align-items: center; min-height: 44px; flex: none;
  font: 500 13px/1.4 var(--font-body); letter-spacing: 0.02em; color: var(--muted); white-space: nowrap;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 6px; text-decoration-thickness: 1px;
  transition: color var(--t-state) var(--ease-out), text-decoration-color var(--t-state) var(--ease-out), scale var(--t-press) var(--ease-out);
}
.filter:active { scale: 0.97; }
.filter[aria-pressed="true"] { color: var(--ink); text-decoration-color: currentColor; }
.toolbar__count { margin-left: auto; font: 500 13px/1.4 var(--font-body); letter-spacing: 0.02em; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.toolbar__sort { display: flex; align-items: center; gap: var(--s-2); flex: none; }
.toolbar__sort-label { font: 500 13px/1.4 var(--font-body); letter-spacing: 0.02em; color: var(--muted); }
.select { position: relative; display: inline-flex; align-items: center; }
.select select {
  appearance: none; -webkit-appearance: none;
  min-height: 44px; padding: 0 var(--s-5) 0 0; margin: 0;
  background: transparent; color: var(--ink); border: 0; border-radius: var(--r-0);
  font: 500 13px/1.4 var(--font-body); letter-spacing: 0.02em; cursor: pointer;
}
.select select option { background: var(--panel); color: var(--ink); }
.select::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 6px; height: 6px; pointer-events: none;
  border-right: 1px solid var(--ink-85); border-bottom: 1px solid var(--ink-85);
  rotate: 45deg; translate: 0 -70%;
}
/* Phones: the four filters wrap onto two lines of their own (nothing is
   clipped or hidden in a sideways scroller); count and sort share the row
   beneath, under a hairline. */
@media (max-width: 699px) {
  .toolbar__inner { display: grid; grid-template-columns: 1fr auto; min-height: 0; padding-block: var(--s-1); gap: 0 var(--s-4); }
  .toolbar__filters {
    grid-column: 1 / -1;
    flex-wrap: wrap; gap: 0 var(--s-5);
    border-bottom: 1px solid var(--line);
  }
  .toolbar__count { margin-left: 0; }
}
/* Keyboard focus lands below the stuck toolbar as well as the nav (shop.js
   measures the toolbar into --toolbar-h). */
html.shop--index-page { scroll-padding-top: calc(var(--nav-h) + var(--toolbar-h, 61px) + var(--s-4)); }
@media (max-width: 1024px) {
  html.shop--index-page { scroll-padding-top: calc(var(--nav-h-mobile) + var(--toolbar-h, 97px) + var(--s-4)); }
}

/* 5. The grid: uniform 4:5 cards, 2 columns on phones, 3 at >= 700px, 4 at
   >= 1100px. Nothing spans, so 1, 12 or 100 pieces all fill it the same way. */
.catalog__body { padding-block: var(--s-7) clamp(64px, 8vw, 128px); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-7) var(--s-3); }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-8) var(--s-5); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.catalog__empty { padding-block: var(--s-8); }
.catalog__empty-title { font: 400 28px/1.15 var(--font-display); letter-spacing: -0.02em; }

/* 6. Product card. One link (the name) stretched over the whole card; the
   quick-add row sits above that layer. The card leads with the print (the 4:5
   detail frame, client decision 2026-09-29) and hover (fine pointers only)
   crossfades to the full on-model frame and brings the size row up over the
   bottom of the image. The quick-add row comes last in the DOM (name, colour
   and price are read first); the grid places it back over the image. */
.card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; min-width: 0; color: var(--ink); }
.card > .card__media { grid-row: 1; grid-column: 1; }
.card > .card__name { grid-row: 2; }
.card > .card__colour { grid-row: 3; }
.card > .card__price { grid-row: 4; }
.card > .quick { grid-row: 1; grid-column: 1; align-self: end; }
.card__media {
  position: relative; display: grid; overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--bg-deep);
  outline: 1px solid var(--outline-img); outline-offset: -1px;
}
.card__img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
/* 1:1 packshots (cap, mug) sit centred in the 4:5 frame rather than being cropped at the top. */
.card__img[width="1600"][height="1600"], .card__img[width="640"][height="640"] { object-position: 50% 50%; }
.card__img--alt { opacity: 0; }
.card__name {
  margin-top: var(--s-3);
  font: 400 15px/1.45 var(--font-body); letter-spacing: 0;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.card__link {
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; text-decoration-thickness: 1px;
  transition: text-decoration-color var(--t-state) var(--ease-out);
}
.card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
/* The focus ring goes round the whole card (the link's stretched layer), not the name alone. */
.card__link:focus-visible { outline: 2px solid transparent; }
.card__link:focus-visible::after { outline: 2px solid var(--gold); outline-offset: 3px; }
.card__colour { margin-top: 2px; font: 400 13px/1.45 var(--font-body); color: var(--muted); }
.card__price { margin-top: var(--s-1); font: 500 17px/1.4 var(--font-body); font-variant-numeric: tabular-nums; }

/* Quick add: pointer devices only. Touch gets the plain card link. */
.quick { display: none; }
@media (hover: none), (pointer: coarse) {
  .card__img--alt { display: none; }
}
@media (hover: hover) and (pointer: fine) {
  .card__img--alt { transition: opacity var(--t-crossfade) var(--ease-out); }
  .card:hover .card__img--alt, .card:focus-within .card__img--alt { opacity: 1; }
  .quick {
    display: block; position: relative; z-index: 2;
    padding: var(--s-3);
    background: rgba(22, 16, 11, 0.9);
    border-top: 1px solid var(--line);
    opacity: 0;
    transition: opacity var(--t-state) var(--ease-out);
  }
  .card:hover .quick, .card:focus-within .quick { opacity: 1; }
}
.quick__label { margin-bottom: var(--s-2); font: 500 13px/1.4 var(--font-body); letter-spacing: 0.02em; color: var(--ink-85); }
.quick__sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: var(--s-1); }
.quick__size, .quick__one {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 var(--s-2);
  border: 1px solid var(--line-strong); border-radius: var(--r-0);
  font: 500 13px/1 var(--font-body); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; color: var(--ink);
  transition: background-color var(--t-state) var(--ease-out), color var(--t-state) var(--ease-out), border-color var(--t-state) var(--ease-out), scale var(--t-press) var(--ease-out);
}
.quick__one { width: 100%; }
.quick__size:active, .quick__one:active { scale: 0.97; }
.quick__size:focus-visible, .quick__one:focus-visible { outline-offset: -2px; }
.quick__size[aria-disabled="true"], .quick__one:disabled { color: var(--muted); border-color: var(--line); text-decoration: line-through; cursor: not-allowed; }

/* 7. Product page. Desktop: gallery 1.2fr (a 2-column image grid, the lead
   frame across both), sticky info .8fr. Phones: the swipe gallery with a counter. */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); padding-top: var(--s-4); }
.pdp__media { min-width: 0; }
.gallery { display: flex; gap: var(--s-2); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); overscroll-behavior-x: contain; }
.gallery::-webkit-scrollbar { display: none; }
.gallery__frame { flex: 0 0 88vw; scroll-snap-align: start; }
.gallery__img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; background: var(--bg-deep); outline: 1px solid var(--outline-img); outline-offset: -1px; }
/* 1:1 packshots (mug, cap, the 640px flats) keep their whole frame; nothing is cropped off the artwork. */
.gallery__img--square { aspect-ratio: 1; object-position: 50% 50%; }
.gallery__img--hero { view-transition-name: pdp-hero; }
.gallery__count { margin-top: var(--s-3); color: var(--muted); font-variant-numeric: tabular-nums; }
@media (min-width: 900px) {
  .pdp { grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr); gap: clamp(32px, 4vw, 72px); padding-top: var(--s-5); }
  .gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); overflow: visible; margin-inline: 0; padding-inline: 0; scroll-snap-type: none; }
  .gallery > * { flex: none; }
  .gallery > :first-child, .gallery > :last-child:nth-child(even) { grid-column: 1 / -1; }
  .gallery__count { display: none; }
  .info__sticky { position: sticky; top: calc(var(--nav-h) + var(--s-5)); }
}

.info { min-width: 0; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; font: 500 13px/1.4 var(--font-body); letter-spacing: 0.02em; color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin-inline: var(--s-2); color: var(--line-strong); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); transition: color var(--t-state) var(--ease-out); }
.info__name { margin-top: var(--s-1); }
.info__price { margin-top: var(--s-4); }
.price--pdp { font-size: 22px; }
.info__provisional { margin-top: 2px; font: 400 13px/1.4 var(--font-body); color: var(--muted); }
.info__colour { margin-top: var(--s-5); font: 400 15px/1.55 var(--font-body); color: var(--ink); }
.info__colour-label { margin-right: var(--s-2); color: var(--muted); }
.info__description { margin-top: var(--s-7); color: var(--ink-85); }

/* The buy block: size, quantity, the one gold action. */
.buy { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.sizes, .buy__qty { position: relative; border: 0; padding: 0; margin: 0; min-width: 0; }
.buy__qty { margin-top: var(--s-5); }
.sizes__legend { float: left; width: 100%; padding: 0; margin-bottom: var(--s-3); font: 500 13px/1.4 var(--font-body); letter-spacing: 0.02em; color: var(--ink-85); }
.sizes__legend + * { clear: both; }
.sizes__guide {
  position: absolute; top: -13px; right: 0;
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s-1);
  font: 500 13px/1.4 var(--font-body); letter-spacing: 0.02em; color: var(--muted);
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 5px; text-decoration-thickness: 1px;
  transition: color var(--t-state) var(--ease-out);
}
.sizes__guide + * { clear: both; }
.sizes__chips { display: flex; flex-wrap: wrap; gap: var(--s-2); clear: both; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip input:disabled { cursor: not-allowed; }
.chip span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; min-height: 48px; padding: 0 var(--s-3);
  border: 1px solid var(--line-strong); border-radius: var(--r-0);
  font: 500 13px/1 var(--font-body); letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
  color: var(--ink); background: transparent;
  transition: background-color var(--t-state) var(--ease-out), color var(--t-state) var(--ease-out), border-color var(--t-state) var(--ease-out), scale var(--t-press) var(--ease-out);
}
/* Checked size: cream fill (2026-09-29, third review), so gold stays on "Add to bag" alone. */
.chip input:checked + span { background: var(--ink); color: var(--gold-ink); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; }
.chip input:active + span { scale: 0.97; }
.chip--out span { color: var(--muted); border-color: var(--line); text-decoration: line-through; }
/* "Choose a size": cream on the chip row, the unchosen chips' hairlines brighten with it. */
.sizes__error { margin-top: var(--s-3); font: 500 13px/1.4 var(--font-body); letter-spacing: 0.02em; color: var(--ink); }
.sizes__error:empty { display: none; }
.sizes.is-invalid .chip:not(.chip--out) span { border-color: var(--ink-85); }
.sizes--fixed .sizes__legend { float: none; margin-bottom: var(--s-1); }
.sizes--fixed .sizes__value { color: var(--ink); }
.buy__submit { width: 100%; min-height: 52px; margin-top: var(--s-6); }
.buy__submit[data-state="added"] { background: var(--ink); border-color: var(--ink); color: var(--gold-ink); }
.buy__note { margin-top: var(--s-3); font: 400 13px/1.5 var(--font-body); color: var(--muted); }
.buy__cap { margin-top: var(--s-3); font: 500 13px/1.4 var(--font-body); letter-spacing: 0.02em; color: var(--ink); }

/* Accordion: native <details>, hairlines, a rotating hairline chevron. */
.accordion { margin-top: var(--s-6); border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  min-height: 52px; padding-block: var(--s-3); cursor: pointer; list-style: none; color: var(--ink);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px;
  border-right: 1px solid var(--ink-85); border-bottom: 1px solid var(--ink-85);
  rotate: 45deg; translate: 0 -2px;
}
.accordion details[open] summary::after { rotate: 225deg; translate: 0 2px; }
.accordion summary:focus-visible { outline-offset: -2px; }
.accordion__body { padding-bottom: var(--s-4); color: var(--muted); max-width: var(--measure); }
.accordion__body li + li { margin-top: var(--s-1); }

/* Related: four uniform cards with quick add. */
.related { padding-block: clamp(64px, 8vw, 128px) var(--s-5); }
.related__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-5); margin-bottom: var(--s-5); }
.grid--related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .grid--related { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-7) var(--s-5); } }

/* Size guide dialog: modal, panel surface, entry via @starting-style. Native
   showModal() traps focus and closes on Escape. */
.size-guide {
  width: min(100% - 2 * var(--gutter), 480px); max-height: min(100svh - 2 * var(--s-6), 720px);
  margin: auto; padding: var(--s-5) var(--s-5) var(--s-6);
  border: 1px solid var(--line); border-radius: var(--r-0);
  background: var(--panel); color: var(--ink);
  overscroll-behavior: contain;
  opacity: 0;
  transition: opacity var(--t-state) var(--ease-out), translate var(--t-layout) var(--ease-out), display var(--t-layout) allow-discrete, overlay var(--t-layout) allow-discrete;
}
.size-guide[open] { opacity: 1; }
.size-guide::backdrop { background: rgba(22, 16, 11, 0.72); opacity: 0; transition: opacity var(--t-state) var(--ease-out), display var(--t-layout) allow-discrete, overlay var(--t-layout) allow-discrete; }
.size-guide[open]::backdrop { opacity: 1; }
@starting-style {
  .size-guide[open] { opacity: 0; }
  .size-guide[open]::backdrop { opacity: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  html:not(.motion-paused) .size-guide { translate: 0 0; }
  html:not(.motion-paused) .size-guide:not([open]) { translate: 0 12px; }
  @starting-style { html:not(.motion-paused) .size-guide[open] { translate: 0 12px; } }
}
.size-guide__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.size-guide__close { display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s-2); font: 500 13px/1.4 var(--font-body); letter-spacing: 0.02em; color: var(--ink-85); }
.size-guide__note { margin-top: var(--s-3); color: var(--muted); }
.size-guide__table { width: 100%; margin-top: var(--s-5); border-collapse: collapse; font: 400 15px/1.55 var(--font-body); font-variant-numeric: tabular-nums; }
.size-guide__table th, .size-guide__table td { padding: var(--s-2) 0; text-align: left; border-bottom: 1px solid var(--line); }
.size-guide__table thead th { font: 500 13px/1.4 var(--font-body); letter-spacing: 0.02em; color: var(--muted); }
.size-guide__table tbody th { font-weight: 500; }
.size-guide__table td { color: var(--ink-85); }
.size-guide__fit { margin-top: var(--s-4); color: var(--muted); }

/* Mobile sticky buy bar: price + Add to bag; slides up when the buy block has
   left the viewport and leaves again over the footer (shop.js). Hidden means
   hidden: visibility keeps its button out of the tab order, and the page sets
   inert too. Desktop never shows it. */
.buybar {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  display: none; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-3) var(--gutter) max(var(--s-3), env(safe-area-inset-bottom));
  background: var(--panel); border-top: 1px solid var(--line);
  translate: 0 100%;
  visibility: hidden;
}
.buybar__price { display: flex; align-items: baseline; gap: var(--s-2); }
.buybar__provisional { font: 400 13px/1.4 var(--font-body); color: var(--muted); }
.buybar__cta { min-height: 48px; padding: 0 var(--s-6); white-space: nowrap; }
@media (max-width: 899px) {
  .buybar { display: flex; }
  .buybar.is-visible { translate: 0 0; visibility: visible; }
  .shop--pdp main { padding-bottom: var(--s-9); }
  html.shop--pdp-page { scroll-padding-bottom: 96px; }
}

/* 8. Bag page: hairline rows on the left, the order summary on the right
   (sticky on desktop), after the Mobbin bag pages (H&M, adidas, Selfridges). */
.bagpage { padding-block: clamp(48px, 7vw, 96px) clamp(64px, 8vw, 128px); }
.bagpage__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-4); padding-bottom: var(--s-5); border-bottom: 1px solid var(--line); }
.bagpage__count { font: 500 13px/1.4 var(--font-body); letter-spacing: 0.02em; color: var(--muted); font-variant-numeric: tabular-nums; }
.bagpage__grid { display: grid; gap: var(--s-7); }
.bagpage__lines { min-width: 0; }
.bag-lines--page .bag-line { grid-template-columns: 96px minmax(0, 1fr); gap: var(--s-5); padding-block: var(--s-5); }
.bag-lines--page .bag-line:last-child { border-bottom: 1px solid var(--line); }
.bag-lines--page .bag-line__thumb { width: 96px; }
.bag-lines--page .bag-line__name { font-size: 17px; }
.bag-lines--page .bag-line__price { font-size: 17px; }
.bag-noscript { padding-block: var(--s-6); color: var(--ink-85); }
@media (min-width: 700px) {
  .bag-lines--page .bag-line { grid-template-columns: 136px minmax(0, 1fr); gap: var(--s-6); }
  .bag-lines--page .bag-line__thumb { width: 136px; }
}
@media (min-width: 900px) {
  .bagpage__grid { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: clamp(40px, 6vw, 112px); align-items: start; }
  .bagpage__grid > .summary { position: sticky; top: calc(var(--nav-h) + var(--s-5)); }
}

.summary { min-width: 0; padding-top: var(--s-5); }
.summary[hidden] { display: none; }
.summary__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); }
.summary__title { font: 400 22px/1.3 var(--font-display); letter-spacing: -0.01em; }
.summary__rows { margin: var(--s-4) 0 0; }
.summary__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); padding-block: var(--s-2); font: 400 15px/1.55 var(--font-body); }
.summary__row dt { color: var(--ink-85); }
.summary__row dd { margin: 0; text-align: right; color: var(--ink); }
.summary__row .price { font-size: 15px; }
.summary__row--total { margin-top: var(--s-2); padding-top: var(--s-4); border-top: 1px solid var(--line); font-weight: 500; }
.summary__row--total dt { color: var(--ink); }
.summary__row--total .price { font-size: 17px; }
.summary__checkout { width: 100%; min-height: 52px; margin-top: var(--s-5); }
.summary__continue { margin-top: var(--s-2); }
.summary__note { margin-top: var(--s-3); font: 400 13px/1.5 var(--font-body); color: var(--muted); max-width: 44ch; }

/* 9. Checkout step (closed): the honest reserve form and the order summary.
   Phones: intro, then what is being reserved, then the form. */
.checkout { padding-block: clamp(48px, 7vw, 96px) clamp(64px, 8vw, 128px); }
.checkout__grid { display: grid; grid-template-areas: "intro" "summary" "form"; gap: var(--s-6); }
.checkout__intro { grid-area: intro; }
.checkout__form { grid-area: form; min-width: 0; }
.checkout__grid > .summary { grid-area: summary; }
.checkout__lead { margin-top: var(--s-5); color: var(--ink-85); max-width: 52ch; }
.reserve { display: grid; gap: var(--s-4); max-width: 480px; }
.reserve[hidden] { display: none; }
/* The same underline field as #join: 18px, a hairline that turns gold and
   doubles to 2px on focus (absolute, so nothing shifts). */
.reserve__field label { color: var(--ink-85); }
.reserve__control { position: relative; display: block; }
.reserve__field input {
  min-height: 56px; padding: 0;
  border: 0; background: transparent;
  font: 400 18px / 1.4 var(--font-body); letter-spacing: 0.005em;
}
.reserve__field input:focus-visible { outline: 2px solid transparent; } /* the rule below is the indicator */
.reserve__field .field__rule {
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--line-strong); pointer-events: none;
  transition: background-color var(--t-state) var(--ease-out);
}
.reserve__field:focus-within .field__rule { background: var(--gold); height: 2px; }
.reserve__field:has(input[aria-invalid="true"]) .field__rule { background: var(--gold); }
@media (hover: hover) {
  .reserve__field:hover .field__rule { background: var(--ink); }
  .reserve__field:focus-within:hover .field__rule { background: var(--gold); }
}
.reserve__submit { width: 100%; min-height: 52px; margin-top: var(--s-2); }
.reserve__list { font: 500 13px/1.4 var(--font-body); letter-spacing: 0.02em; color: var(--muted); }
.reserve__status { font: 400 15px/1.55 var(--font-body); color: var(--ink); }
.reserve__status:empty { display: none; }
.reserve-done { max-width: 52ch; padding-top: var(--s-5); border-top: 1px solid var(--line); }
.reserve-done__title { font: 400 28px/1.2 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; overflow-wrap: anywhere; }
.reserve-done__line { margin-top: var(--s-3); color: var(--muted); }
.reserve-done .text-link { margin-top: var(--s-2); }
.summary--checkout { padding-top: var(--s-5); border-top: 1px solid var(--line); }
.bag-lines--summary { margin-top: var(--s-3); border-bottom: 1px solid var(--line); }
.bag-lines--summary .bag-line { grid-template-columns: 64px minmax(0, 1fr); gap: var(--s-4); padding-block: var(--s-4); }
.bag-lines--summary .bag-line__thumb { width: 64px; }
@media (min-width: 900px) {
  .checkout__grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    grid-template-areas: "intro summary" "form summary";
    grid-template-rows: auto 1fr;
    gap: var(--s-7) clamp(40px, 7vw, 128px);
    align-items: start;
  }
  .checkout__grid > .summary { position: sticky; top: calc(var(--nav-h) + var(--s-5)); }
}

.disclosure { padding-block: var(--s-6); color: var(--muted); }

/* 10. Movement is opt-in: the toolbar follow, the quick-add rise, the bar's
   slide and the accordion chevron only move when the device and the footer
   toggle allow it (opacity fades stay either way). */
@media (prefers-reduced-motion: no-preference) {
  html:not(.motion-paused) .toolbar { transition: translate var(--t-state) var(--ease-out); }
  @media (hover: hover) and (pointer: fine) {
    html:not(.motion-paused) .quick { translate: 0 8px; transition: opacity var(--t-state) var(--ease-out), translate var(--t-layout) var(--ease-out); }
    html:not(.motion-paused) .card:hover .quick, html:not(.motion-paused) .card:focus-within .quick { translate: 0 0; }
  }
  html:not(.motion-paused) .buybar { transition: translate var(--t-layout) var(--ease-out), visibility 0s linear var(--t-layout); }
  html:not(.motion-paused) .buybar.is-visible { transition: translate var(--t-layout) var(--ease-out), visibility 0s; }
  html:not(.motion-paused) .accordion summary::after { transition: rotate var(--t-state) var(--ease-out); }
}
.motion-paused .chip input:active + span, .motion-paused .filter:active,
.motion-paused .quick__size:active, .motion-paused .quick__one:active { scale: 1; }

/* Hover only where a pointer can hover (rubric 16). */
@media (hover: hover) {
  .filter:hover { color: var(--ink); }
  .card:hover .card__link { text-decoration-color: var(--line-strong); }
  .quick__size:not([aria-disabled="true"]):hover, .quick__one:not(:disabled):hover { background: var(--ink); border-color: var(--ink); color: var(--gold-ink); }
  .chip:hover span { border-color: var(--ink); }
  .sizes__guide:hover, .crumbs a:hover { color: var(--ink); }
  .accordion summary:hover { color: var(--ink); }
  .select select:hover { color: var(--ink); }
  .size-guide__close:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
}
