/* ============================================================
   RESELL MARKET — marketplace layout

   Built to the shape people already know: a left category rail,
   a search bar across the top, and a grid of listing cards with
   the price first and the title underneath.

   The page runs at two speeds, and the split is deliberate.

   ELECTRONICS is real: a priced catalogue, dropshipped, 10% under
   list. Those cards carry actual products and actual arithmetic.

   Everything above it — domains, starter sites, templates,
   micro-tools, automations — is still EMPTY ON PURPOSE. Filling a
   pre-launch marketplace with invented items and made-up prices
   would be fabricating inventory that doesn't exist, so those stay
   labelled placeholders with a shimmer where the photo goes. The
   layout shows exactly what it will be; it just doesn't pretend
   to have stock it hasn't got.

   The one page on the site that doesn't use the house serif for
   its furniture: a marketplace reads as a utility, and utilities
   are set in a UI sans.
   ============================================================ */

html { background: #0a0714; }
main > section:not(.hero) { background: rgba(10, 7, 20, 0.91); }
.foot { background: rgba(10, 7, 20, 0.92); }

/* ---------- app frame ---------- */

.mk {
  max-width: 82rem;
  margin: 0 auto;
  padding: clamp(6.5rem, 11vw, 8rem) var(--pad) clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: 15rem 1fr;
  gap: clamp(1.2rem, 3vw, 2.2rem);
  align-items: start;
}

/* ---------- search bar ---------- */

.mksearch {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.7rem;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgba(185, 140, 255, 0.16);
}
.mksearch__field {
  flex: 1;
  min-width: 14rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.05rem;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.92rem;
}
.mksearch__field svg { width: 1rem; height: 1rem; flex: none; fill: none; stroke: var(--dim); stroke-width: 2; stroke-linecap: round; }
.mksearch__loc {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 100px;
}

/* ---------- category rail ---------- */

.mkrail { position: sticky; top: 5.5rem; }
.mkrail__h {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 1rem;
}
.mkcat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 6px;
  font-size: 0.92rem;
  color: var(--mute);
  transition: background 0.25s, color 0.25s;
  cursor: default;
}
.mkcat:hover { background: rgba(185, 140, 255, 0.08); color: var(--white); }
.mkcat__ic {
  width: 1.9rem; height: 1.9rem;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(185, 140, 255, 0.12);
  color: var(--accent);
}
.mkcat__ic svg { width: 0.95rem; height: 0.95rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mkcat__n { flex: 1; }
.mkcat__c { font-family: var(--mono); font-size: 0.6rem; color: var(--dim); }

/* ---------- listing grid ---------- */

.mkhead { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.mkhead h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.015em; }
.mkhead span { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }

.mkgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; }

/* A second category heading further down the page needs air above it that
   the first one doesn't. */
.mkhead--sec { margin-top: 3.2rem; padding-top: 2.2rem; border-top: 1px solid rgba(185, 140, 255, 0.16); }
.mksec__note { color: var(--mute); font-size: 0.92rem; max-width: 40rem; margin: -0.4rem 0 1.4rem; }

/* The category currently being highlighted in the rail. */
.mkcat--on { background: rgba(185, 140, 255, 0.1); color: var(--white); }
.mkcat--on .mkcat__ic { background: var(--accent); color: #17092b; }

.mkcard {
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.mkcard__img {
  position: relative;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.035);
  display: grid;
  place-items: center;
  overflow: hidden;
}
/* A slow sweep across the empty photo well — reads as "loading", which is
   honest here: there genuinely is nothing to load yet. */
.mkcard__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(185, 140, 255, 0.1) 50%, transparent 65%);
  background-size: 280% 100%;
  animation: mkshimmer 3.4s ease-in-out infinite;
}
@keyframes mkshimmer { 0% { background-position: 130% 0; } 100% { background-position: -130% 0; } }
.mkcard__img svg { width: 1.7rem; height: 1.7rem; fill: none; stroke: rgba(185, 140, 255, 0.35); stroke-width: 1.4; }

.mkcard__body { padding: 0.8rem 0.85rem 1rem; }
.mkcard__price { font-size: 1.05rem; font-weight: 600; color: var(--dim); }
.mkcard__t { font-size: 0.88rem; color: var(--mute); margin-top: 0.25rem; }
.mkcard__m { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-top: 0.5rem; }

