/* Client blockers — the "can't ship" banner, the Home card, the Orders rows and
   the fix inbox sheet (CLIENT_BLOCKERS_PLAN.md; the chosen mock is
   mocks/blockers_c_inbox.html). v3 pages only. Tokens only, no hard-coded colour:
   red is for things the client must fix and nothing else. */

/* --- The banner, on every v3 page --- */
.cb-strip { position: sticky; top: var(--v3-header-h); z-index: 650; background: var(--hl-error-soft);
  border-bottom: 1px solid color-mix(in srgb, var(--hl-error) 40%, transparent); }
.cb-strip-inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--v3-s2) var(--v3-s3);
  max-width: var(--v3-content-max); margin: 0 auto; padding: 8px var(--v3-gutter); }
.cb-strip .v3-icon { color: var(--hl-error); }
.cb-strip-text { flex: 1 1 260px; font-size: var(--v3-text-small); line-height: 1.4; color: var(--hl-ink); }
.cb-strip-text strong { font-weight: 500; }
/* Offboarding: news, not a blocker — the neutral surface, never red. */
.cb-strip.cb-strip-info { background: var(--hl-surface-raised); border-bottom-color: var(--hl-hairline); }
.cb-strip.cb-strip-info .v3-icon { color: var(--hl-ink-muted); }

/* --- The highlighted part of a problem ("LIN-PILLOW-KG has no dimensions") --- */
.cb-hl { background: var(--hl-error-soft); color: var(--hl-error); border-radius: 3px; padding: 0 5px;
  font-weight: 500; overflow-wrap: anywhere; }

/* --- Home: the one wide summary card --- */
.cb-summary { border-left: 4px solid var(--hl-error); display: grid; gap: var(--v3-s6) var(--v3-s10);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; margin-bottom: var(--v3-s10);
  padding: clamp(20px, 3vw, 32px); }
.cb-sum-fig { font-size: var(--v3-text-h2); line-height: 1.1; font-weight: 500; margin: var(--v3-s2) 0; }
.cb-sum-sub { margin: 0 0 var(--v3-s5); color: var(--hl-ink-muted); }
.cb-sum-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--hl-hairline);
  border-radius: var(--v3-radius-card); overflow: hidden; }
.cb-sum-list li + li { border-top: 1px solid var(--hl-hairline); }
.cb-sum-btn { display: flex; align-items: center; gap: var(--v3-s3); width: 100%; padding: 12px var(--v3-s4);
  background: var(--hl-surface-raised); border: 0; color: var(--hl-ink); font: inherit; text-align: left; cursor: pointer;
  text-decoration: none; }
.cb-sum-btn:hover { background: var(--hl-surface-hover); }
.cb-sum-btn .v3-icon:first-child { color: var(--hl-error); }
.cb-sum-btn .t { flex: 1; min-width: 0; }
.cb-sum-btn .t b { display: block; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.cb-sum-btn .t span { display: block; font-size: var(--v3-text-small); color: var(--hl-ink-muted); }
.cb-sum-more { padding: 10px var(--v3-s4); font-size: var(--v3-text-small); color: var(--hl-ink-muted);
  background: var(--hl-surface-raised); }
@media (max-width: 800px) { .cb-summary { grid-template-columns: 1fr; } }

/* --- Orders: the red "Can't ship" rows --- */
.cb-rows { border: 1px solid var(--hl-hairline); border-radius: var(--v3-radius-card); overflow: hidden; }
.cb-orow { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) auto; gap: var(--v3-s2) var(--v3-s4);
  align-items: center; padding: var(--v3-s3) var(--v3-s4); background: var(--hl-surface); cursor: pointer; }
.cb-orow + .cb-orow { border-top: 1px solid var(--hl-hairline); }
.cb-orow:hover { background: var(--hl-surface-raised); }
.cb-orow .prob { line-height: 1.6; }
.cb-orow .sub { display: block; font-size: var(--v3-text-small); color: var(--hl-ink-muted); }
@media (max-width: 640px) {
  .cb-orow { grid-template-columns: 1fr auto; }
  .cb-orow .prob-cell { grid-column: 1 / -1; order: 3; }
}

/* --- Order detail: the issues banner --- */
.cb-issuebanner { margin-bottom: var(--v3-s6); }
.cb-issuebanner ul { list-style: none; margin: var(--v3-s2) 0 0; padding: 0; display: grid; gap: var(--v3-s2); }
.cb-issuebanner li { display: flex; flex-wrap: wrap; gap: var(--v3-s2) var(--v3-s3); align-items: center; }
.cb-issuebanner li > span { flex: 1 1 220px; }

