/* Order builder (/browse) — store-ux 2026-11-18. Uses the tokens from styles.css. */
/* lead score / stacking badges (run 15) */
.ob-stack { margin-top: 4px; }
.ob-stack .pill { font-size: 11px; padding: 1px 7px; }
.pill-score.hi { background: #fee2e2; color: #991b1b; }
.pill-score.mid { background: #fef3c7; color: #92400e; }
.pill-score.lo { background: #e0f2fe; color: #075985; }
.pill-stacked { background: #ede9fe; color: #5b21b6; }
.pill-absentee { background: #f1f5f9; color: #334155; }
.ob-why { max-width: 340px; }
.ob-stack-f .ob-check { margin-top: 4px; }
.ob-wrap { max-width: 1280px; }
.ob-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.ob-head h2 { margin: 0 0 6px; }
.ob-steps { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; counter-reset: ob; font-size: 13px; color: var(--muted); }
.ob-steps li { counter-increment: ob; }
.ob-steps li::before { content: counter(ob); display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 11px; margin-right: 6px; }
.ob-head .ob-filter-toggle { display: none; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.ob { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
.ob-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); position: sticky; top: 64px; max-height: calc(100vh - 80px); overflow-y: auto; overscroll-behavior: contain; }
.ob-sec { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ob-sec-h, .ob-more summary { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.ob-more summary { cursor: pointer; margin: 0; list-style: none; }
.ob-more summary::-webkit-details-marker { display: none; }
.ob-more summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
.ob-more[open] summary { margin-bottom: 8px; }
.ob-n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 11px; }
.ob-sub { font-weight: 400; color: var(--muted); font-size: 12px; }
.ob-link { margin-left: auto; background: none; border: 0; color: var(--brand); font-size: 12px; cursor: pointer; padding: 2px 0; }
.ob-row-actions { display: flex; gap: 14px; margin: 6px 0 4px; }
.ob-row-actions .ob-link { margin-left: 0; }
.ob-input { font-size: 14px; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ob-chips button, .ob-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 11px; font-size: 13px; cursor: pointer; color: var(--ink); }
.ob-chip small { color: var(--muted); margin-left: 2px; }
.ob-chips button.on, .ob-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.ob-chip.on small { color: #dce6f5; }
.ob-list { max-height: 260px; overflow-y: auto; margin: 0 -6px; }
.ob-types { max-height: none; }
.ob-county, .ob-type { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.ob-county:hover, .ob-type:hover { background: #f4f6fa; }
.ob-county.on, .ob-type.on { background: var(--brand-soft); }
.ob-county.zero, .ob-type.zero { opacity: .55; }
.ob-county input, .ob-type input { margin-top: 3px; }
.ob-cn { min-width: 0; }
.ob-cmeta { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.ob-cmeta .fresh { color: var(--ok); }
.ob-cc { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; white-space: nowrap; }
.ob-cc small { display: block; font-weight: 400; color: var(--muted); font-size: 10.5px; }
.ob-dates { display: flex; gap: 8px; margin-top: 8px; }
.ob-dates label { flex: 1; font-size: 12px; color: var(--muted); }
.ob-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin: 6px 0; cursor: pointer; }
.ob-check input { margin-top: 3px; }
.ob-field { display: block; font-size: 12px; color: var(--muted); margin: 8px 0; }
.ob-field input { margin-top: 3px; }
.ob-range { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.ob-note { font-size: 12px; margin: 6px 0; }
.ob-side-foot { display: flex; gap: 8px; justify-content: space-between; padding: 12px 14px; position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); }
.ob-side-foot .ob-done { display: none; }

.ob-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; scroll-margin-top: 70px; }
.ob-total { font-size: 26px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ob-total-l { font-size: 15px; font-weight: 600; color: var(--muted); }
.ob-sum-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.ob-sum-sub strong { color: var(--ink); }
.ob-sum-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ob-incart { align-self: center; font-size: 13px; }
.ob-breakdown { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.ob-bd { font-size: 12px; background: #f4f6fa; border-radius: 6px; padding: 3px 8px; color: var(--muted); }
.ob-bd strong { color: var(--ink); font-weight: 600; }
.ob-warn { color: var(--warn); }
body.ob-loading .ob-total, body.ob-loading #ob-results { opacity: .55; transition: opacity .15s; }

.ob-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ob-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ob-inline select { width: auto; padding: 5px 8px; font-size: 13px; }
.ob-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
#ob-results table.ob-table { min-width: 0; }
table.ob-table td { vertical-align: top; }
table.ob-table td:nth-last-child(6) { white-space: nowrap; }
.ob-ck { width: 34px; }
.ob-r { text-align: right !important; }
.ob-price { white-space: nowrap; }
.ob-hint { color: var(--muted); font-size: 12px; }
.ob-legal { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ob-pill { font-size: 11px; }
/* distress lists (run 17): quick chips, type descriptions, sale date in the date cell */
.ob-quick { margin-top: 10px; }
.ob-quick .ob-sub { display: block; margin: 0 0 6px; }
.ob-tdesc { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 1px; }
.ob-sale { margin-top: 3px; }
.ob-datarow { margin-top: 3px; }
.ob-foot { font-size: 12px; margin-top: 18px; }
.ob-mbar { display: none; }

@media (max-width: 960px) {
  .ob { grid-template-columns: minmax(0, 1fr); }
  .ob-head .ob-filter-toggle { display: inline-block; }
  .ob-side { display: none; position: fixed; inset: 0; top: 0; z-index: 60; max-height: none; border-radius: 0; border: 0; }
  .ob-side.open { display: block; }
  body.ob-sheet { overflow: hidden; }
  .ob-side-foot .ob-done { display: inline-block; }
  .ob-list { max-height: 40vh; }
  .ob-summary { grid-template-columns: minmax(0, 1fr); }
  .ob-sum-actions { justify-content: flex-start; }
  .ob-mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(20,30,50,.08); padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
  .ob-mbar[hidden] { display: none; }
  body.ob-sheet .ob-mbar { display: none; }
  footer { padding-bottom: 80px; }
}
@media (max-width: 640px) {
  .ob-head { align-items: flex-start; }
  .ob-steps { display: none; }
  .ob-total { font-size: 22px; }
  .ob-table-wrap { border: 0; overflow: visible; }
  #ob-results table.ob-table, #ob-results table.ob-table tbody { display: block; width: 100%; min-width: 0; background: none; }
  #ob-results table.ob-table thead { display: none; }
  #ob-results table.ob-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
  #ob-results table.ob-table tr.in-cart { background: var(--brand-soft); }
  #ob-results table.ob-table td { display: block; padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; }
  #ob-results table.ob-table td.ob-ck { grid-column: 2; grid-row: 2; text-align: right; width: auto; }
  #ob-results table.ob-table td.ob-ck input { width: 22px; height: 22px; }
  #ob-results table.ob-table td.ob-price { grid-column: 2; grid-row: 1; }
  #ob-results table.ob-table td:not(.ob-ck):not(.ob-price) { grid-column: 1; }
}
