/* =====================================================================
   StarPay Market — the component layer (docs/market/concept-and-ui.md §3)

   Loads AFTER static/landing/styles.css and reads ITS :root variables:
   the Market is the main website grown into a catalogue (owner decision
   10), so it owns no palette of its own. The colour grammar carries over:
     orange = money in (the one buying action per screen)
     blue   = money out (refunds, payouts) and links
     indigo = digital dollars only        green = success only
   Templates carry class names, never raw hex (§2.11). The handful of
   values the landing stylesheet does not have are defined ONCE, below, as
   variables on .market-shell.

   Load order on a Market page:
     css/app.css (Tailwind layout utilities) → landing/styles.css → this.
   ===================================================================== */

/* ---------- The scope ---------- */
.market-shell {
  /* Tailwind brand channels (static/src/input.css :root) re-pointed at the
     Luminous Ledger values, so a utility like bg-brand-orange resolves to
     the site's colour inside the Market. Channels, not hex: the Tailwind
     tokens are rgb(var(--brand-x) / <alpha>). */
  --brand-bg: 251 250 247;       /* --canvas */
  --brand-navy: 20 35 71;        /* --ink (headings) */
  --brand-ink: 69 83 111;        /* --body-c (body text, see §3.6) */
  --brand-muted: 126 135 155;    /* --muted (18px+ and placeholders only) */
  --brand-border: 228 234 245;   /* --border-blue */
  --brand-orange: 232 66 10;     /* --orange */
  --brand-gold: 245 168 0;       /* --gold */
  --brand-blue: 26 86 219;       /* --blue */
  --brand-success: 47 182 115;   /* --green (a fill; text is --success-ink) */
  --brand-warning: 245 168 0;    /* --gold */
  --brand-error: 226 85 85;      /* the theme's one red, .tl-x */
  --shadow-sm: var(--shadow-1);
  --shadow-md: var(--shadow-2);
  --shadow-lg: var(--shadow-2);

  /* Market-only tokens — the theme carries no error or success TEXT colour. */
  --error: #E25555;              /* icons, borders, halos: 3.7:1, never small text */
  --error-ink: #B83232;          /* error text: 5.9:1 on --paper, 5.2:1 on the tint */
  --error-tint: #FDEDED;
  --success-ink: #157A4C;        /* the site's .pill-ok text */
  --success-tint: #E9F8F0;
  --focus-halo: 0 0 0 4px rgba(46, 125, 255, 0.12);   /* the site's .field focus */
  --scrim: linear-gradient(0deg, rgba(10, 24, 48, 0.88) 0%, rgba(10, 24, 48, 0) 100%);
  --gutter: 28px;

  background: var(--canvas);
  color: var(--body-c);
  font-size: 16px;               /* the catalogue is denser than the site's 17px */
  line-height: 1.625;
}

/* Tailwind emits its font and radius tokens as static strings, so the scope
   overrides the utilities themselves (the docs shell does the same). */
.market-shell .font-display { font-family: var(--font-display); }
.market-shell .font-sans { font-family: var(--font-body); }
.market-shell .font-mono,
.market-shell .mono { font-family: var(--font-mono); font-weight: 500; }
.market-shell .rounded-btn { border-radius: 999px; }
.market-shell .rounded-input { border-radius: 12px; }
.market-shell .rounded-card { border-radius: var(--r-md); }

.market-shell .container { padding-left: var(--gutter); padding-right: var(--gutter); }
.market-shell .tnum,
.market-shell .mk-price,
.market-shell .mk-figure { font-variant-numeric: tabular-nums; }
/* A figure is data, so it is the text face (Inter), never the headings' Poppins. */
.market-shell .mk-figure {
  font-family: var(--font-body); font-weight: 800; color: var(--ink);
  letter-spacing: -0.02em;
}
.market-shell .mk-error-text { color: var(--error-ink); font-size: 13px; }
.market-shell .mk-notice {
  background: var(--warm-tint); color: var(--orange-deep);
  border-radius: 12px; padding: 10px 14px; font-size: 13px; font-weight: 600;
}

/* Accent fallbacks inside the Market — the presets themselves live in
   templates/components/_accent_presets.html. */
.market-shell .accent-hero {
  background: var(--accent, var(--navy-3));
  background: linear-gradient(135deg, var(--accent, var(--navy-3)) 0%,
    color-mix(in srgb, var(--accent, var(--navy-3)) 58%, var(--navy)) 100%);
}
.market-shell .accent-mono { background: var(--accent-soft, var(--canvas)); color: var(--accent, var(--ink)); }

/* ---------- Sections and grids ---------- */
.mk-section { padding: 64px 0; }
.mk-band-paper { background: var(--paper); }
.mk-band-canvas { background: var(--canvas); }
.mk-section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 32px;
}
.mk-section-head h2 { font-size: 28px; line-height: 34px; }
.mk-section-head .mk-dek { margin-top: 8px; font-size: 15px; line-height: 22px; color: var(--body-c); }
.mk-see-all {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--blue); white-space: nowrap;
}

.mk-grid-products {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 20px; row-gap: 32px;
}
@media (min-width: 1100px) { .mk-grid-products.is-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.mk-grid-shops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

/* ---------- The Weave (the signature, recoloured — §3.8) ---------- */
/* One stripe rhythm on a 120px repeat, built only from theme variables:
   orange 32 · orange-deep 8 · gap 6 · blue 20 · navy-3 6 · gap 6 ·
   gold 10 · gap 6 · blue-bright 14 · gap 12. Exactly four uses: the 3px
   page-top rule, the 3px active-aisle underline, the awning valance (4px on
   tiles, 6px on the shop page, the shop's accent leading) and the 4px
   footer edge. Never a progress bar, never behind text, never on checkout. */
.weave,
.mk-aisle.is-active::after {
  --weave-lead: var(--orange);
  background-image: repeating-linear-gradient(90deg,
    var(--weave-lead) 0 32px,
    var(--orange-deep) 32px 40px,
    transparent 40px 46px,
    var(--blue) 46px 66px,
    var(--navy-3) 66px 72px,
    transparent 72px 78px,
    var(--gold) 78px 88px,
    transparent 88px 94px,
    var(--blue-bright) 94px 108px,
    transparent 108px 120px);
  background-repeat: repeat-x;
}
.weave { display: block; height: 3px; width: 100%; }
.weave-rule { height: 3px; }
.weave-footer { height: 4px; }
.weave-valance {
  --weave-lead: var(--accent, var(--orange));
  height: 4px;
  transition: background-position 400ms ease-out;
}
.weave-valance.is-lg { height: 6px; }

/* ---------- The aisle bar (§5) ---------- */
.mk-aisles { background: var(--paper); border-bottom: 1px solid var(--border); }
.mk-aisles-inner {
  display: flex; align-items: center; gap: 24px; height: 48px;
  overflow-x: auto; scrollbar-width: none;
}
.mk-aisles-inner::-webkit-scrollbar { display: none; }
.mk-aisle {
  position: relative; flex: none; padding: 4px 0;
  font-size: 14px; font-weight: 500; line-height: 20px; color: var(--body-c);
  white-space: nowrap; text-decoration: none;
}
.mk-aisle:hover { color: var(--ink); text-decoration: none; }
.mk-aisle.is-active { color: var(--ink); font-weight: 700; }
.mk-aisle.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 3px;
}
.mk-aisle:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 4px; border-radius: 4px; }

/* ---------- Chips ---------- */
.mk-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px;
  padding: 0 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap;
  background: var(--paper); border: 1px solid var(--border-blue);
  text-decoration: none; cursor: pointer;
}
.mk-chip:hover { border-color: var(--ink); text-decoration: none; }
.mk-chip.is-active,
.mk-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.mk-chip-filter {
  background: color-mix(in srgb, var(--blue) 8%, transparent);
  border-color: color-mix(in srgb, var(--blue) 40%, transparent);
  color: var(--blue); font-weight: 500;
}
.mk-chip-featured {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px;
  border-radius: 999px; background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.mk-verified {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: 999px; background: color-mix(in srgb, var(--gold) 12%, transparent);
  color: var(--ink); font-size: 12px; font-weight: 600;
}
.mk-star { flex: none; width: 12px; height: 12px; color: var(--gold); }
.mk-star.is-md { width: 16px; height: 16px; }

/* ---------- Buttons (the site's .btn family, plus Market sizes) ---------- */
.market-shell .btn:focus-visible,
.mk-buy:focus-visible {
  outline: 2px solid var(--blue-bright); outline-offset: 2px; box-shadow: var(--focus-halo);
}
.market-shell .btn[disabled],
.market-shell .btn.is-disabled { opacity: 0.4; pointer-events: none; }
.mk-btn-block { width: 100%; }
.mk-buy {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid rgba(20, 35, 71, 0.22); background: var(--paper);
  font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap;
  transition: border-color 150ms ease-out, transform 150ms ease-out;
}
.mk-buy:hover { border-color: var(--ink); text-decoration: none; }
.mk-sold-out-note { font-size: 13px; font-weight: 600; color: var(--ink); opacity: 0.8; }

/* ---------- Product tile (§7) ---------- */
.mk-product { position: relative; display: flex; flex-direction: column; min-width: 0; }
.mk-product-well {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: var(--r-md); background: var(--canvas);
  box-shadow: inset 0 0 0 1px rgba(20, 35, 71, 0.05);
}
.mk-product-well img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mk-mono {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 44px; line-height: 1;
}
.mk-mono > span { opacity: 0.4; }
.mk-product.is-sold-out .mk-product-well img { opacity: 0.6; }
.mk-badge {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; line-height: 1.2; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(255, 255, 255, 0.95); color: var(--ink);
}
.mk-badge-sold_out { background: rgba(20, 35, 71, 0.8); color: var(--paper); }
.mk-badge-low::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
}
.mk-product-body { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; }
.mk-shopline {
  position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
  max-width: 100%; min-width: 0; align-self: flex-start;
  font-size: 12px; font-weight: 500; line-height: 16px; color: var(--body-c); text-decoration: none;
}
.mk-shopline:hover { color: var(--ink); text-decoration: none; }
.mk-shopline-logo {
  flex: none; width: 16px; height: 16px; border-radius: 4px; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 9px;
}
.mk-shopline-logo img { width: 100%; height: 100%; object-fit: cover; }
.mk-shopline-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The title is the tile's one link; its ::after stretches over the whole
   tile, and the shop line and Buy now sit above it as their own tab stops. */
.mk-product-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 40px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink);
  text-decoration: none;
}
.mk-product-title::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-md); }
.mk-product-title:focus-visible { outline: none; }
.mk-product-title:focus-visible::after { outline: 2px solid var(--blue-bright); outline-offset: 2px; box-shadow: var(--focus-halo); }
.mk-price { margin-top: 2px; font-size: 16px; line-height: 20px; font-weight: 700; color: var(--ink); }
.mk-product-actions { position: relative; z-index: 2; margin-top: 8px; }
@media (hover: hover) and (pointer: fine) {
  .mk-product:hover .mk-product-well img { transform: scale(1.03); }
  .mk-product:hover .mk-product-title { text-decoration: underline; text-underline-offset: 3px; }
}

/* ---------- Shopfront tile (§8) ---------- */
.mk-shop {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--paper); border: 1px solid var(--border-blue); border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  transition: box-shadow 200ms ease-out, transform 200ms ease-out;
}
.mk-awning { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--canvas); }
.mk-awning img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 300ms ease-out;
}
.mk-awning-fallback { position: absolute; inset: 0; }
.mk-awning-mono {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-weight: 800; font-size: 72px; line-height: 1;
  color: var(--accent-ink, var(--paper)); opacity: 0.2;
}
.mk-awning .weave-valance { position: absolute; left: 0; right: 0; bottom: 0; }
.mk-aisle-chip {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.9);
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink);
}
.mk-shop-logo {
  position: relative; z-index: 1; flex: none;
  width: 56px; height: 56px; margin: -28px 0 0 16px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--paper);
  box-shadow: 0 0 0 3px var(--paper), var(--shadow-1);
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
}
.mk-shop-logo img { width: 100%; height: 100%; object-fit: cover; }
.mk-shop-id { padding: 8px 16px 0; min-width: 0; }
.mk-shop-name {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 24px;
  color: var(--ink); text-decoration: none;
}
.mk-shop-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-shop-name::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-md); }
.mk-shop-name:hover { text-decoration: none; }
.mk-shop-name:focus-visible { outline: none; }
.mk-shop-name:focus-visible::after { outline: 2px solid var(--blue-bright); outline-offset: 2px; box-shadow: var(--focus-halo); }
.mk-shop-meta,
.mk-shop-tagline { margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--body-c); }
.mk-shop-tagline { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-shelf {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 12px 16px 0;
}
.mk-shelf-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; text-decoration: none; }
.mk-shelf-item:hover { text-decoration: none; }
.mk-shelf-thumb {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  border-radius: var(--r-sm); background: var(--canvas);
}
.mk-shelf-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-shelf-thumb .mk-mono { font-size: 22px; }
.mk-shelf-more {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 24, 48, 0.7); color: var(--paper); font-size: 13px; font-weight: 700;
}
.mk-shelf-price { font-size: 11px; line-height: 14px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.mk-shop-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding: 12px 16px; border-top: 1px solid var(--border);
  font-size: 12px; line-height: 16px; color: var(--body-c);
}
.mk-pay-marks { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.mk-pay-mark {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px;
  border-radius: 999px; border: 1px solid var(--border-blue);
  font-size: 11px; font-weight: 700; color: var(--ink);
}
.mk-pay-mark svg { width: 12px; height: 12px; }
.mk-pay-mark.is-crypto { color: var(--indigo); background: var(--indigo-tint); border-color: transparent; }
@media (hover: hover) and (pointer: fine) {
  .mk-shop:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
  .mk-shop:hover .mk-awning img { transform: scale(1.03); }
  .mk-shop:hover .weave-valance { background-position: 8px 0; }
}

/* Compact: a 72px row (search matches, cart stall headers, checkout summary). */
.mk-shop-compact {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 72px;
  padding: 12px 16px; background: var(--paper);
  border: 1px solid var(--border-blue); border-radius: var(--r-md);
  transition: box-shadow 200ms ease-out;
}
.mk-shop-compact .mk-shop-logo {
  width: 48px; height: 48px; margin: 0; box-shadow: none; border: 1px solid var(--border-blue);
  font-size: 20px;
}
.mk-shop-compact .mk-shop-id { flex: 1; padding: 0; }
.mk-shop-compact .mk-shop-name { font-family: var(--font-body); font-size: 15px; line-height: 20px; }
.mk-shop-compact .mk-chevron { flex: none; width: 18px; height: 18px; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .mk-shop-compact:hover { box-shadow: var(--shadow-2); } }

/* ---------- Loading skeletons ---------- */
.mk-skel {
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--border-blue) 0%, var(--canvas) 50%, var(--border-blue) 100%);
  background-size: 200% 100%;
  animation: mkShimmer 1.2s linear infinite;
}
@keyframes mkShimmer { to { background-position: -200% 0; } }

/* ---------- Narrow screens (no horizontal scroll at 360px) ---------- */
@media (max-width: 1020px) {
  .mk-grid-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mk-grid-shops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .market-shell { --gutter: 16px; }
  .mk-section { padding: 48px 0; }
  .mk-section-head h2 { font-size: 22px; line-height: 28px; }
  .mk-grid-products { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; row-gap: 24px; }
  .mk-grid-shops { grid-template-columns: minmax(0, 1fr); }
  .mk-product-title { font-size: 13px; line-height: 18px; min-height: 36px; }
  .mk-price { font-size: 15px; }
  /* The aisle bar becomes a strip of scroll-snap chips with a right-edge fade. */
  .mk-aisles-inner {
    gap: 8px; height: 56px; scroll-snap-type: x proximity;
    mask-image: linear-gradient(90deg, black 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, black 88%, transparent);
  }
  .mk-aisle {
    display: inline-flex; align-items: center; height: 36px; padding: 0 14px; scroll-snap-align: start;
    border: 1px solid var(--border-blue); border-radius: 999px; background: var(--paper);
  }
  .mk-aisle.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .mk-aisle.is-active::after { display: none; }
}

/* ---------- Reduced motion: translates and scales become nothing ---------- */
@media (prefers-reduced-motion: reduce) {
  .mk-product:hover .mk-product-well img,
  .mk-shop:hover .mk-awning img { transform: none; }
  .mk-shop:hover { transform: none; }
  .mk-shop:hover .weave-valance { background-position: 0 0; }
  .mk-skel { animation: none; }
}

/* =====================================================================
   The public pages (Phase 1a, A2) — concept-and-ui.md §5, §6
   Shell, home, browse (search + aisle), directory, shop, product.
   Theme variables only; the two values the landing sheet lacks are named
   once here (the dark band's body text and the translucent white rings).
   ===================================================================== */
