/* Set Builder and Super Collector (/tools/set-builder/, /tools/super-collector/): the shell, the shared pieces of
   chase/ui.js, sheets, toasts, My sets and collections, and the page before the app. Site tokens only (--stock, --ink,
   --line, --teal ...), 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 (a pocket, a tile, a thumbnail) has square corners; radius only
   on controls, as the site's own. The views keep their own rules in their own sheets (chase-start, -board, -add,
   -insights, -public) under their own prefixes, and use these pieces as they are. Everything is scoped under .ch (the
   page root #ch, and every sheet, which app.js gives the class too).

   THE SHARED PIECES (class names; how to use each)
   .ch-page      A view's frame: <div class="ch-page"> holding a .ch-bar and the view. Centred, the site's gutter.
                 .ch-page--wide for the full 1320 px.
   .ch-bar       A view's top bar, made by app.js bar(ctx, title, ...actions): Back, a small title, actions on the
                 right (.btn.btn--small or .ch-link). Sticky. .ch-bar--home hides Back.
   .ch-h         A view's heading (Corben; tabindex="-1", it takes the focus). .ch-lede the plain line under it.
                 .ch-h2, .ch-h3 smaller headings. .ch-label the small spaced label.
   .ch-acts      A row of buttons. .ch-acts--end right-aligned; .ch-acts--full full width on a phone.
   .ch-link      A text button that looks like the site's text links (spaced, underlined), 48 px tall.
   .ch-note      A status line under an action ("Saving…", "Saved."). role="status" on it.
   .ch-hint      The small line under a field.
   .ch-danger    A button that removes something: a dashed edge (the warning is said in words, never by a color alone).
   .ch-mono      Numbers that line up (a needs list): tabular figures.
   .ch-offline   The no-signal line app.js puts above the app.
   ui.ring       .ch-ring (.ch-ring--sm 56 px, --md 96 px, --lg 150 px; .is-done). Its parts: .ch-ring__track,
                 .ch-ring__arc, .ch-ring__in, .ch-ring__n.
   ui.bar        .ch-meter (a progress bar; .is-done), .ch-meter__fill.
   ui.seg        fieldset.ch-seg of label.ch-seg__o (input + span). Wraps onto a second row when there isn't room.
   ui.chip       .ch-chip, .ch-chip--on (the teal dot).
   ui.stepper    .ch-num, .ch-num__b, its <output>.
   ui.field      .ch-field (label, input/select/textarea, .ch-hint). .ch-field--row puts the label beside a short input.
   ui.empty      .ch-empty (.ch-empty--page fills a view); ui.pocketArt() .ch-pockets (i, i.is-have).
   ui.tabs       .ch-tabs (role tablist), .ch-tab (role tab), ui.panel .ch-panel.
   ui.tag        .ch-tag[data-tag="RC|AU|MEM|SP|VAR|FBC|SN|ONE"].
   .ch-stats     A row of numbers: <dl class="ch-stats"><div class="ch-stat"><dt>Have</dt><dd>412</dd></div>...</dl>.
   .ch-pk        A pocket (a card's place): .ch-pk--have (solid, its picture), .ch-pk--need (outlined, empty),
                 .ch-pk--coming (striped). Square corners. Inside: an <img> and a <b> number.
   .ch-p9        A 9-pocket page: .ch-p9__h (its name, .ch-p9__stamp "Full page"), .ch-p9__grid of .ch-pk. .is-full.
   .ch-sheet     ctx.sheet() makes it: a panel from the bottom on a phone, a centred dialog on a computer.
                 .ch-sheet--wide; .ch-ask / .ch-ask__p inside ctx.confirm().
   .ch-toast     ctx.toast() makes it, in #ch-toasts. */

/* ---------- who sees what (app.js sets data-who: wait, out, in, try; data-trouble when the account couldn't be read) ----------
   try: signed out, looking through a set they started (the start and the board, kept for the visit) */
