/* ==========================================================================
   CryptoLic — Merchant Payment Card Builder
   Loaded only on /tools/payment-card-builder/. Built on the site design tokens
   in styles.css (var(--ink), --accent, --radius, etc.). Scoped under .cb- and
   [data-card-builder] so it never leaks into the rest of the site.
   ========================================================================== */

/* ----- Layout: wizard (left) + live preview (right) ----- */
.cb {
  --cb-gap: 28px;
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  gap: var(--cb-gap);
  align-items: start;
}
@media (max-width: 900px) { .cb { grid-template-columns: 1fr; } }

.cb__builder {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.cb__preview-wrap { position: sticky; top: 88px; }
@media (max-width: 900px) { .cb__preview-wrap { position: static; } }

/* ----- Step indicator ----- */
.cb-steps {
  display: flex; gap: 4px; padding: 14px 16px; border-bottom: 1px solid var(--line);
  background: var(--surface-2); overflow-x: auto;
}
.cb-step {
  display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto;
  background: none; border: 0; cursor: pointer; padding: 6px 10px; border-radius: 999px;
  color: var(--muted); font: inherit; font-size: .85rem; font-weight: 600;
  transition: background-color .15s ease, color .15s ease;
}
.cb-step:hover { color: var(--ink); }
.cb-step.is-current { color: var(--accent-strong); background: var(--accent-tint); }
.cb-step.is-done { color: var(--positive); }
.cb-step__num {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); color: var(--muted); font-size: .78rem; font-weight: 700;
}
.cb-step.is-current .cb-step__num { background: var(--accent); color: #fff; }
.cb-step.is-done .cb-step__num { background: var(--positive); color: #fff; }
@media (max-width: 520px) { .cb-step__label { display: none; } }

/* ----- Panel (the active step's form) ----- */
.cb-panel { padding: clamp(20px, 3vw, 30px); min-height: 320px; }
.cb-step-eyebrow {
  font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 8px;
}
.cb-panel__title { font-size: 1.4rem; margin: 0 0 6px; outline: none; }
.cb-panel__lead { color: var(--muted); font-size: 1rem; margin: 0 0 22px; }
.cb-group-title { font-size: .95rem; margin: 22px 0 10px; color: var(--ink); }

/* ----- Fields ----- */
.cb-field { margin-bottom: 18px; }
.cb-label { display: inline-block; font-weight: 600; color: var(--ink); font-size: .92rem; margin-bottom: 7px; }
.cb-optional {
  font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: .05em; margin-left: 6px;
}
.cb-input {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 13px; font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cb-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.cb-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
.cb-help { font-size: .83rem; color: var(--muted); margin: 7px 0 0; }
.cb-inline-hint { font-size: .9rem; color: var(--muted); font-style: italic; }

.cb-error { font-size: .85rem; color: #b42318; margin: 6px 0 0; min-height: 0; display: none; }
.cb-error.is-shown { display: block; }

/* File + color rows */
.cb-logo-row, .cb-color-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cb-file { font-size: .9rem; }
.cb-logo-thumb { width: 44px; height: 44px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 3px; }
.cb-color { width: 44px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; padding: 2px; }
.cb-link-btn { background: none; border: 0; color: var(--accent); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; padding: 0; }
.cb-link-btn:hover { color: var(--accent-strong); text-decoration: underline; }

/* ----- Payment method list ----- */
.cb-method-list { display: grid; gap: 10px; }
.cb-method {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.cb-method:hover { border-color: #cdd8e6; }
.cb-method.is-on { border-color: var(--accent); background: var(--accent-tint); }
.cb-method__check { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
.cb-method__body { flex: 1; min-width: 0; }
.cb-method__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cb-method__name { font-weight: 640; color: var(--ink); }
.cb-method__note { font-size: .86rem; color: var(--muted); margin: 4px 0 0; }
.cb-chip {
  font-size: .72rem; font-weight: 700; letter-spacing: .03em; padding: 2px 7px; border-radius: 6px;
  background: var(--surface-3); color: var(--body);
}
.cb-chip--muted { background: transparent; color: var(--muted); border: 1px solid var(--line); }

/* ----- Wallet groups ----- */
.cb-wallet { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.cb-wallet__head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }

/* ----- Template swatches ----- */
.cb-swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 520px) { .cb-swatches { grid-template-columns: repeat(2, 1fr); } }
.cb-swatch {
  display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 10px 8px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cb-swatch:hover { border-color: #cdd8e6; }
.cb-swatch.is-sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-tint); }
.cb-swatch__chip { width: 100%; height: 34px; border-radius: 6px; border: 1px solid; display: block; position: relative; }
.cb-swatch__chip::after { content: ""; position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; border-radius: 3px; background: currentColor; }
.cb-swatch__label { font-size: .8rem; font-weight: 600; color: var(--ink); }

/* ----- Segmented controls ----- */
.cb-segment { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; flex-wrap: wrap; }
.cb-seg { background: var(--surface); border: 0; border-right: 1px solid var(--line); padding: 9px 14px; font: inherit; font-size: .88rem; font-weight: 600; color: var(--body); cursor: pointer; }
.cb-seg:last-child { border-right: 0; }
.cb-seg:hover { background: var(--surface-2); }
.cb-seg.is-sel { background: var(--accent); color: #fff; }

/* ----- Toggle ----- */
.cb-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .95rem; color: var(--ink); margin: 14px 0; }
.cb-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ----- Multi-select chips ----- */
.cb-chip-multi { display: flex; flex-wrap: wrap; gap: 8px; }
.cb-pick {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 8px 14px; font: inherit; font-size: .86rem; color: var(--body); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.cb-pick:hover { border-color: #cdd8e6; }
.cb-pick.is-on { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-strong); font-weight: 600; }

/* ----- Actions ----- */
.cb-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 4px; }
.cb-divider { border: 0; border-top: 1px solid var(--line-soft); margin: 22px 0; }
.cb-hidden-file { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ----- Footer nav ----- */
.cb-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px clamp(20px,3vw,30px); border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.cb-footer__right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.cb-gate { font-size: .84rem; color: var(--muted); max-width: 30ch; text-align: right; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ----- Utility bar above the builder ----- */
.cb-util { display: flex; justify-content: flex-end; margin-bottom: 12px; }

/* ----- Template picker: industry groups ----- */
.cb-swatch-group {
  font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin: 16px 0 8px;
}
.cb-swatch-group:first-of-type { margin-top: 8px; }

/* ----- Kit asset selection (step 5) ----- */
.cb-asset-list { display: grid; gap: 10px; }
.cb-asset-row {
  display: flex; align-items: stretch; gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.cb-asset-row.is-on { border-color: var(--accent); background: var(--accent-tint); }
.cb-asset-row.is-active { box-shadow: 0 0 0 2px var(--accent-tint); }
.cb-asset-row__check {
  flex: 0 0 auto; align-self: center; width: 18px; height: 18px; margin: 0 14px;
  accent-color: var(--accent); cursor: pointer;
}
.cb-asset-row__body {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px;
  background: none; border: 0; border-left: 1px solid var(--line);
  padding: 13px 14px 13px 14px; font: inherit; text-align: left; cursor: pointer; color: var(--ink);
}
.cb-asset-row.is-on .cb-asset-row__body { border-left-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.cb-asset-row__body:hover { background: color-mix(in srgb, var(--accent-tint) 55%, transparent); }
.cb-asset-row__icon { flex: 0 0 auto; width: 26px; height: 26px; color: var(--accent); }
.cb-asset-row__icon svg { width: 100%; height: 100%; }
.cb-asset-row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cb-asset-row__title { font-weight: 640; color: var(--ink); font-size: .95rem; }
.cb-asset-row__desc { font-size: .82rem; color: var(--muted); }
.cb-asset-row__badge {
  flex: 0 0 auto; margin-left: auto; font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--accent-strong); background: var(--surface);
  border: 1px solid var(--accent); border-radius: 999px; padding: 3px 8px;
}

/* ==========================================================================
   The asset preview — the visual product. Every printable asset shares this
   pipeline. Colors come from inline custom props (--cb-bg/--cb-card/--cb-fg/
   --cb-muted/--cb-accent/--cb-line). Typography, border, heading, and density
   are TEMPLATE TREATMENTS applied via data-attributes so no design logic lives
   in JS and adding a template stays a pure-data change.
   ========================================================================== */
.cb-preview-frame {
  background:
    linear-gradient(45deg, #eef2f6 25%, transparent 25%, transparent 75%, #eef2f6 75%) 0 0/22px 22px,
    linear-gradient(45deg, #eef2f6 25%, #f8fafc 25%, #f8fafc 75%, #eef2f6 75%) 11px 11px/22px 22px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(16px, 3vw, 34px); display: flex; justify-content: center; align-items: flex-start;
}
/* The preview wrapper must fill the frame so the card's width:100% resolves
   against the full width, then the card caps itself with its own max-width. */
.cb-preview-frame > [data-cb-preview] { width: 100%; display: flex; justify-content: center; }
.cb-preview-caption { text-align: center; color: var(--muted); font-size: .85rem; margin: 12px 0 0; }

/* ----- Asset root (shared by every printable) ----- */
.cb-asset {
  width: 100%; max-width: 460px;
  background: var(--cb-bg); color: var(--cb-fg);
  border: 1px solid var(--cb-line); border-radius: 16px;
  padding: clamp(16px, 3.4vw, 26px);
  display: flex; flex-direction: column; gap: var(--cb-gap-block, 12px);
  box-shadow: var(--shadow-md);
  font-family: var(--cb-fontset, var(--font-sans));
  container-type: inline-size;
}
.cb-asset--square { border-radius: 2px; }
/* Signs and sheets are taller formats; give them room and center energy. */
.cb-a-sign { max-width: 420px; text-align: center; align-items: center; }
.cb-a-sheet { max-width: 460px; }

/* ---- Template TREATMENT: typography (via [data-cb-font]) ---- */
.cb-asset[data-cb-font="sans"]      { --cb-fontset: var(--font-sans); --cb-headfont: var(--font-sans); }
.cb-asset[data-cb-font="serif"]     { --cb-fontset: var(--font-serif); --cb-headfont: var(--font-serif); }
.cb-asset[data-cb-font="rounded"]   { --cb-fontset: "Trebuchet MS", "Segoe UI", var(--font-sans); --cb-headfont: "Trebuchet MS", "Segoe UI", var(--font-sans); }
.cb-asset[data-cb-font="slab"]      { --cb-fontset: var(--font-sans); --cb-headfont: "Rockwell", "Roboto Slab", Georgia, serif; }
.cb-asset[data-cb-font="humanist"]  { --cb-fontset: "Optima", "Segoe UI", "Gill Sans", var(--font-sans); --cb-headfont: "Optima", "Gill Sans", var(--font-sans); }
.cb-a-name, .cb-a-headline, .cb-a-subhead { font-family: var(--cb-headfont, var(--font-sans)); }

/* ---- Template TREATMENT: density (via [data-cb-density]) ---- */
.cb-asset[data-cb-density="compact"] { --cb-gap-block: 9px; }
.cb-asset[data-cb-density="cozy"]    { --cb-gap-block: 13px; }
.cb-asset[data-cb-density="airy"]    { --cb-gap-block: 18px; }

/* ---- Template TREATMENT: border (via [data-cb-border]) ---- */
.cb-asset[data-cb-border="none"]     { border: 0; }
.cb-asset[data-cb-border="hairline"] { border: 1px solid var(--cb-line); }
.cb-asset[data-cb-border="bold"]     { border: 3px solid var(--cb-accent); }
.cb-asset[data-cb-border="dashed"]   { border: 2px dashed var(--cb-accent); }
.cb-asset[data-cb-border="double"]   { border: 3px double var(--cb-accent); }
.cb-asset[data-cb-border="frame"]    { border: 1px solid var(--cb-line); outline: 1px solid var(--cb-accent); outline-offset: -7px; }
.cb-asset[data-cb-border="topbar"]   { border: 1px solid var(--cb-line); border-top: 7px solid var(--cb-accent); }

/* ---- Template TREATMENT: heading (via [data-cb-heading]) ---- */
.cb-asset[data-cb-heading="upper"] .cb-a-headline,
.cb-asset[data-cb-heading="upper"] .cb-a-name { text-transform: uppercase; letter-spacing: .02em; }
.cb-asset[data-cb-heading="serif-caps"] .cb-a-headline { text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.cb-asset[data-cb-heading="underline"] .cb-a-headline { border-bottom: 2px solid var(--cb-accent); padding-bottom: 6px; }

/* ---- Identity block ---- */
.cb-a-identity { display: flex; align-items: center; gap: 12px; }
.cb-a-sign .cb-a-identity { justify-content: center; }
.cb-a-logo { width: 46px; height: 46px; object-fit: contain; border-radius: 8px; flex: 0 0 auto; }
.cb-a-identity--lg .cb-a-logo { width: 60px; height: 60px; }
.cb-a-identity--sm .cb-a-logo { width: 34px; height: 34px; }
.cb-a-name { font-size: 1.5rem; font-weight: 720; letter-spacing: -0.01em; color: var(--cb-fg); line-height: 1.1; }
.cb-a-identity--lg .cb-a-name { font-size: 1.9rem; }
.cb-a-identity--sm .cb-a-name { font-size: 1.15rem; }
.cb-a-tag { font-size: .9rem; color: var(--cb-muted); margin-top: 2px; }

.cb-a-lead {
  display: inline-block; align-self: flex-start; font-size: .74rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--cb-accent);
  padding: 4px 10px; border-radius: 999px;
}
.cb-a-sign .cb-a-lead { align-self: center; }

.cb-a-headline { font-size: 1.5rem; font-weight: 720; color: var(--cb-fg); margin: 0; line-height: 1.12; }
.cb-a-subhead { font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cb-accent); margin: 4px 0 2px; }

/* ---- QR ---- */
.cb-qr { background: #fff; padding: 10px; border-radius: 10px; border: 1px solid var(--cb-line); line-height: 0; }
.cb-qr--xl { width: 74%; max-width: 300px; }
.cb-qr--lg { width: 62%; max-width: 240px; }
.cb-qr--md { width: 46%; max-width: 180px; }
.cb-qr--sm { width: 120px; }
.cb-qr__canvas { width: 100%; height: auto; image-rendering: pixelated; }
.cb-qr__err { font: 12px var(--font-sans); color: #b42318; line-height: 1.3; }
.cb-a-qrph {
  width: 100%; text-align: center; color: var(--cb-muted); font-size: .9rem;
  border: 1px dashed var(--cb-line); border-radius: 10px; padding: 32px 16px;
}

/* ---- Payment card body ---- */
.cb-a-cardbody { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cb-a-multi { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.cb-a-qrcell { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cb-a-qrlabel { font-size: .74rem; color: var(--cb-muted); font-weight: 600; text-align: center; max-width: 130px; }

.cb-a-methods { list-style: none; padding: 0; margin: 0; width: 100%; display: grid; gap: 8px; }
.cb-a-methods li { display: flex; gap: 10px; align-items: baseline; }
.cb-a-mchip {
  flex: 0 0 auto; font-size: .68rem; font-weight: 700; padding: 2px 6px; border-radius: 5px;
  background: var(--cb-accent); color: #fff; min-width: 30px; text-align: center;
}
.cb-a-mtext { display: flex; flex-direction: column; min-width: 0; }
.cb-a-mtext strong { color: var(--cb-fg); font-size: .9rem; }
.cb-a-addr { font-family: var(--font-serif); font-size: .78rem; color: var(--cb-muted); word-break: break-all; }

.cb-a-ins { width: 100%; }
.cb-a-ins-title { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cb-accent); margin-bottom: 6px; }
.cb-a-steps { margin: 0; padding-left: 18px; color: var(--cb-fg); }
.cb-a-steps li { font-size: .86rem; margin: 3px 0; }

.cb-a-callouts { display: flex; flex-direction: column; gap: 6px; }
.cb-a-callout { font-size: .85rem; font-weight: 600; color: var(--cb-fg); padding-left: 20px; position: relative; }
.cb-a-callout::before { content: "✓"; position: absolute; left: 0; color: var(--cb-accent); font-weight: 700; }
.cb-a-security { margin: 0; padding-left: 18px; color: var(--cb-muted); }
.cb-a-security li { font-size: .78rem; margin: 2px 0; }

.cb-a-foot { border-top: 1px solid var(--cb-line); padding-top: 10px; margin-top: auto; width: 100%; }
.cb-a-foot-left { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--cb-muted); }
.cb-a-sign .cb-a-foot-left { justify-content: center; }

/* ---- Symbol row (signage) ---- */
.cb-a-symbols { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.cb-a-symbol {
  font-size: 1.05rem; font-weight: 700; color: var(--cb-accent);
  border: 2px solid var(--cb-accent); border-radius: 999px; padding: 6px 14px; line-height: 1;
}

/* ---- Countertop sign ---- */
.cb-a-sign--counter .cb-a-headline { font-size: clamp(1.6rem, 5cqi, 2.4rem); margin: 4px 0; }
.cb-a-beats { display: flex; gap: 10px; justify-content: center; width: 100%; }
.cb-a-beat { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.cb-a-beat__n {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cb-accent); color: #fff; font-weight: 700; font-size: 1rem;
}
.cb-a-beat__w { font-weight: 700; font-size: 1rem; color: var(--cb-fg); }
.cb-a-beat__s { font-size: .78rem; color: var(--cb-muted); }
.cb-a-thanks { font-size: 1.3rem; font-weight: 700; color: var(--cb-accent); margin: 4px 0 0; font-family: var(--cb-headfont); }

/* ---- Window sign ---- */
.cb-a-sign--window { justify-content: center; gap: 18px; }
.cb-a-headline--window { font-size: clamp(1.7rem, 6cqi, 2.6rem); }
.cb-a-window-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cb-a-window-scan, .cb-a-how-foot { font-size: .85rem; color: var(--cb-muted); }

/* ---- Instruction sheet ---- */
.cb-a-headline--how { font-size: 1.7rem; }
.cb-a-how-row { display: flex; gap: 16px; align-items: flex-start; width: 100%; }
.cb-a-how-steps { margin: 0; padding-left: 20px; flex: 1; }
.cb-a-how-steps li { font-size: .95rem; margin: 8px 0; color: var(--cb-fg); }
.cb-a-how-qr { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 140px; }
.cb-a-how-qr .cb-qr { width: 140px; }
.cb-a-how-foot { font-weight: 600; color: var(--cb-fg); margin: 4px 0 0; }

/* ---- Cashier reference ---- */
.cb-a-cashier-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.cb-a-cashier-notes, .cb-a-cashier-reminders { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cb-a-cashier-notes li { display: flex; gap: 10px; align-items: baseline; }
.cb-a-cashier-note { font-size: .84rem; color: var(--cb-muted); }
.cb-a-cashier-reminders li { font-size: .86rem; color: var(--cb-fg); padding-left: 20px; position: relative; }
.cb-a-cashier-reminders li::before { content: "✓"; position: absolute; left: 0; color: var(--cb-accent); font-weight: 700; }

/* ----- Newsletter reveal (post-generation) ----- */
.cb-newsletter { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--accent-tint); }
.cb-newsletter h3 { margin: 0 0 6px; font-size: 1.05rem; }
.cb-newsletter p { margin: 0 0 4px; color: var(--body); font-size: .92rem; }

/* ----- Mobile / narrow screens: keep everything usable, no h-scroll ----- */
@media (max-width: 560px) {
  .cb-a-how-row { flex-direction: column; align-items: center; }
  .cb-a-how-qr { width: 160px; }
  .cb-a-beats { gap: 6px; }
  .cb-a-beat__n { width: 28px; height: 28px; font-size: .9rem; }
  .cb-a-cashier-head { flex-direction: column; }
  .cb-asset-row__check { margin: 0 10px; }
  .cb-asset-row__body { padding: 11px 12px; gap: 10px; }
  .cb-asset-row__badge { display: none; }
}

/* ==========================================================================
   Print — show ONLY the kit pages, each at its own physical size. app.js
   injects one named @page rule per asset and the exact per-asset box size.
   Assets flow one-per-page with clean breaks; QR is repainted crisp.
   ========================================================================== */
@media print {
  /* Hide everything except the body-level print container app.js creates. */
  body[data-cb-printing="true"] > *:not(#cb-print-target) { display: none !important; }
  #cb-print-target { display: block !important; margin: 0; padding: 0; }
  /* Each asset sits alone on its page with a hard break after it. Align to the
     top so a down-scaled asset (transform-origin: top center) stays anchored
     and never drifts off the page. */
  #cb-print-target .cb-print-page {
    break-after: page; page-break-after: always; break-inside: avoid; page-break-inside: avoid;
    display: flex; align-items: flex-start; justify-content: center;
    overflow: hidden; /* fixed page box; scaled asset fits within it */
  }
  #cb-print-target .cb-print-page:last-child { break-after: auto; page-break-after: auto; }
  #cb-print-target .cb-asset {
    box-shadow: none !important; border-radius: 0 !important; max-width: none !important;
    break-inside: avoid; page-break-inside: avoid;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  /* Keep template borders in print except the plain "none" treatment. */
  #cb-print-target .cb-asset[data-cb-border="none"] { border: 0 !important; }
  #cb-print-target .cb-qr__canvas { image-rendering: auto; }
}
/* The container is invisible off-print; only its print rules matter. */
#cb-print-target { display: none; }