.market-shell {
  --dark-body: #B8C6E4;           /* the site's .dark body text (styles.css .dark) */
  --ring-white: rgba(255, 255, 255, 0.9);
  --header-h: 76px;
}

/* ---------- Icons ---------- */
.mk-ic { width: 20px; height: 20px; flex: none; }
.mk-ic-sm { width: 16px; height: 16px; }
.mk-ic-xs { width: 14px; height: 14px; }

/* ---------- Skip link ---------- */
.mk-skip {
  position: absolute; left: 16px; top: -48px; z-index: 200;
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--paper);
  font-size: 14px; font-weight: 700;
}
.mk-skip:focus { top: 12px; text-decoration: none; }
main:focus { outline: none; }

/* ---------- Header (§5) ---------- */
.mk-header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.mk-brand { display: flex; align-items: center; gap: 12px; flex: none; }
.mk-brand-home { display: flex; align-items: center; min-height: 44px; }
.mk-brand a, .mk-brand a:hover { text-decoration: none; }
.mk-brand-logo { height: 52px; width: auto; min-width: 160px; object-fit: contain; }
.mk-brand-mark { display: none; width: 28px; height: 28px; }
.mk-brand-divider { width: 1px; height: 24px; background: var(--border); }
.mk-brand-market {
  font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1;
  color: var(--ink); letter-spacing: -0.01em;
}
.mk-search { position: relative; flex: 1; max-width: 560px; }
.mk-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  display: flex; color: var(--muted); pointer-events: none;
}
.mk-search-icon .mk-ic { width: 18px; height: 18px; }
.mk-search-input {
  width: 100%; height: 44px; padding: 0 16px 0 42px;
  border: 1.5px solid var(--border-blue); border-radius: 12px; background: var(--paper);
  font: 500 15px/1 var(--font-body); color: var(--ink); outline: none;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
.mk-search-input::placeholder { color: var(--muted); }
.mk-search-input:focus,
.mk-price-input:focus,
.mk-region-select:focus,
.mk-sort select:focus,
.mk-select select:focus,
.mk-shelf-search input:focus,
.mk-hero-search:focus-within {
  border-color: var(--blue-bright); box-shadow: var(--focus-halo); outline: none;
}
.mk-header-right { display: flex; align-items: center; gap: 12px; margin-left: auto; flex: none; }
.mk-sell { font-size: 15px; font-weight: 600; color: var(--blue); white-space: nowrap; }

/* The typeahead */
.mk-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 70;
  max-height: min(70vh, 560px); overflow-y: auto; padding: 8px;
  background: var(--paper); border: 1px solid var(--border-blue);
  border-radius: var(--r-md); box-shadow: var(--shadow-2);
}
.mk-suggest-group + .mk-suggest-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--border); }
.mk-suggest-label {
  padding: 8px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--body-c);
}
.mk-suggest-row {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 10px;
  border-radius: var(--r-sm); color: var(--ink); font-size: 14px; line-height: 20px;
  text-decoration: none;
}
.mk-suggest-row:hover,
.mk-suggest-row.is-active { background: var(--canvas); text-decoration: none; }
.mk-suggest-row.is-all { margin-top: 4px; border-top: 1px solid var(--border); border-radius: 0 0 var(--r-sm) var(--r-sm); font-weight: 600; }
.mk-suggest-logo {
  flex: none; width: 24px; height: 24px; border-radius: 6px; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 12px;
}
.mk-suggest-logo img { width: 100%; height: 100%; object-fit: cover; }
.mk-suggest-logo.is-icon { background: var(--canvas); color: var(--body-c); }
.mk-suggest-logo.is-icon .mk-ic { width: 16px; height: 16px; }
.mk-suggest-thumb {
  position: relative; flex: none; width: 32px; aspect-ratio: 4 / 5; border-radius: 6px;
  overflow: hidden;
}
.mk-suggest-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-suggest-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mk-suggest-sub { font-size: 13px; color: var(--body-c); white-space: nowrap; }
.mk-suggest-sub.is-block { display: block; font-size: 12px; line-height: 16px; }
.mk-suggest-price { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.mk-suggest-empty { padding: 12px 10px; font-size: 14px; color: var(--body-c); }
.market-shell mark.mk-hl {
  font-weight: 700; color: inherit; border-radius: 3px; padding: 0 1px;
  background: color-mix(in srgb, var(--gold-light) 30%, transparent);
}

/* ---------- Footer: the site's dark footer with a Weave edge ---------- */
.mk-footer { position: relative; padding-top: 64px; }
.mk-footer-weave { position: absolute; top: 0; left: 0; right: 0; }
.mk-footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.mk-footer .footer-brand img { height: 44px; width: auto; }

/* ---------- Page scaffolding ---------- */
.mk-page { padding-top: 20px; padding-bottom: 64px; }
.mk-crumbs { margin-bottom: 16px; font-size: 13px; line-height: 18px; color: var(--body-c); }
.mk-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; }
.mk-crumbs li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.mk-crumbs li + li::before { content: "›"; color: var(--muted); }
.mk-crumbs a { color: var(--body-c); }
.mk-crumbs a:hover { color: var(--ink); }
.mk-crumbs [aria-current] { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }
.mk-section-head.is-tight { margin-bottom: 16px; }
.mk-section-head .eyebrow { margin-bottom: 8px; }
.mk-section-head .mk-chip-featured { margin-bottom: 10px; }
.mk-section-rail { margin-top: 56px; }
.mk-label {
  margin-bottom: 8px; font-family: var(--font-body); font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--body-c);
}
.mk-link-btn {
  margin-top: 6px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 600 14px/20px var(--font-body); color: var(--blue);
}
.market-shell .tile.mk-rail-form:hover,
.market-shell .tile.mk-good-to-know:hover,
.market-shell .tile.mk-shop-card:hover,
.market-shell .tile.mk-zero:hover,
.market-shell .tile.mk-sell-band:hover { transform: none; }
.btn-row.is-center { justify-content: center; }

/* ---------- Home: the hero (§6.1.1) ---------- */
.mk-hero { padding: 64px 0; background: var(--canvas); overflow: hidden; }
.mk-hero-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 40px; align-items: center; }
.mk-hero-grid.is-empty { grid-template-columns: minmax(0, 720px); }
.mk-hero-text { min-width: 0; }
.mk-hero-text h1 { font-size: 56px; line-height: 60px; font-weight: 800; }
.mk-hero-sub { margin-top: 20px; max-width: 460px; font-size: 18px; line-height: 28px; color: var(--body-c); }
.mk-hero-search {
  position: relative; display: flex; align-items: center; gap: 8px; height: 56px; margin-top: 32px;
  padding: 0 7px 0 46px; border: 1.5px solid var(--border-blue); border-radius: 12px;
  background: var(--paper); box-shadow: var(--shadow-1);
}
.mk-hero-search .mk-search-icon { left: 16px; }
.mk-hero-search input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; outline: none;
  font: 500 16px/1 var(--font-body); color: var(--ink);
}
.mk-hero-search input::placeholder { color: var(--muted); }
.mk-hero-search .btn { height: 42px; padding: 0 20px; }
.mk-hero-search-icon { display: none; }
.mk-popular { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.mk-popular-label { flex: none; font-size: 13px; font-weight: 500; color: var(--body-c); }
.mk-popular-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-popular .mk-chip { min-height: 32px; font-weight: 500; }
.mk-proof { display: flex; flex-wrap: wrap; margin-top: 32px; }
.mk-proof > div { padding: 0 24px; border-left: 1px solid var(--border); }
.mk-proof > div:first-child { padding-left: 0; border-left: 0; }
.mk-proof dd { font-size: 13px; line-height: 18px; color: var(--body-c); }
.mk-proof-num {
  display: block; font-family: var(--font-display); font-weight: 800; font-size: 28px;
  line-height: 34px; color: var(--ink);
}

/* The shopfront wall: three staggered stall columns (the middle one lower). */
.mk-wall {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  height: 560px; overflow: hidden;
  mask-image: linear-gradient(180deg, transparent 0, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, black 8%, black 92%, transparent 100%);
}
.mk-wall-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mk-wall-col:nth-child(2) { margin-top: 40px; }
.mk-wall.is-single { display: block; height: auto; mask-image: none; -webkit-mask-image: none; }
.mk-wall-tile {
  position: relative; display: block; flex: none; height: 220px; overflow: hidden;
  border-radius: var(--r-md); background: var(--navy); box-shadow: var(--shadow-2);
  text-decoration: none;
}
.mk-wall-tile.is-tall { height: 300px; }
.mk-wall-tile.is-wide { height: auto; aspect-ratio: 16 / 10; }
.mk-wall-tile:hover { text-decoration: none; }
.mk-wall-tile:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 3px; }
.mk-wall-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease-out; }
.mk-wall-fallback { position: absolute; inset: 0; }
.mk-wall-scrim { position: absolute; inset: 0; background: var(--scrim); }
.mk-wall-id {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  display: flex; align-items: center; gap: 12px; min-width: 0;
}
.mk-wall-logo {
  flex: none; width: 40px; height: 40px; overflow: hidden; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center; background: var(--paper);
  box-shadow: 0 0 0 2px var(--ring-white);
  font-family: var(--font-display); font-weight: 800; font-size: 17px;
}
.mk-wall-logo img { width: 100%; height: 100%; object-fit: cover; }
.mk-wall-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mk-wall-name {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  /* A label on a narrow tile, so the text face: Poppins is wide enough to cut most names short. */
  font-family: var(--font-body); font-weight: 700; font-size: 16px; line-height: 20px; color: var(--paper);
}
.mk-wall-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-wall-meta { font-size: 12px; line-height: 16px; color: rgba(255, 255, 255, 0.8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .mk-wall-tile:hover .mk-wall-cover { transform: scale(1.03); } }

/* The promise strip */
.mk-promise { padding: 20px 0; background: var(--paper); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.mk-promise-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mk-promise-item { display: flex; gap: 12px; padding: 0 24px; border-left: 1px solid var(--border); }
.mk-promise-item:first-child { padding-left: 0; border-left: 0; }
.mk-promise-icon { display: flex; color: var(--blue); padding-top: 1px; }
.mk-promise-title { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.mk-promise-line { margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--body-c); }

/* Walk the aisles */
.mk-grid-aisles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.mk-grid-aisles.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; margin-top: 8px; }
.mk-aisle-tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  min-height: 150px; padding: 16px; overflow: hidden;
  background: var(--paper); border: 1px solid var(--border-blue); border-radius: var(--r-md);
  text-decoration: none; text-align: left;
  transition: border-color 200ms ease-out, box-shadow 200ms ease-out;
}
.mk-aisle-tile:hover { text-decoration: none; }
.mk-aisle-tile:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
.mk-aisle-thumbs { display: flex; }
.mk-aisle-thumb {
  position: relative; width: 44px; height: 44px; overflow: hidden; border-radius: 50%;
  box-shadow: 0 0 0 2px var(--paper);
}
.mk-aisle-thumb + .mk-aisle-thumb { margin-left: -12px; }
.mk-aisle-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-aisle-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; }
.mk-aisle-icon .mk-ic { width: 22px; height: 22px; }
.mk-aisle-text { display: flex; flex-direction: column; gap: 2px; }
.mk-aisle-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 22px; color: var(--ink); }
.mk-aisle-count { font-size: 13px; line-height: 18px; color: var(--body-c); }
.mk-aisle-weave { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; opacity: 0; transition: opacity 200ms ease-out; }
@media (hover: hover) and (pointer: fine) {
  .mk-aisle-tile:hover { border-color: var(--blue-bright); box-shadow: var(--shadow-2); }
  .mk-aisle-tile:hover .mk-aisle-weave { opacity: 1; }
}

/* The featured shopfront tile variant (not on the home page since 2026-10-05) */
.mk-awning.is-wide { aspect-ratio: 21 / 9; }
.mk-awning-chips { position: absolute; top: 12px; right: 12px; z-index: 1; display: flex; gap: 8px; }
.mk-aisle-chip.is-inline { position: static; }
.mk-shop.is-featured .mk-shop-id { padding: 8px 24px 0; }
.mk-shop.is-featured .mk-shop-foot { padding: 12px 24px; }
.mk-shop-logo.is-lg { width: 72px; height: 72px; margin: -36px 0 0 24px; border-radius: var(--r-md); font-size: 28px; }
.mk-shop-name.is-lg { font-size: 24px; line-height: 30px; }
.mk-shop-blurb {
  margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--body-c);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mk-shelf.is-lg { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 14px 24px 0; }
.mk-shelf-title { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-shop-foot-end { display: inline-flex; align-items: center; gap: 12px; }
.mk-visit { position: relative; z-index: 2; }

/* The search variant: a compact row with a square cover and a mini shelf */
.mk-shop-search {
  position: relative; display: flex; min-width: 0; overflow: hidden;
  background: var(--paper); border: 1px solid var(--border-blue); border-radius: var(--r-md);
  transition: box-shadow 200ms ease-out;
}
.mk-shop-search-cover { position: relative; flex: none; width: 120px; background: var(--canvas); }
.mk-shop-search-cover img,
.mk-shop-search-cover .mk-awning-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-shop-search-cover .mk-awning-mono { font-size: 44px; right: 50%; transform: translate(50%, -50%); }
.mk-shop-search-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
.mk-shop-search-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mk-shop-search .mk-shop-logo { width: 40px; height: 40px; margin: 0; border: 1px solid var(--border-blue); box-shadow: none; font-size: 17px; }
.mk-shop-search .mk-shop-id { flex: 1; padding: 0; }
.mk-shop-search .mk-shop-name { font-size: 16px; line-height: 22px; }
.mk-shelf.is-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; gap: 6px; }
@media (hover: hover) and (pointer: fine) { .mk-shop-search:hover { box-shadow: var(--shadow-2); } }

/* Sell on StarPay Market */
.mk-sell-band { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 40px; border-radius: var(--r-lg); }
.mk-sell-band h2 { font-size: 24px; line-height: 30px; }
.mk-sell-band p { margin-top: 8px; max-width: 560px; font-size: 15px; line-height: 24px; color: var(--body-c); }
.mk-sell-band .btn-row { flex: none; }

/* ---------- Browse: search + aisle (§6.2) ---------- */
.mk-search-head { margin-bottom: 24px; }
.mk-search-head h1 { font-size: 28px; line-height: 34px; overflow-wrap: anywhere; }
.mk-search-counts { margin-top: 6px; font-size: 14px; color: var(--body-c); }
.mk-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.mk-tab {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px;
  border: 1px solid var(--border-blue); border-radius: 999px; background: var(--paper);
  font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.mk-tab:hover { border-color: var(--ink); text-decoration: none; }
.mk-tab.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.mk-shops-first { margin-bottom: 32px; }
.mk-shops-first-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mk-shops-first .mk-section-head h2 { font-size: 20px; line-height: 26px; }

.mk-two-pane { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 32px; align-items: start; }
.mk-rail { position: sticky; top: calc(var(--header-h) + 20px); }
.mk-rail-form { padding: 20px; max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; }
.mk-rail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mk-rail-title { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); }
.mk-rail-clear { font-size: 13px; font-weight: 600; }
.mk-sheet-close,
.mk-sheet-apply,
.mk-filters-btn,
.mk-sheet-backdrop { display: none; }
.mk-facet { margin: 16px 0 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--border); min-width: 0; }
.mk-facet legend {
  float: left; width: 100%; margin-bottom: 8px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--body-c);
}
.mk-facet legend + * { clear: both; }
.mk-check {
  display: flex; align-items: center; gap: 10px; min-height: 36px;
  font-size: 14px; line-height: 20px; color: var(--ink); cursor: pointer;
}
.mk-check input { flex: none; width: 18px; height: 18px; accent-color: var(--blue); cursor: pointer; }
.mk-facet-count { margin-left: auto; font-size: 13px; color: var(--body-c); }
.mk-price-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mk-price-field span { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--body-c); }
.mk-price-input,
.mk-region-select,
.mk-shelf-search input {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1.5px solid var(--border-blue); border-radius: 12px; background: var(--paper);
  font: 500 15px/1 var(--font-body); color: var(--ink); outline: none;
}
.mk-price-input::placeholder,
.mk-shelf-search input::placeholder { color: var(--muted); }
.mk-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mk-chip-sm { min-height: 30px; padding: 0 10px; font-size: 12px; font-weight: 600; }
.mk-rail-foot { margin-top: 20px; }