.ch-app, .ch-wait, .ch-cta__trouble { display: none; }
.ch[data-who="in"] .ch-app, .ch[data-who="try"] .ch-app { display: block; }
.ch[data-who="in"] .ch-intro, .ch[data-who="try"] .ch-intro { display: none; }
[data-acct="in"] .ch[data-who="wait"] .ch-intro { display: none; }
[data-acct="in"] .ch[data-who="wait"] .ch-wait { display: block; }
.ch[data-trouble] .ch-cta__trouble { display: block; }
.ch-wait { padding: 18vh var(--gut); text-align: center; color: var(--ink-3); }
.ch-offline { margin: 0; padding: 12px var(--gut); background: var(--stock-3); border-bottom: 1px solid var(--line-2); color: var(--ink); font-weight: 600; line-height: 1.4; text-align: center; }

/* ---------- shared sizes and small pieces ---------- */
.ch { --ch-gut: var(--gut); --ch-r: 12px; --ch-pocket: var(--stock-3); }
.ch .btn { min-height: 48px; }
.ch .btn--small { min-height: 48px; }
.ch-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 22px; }
.ch-acts--end { justify-content: flex-end; }
@media (max-width: 760px) { .ch-acts--full > .btn { flex: 1 1 auto; } }
.ch-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; min-width: 48px; padding: 0 2px; border: 0; background: none; color: var(--ink); font: 800 .74rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; cursor: pointer; }
.ch-link:hover { text-decoration-thickness: 2.5px; }
.ch-note { margin: 10px 0 0; min-height: 1.4em; font-weight: 600; color: var(--ink-2); }
.ch-hint { margin: 8px 0 0; color: var(--ink-2); font-size: 1rem; line-height: 1.45; }
.ch-label { font: 800 .72rem/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.ch-danger { background: var(--stock); color: var(--ink); border-style: dashed; box-shadow: 4px 4px 0 var(--btn-shade-2); }
.ch-mono { font-variant-numeric: tabular-nums; }

/* ---------- a view ---------- */
.ch-app { min-height: 70vh; }
.ch-view { display: block; }
.ch-page { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--ch-gut) 64px; }
.ch-page--wide { max-width: 1320px; }
.ch-bar {
  position: sticky; top: 0; z-index: 12; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  margin: 0 calc(-1 * var(--ch-gut)); padding: 6px var(--ch-gut); background: var(--stock); border-bottom: 1px solid var(--line);
}
.ch-bar__back { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; min-width: 48px; padding: 0 12px 0 4px; border: 0; background: none; color: var(--ink); font: 800 .72rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.ch-bar__arrow { width: 10px; height: 10px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-left: 6px; }
.ch-bar__back:hover .ch-bar__arrow { transform: translateX(-2px) rotate(45deg); }
.ch-bar__t { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; text-wrap: nowrap; font: 800 .72rem/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.ch-bar__acts { display: flex; align-items: center; gap: 10px; }
.ch-bar--home { grid-template-columns: minmax(0, 1fr) auto; min-height: 61px; }
.ch-bar--home .ch-bar__back { display: none; }
.ch-h { font: 700 clamp(1.9rem, calc(1.2rem + 2vw), 2.7rem)/1.1 var(--display); letter-spacing: -.01em; margin: 26px 0 0; text-wrap: balance; outline: none; overflow-wrap: anywhere; }
.ch-h:focus { outline: none; }
.ch-lede { margin: 10px 0 0; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.5; max-width: 38em; }
.ch-h2 { font: 700 1.5rem/1.2 var(--display); margin: 36px 0 0; outline: none; text-wrap: balance; }
.ch-h3 { font: 700 1.15rem/1.25 var(--display); margin: 0; }
.is-in { animation: ch-in .22s var(--ease-out) both; }
@keyframes ch-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- ui.ring ---------- */
.ch-ring { position: relative; flex: none; display: inline-grid; place-items: center; width: 96px; aspect-ratio: 1; }
.ch-ring--sm { width: 56px; }
.ch-ring--lg { width: 150px; }
.ch-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ch-ring__track { fill: none; stroke: var(--line); stroke-width: 8; }
.ch-ring__arc { fill: none; stroke: var(--teal); stroke-width: 8; stroke-linecap: butt; transition: stroke-dashoffset .9s var(--ease-out); }
.ch-ring__in { position: relative; display: inline-flex; align-items: baseline; font: 700 1.6rem/1 var(--display); letter-spacing: -.02em; color: var(--ink); }
.ch-ring__in small { font: 800 .55em/1 var(--sans); margin-left: 1px; color: var(--ink-3); }
.ch-ring--sm .ch-ring__in { font-size: 1rem; }
.ch-ring--lg .ch-ring__in { font-size: 2.6rem; }
.ch-ring.is-done .ch-ring__track { stroke: var(--teal); }
.ch-ring.is-done::after { content: ""; position: absolute; right: 4%; top: 4%; width: 26%; aspect-ratio: 1; border-radius: 50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3L12.5 5' fill='none' stroke='%23080B0D' stroke-width='2.4' stroke-linecap='square'/%3E%3C/svg%3E") center / 64% no-repeat; box-shadow: 0 0 0 3px var(--stock); }

/* ---------- ui.bar ---------- */
.ch-meter { position: relative; display: block; height: 8px; margin: 0; padding: 0; border: 0; border-radius: 99px; background: var(--line); overflow: hidden; }
.ch-meter__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--teal); border-radius: 99px; transition: width .6s var(--ease-out); }

/* ---------- ui.seg: a radio group drawn as segments ---------- */
.ch-seg { display: flex; flex-wrap: wrap; margin: 0; padding: 3px; gap: 3px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--stock); width: fit-content; max-width: 100%; min-width: 0; }
.ch-seg--wrap { flex-wrap: wrap; }
.ch-seg__o { position: relative; flex: 1 1 auto; display: grid; place-items: center; min-height: 48px; min-width: 48px; padding: 0 14px; border-radius: 9px; color: var(--ink-2); font: 700 .95rem/1.2 var(--sans); cursor: pointer; text-wrap: nowrap; }
.ch-seg__o input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ch-seg__o:hover { color: var(--ink); }
.ch-seg__o:has(input:checked) { background: var(--ink); color: var(--stock); }
.ch-seg__o:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- ui.chip, ui.tag ---------- */
.ch-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border: 1.5px solid var(--line-2); border-radius: 99px; font: 800 .64rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); text-wrap: nowrap; vertical-align: middle; }
.ch-chip--on { color: var(--ink); border-color: var(--ink); }
.ch-chip--on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.ch-tag { display: inline-flex; align-items: center; padding: 2px 5px; border: 1.5px solid currentColor; border-radius: 0; font: 800 .6rem/1.2 var(--sans); letter-spacing: .08em; color: var(--ink); background: var(--stock); text-wrap: nowrap; }
.ch-tag[data-tag="AU"], .ch-tag[data-tag="ONE"] { background: var(--ink); color: var(--stock); border-color: var(--ink); }
.ch-tag[data-tag="RC"] { border-color: var(--teal); }

