/*
 * The card itself (shared/render.js markup), used by the card page and the editor preview.
 * Sizes are in cqw (1% of the card's width), so the card looks the same at any size.
 * The spin (shared/spin.js) sets --hx --hy --gx --px --py --lift on .bc-scene.
 */
.bc-scene {
  --hx: 38%; --hy: 40%; --gx: 30%; --px: 0; --py: 0; --lift: 1;
  position: relative; width: 100%; aspect-ratio: 1000 / 571;
  container-type: inline-size; perspective: 1500px; perspective-origin: 50% 45%;
  -webkit-user-select: none; user-select: none;
  /* The card sets its own alignment; inside a button (My cards, pickers) it must not inherit centring. */
  text-align: start;
}
.bc-scene[data-layout="portrait"] { aspect-ratio: 571 / 1000; perspective: 1800px; }
.bc {
  position: absolute; inset: 0; transform-style: preserve-3d; -webkit-transform-style: preserve-3d;
  will-change: transform; cursor: grab; touch-action: pan-y; -webkit-tap-highlight-color: transparent;
  outline: none; border-radius: 4.4cqw;
}
.is-dragging .bc { cursor: grabbing; }
.bc:focus-visible { box-shadow: 0 0 0 3px #64b5f6; }
.bc-face {
  position: absolute; inset: 0; overflow: hidden; border-radius: 4.4cqw;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  color: var(--ink); font-family: var(--body), 'Hanken Grotesk', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; transform: translateZ(0.2px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.bc-back { transform: rotateY(180deg) translateZ(0.2px); }
.bc-face > svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bc-edge { display: none; }
.bc-shadow {
  position: absolute; left: 9%; right: 9%; bottom: -7%; height: 16%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  filter: blur(6px); transform: scaleX(calc(0.35 + var(--lift) * 0.65)); opacity: calc(0.35 + var(--lift) * 0.5);
  pointer-events: none;
}

/* ---------- light: glare, foil and grain, moved by the spin ---------- */
.bc-sheen, .bc-grain { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; }
.bc-sheen {
  background: linear-gradient(105deg, transparent calc(var(--gx) - 30%), rgba(255, 255, 255, 0.07) var(--gx), transparent calc(var(--gx) + 30%));
}
[data-finish="gloss"] .bc-sheen {
  background:
    linear-gradient(105deg, transparent calc(var(--gx) - 18%), rgba(255, 255, 255, 0.22) var(--gx), transparent calc(var(--gx) + 18%)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 40%);
  mix-blend-mode: screen;
}
/*
 * Opal (light, its secondary text at AA): the gloss lights the card under the text, not the text
 * itself, so the moving highlight only adds contrast to the dark text (over it, it washed the
 * title down to about 3.6:1). The foil frame and the background still catch it.
 */
.bc-scene[data-template="opal"][data-finish="gloss"] :is(.bc-front-in, .bc-back-in) { z-index: 1; }
/* The photo's and the QR code's drop shadow: small and soft on every card (it was 0 1.4cqw 3.6cqw at
   35 %), and none on the minimal templates, which are flat on purpose. */
.bc-scene:is([data-template="blank"], [data-template="clarity"], [data-template="edition"], [data-template="mark"], [data-template="duo"]) { --photo-drop: 0 0 0 0 transparent; --qr-drop: none; }
[data-finish="foil"] .bc-sheen, [data-finish="holo"] .bc-sheen {
  background:
    linear-gradient(105deg, transparent calc(var(--gx) - 16%), rgba(255, 255, 255, 0.26) var(--gx), transparent calc(var(--gx) + 16%)),
    linear-gradient(125deg, #ff9ad5, #9ad0ff 25%, #a7ffcf 50%, #fff3a3 75%, #ff9ad5);
  background-size: 100% 100%, 320% 320%;
  background-position: 0 0, var(--hx) var(--hy);
  mix-blend-mode: soft-light; opacity: 0.55;
}
[data-finish="holo"] .bc-sheen { opacity: 0.38; }
.bc-grain { display: none; }
[data-finish="foil"] .bc-grain, [data-finish="holo"] .bc-grain {
  display: block; opacity: 0.5; mix-blend-mode: overlay;
  background: repeating-linear-gradient(118deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px);
}

/* ---------- holographic foil (the staff card): masks over an iridescent gradient ---------- */
.holo {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at var(--hx) var(--hy), rgba(255, 255, 255, 0.95) 0, rgba(255, 255, 255, 0.35) 9%, rgba(255, 255, 255, 0) 24%),
    linear-gradient(115deg, #3fd8ff 0%, #8f7bff 12%, #ff6fd8 24%, #ffcf6b 36%, #6dffb8 48%, #3fd8ff 60%, #8f7bff 72%, #ff6fd8 84%, #3fd8ff 100%);
  background-size: 100% 100%, 190% 190%;
  background-position: 0 0, var(--hx) var(--hy);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
}
.holo-traces {
  -webkit-mask-image: url("holo-traces.svg"), linear-gradient(90deg, transparent 18%, #000 62%);
  mask-image: url("holo-traces.svg"), linear-gradient(90deg, transparent 18%, #000 62%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  transform: translate3d(calc(var(--px) * -1.4cqw), calc(var(--py) * -0.9cqw), 0) scale(1.03);
  filter: saturate(1.25) drop-shadow(0 0 0.5cqw rgba(120, 190, 255, 0.35));
}
.holo-back {
  -webkit-mask-image: url("holo-traces.svg"), radial-gradient(ellipse 60% 70% at 100% 100%, #000 10%, transparent 70%);
  mask-image: url("holo-traces.svg"), radial-gradient(ellipse 60% 70% at 100% 100%, #000 10%, transparent 70%);
  opacity: 0.75;
}
.holo-mark {
  position: relative; inset: auto; -webkit-mask-image: url("holo-mark.svg"); mask-image: url("holo-mark.svg");
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-position: center; mask-position: center;
  background-size: 100% 100%, 900% 900%;
  transform: translate3d(calc(var(--px) * 0.5cqw), 0, 0);
}

/* ---------- the custom design: the person's background and foil layers (shared/render.js customLayers) ----------
 * The same engine as the staff foil: a mask over a finish's gradient, moved by --hx --hy (the
 * spin and tilt), a glint, a glare sweep on --gx, grain and depth. To stay smooth on phones the
 * mask sits still and only the layers inside it move, with transforms (the compositor's work,
 * no repaint). The sheen strip is twice the card's size and moves at most a quarter of itself,
 * so its edge never shows. */
.cf { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; will-change: transform; }
.cf-bg { position: absolute; max-width: none; display: block; -webkit-user-drag: none; }
.cf-dim { position: absolute; inset: 0; }
.cf-foil {
  position: absolute; inset: 0; overflow: hidden; opacity: var(--cf-o, 0.85);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.cf-foil > i { position: absolute; display: block; pointer-events: none; }
.cf-sheen {
  left: -50%; top: -50%; width: 200%; height: 200%;
  background: var(--cf-grad);
  transform: translate3d(calc((50% - var(--hx)) * var(--cf-k, 0.3)), calc((50% - var(--hy)) * var(--cf-k, 0.3) * 0.6), 0);
  will-change: transform;
}
/* Metal: a fine brushed grain on top of the colour. */
.cf-foil::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.07) 0 1px, rgba(0, 0, 0, 0.05) 1px 2px, transparent 2px 4px);
}
.cf-holo::after { background: repeating-linear-gradient(118deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 3px); }
.cf-holo .cf-sheen { filter: saturate(1.2); }
.cf-glint {
  left: 0; top: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.85) 0, rgba(255, 255, 255, 0.3) 9%, rgba(255, 255, 255, 0) 26%);
  transform: translate3d(calc(var(--hx) - 50%), calc(var(--hy) - 50%), 0);
  will-change: transform;
}
.cf-glare {
  left: 0; top: 0; width: 100%; height: 100%;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 36%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 64%);
  transform: translate3d(calc(var(--gx) - 50%), 0, 0);
  will-change: transform;
}
/* Depth: a built-in or fitted mask floats slightly against the card as it turns. */
.cf-depth { transform: translate3d(calc(var(--px) * -0.9cqw), calc(var(--py) * -0.6cqw), 0); will-change: transform; }
/* Text and the QR code stay on top: the QR code even above the card's own sheen and grain. */
.cf-on .bc-front-in, .cf-on .bc-info { text-shadow: 0 0.15cqw 1.2cqw var(--cf-ts, transparent); }
.cf-on .bc-qr { position: relative; z-index: 2; }
/* Simpler when frames drop (spin.js sets data-fx), and still when they still drop. With foil
 * layers stacked (.cf-up: the ones above a side's first), 'lite' also lowers every glare and
 * drops the upper layers' own, and 'base' draws the upper layers once as still images. */
.bc-scene[data-fx="lite"] .cf-glint, .bc-scene[data-fx="base"] .cf-glint, .bc-scene[data-fx="static"] .cf-glint,
.bc-scene[data-fx="lite"] .cf-foil::after, .bc-scene[data-fx="base"] .cf-foil::after, .bc-scene[data-fx="static"] .cf-foil::after { display: none; }
.bc-scene[data-fx="lite"] .cf-depth, .bc-scene[data-fx="base"] .cf-depth, .bc-scene[data-fx="static"] .cf-depth { transform: none; will-change: auto; }
.bc-scene[data-fx="lite"] .cf-holo .cf-sheen, .bc-scene[data-fx="base"] .cf-holo .cf-sheen, .bc-scene[data-fx="static"] .cf-holo .cf-sheen { filter: none; }
.bc-scene[data-fx="lite"] .cf-glare, .bc-scene[data-fx="base"] .cf-glare { opacity: 0.6; }
.bc-scene[data-fx="lite"] .cf-up .cf-glare, .bc-scene[data-fx="base"] .cf-up .cf-glare { display: none; }
.bc-scene[data-fx="static"] .cf-sheen { transform: translate3d(-4%, -2%, 0); will-change: auto; }
.bc-scene[data-fx="static"] .cf-glare { transform: translate3d(-18%, 0, 0); will-change: auto; }
/* At 'static' spin.js also draws each foil layer once into a canvas (.cf-flat) and hides the live
 * one ('base': the upper layers only). */
.cf-flat { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.cf-foil.is-flat { display: none; }

/* ---------- text and images on the front ---------- */
.bc-front-in, .bc-back-in { position: absolute; inset: 0; }
.bc-name {
  font-family: var(--font), 'Hanken Grotesk', system-ui, sans-serif; font-weight: var(--fw);
  font-size: calc(6.4cqw * var(--ns, 1)); line-height: 1.04; letter-spacing: -0.012em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
/* The name's box clips (the line clamp, the back's ellipsis), and a script or italic face draws
   past its advance (Caveat's last letter): room on both sides that the negative margin gives back,
   so the text sits and wraps exactly where it did and only the clip edge moves out. */
.bc-name, .bc-back-name { padding-inline: 0.15em; margin-inline: -0.15em; }
.bc-title { font-size: calc(2.9cqw * var(--ts, var(--ds, 1))); color: var(--muted); margin-top: 1.3cqw; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-company { font-size: calc(2.15cqw * var(--cs, var(--ds, 1))); letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-top: 1.1cqw; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-rule { width: 7cqw; height: 0.55cqw; border-radius: 1cqw; background: var(--accent); margin-bottom: 2.4cqw; }
.bc-avatar {
  position: absolute; width: 20cqw; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  /* The ring: a hairline in the text colour at 70 % (--ring, render.js designVars), no glow; the soft drop stays. */
  box-shadow: 0 0 0 0.3cqw var(--ring, var(--accent)), var(--photo-drop, 0 0.5cqw 1.4cqw rgba(0, 0, 0, 0.18));
  background: var(--faint);
}
.bc-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bc-avatar.is-initials { display: grid; place-items: center; background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03)); box-shadow: 0 0 0 0.3cqw var(--faint); }
.bc-avatar.is-initials span { font-family: var(--font), sans-serif; font-weight: var(--fw); font-size: 6.6cqw; color: var(--ink); letter-spacing: 0.02em; }
.bc-logo { position: absolute; height: 8cqw; max-width: 34cqw; display: flex; align-items: center; }
.bc-logo img { height: 100%; width: auto; max-width: 100%; object-fit: contain; display: block; }
/* "Invert colours": a dark logo on a dark card shows light (the stored image isn't changed). */
.bc-logo.is-inverted img { filter: invert(1); }
/* "Light backing": a soft white panel round the logo, so a dark or colourful logo shows on a dark card
   as it is. The panel grows outward (padding, the same negative margin), so the logo itself stays
   exactly where and as big as it was; a foil logo's sheen stays on the logo, inside the panel. */
.bc-logo.has-backing { box-sizing: content-box; padding: 1.1cqw 1.4cqw; margin: -1.1cqw -1.4cqw; border-radius: 1.8cqw; background: rgba(255, 255, 255, 0.92); box-shadow: 0 0.2cqw 0.7cqw rgba(0, 0, 0, 0.14); }
.bc-logo.has-backing > .mk-foil { inset: 1.1cqw 1.4cqw; }
/* The signature (Pro): a mask in the chosen colour, or typed text; see render.js signatureHtml.
   Typed: the line is taller than the glyphs and nothing is clipped, so descenders and a long
   name (sized to fit by render.js) are never cut off. */
.bc-sig { pointer-events: none; }
.bc-sig.is-typed { display: flex; align-items: flex-end; line-height: 1.3; white-space: nowrap; overflow: visible; font-weight: 600; }
.bc-sig.is-flow { margin-top: 1.4cqw; }
[data-layout="portrait"] .bc-sig.is-flow { margin-top: 3cqw; }
/* Classic: the name's block stops short of a signature in the bottom-right corner, or sits above one on the left or in the centre (render.js sigRoom). */
[data-layout="classic"] .has-sig .bc-id { right: var(--sig-room, 6.5cqw); bottom: var(--sig-lift, 6.5cqw); }

/* ---------- foil on a mark: the logo and the signature (Pro; render.js markFoilHtml) ----------
 * The mark's own shape masks the finish's sheen and glint (the custom foil layer's .cf-sheen and
 * .cf-glint), moved by the spin and tilt with transforms only; the steps down (data-fx) and
 * reduced motion hold them still like the foil layer. */
.mk-foil { display: block; overflow: hidden; pointer-events: none; --cf-k: 0.4; }
.mk-foil > i { position: absolute; display: block; pointer-events: none; }
.bc-logo.has-foil img { opacity: 0; }
.bc-logo > .mk-foil { position: absolute; inset: 0; }
.bc-sig.has-foil > .mk-foil { position: absolute; inset: 0; }
.bc-sig.has-foil.is-flow { position: relative; }
.mk-foil.cf-holo .cf-sheen { filter: saturate(1.2); }
.mk-foil .cf-glint { opacity: 0.8; }
/* A typed signature in foil: the finish through the letters, its highlight following the turn. */
.mk-type span {
  background: var(--cf-grad); background-size: 260% 260%; background-position: var(--hx) var(--hy);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  padding: 0 0.15em; text-shadow: none;
}
.bc-scene[data-fx="static"] .mk-type span, .bc-scene.rm .mk-type span { background-position: 38% 40%; }

/* classic: logo top left, photo top right, name at the bottom */
[data-layout="classic"] .bc-front-in { padding: 6.5cqw; }
[data-layout="classic"] .bc-logo { top: 6.5cqw; left: 6.5cqw; }
[data-layout="classic"] .bc-avatar { top: 6.5cqw; right: 6.5cqw; }
[data-layout="classic"] .bc-id { position: absolute; left: 6.5cqw; right: 6.5cqw; bottom: 6.5cqw; }

/* centered: photo on top, everything centred */
[data-layout="centered"] .bc-avatar { top: 6cqw; left: 50%; width: 17cqw; margin-left: -8.5cqw; }
[data-layout="centered"] .bc-logo { top: 5cqw; left: 5cqw; height: 6cqw; }
[data-layout="centered"] .bc-logo--hero { top: 7cqw; left: 50%; height: 15cqw; max-width: 50cqw; transform: translateX(-50%); justify-content: center; }
[data-layout="centered"] .bc-id { position: absolute; left: 7cqw; right: 7cqw; top: 28.5cqw; text-align: center; }
[data-layout="centered"] .bc-name { font-size: calc(5.6cqw * var(--ns, 1)); -webkit-line-clamp: 1; }
[data-layout="centered"] .bc-rule { margin: 2.2cqw auto 0; }

/* portrait: a tall card (100cqw wide, 175cqw tall) that uses its height: the photo across the top,
   a large name under it, the website (and, beside a photo, the logo) along the bottom. */
[data-layout="portrait"] .bc-face { border-radius: 7cqw; }
[data-layout="portrait"] .bc { border-radius: 7cqw; }
.bc-ptop { position: absolute; left: 0; right: 0; top: 0; height: 84cqw; overflow: hidden; display: grid; place-items: center; }
.bc-ptop.is-photo > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bc-ptop.is-initials { background: var(--faint); }
.bc-ptop.is-initials span { font-family: var(--font), sans-serif; font-weight: var(--fw); font-size: 30cqw; line-height: 1; letter-spacing: 0.02em; color: var(--ink); opacity: 0.9; }
.bc-scene .bc-ptop .bc-logo { position: static; justify-content: center; }
[data-layout="portrait"] .bc-id { position: absolute; left: 9cqw; right: 9cqw; top: 92cqw; text-align: left; }
[data-layout="portrait"] .bc-name { font-size: calc(12cqw * var(--ns, 1)); }
[data-layout="portrait"] .bc-title { font-size: calc(5cqw * var(--ts, var(--ds, 1))); margin-top: 2.6cqw; }
[data-layout="portrait"] .bc-company { font-size: calc(3.7cqw * var(--cs, var(--ds, 1))); margin-top: 2.2cqw; }
[data-layout="portrait"] .bc-rule { width: 12cqw; height: 1cqw; margin: 4cqw 0 0; }
.bc-foot { position: absolute; left: 9cqw; right: 9cqw; bottom: 9cqw; border-top: 0.3cqw solid var(--faint); padding-top: 3.4cqw; display: flex; align-items: center; justify-content: space-between; gap: 4cqw; }
.bc-foot span { min-width: 0; font-size: calc(3.6cqw * var(--cs, var(--ds, 1))); line-height: 1.35; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-scene .bc-foot .bc-logo { position: static; flex: none; margin-left: auto; justify-content: flex-end; }

/* ---------- the style options (model.styleOf; render.js styleAttrs puts the non-default ones on the scene) ---------- */
/* The accent line: a full rule across the text, a dot, or none (the default is the layout's short line). */
[data-rule="none"] .bc-rule { display: none; }
[data-rule="long"] .bc-rule { width: auto; height: 0.3cqw; border-radius: 0; opacity: 0.9; }
[data-rule="long"][data-layout="portrait"] .bc-rule { height: 0.5cqw; }
/* A dimension line: a hairline across the text with a tick at each end (a drafting look). */
[data-rule="dim"] .bc-rule { position: relative; width: auto; height: 0.25cqw; border-radius: 0; }
[data-rule="dim"] .bc-rule::before, [data-rule="dim"] .bc-rule::after { content: ''; position: absolute; top: -1.05cqw; width: 0.25cqw; height: 2.35cqw; background: var(--accent); }
[data-rule="dim"] .bc-rule::before { left: 0; }
[data-rule="dim"] .bc-rule::after { right: 0; }
[data-rule="dim"][data-layout="portrait"] .bc-rule { height: 0.4cqw; }
[data-rule="dim"][data-layout="portrait"] .bc-rule::before, [data-rule="dim"][data-layout="portrait"] .bc-rule::after { top: -1.8cqw; width: 0.4cqw; height: 4cqw; }
/* Classic: a rule across the text stops short of the photo when the name's block reaches up to it (render.js). */
[data-layout="classic"]:is([data-rule="long"], [data-rule="dim"]) .bc-id.is-tall .bc-rule { margin-right: 23cqw; }
[data-layout="classic"][data-align="right"]:is([data-rule="long"], [data-rule="dim"]) .bc-id.is-tall .bc-rule { margin-right: 0; margin-left: 23cqw; }
[data-rule="dot"] .bc-rule { width: 1.5cqw; height: 1.5cqw; border-radius: 50%; }
[data-rule="dot"][data-layout="portrait"] .bc-rule { width: 2.6cqw; height: 2.6cqw; }
/* The name in capitals, and its letter spacing (model.NAME_SPACING_EM, added to the name's own). */
/* A long name (render.js lineFit): smaller first, then a line more than usual, balanced, rather than
   cut short; the ellipsis stays only as a last resort. The same for the back's title line: the title
   and the company on a line each. Names and lines that fit don't get these, so look as before. */
.bc-scene .bc-name.is-2 { -webkit-line-clamp: 2; text-wrap: balance; }
.bc-scene .bc-name.is-3 { -webkit-line-clamp: 3; text-wrap: balance; }
.bc-scene .bc-name.is-4 { -webkit-line-clamp: 4; text-wrap: balance; }
.bc-back-name.is-2, .bc-back-title.is-2 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; text-wrap: balance; }
.bc-back-title.is-split { white-space: normal; }
.bc-back-title.is-split > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-back-title.is-split > .bc-sep { display: none; }
[data-case="upper"] .bc-name, [data-case="upper"] .bc-back-name { text-transform: uppercase; }
[data-spacing="tight"] .bc-name, [data-spacing="tight"] .bc-back-name { letter-spacing: -0.037em; }
[data-spacing="wide"] .bc-name, [data-spacing="wide"] .bc-back-name { letter-spacing: 0.048em; }
[data-spacing="wider"] .bc-name, [data-spacing="wider"] .bc-back-name { letter-spacing: 0.128em; }
/* The photo as a rounded square; hidden ('none': render.js leaves it out, and with nothing on top
   the centred and portrait text sits in the middle of the card). */
[data-photo="rounded"] .bc-avatar { border-radius: 22%; }
[data-layout="centered"] .no-top .bc-id { top: 50%; transform: translateY(-50%); }
[data-layout="portrait"] .no-top .bc-id { top: 50%; transform: translateY(-55%); }
/* Classic, text on the right: the name's block right-aligned, the photo and the logo swap sides. */
[data-align="right"] .bc-id { text-align: right; }
[data-align="right"] .bc-rule { margin-left: auto; }
[data-align="right"] .bc-avatar { right: auto; left: 6.5cqw; }
[data-align="right"] .bc-logo { left: auto; right: 6.5cqw; justify-content: flex-end; }

/* ---------- the newer layouts: panel, mark, band, split, pop (model.LAYOUTS; render.js frontFit fits their text) ---------- */
/* A title or company that needs two lines (a narrow column, a long line): never cut short. */
.bc-title.is-2, .bc-company.is-2 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-wrap: balance; }
/* The side panel (panel: the photo, full height; split: the accent with the initials or the logo). */
.bc-panel { position: absolute; top: 0; bottom: 0; right: 0; overflow: hidden; display: grid; place-items: center; }
.bc-panel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bc-panel.is-initials span { font-family: var(--font), sans-serif; font-weight: var(--fw); line-height: 1; letter-spacing: 0.02em; }
.bc-scene .bc-panel .bc-logo, .bc-scene .bc-tile .bc-logo { position: static; justify-content: center; }
.bc-scene .bc-panel .bc-logo img, .bc-scene .bc-tile .bc-logo img { width: auto; height: 100%; object-fit: contain; }
[data-align="right"] .bc-panel { right: auto; left: 0; }

/* panel: the photo fills a full-height side panel; the text sits low on the other side. */
[data-layout="panel"] .bc-panel { width: 42cqw; background: var(--faint); }
[data-layout="panel"] .bc-panel.is-initials span { font-size: 15cqw; color: var(--ink); opacity: 0.9; }
[data-layout="panel"] .bc-id { position: absolute; left: 6.5cqw; right: 47.5cqw; bottom: 6.5cqw; text-align: left; }
[data-layout="panel"][data-align="right"] .bc-id { left: 47.5cqw; right: 6.5cqw; }
/* The text keeps its left edge on these layouts whichever side it's on (classic right-aligns it). */
.bc-scene:is([data-layout="panel"], [data-layout="split"], [data-layout="pop"]) .bc-id { text-align: left; }
[data-layout="panel"] .no-panel .bc-id { left: 6.5cqw; right: 6.5cqw; }
[data-layout="panel"] .bc-name { font-size: calc(6.2cqw * var(--ns, 1)); }
[data-layout="panel"] .bc-front-in > .bc-logo { top: 6.5cqw; left: 6.5cqw; right: auto; justify-content: flex-start; }
[data-layout="panel"][data-align="right"] .bc-front-in > .bc-logo { left: 47.5cqw; }

/* mark: the logo and the company lead; under a rule, the person and the website. */
.bc-mk-head { position: absolute; top: 6.5cqw; left: 6.5cqw; right: 6.5cqw; display: flex; align-items: center; gap: 3cqw; min-width: 0; }
[data-layout="mark"] .bc-logo { position: static; flex: none; }
.bc-mk-lead, .bc-scene .bc-name.bc-mk-lead {
  font-family: var(--font), 'Hanken Grotesk', system-ui, sans-serif; font-weight: var(--fw); font-size: calc(6.6cqw * var(--ns, 1)); line-height: 1.05; letter-spacing: -0.01em;
  min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; text-wrap: balance; padding-inline: 0.15em; margin-inline: -0.15em;
}
.bc-mk-foot { position: absolute; left: 6.5cqw; right: 6.5cqw; bottom: 6.5cqw; border-top: 0.5cqw solid var(--ink); padding-top: 2.6cqw; display: flex; align-items: flex-end; justify-content: space-between; gap: 4cqw; }
.bc-mk-foot .bc-id { flex: 1; min-width: 0; }
.bc-mk-foot .bc-name { font-family: var(--body), 'Hanken Grotesk', system-ui, sans-serif; font-weight: 600; font-size: calc(3.9cqw * var(--ns, 1)); line-height: 1.2; letter-spacing: 0; -webkit-line-clamp: 1; }
.bc-mk-foot .bc-title { margin-top: 0.6cqw; }
.bc-mk-foot .bc-id > .bc-title:first-child { margin-top: 0; }
.bc-mk-site { flex: none; max-width: 52cqw; font-size: calc(2.6cqw * var(--cs, var(--ds, 1))); line-height: 1.3; font-weight: 600; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* band: the name (and the photo) above a solid accent band that holds the title and the company; the band is on the back too. */
.bc-band {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--band, 10.5cqw); box-sizing: border-box; padding: 0 6.5cqw;
  display: flex; align-items: center; justify-content: space-between; gap: 4cqw;
  background: var(--accent); color: var(--on-accent, var(--bg1));
  font-size: calc(2.35cqw * var(--bs, var(--ds, 1))); line-height: 1.3; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; text-shadow: none;
}
.bc-band span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-band.is-2 { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.8cqw; }
.bc-band.is-2 span { max-width: 100%; }
[data-layout="band"] .bc-front-in > .bc-logo { top: 6.5cqw; left: 6.5cqw; }
[data-layout="band"] .bc-id { position: absolute; left: 6.5cqw; right: 6.5cqw; bottom: calc(var(--band, 10.5cqw) + 4cqw); }
[data-layout="band"] .has-avatar .bc-id { right: 26.5cqw; }
[data-layout="band"] .bc-name { font-size: calc(6.6cqw * var(--ns, 1)); }
[data-layout="band"] .bc-avatar { right: 6.5cqw; bottom: calc(var(--band, 10.5cqw) + 4cqw); width: 17cqw; }

/* split: a colour panel (the accent) with the initials or the logo; the text in the middle of the other side. */
[data-layout="split"] .bc-panel { width: 34cqw; background: var(--accent); color: var(--on-accent, var(--bg1)); }
[data-layout="split"] .bc-panel.is-initials span { font-size: 14cqw; }
[data-layout="split"] .bc-id { position: absolute; left: 6.5cqw; right: 40cqw; top: 50%; transform: translateY(-50%); }
[data-layout="split"][data-align="right"] .bc-id { left: 40cqw; right: 6.5cqw; }
[data-layout="split"] .bc-name { font-size: calc(5.8cqw * var(--ns, 1)); line-height: 1.1; }
[data-layout="split"] .bc-company { margin-top: 2.4cqw; }

/* pop: a tilted rounded-square photo with a hard offset shadow, a chunky name, the title in a pill. */
.bc-scene[data-layout="pop"] .bc-tile {
  left: auto; right: 7.5cqw; top: 50%; width: 27cqw; margin: -13.5cqw 0 0; border-radius: 5cqw; box-sizing: border-box;
  border: 0.8cqw solid var(--ink); box-shadow: 1.7cqw 1.7cqw 0 var(--ink); transform: rotate(4deg); background: var(--ink);
}
.bc-scene[data-layout="pop"][data-align="right"] .bc-tile { right: auto; left: 7.5cqw; transform: rotate(-4deg); }
.bc-scene[data-layout="pop"] .bc-tile.is-initials { display: grid; place-items: center; }
.bc-scene[data-layout="pop"] .bc-tile.is-initials span { font-family: var(--font), sans-serif; font-weight: 800; font-size: 10cqw; color: var(--bg1); letter-spacing: 0.01em; }
.bc-scene[data-layout="pop"] .bc-tile.is-logo { display: grid; place-items: center; background: #ffffff; }
[data-layout="pop"] .bc-id { position: absolute; left: 6.5cqw; right: 41cqw; top: 50%; transform: translateY(-50%); }
[data-layout="pop"][data-align="right"] .bc-id { left: 41cqw; right: 6.5cqw; }
[data-layout="pop"] .no-tile .bc-id { left: 6.5cqw; right: 6.5cqw; }
[data-layout="pop"] .bc-name { font-size: calc(7.4cqw * var(--ns, 1)); font-weight: 800; line-height: 1; letter-spacing: -0.02em; padding-block: 0.06em; }
[data-layout="pop"] .bc-title { display: inline-block; vertical-align: top; max-width: 100%; box-sizing: border-box; margin-top: 1.8cqw; padding: 0.9cqw 2.3cqw; border-radius: 99cqw; background: var(--ink); color: var(--bg1); font-weight: 600; }
[data-layout="pop"] .bc-title.is-2 { display: -webkit-box; width: fit-content; border-radius: 2.6cqw; }
[data-layout="pop"] .bc-company { font-size: calc(2.4cqw * var(--cs, var(--ds, 1))); margin-top: 1.8cqw; font-weight: 700; letter-spacing: 0.12em; }
[data-layout="pop"] .bc-front-in > .bc-logo { top: 5.5cqw; left: 6.5cqw; }
[data-layout="pop"][data-align="right"] .bc-front-in > .bc-logo { left: auto; right: 6.5cqw; justify-content: flex-end; }
[data-layout="pop"] .bc-qr-code { box-shadow: 1.3cqw 1.3cqw 0 var(--ink); }
[data-layout="pop"] .bc-qr-cap { margin-top: 2.8cqw; }
[data-layout="pop"] .bc-scan-cap { margin-top: 3.2cqw; }

/* ---------- the back ---------- */
.bc-back-in { padding: 6cqw; display: grid; grid-template-columns: 33cqw minmax(0, 1fr); gap: 5cqw; align-items: center; }
.bc-back-in.no-qr { grid-template-columns: minmax(0, 1fr); padding: 7cqw 8cqw; }
.bc-qr { display: flex; flex-direction: column; align-items: center; }
.bc-qr-code { width: 100%; border-radius: 2.6cqw; overflow: hidden; box-shadow: var(--qr-drop, 0 0.4cqw 1.2cqw rgba(0, 0, 0, 0.14)); line-height: 0; }
.bc-qr-code svg { width: 100%; height: auto; display: block; }
.bc-qr-cap { margin-top: 1.6cqw; font-size: 1.9cqw; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.bc-info { min-width: 0; }
.bc-back-name { font-family: var(--font), sans-serif; font-weight: var(--fw); font-size: calc(4.3cqw * var(--ns, 1)); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-back-title { font-size: calc(2.3cqw * var(--ts, var(--ds, 1))); color: var(--muted); margin-top: 0.8cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-rows { list-style: none; margin: 2.6cqw 0 0; padding: 0; }
.bc-rows li { display: flex; align-items: center; gap: 1.6cqw; font-size: calc(2.45cqw * var(--ds, 1)); line-height: 1.2; margin: 0 0 1.25cqw; min-width: 0; }
.bc-rows li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bc-ic { width: calc(2.7cqw * var(--ds, 1)); height: calc(2.7cqw * var(--ds, 1)); flex: none; color: var(--accent); }
.bc-socials { display: flex; flex-wrap: wrap; gap: 1.2cqw; margin-top: 1.6cqw; }
/* Social profiles on the back (design.socials). Icons follow the card's text colour. */
.bc a { color: inherit; text-decoration: none; }
.bc-soc { color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.bc-soc .bc-ic { color: var(--ink); }
a.bc-soc { cursor: pointer; }
a.bc-soc:hover { opacity: 0.85; }
/* Only the face that's showing takes taps (the hidden one is behind it, or faded out). */
.bc-scene[data-face="front"] .bc-back a, .bc-scene[data-face="back"] .bc-front a, .bc-scene:not([data-face]) .bc-back a { pointer-events: none; }
.is-icons .bc-soc { width: 4.8cqw; height: 4.8cqw; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--faint); }
.is-icons .bc-soc .bc-ic { width: 2.5cqw; height: 2.5cqw; }
.is-handle { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9cqw 1.6cqw; }
.is-handle .bc-soc { display: flex; align-items: center; gap: 0.9cqw; min-width: 0; font-size: calc(2.2cqw * var(--ss, 1)); line-height: 1.2; padding: 0.5cqw 0; }
.is-handle .bc-soc span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.is-handle .bc-soc .bc-ic { width: calc(2.6cqw * var(--ss, 1)); height: calc(2.6cqw * var(--ss, 1)); }
.is-text { display: block; }
.is-text .bc-soc { display: flex; gap: 1cqw; font-size: calc(2.2cqw * var(--ss, 1)); line-height: 1.2; margin: 0 0 0.9cqw; min-width: 0; }
.is-text .bc-soc b { font-weight: 600; flex: none; }
.is-text .bc-soc span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* Long handles (render.js socialFit): one per row, then smaller text (to a minimum), and an
   ellipsis only for the very longest. */
.is-handle.fit-1, .is-handle.fit-2, .is-handle.fit-3 { grid-template-columns: minmax(0, 1fr); gap: 0.4cqw; }
.is-handle.fit-1 .bc-soc, .is-handle.fit-2 .bc-soc, .is-handle.fit-3 .bc-soc { padding: 0.3cqw 0; }
.fit-2 .bc-soc { font-size: calc(2.05cqw * var(--ss, 1)); }
.fit-3 .bc-soc { font-size: calc(1.9cqw * var(--ss, 1)); }
.is-text.fit-1 .bc-soc, .is-text.fit-2 .bc-soc, .is-text.fit-3 .bc-soc { margin-bottom: 0.7cqw; }
.bc-soc-more { font-size: calc(2.1cqw * var(--ss, 1)); color: var(--muted); display: inline-flex; align-items: center; }
.is-icons .bc-soc-more { box-shadow: inset 0 0 0 1px var(--faint); font-size: 1.9cqw; }
.bc-bio { margin: 1.8cqw 0 0; font-size: calc(2.2cqw * var(--ds, 1)); line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bc-bio.is-short { -webkit-line-clamp: 2; }
.bc-bio.is-tight { -webkit-line-clamp: 1; }
[data-layout="portrait"] .bc-bio.is-tight { -webkit-line-clamp: 2; }
.no-qr .bc-back-name { font-size: calc(5.2cqw * var(--ns, 1)); }
.no-qr .bc-rows li { font-size: calc(2.9cqw * var(--ds, 1)); }
.no-qr .bc-ic { width: calc(3.1cqw * var(--ds, 1)); height: calc(3.1cqw * var(--ds, 1)); }
.no-qr .is-handle { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.no-qr .is-handle.fit-1, .no-qr .is-handle.fit-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6cqw 1.6cqw; }
.no-qr .is-handle.fit-3 { grid-template-columns: minmax(0, 1fr); }
.bc-mark { position: absolute; right: 4.4cqw; bottom: 3.4cqw; font: 500 1.5cqw/1 'Geist Mono', ui-monospace, monospace; letter-spacing: 0.03em; white-space: nowrap; color: var(--muted); opacity: 0.75; }
/* The Free mark sits where the details never go, so a full back (five contact lines, a bio, a
   signature, at any text size) can't run into it: under the QR code's column (its size is fixed),
   or, in portrait, above the QR code. Without a QR code it keeps the corner. */
.bc-back-in:not(.no-qr) > .bc-mark { right: auto; left: 6cqw; width: 33cqw; text-align: center; }

[data-layout="portrait"] .bc-back-in { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-content: start; gap: 6cqw; padding: 10cqw 9cqw; }
[data-layout="portrait"] .bc-qr { width: 58cqw; margin: 0 auto; }
[data-layout="portrait"] .bc-qr-code { border-radius: 4.4cqw; }
[data-layout="portrait"] .bc-qr-cap { font-size: 3.2cqw; margin-top: 2.6cqw; }
[data-layout="portrait"] .bc-info { text-align: center; }
[data-layout="portrait"] .bc-back-name { font-size: calc(7.4cqw * var(--ns, 1)); }
[data-layout="portrait"] .bc-back-title { font-size: calc(4cqw * var(--ts, var(--ds, 1))); margin-top: 1.6cqw; }
[data-layout="portrait"] .bc-rows { display: inline-block; text-align: left; margin-top: 4.6cqw; max-width: 100%; }
[data-layout="portrait"] .bc-rows li { font-size: calc(4.1cqw * var(--ds, 1)); gap: 2.6cqw; margin-bottom: 2.2cqw; }
[data-layout="portrait"] .bc-ic { width: calc(4.4cqw * var(--ds, 1)); height: calc(4.4cqw * var(--ds, 1)); }
[data-layout="portrait"] .bc-socials { justify-content: center; gap: 2cqw; margin-top: 3cqw; }
[data-layout="portrait"] .is-icons .bc-soc { width: 8cqw; height: 8cqw; }
[data-layout="portrait"] .is-icons .bc-soc .bc-ic { width: 4.2cqw; height: 4.2cqw; }
[data-layout="portrait"] .is-handle { gap: 1.6cqw 3cqw; text-align: left; }
[data-layout="portrait"] .is-handle .bc-soc, [data-layout="portrait"] .is-text .bc-soc { font-size: calc(3.7cqw * var(--ss, 1)); gap: 1.6cqw; }
[data-layout="portrait"] .is-handle .bc-soc .bc-ic { width: calc(4.2cqw * var(--ss, 1)); height: calc(4.2cqw * var(--ss, 1)); }
[data-layout="portrait"] .is-text .bc-soc { justify-content: center; margin-bottom: 1.6cqw; }
[data-layout="portrait"] .is-handle.fit-1, [data-layout="portrait"] .is-handle.fit-2, [data-layout="portrait"] .is-handle.fit-3 { grid-template-columns: minmax(0, max-content); justify-content: center; gap: 1.2cqw; }
[data-layout="portrait"] .fit-2 .bc-soc { font-size: calc(3.4cqw * var(--ss, 1)); }
[data-layout="portrait"] .fit-3 .bc-soc { font-size: calc(3.1cqw * var(--ss, 1)); }
[data-layout="portrait"] .bc-soc-more { font-size: calc(3.4cqw * var(--ss, 1)); }
[data-layout="portrait"] .bc-bio { font-size: calc(3.7cqw * var(--ds, 1)); margin-top: 3cqw; }
[data-layout="portrait"] .bc-mark { font-size: 2.4cqw; right: 0; left: 0; text-align: center; bottom: 5cqw; }
[data-layout="portrait"] .bc-back-in > .bc-mark { left: 0; right: 0; width: auto; top: 4.4cqw; bottom: auto; }

/* ---------- the other backs (design.back; render.js scanBack, companyBack) ---------- */
/* Scan first: a large QR code in the middle (its size --qr and its top are set by render.js, so the
   foil's clear area is exactly where it sits), "Scan to save {name}" in the name's font, the website. */
.bc-back-in.is-scan { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; padding: 5cqw 7cqw; text-align: center; }
.is-scan .bc-qr { width: var(--qr, 31cqw); flex: none; }
.bc-scan-cap {
  font-family: var(--font), 'Hanken Grotesk', system-ui, sans-serif; font-weight: var(--fw); font-size: calc(3.7cqw * var(--ns, 1)); line-height: 1.12;
  margin-top: 2.2cqw; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-inline: 0.15em;
}
.bc-scan-cap.is-2 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; text-wrap: balance; }
.is-scan.no-qr { justify-content: center; padding-top: 5cqw !important; }
.is-scan.no-qr .bc-scan-cap { font-size: calc(5.55cqw * var(--ns, 1)); margin-top: 0; }
.bc-scan-site { margin-top: 1.3cqw; font-size: calc(2.1cqw * var(--cs, var(--ds, 1))); line-height: 1.3; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-case="upper"] .bc-scan-cap { text-transform: uppercase; }
[data-spacing="tight"] .bc-scan-cap { letter-spacing: -0.025em; }
[data-spacing="wide"] .bc-scan-cap { letter-spacing: 0.06em; }
[data-spacing="wider"] .bc-scan-cap { letter-spacing: 0.14em; }
/* Company: the logo and the company lead, the person and the contact lines under them, a small QR code in the corner. */
.bc-back-in.is-company { display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 2.4cqw; padding: 6cqw 6.5cqw; }
.bc-co-head { display: flex; align-items: center; gap: 2.4cqw; min-width: 0; }
.bc-co-logo { flex: none; height: 9cqw; max-width: 22cqw; display: flex; align-items: center; }
.bc-co-logo img { height: 100%; width: auto; max-width: 100%; object-fit: contain; display: block; }
.bc-co-logo.is-inverted img { filter: invert(1); }
.bc-co-logo.has-backing { box-sizing: border-box; padding: 0.9cqw 1.1cqw; border-radius: 1.8cqw; background: rgba(255, 255, 255, 0.92); box-shadow: 0 0.2cqw 0.7cqw rgba(0, 0, 0, 0.14); }
.bc-co-name {
  font-family: var(--font), 'Hanken Grotesk', system-ui, sans-serif; font-weight: var(--fw); font-size: calc(5.4cqw * var(--ns, 1)); line-height: 1.08; letter-spacing: -0.01em;
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-inline: 0.15em; margin-inline: -0.15em;
}
.bc-co-name.is-2, .bc-co-name.is-3 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; text-wrap: balance; }
.bc-co-name.is-3 { -webkit-line-clamp: 3; }
.bc-co-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 4cqw; min-width: 0; }
.is-company .bc-info { flex: 1; min-width: 0; }
.is-company .bc-qr { width: 21cqw; flex: none; }
.is-company .bc-qr-code { border-radius: 2cqw; }
.is-company .bc-qr-cap { margin-top: 1.2cqw; font-size: 1.7cqw; line-height: 1.3; font-weight: 600; }
.bc-co-person { font-size: calc(2.7cqw * var(--ts, var(--ds, 1))); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.bc-co-person > span:first-child { font-weight: 600; color: var(--ink); }
.bc-co-person.is-split > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-co-person.is-split > .bc-sep { display: none; }
.is-company .bc-rows { margin-top: 1.6cqw; }
.is-company .bc-rows li:last-child { margin-bottom: 0; }
/* The Free mark keeps the bottom corner on these backs (the classic back has it under the QR column). */
.bc-scene:not([data-layout="portrait"]) .bc-back-in:is(.is-scan, .is-company) > .bc-mark { left: auto; right: 4.4cqw; width: auto; text-align: right; }
/* Portrait. */
[data-layout="portrait"] .bc-back-in.is-scan { display: flex; padding: 12cqw 9cqw; }
[data-layout="portrait"] .bc-scan-cap { font-size: calc(6.6cqw * var(--ns, 1)); margin-top: 5cqw; }
[data-layout="portrait"] .is-scan.no-qr { padding-top: 12cqw !important; }
[data-layout="portrait"] .is-scan.no-qr .bc-scan-cap { font-size: calc(9.9cqw * var(--ns, 1)); margin-top: 0; }
[data-layout="portrait"] .bc-scan-site { font-size: calc(3.6cqw * var(--cs, var(--ds, 1))); margin-top: 3cqw; }
[data-layout="portrait"] .bc-back-in.is-company { display: flex; gap: 5cqw; padding: 12cqw 9cqw 9cqw; text-align: center; }
[data-layout="portrait"] .bc-co-head { flex-direction: column; align-items: center; gap: 3cqw; }
[data-layout="portrait"] .bc-co-logo { height: 16cqw; max-width: 60cqw; }
[data-layout="portrait"] .bc-co-name { font-size: calc(8.6cqw * var(--ns, 1)); line-height: 1.1; max-width: 100%; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; text-wrap: balance; }
[data-layout="portrait"] .bc-co-name.is-3 { -webkit-line-clamp: 3; }
[data-layout="portrait"] .bc-co-body { flex: 1; flex-direction: column; align-items: center; justify-content: space-between; gap: 5cqw; width: 100%; }
[data-layout="portrait"] .is-company .bc-info { flex: none; width: 100%; margin: auto 0; }
[data-layout="portrait"] .bc-co-person { font-size: calc(4.4cqw * var(--ts, var(--ds, 1))); }
[data-layout="portrait"] .bc-co-person.is-split > span:not(.bc-sep) { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-wrap: balance; }
[data-layout="portrait"] .is-company .bc-rows { margin-top: 4.6cqw; }
[data-layout="portrait"] .is-company .bc-qr { width: 34cqw; margin: 0; }
[data-layout="portrait"] .is-company .bc-qr-code { border-radius: 3cqw; }
[data-layout="portrait"] .is-company .bc-qr-cap { font-size: 3.2cqw; margin-top: 2.6cqw; }

/* ---------- the backs of the band and split layouts ---------- */
/* band: the same band along the bottom (the QR caption and the website in it); the details sit above it. */
[data-layout="band"] .bc-back-in { grid-template-columns: 30cqw minmax(0, 1fr); padding: 5cqw 6cqw calc(var(--band, 10.5cqw) + 5cqw); }
[data-layout="band"] .bc-back-in.no-qr { grid-template-columns: minmax(0, 1fr); padding: 6cqw 8cqw calc(var(--band, 10.5cqw) + 5cqw); }
[data-layout="band"] .bc-qr-cap { display: none; }
[data-layout="band"] .bc-back-in > .bc-mark { bottom: calc(var(--band, 10.5cqw) + 1.3cqw); }
[data-layout="band"] .bc-back-in:not(.no-qr):not(.is-scan):not(.is-company) > .bc-mark { width: 30cqw; }
[data-layout="band"] .bc-back-in.is-scan { padding-left: 7cqw; padding-right: 7cqw; padding-bottom: 0; }
[data-layout="band"] .bc-back-in.is-company { padding: 5cqw 6.5cqw calc(var(--band, 10.5cqw) + 4.5cqw); }
/* split: the colour panel moves to the other edge (the same edge of the card) and holds the QR code. */
.bc-bpanel { position: absolute; top: 0; bottom: 0; left: 0; width: 40cqw; background: var(--accent); }
[data-align="right"] .bc-bpanel { left: auto; right: 0; }
.bc-back-in.is-split { grid-template-columns: 26cqw minmax(0, 1fr); gap: 11cqw; padding: 6cqw 6.5cqw 6cqw 7cqw; }
.is-split .bc-qr { position: relative; z-index: 1; }
.is-split .bc-qr-cap { display: none; }
[data-align="right"] .bc-back-in.is-split { grid-template-columns: minmax(0, 1fr) 26cqw; padding: 6cqw 7cqw 6cqw 6.5cqw; }
[data-align="right"] .is-split:not(.is-company) .bc-qr { order: 2; }
.bc-back-in.is-split > .bc-mark, .bc-scene .bc-back-in.is-split.is-company > .bc-mark { left: 46.5cqw; right: auto; width: auto; text-align: left; }
[data-align="right"] .bc-back-in.is-split > .bc-mark, .bc-scene[data-align="right"] .bc-back-in.is-split.is-company > .bc-mark { left: 6.5cqw; }
.bc-back-in.is-company.is-split { gap: 2.4cqw; padding: 6cqw 6.5cqw 6cqw 46.5cqw; }
[data-align="right"] .bc-back-in.is-company.is-split { padding: 6cqw 46.5cqw 6cqw 6.5cqw; }
.is-company.is-split .bc-co-logo { max-width: 12cqw; }
.is-company.is-split .bc-co-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; text-wrap: balance; }
.is-company.is-split .bc-co-name.is-3 { -webkit-line-clamp: 3; }
.is-company.is-split .bc-qr { position: absolute; top: 50%; left: 7cqw; width: 26cqw; margin-top: -13cqw; }
[data-align="right"] .is-company.is-split .bc-qr { left: auto; right: 7cqw; }

/* ---------- the Abramson Technologies staff card ---------- */
[data-layout="staff"] .bc-face { font-family: 'Hanken Grotesk', system-ui, sans-serif; }
.st-front { padding: 6.5cqw; }
.st-brand { position: absolute; top: 6.4cqw; left: 6.5cqw; display: flex; align-items: center; gap: 2.2cqw; }
.st-mark { width: 9.6cqw; height: 7.45cqw; filter: drop-shadow(0 0 0.8cqw rgba(140, 200, 255, 0.35)); }
.st-word { display: flex; flex-direction: column; gap: 0.5cqw; font-weight: 600; font-size: 1.95cqw; letter-spacing: 0.24em; text-transform: uppercase; line-height: 1; }
.st-word span + span { color: rgba(232, 237, 245, 0.55); }
.st-avatar { top: 6.4cqw; right: 6.5cqw; width: 15cqw; box-shadow: 0 0 0 0.35cqw rgba(100, 181, 246, 0.8), 0 1.4cqw 3.6cqw rgba(0, 0, 0, 0.45); }
.st-id { position: absolute; left: 6.5cqw; right: 30cqw; bottom: 6.6cqw; }
.st-id .bc-name { font-weight: 700; font-size: 6.3cqw; letter-spacing: -0.015em; text-shadow: 0 0.3cqw 1.6cqw rgba(0, 0, 0, 0.45); }
.st-id .bc-title { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 2.05cqw; letter-spacing: 0.16em; text-transform: uppercase; color: #64b5f6; margin-top: 1.8cqw; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.st-chip { display: none; }
.st-back { grid-template-columns: 30cqw minmax(0, 1fr); padding: 6cqw 6.5cqw 8.6cqw; }
.st-col { min-width: 0; }
.st-back .bc-back-name { font-weight: 700; }
.st-back .bc-back-title { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 1.75cqw; letter-spacing: 0.12em; text-transform: uppercase; color: #64b5f6; }
.st-back .bc-ic { color: #64b5f6; }
.st-foot { position: absolute; left: 6.5cqw; right: 6.5cqw; bottom: 3.6cqw; display: flex; align-items: center; gap: 1.4cqw; font: 500 1.65cqw/1 'Geist Mono', ui-monospace, monospace; letter-spacing: 0.08em; color: rgba(232, 237, 245, 0.55); }
.st-foot-mark { width: 2.6cqw; height: 2cqw; color: rgba(232, 237, 245, 0.7); }

/* ---------- reduced motion: no rotation; a tap cross-fades the faces ---------- */
.bc-scene.rm .bc { transform: none !important; }
.bc-scene.rm .bc-face { backface-visibility: visible; -webkit-backface-visibility: visible; transition: opacity 0.25s ease; }
.bc-scene.rm .bc-back { transform: none; opacity: 0; }
.bc-scene.rm[data-face="back"] .bc-back { opacity: 1; }
.bc-scene.rm[data-face="back"] .bc-front { opacity: 0; }
.bc-scene.rm .holo-traces, .bc-scene.rm .holo-mark { transform: none; }
/* The custom foil holds a still, premium sheen: a highlight caught on the upper left. */
.bc-scene.rm .cf-sheen { transform: translate3d(-4%, -2%, 0); will-change: auto; }
.bc-scene.rm .cf-glint { transform: translate3d(-22%, -26%, 0); will-change: auto; }
.bc-scene.rm .cf-glare { transform: translate3d(-18%, 0, 0); will-change: auto; }
.bc-scene.rm .cf-depth { transform: none; will-change: auto; }
