/* Parts for comfi.skin/what-broke-me-out/ on top of /kit/kit.css (rules in tools/web-tools/DESIGN.md). */

.bo-page { max-width: calc(880px + 2 * var(--gutter)); }
.bo-page .hero { padding-bottom: 20px; }
.bo-page .hero > nav { order: -2; }
.bo-also { justify-content: flex-start; margin-top: 16px; }
.bo-also .chip { background: var(--paper); box-shadow: var(--cast-low); color: var(--muted); }
.bo-also .chip:hover { background: var(--paper); color: var(--ink); }
.bo__hide { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bo__offscreen { position: fixed; top: 0; left: -200vw; }

/* ── Search pill + dropdown ──────────────────────────────────────── */
.bo__find { position: relative; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 10px 0 18px; border: 1px solid transparent; border-radius: var(--capsule); background: var(--fill); transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; }
.bo__find:focus-within { background: var(--paper); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.bo__glass { flex-shrink: 0; fill: none; stroke: var(--faint); stroke-width: 2.2; stroke-linecap: round; }
.bo__search { flex: 1; min-width: 0; min-height: 54px; border: 0; background: transparent; font-size: 16.5px; -webkit-appearance: none; appearance: none; }
.bo__search:focus { outline: 0; }
.bo__search::placeholder { color: var(--faint); }
.bo__search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.bo__x { width: 36px; height: 36px; flex-shrink: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.bo__x:hover { background: var(--outline); color: var(--ink); }
.bo__matches { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 8px); max-height: 280px; overflow-y: auto; border-radius: 20px; background: var(--paper); box-shadow: var(--cast), 0 0 0 1px var(--hairline); list-style: none; padding: 6px; }
.bo__match { display: block; width: 100%; border: 0; border-radius: 14px; background: none; padding: 10px 14px; text-align: left; font: inherit; font-size: 15.5px; line-height: 21px; color: var(--ink); cursor: pointer; }
li.bo__match { color: var(--muted); cursor: default; }
.bo__match--action { color: var(--accent); font-weight: 600; }
.bo__match:hover, .bo__match.is-on { background: var(--fill); }
li.bo__match:hover { background: none; }

.bo__full { margin-bottom: 4px; }
.bo__sub { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bo.is-paste-open #bo-toggle-paste { background: var(--ink); color: var(--surface); }

/* Inline paste drawer */
.bo__paste { margin-top: 14px; padding: 16px; border-radius: 22px; background: var(--fill); display: grid; gap: 10px; }
.bo__paste .field { background: var(--paper); border: 1px solid var(--outline); }
.bo__paste textarea.field { min-height: 104px; border-radius: 18px; }
.bo__paste-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Product tray inside .stage */
.bo__tray { margin-top: 16px; }
.bo__tray .row { min-height: 54px; padding: 10px 0; }
.bo__tray .row__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo__num { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: var(--surface); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bo__remove { width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.bo__remove:hover { background: var(--fill); color: var(--ink); }

.bo__hint { margin-top: 12px; font-size: 14.5px; color: var(--muted); }
.bo__hint:empty { display: none; }
.bo__status { margin-top: 8px; font-size: 14.5px; color: var(--tone-coral-ink); }
.bo__status:empty { display: none; }

/* ── Results ─────────────────────────────────────────────────────── */
.bo-result { margin-top: 18px; display: grid; gap: 16px; }
.bo-result > .paper + .paper { margin-top: 0; }
.bo-offer { margin-top: clamp(32px, 4vw, 48px); }
.bo-offer .get-card { margin-top: 0; }

.bo-summary__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px 20px; }
.bo-summary .verdict { align-items: flex-start; flex: 1 1 300px; min-width: 0; }
.bo-summary .verdict.is-plain .verdict__dot { background: var(--muted); }
.bo-summary__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex-shrink: 0; }
.bo-stats { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bo-stat { border-radius: var(--radius-tile); background: var(--fill); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.bo-stat__val { font-size: clamp(26px, 3vw, 34px); line-height: 1.05; font-weight: 700; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; color: var(--ink); }
.bo-stat__val.is-flag { color: var(--tone-coral-ink); }
.bo-stat__val.is-muted { color: var(--muted); }
.bo-stat__lbl { font-size: 13px; font-weight: 600; color: var(--muted); }

/* Overlap rows */
.bo-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 6px; }
.bo-card__head .paper__title { margin: 0; }
.bo-card__sub { font-size: 14.5px; color: var(--muted); margin-bottom: 10px; }

.bo-list .row { align-items: flex-start; min-height: 0; padding: 14px 0; }
.bo-list a.row__name { color: var(--ink); text-decoration: underline; text-decoration-color: var(--outline); text-underline-offset: 3px; }
.bo-list a.row__name:hover { text-decoration-color: var(--ink); }
.bo-ratio { min-width: 44px; min-height: 28px; padding: 2px 10px; justify-content: center; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.bo-ratio--all { background: var(--tone-coral-ink); color: var(--surface); }
.bo-ratio--part { background: var(--tone-sand); color: var(--tone-sand-ink); }
.bo-ratio--plain { background: var(--fill); color: var(--ink-soft); }

.bo-dots { display: flex; align-items: center; gap: 5px; flex-shrink: 0; padding-top: 2px; }
.bo-dot { width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; justify-content: center; background: var(--fill); color: var(--faint); border: 1px solid var(--outline); }
.bo-dot.is-in { background: var(--ink); color: var(--surface); border-color: var(--ink); }

.bo-empty-note { padding: 14px 0 4px; font-size: 15px; color: var(--muted); }

@media (max-width: 859px) {
  .bo-page .hero__art { display: none; }
}

@media (max-width: 560px) {
  .bo-page .hero { padding: 12px 0 18px; }
  .bo-page .hero__title { font-size: clamp(34px, 8.8vw, 88px); }
  .bo-page .hero__ask { margin-bottom: 8px; font-size: 18px; }
  .bo-page .hero__lede { margin-top: 12px; font-size: 16px; }
  .bo-summary__actions { width: 100%; }
  .bo-summary__actions .button { flex: 1 1 auto; }
  .bo-stats { gap: 8px; }
  .bo-stat { padding: 12px; }
  .bo-list .row { flex-wrap: wrap; row-gap: 8px; }
  .bo-list .row__words { flex-basis: calc(100% - 62px); }
  .bo-dots { width: 100%; padding-left: 58px; }
}
