/* /build and /assistant: the host's chrome AROUND the shared component (/lib/builder.js, with its own /lib/builder.css,
 * byte-identical to rally/lib/builder.css). The component draws the toolbar, the stage, its sheets and its toast; this
 * sheet draws what the front door puts in and beside them: the toolbar's two regions (the checklist, the assistant,
 * Save, ⋯ and the primary), the phone's bottom bar, the host's popovers and toast, the line over the stage, the
 * assistant's column and sheet frame (what is inside it is assets/assistant.css), Buy, and the two dialogs.
 *
 * The component reads the cream-system tokens declared at the top of site.css (--paper, --paper-2, --ink, --ink-2,
 * --line, --shadow-1, --shadow-2), so it follows the page's look with nothing to redeclare here, and the club colours it
 * paints the stage with never escape its own root. Green is the stage's colour for "yours to change", and nothing here
 * uses it: a done row is an ink tick, the primary is Rally's seam red, and everything else is ink on paper. */

/* The page head is for a screen reader and the harness: the builder is the first thing under the rail (owner,
 * 2026-10-21: the clubs and the platforms on every tab), so the head takes no room at all. */
.build-head { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The builder runs edge to edge: the toolbar under the bars, the stage on its floor down to the window's foot. */
.builder { position: relative; margin: 0; padding: 0; }
.bx-host { position: relative; }

/* The component, set in the front door's own faces (D30): Archivo for the chrome, "Oswald Front" for its labels and
 * chips. No face of the lettering kit is fetched to draw a button. The toolbar sticks under the 54px bar. */
#bx-root { --bx-font-ui: var(--sans); --bx-font-label: var(--label); --bx-top: 54px; }
/* The bar's menus (Sign in, Coaches) open over the sticky toolbar, never under it. */
.bar { z-index: 45; }

/* Keep the builder's place until it draws, so nothing below it moves when it does. The component sizes its pane to end
 * 24px above the window's foot from where the pane starts (--bx-above, measured by build.js before the stage paints):
 * the root is the window's height less the bars above it (54 + the 82px rail), never under its own floor (56 + 72 + 420
 * on a laptop; 52 + 360 on a phone, less the 64px bottom bar). Only where there is a script to draw it: with none, the
 * sentence below is all there is, and an empty box under it would be a hole. */
@media (scripting: enabled) {
  #bx-root:not(.bx-root) { min-height: max(548px, calc(100dvh - 136px)); }
}
@media (scripting: enabled) and (max-width: 767px) {
  #bx-root:not(.bx-root) { min-height: max(412px, calc(100svh - 136px - 64px - env(safe-area-inset-bottom))); }
}
.noscript { margin: 0 auto; max-width: var(--max); padding: var(--s-5) var(--gutter); color: var(--ink-2); }
/* With no script there is nothing to press: Buy and the two dialogs need one, and nothing is drawn. The sentence in the
 * builder's place says why. (The dialogs are shut without a script anyway; Buy is hidden in the markup.) */
@media (scripting: none) {
  #buy, #as-frame, .builder-note { display: none; }
}

/* The flash, the why-label and Reveal are opacity, not motion (WCAG 2.3.3), so they stay when a visitor asks for less
 * movement (SPEC §6.7). site.css stops every animation for that visitor; these three are given back, on the stage only. */
@media (prefers-reduced-motion: reduce) {
  #bx-root .bx-flashbox { animation: bx-flashbox var(--m-flash, 1000ms) ease-out both !important; }
  #bx-root .bx-whylabel { animation: bx-why 3000ms linear both !important; }
  #bx-root .bx-reveal { animation: bx-reveal 1350ms linear both !important; }
}

/* ---- the line over the stage, and the first-visit hint ------------------------------------------------------------- *
 * Both sit 12px under the toolbar, centred over the stage, and take no room: the stage never moves for them. They take
 * no pointer either, so a tap goes through them to whatever is under them. */
.builder-note {
  position: absolute; z-index: 26; top: calc(56px + 12px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: min(640px, calc(100% - 32px)); margin: 0; padding: 7px 14px;
  border-radius: var(--r-pill); background: var(--paper); box-shadow: var(--shadow-1), 0 0 0 1px var(--line);
  font: 500 var(--fs-note)/1.4 var(--sans); color: var(--ink-2); text-align: center; pointer-events: none;
  animation: hx-fade-in 150ms ease-out both;
}
.builder-note:empty { display: none; }
.builder-note.err { color: var(--deep); }
/* After a design is opened, focus moves to this line so it is read out; it is not a control, so it wears no ring. */
.builder-note[tabindex="-1"]:focus { outline: none; }
.bx-host[data-layout="phone"] .builder-note { top: calc(52px + 8px); }
.hx-hint {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%); z-index: 1;
  display: inline-flex; align-items: center; height: 32px; margin: 0; padding: 0 14px;
  border-radius: var(--r-pill); background: var(--paper); box-shadow: var(--shadow-1), 0 0 0 1px var(--line);
  font: 500 var(--fs-sm)/1 var(--sans); color: var(--ink); white-space: nowrap; pointer-events: none;
  animation: hx-fade-in 200ms ease-out both;
}
.hx-hint.hx-out { animation: hx-fade-out 150ms ease-out both; }
/* On a phone the spot 12px under the toolbar is the club's top bar, the name box the hint is about: it sits a band lower,
 * in the sample scores band (build.js measures that band and keeps the pill clear of its "Sample scores" tag; this is
 * the same place, for a stage it could not measure). */
.bx-host[data-layout="phone"] .hx-hint { top: calc(100% + 60px); }
/* With the assistant's column beside the stage, the line is centred over the stage, never over the column. While Buy is
 * open it waits: the stage beside Buy is a preview with its own "Back to editing" at that edge, and what the line said
 * about how the design was opened is behind the buyer by then (it is back when Buy closes, if nothing has cleared it). */
@media (min-width: 1024px) {
  .bx-host[data-side] .builder-note { left: calc((100% - var(--side-w)) / 2); max-width: min(640px, calc(100% - var(--side-w) - 32px)); }
  .bx-host[data-side="buy"] .builder-note { display: none; }
}

/* ---- the host's chrome in the toolbar --------------------------------------------------------------------------------- */
.hx-check, .hx-assist, .hx-save, .hx-more, .hx-primary {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: none;
  height: 36px; padding: 0 12px; border: 1px solid transparent; border-radius: 9px; background: transparent;
  color: var(--ink); font: 600 var(--fs-note)/1 var(--sans); white-space: nowrap; cursor: pointer;
  transition: transform 100ms ease-out;
}
.hx-check:active, .hx-assist:active, .hx-save:active, .hx-more:active, .hx-primary:active { transform: scale(.97); }
.hx-check { border-color: var(--line); background: var(--paper); padding: 0 12px 0 8px; }
.hx-check.is-ready { border-color: var(--ink); }
.hx-check[aria-expanded="true"], .hx-more[aria-expanded="true"] { background: var(--paper-2); }
.hx-assist[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.hx-more { width: 36px; padding: 0; }
.hx-save { border-color: var(--line); background: var(--paper); }
.hx-save:disabled { opacity: .55; cursor: default; }
/* If the toolbar is ever shorter than its words, the line beside Save gives way first (cut, then gone), never the primary
 * or the toolbar's right edge: Save's own tooltip carries the same words. */
.hx-savewrap { display: inline-flex; align-items: center; gap: 10px; flex: 0 1 auto; min-width: 0; }
.hx-saved { min-width: 0; overflow: hidden; text-overflow: ellipsis; font: 400 var(--fs-xs)/1 var(--sans); color: var(--ink-2); white-space: nowrap; }
.hx-saved:empty { display: none; }
.hx-primary { height: 38px; padding: 0 18px; border-radius: var(--r-pill); background: var(--red); color: #fff; }
.hx-primary.is-request { background: var(--ink); }
/* Under 1200px the toolbar keeps one row by saying less: Buy without "a year", "0 of 4", the assistant as its icon, and Save in
 * ⋯ (build.js puts it there when it is hidden here). The line beside Save waits for 1340px (build.js BAR_ROOM): at 1280 it
 * pushed "Request this design" past the window's edge and Buy into the toolbar's right gutter. */
@media (max-width: 1199px) {
  .hx-yr, .hx-check .hx-wide, .hx-assist .hx-lbl, .hx-savewrap { display: none; }
  .hx-assist { width: 36px; padding: 0; }
}
@media (max-width: 1339px) { .hx-saved { display: none; } }
@media (hover: hover) and (pointer: fine) {
  .hx-assist:hover, .hx-more:hover { background: var(--paper-2); }
  .hx-assist[aria-pressed="true"]:hover { background: var(--ink); opacity: .9; }
  .hx-check:hover, .hx-save:hover { border-color: var(--ink-2); }
  .hx-primary:hover { background: var(--deep); }
  .hx-primary.is-request:hover { background: var(--ink); opacity: .9; }
}
.hx-ico { width: 18px; height: 18px; display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.hx-more .hx-ico { stroke-width: 3; }
/* The checklist's ring: how many of the four needed rows are done. */
.hx-ring { width: 20px; height: 20px; flex: none; transform: rotate(-90deg); }
.hx-ring circle { fill: none; stroke-width: 2.5; }
.hx-ring-track { stroke: var(--line); }
.hx-ring-fill { stroke: var(--ink); stroke-linecap: round; transition: stroke-dasharray 200ms ease-out; }
/* A tablet keeps the toolbar on one row the same way: the assistant and the checklist say what they are in their labels. */
#bx-root[data-layout="tablet"] .hx-assist .hx-lbl, #bx-root[data-layout="tablet"] .hx-saved, #bx-root[data-layout="tablet"] .hx-check .hx-wide { display: none; }
#bx-root[data-layout="tablet"] .hx-assist { width: 36px; padding: 0; }
@media (pointer: coarse) {
  .hx-check, .hx-assist, .hx-save, .hx-primary { height: 44px; }
  .hx-more { width: 44px; height: 44px; }
}

/* ---- the phone's bottom bar ------------------------------------------------------------------------------------------ */
.hx-dock {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 8px; height: calc(64px + env(safe-area-inset-bottom));
  padding: 0 12px env(safe-area-inset-bottom); background: var(--paper); border-top: 1px solid var(--line);
  animation: hx-fade-in 150ms ease-out both;
}
.hx-dock .hx-check, .hx-dock .hx-assist { height: 44px; }
.hx-dock .hx-check .hx-lbl { font-size: var(--fs-xs); }
.hx-dock .hx-assist { width: 44px; padding: 0; border: 1px solid var(--line); background: var(--paper); }
.hx-dock .hx-assist .hx-lbl { display: none; }
.hx-dock .hx-assist[aria-pressed="true"] { background: var(--ink); }
.hx-dock .hx-primary { flex: 1 1 auto; height: 44px; min-width: 0; margin-left: auto; padding: 0 14px; }
body.hx-docked { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

/* ---- the host's popovers: the checklist, ⋯, the GameChanger sheet, a link to copy ------------------------------------ */
.hx-pop {
  position: fixed; z-index: 55; top: 0; left: 0; width: 300px; max-height: min(70vh, 560px);
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 12px; background: var(--paper); box-shadow: var(--shadow-2), 0 0 0 1px var(--line);
  transform-origin: 50% 0; animation: hx-pop-in 180ms cubic-bezier(.05, .7, .1, 1) both;
}
.hx-pop.hx-out { animation: hx-pop-out 120ms cubic-bezier(.3, 0, .8, .15) both; }
/* Each popover is named hx-pop-<kind>, never hx-<kind>: the toolbar's buttons already wear .hx-check and .hx-more. */
.hx-pop-check { width: 280px; }
.hx-pop-more { width: 260px; }
.hx-pop-gc, .hx-pop-copy { width: 360px; }
.hx-pop.is-sheet {
  top: auto; right: 0; bottom: 0; left: 0; width: auto; max-width: 640px; max-height: 70vh; margin: 0 auto;
  border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom);
  transform-origin: 50% 100%; animation: hx-sheet-in 300ms cubic-bezier(.05, .7, .1, 1) both;
}
.hx-pop.is-sheet.hx-out { animation: hx-sheet-out 220ms cubic-bezier(.3, 0, .8, .15) both; }
.hx-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 4px 8px 0 16px; flex: none; }
.hx-pop.is-sheet .hx-pop-head { min-height: 52px; }
.hx-pop-title { margin: 0; font: 400 var(--fs-xs)/1.2 var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.hx-done { appearance: none; height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: 600 var(--fs-sm)/1 var(--sans); cursor: pointer; }
.hx-pop.is-sheet .hx-done { height: 44px; }
.hx-pop-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.hx-group { margin: 12px 0 4px; font: 400 var(--fs-2xs)/1.2 var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.hx-group:first-child { margin-top: 4px; }
/* A checklist row: its mark, its name, and what it holds. */
.hx-row { appearance: none; display: grid; grid-template-columns: 16px auto minmax(0, 1fr); align-items: center; gap: 10px; min-height: 40px; padding: 0 8px; margin: 0 -8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: 500 var(--fs-sm)/1.2 var(--sans); }
.hx-row:hover { background: var(--paper-2); }
.hx-mark { width: 16px; height: 16px; display: grid; place-items: center; }
.hx-mark .hx-ico { width: 16px; height: 16px; stroke-width: 2.25; }
.hx-open { width: 14px; height: 14px; border: 1.5px solid var(--ink-2); border-radius: 50%; }
.hx-row-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; color: var(--ink-2); font-weight: 400; }
/* ⋯'s items. */
.hx-item { appearance: none; display: flex; align-items: center; min-height: 40px; padding: 0 10px; margin: 0 -8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: 500 var(--fs-sm)/1.2 var(--sans); }
.hx-item:hover, .hx-item:focus-visible { background: var(--paper-2); }
.hx-item.is-primary { justify-content: center; margin: 4px 0 0; border-radius: var(--r-pill); background: var(--red); color: #fff; font-weight: 600; }
.hx-rule { width: 100%; margin: 6px 0; border: 0; border-top: 1px solid var(--line); }
@media (pointer: coarse) { .hx-row, .hx-item { min-height: 44px; } }
/* The GameChanger sheet. */
.hx-help { margin: 0; font: 400 var(--fs-note)/1.5 var(--sans); color: var(--ink-2); }
.hx-help.is-lead { margin-bottom: 8px; color: var(--ink); font-size: var(--fs-sm); }
.hx-gc { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); }
.hx-label { display: flex; flex-direction: column; gap: 6px; font: 600 var(--fs-note)/1.3 var(--sans); color: var(--ink); }
input.hx-field { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--field-line); border-radius: var(--r); background: #fff; color: var(--ink); font: 400 var(--fs-md)/1.2 var(--sans); }
input.hx-field:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: transparent; }
input.hx-field[aria-invalid="true"] { border-color: var(--deep); }
.hx-err { margin: 0; font: 500 var(--fs-note)/1.4 var(--sans); color: var(--deep); }
.hx-status { margin: 4px 0 0; font: 500 var(--fs-note)/1.4 var(--sans); color: var(--ink); }
.hx-status:empty { display: none; }
.hx-text { appearance: none; align-self: flex-start; padding: 0; border: 0; background: none; color: var(--ink); font: 600 var(--fs-note)/1.6 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.hx-btn { appearance: none; align-self: flex-start; height: 40px; margin-top: 8px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: var(--ink); color: var(--paper); font: 600 var(--fs-sm)/1 var(--sans); cursor: pointer; }

/* ---- the host's toast: drawn as the component's, one on screen at a time ---------------------------------------------- */
.hx-toast {
  position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px; width: max-content; max-width: min(560px, calc(100vw - 32px)); min-height: 44px; padding: 10px 10px 10px 16px;
  border-radius: 12px; background: var(--ink); color: var(--paper); box-shadow: var(--shadow-2);
  font: 500 var(--fs-sm)/1.35 var(--sans); animation: hx-toast-in 200ms cubic-bezier(.05, .7, .1, 1) both;
}
.hx-toast.hx-out { animation: hx-toast-out 150ms cubic-bezier(.3, 0, .8, .15) both; }
.hx-toast button { appearance: none; height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .14); color: inherit; cursor: pointer; font: 600 var(--fs-sm)/1 var(--sans); flex: none; }
.hx-toast button:hover { background: rgba(255, 255, 255, .22); }
body.hx-docked .hx-toast { bottom: calc(80px + env(safe-area-inset-bottom)); }

/* ---- the column beside the stage: the assistant's, or Buy's --------------------------------------------------------- *
 * On a laptop it stands under the toolbar from the stage's top to the window's foot, and the stage fits the room to its
 * left at once (build.js asks for Fit in the same frame). The /assistant page reserves it in the markup, so it is there
 * from the first paint and nothing moves when the assistant arrives. */
.bx-host { --side-w: 384px; }
.bx-host[data-side="buy"] { --side-w: 560px; }
@media (min-width: 1024px) {
  .bx-host[data-side] #bx-root .bx-floor { padding-right: calc(var(--side-w) + 24px); }
}
.as-frame {
  position: fixed; z-index: 52; left: 0; right: 0; bottom: 0; height: var(--as-h, 50vh); max-width: 640px; margin: 0 auto;
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 16px 16px 0 0; background: var(--paper); box-shadow: 0 -8px 32px rgba(23, 21, 18, .18), 0 0 0 1px var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  animation: hx-sheet-in 300ms cubic-bezier(.05, .7, .1, 1) both;
}
.as-frame.is-away { display: none; }
.as-grab { flex: none; display: grid; place-items: center; height: 20px; touch-action: none; cursor: grab; }
.as-grab::before { content: ""; width: 36px; height: 4px; border-radius: var(--r-pill); background: var(--line); }
.as-grab:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.as-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
@media (min-width: 1024px) {
  .as-frame:not(.is-sheet) {
    position: absolute; z-index: 25; top: 56px; right: 0; bottom: 0; left: auto; width: var(--side-w); height: auto; max-width: none; margin: 0;
    border-radius: 0; box-shadow: none; border-left: 1px solid var(--line); padding-bottom: 0;
    animation: hx-slide-in 300ms cubic-bezier(.05, .7, .1, 1) both;
  }
  .as-frame:not(.is-sheet) .as-grab { display: none; }
}

/* ---- Buy ------------------------------------------------------------------------------------------------------------ */
.buy-sec {
  position: fixed; z-index: 70; inset: 0; overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); animation: hx-fade-in 200ms ease-out both;
}
/* A whole view says Back; a column beside the stage says ×. */
.buy-sec .buy-x { display: none; }
@media (min-width: 1024px) {
  .buy-sec:not(.is-view) {
    position: absolute; z-index: 25; inset: 56px 0 0 auto; width: var(--side-w);
    border-left: 1px solid var(--line); animation: hx-slide-in 300ms cubic-bezier(.05, .7, .1, 1) both;
  }
  .buy-sec:not(.is-view) .buy-back { display: none; }
  .buy-sec:not(.is-view) .buy-x { display: inline-flex; }
}
.buy-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: var(--s-3);
  min-height: 56px; padding: 0 var(--s-4) 0 var(--s-5); background: var(--paper); border-bottom: 1px solid var(--line);
}
.buy-head h2 { flex: 1 1 auto; margin: 0; font: 600 var(--fs-h3)/1.1 var(--serif); }
#buy-title[tabindex="-1"]:focus { outline: none; }
.buy-back, .buy-x { appearance: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; min-width: 44px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font: 600 var(--fs-sm)/1 var(--sans); cursor: pointer; justify-content: center; }
.buy-x span { font-size: var(--fs-xl); line-height: 1; }
.buy-back:hover, .buy-x:hover { background: var(--paper-2); }
.buy-card { padding: var(--s-5); }
/* site.css centres the price for /start's closing section; in the card it reads left, on one line, under the title. */
.buy-card .price {
  justify-items: start; gap: 0; max-width: none; margin: 0 0 var(--s-5); padding: 0 0 var(--s-4);
  border-top: 0; border-bottom: 1px solid var(--hair); text-align: left;
}
.buy-card .price-fig { margin: 0; font: 600 var(--fs-h3)/1.2 var(--serif); }
.buy-card .price-fig small { display: inline; margin: 0 0 0 var(--s-2); font: 400 var(--fs-sm)/1.2 var(--sans); color: var(--ink-2); }
.buy-card .price-what { margin: var(--s-1) 0 0; font-size: var(--fs-sm); color: var(--ink-2); }
.buy-pic { display: block; width: 100%; height: 120px; margin: 0 0 var(--s-5); object-fit: cover; object-position: center; border-radius: var(--r-lg); background: var(--ink); }
.buy-sec .return-note { margin: 0 0 var(--s-4); padding: var(--s-3) var(--s-4); border-radius: var(--r); background: var(--paper-2); font-size: var(--fs-sm); color: var(--ink); }
.buy-h { margin: var(--s-5) 0 var(--s-2); font: 400 var(--fs-xs)/1.2 var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.buy-h:first-child { margin-top: 0; }
/* "Before you pay": a row per thing a site needs, each fixed where it is said. A done row is an ink tick, a needed one
 * an empty ring, and the two that never block carry no mark at all. */
.buy-fix { display: flex; flex-direction: column; }
.fix-row { display: grid; grid-template-columns: 16px 112px minmax(0, 1fr); align-items: start; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.fix-mark { width: 16px; height: 16px; margin-top: 2px; display: grid; place-items: center; }
.fix-mark .hx-ico { width: 16px; height: 16px; stroke-width: 2.25; }
.fix-mark.is-open::before { content: ""; width: 14px; height: 14px; border: 1.5px solid var(--ink); border-radius: 50%; }
.fix-label { font: 600 var(--fs-sm)/1.45 var(--sans); color: var(--ink); }
.fix-body { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
.fix-value { min-width: 0; overflow-wrap: anywhere; font: 400 var(--fs-sm)/1.45 var(--sans); color: var(--ink); }
.fix-note { font: 400 var(--fs-sm)/1.45 var(--sans); color: var(--ink-2); }
input.fix-field { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--field-line); border-radius: var(--r); background: #fff; color: var(--ink); font: 400 var(--fs-md)/1.2 var(--sans); }
input.fix-field:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: transparent; }
.fix-chips { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.fix-ages { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
.fix-chip { appearance: none; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: 500 var(--fs-sm)/1 var(--sans); cursor: pointer; transition: transform 100ms ease-out; }
.fix-chip:active { transform: scale(.97); }
.fix-chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.fix-chip:disabled { opacity: .4; cursor: default; }
@media (hover: hover) and (pointer: fine) { .fix-chip:not(:disabled):hover { border-color: var(--ink-2); } }
@media (pointer: coarse) { .fix-chip { height: 44px; } }
.fix-text, .buy-link { appearance: none; padding: 0; border: 0; background: none; color: var(--ink); font: 600 var(--fs-sm)/1.45 var(--sans); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
.fix-text:hover, .buy-link:hover { color: var(--deep); }
/* On a touch screen a text button ("Change", "Add it again") reaches 44px tall past its words, as the stage's own text
 * buttons do; the rows' 12px padding holds the reach, so it never meets the next row's. */
@media (pointer: coarse) {
  .fix-text { position: relative; }
  .fix-text::after { content: ""; position: absolute; inset: -11px -4px; }
}
.fix-mono { display: flex; align-items: center; gap: 10px; width: 100%; }
.fix-disc { width: 40px; height: 40px; flex: none; }
.fix-disc svg { display: block; width: 100%; height: 100%; }
.fix-letters { font: 400 var(--fs-sm)/1.45 var(--sans); color: var(--ink); }
.fix-sep { color: var(--ink-2); }
.buy-acct { margin: var(--s-4) 0 0; padding: var(--s-3) var(--s-4); border-radius: var(--r); background: var(--paper-2); font-size: var(--fs-sm); color: var(--ink); }
.buy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4) var(--s-5); margin-bottom: var(--s-5); }
.buy-grid label { display: flex; flex-direction: column; gap: 5px; font-size: var(--fs-note); color: var(--ink-2); }
.buy-grid label.wide, .buy-more { grid-column: 1 / -1; }
.buy-grid input, .buy-grid select, .buy-grid textarea, .ask input, .ask select, .ask textarea { width: 100%; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--field-line); background: #fff; color: var(--ink); font: 400 var(--fs-md)/1.4 var(--sans); }
.buy-grid textarea { min-height: 88px; resize: vertical; }
.buy-grid input:focus, .buy-grid select:focus, .buy-grid textarea:focus, .ask input:focus, .ask select:focus, .ask textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: transparent; }
.buy-grid .trap, .ask .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.buy-grid .buy-hint { font-size: var(--fs-note); color: var(--ink-2); line-height: 1.45; }
.buy-grid .buy-hint.err { color: var(--deep); }
.buy-grid label.check { flex-direction: row; align-items: flex-start; gap: 8px; }
.buy-grid label.check input { width: auto; margin-top: 3px; }
.buy-grid #bx-buy-gc { display: grid; gap: var(--s-4); }
.buy-grid #bx-buy-gc:empty { display: none; }
.buy-more { border: 1px solid var(--hair); border-radius: var(--r-lg); background: var(--cream); }
.buy-more > summary { cursor: pointer; padding: 12px 14px; font: 500 var(--fs-sm)/1.3 var(--sans); color: var(--ink); list-style: none; }
.buy-more > summary::-webkit-details-marker { display: none; }
.buy-more > summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--ink-2); }
.buy-more[open] > summary::before { content: "–"; }
.buy-more .buy-grid { padding: 4px 14px 14px; margin: 0; }
.buy-more .buy-social { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4) var(--s-5); grid-column: 1 / -1; }
.buy-go { display: flex; flex-direction: column; gap: var(--s-3); }
.buy-go .btn.big { width: 100%; min-height: 52px; font-size: var(--fs-md); }
.buy-go .fine { margin: 0; font-size: var(--fs-note); color: var(--ink-2); }
.buy-msg { margin: var(--s-4) 0 0; padding: 12px 14px; border-radius: var(--r); font-size: var(--fs-sm); }
.buy-msg:empty { display: none; }
.buy-msg.ok { background: var(--green-soft); color: var(--green); }
.buy-msg.err { background: var(--red-soft); color: var(--deep); }
.buy-msg:focus { outline: none; }
.buy-talk { margin: var(--s-5) 0 0; text-align: center; }
@media (max-width: 1023px) {
  .buy-card { max-width: 640px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .buy-card { padding: var(--s-4); }
  .fix-row { grid-template-columns: 16px minmax(0, 1fr); }
  .fix-body { grid-column: 2; }
  .buy-grid, .buy-more .buy-social { grid-template-columns: 1fr; }
}

/* ---- the two dialogs: Talk to us, and Open a design ----------------------------------------------------------------- */
.dlg {
  width: min(600px, calc(100vw - 32px)); max-height: min(88dvh, 860px); padding: 0; overflow-y: auto; overscroll-behavior: contain;
  border: 0; border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-2);
}
.dlg[open] { animation: hx-pop-in 180ms cubic-bezier(.05, .7, .1, 1) both; }
.dlg::backdrop { background: rgba(23, 21, 18, .42); }
.open-dlg { width: min(560px, calc(100vw - 32px)); }
.dlg-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) var(--s-3) var(--s-2) var(--s-5); background: var(--paper); }
.dlg-head h2 { margin: 0; font: 600 var(--fs-h3)/1.15 var(--serif); }
.dlg-x { appearance: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); cursor: pointer; }
.dlg-x span { font-size: var(--fs-xl); line-height: 1; }
.dlg-x:hover { background: var(--paper-2); }
.dlg-lede { margin: 0 var(--s-5) var(--s-3); color: var(--ink-2); font-size: var(--fs-sm); }
.ask { padding: 0 var(--s-5) var(--s-5); }
.ask form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.ask label { display: flex; flex-direction: column; gap: 5px; font-size: var(--fs-note); color: var(--ink-2); }
.ask label.wide { grid-column: 1 / -1; }
.ask select { appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23171512' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 36px; }
.ask textarea { min-height: 96px; resize: vertical; }
.ask .actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 4px; }
.ask .note { font-size: var(--fs-note); color: var(--ink-2); margin: 0; }
.form-msg { grid-column: 1 / -1; margin: 0; padding: 12px 14px; border-radius: var(--r); font-size: var(--fs-md); }
.form-msg:empty { display: none; }
.form-msg.ok { background: var(--green-soft); color: var(--green); }
.form-msg.err { background: var(--red-soft); color: var(--deep); }
.auth-panel .form-msg { font-size: var(--fs-sm); }
/* Open a design: one field and a button, what it says back, the Design ID, and the designs to reopen. */
.builder-open { display: flex; flex-direction: column; gap: 8px; padding: 0 var(--s-5) var(--s-4); }
.builder-open label { font: 500 var(--fs-sm)/1.3 var(--sans); color: var(--ink); }
.builder-open .open-row { display: flex; gap: 8px; }
.builder-open input { flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--field-line); border-radius: var(--r); background: #fff; color: var(--ink); font: 400 var(--fs-md)/1.2 var(--sans); text-overflow: ellipsis; }
.builder-open input:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: transparent; }
.builder-open .open-row .btn { min-height: 44px; }
.builder-open .open-msg { margin: 0; font-size: var(--fs-note); line-height: 1.5; color: var(--ink-2); }
.builder-open .open-msg:empty { display: none; }
.builder-open .open-msg.err { color: var(--deep); }
/* A Design ID: selected whole with one click, in a monospace face so that a lower-case l, a capital I and a 1 are told
 * apart, and one box that never breaks (a hyphen is a legal place to wrap, and about three IDs in ten hold one). */
