/*
 * The dog builder (web/build-a-hound.html, web/js/hounds-build.js). Same dark slate as the leaderboard: it
 * reads the --hd-* colours that .hounds-page defines in hounds.css and adds only the builder's own pieces.
 * Phone first: one column, 16px gutters, every control at least 44px tall, nothing scrolls sideways. At
 * 1000px and up the preview and "My dogs" sit in a sticky column beside the three steps.
 *
 * Colour is never the only signal: a pressed chip says so with aria-pressed and a filled style, an
 * over-the-cap pick is struck through and says so in words, problems are a list with their reasons.
 */

.bd-wrap { padding-top: 14px; }
.bd-head { margin: 0 0 6px; }
.bd-head .hd-lede { font-size: 15px; color: var(--hd-mute); margin: 0 0 10px; max-width: 70ch; }
.bd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bd-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) {
  .bd-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; }
  .bd-side { position: sticky; top: 12px; display: grid; gap: 14px; }
}
.bd-main { min-width: 0; }
.bd-side { min-width: 0; }
.bd-side .hd-panel { margin: 0; }

/* steps */
.bd-step { margin: 0 0 16px; }
.bd-step__no {
  margin: 0 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hd-accent);
}
.bd-step h2 { font-size: 20px; margin: 0 0 10px; }