.mk-results { min-width: 0; }
.mk-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-height: 48px; margin-bottom: 20px; }
.mk-applied { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.mk-applied.is-center { flex: none; justify-content: center; }
.mk-chip-filter { gap: 6px; }
.mk-clear { font-size: 13px; font-weight: 600; }
.mk-sort,
.mk-select { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--body-c); }
.mk-sort { margin-left: auto; }
.mk-sort select,
.mk-select select {
  height: 40px; padding: 0 12px; border: 1.5px solid var(--border-blue); border-radius: 999px;
  background: var(--paper); font: 600 14px/1 var(--font-body); color: var(--ink); cursor: pointer;
}
.mk-count-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 999px; background: var(--blue); color: var(--paper);
  font-size: 11px; font-weight: 700;
}
.mk-browse .mk-grid-products,
.mk-shops-results .mk-grid-shops,
.mk-shelf-section #shop-grid { transition: opacity 150ms ease-out; }
.mk-browse.htmx-request .mk-grid-products,
.mk-shops-results.htmx-request .mk-grid-shops,
.mk-shelf-section.htmx-request #shop-grid { opacity: 0.6; }
.mk-more { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 40px; }
.mk-more.htmx-request .mk-more-btn { opacity: 0.6; pointer-events: none; }
.mk-showing { font-size: 14px; color: var(--body-c); }
.mk-pager { display: flex; justify-content: center; gap: 20px; font-size: 13px; font-weight: 600; }

/* Zero and notice cards */
.mk-zero {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 40px 24px; text-align: center;
}
.mk-zero.is-inline { padding: 28px 24px; }
.mk-zero h1 { font-size: 28px; line-height: 34px; }
.mk-zero h2 { font-size: 22px; line-height: 28px; overflow-wrap: anywhere; }
.mk-zero p { max-width: 520px; font-size: 15px; line-height: 24px; color: var(--body-c); }
.mk-zero-icon {
  display: flex; align-items: center; justify-content: center; width: 56px; height: 56px;
  border-radius: 50%; background: var(--canvas); color: var(--body-c);
}
.mk-zero-icon .mk-ic { width: 26px; height: 26px; }
.mk-zero-hint { margin-top: 8px; }
.mk-notice-card { max-width: 680px; margin: 40px auto 0; }

/* The aisle hero */
.mk-aisle-hero {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  min-height: 200px; margin-bottom: 32px; padding: 40px; overflow: hidden;
  border-radius: var(--r-md); color: var(--accent-ink, var(--paper));
}
.mk-aisle-hero-bg { position: absolute; inset: 0; }
.mk-aisle-hero-kente { position: absolute; top: 0; bottom: 0; right: 0; width: 34%; }
.mk-aisle-hero-text,
.mk-aisle-hero-shops { position: relative; z-index: 1; min-width: 0; }
.mk-aisle-hero-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.85; }
.market-shell .mk-aisle-hero h1 { margin-top: 6px; font-size: 44px; line-height: 48px; color: var(--accent-ink, var(--paper)); }
.mk-aisle-hero-stats { margin-top: 8px; font-size: 15px; line-height: 22px; }
.mk-aisle-hero-shops { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; text-align: right; max-width: 320px; }
.mk-aisle-hero-shops p { font-size: 14px; line-height: 20px; }
.mk-logo-stack { display: flex; }
.mk-logo-stack-item {
  display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; overflow: hidden;
  border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 3px var(--paper);
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
}
.mk-logo-stack-item + .mk-logo-stack-item { margin-left: -14px; }
.mk-logo-stack-item img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Shops directory (redesigned 2026-10-05 from the owner's mock) ----------
   A hero on paper (the words, the search, and listed shops' own covers with
   the verified-shop count), aisle chips tinted by each aisle's accent preset,
   the dark "Featured shop" banner, then the card grid. */
/* One page, one aisle list: the chips replace the shell's aisle bar here. */
body.mk-dir-on .mk-aisles { display: none; }
.mk-dir-hero { padding: 40px 0 32px; background: var(--paper); border-bottom: 1px solid var(--border); overflow: hidden; }
.mk-dir-hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 40px; align-items: center; }
.mk-dir-hero-text { min-width: 0; }
.mk-dir-hero-text h1 { margin-top: 8px; font-size: 48px; line-height: 52px; font-weight: 800; }
.mk-dir-hero-sub { margin-top: 12px; max-width: 520px; font-size: 18px; line-height: 28px; color: var(--body-c); }
.mk-dir-search { max-width: 560px; margin-top: 24px; }
.mk-dir-hero-art { position: relative; min-height: 220px; }
.mk-dir-hero-art.is-bare { min-height: 0; display: flex; justify-content: flex-end; }
.mk-dir-hero-covers {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; height: 220px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 12%);
  mask-image: linear-gradient(90deg, transparent 0%, black 12%);
}
.mk-dir-hero-covers.count-1 { grid-template-columns: minmax(0, 1fr); }
.mk-dir-hero-covers.count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mk-dir-hero-covers img {
  width: 100%; height: 188px; object-fit: cover; border-radius: var(--r-md); background: var(--canvas);
  box-shadow: var(--shadow-1);
}
.mk-dir-hero-covers img:nth-child(2) { height: 220px; }
.mk-dir-badge {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  display: inline-flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px;
  border-radius: var(--r-md); background: var(--paper); box-shadow: var(--shadow-2);
  font-size: 13px; line-height: 16px; color: var(--body-c);
}
.mk-dir-hero-art.is-bare .mk-dir-badge { position: static; }
.mk-dir-badge strong { display: block; font-family: var(--font-display); font-size: 24px; line-height: 26px; font-weight: 800; color: var(--ink); }
.mk-dir-badge-icon {
  display: flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px;
  border-radius: 50%; background: var(--green); color: var(--paper);
}
.mk-dir-badge-icon .mk-ic { width: 20px; height: 20px; stroke-width: 2.5; }

.mk-dir-page { padding-top: 24px; }
.mk-dir-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.mk-dir-chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.mk-dir-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--accent-soft, var(--paper)); color: var(--ink);
  font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: border-color 150ms ease-out, background-color 150ms ease-out;
}
.mk-dir-chip:not([class*="accent-"]) { border-color: var(--border-blue); }
.mk-dir-chip:hover { border-color: var(--accent, var(--ink)); text-decoration: none; }
.mk-dir-chip-icon { display: flex; color: var(--accent, var(--ink)); }
.mk-dir-chip-icon .mk-ic { width: 18px; height: 18px; }
.mk-dir-chip.is-active { background: var(--blue); border-color: var(--blue); color: var(--paper); font-weight: 600; }
.mk-dir-chip.is-active .mk-dir-chip-icon { color: var(--paper); }
.mk-dir-chip:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
.mk-dir-tools { display: flex; align-items: center; gap: 16px; flex: none; }
.mk-dir-sort select { height: 40px; border-radius: 999px; }

.mk-dir-feature {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  min-height: 280px; margin-bottom: 40px; padding: 28px; overflow: hidden;
  border-radius: var(--r-lg); background: var(--navy-2); color: var(--paper); box-shadow: var(--shadow-2);
}
.mk-dir-feature-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-dir-feature::before { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--scrim-lead); }
.mk-dir-feature-body { position: relative; z-index: 2; max-width: 440px; }
.mk-dir-feature-eyebrow {
  font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--on-photo-sub);
}
.mk-dir-feature-id { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.mk-dir-feature-logo {
  display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden;
  width: 76px; height: 76px; border-radius: 50%; box-shadow: 0 0 0 4px var(--paper);
  background: var(--paper); font-family: var(--font-display); font-size: 28px; font-weight: 800;
}
.mk-dir-feature .mk-dir-feature-logo { background: var(--paper); }
.mk-dir-feature-logo img { width: 100%; height: 100%; object-fit: cover; }
.mk-dir-feature-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.mk-dir-feature-title h2 { font-size: 26px; line-height: 32px; color: var(--paper); }
.mk-dir-feature-name { color: var(--paper); text-decoration: none; }
.mk-dir-feature-name:hover { text-decoration: underline; text-underline-offset: 4px; }
.mk-dir-feature-name:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 3px; border-radius: 4px; }
.mk-dir-feature-title .mk-dir-pill { flex-basis: auto; }
.mk-dir-feature-blurb {
  margin-top: 14px; font-size: 15px; line-height: 22px; color: var(--on-photo-sub);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mk-dir-feature-meta { margin-top: 10px; font-size: 13px; color: var(--on-photo-sub); }
.mk-dir-feature-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; }
.mk-dir-feature-cta .mk-ic { width: 16px; height: 16px; }
.mk-dir-feature-shelf { position: relative; z-index: 2; display: flex; gap: 12px; flex: none; }
.mk-dir-feature-thumb {
  position: relative; display: block; width: 108px; height: 108px; overflow: hidden;
  border-radius: var(--r-sm); background: var(--paper); box-shadow: var(--shadow-1);
}
.mk-dir-feature-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.mk-dir-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.mk-dir-section-head h2 { font-size: 26px; line-height: 32px; }
.mk-dir-section-head p { font-size: 14px; color: var(--body-c); }

/* The shop page's gold "Verified" pill (.mk-verified), smaller on a card and
   light on the banner's navy wash. */
.mk-shop.is-card .mk-verified { flex: none; height: 20px; gap: 4px; padding: 0 8px; font-family: var(--font-body); font-size: 11px; }
.mk-verified.is-light { background: color-mix(in srgb, var(--paper) 16%, transparent); color: var(--paper); }
.mk-dir-pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  background: var(--tone-sand); font-size: 12px; font-weight: 500; color: var(--body-c);
}
.mk-dir-pill.is-dark { background: color-mix(in srgb, var(--paper) 18%, transparent); color: var(--paper); }