/* ---------- ui.stepper ---------- */
.ch-num { display: inline-flex; align-items: center; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--stock); }
.ch-num__b { width: 48px; height: 48px; border: 0; background: none; color: var(--ink); font: 600 1.5rem/1 var(--sans); cursor: pointer; border-radius: 10px; }
.ch-num__b:hover { background: var(--stock-3); }
.ch-num__b[disabled] { opacity: .35; cursor: default; }
.ch-num output { min-width: 3.2ch; text-align: center; font: 700 1.3rem/1 var(--display); }

/* ---------- ui.field ---------- */
.ch-field { display: block; }
.ch-field + .ch-field { margin-top: 18px; }
.ch-field > label { display: block; margin: 0 0 6px; font: 700 1rem/1.3 var(--sans); color: var(--ink); }
.ch input[type="text"], .ch input[type="url"], .ch input[type="number"], .ch input[type="search"], .ch input[type="tel"], .ch input[type="email"], .ch input[type="date"], .ch input:not([type]), .ch select, .ch textarea {
  min-height: 52px; padding: 12px 14px; font: 500 1.0625rem/1.35 var(--sans); border: 1.5px solid var(--line-2); border-radius: 9px; background-color: var(--stock);
}
.ch input:focus, .ch select:focus, .ch textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.ch select { padding-right: 2.4em; background-repeat: no-repeat; background-position: right .9em center; background-size: 12px 8px; }
.ch [aria-invalid="true"] { border-style: dashed; border-color: var(--ink); }
.ch-field--row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ch-field--row > label { margin: 0; }

