/* AI Brand Customization app (brand.html). Loads tokens.css + this file only.
   App chrome uses the Pixels brand blue; the live preview (.pv) uses the customer's brand
   through --pv-* variables set by js/brand.js. Spacing follows a 4/8px scale. */

:root {
  --brand: var(--color-brand-primary); /* #2563eb */
  --brand-hover: #1d4ed8;
  --brand-pressed: #1e40af;
  --brand-tint: var(--color-brand-primary-subtle); /* #eff6ff */
  --brand-ring: rgba(37, 99, 235, 0.24);
  --ink: var(--color-content-primary); /* #101828 */
  --ink-2: var(--color-content-secondary); /* #475467 */
  --ink-3: #667085;
  --ink-4: #98a2b3;
  --line: var(--color-border-primary); /* #eaecf0 */
  --line-strong: #d0d5dd;
  --page: #f8f9fc;
  --surface: #fff;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --warn: #b54708;
  --warn-bg: #fffaeb;
  --bad: #b42318;
  --bad-bg: #fef3f2;
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --sh-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --sh-md: 0 4px 16px rgba(16, 24, 40, 0.08);
  --t: 160ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --wrap: 1200px;
  --gutter: 32px;
  --top-h: 64px;
  --steps-h: 64px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-padding-top: calc(var(--top-h) + var(--steps-h) + 16px);
}
body.bc {
  margin: 0;
  min-height: 100vh;
  font: 400 14px/20px var(--font-family);
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
/* :where() keeps these resets at zero specificity so component classes always win */
:where(.bc) :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset, legend) {
  margin: 0;
  padding: 0;
}
:where(.bc) :where(fieldset) {
  border: 0;
  min-width: 0;
}
:where(.bc) :where(ul, ol) {
  list-style: none;
}
:where(.bc) :where(button, input, select) {
  font: inherit;
  color: inherit;
}
:where(.bc) :where(a) {
  color: inherit;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.bc-skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 16px;
  border-radius: var(--r);
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}
.bc-skip:focus {
  top: 12px;
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.bc-ico {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bc-ico--sm {
  width: 16px;
  height: 16px;
}
.bc-wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */
.bc-top {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--top-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.bc-top__in {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
}
.bc-top__logo {
  display: flex;
  border-radius: var(--r-sm);
}
.bc-top__logo img {
  display: block;
}
.bc-top__product {
  padding-left: 16px;
  border-left: 1px solid var(--line);
  font-weight: 500;
  color: var(--ink-2);
}
.bc-top__saved {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
}
.bc-top__saved .bc-ico {
  color: var(--ok);
}

/* ---------- Stepper (centered) ---------- */
.bc-steps {
  position: sticky;
  top: var(--top-h);
  z-index: 29;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.bc-steps__list {
  display: flex;
  align-items: center;
  justify-content: safe center;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 8px;
  height: var(--steps-h);
  padding-inline: var(--gutter);
}
.bc-step {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bc-step + .bc-step::before {
  content: '';
  width: 40px;
  height: 1px;
  margin-right: 8px;
  background: var(--line-strong);
}
.bc-step.is-done + .bc-step::before {
  background: var(--brand);
}
.bc-step__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--r);
  background: none;
  color: var(--ink-3);
  font-weight: 500;
  white-space: nowrap;
  cursor: default;
}
button.bc-step__btn {
  cursor: pointer;
}
button.bc-step__btn:hover {
  background: var(--brand-tint);
}
.bc-step__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  font-size: 13px;
  font-weight: 600;
  background: var(--surface);
}
.bc-step.is-current .bc-step__btn {
  color: var(--ink);
}
.bc-step.is-current .bc-step__n {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.bc-step.is-done .bc-step__btn {
  color: var(--ink-2);
}
.bc-step.is-done .bc-step__n {
  border-color: var(--brand);
  color: var(--brand);
}

/* ---------- Layout ---------- */
.bc-main {
  padding: 32px 0 calc(72px + 48px);
}
.bc-screen:focus {
  outline: none;
}
.bc-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 720px;
  margin-bottom: 24px;
}
.bc-head--row {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
}
.bc-head--row > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 720px;
}
.bc-eyebrow {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}
.bc-h1 {
  font-size: 28px;
  line-height: 36px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.bc-h1:focus {
  outline: none;
}
.bc-lead {
  font-size: 15px;
  line-height: 22px;
  color: var(--ink-2);
}
.bc-jump {
  display: none;
  align-items: center;
  gap: 4px;
  width: fit-content;
  font-weight: 500;
  color: var(--brand) !important;
  text-decoration: none;
}
.bc-center {
  display: flex;
  justify-content: center;
}

/* ---------- Cards ---------- */
.bc-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
}
.bc-card__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  float: left; /* lets the legend sit inside the flex card like a normal block */
  width: 100%;
  padding: 0;
}
.bc-card__head + * {
  clear: both;
}
.bc-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: var(--ink);
}
.bc-card__desc {
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-3);
}
.bc-optional {
  padding: 2px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--ink-2);
}

