/* basket.platenext.com
 *
 * One stylesheet, no framework, no build. Light and dark both come out of the
 * custom properties at the top - the page is read in a shop aisle as often as
 * at a desk, so the dark side is not an afterthought. */

:root {
  --bg: #f7f6f2; --card: #ffffff; --ink: #1d1d1b; --muted: #6b6b66;
  --line: #e4e2db; --accent: #b8621b; --pick: #2e6b3f; --warn: #a33a2a;
  --shade: rgba(0,0,0,.04);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17171a; --card: #222226; --ink: #ececea; --muted: #a0a09a;
    --line: #33333a; --accent: #e08a45; --pick: #6fbf85; --warn: #e8836f;
    --shade: rgba(255,255,255,.05);
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.live { position: absolute; left: -9999px; }
.muted { color: var(--muted); }

/* --- The bar ---------------------------------------------------------- */

.bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg); z-index: 5;
}
.bar__mark {
  width: 22px; height: 22px; border-radius: 6px; background: var(--accent);
}
.bar__name { font-weight: 600; letter-spacing: -0.01em; }
.bar__spacer { flex: 1; }
.bar__who {
  background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 5px 14px; font: inherit; font-size: 14px;
  cursor: pointer;
}
.bar__who:hover { color: var(--ink); border-color: var(--muted); }

/* --- Shared ----------------------------------------------------------- */