/* --- The fix inbox sheet --- */
.cb-scrim { justify-content: flex-end; align-items: stretch; padding: 0; }
.cb-sheet { width: min(1040px, 100%); height: 100%; display: flex; flex-direction: column; background: var(--hl-bg);
  border-left: 1px solid var(--hl-hairline); box-shadow: var(--hl-shadow-float); color: var(--hl-ink);
  animation: cb-in var(--v3-med) var(--v3-ease-out); }
@keyframes cb-in { from { transform: translateX(32px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cb-sheet { animation: none; } }
@media (min-width: 761px) { .cb-sheet { border-radius: var(--v3-radius-sheet) 0 0 var(--v3-radius-sheet); overflow: hidden; } }
.cb-sheet-head { display: flex; align-items: center; gap: var(--v3-s3); padding: var(--v3-s4) var(--v3-s6); }
.cb-sheet-head h2 { margin: 0; font-size: var(--v3-text-h4); font-weight: 500; line-height: 1.2; }
.cb-sheet-head .sub { font-size: var(--v3-text-small); color: var(--hl-ink-muted); }
.cb-back { display: none; }
.cb-progress { height: 3px; background: var(--hl-hairline); }
.cb-progress i { display: block; height: 100%; width: 0; background: var(--hl-brand); transition: width var(--v3-med) var(--v3-ease); }
.cb-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 340px minmax(0, 1fr); }
.cb-list { overflow-y: auto; background: var(--hl-surface); border-right: 1px solid var(--hl-hairline); padding: var(--v3-s3); }
.cb-list h3 { margin: var(--v3-s3) var(--v3-s2) var(--v3-s2); }
.cb-detail { overflow-y: auto; display: flex; flex-direction: column; min-width: 0; }
.cb-detail-main { flex: 1; padding: var(--v3-s8); }
.cb-item { display: flex; gap: var(--v3-s3); align-items: flex-start; width: 100%; text-align: left; padding: var(--v3-s3);
  border: 1px solid transparent; border-radius: var(--v3-radius-card); background: transparent; color: var(--hl-ink);
  font: inherit; cursor: pointer; margin-bottom: 2px; }
.cb-item:hover { background: var(--hl-surface-hover); }
.cb-item.is-selected { background: var(--hl-surface-raised); border-color: var(--hl-outline); }
.cb-item > .v3-icon { color: var(--hl-error); margin-top: 1px; }
.cb-item-body { flex: 1; min-width: 0; }
.cb-item-title { display: block; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.cb-item-meta { display: flex; flex-wrap: wrap; gap: var(--v3-s2); align-items: center; margin-top: 4px;
  font-size: var(--v3-text-small); color: var(--hl-ink-muted); }
.cb-item.is-done { opacity: .65; cursor: default; }
.cb-item.is-done > .v3-icon { color: var(--hl-brand-text); }
.cb-d-tags { display: flex; flex-wrap: wrap; gap: var(--v3-s2); margin-bottom: var(--v3-s3); }
.cb-d-title { margin: 0; font-size: var(--v3-text-h3); line-height: 1.15; font-weight: 500; overflow-wrap: anywhere; }
.cb-d-lede { margin: var(--v3-s3) 0 0; color: var(--hl-ink-muted); max-width: 62ch; }
.cb-chips { display: flex; flex-wrap: wrap; gap: var(--v3-s2); align-items: center; margin-top: var(--v3-s4); }
.cb-facts { margin: var(--v3-s5) 0 0; padding: var(--v3-s4); border: 1px solid var(--hl-hairline); border-radius: var(--v3-radius-card);
  background: var(--hl-surface); display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--v3-s4); }
.cb-facts dt { font-size: var(--v3-text-caption); font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--hl-ink-muted); }
.cb-facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.cb-opts { border: 0; padding: 0; margin: var(--v3-s8) 0 0; display: grid; gap: var(--v3-s3); min-width: 0; }
.cb-opts legend { padding: 0; margin-bottom: var(--v3-s3); }
.cb-opt { display: flex; gap: var(--v3-s3); align-items: flex-start; padding: var(--v3-s4) var(--v3-s5);
  border: 1px solid var(--hl-outline); border-radius: var(--v3-radius-card); background: var(--hl-surface); cursor: pointer; }
.cb-opt:hover { background: var(--hl-surface-raised); }
.cb-opt:has(.cb-radio:checked) { border-color: var(--hl-brand); box-shadow: 0 0 0 1px var(--hl-brand); background: var(--hl-surface-raised); }
.cb-opt:has(.cb-radio:focus-visible) { outline: 2px solid var(--hl-brand); outline-offset: 2px; }
.cb-opt.is-off { opacity: .6; cursor: default; }
.cb-radio { accent-color: var(--hl-brand); width: 20px; height: 20px; margin: 3px 0 0; flex: none; }
.cb-opt-body { flex: 1; min-width: 0; }
.cb-opt-main { display: block; cursor: pointer; }
.cb-opt-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--v3-s2); font-size: var(--v3-text-body);
  font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.cb-opt-cons { display: block; margin-top: 2px; color: var(--hl-ink-muted); font-size: var(--v3-text-fixed); line-height: 1.45; }