/* ---------- ui.empty, ui.pocketArt ---------- */
.ch-empty { margin-top: 26px; padding: 30px 26px; border: 1.5px dashed var(--line-2); border-radius: 16px; }
.ch-empty--page { margin-top: 40px; padding: clamp(28px, 6vw, 60px); }
.ch-empty .ch-h { margin-top: 0; }
.ch-empty .ch-pockets { margin-bottom: 18px; }
.ch-pockets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; width: 132px; padding: 8px; border: 1.5px solid var(--line-2); background: var(--stock-2); }
.ch-pockets i { display: grid; place-items: center; aspect-ratio: 5 / 7; border: 1.5px dashed var(--line-2); font: 800 .7rem/1 var(--sans); font-style: normal; color: var(--ink-3); }
.ch-pockets i.is-have { border: 0; background: linear-gradient(160deg, var(--ink-3), var(--ink-4)); box-shadow: inset 0 0 0 3px var(--stock-2), inset 0 0 0 4px var(--line-2); }

/* ---------- ui.tabs ---------- */
.ch-tabs { display: flex; gap: 4px; margin: 0; padding: 0; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.ch-tabs::-webkit-scrollbar { display: none; }
.ch-tab { flex: none; min-height: 52px; padding: 0 16px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--ink-2); font: 800 .76rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.ch-tab:hover { color: var(--ink); }
.ch-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--teal); }
.ch-tab:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.ch-panel { padding-top: 20px; outline: none; }
.ch-panel:focus-visible { box-shadow: 0 0 0 3px var(--focus); }

/* ---------- numbers in a row ---------- */
.ch-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 14px; margin: 0; }
.ch-stat { padding-top: 8px; border-top: 1px solid var(--line-2); min-width: 0; }
.ch-stat dt { font: 800 .6rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.ch-stat dd { margin: 3px 0 0; font: 700 1.45rem/1.05 var(--display); }

/* ---------- pockets and 9-pocket pages (square corners: they stand for cards) ---------- */
.ch-pk { position: relative; display: block; aspect-ratio: 5 / 7; border-radius: 0; overflow: hidden; container-type: inline-size; }
.ch-pk b { position: absolute; left: 0; bottom: 0; padding: 2px 4px; font: 800 max(8px, 15cqw)/1.1 var(--sans); letter-spacing: .02em; }
.ch-pk--have { background: var(--ch-pocket); box-shadow: 0 0 0 1px rgba(0, 0, 0, .55); }
.ch-pk--have img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.ch-pk--have b { background: var(--ink); color: var(--stock); }
.ch-pk--need { border: 1.5px dashed var(--line-2); background: transparent; }
.ch-pk--need b { inset: 0; display: grid; place-items: center; padding: 0; color: var(--ink-3); font-size: max(9px, 22cqw); }
.ch-pk--coming { border: 1.5px solid var(--ink-3); background: repeating-linear-gradient(135deg, var(--stock-3) 0 6px, var(--stock) 6px 12px); }
.ch-pk--coming b { inset: auto 0 0 0; text-align: center; background: var(--stock); color: var(--ink); }
.ch-p9 { min-width: 0; }
.ch-p9__h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; font: 800 .62rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.ch-p9__stamp { padding: 1px 6px; border: 1.5px solid var(--teal); color: var(--ink); letter-spacing: .12em; transform: rotate(-3deg); }
.ch-p9__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5%; padding: 6%; border: 1.5px solid var(--line-2); background: var(--stock-2); }
.ch-p9.is-full .ch-p9__grid { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }

/* ---------- the sheet ---------- */
.ch-locked, .ch-locked body { overflow: hidden; }
.ch-sheet { width: min(560px, calc(100vw - 32px)); max-height: min(86vh, 900px); margin: auto; padding: 0; border: 1.5px solid var(--line-2); border-radius: 16px; background: var(--stock); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); overflow: auto; overscroll-behavior: contain; }
.ch-sheet--wide { width: min(860px, calc(100vw - 32px)); }
.ch-sheet::backdrop { background: rgba(8, 11, 13, .62); }
.ch-sheet[open] { animation: ch-pop .2s var(--ease-out) both; }
@keyframes ch-pop { from { opacity: 0; transform: translateY(10px) scale(.99); } }
.ch-sheet__grip { display: none; }
.ch-sheet__top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 10px 22px; background: var(--stock); }
.ch-sheet__h { font: 700 1.4rem/1.2 var(--display); margin: 0; outline: none; text-wrap: balance; overflow-wrap: anywhere; }
.ch-sheet__h:focus { outline: none; }
.ch-sheet__x { flex: none; display: grid; place-items: center; width: 48px; height: 48px; margin-left: auto; border: 0; border-radius: 50%; background: none; color: var(--ink); font: 400 1.9rem/1 var(--sans); cursor: pointer; }
.ch-sheet__x:hover { background: var(--stock-3); }
.ch-sheet__body { padding: 4px 22px 22px; }
.ch-sheet--ask .ch-sheet__body { padding-top: 0; }
.ch-ask__p { margin: 0; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.5; }
@media (max-width: 760px) {
  .ch-sheet { width: 100%; max-width: 100%; max-height: 88vh; max-height: 88dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; border-width: 1.5px 0 0; }
  .ch-sheet[open] { animation-name: ch-rise; }
  @keyframes ch-rise { from { transform: translateY(40px); opacity: .4; } }
  .ch-sheet__grip { display: block; width: 44px; height: 5px; margin: 10px auto 0; border-radius: 3px; background: var(--line-2); }
  .ch-sheet__top { padding: 8px 8px 8px 18px; }
  .ch-sheet__body { padding: 4px 18px max(22px, env(safe-area-inset-bottom)); }
  .ch-ask .ch-acts { flex-direction: column-reverse; align-items: stretch; }
}

