/* Set Builder and Super Collector: starting a set or a collection (chase/start.js and its start-*.js parts), and changing
   one's own checklist later (chase/edit-list.js). Site tokens only, both stocks, no new font. Every press target is at
   least 48 px; nothing moves under prefers-reduced-motion. Anything that stands for a card has square corners; radius only
   on controls, as the site's own. Prefixes: .ch-st- (the start), .ch-el- (editing a checklist).

   .ch-st-step   one question: .ch-st-n (the step and its line), .ch-st-so (the answer so far), .ch-st-h (the question,
                 takes the focus), .ch-st-p (one plain line), .ch-st-body, .ch-st-foot (Back, the reason the main button
                 waits, the main button; pinned to the foot of the screen)
   .ch-st-kinds  the first question's six choices (.ch-st-kind buttons, aria-pressed), and the three ways in of a checklist
   .ch-st-list   a list of native radios or checkboxes, one a row (.ch-st-opt), the chosen one drawn by :has(:checked)
   .ch-st-results  search results (.ch-st-result buttons), each with its category as a chip
   .ch-st-rainbow  a card's parallels, a band each, shorter as the print run gets smaller
   .ch-st-table  the preview of one's own checklist; a card a row on a computer, a small block a card on a phone */

.ch-st { padding-bottom: 0; }
.ch-st-slot { min-height: 50vh; }
.ch-st-slot > .ch-note { margin-top: 36px; }

/* ---------- one question ---------- */
.ch-st-step { padding-bottom: 8px; }
.ch-st-step > :not(.ch-st-foot) { max-width: 50rem; }
.ch-st-step.is-in { animation: ch-st-in .24s var(--ease-out) both; }
@keyframes ch-st-in { from { opacity: 0; transform: translateY(10px); } }
.ch-st-n { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; font: 800 .72rem/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.ch-st-n__line { display: inline-flex; gap: 4px; }
.ch-st-n__line i { display: block; width: 22px; height: 3px; border-radius: 2px; background: var(--line-2); }
.ch-st-n__line i.is-done { background: var(--ink-3); }
.ch-st-n__line i.is-now { background: var(--teal); }
.ch-st-so { margin: 10px 0 0; color: var(--ink-2); font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.ch-st-h { font: 700 clamp(1.9rem, calc(1.2rem + 2vw), 2.6rem)/1.12 var(--display); letter-spacing: -.01em; margin: 10px 0 0; text-wrap: balance; outline: none; overflow-wrap: anywhere; }
.ch-st-h:focus { outline: none; }
.ch-st-p { margin: 10px 0 0; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.5; max-width: 36em; overflow-wrap: anywhere; }
.ch-st-body { margin-top: 24px; }
.ch-st-h2 { font: 700 1.25rem/1.25 var(--display); margin: 0 0 12px; }
.ch-st-fine { margin: 10px 0 0; color: var(--ink-2); font-size: .98rem; line-height: 1.45; overflow-wrap: anywhere; }
.ch-st-note { min-height: 0; }
.ch-st-note:empty { display: none; }

.ch-st-foot {
  position: sticky; bottom: 0; z-index: 11; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 32px calc(-1 * var(--ch-gut)) 0; padding: 12px var(--ch-gut); padding-bottom: max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-2); background: var(--stock-2);
}
.ch-st-foot .btn { min-height: 52px; }
.ch-st-wait { flex: 1 1 0; min-width: 0; margin: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.3; text-align: right; }
.ch-st-next { min-width: 9rem; margin-left: auto; }
.ch-st-next.is-waiting, .ch .btn.is-busy { opacity: .5; cursor: default; }
@media (max-width: 760px) {
  .ch-st-foot { flex-wrap: wrap; row-gap: 8px; }
  .ch-st-wait { order: -1; flex: 1 0 100%; text-align: left; font-size: .9rem; }
  .ch-st-wait:empty { display: none; }
  .ch-st-foot .btn { flex: 1 1 0; min-width: 0; }
}

/* ---------- the first question, and the ways in ---------- */
.ch-st-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.ch-st-kind {
  position: relative; display: grid; align-content: start; gap: 6px; width: 100%; height: 100%; min-height: 112px; padding: 18px 52px 18px 20px; text-align: left;
  border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--stock); color: var(--ink); cursor: pointer; font: inherit;
  transition: border-color .15s, transform .15s var(--ease-out);
}
.ch-st-kind::after { content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: translateY(-50%) rotate(45deg); opacity: .6; }
.ch-st-kind:hover { border-color: var(--ink-3); }
.ch-st-kind:hover::after { opacity: 1; }
.ch-st-kind:active { transform: translateY(1px); }
.ch-st-kind:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ch-st-kind[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--teal); }
.ch-st-kind__name { font: 700 1.3rem/1.2 var(--display); }
.ch-st-kind__line { color: var(--ink-2); line-height: 1.45; }
@media (max-width: 640px) { .ch-st-kinds { grid-template-columns: minmax(0, 1fr); } .ch-st-kind { min-height: 0; } }

