/* ============================================================
   BrandTap Billing - Signup v3 (Billing 1.126.0, R2 Checkout v3)
   Loaded only by templates/signup-v3.php. Same palette and type as
   signup.css (brandtap.ca v2: warm paper, ink, BrandTap yellow,
   Geist + Geist Mono), every class prefixed btb3- so it can never
   touch the v2 page.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
	--b3-bg:        #F5F4EE;
	--b3-bg-alt:    #EBEAE3;
	--b3-surface:   #FFFFFF;
	--b3-ink:       #0A0A0A;
	--b3-ink-2:     #2A2A2A;
	--b3-ink-3:     #595959;  /* 6.6:1 on --b3-bg */
	--b3-ink-4:     #6E6E68;  /* 4.9:1 on --b3-bg, 5.1:1 on white */
	--b3-line:      rgba(10,10,10,.10);
	--b3-line-2:    rgba(10,10,10,.20);
	--b3-yellow:    #FFD800;
	--b3-yellow-dk: #F0C800;
	--b3-yellow-bg: #FFF9D6;
	--b3-on-dark:   #F5F4EE;
	--b3-on-dark-2: rgba(245,244,238,.78);  /* 11:1 on ink */
	--b3-ok:        #166534;
	--b3-ok-bg:     #ECFDF3;
	--b3-err:       #B91C1C;
	--b3-err-bg:    #FEF2F2;
	--b3-focus:     0 0 0 3px var(--b3-surface), 0 0 0 5px var(--b3-ink);
	--b3-radius:    14px;
	--b3-bar-h:     72px;     /* updated by JS from the real bar height */
	--b3-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--b3-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
	font-family: var(--b3-sans);
}