.builder-saved { margin: 0 var(--s-5) var(--s-4); padding: 12px 14px; border: 1px solid var(--hair); border-left: 2px solid var(--red); border-radius: var(--r-lg); background: var(--paper); }
.builder-saved p { margin: 0; font-size: var(--fs-sm); line-height: 1.6; color: var(--ink-2); }
.builder-saved .saved-link .btn { margin-left: 4px; vertical-align: middle; }
.builder-saved .saved-fix { margin-top: 6px; font-size: var(--fs-note); color: var(--ink-2); }
.builder-saved code, .builder-list code { font: 500 var(--fs-note)/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; color: var(--ink); background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 6px; display: inline-block; max-width: 100%; white-space: nowrap; -webkit-user-select: all; user-select: all; }
.builder-saved .saved-link code { font-size: var(--fs-sm); letter-spacing: .02em; }
.builder-list { margin: 0 var(--s-5) var(--s-5); font-size: var(--fs-note); color: var(--ink-2); }
.builder-list h3 { margin: 0 0 var(--s-2); font: 400 var(--fs-xs)/1.2 var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.builder-list ul { margin: 0; padding-left: 18px; }
.builder-list li { margin: 3px 0; }
.builder-list li code { font-size: var(--fs-xs); margin-inline: 2px; }
.builder-list li span { color: var(--ink-2); font-size: var(--fs-xs); }
.builder-mine ul { list-style: none; padding-left: 0; }
.builder-mine li { display: grid; grid-template-columns: 96px 1fr; gap: 4px 12px; align-items: center; margin: 12px 0; }
.builder-mine img { width: 96px; height: 60px; object-fit: cover; background: var(--ink); border-radius: 6px; }
.builder-mine .mine-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
@media (max-width: 640px) {
  .dlg { width: 100vw; max-width: none; max-height: 92dvh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  .dlg[open] { animation: hx-sheet-in 300ms cubic-bezier(.05, .7, .1, 1) both; }
  .ask form { grid-template-columns: 1fr; }
}

/* ---- motion ----------------------------------------------------------------------------------------------------------- *
 * Only transform and opacity move. A visitor who asked for less movement gets none of it (site.css), and loses nothing:
 * every one of these is how something arrives, never what it says. */
@keyframes hx-fade-in { from { opacity: 0; } }
@keyframes hx-fade-out { to { opacity: 0; } }
@keyframes hx-pop-in { from { opacity: 0; transform: scale(.96); } }
@keyframes hx-pop-out { to { opacity: 0; transform: scale(.96); } }
@keyframes hx-sheet-in { from { transform: translateY(100%); } }
@keyframes hx-sheet-out { to { transform: translateY(100%); } }
@keyframes hx-slide-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes hx-toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes hx-toast-out { to { opacity: 0; transform: translate(-50%, 8px); } }