/* The shop card (_shopfront_tile.html's standard variant). */
.mk-shop.is-card .mk-awning { aspect-ratio: 4 / 1; }
.mk-shop-head { display: flex; align-items: flex-start; gap: 14px; padding: 0 16px; }
.mk-shop.is-card .mk-shop-logo { width: 64px; height: 64px; margin: -28px 0 0; border-radius: 50%; font-size: 24px; }
.mk-shop.is-card .mk-shop-id { flex: 1; padding: 10px 0 0; }
.mk-shop.is-card .mk-shop-name { font-size: 17px; line-height: 22px; }
.mk-shop.is-card .mk-dir-pill { margin-top: 6px; }
.mk-shop.is-card .mk-shop-tagline {
  margin-top: 8px; white-space: normal; font-size: 13px; line-height: 19px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mk-shop.is-card .mk-shop-meta { margin-top: 6px; }
.mk-shop.is-card .mk-shop-foot { margin-top: auto; padding: 14px 16px 16px; border-top: 0; }
.mk-shop.is-card .mk-shelf { grid-template-columns: repeat(3, 68px); padding: 0; flex: none; }
.mk-shop-visit {
  display: inline-flex; align-items: center; gap: 4px; margin-left: auto;
  font-size: 14px; font-weight: 600; color: var(--blue); white-space: nowrap;
}
.mk-shop-visit .mk-ic { width: 16px; height: 16px; transition: transform 150ms ease-out; }
@media (hover: hover) and (pointer: fine) {
  .mk-shop.is-card:hover .mk-shop-visit .mk-ic { transform: translateX(3px); }
  .mk-dir-feature:hover .mk-dir-feature-bg { transform: scale(1.02); }
}
.mk-dir-feature-bg { transition: transform 400ms ease-out; }

@media (max-width: 1020px) {
  .mk-dir-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .mk-dir-hero-art { display: none; }
  .mk-dir-toolbar { flex-direction: column; align-items: stretch; }
  .mk-dir-tools { justify-content: flex-end; }
  .mk-dir-feature-shelf { display: none; }
}
@media (max-width: 720px) {
  .mk-dir-hero { padding: 24px 0 20px; }
  .mk-dir-hero-text h1 { font-size: 32px; line-height: 36px; }
  .mk-dir-hero-sub { font-size: 16px; line-height: 24px; }
  .mk-dir-search { margin-top: 18px; height: 52px; }
  /* The chips become one scrolling row, edge to edge. */
  .mk-dir-chips {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
    margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter);
  }
  .mk-dir-chips::-webkit-scrollbar { display: none; }
  .mk-dir-chip { scroll-snap-align: start; height: 38px; padding: 0 14px; }
  .mk-dir-tools .mk-select { flex: none; }
  .mk-dir-tools .mk-select select { width: auto; }
  .mk-dir-feature { min-height: 0; padding: 20px; margin-bottom: 28px; }
  .mk-dir-feature::before { background: var(--scrim-under); }
  .mk-dir-feature-logo { width: 56px; height: 56px; font-size: 22px; }
  .mk-dir-feature-title h2 { font-size: 21px; line-height: 26px; }
  .mk-dir-section-head h2 { font-size: 21px; line-height: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .mk-dir-feature:hover .mk-dir-feature-bg,
  .mk-shop.is-card:hover .mk-shop-visit .mk-ic { transform: none; }
}

/* ---------- Shop page (§6.3) ---------- */
.mk-shop-awning { position: relative; height: 300px; overflow: hidden; border-radius: var(--r-md); background: var(--canvas); }
.mk-shop-awning img,
.mk-shop-awning .mk-awning-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-shop-awning .weave-valance { position: absolute; left: 0; right: 0; bottom: 0; }
.mk-awning-mono.is-xl { font-size: 160px; right: 48px; }
.mk-shop-identity { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 24px; padding: 0 8px; }
.mk-shop-logo.is-xl {
  width: 112px; height: 112px; margin: -56px 0 0; border-radius: var(--r-md);
  box-shadow: 0 0 0 4px var(--paper), var(--shadow-2); font-size: 44px;
}
.mk-shop-identity-text { flex: 1; min-width: 0; padding-top: 16px; }
.mk-shop-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mk-shop-title-row h1 { font-size: 32px; line-height: 38px; overflow-wrap: anywhere; }
.mk-shop-meta-line { margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--body-c); }
.mk-shop-meta-line a { color: var(--body-c); text-decoration: underline; text-underline-offset: 3px; }
.mk-shop-tagline-lg { margin-top: 8px; font-size: 16px; line-height: 24px; color: var(--body-c); }
.mk-shop-actions { display: flex; gap: 8px; padding-top: 16px; flex: none; }
.mk-pop { position: relative; }
.mk-pop-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 200px; padding: 6px;
  background: var(--paper); border: 1px solid var(--border-blue); border-radius: var(--r-md); box-shadow: var(--shadow-2);
}
.mk-pop-panel a,
.mk-pop-panel button {
  display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--r-sm);
  background: none; text-align: left; cursor: pointer;
  font: 500 14px/20px var(--font-body); color: var(--ink); text-decoration: none;
}
.mk-pop-panel a:hover,
.mk-pop-panel button:hover { background: var(--canvas); text-decoration: none; }
.mk-shop-about-grid { display: grid; grid-template-columns: 8fr 4fr; gap: 32px; margin: 32px 0; align-items: start; }
.mk-shop-about-grid.is-single { grid-template-columns: minmax(0, 420px); }
.mk-shop-about p { max-width: 65ch; font-size: 15px; line-height: 24px; color: var(--body-c); }
.mk-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mk-clamp-3.is-open { display: block; -webkit-line-clamp: unset; overflow: visible; }
.mk-good-to-know { padding: 20px; }
.mk-good-to-know h2 { font-size: 16px; line-height: 22px; margin-bottom: 12px; }
.mk-good-to-know ul { display: flex; flex-direction: column; gap: 12px; list-style: none; }
.mk-good-to-know li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 20px; color: var(--body-c); }
.mk-good-to-know li > .mk-ic { width: 18px; height: 18px; color: var(--blue); margin-top: 1px; }
.mk-gtk-pays { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mk-shelf-section { margin-top: 8px; }
.mk-shop-bar {
  position: sticky; top: calc(var(--header-h) + 8px); z-index: 20;
  display: flex; align-items: center; gap: 16px; min-height: 56px; margin-bottom: 24px; padding: 8px 16px;
  background: var(--paper); border-radius: var(--r-md); box-shadow: var(--shadow-1);
}
.mk-shop-bar-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mk-shop-bar-logo {
  flex: none; width: 28px; height: 28px; overflow: hidden; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 13px;
}
.mk-shop-bar-logo img { width: 100%; height: 100%; object-fit: cover; }
.market-shell .mk-shop-bar-name { font-size: 15px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-shelf-search { position: relative; display: flex; align-items: center; gap: 12px; flex: 1; justify-content: flex-end; min-width: 0; }
.mk-shop-bar .mk-search-icon { left: 12px; }
.mk-shop-bar .mk-shelf-search input { width: 280px; padding-left: 38px; }
.mk-shop-bar .mk-sort { margin-left: 0; }
.mk-shop-bar-count { flex: none; font-size: 13px; color: var(--body-c); }
.mk-shelf-section > .mk-notice { margin-bottom: 20px; }

/* ---------- Product page (§6.4) ---------- */
.mk-product-main { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: start; }
.mk-media { min-width: 0; }
.mk-media-frame {
  position: relative; display: block; width: 100%; max-width: 640px; aspect-ratio: 4 / 5;
  padding: 0; overflow: hidden; border: 0; border-radius: var(--r-md);
  background: var(--canvas); box-shadow: inset 0 0 0 1px rgba(20, 35, 71, 0.05); cursor: zoom-in;
}
.mk-media-frame:disabled { cursor: default; }
.mk-media-frame:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
.mk-media-frame .mk-mono { font-size: 96px; }
.mk-media-thumb,
.mk-media-full { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.mk-media-thumb { filter: blur(12px); transform: scale(1.04); }
.mk-media-full { opacity: 0; transition: opacity 150ms ease-out; }
.mk-media-full.is-loaded { opacity: 1; }
.mk-media-expand {
  position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; background: var(--ring-white); color: var(--ink); box-shadow: var(--shadow-1);
}
.mk-lightbox {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(10, 24, 48, 0.9);
}
.mk-lightbox img { max-width: 100%; max-height: 90vh; object-fit: contain; border-radius: var(--r-sm); }
.mk-lightbox-close {
  position: absolute; top: 16px; right: 16px; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer;
}
.mk-buybox { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mk-shop-card { display: flex; align-items: center; gap: 12px; padding: 12px; text-decoration: none; }
.mk-shop-card:hover { text-decoration: none; }
.mk-shop-card-logo {
  flex: none; width: 40px; height: 40px; overflow: hidden; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 17px;
}
.mk-shop-card-logo img { width: 100%; height: 100%; object-fit: cover; }
.mk-shop-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mk-shop-card-name {
  display: flex; align-items: center; gap: 4px; min-width: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 20px; color: var(--ink);
}
.mk-shop-card-name .mk-star { width: 14px; height: 14px; }
.mk-shop-card-since { font-size: 12px; line-height: 16px; color: var(--body-c); }
.mk-shop-card-visit { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--blue); }
.market-shell .mk-product-h1 {
  font-size: 30px; line-height: 36px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.mk-price-hero { font-family: var(--font-body); font-weight: 800; font-size: 32px; line-height: 36px; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.mk-stock { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--body-c); }
.mk-stock-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--body-c); }
.mk-stock.is-low { color: var(--ink); }
.mk-stock.is-low .mk-stock-dot { background: var(--gold); }
.mk-stock.is-out { color: var(--ink); opacity: 0.8; }
.mk-stock.is-out .mk-stock-dot { background: var(--ink); }
.mk-buy-actions { display: flex; flex-direction: column; gap: 10px; }
.mk-buy-now { min-height: 52px; }
.mk-buy-note { font-size: 13px; line-height: 18px; color: var(--body-c); text-align: center; }
.mk-delivery { padding: 16px; border-radius: var(--r-md); background: var(--canvas); font-size: 14px; line-height: 22px; }
.mk-delivery-label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink); }
.mk-region-select { margin: 8px 0 12px; cursor: pointer; }
.mk-delivery-fee { font-size: 15px; font-weight: 700; color: var(--ink); }
.mk-delivery-note,
.mk-delivery-soon { margin-top: 4px; font-size: 13px; line-height: 20px; color: var(--body-c); }
.mk-delivery-soon { margin-top: 10px; }
.mk-paywith { display: flex; flex-direction: column; gap: 8px; }
.mk-paywith p { font-size: 13px; line-height: 18px; color: var(--body-c); }
.mk-product-links { font-size: 13px; }
.mk-about-item { max-width: 680px; margin-top: 48px; }
.mk-about-item h2 { font-size: 20px; line-height: 26px; margin-bottom: 10px; }
.mk-about-item p { font-size: 15px; line-height: 26px; color: var(--body-c); }
.mk-mobile-buy { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .mk-grid-aisles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mk-shops-first-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-shops-first-row > :nth-child(3) { display: none; }
}
@media (max-width: 1020px) {
  .mk-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .mk-hero-text h1 { font-size: 44px; line-height: 50px; }
  .mk-wall { height: 460px; }
  .mk-two-pane { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
  .mk-product-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
  .mk-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .mk-product-main { grid-template-columns: minmax(0, 1fr); }
  .mk-buybox { position: static; }
  .mk-media-frame { max-width: none; }
  .mk-shop-about-grid { grid-template-columns: minmax(0, 1fr); }
  .mk-sell-band { flex-direction: column; align-items: flex-start; }
  .mk-shop-identity { flex-wrap: wrap; }
  .mk-shop-actions { padding-top: 0; }
  .mk-shop-bar .mk-shelf-search input { width: 200px; }
}
@media (max-width: 720px) {
  .market-shell { --header-h: 112px; }
  /* Header: row 1 the S mark, "Market" and the cart; row 2 the search. */
  .mk-header-inner { flex-wrap: wrap; height: auto; gap: 8px 12px; padding-top: 8px; padding-bottom: 10px; }
  .mk-brand-logo,
  .mk-brand-divider,
  .mk-sell { display: none; }
  .mk-brand-mark { display: block; }
  .mk-brand { gap: 8px; min-height: 44px; }
  .mk-brand-market { font-size: 17px; }
  .mk-search { order: 3; flex-basis: 100%; max-width: none; }

  .mk-page { padding-bottom: 48px; }
  .mk-hero { padding: 40px 0; }
  .mk-hero-text h1 { font-size: 34px; line-height: 40px; }
  .mk-hero-sub { margin-top: 14px; font-size: 15px; line-height: 22px; }
  .mk-hero-search { height: 48px; margin-top: 24px; padding-left: 42px; }
  .mk-hero-search .btn { width: 40px; height: 36px; padding: 0; }
  .mk-hero-search-label { display: none; }
  .mk-hero-search-icon { display: flex; }
  .mk-hero-search-icon .mk-ic { width: 18px; height: 18px; }
  .mk-popular { align-items: flex-start; }
  .mk-popular-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .mk-popular-chips::-webkit-scrollbar { display: none; }
  .mk-proof-num { font-size: 22px; line-height: 28px; }
  .mk-proof > div { padding: 0 14px; }
  /* The wall becomes a scroll-snap carousel of 280×360 stalls. */
  .mk-wall {
    display: flex; gap: 12px; height: auto; overflow-x: auto; scroll-snap-type: x mandatory;
    mask-image: none; -webkit-mask-image: none; scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter);
  }
  .mk-wall::-webkit-scrollbar { display: none; }
  .mk-wall-col { display: contents; }
  .mk-wall-col:nth-child(2) { margin-top: 0; }
  .mk-wall-tile,
  .mk-wall-tile.is-tall { flex: 0 0 280px; height: 360px; scroll-snap-align: center; }
  .mk-wall.is-single { margin: 0; padding: 0; }
  .mk-wall-tile.is-wide { flex: none; width: 100%; height: auto; aspect-ratio: 4 / 3; }

  .mk-promise { padding: 16px 0; background: var(--canvas); border: 0; }
  .mk-promise-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px; padding: 16px; background: var(--paper);
    border: 1px solid var(--border-blue); border-radius: var(--r-md);
  }
  .mk-promise-item { padding: 0; border-left: 0; }
  /* Aisles: a two-row horizontal strip of 150×120 tiles. */
  .mk-grid-aisles {
    grid-template-columns: none; grid-template-rows: repeat(2, 120px);
    grid-auto-flow: column; grid-auto-columns: 150px; gap: 12px;
    overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter);
  }
  .mk-grid-aisles::-webkit-scrollbar { display: none; }
  .mk-grid-aisles.is-3 { grid-template-rows: none; grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); margin: 8px 0 0; padding: 0; overflow: visible; }
  .mk-aisle-tile { min-height: 0; scroll-snap-align: start; }
  .mk-grid-aisles.is-3 .mk-aisle-tile { min-height: 96px; }
  .mk-awning.is-wide { aspect-ratio: 16 / 9; }
  .mk-shelf.is-lg { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 12px 16px 0; }
  .mk-shelf.is-lg > :nth-child(5) { display: none; }
  .mk-shop.is-featured .mk-shop-id,
  .mk-shop.is-featured .mk-shop-foot { padding-left: 16px; padding-right: 16px; }
  .mk-shop-logo.is-lg { width: 56px; height: 56px; margin: -28px 0 0 16px; font-size: 22px; }
  .mk-shop-name.is-lg { font-size: 18px; line-height: 24px; }
  .mk-visit { display: none; }
  .mk-sell-band { padding: 24px; }
  .mk-sell-band .btn-row,
  .mk-sell-band .btn { width: 100%; }

  /* Browse: the rail becomes a bottom sheet; filters apply on "Show N products". */
  .mk-search-head h1 { font-size: 22px; line-height: 28px; }
  .mk-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .mk-shops-first-row {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter);
  }
  .mk-shops-first-row > * { flex: 0 0 300px; scroll-snap-align: start; }
  .mk-shops-first-row > :nth-child(3) { display: flex; }
  .mk-two-pane { display: block; }
  .mk-rail {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 90;
    transform: translateY(105%); transition: transform 240ms ease-out; visibility: hidden;
  }
  .mk-rail.is-open { transform: translateY(0); visibility: visible; }
  .mk-rail-form {
    max-height: 88dvh; padding: 16px 16px 0; border-radius: var(--r-lg) var(--r-lg) 0 0;
    box-shadow: var(--shadow-2);
  }
  .mk-sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 85; background: rgba(10, 24, 48, 0.4); }
  .mk-sheet-close {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    margin-left: 4px; border: 0; border-radius: 50%; background: var(--canvas); color: var(--ink); cursor: pointer;
  }
  .mk-check { min-height: 44px; }
  .mk-rail-foot {
    position: sticky; bottom: 0; margin: 20px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--paper); border-top: 1px solid var(--border);
  }
  .mk-sheet-apply { display: flex; min-height: 48px; }
  .mk-toolbar {
    position: sticky; top: var(--header-h); z-index: 20; margin: 0 calc(var(--gutter) * -1) 16px;
    padding: 4px var(--gutter); background: color-mix(in srgb, var(--canvas) 95%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  }
  .mk-filters-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px;
    border: 1px solid var(--border-blue); border-radius: 999px; background: var(--paper);
    font: 600 14px/1 var(--font-body); color: var(--ink); cursor: pointer;
  }
  .mk-sort { margin-left: auto; }
  .mk-sort > span { display: none; }
  .mk-applied { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .mk-applied.is-center { flex-wrap: wrap; overflow: visible; }

  .mk-aisle-hero { flex-direction: column; align-items: flex-start; min-height: 160px; padding: 20px; margin-bottom: 20px; }
  .market-shell .mk-aisle-hero h1 { font-size: 30px; line-height: 34px; }
  .mk-aisle-hero-shops { display: none; }
  .mk-select { flex: 1 1 140px; }
  .mk-select > span { display: none; }
  .mk-select select { width: 100%; }

  /* Shop page: a full-bleed 16:9 awning, an 80px logo overlapping by 40px. */
  .mk-shop-awning {
    height: auto; aspect-ratio: 16 / 9; border-radius: 0;
    margin: 0 calc(var(--gutter) * -1);
  }
  .mk-awning-mono.is-xl { font-size: 96px; right: 24px; }
  .mk-shop-identity { gap: 12px; padding: 0; }
  .mk-shop-logo.is-xl { width: 80px; height: 80px; margin-top: -40px; font-size: 32px; }
  .mk-shop-identity-text { flex-basis: 100%; padding-top: 0; }
  .mk-shop-title-row h1 { font-size: 24px; line-height: 30px; }
  .mk-shop-meta-line { font-size: 13px; }
  .mk-shop-bar { top: calc(var(--header-h) + 4px); flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .mk-shop-bar-id { display: none; }
  .mk-shop-bar .mk-shelf-search { justify-content: stretch; }
  .mk-shop-bar .mk-shelf-search input { width: 100%; }
  .mk-shop-bar .mk-shelf-search > label.mk-sort { flex: none; }
  .mk-shop-bar-count { display: none; }

  /* Product page: a full-bleed square photo, the sticky buy bar. */
  .mk-product-page { padding-bottom: 104px; }
  .mk-media-frame { aspect-ratio: 1 / 1; border-radius: 0; margin: 0 calc(var(--gutter) * -1); width: calc(100% + var(--gutter) * 2); }
  .market-shell .mk-product-h1 { font-size: 24px; line-height: 30px; }
  .mk-price-hero { font-size: 26px; line-height: 30px; }
  .mk-rail-row {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter);
  }
  .mk-rail-row::-webkit-scrollbar { display: none; }
  .mk-rail-row > * { flex: 0 0 42%; scroll-snap-align: start; }
  .mk-mobile-buy {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--paper); border-top: 1px solid var(--border);
    box-shadow: 0 -8px 28px rgba(20, 35, 71, 0.08);
  }
  .mk-mobile-buy-text { display: flex; flex-direction: column; }
  .mk-mobile-buy-price { font-size: 18px; line-height: 22px; font-weight: 700; color: var(--ink); }
  .mk-mobile-buy-stock { font-size: 12px; line-height: 16px; color: var(--body-c); }
  .mk-mobile-buy .btn { flex: 1; min-height: 48px; }

  .mk-footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .mk-wall-tile:hover .mk-wall-cover { transform: none; }
  .mk-rail,
  .mk-media-full,
  .mk-aisle-weave,
  .mk-browse .mk-grid-products { transition: none; }
}

/* =====================================================================
   Phase 2a — the global cart, checkout and the buyer's order page
   (concept-and-ui.md §5, §6.5-§6.8). The same grammar: orange = money in
   (Add to cart, Checkout, Pay), blue = money out (refunds), indigo =
   stablecoin only, green = success only. Theme variables only.
   ===================================================================== */
html.mk-locked,
html.mk-locked body { overflow: hidden; }

/* ---------- The header's cart button and badge (§5) ---------- */
.mk-cart-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none; border-radius: 999px;
  background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--border-blue);
  text-decoration: none;
}
.mk-cart-btn:hover { box-shadow: inset 0 0 0 1px var(--ink); text-decoration: none; }
.mk-cart-btn:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; box-shadow: var(--focus-halo); }
.mk-cart-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--orange); color: var(--paper);
  font: 700 11px/18px var(--font-body); text-align: center;
}