/* ---------- Form controls ---------- */
.bc-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.bc-label {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--ink);
}
.bc-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 14px;
  box-shadow: var(--sh-xs);
  transition:
    border-color var(--t) var(--ease),
    box-shadow var(--t) var(--ease);
}
.bc-input::placeholder {
  color: var(--ink-4);
}
.bc-input:hover {
  border-color: #98a2b3;
}
.bc-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.bc-input[aria-invalid='true'] {
  border-color: #f04438;
}
.bc-input[aria-invalid='true']:focus {
  box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.2);
}
.bc-input:disabled {
  background: #f9fafb;
  color: var(--ink-3);
}
select.bc-input {
  appearance: none;
  padding-right: 36px;
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E")
    no-repeat right 10px center;
}
.bc-error {
  display: flex;
  gap: 6px;
  font-size: 13px;
  line-height: 18px;
  color: var(--bad);
}
.bc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.bc-row--3 {
  grid-template-columns: 1fr 1fr 1.4fr;
}

/* Brand color */
.bc-color {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.bc-swatches {
  display: flex;
  gap: 8px;
}
.bc-swatch {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-strong);
  cursor: pointer;
  transition: box-shadow var(--t) var(--ease);
}
.bc-swatch[aria-pressed='true'] {
  box-shadow: 0 0 0 2px var(--ink);
}
.bc-color__pick {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: conic-gradient(#f04438, #fdb022, #12b76a, #2e90fa, #7a5af8, #ee46bc, #f04438);
  box-shadow: 0 0 0 1px var(--line-strong);
  cursor: pointer;
}
.bc-color__pick input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.bc-input--hex {
  width: 112px;
  margin-left: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}
.bc-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r);
  font-size: 13px;
  line-height: 18px;
}
.bc-note:empty {
  display: none;
}
.bc-note .bc-ico {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}
.bc-note--ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.bc-note--warn {
  background: var(--warn-bg);
  color: var(--warn);
}