html { -webkit-text-size-adjust: 100%; }
body.btb3 {
	min-height: 100vh;
	background: var(--b3-bg);
	color: var(--b3-ink);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	/* The mobile bar never covers the last control. */
	padding-bottom: calc(var(--b3-bar-h) + env(safe-area-inset-bottom, 0px) + 16px);
}
body.btb3.is-nobar { padding-bottom: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--b3-focus); border-radius: 8px; }
.btb3-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── QA preview banner ────────────────────────────────────────── */
.btb3-qa {
	display: flex; flex-wrap: wrap; gap: .25rem .75rem; justify-content: center; align-items: baseline;
	background: repeating-linear-gradient(-45deg, #1a1a1a 0 12px, #0A0A0A 12px 24px);
	color: var(--b3-yellow); font-size: .82rem; padding: .55rem 1rem; text-align: center;
}
.btb3-qa strong { font-family: var(--b3-mono); letter-spacing: .1em; text-transform: uppercase; }
.btb3-qa span { color: var(--b3-on-dark); }

/* ── Shell + header ───────────────────────────────────────────── */
.btb3-shell { max-width: 1200px; margin: 0 auto; padding: 1rem 16px 2rem; }
.btb3-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.btb3-back {
	display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: .35rem .5rem;
	font-size: .9rem; font-weight: 500; text-decoration: none; color: var(--b3-ink-3); white-space: nowrap;
}
.btb3-back:hover { color: var(--b3-ink); text-decoration: underline; }
.btb3-logo { max-height: 40px; width: auto; display: block; }
.btb3-site-name { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.btb3-logo-link { text-decoration: none; }
.btb3-header-spacer { width: 6.5rem; flex-shrink: 0; }
@media (max-width: 480px) {
	.btb3-back-label { display: none; }
	.btb3-header-spacer { width: 44px; }
}

/* ── Progress ─────────────────────────────────────────────────── */
.btb3-progress {
	list-style: none; display: flex; justify-content: center; gap: 0; margin: 0 auto 1.75rem; max-width: 520px;
	counter-reset: s;
}
.btb3-progress-step {
	flex: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem; position: relative;
	font-family: var(--b3-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--b3-ink-4);
}
.btb3-progress-step + .btb3-progress-step::before {
	content: ''; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; background: var(--b3-line-2); z-index: 0;
}
.btb3-progress-num {
	position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
	background: var(--b3-bg); border: 2px solid var(--b3-line-2); font-weight: 600; font-size: .75rem; color: var(--b3-ink-3);
	transition: background .2s, border-color .2s, color .2s;
}
.btb3-progress-step.is-done .btb3-progress-num { background: var(--b3-ink); border-color: var(--b3-ink); color: var(--b3-on-dark); }
.btb3-progress-step.is-done + .btb3-progress-step::before { background: var(--b3-ink); }
.btb3-progress-step.is-active .btb3-progress-num { background: var(--b3-yellow); border-color: var(--b3-ink); color: var(--b3-ink); }
.btb3-progress-step.is-active { color: var(--b3-ink); font-weight: 600; }

/* ── Layout: one column, + a sticky summary column from 1024px ── */
.btb3-layout { display: block; }
.btb3-panel { display: none; }
@media (min-width: 1024px) {
	.btb3-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
	.btb3-panel { display: block; position: sticky; top: 24px; }
	body.is-nobar .btb3-layout { grid-template-columns: minmax(0, 1fr); }
	body.is-nobar .btb3-panel { display: none; }
	body.btb3 { padding-bottom: 0; }
}
.btb3-main { min-width: 0; }
@media (max-width: 1023px) {
	.btb3-main { max-width: 640px; margin: 0 auto; }
	body[data-step="plan"] .btb3-main { max-width: 760px; }
}

/* ── Step type ────────────────────────────────────────────────── */
.btb3-step { animation: b3In .22s ease both; }
@keyframes b3In { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.btb3-h1 { font-size: clamp(1.6rem, 4.5vw, 2.1rem); font-weight: 700; letter-spacing: -.025em; line-height: 1.12; margin-bottom: .35rem; }
.btb3-sub { color: var(--b3-ink-3); margin-bottom: 1.5rem; font-size: .98rem; }
.btb3-h2 { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: .75rem; }
.btb3-h2-note { font-weight: 500; color: var(--b3-ink-4); font-size: .85rem; letter-spacing: 0; }
.btb3-label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .55rem; }
.btb3-label--inline { margin: 0; }
.btb3-note { font-size: .82rem; color: var(--b3-ink-3); margin-top: .5rem; line-height: 1.45; }
.btb3-note:empty { display: none; }
.btb3-note--ok { color: var(--b3-ok); }
.btb3-note--err { color: var(--b3-err); }
.btb3-fine { font-size: .8rem; color: var(--b3-ink-3); text-align: center; margin: 1rem 0 0; }
.btb3-error { color: var(--b3-err); font-size: .85rem; margin-top: .4rem; line-height: 1.4; }
.btb3-error--box { background: var(--b3-err-bg); border: 1px solid #FECACA; border-radius: 10px; padding: .75rem 1rem; margin: 1rem 0 0; }

/* ── Segmented controls (locations band, billing cycle) ───────── */
/* Fieldsets default to min-width: min-content and would widen the page. */
fieldset.btb3-locq, fieldset.btb3-box { min-width: 0; }
.btb3-locq { border: 0; margin: 0 0 1.25rem; }
.btb3-seg {
	display: grid; gap: 4px; padding: 4px; border-radius: 12px; background: var(--b3-bg-alt); border: 1px solid var(--b3-line);
}
.btb3-seg--3 { grid-template-columns: repeat(3, 1fr); }
.btb3-seg--cycle { grid-template-columns: repeat(2, 1fr); max-width: 360px; margin: 0 auto; border-radius: 999px; }
.btb3-seg-opt { position: relative; display: block; cursor: pointer; }
.btb3-seg-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.btb3-seg-opt span {
	display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .4rem .6rem;
	border-radius: 9px; font-weight: 600; font-size: .92rem; color: var(--b3-ink-3); text-align: center;
	transition: background .15s, color .15s, box-shadow .15s;
}
.btb3-seg--cycle .btb3-seg-opt span { border-radius: 999px; }
.btb3-seg-opt input:checked + span { background: var(--b3-ink); color: var(--b3-on-dark); box-shadow: 0 2px 6px rgba(0,0,0,.14); }
.btb3-seg-opt input:focus-visible + span { box-shadow: var(--b3-focus); }
.btb3-seg-save {
	font-style: normal; font-family: var(--b3-mono); font-size: .62rem; letter-spacing: .06em; text-transform: uppercase;
	background: var(--b3-yellow); color: var(--b3-ink); padding: .18rem .45rem; border-radius: 999px; white-space: nowrap;
}
.btb3-cycle { margin: 0 0 1.25rem; }

.btb3-locq-count { margin-top: .9rem; padding: 14px 16px; background: var(--b3-surface); border: 1px solid var(--b3-line); border-radius: 12px; }
.btb3-stepper-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.btb3-locq-sales .btb3-note:first-child { margin: 0 0 1rem; }
.btb3-locq-sales { margin-top: .9rem; padding: 16px; background: var(--b3-surface); border: 1px solid var(--b3-line); border-radius: 12px; }
.btb3-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Stepper (locations, hardware qty): 44px targets. */
.btb3-stepper { display: inline-flex; align-items: center; border: 1px solid var(--b3-line-2); border-radius: 12px; background: var(--b3-surface); overflow: hidden; }
.btb3-stepper-btn { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.25rem; font-weight: 600; cursor: pointer; }
.btb3-stepper-btn:hover { background: var(--b3-bg-alt); }
.btb3-stepper-btn:disabled { color: var(--b3-ink-4); cursor: not-allowed; background: transparent; }
.btb3-stepper input {
	width: 48px; height: 44px; border: 0; border-left: 1px solid var(--b3-line); border-right: 1px solid var(--b3-line);
	text-align: center; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; -moz-appearance: textfield; background: transparent;
}
.btb3-stepper input:focus, .btb3-stepper input:focus-visible { outline: none; border-radius: 0; box-shadow: inset 0 0 0 2px var(--b3-ink); }
.btb3-stepper input::-webkit-outer-spin-button, .btb3-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ── Auto-Pro line (2-10 locations) ───────────────────────────── */
.btb3-autopro {
	display: flex; align-items: center; gap: .55rem; margin: 0 0 1rem; padding: .7rem .9rem; border-radius: 10px;
	background: var(--b3-yellow-bg); border: 1px solid var(--b3-yellow-dk); font-size: .9rem; font-weight: 600;
}
.btb3-autopro svg { flex-shrink: 0; width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--b3-ink); color: var(--b3-yellow); }

/* ── Plan cards ───────────────────────────────────────────────── */
.btb3-cards { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: .5rem; }
@media (min-width: 720px) { .btb3-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding-top: 12px; } }

.btb3-card {
	position: relative; display: flex; flex-direction: column; cursor: pointer;
	padding: 20px 18px 18px; border-radius: 18px; background: var(--b3-surface);
	border: 2px solid var(--b3-line); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.btb3-card:hover { border-color: var(--b3-line-2); }
.btb3-card-radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.btb3-card--dark { background: var(--b3-ink); color: var(--b3-on-dark); border-color: var(--b3-ink); }
.btb3-card--dark:hover { border-color: #3a3a3a; }

/* Selected: a 2px ink ring + yellow outline glow on light cards, a yellow
   ring on the dark card, and the "Selected" pill. Unselected cards (the
   dark one included) carry NO ring and NO shadow: "Most Popular" is a badge,
   never a selection cue. */
.btb3-card:has(.btb3-card-radio:checked), .btb3-card.is-selected {
	border-color: var(--b3-ink); box-shadow: 0 0 0 4px rgba(255,216,0,.55), 0 14px 32px rgba(10,10,10,.10);
}
.btb3-card--dark:has(.btb3-card-radio:checked), .btb3-card--dark.is-selected {
	border-color: var(--b3-yellow); box-shadow: 0 0 0 4px rgba(255,216,0,.35), 0 18px 40px rgba(10,10,10,.22);
}
.btb3-card:has(.btb3-card-radio:focus-visible) { box-shadow: var(--b3-focus); }

.btb3-card-badge {
	position: absolute; top: -12px; left: 18px;
	font-family: var(--b3-mono); font-size: .62rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
	padding: .3rem .7rem; border-radius: 6px; background: var(--b3-bg); color: var(--b3-ink); border: 1px solid var(--b3-ink);
	white-space: nowrap;
}
.btb3-card-selected {
	display: none; align-items: center; gap: .3rem; margin-left: auto; flex-shrink: 0;
	padding: .28rem .6rem .28rem .45rem; border-radius: 999px; font-size: .76rem; font-weight: 700; line-height: 1.2;
	background: var(--b3-ink); color: var(--b3-yellow);
}
.btb3-card--dark .btb3-card-selected { background: var(--b3-yellow); color: var(--b3-ink); }
.btb3-card:has(.btb3-card-radio:checked) .btb3-card-selected, .btb3-card.is-selected .btb3-card-selected { display: inline-flex; }

.btb3-card-head { display: flex; align-items: center; gap: .5rem; min-height: 28px; }
.btb3-card-dot {
	width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--b3-line-2); flex-shrink: 0; position: relative;
	transition: border-color .15s;
}
.btb3-card--dark .btb3-card-dot { border-color: rgba(245,244,238,.45); }
.btb3-card:has(.btb3-card-radio:checked) .btb3-card-dot { border-color: var(--b3-ink); }
.btb3-card:has(.btb3-card-radio:checked) .btb3-card-dot::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--b3-ink); }
.btb3-card--dark:has(.btb3-card-radio:checked) .btb3-card-dot { border-color: var(--b3-yellow); }
.btb3-card--dark:has(.btb3-card-radio:checked) .btb3-card-dot::after { background: var(--b3-yellow); }
.btb3-card-name { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; min-width: 0; overflow-wrap: anywhere; }
.btb3-card-tag { font-size: .88rem; color: var(--b3-ink-3); margin-top: .25rem; }
.btb3-card--dark .btb3-card-tag { color: var(--b3-on-dark-2); }