/* ---------- a list of choices ---------- */
.ch-st-choices, .ch-st-checks { margin: 0; padding: 0; border: 0; min-width: 0; }
.ch-st-legend { padding: 0; margin: 0 0 12px; color: var(--ink-2); line-height: 1.45; }
.ch-st-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ch-st-opt { min-width: 0; }
.ch-st-opt[hidden] { display: none; }
.ch-st-opt__l {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 58px; padding: 10px 16px;
  border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--stock); cursor: pointer;
}
.ch-st-opt__l:hover { border-color: var(--ink-3); }
.ch-st-opt__l:has(input:checked) { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--teal); background: var(--stock-2); }
.ch-st-opt__l:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.ch-st-opt__l input { width: 22px; height: 22px; margin: 0; accent-color: var(--teal); }
.ch-st-opt__t { display: grid; gap: 2px; min-width: 0; }
.ch-st-opt__name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.ch-st-opt__line { color: var(--ink-2); font-size: .95rem; line-height: 1.35; }
.ch-st-opt__side { color: var(--ink-2); font-variant-numeric: tabular-nums; text-wrap: nowrap; font-size: .95rem; }
.ch-st-teams { max-height: min(60vh, 560px); overflow: auto; padding: 4px; overscroll-behavior: contain; }
@media (max-width: 420px) { .ch-st-opt__l { grid-template-columns: auto minmax(0, 1fr); } .ch-st-opt__side { grid-column: 2; } }

/* ---------- searching ---------- */
.ch-st-find > * + * { margin-top: 14px; }
.ch-st-search__row, .ch-st-browse__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.ch-st-search__row .ch-field input { width: 100%; }
.ch-st-search__row > .btn { margin-top: 28px; min-height: 52px; }
.ch-st-search .ch-hint { margin-top: 6px; }
.ch-st-browse__row { grid-template-columns: minmax(0, 1.4fr) minmax(0, .7fr) auto; align-items: end; }
.ch-st-browse__row select, .ch-st-browse__row input { width: 100%; }
.ch-st-browse__row .ch-field + .ch-field { margin-top: 0; }
.ch-st-browse__row > .btn { min-height: 52px; }
@media (max-width: 640px) {
  .ch-st-search__row { grid-template-columns: minmax(0, 1fr); }
  .ch-st-search__row > .btn { margin-top: 0; }
  .ch-st-browse__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ch-st-browse__row > .ch-field:first-child { grid-column: 1 / -1; }
}
.ch-st-or { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line-2); }
.ch-st-out:empty { display: none; }
.ch-st-results { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ch-st-result {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 10px 16px; text-align: left;
  border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--stock); color: var(--ink); font: inherit; cursor: pointer;
}
.ch-st-result:hover { border-color: var(--ink-3); }
.ch-st-result:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ch-st-result[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--teal); }
.ch-st-result__name { font: 700 1.1rem/1.25 var(--display); overflow-wrap: anywhere; }
.ch-st-result__t { display: grid; gap: 2px; min-width: 0; }
.ch-st-result__line { color: var(--ink-2); font-size: .95rem; overflow-wrap: anywhere; }
.ch-st-none { padding: 20px; border: 1.5px dashed var(--line-2); border-radius: 14px; }
.ch-st-none__p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.ch-st-none .ch-acts { margin-top: 14px; }
.ch-st-trouble { padding: 18px 20px; border: 1.5px dashed var(--ink-3); border-radius: 14px; background: var(--stock-2); }
.ch-st-trouble__p { margin: 0; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.ch-st-trouble .ch-acts { margin-top: 14px; }

/* ---------- a product's sets ---------- */
.ch-st-sets { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-2); }
.ch-st-setrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.ch-st-setrow__name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.ch-st-setrow__n { color: var(--ink-2); font-variant-numeric: tabular-nums; text-wrap: nowrap; }

/* ---------- years ---------- */
.ch-st-years > * + * { margin-top: 16px; }
.ch-st-years__row { display: grid; grid-template-columns: repeat(2, minmax(0, 9rem)); gap: 14px; }
.ch-st-years__row .ch-field + .ch-field { margin-top: 0; }
.ch-st-years__row input { width: 100%; }
.ch-st-years__row .ch-field[hidden] { display: none; }