/* ---------- the toast ---------- */
.ch-toasts { position: fixed; left: 0; right: 0; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60; display: grid; justify-items: center; pointer-events: none; padding: 0 12px; }
.ch-toast { pointer-events: auto; display: flex; align-items: center; gap: 6px 10px; max-width: min(560px, 100%); min-height: 56px; padding: 6px 6px 6px 18px; border-radius: 14px; background: var(--ink); color: var(--stock); box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.ch-toast.is-in { animation: ch-in .22s var(--ease-out) both; }
.ch-toast.is-out { opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.ch-toast__t { margin: 0; font-weight: 600; line-height: 1.35; padding: 8px 0; overflow-wrap: anywhere; }
.ch-toast__do { flex: none; min-height: 48px; padding: 0 14px; border: 0; border-radius: 10px; background: none; color: var(--stock); font: 800 .76rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.ch-toast__x { flex: none; width: 48px; height: 48px; border: 0; border-radius: 10px; background: none; color: var(--stock); font: 400 1.5rem/1 var(--sans); cursor: pointer; }
.ch-toast__do:hover, .ch-toast__x:hover { background: rgba(127, 127, 127, .22); }
.ch-toast :focus-visible { outline: 3px solid var(--teal); outline-offset: 1px; }

/* =====================================================================================================================
   My sets and collections (home.js)
   ===================================================================================================================== */
.ch-home__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 6px 24px; }
.ch-home__title { min-width: 0; }
.ch-home__sum { margin: 10px 0 0; color: var(--ink-2); }
.ch-home__sum:empty { display: none; }
.ch-home__start { margin-top: 18px; }
.ch-home__full { margin: 0; max-width: 30em; color: var(--ink-2); font-weight: 600; }
.ch-home__plan { margin: 26px 0 0; color: var(--ink-2); font-size: .95rem; }
.ch-chases { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; margin: 26px 0 0; padding: 0; list-style: none; }
.ch-chase { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 16px; border: 1.5px solid var(--line-2); border-radius: 16px; background: var(--stock); min-width: 0; }
.ch-chase:hover { border-color: var(--ink-3); }
.ch-chase:has(.ch-chase__open:focus-visible) { box-shadow: 0 0 0 3px var(--focus); }
.ch-chase.is-done { border-color: var(--teal); }
.ch-chase__top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.ch-chase__id { min-width: 0; }
.ch-chase__kind { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font: 800 .64rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.ch-chase__name { margin: 0; font: 700 1.3rem/1.2 var(--display); overflow-wrap: anywhere; }
/* no padding under a clamped name: a line past the third would show in it, on top of the count below */
.ch-chase__open { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; min-height: 48px; padding: 6px 0 0; margin-bottom: 6px; color: inherit; text-decoration: none; }
.ch-ring.is-done .ch-ring__in { font-size: 1.3rem; }
.ch-ring--sm.is-done .ch-ring__in { font-size: .85rem; }
.ch-ring--lg.is-done .ch-ring__in { font-size: 2.1rem; }
.ch-chase__open::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }      /* the whole card opens it */
.ch-chase__open:focus-visible { outline: none; }
.ch-chase__count { margin: 0; color: var(--ink-2); }
.ch-chase__count b { font: 700 1.25rem/1 var(--display); color: var(--ink); }
.ch-chase__nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.ch-chase__nums div { padding-top: 8px; border-top: 1px solid var(--line); min-width: 0; }
.ch-chase__nums dt { font: 800 .6rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.ch-chase__nums dd { margin: 3px 0 0; font: 700 1.15rem/1.15 var(--display); overflow-wrap: anywhere; }
.ch-chase--wait { min-height: 220px; border-style: dashed; background: linear-gradient(90deg, var(--stock) 0%, var(--stock-2) 50%, var(--stock) 100%) 0 0 / 200% 100%; animation: ch-wait 1.4s linear infinite; }
@keyframes ch-wait { to { background-position: -200% 0; } }

/* the first step, with nothing started yet */
.ch-first { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px clamp(28px, 5vw, 64px); align-items: start; margin-top: 30px; padding: clamp(24px, 5vw, 48px); border: 1.5px dashed var(--line-2); border-radius: 18px; background: var(--stock-2); }
.ch-first .ch-pockets { width: clamp(150px, 18vw, 210px); }
.ch-first__copy .ch-h2 { margin-top: 0; }
.ch-first__steps { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: f; display: grid; gap: 10px; }
.ch-first__steps li { counter-increment: f; position: relative; padding-left: 44px; color: var(--ink-2); line-height: 1.45; }
.ch-first__steps li::before { content: counter(f); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--ink); border-radius: 9px; font: 700 1rem/1 var(--display); color: var(--ink); }
.ch-first__steps b { color: var(--ink); }
@media (max-width: 700px) { .ch-first { grid-template-columns: minmax(0, 1fr); } }

/* =====================================================================================================================
   The page before the app: what the tool is, the sample, how it works, questions
   ===================================================================================================================== */
.ch-intro .crumbs { padding-top: 10px; }
.ch-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 30px clamp(28px, 4vw, 60px); align-items: start; padding: 18px 0 10px; }
.ch-hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin-top: 12px; }
.ch-hero .lede { font-size: clamp(1.15rem, 1.7vw, 1.4rem); margin-top: 22px; color: var(--ink); max-width: 30em; }
.ch-gets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 24px 0 0; padding: 0; list-style: none; }
.ch-gets li { padding: 14px 0; border-top: 1px solid var(--line-2); color: var(--ink-2); line-height: 1.45; }
.ch-gets b { display: block; margin-bottom: 4px; color: var(--ink); font: 700 1.08rem/1.25 var(--display); }
.ch-cta { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.ch-cta__line { margin: 0; color: var(--ink-2); font-weight: 600; }
.ch-cta .ch-acts { margin-top: 16px; }
.ch-cta .textlink { display: inline-flex; align-items: center; min-height: 48px; padding-bottom: 0; border-bottom: 0; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }   /* See pricing beside the two buttons: a link, big enough for a thumb */
@media (max-width: 980px) { .ch-hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .ch-gets { grid-template-columns: minmax(0, 1fr); } }

/* the sample: a still until it is drawn, then the drawing (home.js openDemo, or the board's demo) */
.ch-demo { position: relative; margin: 0; min-width: 0; }
.ch-demo__stage { position: relative; padding: clamp(16px, 2.4vw, 26px); border: 1.5px solid var(--line-2); border-radius: 18px; background: var(--stock-2); min-height: 340px; }
.ch-demo__still { display: grid; gap: 18px; }
.ch-demo__still .ch-still-top { display: flex; align-items: center; gap: 18px; }
.ch-demo__still .ch-still-ring { width: 120px; aspect-ratio: 1; border-radius: 50%; border: 10px solid var(--line); flex: none; }
.ch-demo__still .ch-still-lines { flex: 1; display: grid; gap: 10px; }
.ch-demo__still .ch-still-lines i { display: block; height: 14px; background: var(--line); border-radius: 4px; }
.ch-demo__still .ch-still-lines i:first-child { width: 70%; height: 22px; }
.ch-demo__still .ch-still-lines i:last-child { width: 45%; }
.ch-demo__still .ch-still-pages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ch-demo__still .ch-still-pages i { display: block; aspect-ratio: 5 / 7.2; border: 1.5px solid var(--line-2); background: repeating-linear-gradient(90deg, transparent 0 30%, var(--stock-3) 30% 33.4%), var(--stock); }
.ch-demo[data-live] .ch-demo__still { display: none; }
.ch-demo__cap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-top: 14px; }
.ch-demo__cap .label { margin: 0; }
.ch-demo__fine { flex-basis: 100%; margin: 0; color: var(--ink-3); font-size: .9rem; }

