/* Hallmark · genre: modern-minimal · macrostructure: Checkout Split (paper document + sticky pay panel)
 * theme: custom, brand-locked to dot.bm · paper: night surface + light invoice sheet · accent: dot.bm cyan
 * type: Brother 1816 (dot.bm's face) with its measured Arial fallback; no web font is fetched
 * motion: card tilt + flip · tab glide · tick draw · all off under reduced motion
 *
 * invoices.dot.bm. dot.bm site palette (dotbm-site src/styles/global.css):
 * background #232738, surface #2b2f42, cyan #22d3ee, plum #bb94d4, text #e2e4ec.
 * Brand colours stay as the site's exact hex values; everything derived is
 * OKLCH. Labels use the site's body grey #a0a5b6, not its muted #767c8e, which
 * is too faint for small text. No web font is loaded, so no third party sees
 * this page: Brother 1816 shows where it is installed, and everyone else gets
 * dot.bm's own fallback, Arial set to Brother 1816's measured geometry. */
@font-face {
  font-family: 'brother-1816-fallback';
  src: local('Arial');
  font-weight: 100 500;
  size-adjust: 105.3%;
  ascent-override: 110%;
  descent-override: 31%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'brother-1816-fallback';
  src: local('Arial Bold'), local('Arial-BoldMT');
  font-weight: 600 900;
  size-adjust: 98.9%;
  ascent-override: 110%;
  descent-override: 31%;
  line-gap-override: 0%;
}

/* Rock Salt (Font Diner, Apache 2.0), served from this site: the name
   signed on the back of the card picture, as on Adam Quinlan's card. */