.cb-extra { margin-top: var(--v3-s4); display: grid; gap: var(--v3-s3); }
.cb-opt:not(:has(.cb-radio:checked)) .cb-extra { display: none; }
.cb-dims { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--v3-s3); }
.cb-check { display: flex; gap: var(--v3-s2); align-items: flex-start; cursor: pointer; font-size: var(--v3-text-small); }
.cb-check input { accent-color: var(--hl-brand); width: 18px; height: 18px; margin: 1px 0 0; flex: none; }
.cb-more > summary { cursor: pointer; padding: var(--v3-s2) 0; color: var(--hl-ink-muted);
  font-size: var(--v3-text-small); font-weight: 500; }
.cb-more > summary:hover { color: var(--hl-ink); }
.cb-more[open] > summary { margin-bottom: var(--v3-s3); }
.cb-more-list { display: grid; gap: var(--v3-s3); }
.cb-foot { position: sticky; bottom: 0; background: var(--hl-bg); border-top: 1px solid var(--hl-hairline);
  padding: var(--v3-s4) var(--v3-s8); display: grid; gap: var(--v3-s3); }
.cb-foot .v3-banner { padding: var(--v3-s3) var(--v3-s4); font-size: var(--v3-text-small); line-height: 1.45; }
.cb-foot-row { display: flex; flex-wrap: wrap; gap: var(--v3-s3); align-items: center; }
.cb-foot-row .note { flex: 1 1 200px; font-size: var(--v3-text-small); color: var(--hl-ink-muted); }
.cb-done { display: grid; place-items: center; flex: 1; padding: var(--v3-s8); text-align: center; }
.cb-snack { position: fixed; z-index: 2000; left: var(--v3-s6); bottom: var(--v3-s6); max-width: min(560px, calc(100% - 32px)); }
@media (max-width: 760px) {
  .cb-sheet-head { padding: var(--v3-s3) var(--v3-gutter); }
  .cb-back { display: inline-flex; }
  .cb-grid { grid-template-columns: 1fr; }
  .cb-sheet[data-pane="list"] .cb-detail { display: none; }
  .cb-sheet[data-pane="detail"] .cb-list { display: none; }
  .cb-list { border-right: 0; padding: var(--v3-s3) 12px; }
  .cb-detail-main { padding: var(--v3-s5) var(--v3-gutter); }
  .cb-foot { padding: var(--v3-s3) var(--v3-gutter); }
  .cb-foot-row .v3-btn { flex: 1 1 100%; }
  .cb-opt { padding: var(--v3-s4); }
  .cb-dims { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cb-snack { left: 16px; right: 16px; bottom: auto; top: 72px; }
}

/* Order rules dialog */
.cb-rules-list { display: grid; gap: var(--v3-s2); margin-bottom: var(--v3-s4); }
.cb-rule-row { display: flex; gap: var(--v3-s3); align-items: center; padding: var(--v3-s2) var(--v3-s3);
  border: 1px solid var(--hl-hairline); border-radius: var(--v3-radius-card); background: var(--hl-surface); }
.cb-rule-row input { accent-color: var(--hl-brand); width: 18px; height: 18px; }
.cb-rule-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cb-rules-add { border: 0; padding: 0; margin: 0 0 var(--v3-s4); display: grid; gap: var(--v3-s3); min-width: 0; }
.cb-rules-add legend { padding: 0; margin-bottom: var(--v3-s2); }

/* Service choices: the mapping editor (Fulfillment → Service mapping) and the
   "Anything else" editor (there and Orders → Unmapped services). Layout only;
   colour comes from the tokens. One question per fieldset, option cards, and a
   pinned "What happens" footer with Save. */
/* Never taller than the window: the head and the foot stay in view and only
   the questions scroll. (100vh first for browsers without dvh.) */
dialog.svc-dlg { width: min(640px, calc(100vw - 16px)); max-width: none;
  max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px);
  margin: auto; padding: 0; overflow: hidden; }
dialog.svc-dlg[open] { display: flex; flex-direction: column; }
dialog.svc-dlg.small { width: min(560px, calc(100vw - 16px)); }
.svc-dlg > form { display: flex; flex-direction: column; min-height: 0; max-height: 100%; flex: 1 1 auto; }
.svc-head, .svc-foot { flex: none; }
.svc-dlg .v3-dialog-title { font-size: var(--v3-text-h4); margin: 0; overflow-wrap: anywhere; }
.svc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--v3-s3);
  padding: var(--v3-s5) var(--v3-s6) var(--v3-s3); border-bottom: 1px solid var(--hl-hairline); }