/* Fonts */
.bc-fonts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.bc-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
  transition:
    border-color var(--t) var(--ease),
    background-color var(--t) var(--ease);
}
.bc-opt:hover {
  border-color: #98a2b3;
}
.bc-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.bc-opt:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-tint);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.bc-opt:has(input:focus-visible) {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.bc-opt__aa {
  font-size: 22px;
  line-height: 1;
  font-weight: 500;
  width: 32px;
}
.bc-opt__t {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.bc-opt__t b {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-opt__t small {
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Segmented controls */
.bc-seg {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r);
  background: #f2f4f7;
}
.bc-seg label {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  font-weight: 500;
  color: var(--ink-2);
  text-align: center;
  cursor: pointer;
  transition:
    background-color var(--t) var(--ease),
    color var(--t) var(--ease);
}
.bc-seg label small {
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  color: var(--ink-3);
}
.bc-seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.bc-seg label:hover {
  color: var(--ink);
}
.bc-seg label:has(input:checked) {
  background: var(--surface);
  color: var(--ink);
  box-shadow:
    var(--sh-xs),
    0 0 0 1px var(--line);
}
.bc-seg label:has(input:focus-visible) {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}
.bc-range {
  display: grid;
  grid-template-columns: auto 1fr 48px;
  align-items: center;
  gap: 16px;
}
.bc-range input {
  width: 100%;
  accent-color: var(--brand);
}
.bc-range__val {
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink-2);
}

/* Logo */
.bc-drop__zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
  background: #fcfcfd;
  color: var(--ink-3);
  text-align: center;
  cursor: pointer;
  transition:
    border-color var(--t) var(--ease),
    background-color var(--t) var(--ease);
}
.bc-drop__zone b {
  color: var(--brand);
  font-weight: 500;
}
.bc-drop__zone:hover,
.bc-drop.is-over .bc-drop__zone {
  border-color: var(--brand);
  background: var(--brand-tint);
}
#f-logo:focus-visible + .bc-drop__zone {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.bc-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.bc-file__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 6px;
  border-radius: var(--r-sm);
  background: repeating-conic-gradient(#f2f4f7 0 25%, #fff 0 50%) 0 0 / 12px 12px;
  flex: none;
}
.bc-file__thumb img {
  max-width: 100%;
  max-height: 100%;
}
.bc-file__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.bc-file__meta b {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-file__meta small {
  font-size: 12px;
  color: var(--ink-3);
}

/* ---------- Buttons ---------- */
.bc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--r);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--t) var(--ease),
    border-color var(--t) var(--ease),
    color var(--t) var(--ease),
    box-shadow var(--t) var(--ease);
}
.bc-btn--sm {
  height: 36px;
  padding: 0 12px;
}
.bc-btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--sh-xs);
}
.bc-btn--primary:hover:not(:disabled) {
  background: var(--brand-hover);
}
.bc-btn--primary:active:not(:disabled) {
  background: var(--brand-pressed);
}
.bc-btn--secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: var(--sh-xs);
}
.bc-btn--secondary:hover:not(:disabled) {
  background: #f9fafb;
}
.bc-btn--link {
  height: auto;
  margin-left: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
}
.bc-btn--link:hover {
  text-decoration: underline;
}
.bc-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}
.bc-btn.is-busy {
  cursor: progress;
  opacity: 0.85;
}
.bc-spin {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: bc-spin 0.7s linear infinite;
}
@keyframes bc-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Action bar ---------- */
.bc-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.bc-actions__in {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 72px;
}
.bc-actions__hint {
  margin-left: auto;
  font-size: 13px;
  color: var(--ink-3);
  text-align: right;
}
.bc-actions [hidden] + .bc-actions__hint {
  margin-left: 0;
}

/* ---------- Toggle (Light / Dark) ---------- */
.bc-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r);
  background: #f2f4f7;
}
.bc-toggle:empty {
  display: none;
}
.bc-toggle button {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
}
.bc-toggle button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow:
    var(--sh-xs),
    0 0 0 1px var(--line);
}

/* ---------- Screen 2: split ---------- */
.bc-split {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.bc-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bc-preview {
  position: sticky;
  top: calc(var(--top-h) + var(--steps-h) + 24px);
  gap: 16px;
}
.bc-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
}

/* ---------- Alerts ---------- */
.bc-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid;
  border-radius: var(--r-lg);
  font-size: 14px;
  line-height: 20px;
}
.bc-alert b {
  display: block;
  font-weight: 600;
}
.bc-alert:focus {
  outline: none;
}
.bc-alert--error {
  background: var(--bad-bg);
  border-color: #fecdca;
  color: var(--bad);
}