.btb3-card-price { display: flex; align-items: baseline; gap: .25rem; margin-top: .85rem; }
.btb3-card-amt { font-size: 1.85rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.btb3-card-per { font-size: .9rem; font-weight: 600; color: var(--b3-ink-3); }
.btb3-card--dark .btb3-card-per { color: var(--b3-on-dark-2); }
.btb3-card-sub { font-size: .8rem; color: var(--b3-ink-3); margin-top: .3rem; min-height: 1.2em; }
.btb3-card--dark .btb3-card-sub { color: var(--b3-on-dark-2); }
.btb3-card-off { display: none; font-size: .8rem; font-weight: 600; margin-top: .5rem; }

.btb3-card-feats { list-style: none; display: grid; gap: .45rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--b3-line); font-size: .86rem; color: var(--b3-ink-2); }
.btb3-card--dark .btb3-card-feats { border-top-color: rgba(245,244,238,.16); color: var(--b3-on-dark); }
.btb3-card-feats li { display: flex; gap: .5rem; align-items: flex-start; }
.btb3-card-feats li::before {
	content: ''; flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: var(--b3-yellow-bg)
	url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230A0A0A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
.btb3-card--dark .btb3-card-feats li::before { background-color: var(--b3-yellow); }

/* Mobile cards: compact; features collapse to the selected card only. */
@media (max-width: 719px) {
	.btb3-card { padding: 16px 16px 14px; }
	.btb3-card-price { margin-top: .6rem; }
	.btb3-card-amt { font-size: 1.6rem; }
	.btb3-card-feats { display: none; }
	.btb3-card:has(.btb3-card-radio:checked) .btb3-card-feats { display: grid; }
	.btb3-card-badge { left: 16px; }
}

/* 2-10 locations: Starter / Growth disabled. */
.btb3-card.is-off { cursor: not-allowed; background: var(--b3-bg-alt); border-color: var(--b3-line); color: var(--b3-ink-3); box-shadow: none; }
.btb3-card.is-off .btb3-card-amt, .btb3-card.is-off .btb3-card-name { color: var(--b3-ink-3); }
.btb3-card.is-off .btb3-card-per, .btb3-card.is-off .btb3-card-sub, .btb3-card.is-off .btb3-card-tag { color: var(--b3-ink-3); }
.btb3-card.is-off .btb3-card-feats { display: none; }
.btb3-card.is-off .btb3-card-off { display: block; color: var(--b3-ink-2); }
.btb3-card.is-off .btb3-card-badge { opacity: .7; }
.btb3-card.is-off .btb3-card-dot { border-color: var(--b3-line-2); }
.btb3-card--dark.is-off .btb3-card-feats li::before { background-color: var(--b3-yellow-bg); }

/* ── Fields ───────────────────────────────────────────────────── */
.btb3-field { margin-bottom: 1.1rem; }
.btb3-field > label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .4rem; }
.btb3-field input[type="text"], .btb3-field input[type="email"], .btb3-field input[type="number"], .btb3-field select {
	width: 100%; min-height: 48px; padding: .7rem .9rem; border: 1px solid var(--b3-line-2); border-radius: 10px;
	background: var(--b3-surface); font-size: 1rem; -webkit-appearance: none; appearance: none;
	transition: border-color .15s, box-shadow .15s;
}
.btb3-field select {
	padding-right: 2.2rem;
	background: var(--b3-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%230A0A0A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") right .7rem center/16px no-repeat;
}
.btb3-field input:focus, .btb3-field select:focus { outline: none; border-color: var(--b3-ink); box-shadow: 0 0 0 3px rgba(255,216,0,.55); }
.btb3-field input[readonly] { background: var(--b3-bg-alt); }
.btb3-input--error { border-color: var(--b3-err) !important; box-shadow: 0 0 0 3px rgba(185,28,28,.12) !important; }
.btb3-input--valid { border-color: var(--b3-ok) !important; }
.btb3-grid-2, .btb3-grid-3 { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) {
	.btb3-grid-2 { grid-template-columns: 1fr 1fr; }
	.btb3-grid-3 { grid-template-columns: 1fr 1.2fr 1fr; }
}
.btb3-box { border: 1px solid var(--b3-line); border-radius: var(--b3-radius); background: var(--b3-surface); padding: 16px 16px 6px; margin: 0 0 1.1rem; }
.btb3-box > legend { padding: 0 .35rem; margin-left: -.35rem; }
.btb3-box .btb3-note { margin: -.4rem 0 .9rem; }

.btb3-slug { display: flex; align-items: stretch; border: 1px solid var(--b3-line-2); border-radius: 10px; background: var(--b3-surface); overflow: hidden; }
.btb3-slug:focus-within { border-color: var(--b3-ink); box-shadow: 0 0 0 3px rgba(255,216,0,.55); }
.btb3-slug-prefix { display: flex; align-items: center; padding: 0 .55rem 0 .8rem; font-family: var(--b3-mono); font-size: .8rem; color: var(--b3-ink-3); background: var(--b3-bg-alt); border-right: 1px solid var(--b3-line); white-space: nowrap; }
.btb3-slug input { flex: 1; min-width: 0; min-height: 48px; border: 0 !important; box-shadow: none !important; padding: 0 .8rem; font-family: var(--b3-mono); font-size: .95rem; background: transparent; }
.btb3-slug input:focus { outline: none; }
.btb3-slug-ok { color: var(--b3-ok); font-weight: 600; }
.btb3-slug-bad { color: var(--b3-err); font-weight: 600; }

.btb3-promo-row { display: flex; gap: 8px; }
.btb3-promo-row input { flex: 1; min-width: 0; text-transform: uppercase; font-family: var(--b3-mono); letter-spacing: .04em; }
.btb3-promo-row .btb3-btn { flex-shrink: 0; min-height: 48px; }
.btb3-chip {
	display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .3rem .25rem .7rem; border-radius: 999px; background: var(--b3-ok-bg);
	color: var(--b3-ok); font-family: var(--b3-mono); font-size: .82rem; font-weight: 600; border: 1px solid #BBF7D0;
}
.btb3-chip button { min-width: 32px; min-height: 32px; border: 0; background: transparent; color: var(--b3-ok); cursor: pointer; font-weight: 700; border-radius: 999px; text-decoration: underline; font-family: var(--b3-sans); font-size: .8rem; padding: 0 .4rem; }

/* ── Hardware ─────────────────────────────────────────────────── */
.btb3-kit {
	display: flex; gap: 12px; align-items: flex-start; margin: 0 0 1.4rem; padding: 14px 16px; border-radius: var(--b3-radius);
	background: var(--b3-ok-bg); border: 1px solid #BBF7D0; color: #14532D; font-size: .92rem;
}
.btb3-kit--nudge { background: var(--b3-yellow-bg); border: 1px dashed var(--b3-yellow-dk); color: var(--b3-ink); }
.btb3-kit-icon { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #166534; color: #fff; }
.btb3-kit--nudge .btb3-kit-icon { background: var(--b3-ink); color: var(--b3-yellow); }
.btb3-kit strong { display: block; font-size: .98rem; }
.btb3-kit small { display: block; margin-top: .15rem; color: inherit; opacity: .9; }
.btb3-hw { list-style: none; display: grid; gap: 10px; margin-bottom: .5rem; }
.btb3-hw-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--b3-line-2); border-radius: 12px; background: var(--b3-surface); transition: border-color .15s, background .15s; }
.btb3-hw-row.has-qty { border-color: var(--b3-ink); background: var(--b3-yellow-bg); }
.btb3-hw-img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex-shrink: 0; border: 1px solid var(--b3-line); background: var(--b3-bg-alt); }
.btb3-hw-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.btb3-hw-label { font-weight: 600; font-size: .95rem; }
.btb3-hw-price { font-size: .84rem; color: var(--b3-ink-3); font-variant-numeric: tabular-nums; }
.btb3-stepper--sm .btb3-stepper-btn { width: 40px; }
.btb3-stepper--sm input { width: 40px; }
@media (max-width: 380px) { .btb3-hw-img { width: 44px; height: 44px; } }