/* ---------- The drawer (desktop) / bottom sheet (phone) (§6.5) ---------- */
.mk-drawer-root { position: fixed; inset: 0; z-index: 120; }
.mk-drawer-backdrop { position: absolute; inset: 0; background: rgba(10, 24, 48, 0.4); animation: mkFade 280ms ease-out; }
.mk-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%);
  display: flex; flex-direction: column; background: var(--canvas); box-shadow: var(--shadow-2);
  animation: mkSlideIn 280ms ease-out;
}
.mk-sheet-handle { display: none; }
.mk-drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 64px; padding: 12px 16px 12px 20px; background: var(--paper); border-bottom: 1px solid var(--border);
}
.mk-drawer-head h2 { font-size: 18px; line-height: 24px; }
.mk-drawer-sub { font-size: 13px; line-height: 18px; color: var(--body-c); }
.mk-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none;
  border: 0; border-radius: 50%; background: var(--canvas); color: var(--ink); cursor: pointer;
}
.mk-icon-btn:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
.mk-drawer-region {
  display: flex; align-items: center; gap: 8px; padding: 8px 20px;
  font-size: 13px; color: var(--body-c); background: var(--canvas); border-bottom: 1px solid var(--border);
}
.mk-drawer-region.is-page { border: 1px solid var(--border-blue); border-radius: 12px; margin-bottom: 20px; background: var(--paper); }
.mk-drawer-region label { font-weight: 600; color: var(--ink); }
.mk-region-inline {
  border: 0; background: transparent; font: 700 13px var(--font-body); color: var(--blue); cursor: pointer;
  padding: 4px 2px; border-radius: 6px;
}
.mk-region-inline:focus-visible { outline: 2px solid var(--blue-bright); }
.mk-cart-unsaved { margin: 8px 20px 0; font-size: 13px; color: var(--body-c); }
.mk-drawer-body { flex: 1; overflow-y: auto; padding: 16px; overscroll-behavior: contain; }
.mk-cart-skeleton { display: flex; flex-direction: column; gap: 12px; }
.mk-skel-row { display: flex; gap: 12px; padding: 12px; border-radius: var(--r-md); background: var(--paper); }
.mk-skel-thumb { width: 56px; height: 70px; border-radius: var(--r-sm); flex: none; }
.mk-skel-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.mk-skel-bar { height: 12px; border-radius: 6px; width: 70%; }
.mk-skel-bar.is-short { width: 40%; }
@keyframes mkFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mkSlideIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mkSheetUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- The cart's content (drawer and /market/cart/) ---------- */
.mk-cart-error,
.mk-cart-blocker {
  padding: 10px 14px; border-radius: 12px; background: var(--error-tint); color: var(--error-ink);
  font-size: 13px; font-weight: 600;
}
.mk-cart-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 16px; text-align: center; }
.mk-cart-empty-icon {
  display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--paper); color: var(--ink);
}
.mk-cart-empty h3 { font-size: 18px; }
.mk-cart-empty p { font-size: 14px; color: var(--body-c); }
.mk-cart-dropped,
.mk-cart-choose { margin-bottom: 12px; }
.mk-cart-choose { font-size: 13px; color: var(--body-c); }
.mk-stalls { display: flex; flex-direction: column; gap: 12px; }
.mk-stall {
  position: relative; background: var(--paper); border: 1px solid var(--border-blue); border-radius: var(--r-md);
  padding: 14px 14px 0; overflow: hidden;
}
.mk-stall::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent, var(--blue)); }
.mk-stall.is-closed { opacity: 0.6; }
.mk-stall.is-closed .mk-line-notice { opacity: 1; }
.mk-stall.is-waiting { border-style: dashed; }
.mk-stall-head { display: flex; align-items: flex-start; gap: 10px; padding-bottom: 10px; }
.mk-stall-logo {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px;
  border-radius: 10px; overflow: hidden; font: 800 14px var(--font-display);
}
.mk-stall-logo img { width: 100%; height: 100%; object-fit: cover; }
.mk-stall-logo.is-lg { width: 40px; height: 40px; border-radius: 12px; }
.mk-stall-id { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.mk-stall-name { font: 700 15px/20px var(--font-body); color: var(--ink); }
.mk-stall-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.mk-include { flex-basis: 100%; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--body-c); cursor: pointer; }
.mk-include input { width: 16px; height: 16px; accent-color: var(--blue); }
.mk-stall-sub { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-size: 11px; color: var(--body-c); }
.mk-stall-sub strong { font-size: 15px; color: var(--ink); }
.mk-stall-lines { list-style: none; display: flex; flex-direction: column; }
.mk-line { padding: 10px 0; border-top: 1px solid var(--border); }
.mk-line.is-out .mk-line-row { opacity: 0.6; }
.mk-line-notice {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; padding: 6px 12px;
  border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 16px;
}
.mk-line-notice.is-price,
.mk-line-notice.is-reduced { background: var(--warm-tint); color: var(--orange-deep); }
.mk-line-notice.is-gone,
.mk-line-notice.is-error { background: var(--error-tint); color: var(--error-ink); }
.mk-line-notice.is-wait { background: var(--canvas); color: var(--body-c); }
.mk-line-notice .mk-link-btn { font-size: 12px; }
.mk-line-row { display: flex; align-items: flex-start; gap: 12px; }
.mk-line-thumb {
  position: relative; display: flex; align-items: center; justify-content: center; flex: none;
  width: 56px; aspect-ratio: 4 / 5; border-radius: var(--r-sm); overflow: hidden; background: var(--canvas);
  font: 800 18px var(--font-display);
}
.mk-line-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-line-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mk-line-title {
  font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mk-line-each { font-size: 12px; color: var(--body-c); }
.mk-line-controls { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.mk-stepper {
  display: inline-flex; align-items: center; height: 32px; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--border-blue); background: var(--paper);
}
.mk-stepper button {
  width: 36px; height: 44px; margin: -6px 0; border: 0; background: transparent; color: var(--ink);
  font: 700 16px var(--font-body); cursor: pointer;
}
.mk-stepper button:disabled { color: var(--muted); cursor: default; }
.mk-stepper span { min-width: 20px; text-align: center; font-weight: 700; color: var(--ink); font-size: 14px; }
.mk-trash {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border: 0; border-radius: 50%; background: transparent; color: var(--body-c); cursor: pointer;
}
.mk-trash:hover { background: var(--canvas); color: var(--ink); }
.mk-line-total { flex: none; font-size: 14px; font-weight: 700; color: var(--ink); }
.mk-stall-foot {
  display: flex; align-items: center; gap: 8px; margin: 0 -14px; padding: 10px 14px;
  background: var(--canvas); font-size: 12px; color: var(--body-c);
}
.mk-cart-foot {
  position: sticky; bottom: -16px; margin: 16px -16px -16px; padding: 16px;
  background: var(--paper); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px;
}
.mk-cart-sums { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.mk-cart-sums > div { display: flex; justify-content: space-between; gap: 12px; }
.mk-cart-sums dt { color: var(--body-c); }
.mk-cart-sums dd { font-weight: 600; color: var(--ink); }
.mk-cart-sums .is-total { padding-top: 8px; border-top: 1px solid var(--border); align-items: baseline; }
.mk-cart-sums .is-total dt { font-weight: 600; color: var(--ink); font-size: 16px; }
.mk-cart-sums .is-total dd { font-size: 20px; }
.mk-total-figure { font-size: 28px; line-height: 32px; }
.mk-cart-one { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 18px; color: var(--body-c); }
.mk-checkout-cta { min-height: 52px; gap: 8px; }
.mk-checkout-cta.is-disabled { opacity: 0.4; pointer-events: none; }
.mk-cart-links { font-size: 12px; color: var(--body-c); text-align: center; }
.mk-cart-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.mk-cart-page-head h1 { font-size: 40px; line-height: 44px; }
.mk-cart-layout.is-page { display: grid; grid-template-columns: 8fr 4fr; gap: 32px; align-items: start; }
.mk-cart-layout.is-page .mk-cart-foot { position: sticky; top: calc(var(--header-h) + 52px); margin: 0; padding: 20px; border-radius: var(--r-md); }
.mk-cart-layout.is-page .mk-line-thumb { width: 80px; }
.mk-cart-layout.is-page .mk-stepper { height: 40px; }

/* ---------- Quick-add on a tile (§7.3) and the product page's buy box ---------- */
.mk-product-well { position: relative; }
.mk-quick { position: absolute; right: 8px; bottom: 8px; z-index: 3; }
.mk-quick-add {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: var(--orange); color: var(--paper);
  box-shadow: var(--shadow-1); cursor: pointer; transition: background-color 150ms ease-out, transform 100ms ease-out;
}
.mk-quick-add .mk-ic { width: 18px; height: 18px; }
.mk-quick-add:hover { background: var(--orange-deep); }
.mk-quick-add:active { transform: scale(0.96); }
.mk-quick-add.is-added { background: var(--green); }
.mk-quick-add:focus-visible,
.mk-quick-stepper button:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
.mk-quick-stepper {
  display: inline-flex; align-items: center; justify-content: space-between; width: 104px; height: 40px;
  border-radius: 999px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1);
}
.mk-quick-stepper button { width: 36px; height: 44px; border: 0; background: transparent; font: 700 18px var(--font-body); color: var(--ink); cursor: pointer; }
.mk-quick-stepper span { font-weight: 700; }
.mk-quick-stepper.is-inline { box-shadow: inset 0 0 0 1.5px var(--border-blue); }
@media (hover: none) { .mk-quick-add { width: 36px; height: 36px; } }
.mk-buy-box { display: flex; flex-direction: column; gap: 10px; }
.mk-pick {
  display: inline-flex; align-items: center; justify-content: space-between; align-self: flex-start;
  width: 128px; height: 48px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--border-blue); background: var(--paper);
}
.mk-pick button { width: 44px; height: 44px; border: 0; background: transparent; font: 700 18px var(--font-body); color: var(--ink); cursor: pointer; }
.mk-pick button:disabled { color: var(--muted); cursor: default; }
.mk-pick span { font-weight: 700; color: var(--ink); }
.mk-add-btn { min-height: 52px; gap: 8px; }
.mk-add-btn.is-added { background: var(--green); }
.mk-mobile-buy-more { display: flex; align-items: center; gap: 8px; flex: 1; justify-content: flex-end; }

/* ---------- The toast (§5) ---------- */
.mk-toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 130; pointer-events: none; }
.mk-toast {
  display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: 380px; padding: 10px 12px;
  background: var(--paper); border-radius: var(--r-md); box-shadow: var(--shadow-2); pointer-events: auto;
  animation: mkSheetUp 200ms ease-out;
}
.mk-toast-thumb { width: 48px; height: 60px; flex: none; border-radius: var(--r-sm); object-fit: cover; background: var(--canvas); }
.mk-toast-text { flex: 1; min-width: 0; }
.mk-toast-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.mk-toast-sub { font-size: 12px; color: var(--body-c); }
.mk-toast-action { flex: none; border: 0; background: transparent; font: 700 13px var(--font-body); color: var(--blue); cursor: pointer; padding: 8px; }

/* ---------- The phone's mini-cart bar (§5 Mobile) ---------- */
.mk-minicart { display: none; }

/* ---------- The focus header and footer (checkout, the order page) ---------- */
.mk-focus-header { background: var(--paper); border-bottom: 1px solid var(--border); }
.mk-focus-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; height: 64px; }
.mk-secure { display: inline-flex; align-items: center; gap: 6px; justify-self: center; font-size: 12px; }
.mk-focus-back { justify-self: end; display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--blue); }
.mk-focus-footer { padding: 24px 0 32px; border-top: 1px solid var(--border); font-size: 12px; line-height: 18px; color: var(--body-c); }

/* ---------- Checkout (§6.6) ---------- */
.mk-checkout { max-width: 1100px; }
.mk-checkout-head { margin-bottom: 24px; }
.mk-checkout-head h1 { font-size: 28px; line-height: 34px; }
.mk-checkout-head p { margin-top: 4px; font-size: 15px; color: var(--body-c); }
.mk-checkout-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 40px; align-items: start; }
.mk-checkout-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.mk-checkout-side { position: sticky; top: 24px; min-width: 0; }
.market-shell .tile.mk-step,
.market-shell .tile.mk-summary,
.market-shell .tile.mk-pay-block,
.market-shell .tile.mk-split,
.market-shell .tile.mk-parcel,
.market-shell .tile.mk-receipt,
.market-shell .tile.mk-changed,
.market-shell .tile.mk-track-card,
.market-shell .mk-cart-foot.tile { transform: none; }
.mk-step { padding: 24px; margin: 0; border: 1px solid var(--border-blue); min-width: 0; }
.mk-step[inert] { opacity: 0.7; }
.mk-step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.mk-step-head h2 { font-size: 18px; line-height: 24px; }
.mk-step-n {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: none;
  border-radius: 50%; background: rgba(20, 35, 71, 0.08); font: 500 13px var(--font-mono); color: var(--ink);
}
.mk-field input,
.mk-field select,
.mk-field textarea { min-height: 48px; font-size: 16px; }
.mk-field textarea { resize: vertical; }
.mk-help { margin-top: 6px; font-size: 13px; line-height: 18px; color: var(--body-c); }
.mk-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mk-parcels { display: flex; flex-direction: column; margin-top: 4px; }
.mk-parcel-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); }
.mk-parcel-logo { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: none; border-radius: 7px; overflow: hidden; font: 800 11px var(--font-display); }
.mk-parcel-logo img { width: 100%; height: 100%; object-fit: cover; }
.mk-parcel-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mk-parcel-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.mk-parcel-meta { font-size: 13px; color: var(--body-c); }
.mk-parcel-fee { flex: none; font-size: 15px; font-weight: 700; color: var(--ink); }
.mk-parcel-empty { padding: 12px 0; font-size: 13px; color: var(--body-c); border-top: 1px solid var(--border); }
.mk-step-foot { margin-top: 12px; font-size: 12px; line-height: 18px; color: var(--body-c); }
.mk-review-facts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; font-size: 15px; }
.mk-review-facts > div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; }
.mk-review-facts dt { color: var(--body-c); }
.mk-review-facts dd { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.mk-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.mk-method {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 88px;
  padding: 14px 16px; border-radius: var(--r-md); background: var(--paper); cursor: pointer;
  box-shadow: inset 0 0 0 1.5px var(--border-blue); color: var(--ink);
}
.mk-method .mk-ic { color: var(--ink); }
.mk-method-label { font-weight: 700; font-size: 15px; }
.mk-method-sub { font-size: 12px; color: var(--body-c); }
.mk-method-reason { font-size: 12px; color: var(--body-c); }
.mk-method.is-active { box-shadow: inset 0 0 0 2px var(--orange); }
.mk-method.is-crypto .mk-ic,
.mk-method.is-crypto .mk-method-sub { color: var(--indigo); }
.mk-method.is-crypto.is-active { box-shadow: inset 0 0 0 2px var(--indigo); background: var(--indigo-tint); }
.mk-method.is-off { opacity: 0.55; cursor: not-allowed; }
.mk-method:has(:focus-visible) { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
.mk-momo { display: flex; flex-direction: column; gap: 12px; }
.mk-sublabel { font-size: 13px; font-weight: 700; color: var(--ink); }
.mk-same { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; color: var(--ink); cursor: pointer; }
.mk-same input { width: 18px; height: 18px; accent-color: var(--blue); }
.mk-prompt-box,
.mk-crypto-note {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: var(--canvas); font-size: 14px; line-height: 22px; color: var(--body-c);
}
.mk-prompt-box strong { color: var(--ink); }
.mk-prompt-box p + p { margin-top: 4px; }
.mk-crypto-note { background: var(--indigo-tint); color: var(--indigo); }
.mk-summary { padding: 24px; border: 1px solid var(--border-blue); }
.mk-summary-title { font-size: 20px; line-height: 26px; margin-bottom: 12px; }
.mk-summary-shops { list-style: none; display: flex; flex-direction: column; }
.mk-summary-shop { padding: 12px 0; border-top: 1px solid var(--border); }
.mk-summary-row { display: flex; align-items: center; gap: 10px; }
.mk-summary-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mk-summary-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.mk-summary-meta { font-size: 13px; color: var(--body-c); }
.mk-summary-amount { flex: none; font-size: 16px; font-weight: 700; color: var(--ink); }
.mk-summary-more { margin: 6px 0 0 42px; font-size: 13px; }
.mk-summary-items { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 8px 0 0 42px; }
.mk-summary-items li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); }
.mk-summary-thumb { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; aspect-ratio: 4 / 5; flex: none; border-radius: 8px; overflow: hidden; background: var(--canvas); }
.mk-summary-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-summary-item { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mk-summary-item .tnum { font-size: 12px; color: var(--body-c); }
.mk-summary .mk-cart-sums { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.mk-summary-note { margin-top: 10px; font-size: 13px; line-height: 18px; color: var(--body-c); }
.mk-consent { margin-top: 10px; font-size: 12px; line-height: 18px; color: var(--body-c); }
.mk-pay-cta {
  min-height: 56px; margin-top: 16px; gap: 8px;
  background: linear-gradient(120deg, var(--orange-bright) 0%, var(--orange) 45%, var(--orange-deep) 100%);
}
.mk-pay-cta:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.mk-checkout-grid.is-busy .mk-pay-cta { opacity: 0.8; }
.mk-anti-scam { display: flex; gap: 8px; margin-top: 12px; font-size: 12px; line-height: 18px; color: var(--body-c); }
.mk-anti-scam .mk-ic { color: var(--blue); flex: none; margin-top: 1px; }
.mk-trust { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13px; color: var(--body-c); }
.mk-trust li { display: flex; align-items: center; gap: 8px; }
.mk-trust .mk-ic { color: var(--success-ink); }
.mk-paybar { display: none; }
.mk-alert { margin-bottom: 20px; padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.mk-alert.is-error { background: var(--error-tint); color: var(--error-ink); border: 1px solid var(--error); }
.mk-changed { margin-bottom: 20px; padding: 18px 20px; background: var(--warm-tint); border: 1.5px solid var(--gold); }
.mk-changed h2 { font-size: 17px; margin-bottom: 6px; }
.mk-changed ul { margin: 0 0 6px 18px; font-size: 14px; color: var(--ink); }
.mk-changed p { font-size: 14px; color: var(--body-c); }

/* ---------- The buyer's order page and receipt (§6.7) ---------- */
.mk-order { max-width: 760px; }
.mk-order-live { display: flex; flex-direction: column; gap: 16px; }
.mk-order-title { display: flex; flex-direction: column; gap: 6px; }
.mk-order-ref { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--body-c); word-break: break-all; }
.mk-order-title h1 { font-size: 28px; line-height: 34px; }
.mk-order-sub { font-size: 15px; line-height: 22px; color: var(--body-c); }
.mk-pay-block { padding: 20px; border: 1px solid var(--border-blue); }
.mk-pay-state { display: flex; align-items: flex-start; gap: 16px; }
.mk-pay-line { font-size: 16px; line-height: 24px; color: var(--ink); font-weight: 600; }
.mk-pay-note { margin-top: 4px; font-size: 13px; line-height: 20px; color: var(--body-c); }
.market-shell .status-halo {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 48px; height: 48px; border-radius: 50%; color: var(--paper);
}
.market-shell .status-halo::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid currentColor; opacity: 0.25;
}
.market-shell .status-halo.is-orange,
.market-shell .status-halo.is-blue { color: var(--orange); }
.market-shell .status-halo.is-blue { color: var(--blue); }
.market-shell .status-halo.is-orange::after,
.market-shell .status-halo.is-blue::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent;
  border-top-color: currentColor; animation: mkSpin 1.4s linear infinite;
}
.market-shell .status-halo.is-green { background: var(--green); }
.market-shell .status-halo.is-green::before,
.market-shell .status-halo.is-error::before { display: none; }
.market-shell .status-halo.is-error { background: var(--error); }
.market-shell .status-halo.is-muted { color: var(--muted); }
@keyframes mkSpin { to { transform: rotate(360deg); } }
.mk-money-out { color: var(--blue); }
.mk-money-out strong { color: var(--blue); }
.mk-retry { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.mk-retry .mk-pay-cta { margin-top: 0; min-height: 48px; }
.mk-retry-other { flex-basis: 100%; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r-md); background: var(--canvas); }
.mk-crypto-panel { display: flex; flex-direction: column; gap: 12px; }
.mk-split { padding: 20px; border: 1px solid var(--border-blue); }
.mk-split h2 { font-size: 17px; margin-bottom: 8px; }
.mk-split-list { list-style: none; }
.mk-split-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.mk-split-row.is-delivery .mk-stall-logo { background: var(--canvas); color: var(--body-c); }
.mk-split-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mk-split-name { font-weight: 700; color: var(--ink); font-size: 15px; }
.mk-split-items { font-size: 13px; color: var(--body-c); }
.mk-split-ref { font-size: 12px; color: var(--body-c); word-break: break-all; }
.mk-split-end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-weight: 700; color: var(--ink); }
.market-shell .pill.mk-pill-wait { background: var(--canvas); color: var(--body-c); }
.market-shell .pill.mk-pill-go { background: color-mix(in srgb, var(--blue) 10%, transparent); color: var(--blue); }
.market-shell .pill.mk-pill-ok { background: var(--success-tint); color: var(--success-ink); }
.market-shell .pill.mk-pill-warn { background: var(--warm-tint); color: var(--orange-deep); }
.market-shell .pill.mk-pill-out { background: color-mix(in srgb, var(--blue) 10%, transparent); color: var(--blue); }
.mk-progress-track { display: flex; gap: 4px; height: 8px; }
.mk-progress-seg { flex: 1; border-radius: 999px; background: var(--border); }
.mk-progress-seg.is-done { background: linear-gradient(90deg, var(--orange) 0%, var(--gold) 100%); }
.mk-progress-label { margin-top: 6px; font-size: 13px; color: var(--body-c); }
.mk-parcel { padding: 20px; border: 1px solid var(--border-blue); display: flex; flex-direction: column; gap: 14px; }
.mk-parcel.is-refunded { border-color: var(--border); }
.mk-parcel-head { display: flex; align-items: flex-start; gap: 12px; }
.mk-parcel-shop { font: 700 16px/22px var(--font-display); color: var(--ink); }
.mk-parcel-end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 18px; font-weight: 700; color: var(--ink); }
.mk-timeline { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.mk-timeline li { display: flex; flex-direction: column; gap: 6px; font-size: 12px; line-height: 16px; color: var(--body-c); }
.mk-timeline .mk-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.mk-timeline li.is-done .mk-dot { background: var(--green); }
.mk-timeline li.is-current { color: var(--ink); font-weight: 700; }
.mk-timeline li.is-current .mk-dot { background: var(--ink); }
.mk-pin { padding: 14px 16px; border-radius: var(--r-md); background: var(--canvas); }
.mk-pin-label { font-size: 13px; font-weight: 700; color: var(--ink); }
.mk-pin-value { display: flex; gap: 10px; margin-top: 4px; font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: 0.04em; }
.mk-parcel-story { font-size: 14px; line-height: 22px; color: var(--ink); }
.mk-refund-line { font-size: 14px; line-height: 22px; }
.mk-receipt-table { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--ink); }
.mk-receipt-table td { padding: 8px 0; border-top: 1px dashed var(--border-blue); vertical-align: top; }
.mk-receipt-table td:last-child { text-align: right; font-weight: 600; white-space: nowrap; }
.mk-receipt-each { display: block; font-size: 12px; color: var(--body-c); }
.mk-receipt-table tr.is-sub td { color: var(--body-c); }
.mk-receipt-table tr.is-total td { font-weight: 700; }
.mk-receipt-policy { margin-top: 8px; font-size: 13px; }
.mk-receipt { padding: 24px; border: 1px solid var(--border-blue); display: flex; flex-direction: column; gap: 14px; }
.mk-receipt-head { display: flex; align-items: center; gap: 10px; }
.mk-receipt-head h2 { font-size: 15px; line-height: 20px; flex: 1; }
.mk-receipt-ref { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; color: var(--body-c); word-break: break-all; }
.mk-next h3 { font-size: 15px; margin-bottom: 6px; }
.mk-next ul { margin-left: 18px; font-size: 14px; line-height: 22px; color: var(--body-c); }
.mk-receipt-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Track (§6.8) ---------- */
.mk-track { max-width: 560px; }
.mk-track-card { padding: 28px; border: 1px solid var(--border-blue); }
.mk-track-card h1 { font-size: 28px; line-height: 34px; margin-bottom: 6px; }
.mk-track-form { margin-top: 20px; }