/* ---------- Screen 3: generating ---------- */
.bc-gen {
  width: 100%;
  max-width: 560px;
  margin-top: 24px;
  align-items: center;
  gap: 24px;
  padding: 40px 32px;
  text-align: center;
}
.bc-gen__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand);
}
.bc-gen__icon--bad {
  background: var(--bad-bg);
  color: var(--bad);
}
.bc-gen__icon .bc-spin {
  width: 24px;
  height: 24px;
  border-width: 2.5px;
}
.bc-gen__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bc-gen__bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #f2f4f7;
  overflow: hidden;
}
.bc-gen__bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--brand);
  transition: width 300ms linear;
}
.bc-gen__steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  text-align: left;
}
.bc-gen__steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-4);
}
.bc-gen__steps li.is-done {
  color: var(--ink-2);
}
.bc-gen__steps li.is-active {
  color: var(--ink);
  font-weight: 500;
}
.bc-gen__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  flex: none;
}
.is-done .bc-gen__dot {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.is-active .bc-gen__dot {
  border-color: var(--brand);
}
.bc-gen__dot .bc-ico {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}
.bc-gen__btns {
  display: flex;
  gap: 12px;
}

/* ---------- Screen 4: review ---------- */
.bc-review {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
.bc-review .bc-card--wide {
  grid-column: 1 / -1;
}
.rv-scale {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
}
.rv-scale + .rv-scale {
  margin-top: 0;
}
.rv-sw {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  min-height: 64px;
  padding: 8px 6px;
  font-size: 11px;
  line-height: 14px;
}
.rv-sw b {
  font-weight: 600;
}
.rv-sw span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  opacity: 0.85;
}
.rv-sw.is-key {
  box-shadow: inset 0 0 0 2px currentColor;
}
.rv-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rv-group__t {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.rv-semantic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.rv-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 13px;
}
.rv-chip i {
  width: 24px;
  height: 24px;
  border-radius: var(--r-sm);
  flex: none;
}
.rv-chip small {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--ink-3);
}
.rv-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rv-check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--r);
  background: #f9fafb;
  font-size: 13px;
}
.rv-check__pair {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 24px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 12px;
  flex: none;
}
.rv-check__t {
  flex: 1;
  color: var(--ink-2);
}
.rv-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
  white-space: nowrap;
}
.rv-badge--ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.rv-badge--warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.rv-badge--brand {
  background: var(--brand-tint);
  color: var(--brand);
}
.rv-type {
  display: flex;
  flex-direction: column;
}
.rv-type__row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.rv-type__row:last-child {
  border-bottom: 0;
}
.rv-type__row > small {
  font-size: 12px;
  color: var(--ink-3);
}
.rv-type__row > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}
.rv-type__row > code {
  font-size: 12px;
  color: var(--ink-3);
}
.rv-radius {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.rv-radius__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
}
.rv-radius__item b {
  color: var(--ink);
  font-weight: 500;
  font-size: 13px;
}
.rv-radius__shape {
  width: 100%;
  height: 56px;
  border: 2px solid var(--rv-primary, var(--brand));
  background: var(--rv-tint, var(--brand-tint));
}
.rv-kv {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.rv-kv div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border-radius: var(--r);
  background: #f9fafb;
}
.rv-kv small {
  font-size: 12px;
  color: var(--ink-3);
}
.rv-kv b {
  font-weight: 500;
}
.rv-logo {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
}
.rv-logo figure {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rv-logo figcaption {
  font-size: 12px;
  color: var(--ink-3);
}
.rv-logo__frame {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.rv-logo__frame--side {
  flex-direction: column;
  justify-content: center;
}
.rv-logo__frame--icon {
  justify-content: center;
}

/* ---------- Screen 5: packages ---------- */
.bc-pkgs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.bc-pkg {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--sh-xs);
  cursor: pointer;
  transition:
    border-color var(--t) var(--ease),
    box-shadow var(--t) var(--ease);
}
.bc-pkg:hover {
  border-color: var(--line-strong);
}
.bc-pkg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.bc-pkg:has(input:checked) {
  border-color: var(--brand);
  box-shadow:
    0 0 0 1px var(--brand),
    var(--sh-md);
}
.bc-pkg:has(input:focus-visible) {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
.bc-pkg__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.bc-pkg__name {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bc-pkg__name b {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
}
.bc-pkg__name small {
  font-size: 13px;
  color: var(--ink-3);
}
.bc-radio {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  flex: none;
  margin-top: 4px;
}
.bc-pkg:has(input:checked) .bc-radio {
  border: 6px solid var(--brand);
}
.bc-pkg__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.bc-pkg__price small {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-3);
  letter-spacing: 0;
}
.bc-pkg__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.bc-pkg__list li {
  display: flex;
  gap: 12px;
  color: var(--ink-2);
}
.bc-pkg__list .bc-ico {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--brand);
  stroke-width: 2.2;
}
.bc-pkg__why {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-radius: var(--r);
  background: var(--brand-tint);
  font-size: 13px;
  line-height: 18px;
  color: #1e40af;
}
.bc-pkg__why .bc-ico {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}
.bc-pkg__meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
}
.bc-pkg__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.bc-pkg__meta .bc-ico {
  width: 16px;
  height: 16px;
  color: var(--ink-3);
}