.ch-sample { display: grid; gap: 20px; }
.ch-sample__head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; }
.ch-sample__id { min-width: 0; }
.ch-sample__name { margin: 0; font: 700 clamp(1.2rem, 2vw, 1.5rem)/1.2 var(--display); overflow-wrap: anywhere; }
.ch-sample__count { margin: 4px 0 12px; color: var(--ink-2); }
.ch-sample__count b { font: 700 1.3rem/1 var(--display); color: var(--ink); }
.ch-sample__pages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1.6vw, 16px); }
.ch-sample__needs { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.ch-sample__line { margin: 0; color: var(--ink-2); line-height: 1.45; overflow-wrap: anywhere; }
.ch-sample__line b { color: var(--ink); }
@media (max-width: 459px) {
  .ch-sample__head { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .ch-sample .ch-ring--lg { width: 116px; }
  .ch-sample .ch-ring--lg .ch-ring__in { font-size: 2rem; }
  .ch-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ch-how, .ch-faq { margin-top: clamp(56px, 8vw, 96px); max-width: 980px; }
.ch-how h2, .ch-faq h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin: 10px 0 22px; }
.ch-steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 0; padding: 0; list-style: none; }
.ch-steps li { counter-increment: s; position: relative; padding: 70px 0 0; color: var(--ink-2); }
.ch-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 52px; height: 52px; border: 3px solid var(--ink); border-radius: 14px; font: 700 1.6rem/1 var(--display); color: var(--ink); }
.ch-steps b { display: block; color: var(--ink); font: 700 1.2rem/1.25 var(--display); margin-bottom: 6px; }
.ch-faq { padding-bottom: 40px; }
@media (max-width: 760px) { .ch-steps { grid-template-columns: minmax(0, 1fr); } .ch-steps li { padding: 0 0 0 68px; min-height: 56px; } }
/* "Whatever you're completing": the four kinds a person can start, on the signed-out page */
.ch-kinds { margin-top: clamp(56px, 8vw, 96px); max-width: 1120px; }
.ch-kinds h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin: 10px 0 8px; }
.ch-kinds__lede { max-width: 60ch; margin: 0 0 26px; color: var(--ink-2); }
.ch-kinds__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.ch-kinds__list li { padding: 20px 18px 22px; border: 1px solid var(--line-2); border-top: 3px solid var(--ink); background: color-mix(in srgb, var(--ink) 3%, transparent); color: var(--ink-2); line-height: 1.5; }
.ch-kinds__list .label { display: block; margin-bottom: 10px; }
.ch-kinds__list b { display: block; margin-bottom: 8px; color: var(--ink); font: 700 1.2rem/1.25 var(--display); }
@media (max-width: 980px) { .ch-kinds__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ch-kinds__list { grid-template-columns: minmax(0, 1fr); } }

/* ---------- nothing moves when asked ---------- */
@media (prefers-reduced-motion: reduce) {
  .ch-ring__arc, .ch-meter__fill { transition: none; }
  .ch-chase--wait { animation: none; }
  .is-in, .ch-sheet[open], .ch-toast.is-in { animation: none; }
  .ch-toast.is-out { transition: none; }
}