.svc-head p { margin: 2px 0 0; }
.svc-body { overflow-y: auto; padding: var(--v3-s4) var(--v3-s6) var(--v3-s5); display: grid; gap: var(--v3-s6);
  min-height: 0; flex: 1; }
.svc-foot { border-top: 1px solid var(--hl-hairline); padding: var(--v3-s4) var(--v3-s6); background: var(--hl-surface-raised);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--v3-s3); align-items: center; }
.svc-outcome { font-size: var(--v3-text-small); line-height: 1.45; min-width: 0; }
.svc-outcome .svc-lbl { display: block; font-size: var(--v3-text-caption); color: var(--hl-ink-muted); text-transform: uppercase; letter-spacing: .1em; }
.svc-outcome .svc-line { display: block; color: var(--hl-ink); font-weight: 500; overflow-wrap: anywhere; }
.svc-outcome .svc-intl, .svc-outcome .svc-live { display: block; color: var(--hl-ink-muted); font-size: var(--v3-text-caption); }
.svc-outcome .svc-live { color: var(--hl-brand-text); }
.svc-actions { display: flex; gap: var(--v3-s2); }
.svc-foot .v3-dialog-error { grid-column: 1 / -1; margin: 0; }
@media (max-width: 520px) {
  .svc-head, .svc-body, .svc-foot { padding-left: var(--v3-s4); padding-right: var(--v3-s4); }
  .svc-foot { grid-template-columns: 1fr; }
  .svc-actions { justify-content: flex-end; }
}
.svc-q { border: 0; margin: 0; padding: 0; min-width: 0; }
.svc-q legend { padding: 0; font-weight: 500; display: flex; gap: var(--v3-s2); align-items: baseline; }
.svc-q legend .n { color: var(--hl-brand-text); font-variant-numeric: tabular-nums; }
.svc-help { font-size: var(--v3-text-small); color: var(--hl-ink-muted); margin: 2px 0 var(--v3-s3); }
.svc-sublabel { font-size: var(--v3-text-small); font-weight: 500; margin: 0; }
.svc-field-err { color: var(--hl-error); font-size: var(--v3-text-small); margin: 6px 0 0; }
.svc-field-err:empty { display: none; }
.svc-opts { display: grid; gap: var(--v3-s2); }
.svc-opts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 520px) { .svc-opts.two { grid-template-columns: 1fr; } }
.svc-opt { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; cursor: pointer;
  border: 1px solid var(--hl-hairline); border-radius: var(--v3-radius-btn); background: var(--hl-surface);
  transition: border-color var(--v3-fast, .15s) var(--v3-ease); }
.svc-opt:hover { border-color: var(--hl-outline); }
.svc-opt:has(input:checked) { border-color: var(--hl-brand); background: var(--hl-brand-soft); }
.svc-opt:has(input:focus-visible) { outline: 2px solid var(--hl-brand); outline-offset: 2px; }
.svc-opt:has(input:disabled) { cursor: not-allowed; opacity: .7; }
.svc-opt input { accent-color: var(--hl-brand); width: 18px; height: 18px; margin: 3px 0 0; }
.svc-opt .t { font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.svc-opt .d { font-size: var(--v3-text-small); color: var(--hl-ink-muted); line-height: 1.4; overflow-wrap: anywhere; margin-top: 2px; }
.svc-opt .s { font-size: var(--v3-text-small); color: var(--hl-ink-secondary); line-height: 1.4; margin-top: 4px; overflow-wrap: anywhere; }
.svc-opt .s .usual { color: var(--hl-brand-text); font-size: var(--v3-text-caption); }
.svc-sub { margin: 0 0 var(--v3-s2) 28px; min-width: 0; }
@media (max-width: 520px) { .svc-sub { margin-left: 12px; } }
.svc-note { font-size: var(--v3-text-small); color: var(--hl-ink-muted); padding: 8px 12px; margin: var(--v3-s2) 0 0;
  border-left: 2px solid var(--hl-accent); background: var(--hl-accent-soft); border-radius: 0 var(--v3-radius-btn) var(--v3-radius-btn) 0; }
.svc-toggle { display: flex; gap: var(--v3-s3); align-items: center; cursor: pointer; }
/* v3.css sizes every `.v3 input[type="checkbox"]` 18x18, which outranks
   .v3-switch and squashes the track so the thumb lands on the text. */
.v3 .svc-toggle input.v3-switch { width: 48px; height: 28px; }
.svc-extra { display: grid; gap: var(--v3-s5); }