/* ---------- Screen 6: payment ---------- */
.bc-pay {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  align-items: start;
}
.bc-pay__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bc-secure {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bc-demo {
  padding: 12px;
  border-radius: var(--r);
  background: #f9fafb;
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-3);
}
.bc-demo code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #eaecf0;
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}
.bc-summary {
  position: sticky;
  top: calc(var(--top-h) + var(--steps-h) + 24px);
  gap: 16px;
}
.bc-summary__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.bc-mono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r);
  font-weight: 600;
  font-size: 16px;
  flex: none;
  overflow: hidden;
}
.bc-mono img {
  max-width: 80%;
  max-height: 80%;
}
.bc-summary__brand div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.bc-summary__brand b {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-summary__brand small {
  font-size: 12px;
  color: var(--ink-3);
}
.bc-dl {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bc-dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.bc-dl dt {
  color: var(--ink-3);
}
.bc-dl dd {
  font-weight: 500;
  text-align: right;
}
.bc-dl--total {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.bc-dl--total dt,
.bc-dl--total dd {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.bc-lock {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
}

/* ---------- Screen 7: confirmation ---------- */
.bc-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 640px;
  margin-top: 16px;
  text-align: center;
}
.bc-done__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok);
  box-shadow: 0 0 0 8px rgba(6, 118, 71, 0.06);
}
.bc-done__icon .bc-ico {
  width: 28px;
  height: 28px;
  stroke-width: 2.4;
}
.bc-done__msg {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bc-done__msg .bc-lead {
  font-size: 16px;
  line-height: 24px;
  color: var(--ink);
}
.bc-done .bc-card {
  width: 100%;
  text-align: left;
}
.bc-timeline {
  display: flex;
  flex-direction: column;
}
.bc-timeline li {
  position: relative;
  display: flex;
  gap: 12px;
  padding-bottom: 20px;
}
.bc-timeline li:last-child {
  padding-bottom: 0;
}
.bc-timeline li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 11px;
  top: 26px;
  bottom: 2px;
  width: 2px;
  background: var(--line);
}
.bc-timeline li.is-done:not(:last-child)::after {
  background: var(--brand);
}
.bc-timeline__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  flex: none;
}
.is-done .bc-timeline__dot {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.is-active .bc-timeline__dot {
  border-color: var(--brand);
}
.is-active .bc-timeline__dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  animation: bc-pulse 1.4s ease-in-out infinite;
}
@keyframes bc-pulse {
  50% {
    opacity: 0.3;
  }
}
.bc-timeline__dot .bc-ico {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}
.bc-timeline div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bc-timeline b {
  font-weight: 500;
}
.bc-timeline small {
  font-size: 13px;
  color: var(--ink-3);
}
.bc-done__btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ---------- Toast ---------- */
.bc-toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--r);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--sh-md);
  transform: translateX(-50%);
}
.bc-toast button {
  border: 0;
  background: none;
  color: #93c5fd;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   Live preview: a small app built from Pixels components, themed by --pv-* vars.
   ========================================================================== */
.pv {
  --pv-gap: calc(16px * var(--pv-density, 1));
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--pv-bg);
  color: var(--pv-text);
  font-family: var(--pv-font);
  overflow: hidden;
  transition:
    background-color 150ms,
    color 150ms;
}
.pv * {
  box-sizing: border-box;
}
.pv-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px var(--pv-gap);
  background: var(--pv-surface);
  border-bottom: 1px solid var(--pv-border);
}
.pv-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  min-width: 0;
}
.pv-brand span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.pv-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--pv-r-sm);
  background: var(--pv-primary);
  color: var(--pv-on-primary);
  font-size: 13px;
  font-weight: 700;
  flex: none;
  overflow: hidden;
}
.pv-logo--img {
  width: auto;
  max-width: 96px;
  background: none;
}
.pv-logo--img img {
  height: 28px;
  width: auto;
  max-width: 96px;
  object-fit: contain;
}
.pv-links {
  display: flex;
  gap: 4px;
  margin-left: 8px;
  font-size: 13px;
}
.pv-links span {
  padding: 6px 10px;
  border-radius: var(--pv-r-sm);
  color: var(--pv-text-2);
}
.pv-links span.is-on {
  background: var(--pv-tint);
  color: var(--pv-link);
  font-weight: 500;
}
.pv-avatar {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--pv-tint-2);
  color: var(--pv-link);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex: none;
}
.pv-body {
  display: flex;
  flex-direction: column;
  gap: var(--pv-gap);
  padding: calc(var(--pv-gap) * 1.25) var(--pv-gap);
}
.pv-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.pv-title h3 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  margin: 0;
}
.pv-title p {
  font-size: 13px;
  color: var(--pv-text-2);
  margin: 2px 0 0;
}
.pv-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: calc(36px * var(--pv-density, 1));
  min-height: 32px;
  padding: 0 calc(14px * var(--pv-density, 1));
  border: 1px solid transparent;
  border-radius: var(--pv-r);
  font: 500 13px/1 var(--pv-font);
  cursor: default;
  white-space: nowrap;
}
.pv-btn--primary {
  background: var(--pv-primary);
  color: var(--pv-on-primary);
  box-shadow: var(--pv-shadow-sm);
}
.pv-btn--secondary {
  background: var(--pv-surface);
  border-color: var(--pv-border-strong);
  color: var(--pv-text);
  box-shadow: var(--pv-shadow-sm);
}
.pv-btn--tertiary {
  background: transparent;
  color: var(--pv-link);
}
.pv-alert {
  display: flex;
  gap: 10px;
  padding: calc(12px * var(--pv-density, 1)) 14px;
  border-radius: var(--pv-r);
  background: var(--pv-tint);
  border: 1px solid var(--pv-tint-2);
  font-size: 13px;
  line-height: 18px;
}
.pv-alert b {
  font-weight: 600;
  color: var(--pv-link);
}
.pv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--pv-gap);
}
.pv-card {
  display: flex;
  flex-direction: column;
  gap: calc(12px * var(--pv-density, 1));
  padding: var(--pv-gap);
  border: 1px solid var(--pv-border);
  border-radius: var(--pv-r-lg);
  background: var(--pv-surface);
  box-shadow: var(--pv-shadow);
}
.pv-card h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.pv-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}
.pv-input {
  display: flex;
  align-items: center;
  height: calc(36px * var(--pv-density, 1));
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--pv-border-strong);
  border-radius: var(--pv-r);
  background: var(--pv-surface);
  font-size: 13px;
  font-weight: 400;
  color: var(--pv-text-3);
}
.pv-input.is-focus {
  border-color: var(--pv-primary);
  box-shadow: 0 0 0 3px var(--pv-ring);
  color: var(--pv-text);
}
.pv-checks {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 400;
}
.pv-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pv-box {
  width: 16px;
  height: 16px;
  border-radius: min(4px, var(--pv-r-sm));
  background: var(--pv-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pv-on-primary);
}
.pv-switch {
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: var(--pv-primary);
  position: relative;
}
.pv-switch::after {
  content: '';
  position: absolute;
  right: 2px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
}
.pv-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pv-stat small {
  font-size: 12px;
  color: var(--pv-text-2);
}
.pv-stat b {
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
}
.pv-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--pv-tint-2);
  overflow: hidden;
}
.pv-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--pv-primary);
}
.pv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.pv-table th,
.pv-table td {
  padding: calc(10px * var(--pv-density, 1)) 12px;
  border-bottom: 1px solid var(--pv-border);
  text-align: left;
}
.pv-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pv-text-2);
  background: var(--pv-subtle);
}
.pv-table tr:last-child td {
  border-bottom: 0;
}
.pv-table-card {
  padding: 0;
  overflow: hidden;
  gap: 0;
}
.pv-pill {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}
.pv-pill--brand {
  background: var(--pv-tint);
  color: var(--pv-link);
}
.pv-pill--ok {
  background: var(--pv-ok-bg);
  color: var(--pv-ok);
}
.pv-pill--muted {
  background: var(--pv-subtle);
  color: var(--pv-text-2);
}
.pv-a {
  color: var(--pv-link);
  font-weight: 500;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .bc-split,
  .bc-pay {
    grid-template-columns: 1fr;
  }
  .bc-preview,
  .bc-summary {
    position: static;
  }
  .bc-summary {
    order: -1;
  }
  .bc-jump {
    display: inline-flex;
  }
}
@media (max-width: 860px) {
  .bc-review {
    grid-template-columns: 1fr;
  }
  .bc-step__label {
    display: none;
  }
  .bc-step.is-current .bc-step__label {
    display: inline;
  }
  .bc-steps__list {
    gap: 4px;
  }
  .bc-step {
    gap: 4px;
  }
  .bc-step + .bc-step::before {
    width: 12px;
    margin-right: 0;
  }
  .bc-step__btn {
    padding: 4px;
  }
  .bc-jump {
    display: inline-flex;
  }
  .bc-top__product {
    display: none;
  }
}
@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }
  .bc-main {
    padding-top: 24px;
  }
  .bc-h1 {
    font-size: 24px;
    line-height: 32px;
  }
  .bc-head--row {
    flex-direction: column;
    align-items: flex-start;
  }
  .bc-pkgs,
  .bc-row,
  .bc-row--3,
  .bc-fonts,
  .pv-grid {
    grid-template-columns: 1fr;
  }
  .rv-scale {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .rv-semantic,
  .rv-radius {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rv-kv,
  .rv-logo {
    grid-template-columns: 1fr;
  }
  .rv-type__row {
    grid-template-columns: 72px 1fr;
  }
  .rv-type__row > code {
    display: none;
  }
  .pv-links {
    display: none;
  }
  .bc-top__saved {
    display: none;
  }
  .bc-top__in .bc-btn {
    margin-left: auto;
  }
  .bc-actions__hint {
    display: none;
  }
  .bc-actions__in > .bc-btn--primary {
    margin-left: auto;
  }
}
/* Confirmation: "send us your order" card (used when no orderEndpoint is set) */
.bc-send {
  border-color: var(--brand);
  background: var(--brand-50, #eff6ff);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.bc-send.is-sent {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--sh-xs);
}
.bc-send .bc-card__title .bc-ico {
  color: var(--ok);
}
.bc-send .bc-btn {
  align-self: flex-start;
  gap: 8px;
}

/* ---------- Customize on desktop: fixed workspace ----------
   The page itself doesn't scroll. The form scrolls in its own column and the live preview stays put,
   scaled down (in JS, fitPreview) when the screen is too short to show all of it. */
@media (min-width: 1081px) {
  body.bc[data-screen='customize'] .bc-main {
    padding: 0;
  }
  #s-customize > .bc-wrap {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--top-h) - var(--steps-h) - 72px);
    height: calc(100dvh - var(--top-h) - var(--steps-h) - 72px);
    padding-top: 16px;
  }
  #s-customize .bc-head {
    flex: none;
    gap: 4px;
    margin-bottom: 14px;
  }
  #s-customize .bc-h1 {
    font-size: 24px;
    line-height: 32px;
  }
  #s-customize .bc-lead {
    font-size: 14px;
    line-height: 20px;
  }
  #s-customize .bc-split {
    flex: 1;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 24px;
    align-items: stretch;
  }
  #s-customize .bc-controls {
    position: relative; /* keeps visually hidden inputs inside the scrolling column */
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    gap: 12px;
    padding: 0 10px 20px 0;
    margin-right: -10px;
    scrollbar-width: thin;
  }
  #s-customize .bc-controls .bc-card {
    gap: 16px;
    padding: 20px;
    flex: none;
  }
  #s-customize .bc-preview {
    position: static;
    min-height: 0;
    margin-bottom: 16px;
    padding: 16px;
    gap: 12px;
    overflow: hidden;
  }
  #s-customize .bc-preview__head {
    min-height: 32px;
  }
  /* The stepper already says "Customize", so the page heading is kept to one line here. */
  #s-customize .bc-eyebrow,
  #s-customize .bc-head .bc-lead {
    display: none;
  }
  .pv--short .pv-table-card {
    display: none;
  }
  #s-customize .bc-preview__wrap {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  #s-customize .bc-preview__wrap > .pv {
    transform-origin: top left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Font search (combobox) ---------- */