/* ---------- Phase 2a on narrow screens ---------- */
@media (max-width: 900px) {
  .mk-checkout-grid,
  .mk-cart-layout.is-page { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .mk-checkout-side,
  .mk-cart-layout.is-page .mk-cart-foot { position: static; }
}
@media (max-width: 720px) {
  .mk-drawer {
    top: 24px; left: 0; width: 100%; border-radius: var(--r-lg) var(--r-lg) 0 0;
    animation: mkSheetUp 280ms ease-out;
  }
  .mk-sheet-handle { display: block; width: 36px; height: 4px; margin: 8px auto 0; border-radius: 999px; background: var(--border); }
  .mk-drawer-head { border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .mk-cart-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .mk-toast-region { left: 16px; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); display: flex; justify-content: center; }
  .mk-toast { min-width: 0; width: 100%; }
  .mk-minicart {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 64px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--navy); color: var(--paper); animation: mkSheetUp 240ms ease-out;
  }
  body.mk-no-minicart .mk-minicart { display: none !important; }
  .mk-minicart-text { display: flex; flex-direction: column; }
  .mk-minicart-sub { font-size: 13px; color: rgba(255, 255, 255, 0.8); }
  .mk-minicart-total { font-size: 17px; font-weight: 700; }
  .mk-minicart-btn { min-height: 44px; padding: 0 18px; }
  .mk-cart-page-head h1 { font-size: 28px; line-height: 32px; }
  .mk-focus-inner { grid-template-columns: auto 1fr auto; }
  .mk-focus-inner .mk-brand-logo,
  .mk-focus-inner .mk-brand-divider { display: none; }
  .mk-focus-inner .mk-brand-mark { display: block; }
  .mk-focus-back span { display: none; }
  .mk-checkout { padding-bottom: 120px; }
  .mk-step { padding: 20px 16px; }
  .mk-field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .mk-checkout-side .mk-pay-cta { display: none; }
  .mk-paybar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: center; gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--paper);
    border-top: 1px solid var(--border); box-shadow: 0 -8px 28px rgba(20, 35, 71, 0.08);
  }
  .mk-paybar-text { display: flex; flex-direction: column; }
  .mk-paybar-total { font-size: 18px; font-weight: 700; color: var(--ink); }
  .mk-paybar-sub { font-size: 12px; color: var(--body-c); }
  .mk-paybar .mk-pay-cta { flex: 1; min-height: 52px; margin: 0; }
  .mk-order-title h1 { font-size: 22px; line-height: 28px; }
  .market-shell .status-halo { width: 44px; height: 44px; }
  .mk-timeline { grid-template-columns: minmax(0, 1fr); }
  .mk-timeline li { flex-direction: row; align-items: center; }
  .mk-receipt-actions { flex-direction: column; }
  .mk-receipt-actions .btn { width: 100%; }
  .mk-retry .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .mk-drawer,
  .mk-drawer-backdrop,
  .mk-toast,
  .mk-minicart { animation: mkFade 1ms linear; }
  .market-shell .status-halo::after { animation: none; }
  .mk-quick-add { transition: none; }
}
@media print {
  .mk-focus-header,
  .mk-focus-footer,
  .weave-rule,
  .mk-receipt-actions,
  .mk-toast-region,
  .mk-order-ref .mk-link-btn { display: none !important; }
  .market-shell { background: var(--paper); }
  .mk-parcel,
  .mk-receipt,
  .mk-pay-block { break-inside: avoid; box-shadow: none; }
}

/* =====================================================================
   Phase 3 — discovery: sale prices, richer facets, the phone's sort sheet
   and folding search, collections, "Popular this fortnight", the events
   rail and the help page. The same grammar and the landing variables only
   (no new colour). City landings and "Shops near you" are gone: the Market
   shows no shop location (owner decision, 2026-09-29).
   ===================================================================== */
/* ---------- Sale (a "was" price above today's) ---------- */
/* Orange-toned text is --orange-deep on the warm tint (the site's warn
   pattern): a discount is news about the price, never a buying action. */
.mk-badge-sale { background: var(--warm-tint); color: var(--orange-deep); }
.mk-was {
  margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--body-c);
  text-decoration: line-through; text-decoration-thickness: 1px;
}
.mk-was.is-hero { font-family: var(--font-body); font-size: 18px; font-weight: 500; }
.mk-sale-chip {
  display: inline-flex; align-items: center; height: 24px; margin-left: 8px; padding: 0 10px;
  border-radius: 999px; background: var(--warm-tint); color: var(--orange-deep);
  font: 700 11px/1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; vertical-align: middle;
}

/* ---------- Richer facets ---------- */
.mk-chip-count { margin-left: 4px; font-weight: 500; color: var(--body-c); }
.mk-chip.is-active .mk-chip-count { color: inherit; opacity: 0.8; }

/* ---------- The phone's sort sheet (A2-6) ---------- */
.mk-sort-btn,
.mk-sort-sheet { display: none; }
.mk-sort-rows { list-style: none; margin: 8px 0 0; padding: 0; }
.mk-sort-row {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 4px;
  border-top: 1px solid var(--border); font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none;
}
.mk-sort-row:hover { text-decoration: none; }
.mk-sort-row:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: -2px; border-radius: 8px; }
.mk-radio {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--border-blue); background: var(--paper);
}
.mk-sort-row.is-active { font-weight: 700; }
.mk-sort-row.is-active .mk-radio { border: 6px solid var(--blue); }
.mk-sort-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mk-sort-sheet-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); }

/* ---------- The header's folding search (A2-6, phones) ---------- */
.mk-search-toggle {
  display: none; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none;
  border: 0; border-radius: 999px; background: var(--paper); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--border-blue); cursor: pointer;
}
.mk-search-toggle:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; }

/* ---------- Collections ---------- */
.mk-collection-head { margin-bottom: 28px; }
.mk-collection-head h1 { font-size: 40px; line-height: 44px; overflow-wrap: anywhere; }
.mk-collection-dek { margin-top: 8px; max-width: 640px; font-size: 16px; line-height: 26px; color: var(--body-c); }

/* ---------- Zero results: the popular rail under the card ---------- */
.mk-zero-rail { margin-top: 40px; }

/* ---------- Events rail (links out to /e/<slug>) ---------- */
.mk-events { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.mk-event {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--paper); border: 1px solid var(--border-blue); border-radius: var(--r-md);
  box-shadow: var(--shadow-1); color: var(--ink); text-decoration: none;
  transition: box-shadow 200ms ease-out, transform 200ms ease-out;
}
.mk-event:hover { text-decoration: none; }
.mk-event:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; box-shadow: var(--focus-halo); }
.mk-event-well { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.mk-event-well img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-event-date {
  position: absolute; left: 12px; top: 12px; z-index: 1;
  display: flex; flex-direction: column; align-items: center; min-width: 52px; padding: 6px 8px;
  border-radius: 12px; background: var(--paper); box-shadow: var(--shadow-1); color: var(--ink);
}
.mk-event-day,
.mk-event-mon { font-size: 11px; font-weight: 700; line-height: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--body-c); }
.mk-event-num { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 26px; }
.mk-event-body { display: flex; flex-direction: column; gap: 4px; padding: 16px; }
.mk-event-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 23px; overflow-wrap: anywhere; }
.mk-event-meta { font-size: 13px; line-height: 18px; color: var(--body-c); }
.mk-event-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.mk-event-shop { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 500; color: var(--body-c); }
.mk-event-price { flex: none; font-size: 14px; font-weight: 700; color: var(--ink); }
.mk-event-out {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 16px 16px;
  font-size: 13px; font-weight: 600; color: var(--blue);
}
@media (hover: hover) and (pointer: fine) {
  .mk-event:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
}

/* ---------- The help page (A2-5) ---------- */
.mk-help { max-width: 860px; }
.mk-help-head { margin-bottom: 28px; }
.mk-help-head h1 { font-size: 40px; line-height: 44px; }
.mk-help-sub { margin-top: 10px; max-width: 640px; font-size: 17px; line-height: 27px; color: var(--body-c); }
.mk-help-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.mk-help-section { margin-top: 20px; padding: 28px; scroll-margin-top: calc(var(--header-h) + 24px); }
.market-shell .tile.mk-help-section:hover { transform: none; box-shadow: var(--shadow-1); }
.mk-help-section h2 { display: flex; align-items: center; gap: 10px; font-size: 24px; line-height: 30px; margin-bottom: 14px; }
.mk-help-section h2 .mk-ic { width: 22px; height: 22px; color: var(--blue); }
.mk-help-section p,
.mk-help-section li,
.mk-help-faq dd { font-size: 16px; line-height: 26px; color: var(--body-c); }
.mk-help-section p + p,
.mk-help-section ul + p,
.mk-help-section ol + p { margin-top: 12px; }
.mk-help-section strong { color: var(--ink); }
.mk-help-steps { margin: 0; padding-left: 22px; display: grid; gap: 12px; }
.mk-help-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.mk-help-more { font-size: 14px; }
.mk-help-section .btn-row { margin-top: 20px; }
.mk-help-faq { display: grid; gap: 6px; }
.mk-help-faq dt { margin-top: 10px; font-weight: 700; color: var(--ink); }
.mk-help-faq dt:first-child { margin-top: 0; }

@media (max-width: 900px) {
  .mk-events { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  /* The browse toolbar's sort becomes a button over a short sheet of four
     rows (the shop page's own sort select is left as it is). */
  .mk-toolbar .mk-sort { display: none; }
  .mk-sort-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 44px; margin-left: auto; padding: 0 16px;
    border: 1px solid var(--border-blue); border-radius: 999px; background: var(--paper);
    font: 600 14px/1 var(--font-body); color: var(--ink); cursor: pointer;
  }
  .mk-sort-sheet {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 4px 16px calc(16px + env(safe-area-inset-bottom));
    background: var(--paper); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-2);
    animation: mkSheetUp 240ms ease-out;
  }
  .mk-sort-sheet .mk-sheet-close { display: inline-flex; }

  /* The header search folds into a button after 120px of scroll (market.js). */
  body.mk-folded { --header-h: 64px; }
  body.mk-folded .mk-header .mk-search { display: none; }
  body.mk-folded .mk-search-toggle { display: inline-flex; }

  .mk-collection-head h1,
  .mk-help-head h1 { font-size: 28px; line-height: 32px; }
  .mk-help-section { padding: 20px 16px; }
  .mk-events {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter);
  }
  .mk-events > * { flex: 0 0 280px; scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) {
  .mk-sort-sheet { animation: mkFade 1ms linear; }
  .mk-event { transition: none; }
  .mk-event:hover { transform: none; }
}

/* =====================================================================
   The Market home page (2026-09-29; docs/market/home-cms.md)

   Only /market/ carries body.mk-home: a white (--paper) page, with the warm
   canvas kept for the promise strip, the "Featured shop" and the sell
   band's card. Every selector below is home-only by its prefix (.mk-home-*,
   .mk-announce*, .mk-slider*, .mk-slide*, .mk-promo*, .mk-editorial*,
   .mk-circle*, .mk-aislestrip, .mk-carousel*, .mk-tone-*, .mk-featured-*) or nested under
   .mk-home, so nothing here reaches another page. (.mk-rail is the browse
   filter sidebar; the home page's product rails are .mk-carousel.)

   Breakpoints: L >=1240 (content 1184) · M 1100-1239 · T 900-1099 ·
   Tn 721-899 · P <=720 (designed at 360). The "Shop by aisle" menu sits
   beside the slider from 1100px; below that the aisle strip sits under it.
   ===================================================================== */