.bd-english {
  width: 100%; min-height: 120px; padding: 12px 14px; font: inherit; font-size: 18px; line-height: 1.4; resize: vertical;
  background: #0B0C0E; color: #fff; border: 1px solid rgba(255, 255, 255, .28); border-radius: 4px; box-sizing: border-box;
}
.bd-english:focus-visible { outline: 2px solid var(--hd-accent); outline-offset: 1px; }
.bd-english::placeholder { color: #7C8390; }

.bd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.bd-chip {
  min-height: 36px; padding: 4px 12px; font: inherit; font-size: 14px; font-weight: 500; color: var(--hd-text-2); cursor: pointer;
  background: transparent; border: 1px solid var(--hd-line); border-radius: 4px; text-align: left;
}
.bd-chip:hover { border-color: rgba(255, 255, 255, .3); color: #fff; }
.bd-chip[aria-pressed="true"] { background: rgba(47, 208, 122, .14); border-color: var(--hd-accent); color: #fff; font-weight: 600; }
.bd-chip[disabled] { opacity: .45; cursor: not-allowed; }
.bd-chip--example { font-size: 13px; color: var(--hd-mute); }

/* the sport chooser: a search box over a chip grid that scrolls inside its own box when there are many sports */
.bd-sportgrid { display: grid; gap: 6px; }
.bd-sportsearch {
  width: 100%; max-width: 360px; min-height: 44px; padding: 0 12px; font: inherit; font-size: 16px; color: var(--hd-text);
  background: var(--hd-card-2); border: 1px solid var(--hd-line); border-radius: 4px;
}
.bd-sportsearch:focus-visible { outline: 2px solid var(--hd-accent); outline-offset: 1px; }
.bd-sportchips { max-height: 296px; overflow-y: auto; margin: 2px 0; padding-right: 2px; }
/* css/lh.css repaints every chip flat and hides which ones are picked; a picked chip (a sport, a market) is green again, a disabled one is dim */
.hounds-page .bd-chip[aria-pressed="true"] { background: rgba(47, 208, 122, .16); color: #fff; font-weight: 600; box-shadow: inset 0 0 0 1px var(--hd-accent); }
.hounds-page .bd-chip[disabled] { opacity: .4; cursor: not-allowed; }
/* css/lh.css turns every chip row in a step into a sideways-scrolling strip; a sport grid wraps instead, so all of it is visible and searchable */
.hounds-page .bd-step .bd-chips.bd-sportchips { flex-wrap: wrap; overflow-x: hidden; overflow-y: auto; }
.bd-sportgrid { min-width: 0; }
/* a rule card never grows past the phone: its chip strips scroll inside the card, they do not widen it */
.bd-cards { grid-template-columns: minmax(0, 1fr); }
.bd-card { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.bd-card .bd-field, .bd-card .bd-marketgroups, .bd-card .bd-marketgroup { min-width: 0; }
.bd-sportchips .bd-chip { min-height: 40px; }
.bd-note { margin: 4px 0 6px; }
.bd-chip:focus-visible, .bd-swatch:focus-visible, .bd-badge:focus-visible { outline: 2px solid var(--hd-accent); outline-offset: 1px; }

/* the character count under the English box, and the second reader's progress line */
.bd-countrow { margin: 4px 0 0; text-align: right; }
.bd-count[data-state="near"] { color: var(--hd-warn); }
.bd-count[data-state="limit"], .bd-count[data-state="over"] { color: var(--hd-bad); font-weight: 700; }
[data-hook="english-status"][data-kind="error"] { color: #FFD7DB; font-size: 14px; }
.bd-translator { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bd-translator[data-state="timeout"], .bd-translator[data-state="error"], .bd-translator[data-state="limit"] { color: var(--hd-warn); }
.bd-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--hd-line); border-top-color: var(--hd-accent); border-radius: 50%; flex: none; }
.bd-suggest { margin-top: 10px; }
.bd-suggest .btn { min-height: 36px; font-size: 14px; margin: 0 6px; }
.bd-unread__phrase { background: rgba(242, 184, 75, .18); border-radius: 3px; padding: 0 3px; color: #fff; }

.bd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 0; }
.bd-actions .btn, .bd-save .btn { min-height: 44px; }

.bd-read { margin-top: 12px; padding-top: 4px; border-top: 1px solid var(--hd-line); }
.bd-list { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 4px; color: var(--hd-text-2); font-size: 14px; }
.bd-list strong { color: #fff; font-weight: 600; }
.bd-list--warn li { border-left: 3px solid var(--hd-warn); padding-left: 10px; }

/* step 2 */
.bd-empty { padding: 14px; border: 1px dashed var(--hd-line); color: var(--hd-mute); font-size: 15px; border-radius: 4px; }
.bd-empty p { margin: 0; }
.bd-sentences {
  margin: 0 0 12px; padding: 12px 14px; background: var(--hd-card-2); border: 1px solid var(--hd-line); border-left: 3px solid var(--hd-accent);
  border-radius: 4px; color: var(--hd-text-2); font-size: 15px; line-height: 1.5;
}
.bd-sentence-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.bd-problems {
  margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--hd-bad); background: rgba(255, 107, 122, .08); color: #FFD7DB; border-radius: 4px; font-size: 14px;
}
.bd-problems p { margin: 0 0 4px; font-weight: 700; }
.bd-problems ul { margin: 0; padding-left: 18px; }

.bd-cards { display: grid; gap: 12px; margin-bottom: 12px; }
.bd-card { border: 1px solid var(--hd-line); background: var(--hd-card-2); border-radius: 6px; padding: 12px 14px 14px; display: grid; gap: 10px; }
.bd-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bd-card__title { margin: 0; font-size: 16px; font-weight: 700; }
.bd-x { min-height: 32px; padding: 0 10px; font-size: 13px; }
.bd-label { font-weight: 700; color: var(--hd-text); font-size: 14px; }
.bd-subhead { margin: 4px 0 6px; font-size: 14px; font-weight: 700; color: var(--hd-text); }
.bd-marketgroups { display: grid; gap: 6px; }
.bd-marketgroup { display: grid; gap: 2px; }
.bd-marketgroup .bd-label { font-weight: 500; color: var(--hd-mute); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.bd-marketgroup .bd-chips { margin: 2px 0; }
.bd-field { min-width: 0; }
.bd-field select, .bd-field input[type="text"], .bd-field input[type="number"] {
  min-height: 44px; padding: 8px 10px; background: #0B0C0E; border: 1px solid rgba(255, 255, 255, .28); color: #fff; font-size: 16px; width: 100%;
  box-sizing: border-box; border-radius: 4px;
}
.bd-field input:focus-visible, .bd-field select:focus-visible { outline: 2px solid var(--hd-accent); outline-offset: 1px; }
.bd-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.bd-conds { border-top: 1px solid var(--hd-line); padding-top: 8px; }
.bd-group { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--hd-line); border-radius: 4px; background: rgba(255, 255, 255, .02); }
.bd-group--2 { border-left: 3px solid var(--hd-warn); margin-left: 8px; }
.bd-group--3 { border-left: 3px solid var(--hd-flat); margin-left: 8px; }
.bd-group__head, .bd-group__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bd-group__head select, .bd-group__foot select {
  min-height: 40px; padding: 6px 10px; background: #0B0C0E; color: #fff; border: 1px solid rgba(255, 255, 255, .28); border-radius: 4px; font-size: 15px; max-width: 100%;
}
.bd-cond { padding: 8px 10px; border: 1px solid var(--hd-line); border-radius: 4px; background: var(--hd-card); display: grid; gap: 6px; }
.bd-cond__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bd-cond__name { color: #fff; font-size: 14px; }
.bd-cond__params { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }

.bd-globals { margin-top: 6px; }
.bd-globals__grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 6px; }

/* step 3 */
.bd-identity { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .bd-identity { grid-template-columns: minmax(0, 1fr) 260px; } }
.bd-identity__fields { display: grid; gap: 12px; }
.bd-swatches, .bd-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.bd-swatch {
  width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 2px solid transparent; background: var(--sw, #888); cursor: pointer;
  box-shadow: inset 0 0 0 2px #0E1116;
}
.bd-swatch[aria-checked="true"] { border-color: #fff; }
.bd-badge {
  width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  background: transparent; border: 1px solid var(--hd-line); border-radius: 6px; color: var(--hd-text-2);
}
.bd-badge[aria-checked="true"] { border-color: var(--hd-accent); background: rgba(47, 208, 122, .14); color: #fff; }
.bd-icon { display: block; }
.bd-dogcard { align-self: start; padding: 14px; border: 1px solid var(--hd-line); border-radius: 6px; background: var(--hd-card-2); }
.bd-dog { display: flex; align-items: center; gap: 12px; }
.bd-dog__badge {
  flex: none; width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--dog, #FF7A45); color: #0B0C0E;
}
.bd-dog__badge--sm { width: 36px; height: 36px; }
.bd-dog__text { min-width: 0; }
.bd-dog__name { margin: 0; font-size: 20px; font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.bd-dog__tag { margin: 2px 0 0; color: var(--hd-text-2); font-size: 14px; overflow-wrap: anywhere; }
.bd-dog__rule { margin: 6px 0 0; }
.bd-diff { margin: 12px 0; padding: 10px 14px; border: 1px solid var(--hd-line); border-left: 3px solid var(--hd-warn); border-radius: 4px; background: var(--hd-card-2); }
.bd-diff .bd-list { gap: 10px; }
.bd-diff__before { color: var(--hd-mute); font-size: 13px; }
.bd-diff__after { color: #fff; font-size: 14px; }
.bd-msg { margin: 8px 0; padding: 8px 12px; border: 1px solid var(--hd-line); border-left: 3px solid var(--hd-accent); border-radius: 4px; background: var(--hd-card-2); }
.bd-msg--warn { border-left-color: var(--hd-warn); }
.bd-save { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 0; }

/* the side column */
.bd-preview__count { margin: 4px 0 8px; font-size: 17px; font-weight: 650; color: #fff; }
.bd-picks { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; max-height: 340px; overflow: auto; }
.bd-pick { padding: 8px 10px; background: var(--hd-card-2); border: 1px solid var(--hd-line); border-radius: 4px; font-size: 14px; color: var(--hd-text-2); }
.bd-pick strong { color: #fff; }
.bd-pick__price { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: #fff; }
.bd-pick--over { opacity: .65; }
.bd-pick--over strong { text-decoration: line-through; text-decoration-thickness: 1px; }
.bd-doglist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bd-dogrow { display: flex; gap: 10px; align-items: flex-start; padding: 10px; background: var(--hd-card-2); border: 1px solid var(--hd-line); border-radius: 4px; }
.bd-dogrow__text { min-width: 0; flex: 1 1 auto; }
.bd-dogrow__text p { margin: 0 0 2px; }
.bd-dogrow__name a { color: #fff; font-weight: 700; }
.bd-dogrow summary { cursor: pointer; color: var(--hd-text-2); font-size: 13px; min-height: 28px; }
.bd-dogrow__actions { margin-top: 6px; }
.bd-dogrow__actions .btn { min-height: 36px; font-size: 14px; }

/* phone: a pill with the live count stays in view while the cards are being edited */
.bd-pill {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 20; padding: 10px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: #1A2029; color: #fff; border: 1px solid var(--hd-accent); text-align: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .5);
  /* a status line, never a button: a tap that lands on it must reach the Save button underneath */
  pointer-events: none;
}
.bd-pill[hidden] { display: none; }
@media (min-width: 1000px) { .bd-pill { display: none; } }
/* On a phone the site tab bar (lhnav.css, 760px and narrower) owns the bottom edge and sits above the pill (z-index 70 vs 20):
   the pill rode under it with only its top border showing (rebuild QA 2026-10-21). It rides above the bar instead. */
@media (max-width: 760px) { body:has(> .lh-tabbar) .bd-pill { bottom: calc(var(--lh-tabbar-h, 60px) + 12px + env(safe-area-inset-bottom, 0px)); } }
@media (max-width: 999px) { .bd-wrap { padding-bottom: 80px; } }
@media (prefers-reduced-motion: no-preference) {
  .bd-chip, .bd-swatch, .bd-badge { transition: background-color .12s ease, border-color .12s ease; }
  .bd-spinner { animation: bd-spin .9s linear infinite; }
  @keyframes bd-spin { to { transform: rotate(360deg); } }
}

/* the quiz doorway at the top of the builder (web/quiz.html) */
.bd-quizcta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 4px; font-size: 14px; color: var(--hd-mute); }
.bd-quizcta .btn { min-height: 40px; }

/* ---- R4 in the builder: "{n} of {m} games fit" and the ticket flip (web/js/reveal-fx.js; the quiz has the same moment in quiz.css) ------
   The count and every ticket are in the page at once. data-reveal="play" lasts 2.4 s at most (a tap on the panel sets "done"), and
   reduced motion never gets it: a 150 ms fade. */
.bd-count { font-variant-numeric: tabular-nums; }
.bd-keep-host { margin: 4px 0 12px; }
.bd-preview__retry { margin: 0 0 8px; }
.bd-preview__retry[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .bd-preview[data-reveal="play"] .bd-preview__count { animation: bd-fade .3s ease both; }
  .bd-preview[data-reveal="play"] .bd-pick { transform-origin: 50% 0; animation: bd-flip .45s cubic-bezier(.2, .7, .2, 1) calc(.5s + var(--i, 0) * 120ms) both; }
  .bd-preview[data-reveal="done"] .bd-pick { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bd-preview .bd-preview__count, .bd-preview .bd-pick { animation: bd-fade .15s ease both; }
}
@keyframes bd-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bd-flip { from { opacity: 0; transform: perspective(600px) rotateX(-90deg); } to { opacity: 1; transform: none; } }

/* ---- VISUAL PASS, 2026-10-20 (kennel-first rebuild): a plain 1-2-3 -----------------------------------------------------------------
   Scoped to the page (.bd-wrap), so the studio's embedded builder (web/js/builder-skeleton.js) keeps its own look. Class names and hooks
   are unchanged; this block only calms and orders the page: a big headline, one quiet line, three numbered steps (a ring with the number,
   a display heading, the work under it), one primary button per step, the preview and "My hounds" as soft tiles beside the steps. */
.hounds-page .bd-wrap { padding-top: var(--lh-s5, 24px); }
.hounds-page .bd-wrap .bd-head { margin: 0 0 var(--lh-s5, 24px); }
.hounds-page .bd-wrap .bd-head h1 {
  margin: 0 0 var(--lh-s2, 8px); font-family: var(--lh-font-display, 'Barlow Condensed', sans-serif); font-weight: 700; font-style: normal; text-transform: none;
  font-size: clamp(38px, 7.4vw, 60px); line-height: 1; letter-spacing: -.012em; color: var(--lh-ink, #F2F4F8);
}
.hounds-page .bd-wrap .bd-head .hd-lede { margin: 0 0 var(--lh-s2, 8px); font-size: 17px; line-height: 1.45; color: var(--lh-ink2, #C9D0DB); }
.bd-quizcta { margin: 0; gap: 8px; font-size: 14px; color: var(--hd-mute); }
/* base style: the picker in step 1 and the Gematria panel in step 2 */
.bd-style { margin: 12px 0 4px; }
.bd-style .bd-chips { margin: 4px 0 0; }
.bd-gematria { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--lh-line-2, rgba(255, 255, 255, .13)); border-radius: 12px; }
.bd-gematria p { overflow-wrap: anywhere; }
.bd-style__label { margin: 8px 0 2px; font-size: 13px; color: var(--lh-ink-2, #A3ABB8); }
.bd-textlink { color: var(--lh-ink, #F2F4F8); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--lh-line-2, rgba(255, 255, 255, .13)); }
.bd-textlink:hover { text-decoration-color: currentColor; }
.bd-textbtn {
  min-height: 44px; padding: 0 var(--lh-s2, 8px); background: none; border: 0; cursor: pointer; font: inherit; font-weight: 500; color: var(--lh-ink2, #C9D0DB);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--lh-line-2, rgba(255, 255, 255, .13));
}
.bd-textbtn:hover { color: var(--lh-ink, #F2F4F8); text-decoration-color: currentColor; }
.bd-textbtn[disabled] { opacity: .4; cursor: not-allowed; }
.hounds-page .bd-wrap > .hd-notice { margin: 0 0 var(--lh-s5, 24px); font-size: 12px; }

.hounds-page .bd-wrap .bd-step {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 14px; align-items: center; margin: 0 0 var(--lh-s6, 32px); padding: var(--lh-s5, 24px) 0 0;
  background: none; box-shadow: none; border-radius: 0; border-top: 1px solid var(--lh-line, rgba(255, 255, 255, .07));
}
.hounds-page .bd-wrap .bd-step:first-of-type { border-top: 0; padding-top: 0; }
.hounds-page .bd-wrap .bd-step > * { grid-column: 1 / -1; }
.hounds-page .bd-wrap .bd-step > .bd-step__no {
  grid-column: 1; grid-row: 1; display: grid; place-items: center; width: 36px; height: 36px; margin: 0; padding: 0; border-radius: 50%; background: none; height: 36px;
  font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--lh-accent, #2FD07A); box-shadow: inset 0 0 0 1.5px var(--lh-accent, #2FD07A);
}
.hounds-page .bd-wrap .bd-step > h2 {
  grid-column: 2; grid-row: 1; margin: 0; font-family: var(--lh-font-display, 'Barlow Condensed', sans-serif); font-weight: 700; font-size: 30px; line-height: 1.05;
  letter-spacing: -.012em; color: var(--lh-ink, #F2F4F8);
}
.hounds-page .bd-wrap .bd-step > h2 + * { margin-top: var(--lh-s4, 16px); }
.hounds-page .bd-wrap .bd-step > .bd-step__no + h2 ~ .bd-empty { margin-top: var(--lh-s4, 16px); }
@media (min-width: 700px) {
  .hounds-page .bd-wrap .bd-step > :not(.bd-step__no):not(h2) { grid-column: 2; }
}
.hounds-page .bd-english {
  background: var(--lh-soft, rgba(255, 255, 255, .05)); border: 1px solid var(--lh-line-2, rgba(255, 255, 255, .13)); border-radius: var(--lh-r-md, 12px);
  font-size: 19px; padding: 14px 16px;
}
.hounds-page .bd-english:focus-visible { border-color: var(--lh-accent, #2FD07A); outline: 0; box-shadow: var(--lh-focus, 0 0 0 2px var(--lh-accent)); }
.hounds-page .bd-chip { border-radius: var(--lh-r-pill, 999px); border-color: var(--lh-line, rgba(255, 255, 255, .07)); background: var(--lh-soft, rgba(255, 255, 255, .05)); }
.hounds-page .bd-wrap .bd-step .bd-actions { margin-top: var(--lh-s4, 16px); }
.hounds-page .bd-wrap .bd-sentences { border-radius: var(--lh-r-md, 12px); border: 0; border-left: 3px solid var(--lh-accent, #2FD07A); background: var(--lh-soft, rgba(255, 255, 255, .05)); font-size: 16px; }
.hounds-page .bd-wrap .bd-empty { border-radius: var(--lh-r-md, 12px); border-color: var(--lh-line-2, rgba(255, 255, 255, .13)); }
.hounds-page .bd-wrap .bd-dogcard { border: 0; border-radius: var(--lh-r-lg, 18px); background: var(--lh-soft, rgba(255, 255, 255, .05)); padding: var(--lh-s4, 16px); }
.hounds-page .bd-wrap .bd-save { margin-top: var(--lh-s4, 16px); }

.hounds-page .bd-side .hd-panel, .hounds-page .bd-side .hd-panel + .hd-panel {
  margin: 0; padding: var(--lh-s4, 16px); border: 0; box-shadow: none; border-radius: var(--lh-r-lg, 18px); background: var(--lh-soft, rgba(255, 255, 255, .05));
}
.hounds-page .bd-side .hd-panel h2 { font-family: var(--lh-font-display, 'Barlow Condensed', sans-serif); font-size: 24px; font-weight: 700; line-height: 1.05; margin: 0 0 var(--lh-s2, 8px); }
@media (max-width: 699px) {
  .hounds-page .bd-wrap .bd-step > h2 { font-size: 26px; }
}

/* ===== the step builder (2026-10-26): sports with the season, sliders, the price range with its floor, the live preview dock ===== */

/* the numbered step heads inside a rule card */
.bd-stephead { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; align-items: center; margin: 14px 0 2px; padding-top: 12px; border-top: 1px solid var(--hd-line); }
.bd-card > .bd-stephead:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.bd-stephead__no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(47, 208, 122, .16); color: #fff; font-size: 14px; font-weight: 700; }
.bd-stephead__title { margin: 0; font-size: 17px; font-weight: 700; }
.bd-stephead__note { grid-column: 2; margin: 2px 0 0; }
.bd-shortcut { margin: 0 0 8px; }

/* sport chips: a count line on each, a dimmed one carries its reason */
.bd-sportchips .bd-chip { max-width: 100%; white-space: normal; line-height: 1.3; }
.bd-chip--dim, .hounds-page .bd-chip.bd-chip--dim { opacity: .62; border-style: dashed; }
.bd-chip--dim[aria-pressed="true"] { opacity: .9; }
.bd-chip__why { display: block; font-size: 12px; font-weight: 400; color: var(--hd-mute, #9AA3B2); }
.bd-pickseason { margin: 4px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bd-pickseason .btn { min-height: 40px; }
.bd-quick { margin: 4px 0 8px; }
.bd-quick .bd-chip { font-size: 13px; }

/* a slider with its typed box beside it */
.bd-slider { display: grid; grid-template-columns: minmax(0, 1fr) 80px; gap: 12px; align-items: center; }
.bd-slider .bd-range { width: 100%; margin: 0; }
.bd-range { -webkit-appearance: none; appearance: none; height: 28px; background: transparent; accent-color: var(--hd-accent, #2FD07A); touch-action: pan-y; }
.bd-range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .22); }
.bd-range::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .22); }
.bd-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--hd-accent, #2FD07A); border: 2px solid #0B0C0E; }
.bd-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--hd-accent, #2FD07A); border: 2px solid #0B0C0E; }
.bd-range:focus-visible { outline: 2px solid var(--hd-accent, #2FD07A); outline-offset: 2px; }

/* the price range: the floor is drawn to the left of the track, so no thumb can reach it */
.bd-pricerange { margin: 4px 0 10px; }
.bd-pricerange__read { margin: 0 0 4px; font-weight: 650; color: #fff; }
.bd-pricerange__bar { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; }
.bd-pricerange__floor {
  position: relative; display: grid; place-items: center; min-height: 40px; padding: 2px 4px; border-radius: 4px; text-align: center; color: #FFD7DB;
  background: repeating-linear-gradient(135deg, rgba(255, 107, 122, .28) 0 6px, rgba(255, 107, 122, .1) 6px 12px); border-right: 3px solid var(--hd-bad, #FF6B7A);
}
.bd-pricerange__floor-no { font-size: 15px; font-weight: 800; line-height: 1; }
.bd-pricerange__floor-why { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.bd-pricerange__track { position: relative; height: 40px; }
.bd-pricerange__track::before { content: ""; position: absolute; left: 0; right: 0; top: 17px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .22); }
.bd-pricerange__fill { position: absolute; top: 17px; height: 6px; border-radius: 3px; background: var(--hd-accent, #2FD07A); left: var(--lo, 0%); right: calc(100% - var(--hi, 100%)); }
.bd-range--pair { position: absolute; left: 0; top: 6px; width: 100%; height: 28px; pointer-events: none; }
.bd-range--pair::-webkit-slider-runnable-track { background: transparent; }
.bd-range--pair::-moz-range-track { background: transparent; }
.bd-range--pair::-webkit-slider-thumb { pointer-events: auto; margin-top: 2px; }
.bd-range--pair::-moz-range-thumb { pointer-events: auto; }
.bd-pricerange__ends { display: flex; justify-content: space-between; margin: 0 0 0 74px; }

/* the live preview dock: sticky beside the steps on a wide screen, folded under its heading on a phone */
.bd-dock { min-width: 0; }
.bd-dock > summary {
  list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; padding: 0 14px; font-weight: 700; color: #fff;
  background: var(--hd-card-2, #1A2029); border: 1px solid var(--hd-line); border-radius: 6px;
}
.bd-dock > summary::-webkit-details-marker { display: none; }
.bd-dock > summary::after { content: "Show"; margin-left: auto; font-size: 13px; font-weight: 500; color: var(--hd-mute, #9AA3B2); }
.bd-dock[open] > summary::after { content: "Hide"; }
.bd-dock .bd-preview { max-height: 62vh; overflow-y: auto; margin-top: 6px; overscroll-behavior: contain; }
.bd-rail { display: contents; }
.bd-rail > .bd-dock { order: -1; }
@media (min-width: 1000px) {
  .bd-rail { display: grid; gap: 14px; align-content: start; position: sticky; top: 72px; min-width: 0; }
  .bd-rail > .bd-dock { order: 0; }
  .bd-rail > .bd-side { position: static; }
  .bd-dock--page > summary { cursor: default; }
  .bd-dock--page > summary::after { content: ""; }
  .bd-dock--page .bd-preview { max-height: calc(100vh - 330px); }
}
.hounds-page .bd-dock .hd-panel { position: relative; padding: var(--lh-s5, 20px); border-radius: 22px; box-shadow: inset 0 0 0 1px var(--lh-line, rgba(255, 255, 255, .09)), var(--lh-e1, none); }
.bd-preview__sub { margin: 14px 0 4px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--hd-mute, #9AA3B2); }
.bd-prule { margin: 0 0 6px; padding: 8px 12px; border-left: 3px solid var(--hd-accent, #2FD07A); background: rgba(255, 255, 255, .04); border-radius: 4px; }
.bd-prule[hidden] { display: none; }
.bd-prule__lead { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--hd-mute, #9AA3B2); }
.bd-prule__text { margin: 2px 0 0; font-size: 15px; line-height: 1.45; color: var(--hd-text-2, #D6DBE4); overflow-wrap: anywhere; }
.bd-hind { min-width: 0; }
.bd-hind__line { margin: 6px 0; font-size: 16px; line-height: 1.4; color: #fff; overflow-wrap: anywhere; }
.bd-hind__old { margin: 6px 0; font-size: 14px; color: var(--hd-mute, #9AA3B2); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .3); overflow-wrap: anywhere; }
.bd-hind .btn { min-height: 44px; }
.bd-versionnote { margin: 6px 0 0; }
/* a group and its condition blocks never grow past the card (a grid's implicit column is as wide as its widest select otherwise) */
.bd-group { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.bd-cond, .bd-cond__params, .bd-cond__params .bd-field { min-width: 0; }
.bd-cond__params select { max-width: 100%; }
.hounds-page .bd-sportchips .bd-chip { flex: 0 1 auto; max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.bd-dock .bd-side__dog { display: none; }
/* inside the kennel studio the dock is the first block of the builder and sticks to the top of the drawer while the steps scroll under it */
.bd-embedded > .bd-dock { position: sticky; top: 0; z-index: 30; margin: 0 0 16px; background: var(--hd-bg, #0E1116); }
/* base.css hides sideways overflow on html AND body, which turns body into a scroll container and stops position: sticky from working
   (the preview dock never stuck). `clip` hides the same overflow without making a scroll container. */
@supports (overflow: clip) { html, body { overflow-x: clip; } }

/* THE NEXT STEP after a save (hounds-build.js nextStepBlock; plan docs/HOUND_LOOP_PLAN.md phase 4): one primary, one quiet, one link. */
.bd-next { margin: 12px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--lh-soft, rgba(255, 255, 255, .06)); box-shadow: inset 3px 0 0 var(--lh-accent, #2FD07A); }
.bd-next__text { margin: 0 0 10px; font-weight: 600; overflow-wrap: anywhere; }
.bd-next__row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