@font-face {
  font-family: 'Rock Salt';
  src: url(/assets/rocksalt.woff2) format('woff2');
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* dot.bm brand, exact */
  --bg: #232738;
  --surface: #2b2f42;
  --cyan: #22d3ee;
  --plum: #bb94d4;
  --text: #e2e4ec;
  --muted: #a0a5b6;
  /* derived */
  --surface-2: oklch(34% 0.035 275);
  --rule: oklch(100% 0 0 / 0.09);
  --rule-strong: oklch(100% 0 0 / 0.16);
  --cyan-glow: oklch(82% 0.14 210 / 0.18);
  --cyan-ink: oklch(24% 0.04 250);
  --plum-glow: oklch(72% 0.1 310 / 0.16);
  --danger: oklch(78% 0.12 20);
  --ok: oklch(82% 0.15 165);
  /* the invoice sheet */
  --paper: oklch(98.2% 0.004 275);
  --paper-2: oklch(95.2% 0.008 275);
  --ink: oklch(26% 0.03 275);
  --ink-2: oklch(48% 0.02 275);
  --ink-rule: oklch(26% 0.03 275 / 0.1);
  --ink-accent: oklch(52% 0.11 215);
  /* card picture */
  --chip-a: oklch(89% 0.09 90);
  --chip-b: oklch(66% 0.11 75);
  --chip-c: oklch(93% 0.07 95);
  --chip-d: oklch(78% 0.1 85);
  --chip-edge: oklch(52% 0.09 70);
  --card-text: oklch(97% 0.005 275);
  --card-shadow: oklch(10% 0.02 275 / 0.45);
  --stripe: oklch(14% 0.01 275);
  --sig-a: oklch(93% 0.006 275);
  --sig-b: oklch(87% 0.01 275);
  --sig-ink: oklch(30% 0.09 265);
  --visa-a: oklch(50% 0.2 265);
  --visa-b: oklch(25% 0.12 270);
  --visa-glow: oklch(75% 0.12 255 / 0.45);
  --amex-a: oklch(58% 0.11 235);
  --amex-b: oklch(32% 0.07 240);
  --amex-glow: oklch(85% 0.08 220 / 0.4);
  --mc-a: oklch(33% 0.008 275);
  --mc-b: oklch(17% 0.006 275);
  --mc-glow-1: oklch(78% 0.16 70 / 0.22);
  --mc-glow-2: oklch(58% 0.23 27 / 0.2);
  --mc-red: #eb001b;
  --mc-yellow: #f79e1b;
  --mc-mid: #ff5f00;
  --unknown-a: oklch(40% 0.03 20);
  --unknown-b: oklch(24% 0.03 20);

  --font: 'brother-1816', 'Brother 1816', 'brother-1816-fallback', Helvetica, Arial, sans-serif;
  --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px; --space-xl: 32px; --space-2xl: 48px; --space-3xl: 72px;
  --radius-sm: 8px; --radius: 12px; --radius-lg: 18px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-fast: 140ms; --dur: 260ms; --dur-slow: 620ms;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.5;
  background-image:
    radial-gradient(60rem 36rem at 85% -10%, var(--cyan-glow), transparent 60%),
    radial-gradient(48rem 30rem at -10% 30%, var(--plum-glow), transparent 60%);
  background-repeat: no-repeat;
}
a { color: var(--cyan); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, .input:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* Shared shell (also home.html and staff.html) */
.wrap { max-width: 720px; margin: 0 auto; padding: var(--space-xl) var(--space-md) var(--space-2xl); }
.wrap.wide { max-width: 1080px; }
header img { width: 132px; height: auto; display: block; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 28px; margin-top: var(--space-lg); }
.kicker { font-size: 13px; font-weight: 700; color: var(--plum); }
h1.kicker { margin: 0 0 6px; }
.plain { margin: 0; font-size: 15px; }
.note { color: var(--muted); font-size: 13.5px; margin: 14px 0 0; }
.sub { color: var(--muted); font-size: 15px; margin: 0; }
footer { margin-top: 28px; font-size: 13px; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
  font: inherit; font-weight: 700; font-size: 15px; padding: 12px 22px; border-radius: 10px;
  border: 1.5px solid var(--rule-strong); background: transparent; color: var(--text); cursor: pointer;
  white-space: nowrap; transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn.primary { background: var(--cyan); border-color: var(--cyan); color: var(--cyan-ink); }

/* Messages (bad link, no connection) */
.notice { margin-top: var(--space-3xl); max-width: 34rem; }
.notice-title { font-size: clamp(28px, 6vw, 40px); line-height: 1.1; margin: 0 0 var(--space-md); }
.notice-text { color: var(--muted); margin: 0; font-size: 17px; }

/* ---- Hero: what is owed, and when ------------------------------------ */
.hero { margin: var(--space-2xl) 0 var(--space-xl); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 var(--space-sm); color: var(--muted); font-size: 15px; }
.hero-meta span:first-child { color: var(--plum); font-weight: 700; }
.hero-amount {
  margin: 0; font-size: clamp(48px, 11vw, 92px); line-height: 1; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0;
}
.hero-due { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: var(--space-md) 0 0; color: var(--muted); font-size: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 1px solid currentColor; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-due { color: var(--cyan); }
.pill-overdue { color: var(--danger); }
.pill-paid { color: var(--ok); }

/* ---- The split ---------------------------------------------------------- */
.split { display: grid; gap: var(--space-xl); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 880px) {
  .split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-2xl); }
  .split .doc { grid-column: 1; grid-row: 1; }
  .split .checkout { grid-column: 2; grid-row: 1; position: sticky; top: var(--space-lg); }
}

/* ---- The invoice, as the PDF lays it out ------------------------------ */
.doc {
  background: var(--paper); color: var(--ink); border-radius: var(--radius-sm);
  padding: clamp(24px, 5vw, 48px);
  box-shadow: 0 1px 0 oklch(100% 0 0 / 0.6) inset, 0 30px 60px -20px var(--card-shadow);
}
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-lg); flex-wrap: wrap; }
.doc-logo { width: 150px; height: auto; display: block; margin-top: 4px; }
.doc-title { text-align: right; margin-left: auto; }
.doc-kind { margin: 0 0 var(--space-sm); font-size: 26px; font-weight: 700; color: var(--ink-accent); line-height: 1.1; }
.doc-meta { margin: 0; display: grid; gap: 2px; font-size: 14px; }
.doc-meta div { display: flex; justify-content: flex-end; gap: var(--space-md); }
.doc-meta dt { color: var(--ink-2); }
.doc-meta dd { margin: 0; min-width: 6.5em; text-align: right; font-variant-numeric: tabular-nums; }
.doc-parties { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-lg); margin: var(--space-2xl) 0 var(--space-xl); }
.doc-label { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.doc-party { margin: 0; display: flex; flex-direction: column; font-size: 15px; overflow-wrap: anywhere; }
.doc-lines { width: 100%; border-collapse: collapse; }
.doc-lines th { font-size: 12px; font-weight: 700; color: var(--ink-2); text-align: left; padding: 0 0 10px; border-bottom: 2px solid var(--ink-accent); }
.doc-lines td { padding: 14px 0; border-bottom: 1px solid var(--ink-rule); vertical-align: top; font-size: 15px; }
.doc-lines .n { text-align: right; white-space: nowrap; padding-left: var(--space-md); font-variant-numeric: tabular-nums; }
.line-item { display: block; font-weight: 700; }
.line-desc, .line-qr { display: block; color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.line-qr { display: none; }
.doc-totals { margin: var(--space-sm) 0 0 auto; width: min(100%, 50%); min-width: 240px; }
.tot-row { display: flex; justify-content: space-between; gap: var(--space-md); padding: 7px 0; font-variant-numeric: tabular-nums; }
.tot-row dt { color: var(--ink-2); }
.tot-row dd { margin: 0; }
.tot-grand { margin-top: 4px; padding-top: 12px; border-top: 1.5px solid var(--ink); font-weight: 700; font-size: 18px; }
.tot-grand dt { color: var(--ink); }
.doc-foot { margin-top: var(--space-2xl); display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); flex-wrap: wrap; }
.doc-sign { color: var(--ink-2); font-size: 12px; }
.btn-quiet { color: var(--ink); border-color: var(--ink-rule); background: var(--paper-2); }
.btn-quiet:hover { border-color: var(--ink-2); }
.btn-quiet:focus-visible { outline-color: var(--ink-accent); }

/* ---- Checkout panel ----------------------------------------------------- */
.checkout {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  padding: var(--space-lg); box-shadow: 0 30px 60px -30px var(--card-shadow);
}
.checkout-title { margin: 0 0 var(--space-md); font-size: 18px; }
.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: var(--space-lg); background: var(--bg); border-radius: 12px; --tab: 0; }
.tab {
  position: relative; z-index: 1; font: inherit; font-weight: 700; font-size: 15px; padding: 10px 12px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; transition: color var(--dur) var(--ease-out);
}
.tab[aria-selected="true"] { color: var(--text); }
.tab:hover { color: var(--text); }
.tab-glide {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 9px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--rule-strong);
  transform: translateX(calc(var(--tab) * 100%)); transition: transform var(--dur) var(--ease-out);
}
.pane[hidden] { display: none; }
.pane-wait { color: var(--muted); margin: var(--space-lg) 0; }
.pane-wait.is-error { color: var(--danger); }
.pane-note { color: var(--muted); font-size: 13.5px; margin: var(--space-md) 0 0; }