/* ---------- Tones and washes ----------
   CMS colours are preset NAMES (peach | butter | sky | mist | sand | night),
   mapped once here to color-mix() of the landing variables; every text pair
   was contrast-checked (peach 7.9, butter 7.6, sky 10.1, mist 13.2, sand
   12.9, night 15.9). Defined on .market-shell so the console's preview
   document resolves them too. Text over a photo sits on navy of 78% or more
   (white text there is 8.8:1 over a white photo); there is no light wash. */
.market-shell {
  --tone-peach: color-mix(in srgb, var(--orange-bright) 16%, var(--paper));
  --tone-peach-ink: color-mix(in srgb, var(--orange-deep) 62%, var(--navy));
  --tone-butter: color-mix(in srgb, var(--gold-light) 30%, var(--paper));
  --tone-butter-ink: color-mix(in srgb, var(--gold) 34%, var(--navy));
  --tone-sky: color-mix(in srgb, var(--blue-soft) 30%, var(--paper));
  --tone-sky-ink: var(--navy-3);
  --tone-mist: color-mix(in srgb, var(--border-blue) 85%, var(--paper));
  --tone-mist-ink: var(--ink);
  --tone-sand: color-mix(in srgb, var(--border) 75%, var(--paper));
  --tone-sand-ink: var(--ink);
  --tone-night: var(--navy-2);
  --tone-night-ink: var(--paper);
  /* A desktop slide's copy column ends at about 44% of the slide (§1.3),
     inside the 78% stop. */
  --scrim-lead: linear-gradient(90deg, color-mix(in srgb, var(--navy) 86%, transparent) 0%,
    color-mix(in srgb, var(--navy) 78%, transparent) 45%, transparent 68%);
  /* A wash sized to the words: the element's own background, fading in over its top padding. */
  --scrim-fade: 56px;
  --scrim-under: linear-gradient(0deg, color-mix(in srgb, var(--navy) 88%, transparent) 0%,
    color-mix(in srgb, var(--navy) 78%, transparent) calc(100% - var(--scrim-fade)), transparent 100%);
  --on-photo-sub: color-mix(in srgb, var(--paper) 90%, transparent);
}
.market-shell .mk-tone-peach  { --tone: var(--tone-peach);  --tone-ink: var(--tone-peach-ink);  --tone-sub: var(--body-c); }
.market-shell .mk-tone-butter { --tone: var(--tone-butter); --tone-ink: var(--tone-butter-ink); --tone-sub: var(--body-c); }
.market-shell .mk-tone-sky    { --tone: var(--tone-sky);    --tone-ink: var(--tone-sky-ink);    --tone-sub: var(--body-c); }
.market-shell .mk-tone-mist   { --tone: var(--tone-mist);   --tone-ink: var(--tone-mist-ink);   --tone-sub: var(--body-c); }
.market-shell .mk-tone-sand   { --tone: var(--tone-sand);   --tone-ink: var(--tone-sand-ink);   --tone-sub: var(--body-c); }
.market-shell .mk-tone-night  { --tone: var(--tone-night);  --tone-ink: var(--tone-night-ink);  --tone-sub: var(--dark-body); }
/* The console preview's empty menu column (hidden below 1100px, like the menu). */
.market-shell .mk-home-menu-slot { display: block; }

/* ---------- The page ---------- */
body.market-shell.mk-home { background: var(--paper); }
.mk-home .nav.mk-header { background: color-mix(in srgb, var(--paper) 86%, transparent); }
.mk-home .mk-section { padding: 56px 0; }
.mk-home main section[id],
.mk-home main section[aria-labelledby] { scroll-margin-top: calc(var(--header-h) + 16px); }
/* Below the fold: skip rendering until near the viewport, holding a close
   estimate (`auto` then remembers the real size). Never #aisles, which the
   footer's "Aisles" link and the menu's "More aisles" jump to. */
.mk-home .mk-cv { content-visibility: auto; contain-intrinsic-size: auto var(--cv-h, 560px); }
.mk-home .mk-home-rail { --cv-h: 520px; }
.mk-home .mk-home-editorials { --cv-h: 420px; }
.mk-home .mk-home-featured { --cv-h: 720px; }
.mk-home .mk-home-events { --cv-h: 480px; }
.mk-home .mk-home-sell { --cv-h: 320px; }
.mk-home #sell { background: var(--paper); }
.mk-home .mk-sell-band { background: var(--canvas); }

/* ---------- S8 "Featured shop": one shop as a wide card (2026-10-05) ----------
   The cover fills the left half; the chips, the identity, the about text,
   "Visit shop" and four of its products sit on the right. Two soft warm
   blobs sit behind the card on the canvas band. Nothing says where the shop
   is: the meta line is the product count only. */
.mk-home .mk-home-featured { position: relative; overflow: hidden; }
.mk-home .mk-home-featured::before,
.mk-home .mk-home-featured::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--orange-bright) 9%, var(--canvas)), transparent);
}
.mk-home .mk-home-featured::before { width: 620px; height: 620px; right: -220px; top: -160px; }
.mk-home .mk-home-featured::after { width: 520px; height: 520px; left: -240px; bottom: -220px; }
.mk-home .mk-home-featured > .container { position: relative; z-index: 1; }
.mk-featured-shop {
  display: grid; grid-template-columns: minmax(0, 48fr) minmax(0, 52fr); min-height: 560px;
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-2); overflow: hidden;
}
.mk-featured-cover { position: relative; display: block; overflow: hidden; }
.mk-featured-cover img {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover;
  transition: transform 400ms ease-out;
}
.mk-featured-fallback { position: absolute; inset: 0; }
.mk-featured-body { display: flex; flex-direction: column; gap: 22px; min-width: 0; padding: 32px 36px; }
.mk-featured-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.mk-featured-chips .mk-chip-featured { height: 30px; padding: 0 14px; font-size: 12px; }
.mk-featured-aisle {
  display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px;
  background: var(--tone-mist); color: var(--ink);
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.mk-featured-id { display: flex; align-items: center; gap: 22px; }
.mk-featured-logo {
  position: relative; flex: none; display: grid; place-items: center; width: 96px; height: 96px;
  border-radius: var(--r-md); overflow: hidden;
  font-family: var(--font-display); font-weight: 800; font-size: 44px; line-height: 1;
}
.mk-featured-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--paper); }
.market-shell .mk-featured-name {
  margin: 0; font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 36px; color: var(--ink);
}
.mk-featured-name a { color: inherit; text-decoration: none; }
.mk-featured-name a:hover { text-decoration: underline; text-underline-offset: 4px; }
/* The last word and the star never part: a name that wraps keeps its star
   beside its last word. */
.mk-featured-tail { white-space: nowrap; }
.mk-featured-name .mk-star { display: inline-block; width: 22px; height: 22px; margin-left: 8px; vertical-align: -2px; }
.mk-featured-meta { margin: 6px 0 0; font-size: 16px; line-height: 22px; color: var(--body-c); }
.mk-featured-blurb {
  max-width: 60ch; margin: 0; font-size: 17px; line-height: 28px; color: var(--body-c);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.market-shell .mk-featured-visit { align-self: flex-start; min-width: 220px; justify-content: center; gap: 10px; }
.mk-featured-products { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--border); }
.market-shell .mk-featured-products-title {
  margin: 0 0 14px; font-family: var(--font-display); font-size: 17px; font-weight: 700; line-height: 22px; color: var(--ink);
}
.mk-featured-shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.mk-featured-item { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; }
.mk-featured-thumb { position: relative; display: block; aspect-ratio: 1 / 1.05; border-radius: var(--r-sm); overflow: hidden; }
.mk-featured-thumb .mk-mono { font-size: 28px; }
.mk-featured-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease-out; }
.mk-featured-item-title { overflow: hidden; font-size: 13px; line-height: 18px; white-space: nowrap; text-overflow: ellipsis; }
.mk-featured-item-price { font-size: 15px; font-weight: 700; line-height: 20px; }
.mk-featured-item:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 3px; border-radius: var(--r-sm); box-shadow: var(--focus-halo); }
@media (hover: hover) and (pointer: fine) {
  .mk-featured-shop:hover .mk-featured-cover img { transform: scale(1.02); }
  .mk-featured-item:hover .mk-featured-thumb img { transform: scale(1.04); }
  .mk-featured-item:hover .mk-featured-item-title { text-decoration: underline; text-underline-offset: 3px; }
}
@media (max-width: 1099px) {
  .mk-featured-shop { grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); }
  .mk-featured-body { padding: 28px; }
}
@media (max-width: 899px) {
  .mk-featured-shop { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .mk-featured-cover { aspect-ratio: 16 / 9; }
}
@media (max-width: 720px) {
  .mk-featured-body { gap: 18px; padding: 20px; }
  .mk-featured-id { gap: 16px; }
  .mk-featured-logo { width: 72px; height: 72px; font-size: 32px; }
  .market-shell .mk-featured-name { font-size: 24px; line-height: 30px; }
  .mk-featured-blurb { font-size: 15px; line-height: 24px; }
  .market-shell .mk-featured-visit { align-self: stretch; }
  .mk-featured-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .mk-home .mk-home-featured::before { width: 360px; height: 360px; right: -180px; top: -120px; }
  .mk-home .mk-home-featured::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mk-featured-cover img, .mk-featured-thumb img { transition: none; transform: none !important; }
}

/* ---------- S0 The announcement bar ---------- */
.mk-announce {
  position: relative; display: flex; align-items: center; min-height: 40px;
  background: var(--tone); color: var(--tone-ink);
}
.mk-announce .container { width: 100%; padding-top: 10px; padding-bottom: 10px; text-align: center; }
.mk-announce-text { margin: 0; font: 500 13px/18px var(--font-body); color: inherit; }
.mk-announce-link {
  font-weight: 700; color: inherit; white-space: nowrap;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.mk-announce-link:hover { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; }
.mk-announce-link::after { content: ""; position: absolute; inset: 0; }
.mk-announce-link:focus-visible { outline: none; }
.mk-announce-link:focus-visible::after { outline: 2px solid var(--blue-bright); outline-offset: -3px; }

/* ---------- S1 The hero stage: the menu and the slider ---------- */
.mk-home-top { background: var(--paper); }
.mk-home-stage { padding-top: 20px; padding-bottom: 4px; }
.mk-home-stage-main { display: flex; flex-direction: column; min-width: 0; }
.mk-home-chips { margin-top: 14px; }

/* The "Shop by aisle" menu (from 1100px) */
.mk-home-menu {
  display: flex; flex-direction: column; align-self: stretch; min-width: 0; padding: 8px 0;
  background: var(--paper); border: 1px solid var(--border-blue); border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
}
.mk-home-menu-title {
  display: flex; align-items: center; height: 44px; margin: 0; padding: 0 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 20px; color: var(--ink);
}
.mk-home-menu-list { margin: 0; padding: 0; list-style: none; }
.mk-home-menu-list > li.is-divided { border-top: 1px solid var(--border); }
.mk-home-menu-link {
  display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 16px;
  font: 500 15px/20px var(--font-body); color: var(--ink); text-decoration: none;
  transition: background-color 150ms ease-out;
}
.mk-home-menu-link:hover { background: var(--tone-mist); color: var(--ink); text-decoration: none; }
.mk-home-menu-link:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: -2px; }
.mk-home-menu-icon { display: flex; flex: none; color: var(--body-c); }
.mk-home-menu-icon .mk-ic { width: 18px; height: 18px; }
.mk-home-menu-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-home-menu-go { color: var(--body-c); opacity: 0; transition: opacity 150ms ease-out; }
.mk-home-menu-link:hover .mk-home-menu-go,
.mk-home-menu-link:focus-visible .mk-home-menu-go { opacity: 1; }
.mk-home-menu-foot {
  display: flex; align-items: center; gap: 4px; height: 36px; margin: auto 0 0; padding: 0 16px;
  border-top: 1px solid var(--border); font-size: 13px; line-height: 18px; color: var(--body-c);
}
.mk-home-menu-foot a { color: var(--body-c); }
.mk-home-menu-foot a:hover { color: var(--ink); }

/* The slider: a scroll-snap track of slides, one picture and its words each */
.mk-slider {
  position: relative; isolation: isolate; display: grid; grid-template-rows: minmax(0, 1fr);
  min-width: 0; overflow: hidden; border-radius: var(--r-md); background: var(--tone-night);
}
.mk-slides {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%; min-height: 0;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.mk-slides::-webkit-scrollbar { display: none; }
.mk-slide {
  position: relative; display: grid; grid-template-areas: "s"; grid-template-columns: minmax(0, 1fr);
  min-width: 0; scroll-snap-align: start; scroll-snap-stop: always;
}
.mk-slide-media { grid-area: s; position: relative; overflow: hidden; background: var(--tone-night); }
.mk-slide-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 400ms ease-out;
}
.mk-slide-media::after { content: ""; position: absolute; inset: 0; background: var(--scrim-lead); }
.mk-slide.is-right .mk-slide-media::after { transform: scaleX(-1); }
/* The words: never positioned or transformed, so the slide stays the
   containing block the link's ::after stretches over. */
.mk-slide-copy {
  grid-area: s; z-index: 2; align-self: center; justify-self: start;
  width: min(38%, 420px); margin: 0 0 40px 56px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px; color: var(--paper);
}
.mk-slide.is-right .mk-slide-copy { justify-self: end; margin: 0 56px 40px 0; }
.mk-slide-eyebrow {
  margin: 0; font: 700 12px/16px var(--font-body); letter-spacing: 0.16em; text-transform: uppercase;
  color: inherit; opacity: 0.92;
}
.mk-slide-title {
  margin: 0; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(30px, 1.5vw + 18px, 44px); line-height: 1.05; letter-spacing: -0.02em;
  color: inherit; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.mk-slide-sub {
  margin: 0; font: 500 17px/26px var(--font-body); color: var(--on-photo-sub);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.mk-slide-cta { margin-top: 4px; }
.mk-slide-cta::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.market-shell .mk-slide-cta,
.market-shell .mk-slide-cta:hover,
.market-shell .mk-slide-cta:active { transform: none; }
.mk-slide-cta:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

/* The controls: the dots pill (with the pause control) and the arrows */
.mk-slider-controls {
  position: absolute; z-index: 4; left: 56px; right: 24px; bottom: 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  pointer-events: none;
}
.mk-slider-controls > * { pointer-events: auto; }
.mk-slider-dots {
  display: inline-flex; align-items: center; gap: 2px; padding: 4px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--navy) 55%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.mk-slider-dot,
.mk-slider-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  padding: 0; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
}
.mk-slider-dot { width: 24px; height: 24px; }
.mk-slider-dot > span {
  display: block; width: 8px; height: 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  transition: width 200ms ease-out, background-color 200ms ease-out;
}
.mk-slider-dot[aria-current="true"] > span { width: 22px; background: var(--paper); }
.mk-slider-toggle { width: 28px; height: 28px; color: var(--paper); }
.mk-slider-toggle > span { display: flex; }
.mk-slider-dot:focus-visible,
.mk-slider-toggle:focus-visible { outline: 2px solid var(--paper); outline-offset: 1px; }
.mk-slider-arrows { display: inline-flex; gap: 8px; }
.mk-slider-arrow {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  padding: 0; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink);
  box-shadow: var(--shadow-1); cursor: pointer;
}
.mk-slider-arrow:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; }

/* ---------- S1b The aisle strip (below 1100px) and S10 the aisle circles ---------- */
/* With slides and circles the home page carries its own aisle navigation at every width
   (the menu from 1100px, the strip below), so the shell's aisle bar, whose rule is shops
   per aisle rather than products in stock, is not drawn beside it. */
body.mk-home-menu-on .mk-aisles { display: none; }
.mk-home-aislestrip { padding: 16px 0 4px; }
.mk-aislestrip,
.mk-circles { margin: 0; padding: 0; list-style: none; }
.mk-aislestrip {
  display: grid; grid-auto-flow: column; grid-auto-columns: 76px; gap: 12px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter); scroll-padding-inline: var(--gutter);
}
.mk-aislestrip::-webkit-scrollbar { display: none; }
.mk-aislestrip > li { scroll-snap-align: start; }
.mk-circles { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px 24px; }
.mk-circles > li { width: 136px; }
.mk-circle {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  color: var(--ink); text-decoration: none;
}
.mk-circle:hover { color: var(--ink); text-decoration: none; }
.mk-circle:focus-visible { outline: none; }
.mk-circle-disc {
  display: grid; place-items: center; flex: none; width: 136px; height: 136px; overflow: hidden;
  border-radius: 50%; background: var(--tone); transition: box-shadow 200ms ease-out;
}
.mk-circle-icon { grid-area: 1 / 1; display: flex; color: var(--tone-ink); }
.mk-circle-icon .mk-ic { width: 40px; height: 40px; }
.mk-circle-disc img {
  grid-area: 1 / 1; width: 100%; height: 100%; max-width: none; object-fit: cover;
  transition: transform 400ms ease-out;
}
.mk-circle-disc.is-cutout img { object-fit: contain; padding: 12%; }
.mk-circle-label {
  margin-top: 12px; font: 600 15px/20px var(--font-body); color: var(--ink);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.mk-circle:focus-visible .mk-circle-disc { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--blue-bright); }