/* The card that isn't a placeholder — the notify prompt sitting in the
   grid where a listing would be, so the call to action is where the eye
   already is rather than parked at the bottom of the page. */
.mkcard--cta {
  border-color: var(--accent);
  background: radial-gradient(90% 70% at 50% 0%, rgba(185, 140, 255, 0.16), transparent 70%), rgba(185, 140, 255, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.3rem 1.1rem;
  text-align: center;
}
.mkcard--cta h3 { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; line-height: 1.15; }
.mkcard--cta p { color: var(--mute); font-size: 0.85rem; margin-top: 0.5rem; }
.mkcard--cta .btn { margin-top: 1.1rem; width: 100%; }

/* ---------- notify ---------- */

.soon {
  max-width: 44rem;
  margin: 4rem auto 0;
  padding: clamp(1.8rem, 4vw, 3rem);
  border: 1px solid rgba(185, 140, 255, 0.28);
  border-radius: 10px;
  background: radial-gradient(90% 70% at 50% 0%, rgba(185, 140, 255, 0.1), transparent 65%), rgba(14, 10, 26, 0.9);
  text-align: center;
}
.soon__eyebrow { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.soon__lede { color: var(--mute); max-width: 34rem; margin: 0.9rem auto 0; }
.soon__form { display: flex; gap: 0.6rem; max-width: 26rem; margin: 2rem auto 0; flex-wrap: wrap; }
.soon__form input { flex: 1; min-width: 12rem; background: #0a0714; border-radius: 6px; }
.soon__note { margin-top: 1rem; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; color: var(--dim); }

@media (max-width: 1080px) { .mkgrid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) {
  .mk { grid-template-columns: 1fr; }
  .mkrail { position: static; }
  .mkrail__list { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.4rem; }
  .mkcat { flex: none; }
  .mkcat__c { display: none; }
}
@media (max-width: 620px) { .mkgrid { grid-template-columns: repeat(2, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  .mkcard__img::after { animation: none; opacity: 0.35; }
}

/* ============================================================
   ELECTRONICS — the live half of the market

   The placeholder slots above are still placeholders: domains,
   starter sites and templates genuinely have no stock. Electronics
   is a real catalogue, so it gets real cards — a struck-through
   list price, the 10% price, and a buy control that only appears
   when the item can actually be sourced at a profit.

   An item whose margin isn't known renders dimmed and unbuyable
   rather than being hidden. Showing the range while being honest
   about what's orderable today beats an empty grid.
   ============================================================ */

.mkchips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.1rem; }
.mkchips .mkcat {
  flex: none;
  padding: 0.42rem 0.85rem;
  border-radius: 100px;
  border: 1px solid var(--line);
  gap: 0.45rem;
  font-size: 0.78rem;
}
.mkchips .mkcat__ic { width: 1rem; height: 1rem; background: none; border-radius: 0; }
.mkchips .mkcat__ic svg { width: 0.85rem; height: 0.85rem; }
.mkchips .mkcat--on { border-color: var(--accent); }
.mkchips .mkcat__c { font-size: 0.62rem; opacity: 0.75; }

/* ---------- product cards ---------- */

.mkcard--prod .mkcard__price { color: var(--white); display: flex; align-items: baseline; gap: 0.5rem; }
.mkcard--prod .mkcard__price s { font-size: 0.78rem; font-weight: 400; color: var(--dim); text-decoration-color: rgba(255,255,255,0.35); }
.mkcard--prod .mkcard__t { color: var(--white); }
.mkcard--prod.is-pending { opacity: 0.52; }

.mkbuy {
  display: block;
  width: 100%;
  margin-top: 0.8rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: rgba(185, 140, 255, 0.12);
  color: var(--white);
  font: 500 0.76rem/1 var(--sans);
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}
.mkbuy:hover { background: rgba(185, 140, 255, 0.24); }
.mkbuy.is-in { background: var(--accent); color: #17092b; }
.mkbuy--off {
  border-color: var(--line);
  background: none;
  color: var(--dim);
  cursor: default;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- basket + order ---------- */

.mkorder {
  display: grid;
  grid-template-columns: 20rem 1fr;
  gap: 1rem;
  margin-top: 2.2rem;
  align-items: start;
}
.mkorder__cart, .mkorder__form {
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  border: 1px solid rgba(185, 140, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  min-width: 0;
}
.mkorder__h {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.9rem;
}
.mkorder__form .mkorder__h:not(:first-child) { margin-top: 1.5rem; }

.mkline {
  display: flex; align-items: baseline; gap: 0.6rem;
  padding: 0.5rem 0; border-bottom: 1px solid var(--line-soft);
  font-size: 0.85rem; color: var(--mute);
}
.mkline i { margin-left: auto; font-style: normal; color: var(--white); font-variant-numeric: tabular-nums; }
.mkline__x {
  background: none; border: 0; color: var(--dim); cursor: pointer;
  font-size: 1rem; line-height: 1; padding: 0 0 0 0.3rem;
}
.mkline__x:hover { color: var(--accent); }
.mkline--tot { border-bottom: 0; padding-top: 0.8rem; font-weight: 600; color: var(--white); }
.mkline--save { border-bottom: 0; padding-top: 0; color: var(--accent); font-size: 0.78rem; }
.mkline--save i { color: var(--accent); }
.mkcart__empty { color: var(--dim); font-size: 0.85rem; padding: 0.4rem 0 0.8rem; }

.mkfields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.mkfields .fld--full { grid-column: 1 / -1; }
.mkfields textarea { min-height: 5rem; }

.mkpay { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.mkpayopt {
  display: block; padding: 0.75rem 0.85rem; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.15s, background 0.15s;
}
.mkpayopt:has(input:checked) { border-color: var(--accent); background: rgba(185, 140, 255, 0.1); }
.mkpayopt input { position: absolute; opacity: 0; pointer-events: none; }
.mkpayopt b { display: block; color: var(--white); font-size: 0.85rem; font-weight: 500; }
.mkpayopt span { display: block; color: var(--dim); font-size: 0.72rem; margin-top: 0.15rem; }

.mkorder__form .btn { margin-top: 1.3rem; }
.mkorder__note { color: var(--dim); font-size: 0.74rem; line-height: 1.55; margin-top: 0.9rem; }

/* ============================================================
   PAYMENT SECTION
   ============================================================ */

.pay { padding-top: clamp(3rem, 7vw, 5rem); }
.coins {
  display: grid;
  grid-template-columns: 1.6fr repeat(5, 1fr);
  gap: 0.6rem;
  max-width: 82rem;
  margin: 2.6rem auto 0;
  padding: 0 var(--pad);
}
.coin {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  min-width: 0;
}
.coin__tick { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; color: var(--dim); }
.coin__n { color: var(--white); font-size: 0.92rem; font-weight: 500; margin-top: 0.35rem; }
.coin__d { color: var(--mute); font-size: 0.8rem; line-height: 1.55; margin-top: 0.6rem; }

/* Monero gets its own colour rather than the page accent — it is the
   reason this section exists, and the orange is the coin's own. */
.coin--xmr { border-color: rgba(255, 102, 0, 0.5); background: rgba(255, 102, 0, 0.07); }
.coin--xmr .coin__tick { color: #ff8534; }

.paygrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  max-width: 82rem;
  margin: 0.6rem auto 2.6rem;
  padding: 0 var(--pad);
}
.payc { padding: 1.2rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,0.02); }
.payc__n { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em; color: var(--accent); }
.payc h3 { color: var(--white); font-size: 0.95rem; font-weight: 500; margin-top: 0.6rem; line-height: 1.3; }
.payc p { color: var(--mute); font-size: 0.82rem; line-height: 1.6; margin-top: 0.45rem; }

.payterms { border: 1px solid rgba(185, 140, 255, 0.28); border-radius: 12px; padding: clamp(1.3rem, 3vw, 1.9rem); background: rgba(185, 140, 255, 0.05); }
.payterms__h { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.payterms ul { list-style: none; display: grid; gap: 0.8rem; }
.payterms li { color: var(--mute); font-size: 0.88rem; line-height: 1.6; padding-left: 1.1rem; position: relative; }
.payterms li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.payterms b { color: var(--white); font-weight: 500; }

/* ============================================================
   MARGIN WORKBENCH — private, ?margin
   ============================================================ */

.mkbench { margin-top: 2.5rem; border: 1px solid rgba(255, 180, 60, 0.4); border-radius: 12px; background: rgba(255, 180, 60, 0.04); padding: 1.2rem; }
.mkbench__bar { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.mkbench__t { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: #ffb43c; }
.mkbench__t em { font-style: normal; color: var(--dim); letter-spacing: 0.08em; }
.mkbench__stat { font-size: 0.76rem; color: var(--mute); margin-left: auto; }
.mkbench__stat b { color: var(--white); }
.mkbench__bar button {
  padding: 0.4rem 0.8rem; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(255, 180, 60, 0.5); background: rgba(255, 180, 60, 0.1);
  color: #ffd08a; font: 500 0.74rem var(--sans);
}
.mkbench__how { color: var(--mute); font-size: 0.8rem; line-height: 1.6; margin: 0.9rem 0 1rem; max-width: 62rem; }
.mkbench__scroll { overflow-x: auto; }

.mb { width: 100%; border-collapse: collapse; font-size: 0.8rem; min-width: 46rem; }
.mb th {
  text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--dim); font-weight: 400; white-space: nowrap;
}
.mb td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line-soft); color: var(--mute); vertical-align: middle; }
.mb td:first-child { color: var(--white); }
.mb td em { display: block; font-style: normal; font-size: 0.66rem; color: var(--dim); margin-top: 0.1rem; }
.mb td b { color: var(--white); }
.mb input {
  width: 6.5rem; padding: 0.35rem 0.5rem; border-radius: 6px;
  border: 1px solid var(--line); background: #0a0714; color: var(--white);
  font: 400 0.8rem var(--mono);
}
.mb__s { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.2rem 0.5rem; border-radius: 100px; white-space: nowrap; }
.mb__s--ok   { background: rgba(90, 220, 150, 0.14); color: #6ee7a8; }
.mb__s--thin { background: rgba(255, 180, 60, 0.16); color: #ffc466; }
.mb__s--loss { background: rgba(255, 90, 110, 0.16); color: #ff8095; }
.mb__s--unk  { background: rgba(255, 255, 255, 0.06); color: var(--dim); }
.mb__s--live { background: rgba(140, 190, 255, 0.14); color: #9cc6ff; }

@media (max-width: 1080px) {
  .coins { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .coin--xmr { grid-column: 1 / -1; }
  .paygrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mkorder { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .coins { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paygrid { grid-template-columns: 1fr; }
  .mkfields { grid-template-columns: 1fr; }
  .mkpay { grid-template-columns: 1fr; }
}

/* Real products get a shorter, calmer photo well than the placeholder
   slots. The 1:1 shimmer box reads as "loading" — correct for a listing
   that genuinely does not exist yet, wrong for a product that does and
   simply has no photograph. Squatter box, bigger glyph, no shimmer. */
.mkcard--prod .mkcard__img { aspect-ratio: 5 / 2; background: rgba(185, 140, 255, 0.05); }
.mkcard--prod .mkcard__img::after { display: none; }
.mkcard--prod .mkcard__img svg { width: 2.2rem; height: 2.2rem; stroke: rgba(185, 140, 255, 0.45); }

/* ---------- condition, basis and price-pending states ----------
   A pre-owned unit says so on the card, in the basket line and on the
   order that lands in the inbox. Selling a used console next to a sealed
   one and letting the buyer work out which is which is the kind of thing
   that produces a chargeback rather than a customer. */

/* Amber when this flagged the exception; neutral now that every unit is
   refurbished. A warning colour repeated on all thirty cards stops reading
   as information and starts reading as decoration. */
.mkcond {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
  background: rgba(10, 7, 20, 0.75);
  border: 1px solid rgba(185, 140, 255, 0.35);
  color: #cbb0ff;
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.mkcart__cond {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #cbb0ff;
  margin: -0.6rem 0 0.8rem;
}

.mkline__c {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffc466;
}

/* Basis column in the workbench: "list" is a manufacturer price anyone can
   check, "market" is a judgement call about the used market. Different
   kinds of number, so they don't get the same colour. */
.mb__b {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
}
.mb__b--list   { background: rgba(185, 140, 255, 0.14); color: #cbb0ff; }
.mb__b--market { background: rgba(255, 180, 60, 0.14); color: #ffc466; }

/* A row with no reference price at all can't be judged on margin yet, so it
   gets pulled forward visually rather than sitting quietly at "no source". */
.mb--needsref td { background: rgba(255, 180, 60, 0.05); }
.mb--needsref input[data-ref] { border-color: rgba(255, 180, 60, 0.5); }