.page { max-width: 1000px; margin: 0 auto; padding: 24px 20px 64px; }
.page__head { margin-bottom: 20px; }
.page__title { font-size: 26px; margin: 4px 0; letter-spacing: -0.01em; }
.page__lede { margin: 0; color: var(--muted); }
.back { font-size: 14px; text-decoration: none; }
.back:hover { text-decoration: underline; }
.loading { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty { color: var(--muted); padding: 20px 0; }

.trouble {
  border-left: 3px solid var(--warn); background: var(--card);
  padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 0 0 16px;
}

.button {
  font: inherit; font-size: 15px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 8px; padding: 9px 16px;
}
.button:hover { border-color: var(--muted); }
.button:disabled { opacity: .5; cursor: default; }
.button--go { background: var(--accent); border-color: var(--accent); color: #fff; }
.button--go:hover { filter: brightness(1.08); }
.button--have { border-color: var(--pick); color: var(--pick); }
.button--quiet { background: none; border-color: transparent; color: var(--muted); font-size: 14px; padding: 6px 10px; }
.button--quiet:hover { color: var(--ink); }
.button--danger:hover { color: var(--warn); border-color: var(--warn); }

.field { display: block; margin-bottom: 14px; border: 0; padding: 0; }
.field__label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 5px; }
.field__input {
  font: inherit; width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.field__input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field--short .field__input { max-width: 120px; }

/* --- Signed out ------------------------------------------------------- */

.gate { max-width: 420px; margin: 12vh auto; padding: 0 24px; text-align: center; }
.gate__title { font-size: 32px; margin: 0 0 6px; letter-spacing: -0.02em; }
.gate__lede { color: var(--muted); margin: 0 0 28px; }
.button--go[href] { display: inline-block; text-decoration: none; }

/* --- The list of research --------------------------------------------- */

.packs { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 12px; }
.pack-row {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
}
.pack-row__open {
  display: grid; gap: 6px; padding: 18px 20px; text-decoration: none; color: inherit;
  border-radius: 10px;
}
.pack-row__open:hover { background: var(--shade); }
.pack-row__name { font-weight: 600; font-size: 18px; }
.pack-row__blurb { color: var(--muted); font-size: 15px; line-height: 1.45; }
.pack-row__meta {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  color: var(--muted); font-size: 14px; margin-top: 2px;
}
.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px;
  background: var(--accent); color: #fff; font-weight: 600;
}
.pill--quiet { background: var(--shade); color: var(--muted); font-weight: 400; }

/* --- Tabs ------------------------------------------------------------- */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tab {
  font: inherit; cursor: pointer; background: none; border: 0;
  padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab--on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.tab__count {
  display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 6px;
  border-radius: 999px; background: var(--shade); color: var(--muted);
  font-size: 12px; font-weight: 600;
}
.tab--on .tab__count { background: var(--accent); color: #fff; }

.cart-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.page__total { margin: 0; color: var(--muted); }

/* --- What is in the cart ---------------------------------------------- */

.items { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.item {
  display: grid; gap: 12px; align-items: center;
  grid-template-columns: auto 56px 1fr auto auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px;
}
.item--done { opacity: .55; }
.item--done .item__name { text-decoration: line-through; }
.item__tick input { width: 20px; height: 20px; }
.item__img { width: 56px; height: 56px; display: grid; place-items: center; background: #fff; border-radius: 6px; }
.item__img--none { background: var(--shade); }
.item__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.item__name { font-weight: 600; line-height: 1.3; }
.item__name a { color: inherit; text-decoration: none; }
.item__name a:hover { text-decoration: underline; }
.item__meta { color: var(--muted); font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; }
.item__note { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.item__qty { display: flex; align-items: center; gap: 6px; }
.step {
  font: inherit; cursor: pointer; width: 30px; height: 30px; line-height: 1;
  border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
.step:disabled { opacity: .4; cursor: default; }
.step__count { min-width: 18px; text-align: center; }

/* Adding something the research never covered. The link field is on its own
   line and full width because a pasted Amazon URL is enormous, and a box it
   scrolls sideways inside is one nobody can check they pasted correctly. */
.item__trail { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

/* What somebody took out. Quiet, folded away once there is a pile of it, and
   never competing with the live list above it — it is a record, not a task. */
.gone { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 12px; }
.gone__head { cursor: pointer; color: var(--muted); font-size: 14px; }
.gone__list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.gone__row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 12px; border-radius: 8px; background: var(--shade);
}
.gone__body { display: grid; gap: 2px; min-width: 0; }
.gone__name { text-decoration: line-through; color: var(--muted); }
.gone__who { font-size: 12px; color: var(--muted); }

.add {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 18px 20px; margin-bottom: 8px;
}
.add .field:last-of-type { margin-bottom: 12px; }
.add__pair { display: flex; gap: 12px; flex-wrap: wrap; }
.add__pair .field { flex: 1; min-width: 180px; }
.add__pair .field--short { flex: 0 0 120px; min-width: 100px; }

/* --- The research ----------------------------------------------------- */

.premise { color: var(--muted); margin: 0 0 22px; }
.guide { margin: 0 0 34px; }
.guide__title { font-size: 20px; margin: 0 0 4px; }
.guide__lede { color: var(--muted); margin: 0 0 14px; }

.prose {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 16px 20px;
}
.prose h3 { font-size: 16px; margin: 18px 0 6px; }
.prose h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 10px; }
.prose ul { margin: 0 0 10px; padding-left: 20px; }
.prose code { background: var(--shade); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.callout {
  border-left: 3px solid var(--warn); background: var(--bg);
  padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 12px 0;
}

/* A trade-off table is the densest thing on the page and the first thing to
 * break on a phone, so it scrolls sideways inside its own box rather than
 * squeezing the columns until nothing reads. */
.scroller { overflow-x: auto; margin: 0 0 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 520px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column;
}
.card--pick { border-color: var(--pick); box-shadow: 0 0 0 1px var(--pick) inset; }
/* A definite height rather than `aspect-ratio`, and that is the fix rather than
   a preference. The card is a flex column, so an aspect-ratio box has no
   definite height for the image's `max-height: 100%` to resolve against — the
   percentage is ignored, the image falls back to its intrinsic size, and one
   tall portrait product photo blew its box out to 306x704 in a row of 306x306
   ones, dragging the whole row with it. A fixed height resolves the percentage
   and every card in a row starts at the same place. */
.card__img {
  background: #fff; height: 260px; display: grid; place-items: center;
  padding: 16px; flex: 0 0 auto; overflow: hidden;
}
.card__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.card__tag {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px;
}
.card__tag--pick { color: #fff; background: var(--pick); }
.card__tag--badge { color: var(--ink); background: var(--shade); }
.card__tag--prime { color: #fff; background: #0a7bc4; }

.card__price { font-weight: 700; font-size: 17px; }
.card__was { text-decoration: line-through; color: var(--muted); }

/* Delivery is the line the ordering is based on, so the fast case is the one
   that gets the colour. Everything else stays quiet. */
.card__ship { font-size: 14px; color: var(--muted); }
.card__ship--fast { color: #1a7f37; font-weight: 600; }
.card__coupon { font-size: 13px; font-weight: 600; color: #1a7f37; }
.card__stock { font-size: 13px; color: #b3261e; }
.card__checked {
  margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted); line-height: 1.4;
}
.guide__order { font-size: 13px; color: var(--muted); margin: -8px 0 14px; }
.card__name { font-weight: 600; line-height: 1.3; }
.card__meta { color: var(--muted); font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; }
.card__intro { font-size: 15px; margin: 0; }
.card__specs { font-size: 13px; color: var(--muted); margin: 0; }
.card__foot { margin-top: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* A card whose product is in the cart is marked, so a glance down the grid
   shows what has been decided without reading every button. */
.card--in { border-color: var(--accent); }
.card__have { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.step-group {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--accent); border-radius: 10px; padding: 3px 6px;
}
.card__link { font-size: 14px; text-decoration: none; font-weight: 600; }
.card__link:hover { text-decoration: underline; }

/* --- Phones ----------------------------------------------------------- */

@media (max-width: 560px) {
  .page { padding: 18px 14px 56px; }
  .item {
    grid-template-columns: auto 48px 1fr;
    grid-template-areas: "tick img body" ".  qty  remove";
    row-gap: 8px;
  }
  .item__tick { grid-area: tick; }
  .item__img { grid-area: img; width: 48px; height: 48px; }
  .item__body { grid-area: body; }
  .item__qty { grid-area: qty; }
  .item > .button--danger { grid-area: remove; justify-self: start; }
}

/* --- How the candidates were ordered ---------------------------------- */

.ordering {
  margin-top: 8px; padding: 16px 20px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card); color: var(--muted); font-size: 14px;
}
.ordering__title { font-size: 15px; margin: 0 0 8px; color: var(--ink); }
.ordering p { margin: 0 0 8px; line-height: 1.55; }
.ordering p:last-child { margin-bottom: 0; }

/* --- Connected agents -------------------------------------------------- */

/* On the front page, under the research, and deliberately not behind a menu:
   this is a list of things that can change your shopping while you are not
   here, so it should be tripped over rather than gone looking for. */
.agents { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 22px; }
.agents__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.agents__title { font-size: 19px; margin: 0; }
.agents__lede { color: var(--muted); font-size: 14px; margin: 6px 0 16px; max-width: 62ch; line-height: 1.5; }
.agents__none { color: var(--muted); font-size: 14px; margin: 0; }
.agents__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.agent {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
}
.agent__body { display: grid; gap: 3px; min-width: 0; }
.agent__name { font-weight: 600; }
.agent__meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.agent__idle { color: var(--pick); }

.connect {
  border: 1px solid var(--accent); border-radius: 10px; padding: 18px 20px;
  margin-bottom: 18px; background: var(--card);
}
.connect__step { margin: 0 0 12px; }
.connect__line { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
/* The line has to be selectable by hand as well as copyable by button — the
   clipboard can be refused, and then this is the only way to get it out. */
.connect__prompt {
  flex: 1; min-width: 260px; user-select: all; word-break: break-all;
  background: var(--shade); border-radius: 8px; padding: 12px 14px;
  font-size: 13px; line-height: 1.5;
}
.connect__small { color: var(--muted); font-size: 13px; margin: 12px 0 0; line-height: 1.5; }

@media (max-width: 560px) {
  .agent { flex-wrap: wrap; }
}