.mk-aislestrip .mk-circle-disc { width: 64px; height: 64px; }
.mk-aislestrip .mk-circle-icon .mk-ic { width: 28px; height: 28px; }
.mk-aislestrip .mk-circle-label { margin-top: 8px; font-size: 12px; line-height: 16px; }

/* ---------- S2 Promo tiles ---------- */
.mk-promos { margin: 0; padding: 0; list-style: none; }
.mk-promos > li { container-type: inline-size; min-width: 0; }
.mk-promo {
  position: relative; isolation: isolate; overflow: hidden; height: 380px;
  border-radius: var(--r-md); background: var(--tone);
}
.mk-promo.mk-tone-sand { box-shadow: inset 0 0 0 1px var(--border); }
/* Static (never positioned), so the link's ::after stretches over the whole tile. */
.mk-promo-copy { padding: 24px 24px 0; }
.mk-promo-title {
  margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 26px;
  letter-spacing: -0.01em; color: var(--tone-ink);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.mk-promo-link { color: inherit; text-decoration: none; }
.mk-promo-link:hover { color: inherit; text-decoration: none; }
.mk-promo-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-md); }
.mk-promo-link:focus-visible { outline: none; }
.mk-promo-link:focus-visible::after,
.mk-editorial-link:focus-visible::after {
  outline: 3px solid var(--blue-bright); outline-offset: -3px; box-shadow: inset 0 0 0 6px var(--paper);
}
.mk-promo-sub {
  margin: 6px 0 0; font: 500 14px/20px var(--font-body); color: var(--tone-sub);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.mk-promo-cta,
.mk-editorial-cta {
  display: inline-block; margin-top: 12px; font: 700 14px/20px var(--font-body);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.mk-promo-cta { color: var(--tone-ink); }
.mk-promo-cta .mk-ic,
.mk-editorial-cta .mk-ic { display: inline-block; vertical-align: -3px; }
.mk-promo-img { display: block; max-width: none; transition: transform 400ms ease-out; }
/* A photo: the tone panel with the words on top, the photo filling the rest. */
.mk-promo.is-photo { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.mk-promo.is-photo .mk-promo-copy { padding-bottom: 18px; }
.mk-promo.is-photo .mk-promo-img {
  width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: center;
}
/* A cut-out: the tone fills the tile and the picture floats bottom-right. */
.mk-promo.is-cutout .mk-promo-img {
  position: absolute; z-index: -1; right: -4%; bottom: 0; width: 86%; height: 60%;
  object-fit: contain; object-position: right bottom; transform-origin: right bottom;
  filter: drop-shadow(0 18px 22px color-mix(in srgb, var(--navy) 18%, transparent));
}
/* Two tiles: a row, the words on the left. */
@container (min-width: 440px) {
  .mk-promo.is-photo { grid-template-rows: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mk-promo.is-photo .mk-promo-copy { align-self: center; padding: 28px; }
  .mk-promo.is-cutout .mk-promo-copy { width: 54%; padding: 28px; }
  .mk-promo.is-cutout .mk-promo-img { right: 0; width: 44%; height: 88%; }
}

/* ---------- S3, S5, S7, S9 Product carousels ---------- */
.mk-carousel { position: relative; container-type: inline-size; --carousel-cols: 5; --carousel-gap: 20px; }
.mk-carousel-track {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--carousel-cols) - 1) * var(--carousel-gap)) / var(--carousel-cols));
  gap: var(--carousel-gap); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; list-style: none;
  /* A tile's focus ring (2px offset, 2px outline, 4px halo) never touches the scroller's clip edge. */
  padding: 8px; margin: -8px; scroll-padding-inline: 8px;
}
.mk-carousel-track::-webkit-scrollbar { display: none; }
.mk-carousel-item { scroll-snap-align: start; min-width: 0; }
.mk-carousel-arrow {
  position: absolute; z-index: 4; top: 38%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  padding: 0; border: 1px solid var(--border-blue); border-radius: 50%;
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1); cursor: pointer;
  transition: opacity 150ms ease-out;
}
@supports (top: 1cqw) {
  /* Centred on the 4:5 image well. */
  .mk-carousel-arrow { top: calc((100cqw - (var(--carousel-cols) - 1) * var(--carousel-gap)) / var(--carousel-cols) * 0.625); }
}
.mk-carousel-arrow.is-prev { left: -22px; }
.mk-carousel-arrow.is-next { right: -22px; }
.mk-carousel-arrow:hover { border-color: var(--ink); }
.mk-carousel-arrow:disabled { opacity: 0; pointer-events: none; }

/* ---------- S4 The promise strip (a canvas band) ---------- */
.mk-home .mk-promise {
  padding: 28px 0; background: var(--canvas);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.mk-home .mk-promise-icon {
  flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  border-radius: 50%; background: var(--tone-sky); color: var(--blue);
}
.mk-home .mk-promise-icon .mk-ic { width: 22px; height: 22px; }
.mk-home .mk-promise-title { font-size: 15px; line-height: 20px; font-weight: 700; }
.mk-home .mk-promise-line { font-size: 14px; line-height: 20px; }
.mk-home .mk-promise-link {
  display: inline-block; margin-top: 6px; font-size: 14px; line-height: 20px; font-weight: 700;
  color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.mk-home .mk-promise-link:hover { color: var(--blue); text-decoration-thickness: 2px; }

/* ---------- S6 Editorial banners ---------- */
.mk-editorials { margin: 0; padding: 0; list-style: none; }
.mk-editorials > li { min-width: 0; }
.mk-editorial {
  position: relative; isolation: isolate; display: grid; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--r-md); background: var(--tone-night); color: var(--paper);
}
.mk-editorial-img {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; max-width: none;
  object-fit: cover; transition: transform 400ms ease-out;
}
/* The words at the bottom on their own wash (a grid item, never positioned). */
.mk-editorial-copy {
  align-self: end; padding: var(--scrim-fade) 24px 22px;
  background: var(--scrim-under); color: var(--paper);
}
.mk-editorial-title {
  margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 26px;
  letter-spacing: -0.01em; color: inherit;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.mk-editorial-link { color: inherit; text-decoration: none; }
.mk-editorial-link:hover { color: inherit; text-decoration: none; }
.mk-editorial-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-md); }
.mk-editorial-link:focus-visible { outline: none; }
.mk-editorial-sub {
  margin: 6px 0 0; font: 500 14px/20px var(--font-body); color: var(--on-photo-sub);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.mk-editorial-cta { color: inherit; }

/* ---------- Hover: a fine pointer only ---------- */
@media (hover: hover) and (pointer: fine) {
  .mk-slide:hover .mk-slide-img { transform: scale(1.03); }
  .mk-promo:hover .mk-promo-img { transform: scale(1.04); }
  .mk-promo:hover .mk-promo-cta,
  .mk-editorial:hover .mk-editorial-cta { text-decoration-thickness: 2.5px; }
  .mk-editorial:hover .mk-editorial-img { transform: scale(1.03); }
  .mk-circle:hover .mk-circle-disc { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--blue-bright); }
  .mk-circle:hover .mk-circle-disc img { transform: scale(1.06); }
  .mk-circle:hover .mk-circle-label { text-decoration: underline; text-underline-offset: 3px; }
}
@media (hover: none) { .mk-carousel-arrow { display: none; } }

/* ---------- L and M (from 1100px): the menu beside the slider, the tile rows ---------- */
@media (min-width: 1100px) {
  .mk-home-aislestrip { display: none; }
  .mk-home-stage.has-menu { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 24px; }
  .mk-home-stage.has-menu .mk-slider { flex: 1 1 auto; min-height: 420px; }
  .mk-home-stage:not(.has-menu) .mk-slider { height: auto; min-height: 0; aspect-ratio: 2 / 1; max-height: 560px; }
  .mk-promos { display: grid; gap: 20px; }
  .mk-promos.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mk-promos.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mk-promos.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-promos.is-2 .mk-promo { height: 300px; }
  .mk-editorials { display: grid; gap: 20px; }
  .mk-editorials.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mk-editorials.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-editorials.is-2 .mk-editorial { aspect-ratio: 3 / 2; }
}
@media (min-width: 1240px) {
  .mk-home-stage.has-menu { grid-template-columns: 272px minmax(0, 1fr); }
  .mk-home-stage.has-menu .mk-slider { min-height: 448px; }
}
@media (min-width: 1100px) and (max-width: 1239px) {
  .mk-editorial-sub { -webkit-line-clamp: 1; }
}
/* M and T: the words' side margin is 40px. */
@media (max-width: 1239px) {
  .mk-slide-copy { margin: 0 0 40px 40px; }
  .mk-slide.is-right .mk-slide-copy { margin: 0 40px 40px 0; }
  .mk-slider-controls { left: 40px; }
  .mk-slide-sub { font-size: 15px; line-height: 22px; }
}

/* ---------- Below 1100px: no menu; the aisle strip; strips that swipe ---------- */
@media (max-width: 1099px) {
  .mk-home-menu { display: none; }
  .market-shell .mk-home-menu-slot { display: none; }
  .mk-carousel { --carousel-cols: 4; }
  .mk-circles > li { width: 112px; }
  .mk-circle-disc { width: 112px; height: 112px; }
  .mk-promos,
  .mk-editorials {
    display: grid; grid-auto-flow: column; gap: 16px;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; scroll-padding-inline: var(--gutter);
  }
  .mk-promos::-webkit-scrollbar,
  .mk-editorials::-webkit-scrollbar { display: none; }
  .mk-promos > li,
  .mk-editorials > li { scroll-snap-align: start; }
  .mk-promos { grid-auto-columns: 300px; }
  .mk-promo { height: 360px; }
  .mk-editorials { grid-auto-columns: 70%; }
  .mk-editorial-title { font-size: 26px; line-height: 30px; }
}
@media (max-width: 1020px) { .mk-carousel { --carousel-cols: 3; } }
/* T: a 16:9 slider. */
@media (min-width: 900px) and (max-width: 1099px) {
  .mk-slider { aspect-ratio: 16 / 9; min-height: 400px; max-height: 520px; }
}
/* Tn (and P without a phone crop): the panel layout, the picture at 2:1 with
   its words in a navy panel under it; the controls sit below the slide. */
@media (max-width: 899px) {
  .mk-slider { overflow: visible; border-radius: 0; background: transparent; grid-template-rows: auto; }
  .mk-slides { align-items: stretch; border-radius: var(--r-md); }
  .mk-slide { grid-template-areas: "m" "c"; grid-template-rows: auto 1fr; }
  .mk-slide-media { grid-area: m; aspect-ratio: 2 / 1; }
  .mk-slide-media::after { display: none; }
  .mk-slide-copy,
  .mk-slide.is-right .mk-slide-copy {
    grid-area: c; align-self: stretch; justify-self: stretch; width: auto; margin: 0;
    padding: 18px 20px 20px; gap: 10px; background: var(--tone-night); color: var(--paper);
  }
  .mk-slide-title { font-size: 28px; line-height: 32px; }
  .mk-slider-controls { position: static; margin-top: 12px; justify-content: flex-start; }
  .mk-slider-dots { gap: 0; padding: 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .mk-slider-dot { width: 44px; height: 44px; }
  .mk-slider-dot > span { background: color-mix(in srgb, var(--ink) 60%, transparent); }
  .mk-slider-dot[aria-current="true"] > span { background: var(--ink); }
  .mk-slider-toggle { width: 44px; height: 44px; color: var(--ink); }
  .mk-slider-dot:focus-visible,
  .mk-slider-toggle:focus-visible { outline-color: var(--blue-bright); outline-offset: -4px; }
  .mk-slider-arrows { display: none; }
}

/* ---------- P (designed at 360) ---------- */
@media (max-width: 720px) {
  .mk-home .mk-section { padding: 36px 0; }
  .mk-home .mk-home-rail { --cv-h: 440px; }
  .mk-home .mk-home-featured { --cv-h: 1180px; }
  .mk-home .mk-home-events { --cv-h: 420px; }
  .mk-home .mk-home-sell { --cv-h: 420px; }
  .mk-home-stage { padding-top: 12px; }
  .mk-home-chips .mk-popular-chips { margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
  .mk-announce-text { font-size: 13px; line-height: 18px; }

  /* The panel slide's type, and the phone crop: a 4:5 picture with its words
     over its foot on their own wash, every letter on navy of 78% or more. */
  .mk-slide-title { font-size: 24px; line-height: 28px; }
  .mk-slide-sub { font-size: 14px; line-height: 20px; }
  .mk-slide-eyebrow { font-size: 11px; line-height: 14px; }
  .mk-slide.has-phone { grid-template-areas: "s"; grid-template-rows: auto; }
  .mk-slide.has-phone .mk-slide-media { grid-area: s; aspect-ratio: 4 / 5; }
  .mk-slide.has-phone .mk-slide-copy,
  .mk-slide.has-phone.is-right .mk-slide-copy {
    grid-area: s; align-self: end; justify-self: stretch; width: auto; margin: 0;
    padding: var(--scrim-fade) 20px 20px; gap: 10px; background: var(--scrim-under);
  }
  .mk-slide.has-phone .mk-slide-title { font-size: 28px; line-height: 32px; }
  .market-shell .mk-slide-cta { min-height: 44px; padding: 11px 20px; font-size: 0.92rem; }

  /* Circles: a strip that bleeds to the edges. */
  .mk-circles {
    display: grid; grid-auto-flow: column; grid-auto-columns: 92px; gap: 12px; justify-content: start;
    overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter); scroll-padding-inline: var(--gutter);
  }
  .mk-circles::-webkit-scrollbar { display: none; }
  .mk-circles > li { width: auto; scroll-snap-align: start; }
  .mk-circles .mk-circle-disc { width: 84px; height: 84px; }
  .mk-circles .mk-circle-icon .mk-ic { width: 32px; height: 32px; }
  .mk-circles .mk-circle-label { font-size: 13px; line-height: 18px; }

  .mk-promos { grid-auto-columns: 76%; gap: 12px; }
  .mk-promo { height: 320px; }
  .mk-promo-title { font-size: 20px; line-height: 24px; }
  .mk-promo-sub { font-size: 13px; line-height: 18px; }

  .mk-editorials { grid-auto-columns: 86%; gap: 12px; }
  .mk-editorial,
  .mk-editorials.is-2 .mk-editorial { aspect-ratio: 4 / 5; }
  .mk-editorial-copy { padding: var(--scrim-fade) 20px 20px; }
  .mk-editorial-title { font-size: 22px; line-height: 26px; }
  .mk-editorial-sub { display: none; }

  .mk-carousel { --carousel-cols: 2.25; --carousel-gap: 12px; }
  .mk-carousel-track { margin: 0 calc(var(--gutter) * -1); padding: 8px var(--gutter); scroll-padding-inline: var(--gutter); }
  .mk-carousel-arrow { display: none; }

  /* The promise strip: one card, inset from the screen's edges, its three
     items stacked, each 40px disc beside its words. */
  .mk-home .mk-promise { padding: 16px 0; border: 0; }
  .mk-home .mk-promise-grid { width: auto; margin: 0 var(--gutter); }
  .mk-home .mk-promise-icon { width: 40px; height: 40px; }
}

/* ---------- Reduced motion: no zoom, ring or dot transition; never smooth scrolling ---------- */
@media (prefers-reduced-motion: reduce) {
  .mk-slide-img,
  .mk-promo-img,
  .mk-editorial-img,
  .mk-circle-disc,
  .mk-circle-disc img,
  .mk-slider-dot > span,
  .mk-home-menu-link,
  .mk-home-menu-go,
  .mk-carousel-arrow { transition: none; }
  .mk-slide:hover .mk-slide-img,
  .mk-promo:hover .mk-promo-img,
  .mk-editorial:hover .mk-editorial-img,
  .mk-circle:hover .mk-circle-disc img { transform: none; }
}

/* The region-then-town picker (delivery-pricing-v2.md §12; _town_picker.html). */
.mk-dest { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.mk-dest-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 160px; min-width: 0; }
.mk-dest-field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.mk-dest .mk-region-select { margin: 0; }
.mk-dest.is-inline { gap: 4px 10px; flex: 1; align-items: center; }
.mk-dest.is-inline .mk-dest-field { flex: 0 1 auto; flex-direction: row; align-items: center; gap: 4px; }
.mk-dest.is-inline .mk-dest-field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mk-dest.is-inline .mk-region-inline { max-width: 100%; }
.mk-dest-lead { font-weight: 600; color: var(--ink); flex: none; }
.mk-delivery .mk-dest { margin: 8px 0 12px; }