/* ── Buttons ──────────────────────────────────────────────────── */
.btb3-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .75rem 1.35rem;
	border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: 1rem; cursor: pointer; text-decoration: none;
	transition: background .15s, color .15s, transform .15s, box-shadow .15s; white-space: nowrap;
}
.btb3-btn:disabled { opacity: .5; cursor: not-allowed; }
.btb3-btn--primary { background: var(--b3-ink); color: var(--b3-on-dark); }
.btb3-btn--primary:hover:not(:disabled) { background: #1f1f1f; box-shadow: 0 6px 16px rgba(10,10,10,.2); }
.btb3-btn--ghost { background: transparent; color: var(--b3-ink); border-color: var(--b3-line-2); }
.btb3-btn--ghost:hover:not(:disabled) { border-color: var(--b3-ink); background: var(--b3-surface); }
.btb3-btn--wide { width: 100%; }
.btb3-btn--pay { flex: 1; background: var(--b3-yellow); color: var(--b3-ink); border-color: var(--b3-ink); }
.btb3-btn--pay:hover:not(:disabled) { background: var(--b3-yellow-dk); }
.btb3-btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btb3-btn.is-busy::after {
	content: attr(data-busy); position: absolute; inset: 0; display: grid; place-items: center; color: var(--b3-ink); font-weight: 600;
}
.btb3-btn--primary.is-busy::after { color: var(--b3-on-dark); }
.btb3-actions { margin-top: 1.5rem; display: flex; gap: 12px; }
.btb3-actions--split { justify-content: space-between; }
.btb3-actions--split .btb3-btn--primary { flex: 1; max-width: 320px; margin-left: auto; }
.btb3-actions--stack { flex-direction: column; margin-top: .5rem; }
.btb3-next-label { overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 720px) {
	.btb3-step[data-step="plan"] .btb3-actions { justify-content: flex-end; }
	.btb3-step[data-step="plan"] .btb3-btn--wide { width: auto; min-width: 320px; }
}
.btb3-secure { font-size: .78rem; color: var(--b3-ink-3); text-align: center; margin-top: .9rem; font-family: var(--b3-mono); }

/* On a phone the bar carries the Pay button, so the in-page one goes. */
@media (max-width: 1023px) {
	.btb3-pay-actions #btb-submit-btn { display: none; }
	.btb3-pay-actions .btb3-back { flex: 1; max-width: 200px; }
}

/* ── Consent ──────────────────────────────────────────────────── */
.btb3-consent { margin: 1.25rem 0 0; }
.btb3-check { display: flex; align-items: flex-start; gap: .65rem; min-height: 44px; padding: .5rem 0; font-size: .92rem; cursor: pointer; }
.btb3-check input { flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; accent-color: var(--b3-ink); cursor: pointer; }
.btb3-check a { font-weight: 600; }
.btb3-turnstile { margin: 1rem 0 0; min-height: 65px; }

/* ── Order summary (panel, sheet and receipt share this) ──────── */
.btb3-sum { font-size: .9rem; }
.btb3-sum-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-bottom: .75rem; border-bottom: 1px solid var(--b3-line); }
.btb3-sum-plan { font-weight: 700; font-size: 1.02rem; }
.btb3-sum-cycle { font-family: var(--b3-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; padding: .22rem .5rem; border-radius: 6px; background: var(--b3-bg-alt); color: var(--b3-ink-2); white-space: nowrap; }
.btb3-sum-rows { list-style: none; display: grid; gap: .1rem; padding: .5rem 0; border-bottom: 1px solid var(--b3-line); }
.btb3-sum-row { display: flex; justify-content: space-between; gap: 1rem; padding: .38rem 0; align-items: baseline; }
.btb3-sum-row > span:first-child { min-width: 0; }
.btb3-sum-row small { display: block; font-size: .8rem; color: var(--b3-ink-3); line-height: 1.35; margin-top: .1rem; }
.btb3-sum-amt { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; text-align: right; }
.btb3-sum-amt--free { color: var(--b3-ok); font-family: var(--b3-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.btb3-sum-row--discount .btb3-sum-amt { color: var(--b3-ok); }
.btb3-sum-row--muted { color: var(--b3-ink-3); }
.btb3-sum-calc { padding: .5rem 0; display: grid; gap: .1rem; }
.btb3-sum-calc .btb3-sum-row { padding: .3rem 0; }
.btb3-sum-tax .btb3-sum-amt { font-weight: 500; color: var(--b3-ink-2); }
.btb3-sum-tax.is-pending .btb3-sum-amt { color: var(--b3-ink-3); font-weight: 500; font-size: .84rem; white-space: normal; }
.btb3-sum-total {
	display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .85rem 0 .2rem; border-top: 2px solid var(--b3-ink);
}
.btb3-sum-total-label { font-weight: 700; font-size: .95rem; }
.btb3-sum-total-amt { font-size: 1.7rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.05; font-variant-numeric: tabular-nums; text-align: right; }
.btb3-sum-total-amt small { display: block; font-size: .78rem; font-weight: 600; letter-spacing: 0; color: var(--b3-ink-3); margin-top: .15rem; }
.btb3-sum-equiv { font-size: .8rem; color: var(--b3-ink-3); text-align: right; margin-top: .1rem; }
.btb3-sum-renew {
	display: flex; gap: .5rem; align-items: flex-start; margin-top: .9rem; padding: .65rem .75rem; border-radius: 10px; background: var(--b3-bg); font-size: .82rem; color: var(--b3-ink-2);
}
.btb3-sum-renew svg { flex-shrink: 0; margin-top: 2px; }
.btb3-sum-err { margin-top: .6rem; font-size: .8rem; color: var(--b3-ink-3); }
.btb3-sum.is-loading .btb3-sum-total-amt, .btb3-sum.is-loading .btb3-sum-tax .btb3-sum-amt { opacity: .55; }
.btb3-num { display: inline-block; }
.btb3-num.is-tick { animation: b3Tick .26s ease; }
@keyframes b3Tick { 0% { opacity: .25; transform: translateY(4px); } 100% { opacity: 1; transform: none; } }

/* Desktop panel */
.btb3-panel-card { background: var(--b3-surface); border: 1px solid var(--b3-line); border-radius: 18px; padding: 20px; box-shadow: 0 1px 0 rgba(10,10,10,.03), 0 12px 32px rgba(10,10,10,.05); }
.btb3-panel-title { font-family: var(--b3-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--b3-ink-3); font-weight: 600; margin-bottom: .75rem; }

/* Payment-step receipt: inline on phones, the panel is the receipt on desktop. */
.btb3-receipt { border: 1px solid var(--b3-line); border-radius: var(--b3-radius); background: var(--b3-surface); padding: 16px; margin-top: 1.25rem; }
@media (min-width: 1024px) { .btb3-receipt { display: none; } }

/* ── Mobile bar + sheet ───────────────────────────────────────── */
.btb3-bar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
	background: var(--b3-ink); color: var(--b3-on-dark);
	padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
	box-shadow: 0 -8px 24px rgba(10,10,10,.18);
	display: flex; flex-direction: column; gap: 8px;
}
@media (min-width: 1024px) { .btb3-bar, .btb3-sheet, .btb3-scrim { display: none !important; } }
body.is-nobar .btb3-bar { display: none; }
.btb3-bar-toggle {
	display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 4px 4px 4px 6px; border: 0; background: transparent;
	color: inherit; text-align: left; cursor: pointer; border-radius: 10px;
}
.btb3-bar-toggle:focus-visible { box-shadow: 0 0 0 2px var(--b3-yellow); }
.btb3-bar-left { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.btb3-bar-plan { font-weight: 700; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btb3-bar-meta { font-size: .78rem; color: var(--b3-on-dark-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btb3-bar-right { display: flex; flex-direction: column; align-items: flex-end; }
.btb3-bar-cap { font-family: var(--b3-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--b3-on-dark-2); }
.btb3-bar-amt { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--b3-yellow); white-space: nowrap; }
.btb3-bar-chev { flex-shrink: 0; color: var(--b3-on-dark-2); transition: transform .2s; }
.btb3-bar-toggle[aria-expanded="true"] .btb3-bar-chev { transform: rotate(180deg); }
.btb3-bar-pay { width: 100%; min-height: 50px; background: var(--b3-yellow); color: var(--b3-ink); }
.btb3-bar-pay:hover:not(:disabled) { background: var(--b3-yellow-dk); box-shadow: none; }
.btb3-bar-pay.is-busy::after { color: var(--b3-ink); }

.btb3-scrim { position: fixed; inset: 0; z-index: 45; background: rgba(10,10,10,.45); animation: b3Fade .2s ease; }
@keyframes b3Fade { from { opacity: 0; } }
.btb3-sheet {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; max-height: min(86vh, 720px); display: flex; flex-direction: column;
	background: var(--b3-surface); border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px rgba(10,10,10,.25);
	padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px));
	animation: b3Up .24s cubic-bezier(.2,.8,.2,1);
	touch-action: pan-y;
}
@keyframes b3Up { from { transform: translateY(100%); } }
.btb3-sheet-grab { display: flex; justify-content: center; padding: 10px 0 6px; cursor: grab; }
.btb3-sheet-grab span { width: 40px; height: 5px; border-radius: 99px; background: var(--b3-line-2); }
.btb3-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.btb3-sheet-head .btb3-panel-title { margin: 0; }
.btb3-sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: .5rem 0 0; }
.btb3-icon-btn { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 12px; display: grid; place-items: center; cursor: pointer; margin-right: -10px; }
.btb3-icon-btn:hover { background: var(--b3-bg-alt); }
body.is-sheet-open { overflow: hidden; }

/* ── Notices ──────────────────────────────────────────────────── */
.btb3-notice { display: flex; flex-direction: column; gap: .2rem; max-width: 640px; margin: 0 auto 1.25rem; padding: 14px 16px; border-radius: 12px; font-size: .92rem; }
.btb3-notice--warn { background: #FEF3C7; border: 1px solid #F59E0B; color: #78350F; }

/* ── Reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