/* ---------- a rainbow: one band a card, shorter as the print run gets smaller (square: they stand for cards) ---------- */
.ch-st-rainbow { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ch-st-band {
  --ch-st-run: 1; position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 8px 14px;
  border: 1.5px solid var(--line-2); border-radius: 0; background: var(--stock); overflow: hidden; isolation: isolate;
}
.ch-st-band::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--ch-st-run) * 100%); background: var(--stock-3); z-index: -1; transform-origin: left; animation: ch-st-grow .6s var(--ease-out) both; }
.ch-st-band--base::before { background: var(--stock-2); }
.ch-st-band.is-n { border-left: 4px solid var(--teal); }
.ch-st-band.is-one { border: 2px solid var(--ink); }
.ch-st-band.is-one .ch-st-band__of { padding: 1px 8px; border: 1.5px solid var(--teal); transform: rotate(-3deg); color: var(--ink); font-weight: 800; }
.ch-st-band__name { font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.ch-st-band__of { color: var(--ink-2); font-size: .92rem; font-variant-numeric: tabular-nums; text-wrap: nowrap; }
@keyframes ch-st-grow { from { transform: scaleX(0); } }

/* ---------- the name ---------- */
.ch-st-name .ch-field input { width: 100%; }
.ch-st-name .ch-field select { width: 100%; max-width: 28rem; }
.ch-st-name .ch-field + .ch-field { margin-top: 22px; }
.ch-st-what { margin: 0 0 18px; padding: 14px 16px; border-left: 4px solid var(--teal); background: var(--stock-2); font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }

/* ---------- one's own checklist: the ways in ---------- */
.ch-st-pdf { margin-top: 18px; border-top: 1px solid var(--line); }
.ch-st-pdf > summary { display: flex; align-items: center; min-height: 48px; cursor: pointer; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.ch-st-pdf > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ch-st-pdf > p { margin: 4px 0 8px; color: var(--ink-2); line-height: 1.5; max-width: 40em; }
.ch-st-pastebox > * + * { margin-top: 12px; }
.ch .ch-st-paste { width: 100%; min-height: 18rem; font: 500 1rem/1.5 var(--sans); font-variant-numeric: tabular-nums; resize: vertical; }
.ch-st-file > * + * { margin-top: 14px; }
.ch-st-file__pick { margin-top: 0; }
.ch-st-file__in { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip-path: inset(50%); }
.ch-st-file__btn { cursor: pointer; }
.ch-st-file__pick:has(.ch-st-file__in:focus-visible) .ch-st-file__btn { outline: 3px solid var(--focus); outline-offset: 3px; }
.ch-st-uses { margin: 0; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; color: var(--ink-2); line-height: 1.45; }
.ch-st-photos { margin: 0; padding: 0 0 0 1.2em; color: var(--ink-2); overflow-wrap: anywhere; }
.ch-st-photos:empty { display: none; }
.ch-st-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.ch-st-cols .ch-field + .ch-field { margin-top: 0; }
.ch-st-cols select { width: 100%; }
@media (max-width: 560px) { .ch-st-cols { grid-template-columns: minmax(0, 1fr); } }

/* ---------- the preview ---------- */
.ch-st-check > * + * { margin-top: 16px; }
.ch-st-count { margin-top: 0; }
.ch-st-twice:empty { display: none; }
.ch-st-clean:empty { display: none; }
.ch-st-offer, .ch-st-cleaned { padding: 18px 20px; border: 1.5px solid var(--ink-3); border-radius: 14px; background: var(--stock-2); }
.ch-st-offer .ch-acts { margin-top: 14px; }
.ch-st-cleaned { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; border-color: var(--teal); }
.ch-st-cleaned__p { margin: 0; font-weight: 600; line-height: 1.45; }
.ch-st-tablebox { border: 1.5px solid var(--line-2); border-radius: 12px; }
.ch-st-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ch-st-table th { padding: 10px 8px; text-align: left; font: 800 .66rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line-2); }
.ch-st-table th:nth-child(1) { width: 7.5rem; }
.ch-st-table th:nth-child(3) { width: 22%; }
.ch-st-table th:nth-child(4) { width: 18%; }
.ch-st-table th:nth-child(5) { width: 112px; }
.ch-st-table tr + tr .ch-st-td { border-top: 1px solid var(--line); }
.ch-st-td { padding: 6px 8px; vertical-align: top; }
.ch .ch-st-cell { width: 100%; min-height: 48px; padding: 8px 10px; font-size: 1rem; border-color: transparent; background: transparent; }
.ch .ch-st-cell:hover { border-color: var(--line-2); }
.ch .ch-st-cell:focus { border-color: var(--ink); background: var(--stock); }
.ch-st-cell--n { font-variant-numeric: tabular-nums; font-weight: 700; }
.ch-st-flag { display: block; margin: 2px 0 0 10px; font: 800 .62rem/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.ch-st-flag[hidden] { display: none; }
.ch-st-flag::before { content: "= "; }
.ch-st-rm { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 48px; min-height: 48px; padding: 0 10px; border: 1.5px solid transparent; border-radius: 10px; background: none; color: var(--ink-2); font: 700 .85rem/1 var(--sans); cursor: pointer; }
.ch-st-rm span[aria-hidden] { font-size: 1.3rem; line-height: 1; }
.ch-st-rm:hover { border-color: var(--line-2); color: var(--ink); }
.ch-st-rm:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.ch-st-more[hidden] { display: none; }
.ch-st-lines { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ch-st-lines li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ch-st-lines__t { min-width: 0; overflow-wrap: anywhere; color: var(--ink-2); }
.ch-st-add { padding-top: 22px; border-top: 1px solid var(--line-2); }
.ch-st-add__row { display: grid; grid-template-columns: minmax(0, 7rem) minmax(0, 1.6fr) minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.ch-st-add__row .ch-field + .ch-field { margin-top: 0; }
.ch-st-add__row input { width: 100%; }
.ch-st-add__row > .btn { min-height: 52px; }
@media (max-width: 760px) {
  .ch-st-add__row { grid-template-columns: minmax(0, 6rem) minmax(0, 1fr); }
  .ch-st-add__row > .ch-field:nth-child(3), .ch-st-add__row > .btn { grid-column: 1 / -1; }
  /* a phone: each card is a small block, its labels said beside each box */
  .ch-st-tablebox { border: 0; }
  .ch-st-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ch-st-table, .ch-st-table tbody { display: block; }
  .ch-st-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: 12px; }
  .ch-st-table tr + tr { margin-top: 8px; }
  .ch-st-table tr + tr .ch-st-td { border-top: 0; }
  .ch-st-td { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); align-items: center; padding: 0; grid-column: 1 / -1; }
  .ch-st-td::before { content: attr(data-l); font: 800 .62rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
  .ch-st-td--n { grid-column: 1; grid-row: 1; }
  .ch-st-td--rm { grid-column: 2; grid-row: 1; display: block; }
  .ch-st-td--rm::before { content: none; }
  .ch-st-flag { grid-column: 2; margin-left: 10px; }
  .ch-st-rm__t { display: none; }
}

/* =====================================================================================================================
   Changing one's own checklist (edit-list.js)
   ===================================================================================================================== */
.ch-el { max-width: 54rem; }
.ch-el-count { margin: 8px 0 0; color: var(--ink-2); }
.ch-el-find { margin-top: 18px; max-width: 26rem; }
.ch-el-find input { width: 100%; }
.ch-el-list { margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line-2); }
.ch-el-row { display: grid; grid-template-columns: minmax(0, 7rem) minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ch-el-row[hidden] { display: none; }
.ch-el-has { grid-column: 1 / -1; margin: 0 0 4px 10px; font: 800 .62rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.ch-el-has::before { content: "\2713  "; color: var(--ink); }
.ch-el-more { margin-top: 12px; }
.ch-el-more[hidden] { display: none; }
.ch-el-add { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-2); }
.ch-el-paste { margin-top: 18px; }
.ch-el-paste textarea { width: 100%; min-height: 9rem; }
.ch-el-foot { position: sticky; bottom: 0; z-index: 11; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 14px; margin: 28px calc(-1 * var(--ch-gut)) 0; padding: 12px var(--ch-gut); padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); background: var(--stock-2); }
.ch-sheet .ch-el-foot { margin: 22px -22px -22px; padding: 12px 22px; }
.ch-el-foot .ch-note { flex: 1 1 12rem; margin: 0; }
.ch-el-foot .btn { min-height: 52px; }
@media (max-width: 760px) {
  .ch-sheet .ch-el-foot { margin: 22px -18px 0; padding: 12px 18px max(12px, env(safe-area-inset-bottom)); }
  .ch-el-row { grid-template-columns: minmax(0, 5.5rem) minmax(0, 1fr) auto; }
  .ch-el-row .ch-st-rm__t { display: none; }
}

/* ---------- nothing moves when asked ---------- */
@media (prefers-reduced-motion: reduce) {
  .ch-st-step.is-in { animation: none; }
  .ch-st-band::before { animation: none; }
  .ch-st-kind { transition: none; }
  .ch-st-kind:active { transform: none; }
}