.bc-combo__box {
  position: relative;
}
.bc-combo__ico {
  position: absolute;
  left: 12px;
  top: 10px;
  color: var(--ink-3);
  pointer-events: none;
}
.bc-combo__input {
  padding-left: 40px;
}
.bc-combo__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 10;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-md);
}
.bc-combo__opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.bc-combo__opt span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.bc-combo__opt b {
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-combo__opt small {
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-3);
}
.bc-combo__opt .bc-ico {
  color: var(--brand);
}
.bc-combo__opt[aria-selected='true'] {
  background: var(--brand-tint);
}
.bc-combo__opt--custom {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
}
.bc-combo__opt--custom b {
  font-size: 14px;
  font-weight: 500;
}
.bc-help {
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-3);
}
.bc-sublabel {
  margin-bottom: -8px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.bc-font-current {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r);
  border: 1px solid var(--brand);
  background: var(--brand-tint);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.bc-font-current .bc-opt__t {
  flex: 1;
}
.bc-font-current .bc-opt__t small {
  white-space: normal;
}

/* ---------- Payment (Skydo) ---------- */
.bc-howto {
  display: flex;
  flex-direction: column;
  gap: 16px;
  counter-reset: howto;
}
.bc-howto li {
  position: relative;
  padding-left: 40px;
  color: var(--ink-2);
  counter-increment: howto;
}
.bc-howto li::before {
  content: counter(howto);
  position: absolute;
  left: 0;
  top: -2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
}
.bc-howto b {
  font-weight: 500;
  color: var(--ink);
}
.bc-pay__open {
  width: fit-content;
}
.bc-note--info {
  background: #f9fafb;
  color: var(--ink-2);
}
.bc-done__icon--brand {
  background: var(--brand-tint);
  color: var(--brand);
  box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.06);
}
.bc-done__icon--brand .bc-ico {
  stroke-width: 2;
}
.bc-inline-link,
.bc-card__desc a {
  color: var(--brand) !important;
  font-weight: 500;
}