/* Card form */
.cardform .field { display: block; margin-bottom: 14px; }
.field-label { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.input {
  width: 100%; font: inherit; font-size: 17px; color: var(--text); background: var(--bg);
  border: 1.5px solid var(--rule-strong); border-radius: 10px; padding: 12px 14px; letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums; transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.input::placeholder { color: oklch(62% 0.02 275); }
.input:hover { border-color: oklch(100% 0 0 / 0.26); }
.input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-glow); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input:disabled { opacity: 0.6; }
.accepted { display: inline-flex; gap: 8px; align-items: center; }
.accepted .logo { width: 30px; height: 20px; color: var(--muted); opacity: 0.8; transition: opacity var(--dur) var(--ease-out), color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.accepted.picked .logo { opacity: 0.22; }
.accepted.picked .logo.on { opacity: 1; color: var(--cyan); transform: scale(1.15); }
.btn-pay {
  width: 100%; margin-top: var(--space-sm); padding: 15px 22px; font-size: 17px;
  background: var(--cyan); border-color: var(--cyan); color: var(--cyan-ink);
  box-shadow: 0 10px 30px -10px var(--cyan);
}
/* Apple's own button, drawn by Safari (white on the dark page, as Apple's
   guidelines ask). Only shown where Apple Pay can pay. */
.btn-applepay {
  display: block; width: 100%; height: 50px; margin: 0; border: 0; cursor: pointer;
  -webkit-appearance: -apple-pay-button; -apple-pay-button-type: pay; -apple-pay-button-style: white;
  border-radius: 10px;
}
.btn-applepay:disabled { opacity: 0.5; cursor: default; }
.or { display: flex; align-items: center; gap: 12px; margin: var(--space-md) 0; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
.btn-pay:hover { border-color: var(--cyan); filter: brightness(1.06); }
.btn-pay .ico { width: 16px; height: 16px; }
.btn-pay.is-busy span::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.status { min-height: 1.4em; color: var(--danger); font-size: 14px; margin: 10px 0 0; }
.trust { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 13px; margin: var(--space-md) 0 0; padding-top: var(--space-md); border-top: 1px solid var(--rule); }
.ico { flex: none; width: 15px; height: 15px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.ico rect { fill: currentColor; stroke: none; }

/* Bank transfer */
.bank { margin: 0; }
.bank-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); padding: 12px 0; border-bottom: 1px solid var(--rule); }
.bank-row dt { color: var(--muted); font-size: 14px; }
.bank-row dd { margin: 0; display: flex; align-items: center; gap: 10px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; }
.bank-val { overflow-wrap: anywhere; }
.copy {
  font: inherit; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rule-strong); background: transparent; color: var(--cyan); white-space: nowrap;
}
.copy:hover { border-color: var(--cyan); }
.copy.is-done { color: var(--ok); border-color: var(--ok); }

/* Paid */
.paid { text-align: center; padding: var(--space-lg) var(--space-sm); }
.paid-title { margin: var(--space-md) 0 4px; font-size: 24px; }
.paid-amount { margin: 0; font-size: 34px; font-weight: 700; color: var(--cyan); font-variant-numeric: tabular-nums; }
.paid-text { margin: var(--space-sm) 0 0; color: var(--muted); }
.tick { width: 64px; height: 64px; }
.tick-ring { fill: none; stroke: var(--ok); stroke-width: 2.5; opacity: 0.35; }
.tick-mark { fill: none; stroke: var(--ok); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw var(--dur-slow) var(--ease-out) 120ms forwards; }
.tick-still .tick-mark { animation: none; stroke-dashoffset: 0; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---- Card brand marks --------------------------------------------------- */
.logo { display: inline-block; background-color: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.logo-visa { --m: url(/assets/visa.svg); }
.logo-mastercard { --m: url(/assets/mastercard.svg); }
.logo-amex { --m: url(/assets/amex.svg); }
.mc-red { fill: var(--mc-red); }
.mc-yellow { fill: var(--mc-yellow); }
.mc-mid { fill: var(--mc-mid); }

/* ---- The card picture --------------------------------------------------- */
.cardviz { perspective: 1200px; max-width: 360px; margin: 0 auto var(--space-lg); }
.cv-tilt { --rx: 0deg; --ry: 0deg; --gx: 30%; --gy: 0%; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform var(--dur) var(--ease-out); transform-style: preserve-3d; }
.cv-inner { position: relative; aspect-ratio: 1.586; transition: transform var(--dur-slow) var(--ease-out); transform-style: preserve-3d; }
.cardviz.flipped .cv-inner { transform: rotateY(180deg); }
.cv-face {
  position: absolute; inset: 0; border-radius: 16px; padding: 20px 22px; color: var(--card-text); overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background:
    radial-gradient(120% 140% at 100% 0%, var(--cyan-glow), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, var(--plum-glow), transparent 60%),
    linear-gradient(135deg, var(--surface-2), var(--bg));
  box-shadow: 0 22px 44px -12px var(--card-shadow), inset 0 0 0 1px var(--rule);
}
/* the wave that splits the card into two tones, as on Adam Quinlan's card */
.cv-front::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 150% 62% at 30% -14%, oklch(100% 0 0 / 0.1) 0 99.5%, transparent 100%);
}
/* a sheen that follows the pointer */
.cv-face::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(40% 60% at var(--gx) var(--gy), oklch(100% 0 0 / 0.14), transparent 70%);
}
.cv-back { transform: rotateY(180deg); padding: 0; }
.brand-visa .cv-face { background: radial-gradient(120% 140% at 100% 0%, var(--visa-glow), transparent 55%), linear-gradient(135deg, var(--visa-a), var(--visa-b)); }
.brand-amex .cv-face { background: radial-gradient(120% 140% at 100% 0%, var(--amex-glow), transparent 55%), linear-gradient(135deg, var(--amex-a), var(--amex-b)); }
.brand-mastercard .cv-face { background: radial-gradient(110% 130% at 100% 0%, var(--mc-glow-1), transparent 55%), radial-gradient(90% 120% at 0% 100%, var(--mc-glow-2), transparent 60%), linear-gradient(135deg, var(--mc-a), var(--mc-b)); }
.brand-unknown .cv-face { background: linear-gradient(135deg, var(--unknown-a), var(--unknown-b)); }
.cv-top { display: flex; justify-content: space-between; align-items: center; }
.cv-chip { width: 46px; height: 35px; display: block; filter: drop-shadow(0 1px 1px oklch(0% 0 0 / 0.35)); }
.chip-s1 { stop-color: var(--chip-c); }
.chip-s2 { stop-color: var(--chip-a); }
.chip-s3 { stop-color: var(--chip-d); }
.chip-s4 { stop-color: var(--chip-b); }
.chip-plate { stroke: var(--chip-edge); stroke-width: 0.8; }
.chip-lines { fill: none; stroke: var(--chip-edge); stroke-width: 1.1; stroke-linecap: round; opacity: 0.85; }
.chip-core { fill: none; stroke: var(--chip-edge); stroke-width: 1.1; }
.cv-brand { display: flex; align-items: center; justify-content: flex-end; height: 44px; min-width: 64px; margin-right: -8px; }
.cv-brand .logo { width: 84px; height: 64px; color: var(--card-text); }
.brand-visa .cv-brand .logo { width: 104px; height: 80px; }
.cv-brand .mc { width: 64px; height: 40px; margin-right: 8px; }
.cv-number { display: flex; align-items: flex-start; width: max-content; margin-top: 9%; font-size: clamp(17px, 5.4vw, 22px); letter-spacing: 0.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cv-slot { display: block; flex: none; width: 0.68em; height: 1.35em; line-height: 1.35em; text-align: center; overflow: hidden; }
.cv-slot.is-gap { width: 0.5em; }
.cv-slot.is-dim { opacity: 0.45; }
.cv-ch { display: block; }
.cv-ch.roll { animation: roll var(--dur) var(--ease-out); }
@keyframes roll { from { transform: translateY(-70%); opacity: 0; } to { transform: none; opacity: 1; } }
.cv-bottom { position: absolute; left: 22px; right: 22px; bottom: 18px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.cv-holder { min-width: 0; flex: 1; }
.cv-name { display: flex; max-width: 100%; font-size: 14px; letter-spacing: 0.06em; white-space: nowrap; overflow: hidden; }
.cv-name .cv-slot { width: auto; min-width: 0.3em; }
.cv-exp { display: flex; justify-content: flex-end; width: max-content; margin-left: auto; font-size: 15px; font-variant-numeric: tabular-nums; }
.cv-exp .cv-slot { width: auto; min-width: 0.6em; padding: 0 0.02em; }
.cv-label { display: block; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; margin-bottom: 2px; }
.cv-right { text-align: right; flex: none; }
.cv-frontcvc { font-size: 13px; letter-spacing: 0.1em; opacity: 0.85; padding: 2px 6px; border-radius: 6px; border: 1.5px solid transparent; transition: border-color var(--dur) var(--ease-out); }
.cv-frontcvc.is-hot { border-color: oklch(100% 0 0 / 0.75); }
/* the frame that follows the part being typed */
.cv-frame {
  position: absolute; left: 0; top: 0; width: var(--fw, 0); height: var(--fh, 0); z-index: 2; pointer-events: none;
  transform: translate(var(--fx, 0), var(--fy, 0)); border: 1.5px solid oklch(100% 0 0 / 0.7); border-radius: 10px;
  background: oklch(100% 0 0 / 0.06); box-shadow: 0 0 20px oklch(100% 0 0 / 0.12);
  opacity: 0; transition: transform var(--dur) var(--ease-out), width var(--dur) var(--ease-out), height var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.cv-frame.is-on { opacity: 1; }
.cv-backfoot { position: absolute; left: 22px; right: 22px; bottom: 14px; display: flex; justify-content: space-between; align-items: flex-end; }
.cv-brand-back { height: 34px; min-width: 0; margin-right: -6px; }
.cv-brand-back .logo { width: 64px; height: 44px; }
.brand-visa .cv-brand-back .logo { width: 72px; height: 52px; }
.cv-brand-back .mc { width: 46px; height: 28px; margin-right: 6px; }
.cv-stripe { height: 22%; margin-top: 9%; background: var(--stripe); }
.cv-sigrow { display: flex; align-items: center; gap: 10px; margin: 7% 22px 0; }
.cv-sig {
  flex: 1; min-width: 0; height: 40px; border-radius: 4px; padding: 0 12px; display: flex; align-items: center; overflow: hidden;
  background: repeating-linear-gradient(135deg, var(--sig-a) 0 6px, var(--sig-b) 6px 12px);
}
/* the name, signed */
.cv-signed {
  font-family: 'Rock Salt', 'Segoe Script', cursive;
  font-size: 15px; line-height: 1.6; text-transform: uppercase; color: var(--sig-ink); white-space: nowrap; flex: none;
  transform: rotate(-2deg); transform-origin: left center;
}
.cv-cvc { min-width: 58px; padding: 8px 10px; border-radius: 4px; background: var(--paper); color: var(--ink); font-weight: 700; text-align: center; letter-spacing: 0.15em; }

/* ---- Who made this ------------------------------------------------------ */
.made {
  margin-top: var(--space-3xl); padding-top: var(--space-xl); border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); align-items: end;
}
.made-copy { max-width: 40rem; }
.made-lead { margin: 0 0 var(--space-sm); font-size: clamp(20px, 3.4vw, 28px); font-weight: 700; line-height: 1.25; }
.made-text { margin: 0; color: var(--muted); font-size: 16px; }
.btn-talk { justify-self: start; color: var(--cyan); border-color: var(--cyan); text-decoration: none; }
.btn-talk:hover { background: var(--cyan-glow); border-color: var(--cyan); }
@media (min-width: 880px) {
  .made { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2xl); }
  .btn-talk { justify-self: end; }
}

/* ---- Phones ------------------------------------------------------------- */
@media (max-width: 560px) {
  .card { padding: 20px; }
  .doc-parties { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); margin: var(--space-xl) 0 var(--space-lg); }
  .doc-title { text-align: left; margin-left: 0; }
  .doc-meta div { justify-content: flex-start; }
  .doc-meta dt { min-width: 8.5em; }
  .doc-meta dd { text-align: left; }
  .checkout { padding: var(--space-md); border-radius: var(--radius); }
  .q { display: none; }
  .line-qr { display: block; }
  .doc-totals { width: 100%; }
  .bank-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .bank-row dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .cv-tilt, .cv-inner, .cv-frame, .tab-glide, .tab, .btn, .input, .accepted .logo { transition: none; }
  .cv-ch.roll { animation: none; }
  .tick-mark { animation: none; stroke-dashoffset: 0; }
  .btn-pay.is-busy span::after { animation: none; content: "..."; }
}
.loading { margin-top: var(--space-2xl); }
