/*
 * ReLoop stylesheet.
 *
 * Plain CSS served as a static file: no build step, so a deployment to shared
 * hosting is a file copy and nothing has to run npm on the server.
 *
 * Mobile first. Every rule below starts from the phone and widens; the desktop
 * layout is the exception, not the default. That ordering is deliberate -- the
 * previous build treated the phone as a special case bolted on at the end, and
 * that is exactly how it ended up cropping 44% off every product photograph.
 */

:root {
  color-scheme: dark;

  --bg: #17191d;
  --panel: #202630;
  --panel-raised: #262d38;
  --navy: #243e65;
  --navy-hover: #2d4d7c;
  --orange: #f07836;
  --text: #f3f4f6;
  --muted: #b0bac9;
  --line: #343e4e;
  --line-soft: #2b3340;

  --radius: 14px;
  --radius-sm: 9px;
  --gutter: 18px;
  --tap: 44px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, -apple-system, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

/* The glow around a featured card deliberately spills past it, and at the
 * screen edge that spill made the page a few pixels wider than the phone.
 * On the root as well as the body, because iOS Safari ignores it on the body
 * alone and lets the page slide sideways. `clip` rather than `hidden` where
 * supported, so no scroll container is created and sticky elements work. */
html {
  overflow-x: hidden;
  overflow-x: clip;
}

h1, h2, h3, h4, .logo {
  font-family: Manrope, system-ui, -apple-system, Arial, sans-serif;
  letter-spacing: -0.5px;
}

h1, h2, h3, p { margin-top: 0; }

a { color: inherit; text-decoration: none; }

img {
  max-width: 100%;
  display: block;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--navy);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus { left: 12px; }

/* ---------------------------------------------------------------- layout */

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header { border-bottom: 1px solid var(--line); }

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1.6px;
  line-height: 1;
}
.logo span { color: var(--orange); }

.site-header nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}
.site-header nav a { min-height: var(--tap); display: inline-flex; align-items: center; }
.site-header nav a:hover { color: var(--orange); }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding-block: 28px 36px;
  color: var(--muted);
  font-size: 13px;
  display: grid;
  gap: 20px;
}
.site-footer .logo { font-size: 22px; color: var(--text); }
.site-footer p { margin: 8px 0 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }

/* --------------------------------------------------------------- buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  transition: background 0.15s, border-color 0.15s;
}
.button.primary {
  background: var(--navy);
  border-color: #3a567f;
  color: var(--text);
}
.button.primary:hover { background: var(--navy-hover); }
.button.secondary:hover { background: var(--panel-raised); }
.button.unavailable { color: var(--muted); background: var(--panel-raised); }
.button.full { width: 100%; }

/* ----------------------------------------------------------- the product
 * card
 *
 * The phone layout is a horizontal row: a square image tile beside the text.
 * Two rules matter and they are the whole reason the old build broke.
 *
 * 1. The tile is SQUARE (aspect-ratio: 1). A product photograph is roughly
 *    4:3, and a square tile shows all of it with a little breathing room. The
 *    old build made the tile a 100x300 sliver -- a 1:3 window -- which no
 *    fitting mode can fill with a 4:3 photo without destroying it.
 *
 * 2. The image is `object-fit: contain` at exactly 100% width, with no scale
 *    factor and no offset. The old build set `width: 180%; left: -40%` inside
 *    an overflow-hidden box, which clipped 40px from each side and showed 55%
 *    of the photo. Nothing here may reintroduce a width above 100% or a
 *    negative offset.
 */

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.product-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s;
}
.product-card:hover { border-color: #5a6a82; }

.product-image {
  position: relative;
  aspect-ratio: 1;
  background: radial-gradient(ellipse at 50% 60%, #364357, #202936 75%);
  overflow: hidden;
}
.product-image > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.image-link { display: block; position: relative; }

.featured-tag {
  position: absolute;
  top: 8px; left: 8px;
  background: rgba(17, 27, 42, 0.78);
  border: 1px solid #50627a;
  border-radius: 4px;
  font-size: 9px;
  letter-spacing: 1px;
  padding: 3px 7px;
}

.product-card-content { padding: 14px 14px 12px; min-width: 0; }

.card-condition {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.product-name {
  display: block;
  font-family: Manrope, system-ui, Arial, sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}

.product-specs {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 6px 0 0;
}

.price {
  color: var(--orange);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin: 10px 0 12px;
}

.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card-actions > .button { flex: 1 1 auto; min-width: 0; padding-inline: 10px; }

/* ------------------------------------------------------------- utilities */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 5px;
  background: #26344a;
  color: #bbcce4;
  font-size: 11px;
  white-space: nowrap;
}
.badge.available { background: #243d36; color: #b2dbcb; }
.badge.reserved  { background: #453829; color: #e9c19c; }
.badge.sold,
.badge.draft,
.badge.hidden    { background: #30343d; color: #bdc4cf; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.empty-state {
  padding: 48px 20px;
  text-align: center;
  background: var(--panel);
  border-radius: var(--radius);
  color: var(--muted);
}
.empty-state h2, .empty-state h3 { color: var(--text); }

.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
}

.notice {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 18px;
}
.notice.info  { background: #1d2b3d; border: 1px solid #344966; color: #bac9de; }
.notice.good  { background: #243d36; border: 1px solid #3a6152; color: #b7ddcc; }
.notice.error { background: #412c26; border: 1px solid #7d4d3c; color: #ffc6aa; }

/* ----------------------------------------------------------------- forms */

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}

/* A visible label, never a placeholder standing in for one. */
.field input,
.field select,
.field textarea {
  width: 100%;
  background: #181f2b;
  border: 1px solid #3d495c;
  border-radius: var(--radius-sm);
  padding: 12px;
  min-height: var(--tap);
  /* 16px stops iOS Safari zooming the page when a field is focused. */
  font-size: 16px;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: #8098bb; }

.field .hint { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.field .error { display: block; margin-top: 6px; font-size: 12px; color: #ffc6aa; }

.auth-card {
  max-width: 420px;
  margin: 40px auto;
}
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card > p { color: var(--muted); font-size: 14px; }
.auth-alt { margin-top: 18px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-alt a { color: var(--orange); }

/* ------------------------------------------------------------ staff area */

.admin-shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }

.admin-sidebar {
  background: #131923;
  border-bottom: 1px solid var(--line);
  padding: 16px var(--gutter);
}
.admin-sidebar nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.admin-sidebar nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--muted);
}
.admin-sidebar nav a.active { background: #253b5d; color: var(--text); }

.admin-main { padding: 22px var(--gutter) 40px; min-width: 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.stat .value { font-size: 28px; font-weight: 600; font-family: Manrope, Arial, sans-serif; }
.stat .label { font-size: 12px; color: var(--muted); }

/* ----------------------------------------------------------- wider views */

@media (min-width: 620px) {
  :root { --gutter: 28px; }

  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

  /* Above the phone breakpoint the card becomes a vertical tile: the image on
     top, full width, still square and still `contain`. */
  .product-card { grid-template-columns: 1fr; }
  .product-image { aspect-ratio: 4 / 3; }
  .product-name { font-size: 19px; }
  .price { font-size: 24px; }

  .site-footer { grid-template-columns: 1fr auto; align-items: end; }
}

@media (min-width: 900px) {
  :root { --gutter: 32px; }

  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }

  .header-inner { min-height: 88px; }
  .logo { font-size: 34px; }
  .site-header nav { gap: 28px; }

  .admin-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .admin-sidebar {
    border-bottom: 0;
    border-right: 1px solid var(--line);
    padding: 26px 18px;
  }
  .admin-sidebar nav { flex-direction: column; gap: 6px; }
  .admin-main { padding: 32px 36px 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* =====================================================================
 * Phase L1 — storefront, product detail and Sell Your Pre-Loved Tech.
 * Mobile first throughout; the wider layouts are at the end of the file.
 * ===================================================================== */

/* ------------------------------------------------------------- hero */

.hero { padding: 28px 0 24px; }

.hero h1 {
  font-size: clamp(32px, 9vw, 44px);
  line-height: 1.12;
  letter-spacing: -1.6px;
  margin: 14px 0;
  font-weight: 600;
}
.hero h1 span { color: #abb8cc; }

.hero-lede {
  color: var(--muted);
  max-width: 44ch;
  font-size: 15px;
  line-height: 1.7;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  border-bottom: 1px solid #6d7788;
  font-size: 14px;
}
.hero-link:hover { color: var(--orange); }

.hero-feature {
  display: block;
  margin-top: 26px;
  background: radial-gradient(ellipse at 50% 30%, #314562, #142239 70%);
  border: 1px solid #3e506a;
  border-radius: 18px;
  padding: 16px 18px 14px;
}
.feature-top {
  display: block;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ccd4df;
}
.hero-feature > img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  margin: 6px 0;
}
.feature-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.feature-name { font-family: Manrope, Arial, sans-serif; font-size: 17px; font-weight: 600; }
.feature-bottom .price { margin: 0; font-size: 19px; white-space: nowrap; }
.hero-feature > small { display: block; margin-top: 8px; font-size: 11px; color: #a3b3c9; }

.trust-strip {
  list-style: none;
  display: grid;
  gap: 8px;
  padding: 16px 0;
  margin: 0;
  border-block: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

/* -------------------------------------------- sell strip + coming soon */

.sell-strip {
  display: grid;
  gap: 16px;
  margin: 28px 0;
  padding: 24px 20px;
  background: linear-gradient(150deg, #22304a, #1b2230 70%);
  border: 1px solid #39496279;
  border-radius: var(--radius);
}
.sell-copy h2 {
  font-size: clamp(22px, 6.5vw, 28px);
  line-height: 1.2;
  margin: 10px 0;
}
.sell-copy h2 span { color: var(--orange); }
.sell-copy p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.sell-button { min-width: 150px; }

.coming-soon {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px dashed #4d5f7a;
  border-radius: var(--radius-sm);
  background: #161d28a8;
}
.coming-soon p { margin: 0; font-size: 13px; color: var(--muted); }
.coming-soon.standalone { margin-top: 24px; }

.soon-tag {
  font-size: 9px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--orange);
  border: 1px solid #6b4a33;
  border-radius: 4px;
  padding: 3px 8px;
  white-space: nowrap;
}

/* ------------------------------------------------- collection + filters */

.collection { padding-top: 10px; }

.collection-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}
.collection-heading h2 { font-size: 22px; margin: 8px 0 0; }
.result-count { font-size: 12px; color: var(--muted); white-space: nowrap; margin: 0; }

.filter-form { margin-bottom: 22px; }

.search-row { display: flex; flex-wrap: wrap; gap: 8px; }

.search-box {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  background: #1d222b;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  min-width: 0;
}
.search-box input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  padding: 13px 0;
  min-height: var(--tap);
  font-size: 16px;
}
.search-box:focus-within { border-color: #8098bb; }

.sort-label select {
  min-height: var(--tap);
  background: #1d222b;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
}

.filter-panel { margin-top: 10px; }
.filter-panel summary {
  min-height: var(--tap);
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.filter-fields {
  display: grid;
  gap: 14px;
  padding: 16px;
  margin-top: 6px;
  background: #1d2532;
  border-radius: var(--radius-sm);
}
.filter-fields label { display: block; font-size: 13px; font-weight: 500; }
.filter-fields select,
.filter-fields input {
  width: 100%;
  margin-top: 6px;
  background: #181f2b;
  border: 1px solid #3d495c;
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  min-height: var(--tap);
  font-size: 16px;
}

.categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 0;
}
.categories a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
}
.categories a.active { background: #243650; border-color: #465d7c; color: var(--text); }

/* A sold or reserved card is dimmed and labelled rather than hidden. */
.card-veil {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(23, 25, 29, 0.55);
}

/* ------------------------------------------------------ product detail */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 12px;
}
.breadcrumb a:hover { color: var(--orange); }

.product-detail { display: grid; gap: 26px; }

/*
 * The main photograph.
 *
 * 4:3 with `object-fit: contain`. A buyer of a used item is judging scratches
 * and wear, so the detail view never crops: the whole item is always in frame.
 */
.detail-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background: radial-gradient(ellipse at 50% 60%, #364357, #202936 75%);
  border-radius: var(--radius);
  overflow: hidden;
}
.detail-frame > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.sold-stamp {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(23, 25, 29, 0.85);
  border: 1px solid #5b6474;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/*
 * Previous / next over the photograph.
 *
 * Revealed by js/gallery.js, so they stay out of the way when the arrows
 * would do nothing. 44px is the smallest comfortable target on a phone.
 */
.frame-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #5b6474;
  border-radius: 50%;
  background: rgba(23, 25, 29, 0.68);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.frame-nav[hidden] { display: none; }
.frame-nav.prev { left: 10px; }
.frame-nav.next { right: 10px; }
.frame-nav:hover { background: rgba(23, 25, 29, 0.9); border-color: var(--orange); }
.frame-nav:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.frame-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  margin: 0;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(23, 25, 29, 0.68);
  font-size: 12px;
  color: var(--muted);
}
.frame-count[hidden] { display: none; }

@media (hover: none) {
  /* No hover on a touch screen, so keep them legible without it. */
  .frame-nav { background: rgba(23, 25, 29, 0.78); }
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.gallery-thumbs .thumb {
  display: block;
  width: 72px;
  height: 60px;
  flex: 0 0 auto;
  background: #243044;
  border: 1px solid #5e769a;
  border-radius: 7px;
  overflow: hidden;
}
/* Thumbnails may crop: they are navigation, and the full photo is one tap away. */
.gallery-thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs .thumb.selected { outline: 2px solid var(--orange); outline-offset: 1px; }

.detail-copy h1 {
  font-size: clamp(26px, 7vw, 34px);
  line-height: 1.18;
  margin: 12px 0 10px;
}
.detail-lede { color: var(--muted); font-size: 14px; }
.detail-price { font-size: 30px; margin: 16px 0; }

.detail-facts {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 16px;
  border-block: 1px solid var(--line);
  padding: 16px 0;
  margin: 0 0 20px;
  font-size: 14px;
}
.detail-facts dt { color: var(--muted); }
.detail-facts dd { margin: 0; text-align: right; }

.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.detail-actions .button { flex: 1 1 auto; min-height: 50px; }

.detail-subhead { font-size: 16px; margin: 24px 0 8px; }
.detail-prose { color: var(--muted); font-size: 14px; line-height: 1.7; }
.detail-prose p { margin: 0 0 10px; }

.detail-footnote { margin-top: 20px; font-size: 12px; color: var(--muted); }

.related { margin-top: 44px; }
.related h2 { font-size: 20px; margin-bottom: 16px; }

.back-link { margin: 28px 0 0; font-size: 14px; }
.back-link a:hover { color: var(--orange); }

/* ------------------------------------------------------------ sell page */

.sell-page { max-width: 560px; margin: 26px auto 0; }
.sell-page h1 { font-size: clamp(26px, 7.5vw, 34px); line-height: 1.16; margin: 12px 0; }
.sell-page h1 span { color: var(--orange); }
.sell-lede { color: var(--muted); font-size: 15px; line-height: 1.7; margin-bottom: 22px; }

.sell-form { margin-top: 18px; }
.optional { color: var(--muted); font-weight: 400; }
.sell-privacy { margin: 16px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ------------------------------------------------------- how it works */

.how-it-works {
  display: grid;
  gap: 24px;
  margin: 48px 0 8px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.how-it-works h2 { font-size: 22px; margin: 8px 0 0; line-height: 1.2; }
.how-it-works ol { list-style: none; display: grid; gap: 16px; padding: 0; margin: 0; }
.how-it-works li { display: flex; gap: 14px; }
.how-it-works li > span { color: var(--orange); font-size: 12px; margin-top: 3px; }
.how-it-works h3 { font-size: 15px; margin-bottom: 5px; }
.how-it-works p { font-size: 13px; color: var(--muted); margin: 0; }

/* ------------------------------------------------- L1 at wider widths */

@media (min-width: 620px) {
  .hero-feature > img { height: 210px; }

  .trust-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    font-size: 12px;
  }

  .sell-strip { grid-template-columns: 1fr auto; align-items: center; padding: 28px; }
  .coming-soon { max-width: 240px; }

  .search-box { flex: 1 1 auto; }

  .filter-fields { grid-template-columns: 1fr 1fr auto; align-items: end; }

  .how-it-works ol { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .how-it-works li { flex-direction: column; gap: 6px; }
}

@media (min-width: 900px) {
  .hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    padding: 48px 0 36px;
  }
  .hero-feature { margin-top: 0; padding: 20px 24px 16px; }
  .hero-feature > img { height: 230px; }

  .product-detail { grid-template-columns: 1.15fr 1fr; gap: 44px; align-items: start; }
  .detail-actions .button { flex: 0 1 auto; min-width: 160px; }

  .how-it-works { grid-template-columns: 1fr 1.6fr; gap: 44px; }
}

/* =====================================================================
 * Phase L2 — the CMS.
 * ===================================================================== */

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}
.section-title h1 { font-size: 24px; margin: 4px 0 0; }
.section-title p { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

.sidebar-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.sidebar-foot p { margin: 0 0 8px; }
.sidebar-foot small { color: var(--muted); font-size: 11px; }

.status-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.status-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 13px;
  color: var(--muted);
}
.status-tabs a.active { background: #243650; border-color: #465d7c; color: var(--text); }
.status-tabs small { font-size: 11px; opacity: 0.75; }

.admin-search { display: flex; gap: 8px; margin-bottom: 20px; }
.admin-search input {
  flex: 1;
  min-width: 0;
  min-height: var(--tap);
  background: #181f2b;
  border: 1px solid #3d495c;
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 16px;
}

/* ------------------------------------------------------- listing rows */

.listing-rows { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }

.listing-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 12px;
}

/* Same rule as the shop: a square tile, contain, nothing cropped. */
.listing-thumb {
  aspect-ratio: 1;
  background: #29364a;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.listing-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }

.listing-ref { font-size: 11px; color: var(--muted); margin: 0 0 3px; letter-spacing: 0.4px; }
.listing-name { display: block; font-family: Manrope, Arial, sans-serif; font-size: 16px; font-weight: 600; }
.listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.listing-side { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.listing-price { color: var(--orange); font-size: 17px; font-weight: 600; margin: 0; }
.listing-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.listing-actions .button { font-size: 13px; padding: 9px 14px; min-height: 40px; }
/* Why a listing has no Delete button, for the people who may delete. */
.listing-actions .hint { align-self: center; font-size: 12px; color: var(--muted); }

.pagination { margin-top: 20px; font-size: 13px; }

/* ------------------------------------------------------------- forms */

.field-row { display: grid; gap: 0 16px; }
.field-row > .field { min-width: 0; }

.checkboxes { display: grid; gap: 4px; align-content: end; padding-bottom: 14px; }

.check-label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: var(--tap);
  font-size: 14px;
  font-weight: 400;
}
.check-label input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--orange); }

.inline-form { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }

.save-bar {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin: 20px 0;
  position: sticky;
  bottom: 0;
  padding: 12px 0;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.save-bar .button { flex: 1 1 auto; }

.panel h2 { font-size: 17px; margin: 0 0 6px; }
.panel > p { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

.private-panel { border-color: #4b5a72; }

.content-note { font-size: 13px; color: var(--muted); }
.text-button {
  border: 0;
  background: transparent;
  padding: 8px 0;
  min-height: 40px;
  font-size: 13px;
  color: var(--muted);
}
.text-button:hover { color: var(--orange); }
.text-button.danger { color: #ffbfa8; }
/* Phones have no hover. A destructive action that only showed its colour
   under the pointer looked like plain text there, and sellers reported that
   they could not find how to delete a post. */
.text-button.danger:hover { color: #ffd9cc; }
.optional { color: var(--muted); font-weight: 400; }

/* ------------------------------------------------------ rich text editor */

.editor { border: 1px solid #3d495c; border-radius: var(--radius-sm); overflow: hidden; }

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 7px;
  background: #1a212c;
  border-bottom: 1px solid #3d495c;
}
.editor-toolbar button {
  min-width: 40px;
  min-height: 40px;
  padding: 6px 11px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
}
.editor-toolbar button:hover { background: #26303e; color: var(--text); }

.editor-surface {
  min-height: 190px;
  padding: 14px;
  background: #181f2b;
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: break-word;
}
.editor-surface:focus { outline: none; box-shadow: inset 0 0 0 1px #8098bb; }
.editor-surface p { margin: 0 0 10px; }
.editor-surface h3 { font-size: 16px; margin: 14px 0 6px; }
.editor-surface ul, .editor-surface ol { margin: 0 0 10px; padding-left: 22px; }
.editor-surface img { max-width: 100%; height: auto; border-radius: 6px; margin: 8px 0; }
.editor-surface a { color: var(--orange); text-decoration: underline; }

.editor-status {
  margin: 0;
  padding: 7px 12px;
  background: #1a212c;
  border-top: 1px solid #3d495c;
  font-size: 12px;
  color: var(--muted);
  min-height: 30px;
}

/* --------------------------------------------------------------- photos */

.photo-grid {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.photo-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #192333;
}
.photo-tile img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 5px; }
.photo-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.upload-form { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.upload-form input[type="file"] { padding: 10px; font-size: 14px; }

/* ----------------------------------------------------------- categories */

.category-rows { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.category-row { padding: 14px; }
.category-meta {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.category-meta code { background: #1a212c; padding: 2px 6px; border-radius: 4px; font-size: 11px; }
.category-delete form { display: inline; }

/* ---------------------------------------------------------------- video */

.video-embed { margin: 12px 0 18px; }
.video-facade {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #101720;
  cursor: pointer;
}
.video-facade img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  background: rgba(16, 23, 32, 0.25);
}
.video-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius);
}

@media (min-width: 620px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .listing-row { grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; }
  .listing-side { grid-column: auto; flex-direction: column; align-items: flex-end; }
  .save-bar .button { flex: 0 0 auto; }
}

/* --------------------------------------------------------------- staff */

.staff-rows { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }

.staff-row { display: grid; gap: 14px; padding: 16px; }
.staff-row.is-off { opacity: 0.6; }

.staff-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: Manrope, Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.staff-email { margin: 4px 0 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.staff-seen { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

.staff-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.staff-controls select { min-height: var(--tap); }
.staff-role-fixed { margin: 0; font-size: 14px; font-weight: 500; }

@media (min-width: 700px) {
  .staff-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .staff-controls { justify-content: flex-end; }
}

/* =====================================================================
 * Phase L3 — checkout, orders and payment verification.
 * ===================================================================== */

.checkout, .order-page { max-width: 780px; margin: 0 auto; padding-top: 10px; }
.checkout h1, .order-page h1 { font-size: clamp(24px, 6.5vw, 30px); margin: 10px 0; }
.checkout-lede, .order-lede { color: var(--muted); font-size: 15px; line-height: 1.7; margin-bottom: 22px; }

.checkout-grid { display: grid; gap: 16px; }

.order-summary { align-self: start; }

.summary-item { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; align-items: center; }
.summary-thumb {
  aspect-ratio: 1;
  background: #29364a;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.summary-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.summary-name { font-family: Manrope, Arial, sans-serif; font-size: 16px; font-weight: 600; margin: 3px 0; }

.summary-lines, .bank-lines, .record-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  margin: 18px 0 0;
  font-size: 14px;
}
.summary-lines dt, .bank-lines dt, .record-grid dt { color: var(--muted); }
.summary-lines dd, .bank-lines dd, .record-grid dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.summary-lines .total { border-top: 1px solid var(--line); padding-top: 12px; font-size: 17px; color: var(--orange); }

.bank-number { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.5px; }

.choice-row { display: grid; gap: 10px; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  background: #19212e;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 400;
}
.choice:has(input:checked) { border-color: #91a5c3; background: #243b5d; }
.choice input { width: 18px; height: 18px; min-height: 0; margin-top: 2px; accent-color: var(--orange); }
.choice strong { display: block; font-size: 15px; }
.choice small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }

.delivery-fields { margin-top: 16px; }
.delivery-fields[hidden] { display: none; }

.share-link {
  display: block;
  margin-top: 8px;
  padding: 9px 11px;
  background: #101720;
  border-radius: 6px;
  font-size: 12px;
  overflow-wrap: anywhere;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.serial-value {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 18px;
  letter-spacing: 1px;
  background: #101720;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin: 10px 0 0;
  overflow-wrap: anywhere;
}

.slip-history, .event-log { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.slip-history li, .event-log li {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}
.slip-history small, .event-log small { color: var(--muted); font-size: 12px; }
.event-time { color: var(--muted); min-width: 120px; }
.event-type { font-weight: 500; }

.needs-attention { color: var(--orange); font-weight: 500; }

.rule { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

.button.danger-outline { border-color: #7a5245; color: #ffbfa8; }
.button.danger-outline:hover { background: #3a2a24; }

.badge.awaiting_payment { background: #453829; color: #e9c19c; }
.badge.under_review     { background: #2b3a52; color: #b9cbe4; }
.badge.needs_correction { background: #4a3327; color: #f0bfa4; }
.badge.confirmed,
.badge.completed        { background: #243d36; color: #b2dbcb; }
.badge.cancelled,
.badge.expired          { background: #30343d; color: #bdc4cf; }

@media (min-width: 760px) {
  .checkout-grid { grid-template-columns: 300px minmax(0, 1fr); }
  .checkout-grid > .order-summary { order: 2; }
  .checkout-grid > .checkout-form { order: 1; }
  .choice-row { grid-template-columns: 1fr 1fr; }
}

/* =====================================================================
 * Phase L4 — reports, account and legal pages.
 * ===================================================================== */

.report-filters { margin-bottom: 18px; }
.report-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.stat-caveat { font-size: 11px; color: var(--muted); }

/* A wide table on a narrow phone scrolls sideways inside its own box rather
   than pushing the whole page out of shape. */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.report-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.report-table th, .report-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}
.report-table thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.report-table td small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.report-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.report-table tfoot th, .report-table tfoot td {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  font-weight: 600;
}
.not-calculated { color: var(--muted); font-size: 11px; font-style: italic; }

/* ---------------------------------------------------------- legal pages */

.legal-page { max-width: 720px; margin: 0 auto; padding-top: 10px; }
.legal-page h1 { font-size: clamp(26px, 7vw, 32px); margin: 12px 0 18px; }
.legal-page h2 {
  font-size: 17px;
  margin: 30px 0 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.legal-page h2:first-of-type { border-top: 0; padding-top: 0; }
.legal-page p, .legal-page li { color: var(--muted); font-size: 15px; line-height: 1.75; }
.legal-page ul { padding-left: 20px; }
.legal-page li { margin-bottom: 7px; }
.legal-meta { font-size: 13px !important; margin-bottom: 24px; }

/* Anything the business has not confirmed is visibly a gap, not prose. */
.placeholder {
  background: #26211a;
  border-left: 3px solid #a07340;
  padding: 11px 14px;
  border-radius: 0 6px 6px 0;
  font-size: 14px !important;
  color: #e0c9a8 !important;
}

/* ------------------------------------------------------------ contact */

.contact-page { max-width: 720px; margin: 0 auto; padding-top: 10px; }
.contact-page h1 { font-size: clamp(26px, 7vw, 32px); margin: 12px 0; }
.contact-lede { color: var(--muted); font-size: 15px; line-height: 1.7; margin-bottom: 22px; }

.contact-cards { display: grid; gap: 12px; margin-bottom: 22px; }

.contact-card {
  display: block;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s, background 0.15s;
}
.contact-card:hover { border-color: #5a6a82; background: var(--panel-raised); }
.contact-kind {
  display: block;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 6px;
}
.contact-card strong {
  display: block;
  font-family: Manrope, Arial, sans-serif;
  font-size: 19px;
  letter-spacing: -0.3px;
}
.contact-note { display: block; margin-top: 5px; font-size: 13px; color: var(--muted); }

.contact-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  margin: 14px 0 0;
  font-size: 14px;
}
.contact-details dt { color: var(--muted); }
.contact-details dd { margin: 0; text-align: right; }

@media (min-width: 620px) {
  .contact-cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

/* ---------------------------------------------------------------------------
   Marketplace and seller packages (phase L6)

   Everything here reuses the existing card, panel and badge shapes. The only
   genuinely new pieces are the package cards and the "private seller" mark --
   and that mark is not decoration. Two grids of cards on one site, one of them
   the shop's own stock and one of them strangers' items, is exactly the
   situation where a buyer needs telling which is which before they call anyone.
   --------------------------------------------------------------------------- */

.marketplace-intro { margin: 18px 0 26px; }
.marketplace-intro h1 { font-size: clamp(26px, 7vw, 36px); margin: 6px 0 12px; }
.marketplace-intro .hero-lede { max-width: 56ch; margin-bottom: 18px; }

.private-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #2b3a52;
  color: #b9cbe4;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.7px;
}

.packages {
  display: grid;
  gap: 14px;
  margin: 14px 0 18px;
}
.package-card { display: flex; flex-direction: column; gap: 6px; }
.package-card h3 {
  font-family: Manrope, Arial, sans-serif;
  font-size: 18px;
  margin: 0;
}
.package-card .price { font-size: 26px; margin: 2px 0; }
.package-allowance { font-size: 15px; color: var(--text); margin: 0 0 4px; }
.package-card .content-note { margin: 0; }
.package-card form { margin-top: auto; padding-top: 12px; }
.package-card .button { width: 100%; }

/* Marketplace listing lifecycle badges. Published reads as live, pending as waiting,
   rejected as needing the seller's attention. Expired already has a colour from
   the order states and is deliberately the same muted grey: in both places it
   means "this is over". */
.badge.published { background: #243d36; color: #b2dbcb; }
.badge.pending   { background: #453829; color: #e9c19c; }
.badge.rejected  { background: #412c26; color: #ffc6aa; }

@media (min-width: 720px) {
  .packages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* An informational panel that is deliberately not actionable yet — the photo
   block on an unsaved listing. Muted enough to read as "not yet", not so muted
   that the explanation inside it is hard to read. */
.panel-inert { opacity: 0.75; border-style: dashed; }

/* =====================================================================
 * The spotlight carousel.
 *
 * Cards do not scroll. Each one is absolutely positioned in the same place
 * and moved by transform according to which SLOT it currently occupies —
 * previous, active, next, or parked off to one side. Rotating the carousel is
 * therefore just a change of class, which buys three things:
 *
 *   - looping from the last item back to the first is not a special case, so
 *     there is no jump to hide;
 *   - only transform, opacity and filter ever animate, all of which the
 *     browser can handle on the compositor rather than by relaying out;
 *   - the whole thing works from markup alone if the script never runs.
 *
 * --spot-duration is written by the script from its own config, so the timing
 * lives in exactly one place.
 * ===================================================================== */

.spotlight {
  --spot-duration: 850ms;
  --spot-ease: cubic-bezier(0.22, 1, 0.36, 1);

  position: relative;
  margin-top: 26px;
  /* The extra room at the bottom is for the flame, which reaches past the
     stage and would otherwise sit on top of the dots. */
  padding: 16px 14px 20px;
  border: 1px solid #3e506a;
  border-radius: 18px;
  /* Dark, and darker than it used to be. A flame against mid-navy reads as
     orange paint; against near-black it reads as light. This is the single
     biggest thing that makes the frame look hot. */
  background: radial-gradient(ellipse at 50% 26%, #182742, #0a1120 74%);
}

.spotlight-label {
  margin: 0 0 6px;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ccd4df;
}

/*
 * Clipped, so a card sliding away can never widen the page -- but `clip`
 * rather than `hidden`, so the flame is allowed the extra 18px it needs to
 * lick past the edge. `hidden` would cut every tongue off along a dead
 * straight line, which is the one thing fire never does.
 *
 * A browser too old for overflow-clip-margin simply clips at the edge, which
 * is where it clipped before any of this existed.
 */
.spotlight-stage {
  position: relative;
  /* 40px taller than the card, so there is headroom above and below for the
     flame. The card below gives the same 40px back and is therefore exactly
     the size it always was. */
  height: 290px;
  overflow: clip;
  overflow-clip-margin: 18px;
  touch-action: pan-y;
}

.spotlight-card {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 78%;
  max-width: 420px;
  height: calc(100% - 40px);
  border-radius: 14px;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity, filter;
  transition:
    transform var(--spot-duration) var(--spot-ease),
    opacity   var(--spot-duration) var(--spot-ease),
    filter    var(--spot-duration) var(--spot-ease);
}

/* Without the script the first card is simply the visible one. */
.spotlight-card:first-child { opacity: 1; pointer-events: auto; }

.spotlight-link {
  position: relative;
  /* Above the fire, which is painted behind at z-index 0. The card's own
     background is what hides the middle of the fire and leaves only the ring
     around the edge -- no mask, no clipping, nothing to go wrong. */
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 12px 14px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(48, 68, 98, 0.55), rgba(17, 28, 46, 0.75));
  color: inherit;
}

.spotlight-frame {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 4px 0 10px;
}

/* contain, never cover: a seller's photograph is not ours to crop. */
.spotlight-frame img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.spotlight-meta { display: grid; gap: 3px; }
.spotlight-name {
  font-family: Manrope, Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}
.spotlight-sub { font-size: 11px; color: #a3b3c9; }
.spotlight-meta .price { margin: 2px 0 0; font-size: 19px; }

/* ------------------------------------------------------------ slots */

.spotlight-card.is-active {
  z-index: 3;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  filter: none;
}
.spotlight-card.is-active .spotlight-link {
  border-color: #56719c;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(120, 160, 215, 0.12);
  background: linear-gradient(180deg, rgb(45, 66, 97), rgb(16, 27, 45));
}

.spotlight-card.is-prev,
.spotlight-card.is-next {
  z-index: 2;
  opacity: 0.5;
  transform: translateX(-64%) scale(0.62);
  filter: blur(1.5px);
}
.spotlight-card.is-next { transform: translateX(64%) scale(0.62); }

/* Parked. Still in the document, out of the way and out of the tab order. */
.spotlight-card.is-far {
  z-index: 1;
  opacity: 0;
  transform: translateX(-96%) scale(0.7);
  filter: blur(7px);
}
.spotlight-card.is-far.is-far-right { transform: translateX(96%) scale(0.7); }

/* ----------------------------------------------------------- smoke */

/*
 * A single blurred radial gradient on the card that is leaving. Kept faint and
 * short on purpose: the brief asked for cinematic, not weather.
 */
.spotlight-card::after {
  content: "";
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 55%, rgba(176, 198, 230, 0.20), rgba(176, 198, 230, 0) 62%);
  opacity: 0;
  pointer-events: none;
  filter: blur(16px);
}

.spotlight-card.is-leaving::after {
  animation: spotlight-smoke var(--spot-duration) var(--spot-ease) forwards;
}

@keyframes spotlight-smoke {
  0%   { opacity: 0;   transform: scale(0.9); }
  35%  { opacity: 0.85; transform: scale(1.04); }
  100% { opacity: 0;   transform: scale(1.22); }
}

/* =====================================================================
 * Featured-listing effects.
 *
 * One system, four treatments: fire, glow, lightning and electric. A seller
 * pays to have one put on their listing, so it has to be visible from across
 * a page of ordinary cards without making the item underneath hard to read.
 *
 * The effect sits BEHIND the card it decorates. The card's own background is
 * opaque, so the middle is covered and what is left is a band around the edge.
 * That is why there is no mask and no clip-path anywhere: the outer edge is
 * noise fading into the page, which is what light does.
 *
 * Every variant is built from the same six layers and differs only in colour,
 * in which layers it uses, and in timing:
 *
 *   .fx-cast   the light thrown on to whatever is nearby. Unfiltered.
 *   .fx-haze   two soft outer fields, displaced hard into wisps.
 *   .fx-edge   three thin outlines, displaced modestly so they stay lines and
 *              cross one another into filaments.
 *   .fx-spark  embers. Unfiltered, so it is the one layer that can use a
 *              transform for free.
 *
 * Colours come from four custom properties set per variant, so adding a fifth
 * treatment is a colour block and a timing block, not another copy of this.
 *
 * WHAT IS ANIMATED, AND WHY ONLY THAT. Opacity, and on the unfiltered layers
 * transform. Nothing else, ever. A transform on a FILTERED element makes the
 * browser redo the displacement every frame; measured on this page, adding a
 * 1% scale to three filtered layers took the median frame from 16.7ms to 50ms.
 * The noise itself is static for the same reason -- animating baseFrequency
 * regenerates the whole field per frame and halved the frame rate. The
 * movement comes from cross-fading layers whose cycle lengths do not divide
 * into one another, so the pattern takes many minutes to repeat and the cost
 * is nil.
 * ===================================================================== */

/* The filter definitions take no space and must not push the page about. */
.fx-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.fx {
  position: absolute;
  /* Narrow on purpose. An earlier version reached 45px past the card and read
     as a bonfire with a card in it rather than a card worth looking at. */
  inset: -8px;
  z-index: 0;
  border-radius: 20px;
  pointer-events: none;
  isolation: isolate;
}

.fx > span {
  position: absolute;
  border-radius: inherit;
  /* Opacity only -- see the note above. This is a constraint, not a style. */
  will-change: opacity;
}

/* ------------------------------------------------------------ colours */

.fx-fire {
  --fx-hot: #fff6e6;
  --fx-mid: #ffb042;
  --fx-deep: #ff3200;
  --fx-bloom: 255, 110, 15;
  --fx-shine: rgba(255, 216, 160, 0.34);
}

.fx-glow {
  --fx-hot: #fff4dd;
  --fx-mid: #ffc071;
  --fx-deep: #ef7a1e;
  --fx-bloom: 255, 150, 50;
  --fx-shine: rgba(255, 228, 186, 0.3);
}

.fx-lightning {
  --fx-hot: #ffffff;
  --fx-mid: #d4e6ff;
  --fx-deep: #5f86ff;
  --fx-bloom: 120, 160, 255;
  --fx-shine: rgba(255, 255, 255, 0.42);
}

.fx-electric {
  --fx-hot: #f2fbff;
  --fx-mid: #6fd6ff;
  --fx-deep: #2a5cff;
  --fx-bloom: 70, 170, 255;
  --fx-shine: rgba(214, 244, 255, 0.38);
}

/* -------------------------------------------------------------- edges */

.fx-edge {
  border: 2px solid;
  border-color: var(--fx-hot);
}

.fx-edge.e1 {
  inset: 7px;
  border-radius: 14px;
  box-shadow:
    0 0 4px 0 var(--fx-hot),
    0 0 9px 1px var(--fx-mid),
    0 0 20px 3px rgba(var(--fx-bloom), 0.55);
  filter: blur(0.8px) url(#fx-edge-1);
  animation: fx-drift-a 8.1s ease-in-out infinite;
}

.fx-edge.e2 {
  inset: 3px;
  border-width: 1.5px;
  border-color: var(--fx-mid);
  border-radius: 17px;
  box-shadow:
    0 0 7px 1px var(--fx-mid),
    0 0 16px 3px rgba(var(--fx-bloom), 0.45);
  filter: blur(1.2px) url(#fx-edge-2);
  animation: fx-drift-b 11.3s ease-in-out infinite;
}

.fx-edge.e3 {
  inset: 10px;
  border-width: 1.5px;
  border-color: var(--fx-deep);
  border-radius: 12px;
  box-shadow:
    0 0 6px 1px var(--fx-deep),
    0 0 15px 3px rgba(var(--fx-bloom), 0.4);
  filter: blur(1.2px) url(#fx-edge-3);
  animation: fx-drift-c 14.7s ease-in-out infinite;
}

/* --------------------------------------------------------- the haze */

.fx-haze {
  inset: 1px;
  border-radius: 18px;
}

.fx-haze.a {
  box-shadow:
    0 0 14px 5px rgba(var(--fx-bloom), 0.32),
    0 0 30px 12px rgba(var(--fx-bloom), 0.16);
  filter: blur(5px) url(#fx-haze-a);
  animation: fx-drift-b 17.3s ease-in-out infinite;
}

.fx-haze.b {
  box-shadow:
    0 0 11px 4px rgba(var(--fx-bloom), 0.26),
    0 0 24px 9px rgba(var(--fx-bloom), 0.13);
  filter: blur(4px) url(#fx-haze-b);
  animation: fx-drift-c 21.1s ease-in-out infinite;
}

/* --------------------------------------------------------- the light */

/*
 * What the effect throws on everything around it.
 *
 * Without this the card sits in FRONT of something bright without being lit by
 * it, which the eye reads as a sticker on a photograph even when it cannot say
 * why. Deliberately weak: light spill is noticed only when it is removed.
 */
.fx-cast {
  inset: -34px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(var(--fx-bloom), 0.16),
    rgba(var(--fx-bloom), 0.08) 45%,
    rgba(var(--fx-bloom), 0) 72%
  );
  filter: blur(16px);
  animation: fx-breathe 3.3s ease-in-out infinite;
}

/* -------------------------------------------------------- the sparks */

/*
 * Nine embers on two pseudo-elements -- two elements and two animations rather
 * than nine of each. Unfiltered on purpose, twice over: a spark has left the
 * flame so it should not be bent by the same turbulence, and because nothing
 * here is filtered this is the one layer a transform is free on.
 */
.fx-spark {
  inset: 8px;
  border-radius: 0;
  will-change: transform, opacity;
  animation: fx-rise 5.4s linear infinite;
}

.fx-spark::before,
.fx-spark::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--fx-hot);
  box-shadow:
     12px  -3px 2px 0 var(--fx-hot),
     58px   6px 2px 0 var(--fx-mid),
    104px  -4px 2px 0 var(--fx-hot),
    152px   8px 2px 0 var(--fx-mid),
    198px   1px 2px 0 var(--fx-deep),
     34px 158px 2px 0 var(--fx-mid),
     88px 172px 2px 0 var(--fx-hot),
    146px 162px 2px 0 var(--fx-mid),
    194px 176px 2px 0 var(--fx-hot);
}

.fx-spark::after {
  left: 28px;
  animation: fx-rise 5.4s linear infinite;
  animation-delay: -2.7s;
  opacity: 0.7;
}

/* -------------------------------------------------------- the cycles */

@keyframes fx-drift-a {
  0%   { opacity: 0.8;  }
  36%  { opacity: 1;    }
  68%  { opacity: 0.87; }
  100% { opacity: 0.8;  }
}

@keyframes fx-drift-b {
  0%   { opacity: 0.95; }
  29%  { opacity: 0.5;  }
  62%  { opacity: 0.88; }
  100% { opacity: 0.95; }
}

@keyframes fx-drift-c {
  0%   { opacity: 0.4;  }
  26%  { opacity: 0.92; }
  57%  { opacity: 0.55; }
  80%  { opacity: 1;    }
  100% { opacity: 0.4;  }
}

/* The cast light breathes slowly and smoothly. Bounced light is the average of
   a whole flame, so it changes far more gently than the flame itself -- give it
   a sharp flicker and the card strobes, which is unpleasant to sit beside and,
   for some people, worse than unpleasant. */
@keyframes fx-breathe {
  0%   { opacity: 0.72; transform: scale(0.99);  }
  40%  { opacity: 1;    transform: scale(1.012); }
  65%  { opacity: 0.8;  transform: scale(0.998); }
  100% { opacity: 0.72; transform: scale(0.99);  }
}

@keyframes fx-rise {
  0%   { transform: translateY(8px)   scale(1);    opacity: 0;    }
  14%  { transform: translateY(0)     scale(1);    opacity: 0.95; }
  68%  { transform: translateY(-20px) scale(0.85); opacity: 0.45; }
  100% { transform: translateY(-34px) scale(0.45); opacity: 0;    }
}

/* -------------------------------------------------------- the shine */

/*
 * A band of light running across the card.
 *
 * In FRONT of the card rather than behind it, which is the whole reason it is
 * a separate element: .fx isolates its own stacking context, so nothing inside
 * it can come out over the card.
 *
 * Clipped to the card's shape and taking no pointer events -- it passes over
 * links and buttons without ever catching a tap.
 *
 * The sweep is one transform on one element, so it runs on the compositor and
 * costs nothing, unlike everything behind the card. And it PAUSES: the band
 * sits off the left edge for three quarters of each cycle and crosses in the
 * last quarter. A shine that never stops reads as a loading skeleton, which is
 * the opposite of what somebody paid for.
 */
.fx-shine {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  overflow: hidden;
  z-index: 2;
  pointer-events: none;
}

.fx-shine::before {
  content: "";
  position: absolute;
  top: -60%;
  bottom: -60%;
  left: -70%;
  width: 45%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    var(--fx-shine) 48%,
    rgba(255, 255, 255, 0) 100%
  );
  will-change: transform;
  animation: fx-shine-sweep 5.2s cubic-bezier(0.4, 0, 0.5, 1) infinite;
}

@keyframes fx-shine-sweep {
  0%, 72%  { transform: translateX(0) skewX(-16deg); }
  100%     { transform: translateX(460%) skewX(-16deg); }
}

/* Each treatment sweeps on its own rhythm, so two featured cards side by side
   do not flash in unison -- which reads as a page-wide glitch rather than as
   two separate things catching the light. */
.fx-shine.fx-glow::before      { animation-duration: 6.4s; }
.fx-shine.fx-lightning::before { animation-duration: 4.1s; }
.fx-shine.fx-electric::before  { animation-duration: 3.4s; }

/* ===================================================================
 * The four treatments.
 * =================================================================== */

/* ---- GLOW: the quiet one. No displacement at all, so the outline stays a
   clean rounded rectangle and simply breathes. Cheapest of the four to draw
   and the only one that suits an expensive item. */
.fx-glow .fx-edge {
  filter: none;
  animation-name: fx-breathe-soft;
}
.fx-glow .fx-edge.e1 { animation-duration: 4.2s; }
.fx-glow .fx-edge.e2 { animation-duration: 6.7s; }
.fx-glow .fx-edge.e3 { animation-duration: 9.1s; }
.fx-glow .fx-haze { filter: blur(6px); }
.fx-glow .fx-spark { display: none; }

@keyframes fx-breathe-soft {
  0%   { opacity: 0.62; }
  50%  { opacity: 1;    }
  100% { opacity: 0.62; }
}

/* ---- LIGHTNING: sudden strikes with quiet between them. steps(1) so each
   value SNAPS rather than glides -- a strike that fades in is a lamp.
   The quiet is NOT dark. An earlier version sat at 10% opacity between
   strikes, which meant that at any given moment there was a good chance the
   card looked like an ordinary one with a faint blue smudge -- and this is a
   treatment somebody paid for. The base is now plainly lit, and the strikes
   read as strikes because they are three times brighter than it, not because
   everything else is switched off. Two strike windows per cycle, at different
   points on each layer, so one is nearly always visible somewhere. */
.fx-lightning .fx-edge {
  animation-name: fx-strike;
  animation-timing-function: steps(1, end);
}
.fx-lightning .fx-edge.e1 { animation-duration: 3.7s; }
.fx-lightning .fx-edge.e2 { animation-duration: 5.1s; animation-delay: -1.7s; }
.fx-lightning .fx-edge.e3 { animation-duration: 6.9s; animation-delay: -3.4s; }
.fx-lightning .fx-haze.a { animation: fx-breathe-soft 6.1s ease-in-out infinite; }
.fx-lightning .fx-haze.b { display: none; }
.fx-lightning .fx-spark { display: none; }

@keyframes fx-strike {
  0%   { opacity: 0.34; }
  30%  { opacity: 0.3;  }
  31%  { opacity: 1;    }
  33%  { opacity: 0.36; }
  35%  { opacity: 0.9;  }
  37%  { opacity: 0.28; }
  74%  { opacity: 0.32; }
  75%  { opacity: 1;    }
  77%  { opacity: 0.3;  }
  79%  { opacity: 0.85; }
  81%  { opacity: 0.34; }
  100% { opacity: 0.34; }
}

/* ---- ELECTRIC: a constant fast crackle rather than occasional strikes. Short
   cycles, never fully dark, so it fizzes continuously. */
.fx-electric .fx-edge {
  animation-name: fx-crackle;
  animation-timing-function: steps(1, end);
}
.fx-electric .fx-edge.e1 { animation-duration: 1.1s; }
.fx-electric .fx-edge.e2 { animation-duration: 1.7s; animation-delay: -0.4s; }
.fx-electric .fx-edge.e3 { animation-duration: 2.3s; animation-delay: -1.1s; }
.fx-electric .fx-spark { animation-duration: 3.1s; }

@keyframes fx-crackle {
  0%   { opacity: 1;    }
  12%  { opacity: 0.55; }
  23%  { opacity: 0.95; }
  38%  { opacity: 0.68; }
  51%  { opacity: 1;    }
  64%  { opacity: 0.6;  }
  79%  { opacity: 0.92; }
  91%  { opacity: 0.7;  }
  100% { opacity: 1;    }
}

/* ---- FIRE keeps the defaults above. */

/* ------------------------------------------------- smaller surfaces */

/*
 * On a Marketplace card, at roughly half the width of the spotlight, the same
 * pixel measurements give a proportionally enormous effect. Everything comes
 * in together -- displacement, bloom, blur -- because changing one and not the
 * others gives a thin outline with a huge halo.
 */
.fx-compact { inset: -6px; border-radius: 16px; }
.fx-compact .fx-edge.e1 { inset: 5px; filter: blur(0.6px) url(#fx-edge-1-sm); }
.fx-compact .fx-edge.e2 { inset: 2px; filter: blur(0.9px) url(#fx-edge-2-sm); }
.fx-compact .fx-edge.e3 { inset: 8px; filter: blur(0.9px) url(#fx-edge-3-sm); }
.fx-compact .fx-haze.a { filter: blur(3px) url(#fx-haze-a-sm); }
.fx-compact .fx-haze.b { filter: blur(3px) url(#fx-haze-b-sm); }
.fx-compact .fx-cast { inset: -22px; filter: blur(11px); }
.fx-compact .fx-spark { display: none; }
.fx-compact.fx-glow .fx-edge { filter: none; }
.fx-compact.fx-glow .fx-haze { filter: blur(4px); }

@media (max-width: 619px) {
  .fx { inset: -6px; }
  .fx .fx-edge.e1 { filter: blur(0.6px) url(#fx-edge-1-sm); }
  .fx .fx-edge.e2 { filter: blur(0.9px) url(#fx-edge-2-sm); }
  .fx .fx-edge.e3 { filter: blur(0.9px) url(#fx-edge-3-sm); }
  .fx .fx-haze.a { filter: blur(3px) url(#fx-haze-a-sm); }
  .fx .fx-haze.b { filter: blur(3px) url(#fx-haze-b-sm); }
  .fx .fx-cast { inset: -24px; filter: blur(12px); }
  .fx-glow .fx-edge { filter: none; }
  .fx-glow .fx-haze { filter: blur(4px); }
}

/* ----------------------------------------------------- who is alight */

/*
 * The spotlight's own fire, by slot.
 *
 * Only the card at the front burns properly. Six cards each running five
 * displacement filters would be thirty for one the eye can see, so the cards
 * either side keep a single still outline -- its filter is static and nothing
 * animates it, so it is computed once and then costs nothing -- and the parked
 * ones are switched off entirely.
 */
.spotlight-card .fx {
  opacity: 0;
  transition: opacity var(--spot-duration) var(--spot-ease);
}

/* Without the script the first card is the visible one, so it is the one that
   burns. Placed above the slot rules: same specificity, so whichever came last
   would win, and once the script runs the slot is the truth. */
.spotlight-card:first-child .fx { opacity: 1; }

.spotlight-card.is-active .fx { opacity: 1; }

.spotlight-card.is-prev .fx,
.spotlight-card.is-next .fx { opacity: 0.5; }

.spotlight-card.is-prev .fx-cast,
.spotlight-card.is-next .fx-cast,
.spotlight-card.is-prev .fx-haze,
.spotlight-card.is-next .fx-haze,
.spotlight-card.is-prev .fx-spark,
.spotlight-card.is-next .fx-spark,
.spotlight-card.is-prev .fx-edge.e2,
.spotlight-card.is-next .fx-edge.e2,
.spotlight-card.is-prev .fx-edge.e3,
.spotlight-card.is-next .fx-edge.e3 { display: none; }

.spotlight-card.is-prev .fx-edge.e1,
.spotlight-card.is-next .fx-edge.e1 {
  animation: none;
  opacity: 1;
  border-width: 1.5px;
  border-color: rgba(255, 166, 70, 0.9);
  box-shadow:
    0 0 6px 0 rgba(255, 150, 45, 0.85),
    0 0 16px 3px rgba(255, 70, 0, 0.45);
}

/* Parked cards are invisible; nothing there should be running at all. */
.spotlight-card.is-far .fx { opacity: 0; }
.spotlight-card.is-far .fx-cast,
.spotlight-card.is-far .fx-haze,
.spotlight-card.is-far .fx-spark,
.spotlight-card.is-far .fx-edge.e2,
.spotlight-card.is-far .fx-edge.e3 { display: none; }
.spotlight-card.is-far .fx-edge.e1 { filter: none; animation: none; }

/* --------------------------------------------------------- controls */

.spotlight-arrow {
  position: absolute;
  top: calc(50% + 6px);
  z-index: 4;
  width: var(--tap);
  height: var(--tap);
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #45597a;
  border-radius: 50%;
  background: rgba(14, 23, 38, 0.72);
  color: #dbe3ef;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.spotlight-arrow.is-prev { left: 2px; }
.spotlight-arrow.is-next { right: 2px; }
.spotlight-arrow:hover { background: var(--navy-hover); color: #fff; }
.spotlight-arrow:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.spotlight-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
}
.spotlight-dot {
  width: 34px;
  height: 36px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
/* The tap target is full size; only the pip is drawn. */
.spotlight-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4d5e78;
  transition: background 200ms ease, transform 200ms ease;
}
.spotlight-dot.is-on::before { background: var(--orange); transform: scale(1.25); }
.spotlight-dot:focus-visible { outline: 2px solid var(--orange); outline-offset: -4px; border-radius: 6px; }

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

@media (min-width: 620px) {
  .spotlight-stage { height: 328px; }
  .spotlight-card { width: 66%; }
  .spotlight-name { font-size: 17px; }
}

@media (min-width: 900px) {
  .spotlight { margin-top: 0; padding: 18px 18px 12px; }
  .spotlight-stage { height: 340px; }
  .spotlight-card { width: 62%; }
  .spotlight-card.is-prev { transform: translateX(-62%) scale(0.78); }
  .spotlight-card.is-next { transform: translateX(62%) scale(0.78); }

  /* A mouse does not need a 44px target, and the saved height keeps the panel
     in proportion with the headline beside it. */
  .spotlight-dot { height: 22px; }
}

/*
 * Below 620px only the active card and a sliver of the next are shown. Pulling
 * the previous card off-screen entirely is deliberate: at this width three
 * cards means three unreadable ones.
 */
@media (max-width: 619px) {
  /* The effect scales itself down on a phone -- see the .fx block above. All
     that is left here is the room the stage gives it to spill into. */
  .spotlight-stage { overflow-clip-margin: 10px; }
}

@media (max-width: 619px) {
  .spotlight-card.is-prev { opacity: 0; transform: translateX(-90%) scale(0.8); }
  .spotlight-card.is-next { opacity: 0.32; transform: translateX(74%) scale(0.84); }

  /* Pulled out to the panel edge so they overlay the card's margin rather than
     the photograph. They keep the full 44px target: swiping is the main gesture
     here, but an arrow that is awkward to hit is worse than no arrow. */
  .spotlight-arrow.is-prev { left: -6px; }
  .spotlight-arrow.is-next { right: -6px; }
}

/* ------------------------------------------------- reduced motion */

/*
 * A plain crossfade. The blanket rule earlier in this file already switches
 * transitions and animations off; this restores just enough for the change of
 * item to be perceptible, with no movement, blur or smoke.
 */
@media (prefers-reduced-motion: reduce) {
  .spotlight-card {
    transition: opacity 220ms linear !important;
    transform: none !important;
    filter: none !important;
  }
  .spotlight-card.is-prev,
  .spotlight-card.is-next,
  .spotlight-card.is-far { opacity: 0 !important; }
  .spotlight-card.is-active { opacity: 1 !important; }
  .spotlight-card::after { display: none; }

  /*
   * The effects stay -- they are what somebody paid for, and a featured
   * listing that looks ordinary is a refund waiting to happen -- but they stop
   * moving. The cross-fade is what moved, so with the animations off the
   * layers simply sit on top of one another: a still effect rather than none.
   *
   * Sparks and strikes go entirely. A spark that does not rise is a dot, and
   * lightning that does not strike is a dim line.
   */
  .fx-edge,
  .fx-haze,
  .fx-cast { transform: none !important; }
  .fx-edge.e2 { opacity: 0.8 !important; }
  .fx-edge.e3 { opacity: 0.7 !important; }
  .fx-spark { display: none !important; }
  /* A shine that does not sweep is just a stripe across the card. */
  .fx-shine { display: none !important; }
  .fx-lightning .fx-edge { opacity: 0.85 !important; }
  .fx-cast { opacity: 0.85 !important; }
  .spotlight-card.is-active .spotlight-link::after { opacity: 0.85 !important; }

}

/* ------------------------------------------------------------------
   Confirmation codes
   ------------------------------------------------------------------
   A six digit code typed on a phone. Large, widely spaced and in a
   fixed-width face, because the common failure here is reading the
   message wrongly rather than typing it wrongly, and 0/O and 1/l are
   what people get wrong.
*/
.code-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 26px;
    letter-spacing: 0.32em;
    text-align: center;
    /* The trailing letter-space pushes the text off centre; this pulls
       it back so the digits sit in the middle of the box. */
    text-indent: 0.32em;
    padding: 14px 12px;
}

/* A button that has to be a button -- because it posts, with a CSRF
   token -- but should read as a link. "Send it again" inside a form is
   the usual case. */
.linklike {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--accent, #0b6cf0);
    cursor: pointer;
    text-decoration: underline;
}

.linklike[disabled] {
    color: var(--muted, #6b7280);
    cursor: default;
    text-decoration: none;
}

.linklike:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* ------------------------------------------------------ featured cards */

/*
 * A Marketplace card wearing a paid effect.
 *
 * The effect lives on this wrapper rather than inside the card, because the
 * card clips its own overflow -- that clipping is what rounds the corner of a
 * photograph which has no radius of its own. An effect placed inside is sliced
 * off at the card's edge and only a sliver along the bottom survives.
 *
 * The wrapper is transparent and has no size of its own, so an ordinary card
 * is laid out exactly as it always was.
 */
.fx-wrap {
  position: relative;
  display: block;
}

.fx-wrap > .product-card {
  position: relative;
  /* Above the effect, which is painted behind at z-index 0. The card's opaque
     background is what hides the middle of the effect and leaves only the band
     around the edge. */
  z-index: 1;
}

.fx-wrap.is-featured > .product-card {
  border-color: transparent;
}

/*
 * The paid-placement mark.
 *
 * Deliberately NOT .featured-tag -- that class already belongs to the shop's
 * own "OUR PICK" flag, and the two mean opposite things. One is the shop
 * recommending something; this one is a seller having paid for the position.
 * Sharing a class would have made them look alike, which is the one thing a
 * disclosure must not do.
 *
 * Sits on the right, where OUR PICK sits on the left, so a card could in
 * principle carry both without them colliding.
 */
.paid-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px 4px;
  border-radius: 999px;
  background: rgba(240, 120, 54, 0.92);
  color: #17191d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.7px;
}

/* ------------------------------------------------------- seller badges */

/*
 * Badges say something about the person, not the item, so they sit apart from
 * the condition and category line. The icon never appears on its own -- an
 * icon with no name is a riddle, and a badge nobody understands is decoration
 * rather than reassurance.
 */
.seller-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 0;
  padding: 0 12px;
}

.seller-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 3px;
  border: 1px solid rgba(240, 120, 54, 0.4);
  border-radius: 999px;
  background: rgba(240, 120, 54, 0.1);
  color: #f7c9a8;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
}

.seller-badge span:first-child { font-size: 12px; }

/* --------------------------------------------------- listing row actions */

/*
 * Changing a featured listing's effect without leaving the queue.
 *
 * Staff work through this list in one pass. Making them open a listing, scroll
 * past everything else, change one dropdown and come back is four actions for
 * a decision that is worth one -- and it is the kind of friction that ends in
 * nobody bothering.
 *
 * Starting a feature is deliberately NOT here: that one is a sale, and it
 * keeps its bank confirmation on the listing's own page.
 */
.row-effect {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  flex-wrap: wrap;
}

.row-effect select {
  padding: 4px 8px;
  font-size: 12px;
  width: auto;
  min-width: 118px;
}

.button.tiny {
  padding: 4px 12px;
  font-size: 12px;
  line-height: 1.5;
}

.tiny-link {
  font-size: 12px;
  color: var(--muted, #B0BAC9);
}

.tiny-link:hover { color: var(--orange); }

.badge.featured {
  background: rgba(240, 120, 54, 0.16);
  border: 1px solid rgba(240, 120, 54, 0.45);
  color: #f7c9a8;
}

/* ------------------------------------------------------- badge toggles */

/*
 * Every badge in the catalogue shown at once, on or off.
 *
 * The alternative -- a list of what somebody holds plus a separate "give a
 * badge" dropdown -- makes you read two places to answer one question, and
 * hides the badges they do NOT have, which is usually what you came to check.
 */
.badge-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.badge-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 6px;
  border: 1px solid var(--line-soft, #2b3442);
  border-radius: 999px;
  background: transparent;
  color: var(--muted, #B0BAC9);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.badge-toggle:hover { border-color: var(--orange); color: #f7c9a8; }

.badge-toggle.is-on {
  border-color: rgba(240, 120, 54, 0.55);
  background: rgba(240, 120, 54, 0.14);
  color: #f7c9a8;
}

.badge-toggle-state {
  opacity: 0.55;
  font-size: 13px;
  line-height: 1;
}

.badge-toggle:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.filter-bar input { width: auto; min-width: 260px; }

/* Featuring payments ---------------------------------------------------- */
.badge.submitted { background: #2b3a52; color: #b9cbe4; }
.badge.approved  { background: #243d36; color: #b2dbcb; }
.nav-count {
  display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px;
  border-radius: 9px; background: var(--orange); color: #1a1208;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.fr-actions { display: grid; gap: 16px; margin-top: 12px; }
@media (min-width: 900px) {
  .fr-actions { grid-template-columns: 1fr 1fr; align-items: start; }
}

.row-effect label { font-size: 12px; color: var(--muted, #b0bac9); margin: 0; }

/* Header on a phone --------------------------------------------------------
 * Five or six links and a Sign out button do not fit beside the logo at
 * 390px: they wrapped ("Shop / all") and, once signed in, pushed Account and
 * Sign out off the right edge where nobody could reach them. Below 900px the
 * links drop to their own row and that row scrolls sideways, so every link is
 * always reachable without a menu script. */
@media (max-width: 899px) {
  .header-inner {
    flex-wrap: wrap;
    row-gap: 0;
    padding-top: 12px;
    min-height: 0;
  }
  .site-header nav {
    flex: 1 0 100%;
    gap: 20px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* Let the row run to the screen edge, so a cut-off link reads as
       "there is more" rather than as the end of the menu. */
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
  }
  .site-header nav::-webkit-scrollbar { display: none; }
  .site-header nav a,
  .site-header nav form { flex: 0 0 auto; }
  .site-header nav .button { min-height: 36px; padding: 6px 14px; font-size: 13px; }
}

/* PRIVATE SELLER and FEATURED used to sit at opposite top corners of the
 * photo. On a phone the photo tile is barely wider than the two of them and
 * they overlapped. Stacked on the left they never can, and they still read
 * as two separate statements. */
.product-card .paid-tag {
  top: 36px;
  left: 10px;
  right: auto;
}

/* Panels stacked one after another (a seller's item page: photos, featuring,
 * remove) ran into each other with no space between. */
.panel + .panel { margin-top: 18px; }

/* Lost & stolen check ------------------------------------------------------ */
.imei-form { display: grid; gap: 4px; }
.imei-form input#number { font-size: 18px; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.imei-result { margin: 18px 0; line-height: 1.6; }
.imei-result ul { margin: 8px 0 10px; padding-left: 20px; }
.imei-result a { color: inherit; text-decoration: underline; font-weight: 600; }
.imei-about ul, .imei-next { margin: 0 0 12px; padding-left: 20px; line-height: 1.7; color: var(--muted); }
.imei-page .panel + .panel, .imei-page .notice + .panel { margin-top: 18px; }
.imei-page h2 { font-size: 18px; margin: 0 0 8px; }
/* Off-screen rather than display:none -- some bots skip hidden fields. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.5px; }
.todo-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.todo-list li a {
  display: block; padding: 12px 16px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
}
.todo-list li a:hover { border-color: #465d7c; }
.todo-list li.urgent a { border-color: #7d4d3c; background: #412c26; color: #ffc6aa; font-weight: 600; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 10px; }
