/* =====================================================================================================================
   Displai purchase-flow prototype (/buy-demo). Visual system: Version B (white, Displai navy and Blue 03, Gellix).
   The configurator sits beside a sticky order summary on desktop (900px and wider). On phones the summary follows
   the account section, with collapsible price details and a small bottom bar for the key figures.
   ===================================================================================================================== */
@font-face { font-family: "Gellix"; font-weight: 400; font-style: normal; font-display: swap; src: url("../assets/fonts/Gellix-Regular.woff2") format("woff2"); }
@font-face { font-family: "Gellix"; font-weight: 500; font-style: normal; font-display: swap; src: url("../assets/fonts/Gellix-Medium.woff2") format("woff2"); }
@font-face { font-family: "Gellix"; font-weight: 600; font-style: normal; font-display: swap; src: url("../assets/fonts/Gellix-SemiBold.woff2") format("woff2"); }

:root {
  --font: "Gellix", Arial, sans-serif;
  --navy: #08177A;        /* Blue 05 */
  --blue: #0047D4;        /* Blue 03 */
  --blue-hi: #2A63FF;
  --blue-01: #879CFF;
  --pale: #F5F7FF;
  --bg: #F5F6FA;
  --card: #FFFFFF;
  --ink: #171717;
  --muted: #4F5568;
  --line: #DCDFE8;
  --line-strong: #BEC3D1;
  --ok: #0E7A35; --ok-bg: #EAF8EF; --ok-line: #17B04D;
  --err: #B42318; --err-bg: #FDECEA;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --focus: 0 0 0 2px #fff, 0 0 0 4px var(--blue);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.5 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, dl, dd, fieldset { margin: 0; }
button, input { font: inherit; color: inherit; }
a { color: var(--blue); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.bd-wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: 12px; top: 12px; z-index: 50; padding: 10px 14px; border-radius: 8px; background: var(--navy); color: #fff; font-weight: 500; text-decoration: none; }
.skip:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- header: logo and the one way out */
.bd-header { background: #fff; border-bottom: 1px solid var(--line); }
.bd-header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.bd-brand { display: inline-flex; align-items: center; min-height: 44px; }
.bd-brand img { height: 28px; width: auto; }
.bd-help { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9375rem; }
.bd-help a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-weight: 500; text-decoration: none; border-radius: 6px; }
.bd-help a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- introduction, with the sandbox notice beside it */
.bd-intro { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin: 28px 0 24px; }
.bd-intro-text { flex: 1 1 480px; min-width: 0; }
.bd-intro h1 { color: var(--navy); font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.625rem); font-weight: 500; line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.bd-intro-text p { max-width: 60ch; margin-top: 10px; color: var(--muted); font-size: clamp(.9375rem, .9rem + .3vw, 1.125rem); }
.bd-notice { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid #C9D3FF; border-radius: 999px; background: var(--pale); color: var(--navy); font-size: .875rem; font-weight: 500; }
.bd-notice svg { flex: none; width: 16px; height: 16px; fill: var(--blue); }
.bd-included-toggle { display: none; align-items: center; gap: 6px; min-height: 44px; margin-top: 2px; padding: 0; border: 0; background: none; color: var(--blue); font-weight: 500; cursor: pointer; }
.bd-included-toggle svg { width: 16px; height: 16px; fill: currentColor; transition: transform .2s var(--ease); }
.bd-included-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ---- layout */
.bd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); gap: 28px; align-items: start; padding-bottom: 64px; }
.bd-config { display: grid; gap: 16px; min-width: 0; }

/* ---- the product */
.bd-product { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.bd-board { margin: 0; }
.bd-bezel { padding: 1.6%; border-radius: 10px; background: #171717; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 22px 40px -26px rgba(8, 23, 122, .55); }
.bd-bezel .scr { border-radius: 4px; }
.bd-board figcaption { margin-top: 8px; color: var(--muted); font-size: .8125rem; }
.bd-product-k { color: var(--muted); font-size: .8125rem; font-weight: 500; letter-spacing: .02em; }
.bd-product h2 { margin-top: 2px; color: var(--navy); font-size: 1.5rem; font-weight: 500; letter-spacing: -.01em; }
.bd-product-d { margin-top: 6px; color: var(--muted); font-size: .9375rem; line-height: 1.45; }
.bd-benefits { display: grid; gap: 6px; margin-top: 10px; padding: 0; list-style: none; }
.bd-benefits li { display: flex; gap: 10px; align-items: flex-start; font-size: .9375rem; line-height: 1.4; }
.bd-benefits svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: var(--blue); }

/* ---- steps */
.bd-step { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); scroll-margin-top: 16px; }
.bd-step-h { display: flex; align-items: center; gap: 12px; color: var(--navy); font-size: 1.1875rem; font-weight: 500; letter-spacing: -.005em; }
.bd-step-n { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .875rem; font-weight: 600; }
.bd-step-d { margin: 6px 0 0 40px; color: var(--muted); font-size: .9375rem; }
.bd-field { min-width: 0; margin-top: 18px; padding: 0; border: 0; }
.bd-field legend { padding: 0; margin-bottom: 10px; color: var(--ink); font-size: 1rem; font-weight: 500; }

/* quantity stepper */
.bd-qty { margin-top: 18px; }
.bd-qty-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.bd-label { font-weight: 500; }
.bd-stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; overflow: hidden; }
.bd-stepper button { display: grid; place-items: center; width: 48px; min-height: 48px; padding: 0; border: 0; background: #fff; color: var(--navy); cursor: pointer; transition: background-color .15s ease; }
.bd-stepper button svg { width: 18px; height: 18px; fill: currentColor; }
.bd-stepper button:hover:not(:disabled) { background: var(--pale); }
.bd-stepper button:disabled { color: #A3A8B6; background: #F4F5F8; cursor: not-allowed; }
.bd-stepper button:focus-visible { box-shadow: inset 0 0 0 2px var(--blue); border-radius: 0; }
.bd-stepper input { width: 84px; min-height: 48px; padding: 0 8px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: #fff; text-align: center; font-size: 1.125rem; font-weight: 500; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.bd-stepper input::-webkit-outer-spin-button, .bd-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bd-stepper input:focus-visible { box-shadow: inset 0 0 0 2px var(--blue); border-radius: 0; }
.bd-stepper.is-error { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
.bd-stepper.is-error input { color: var(--err); }
.bd-qty-help { margin-top: 10px; color: var(--muted); font-size: .9375rem; }
.bd-error { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--err-bg); color: var(--err); font-size: .9375rem; font-weight: 500; }
.bd-error svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: currentColor; }
.bd-error[hidden] { display: none; }

/* selectable cards (radios) */
.bd-opts { display: grid; gap: 12px; }
.bd-opts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bd-opts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bd-opt { position: relative; display: flex; gap: 12px; min-height: 64px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease; }
.bd-opt:hover { border-color: #8EA2F5; }
.bd-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.bd-opt { padding-right: 48px; }
.bd-radio { position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 22px; height: 22px; border: 2px solid #9AA0B1; border-radius: 50%;
  background: #fff; transition: background-color .15s ease, border-color .15s ease; }
.bd-radio::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg) scale(0); transition: transform .15s var(--ease); }
.bd-opt:has(input:checked) { border-color: var(--blue); background: var(--pale); box-shadow: inset 0 0 0 1px var(--blue); }
.bd-opt:has(input:checked) .bd-radio { border-color: var(--blue); background: var(--blue); }
.bd-opt:has(input:checked) .bd-radio::after { transform: translateY(-1px) rotate(45deg) scale(1); }
.bd-opt:has(input:focus-visible) { box-shadow: inset 0 0 0 1px var(--blue), 0 0 0 2px #fff, 0 0 0 4px var(--blue); }
.bd-opt-body { flex: 1 1 0; display: grid; gap: 3px; align-content: start; min-width: 0; }

.bd-opt-title { font-weight: 500; font-size: 1.0625rem; line-height: 1.3; }
.bd-opt-price { color: var(--ink); line-height: 1.35; }
.bd-opt-price b { font-weight: 600; font-variant-numeric: tabular-nums; }
.bd-opt-meta { color: var(--muted); font-size: .875rem; line-height: 1.35; }
.bd-tag { justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 500; line-height: 1.35; }
.bd-tag--save { background: #EEF1FF; color: var(--navy); }
.bd-tag--promo { background: var(--ok-bg); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(23, 176, 77, .45); }
.bd-pos-note { margin-top: 10px; color: var(--muted); font-size: .875rem; }

/* ---- order summary */
.bd-summary { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: 0 24px 48px -36px rgba(8, 23, 122, .45); }
.bd-sum-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bd-summary h2 { color: var(--navy); font-size: 1.25rem; font-weight: 500; }
.bd-summary h2:focus { outline: none; }
.bd-sum-close { display: none; }
.bd-sheet-backdrop { display: none; }
.bd-sum-config { margin-top: 4px; color: var(--muted); font-size: .9375rem; }
/* The line-by-line prices open on request, so the button to continue stays in view. */
.bd-sum-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; margin-top: 14px; padding: 0 14px; border: 1px solid var(--line-strong);
  border-radius: 10px; background: #fff; color: var(--navy); font-weight: 500; cursor: pointer; }
.bd-sum-toggle svg { width: 16px; height: 16px; fill: currentColor; transition: transform .2s var(--ease); }
.bd-sum-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.bd-lines.is-collapsed { display: none; }
/* the one headline figure, then when each charge falls */
.bd-due { margin-top: 16px; padding: 14px 16px; border: 1px solid #C9D3FF; border-radius: 12px; background: var(--pale); }
.bd-due-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--navy); font-size: 1.0625rem; font-weight: 500; }
.bd-due-row strong { font-size: 2rem; font-weight: 600; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-due-sub { margin-top: 6px; color: var(--muted); font-size: .875rem; }
.bd-sched-h { margin: 18px 0 8px; color: var(--muted); font-size: .8125rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.bd-sched { display: grid; padding: 0; list-style: none; }
.bd-sched-item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 0 12px; padding: 0 0 14px 26px; }
.bd-sched-item:last-child { padding-bottom: 0; }
.bd-sched-dot { position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border: 2px solid var(--blue); border-radius: 50%; background: #fff; }
.bd-sched-item::before { content: ""; position: absolute; left: 5px; top: 22px; bottom: -2px; width: 2px; background: #C9D3FF; }
.bd-sched-item:last-child::before { content: none; }
.bd-sched-item--now .bd-sched-dot { background: var(--blue); }
.bd-sched-item--free .bd-sched-dot { border-color: var(--ok-line); background: var(--ok-line); }
.bd-sched-item--end .bd-sched-dot { border-color: var(--line-strong); }
.bd-sched-label { font-weight: 500; }
.bd-sched-value { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-sched-sub { grid-column: 1 / -1; color: var(--muted); font-size: .875rem; line-height: 1.35; }
.bd-sched-item--free .bd-sched-value, .bd-sched-item--free .bd-sched-sub { color: var(--ok); }
.bd-sched-item--free .bd-sched-sub { font-weight: 500; }
.bd-lines { margin-top: 12px; padding-top: 4px; }
.bd-group + .bd-group { margin-top: 14px; }
.bd-group h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--muted); font-size: .8125rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.bd-group h3 span { padding: 1px 8px; border-radius: 999px; background: #F1F2F5; color: var(--muted); font-size: .6875rem; letter-spacing: .05em; }
.bd-row { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid #EEF0F4; }
.bd-row dt { font-weight: 500; }
.bd-row dd { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-row .bd-sub { display: block; margin-top: 2px; color: var(--muted); font-size: .8125rem; font-weight: 400; line-height: 1.35; }
.bd-row--credit dd { color: var(--ok); }
.bd-row[hidden] { display: none; }
.bd-fine { margin-top: 12px; color: var(--muted); font-size: .8125rem; }
.bd-actions { display: grid; gap: 10px; margin-top: 16px; }
.bd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 20px; border: 1px solid var(--blue); border-radius: 10px;
  background: linear-gradient(180deg, var(--blue-hi) 0%, var(--blue) 100%); color: #fff; font-weight: 500; font-size: 1rem; text-decoration: none; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 22px -12px rgba(0, 71, 212, .7); transition: transform .15s var(--ease), box-shadow .15s ease; }
.bd-btn svg { width: 18px; height: 18px; fill: currentColor; }
.bd-btn:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 14px 26px -12px rgba(0, 71, 212, .8); }
.bd-btn:disabled { border-color: #A9B4D6; background: #A9B4D6; box-shadow: none; transform: none; cursor: not-allowed; }
.bd-btn:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--navy); }
.bd-btn2 { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff;
  color: var(--navy); font-weight: 500; text-decoration: none; transition: border-color .15s ease, background-color .15s ease; }
.bd-btn2:hover { border-color: var(--navy); background: var(--pale); }
.bd-hold { margin-top: 8px; color: var(--err); font-size: .875rem; font-weight: 500; }
.bd-hold[hidden] { display: none; }

/* ---- phone bar */
.bd-bar { display: none; }

/* ---- checkout preview modal */
.bd-modal { width: min(460px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 30px 80px -20px rgba(8, 23, 122, .55); }
.bd-modal::backdrop { background: rgba(5, 8, 26, .55); }
.bd-modal-in { display: grid; gap: 14px; padding: 24px; }
.bd-modal-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); }
.bd-modal-icon svg { width: 24px; height: 24px; fill: currentColor; }
.bd-modal h2 { color: var(--navy); font-size: 1.25rem; font-weight: 500; }
.bd-modal p { color: var(--ink); line-height: 1.5; }
.bd-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.bd-modal-actions > * { flex: 1 1 160px; }
.bd-modal[open] { animation: bd-pop .2s var(--ease); }

/* ---- the wait between Continue and Stripe: the account is being set up */
.bd-setup .bd-modal-in { justify-items: center; padding: 32px 28px; text-align: center; }
.bd-setup h2 { font-size: 1.5rem; font-weight: 600; }
.bd-setup-wait { display: grid; justify-items: center; gap: 12px; margin-top: 6px; }
.bd-spinner { width: 44px; height: 44px; border: 4px solid var(--pale); border-top-color: var(--blue); border-radius: 50%; animation: bd-spin .8s linear infinite; }
.bd-setup-word { min-height: 1.5em; color: var(--blue) !important; font-weight: 500; }
.bd-setup-slow { color: var(--muted) !important; font-size: .875rem; }
@keyframes bd-spin { to { transform: rotate(360deg); } }
@keyframes bd-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ---- tablets and phones */
@media (max-width: 1023px) {
  .bd-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, 340px); gap: 20px; }
  .bd-opts--3 { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .bd-grid { grid-template-columns: 1fr; padding-bottom: 132px; }
  /* phones and small tablets: the summary is a bottom sheet opened from the bar */
  .bd-summary { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 40; max-height: min(88vh, 720px); overflow-y: auto; padding: 14px max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    border: 0; border-radius: 20px 20px 0 0; box-shadow: 0 -24px 60px -24px rgba(8, 23, 122, .6); visibility: hidden; transform: translateY(104%); transition: transform .28s var(--ease), visibility 0s linear .28s; }
  .bd-summary.is-open { visibility: visible; transform: none; transition: transform .28s var(--ease); }
  .bd-sheet-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(5, 8, 26, .55); }
  .has-sheet, .has-sheet body { overflow: hidden; }
  .bd-sum-close { display: grid; place-items: center; flex: none; width: 44px; height: 44px; margin: -6px -10px -6px 0; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
  .bd-sum-close svg { width: 22px; height: 22px; fill: currentColor; }
  /* the bar: progress, the amount due (opens the sheet) and the next step */
  .bd-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: block; border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -12px 28px -20px rgba(8, 23, 122, .5); }
  .bd-bar-progress { height: 3px; background: var(--line); }
  .bd-bar-progress span { display: block; width: 20%; height: 3px; background: var(--blue); transition: width .2s var(--ease); }
  .bd-bar-in { display: flex; align-items: center; gap: 12px; padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .bd-bar-total { flex: 1 1 0; min-width: 0; min-height: 56px; display: grid; align-content: center; gap: 0; padding: 0; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; }
  .bd-bar-k { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: .8125rem; line-height: 1.3; }
  .bd-bar-k svg { width: 14px; height: 14px; fill: currentColor; transform: rotate(180deg); }
  .bd-bar-total b { color: var(--navy); font-size: 1.375rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
  .bd-bar-then { overflow: hidden; color: var(--muted); font-size: .8125rem; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
  .bd-bar .bd-btn { flex: none; min-height: 50px; padding: 0 16px; }
}
@media (max-width: 639px) {
  .bd-header-in { min-height: 56px; }
  .bd-brand img { height: 24px; }
  .bd-intro { margin: 18px 0 14px; }
  .bd-notice { order: -1; }
  .bd-included-toggle { display: inline-flex; }
  .bd-product { display: none; grid-template-columns: 1fr; }
  .bd-product.is-open { display: grid; }
  .bd-opts--2 { grid-template-columns: 1fr; }
  .bd-step { padding: 16px; }
  .bd-step-d { margin-left: 0; }
  .bd-help-q { display: none; }
  .bd-qty-row .bd-stepper { display: flex; flex: 1 1 100%; }
  .bd-qty-row .bd-stepper button { width: 64px; }
  .bd-qty-row .bd-stepper input { flex: 1 1 0; min-width: 0; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---- plans: compact, equal height, the whole card is the control */
.bd-plans { align-items: stretch; }
.bd-plan { min-height: 0; padding-top: 14px; padding-bottom: 14px; }
.bd-plan .bd-opt-title { display: flex; align-items: center; gap: 8px; }
.bd-badge { padding: 2px 8px; border-radius: 999px; background: var(--navy); color: #fff; font-size: .75rem; font-weight: 600; letter-spacing: .02em; line-height: 1.4; }
.bd-plan-price { color: var(--ink); }
.bd-plan-price b { color: var(--navy); font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.bd-plan .bd-tag { margin-top: 4px; }
.bd-plan-total { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--navy); font-size: .9375rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.bd-plan:has(input:checked) .bd-plan-total { border-top-color: #C9D3FF; }

/* ---- players: one compact row each; the selected row carries the count, which follows the screens */
.bd-players { display: grid; gap: 12px; }
.bd-player { display: grid; grid-template-columns: 96px minmax(0, 1fr) max-content; align-items: center; column-gap: 14px; min-height: 0; }
.bd-player[data-model="amazon"] { order: 1; }
.bd-player[data-model="displai"] { order: 3; }
.bd-player-media { display: grid; place-items: center; width: 96px; height: 68px; border-radius: 8px; background: #F7F6F3; }
.bd-player-media img { width: auto; max-width: 84px; max-height: 56px; object-fit: contain; }
.bd-player-media svg { width: 52px; fill: none; stroke: var(--navy); stroke-width: 4; stroke-linecap: round; }
.bd-player-body { display: grid; gap: 2px; min-width: 0; }
.bd-hw-name { color: var(--ink); font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.bd-hw-desc { color: var(--muted); font-size: .9375rem; line-height: 1.35; }
.bd-player-offer { justify-self: start; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-size: .875rem; font-weight: 600; line-height: 1.4; }
.bd-player-price { color: var(--muted); font-size: .9375rem; text-align: right; white-space: nowrap; }
.bd-player-price b { color: var(--navy); font-size: 1.375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
/* A free player shows "Free" as its price, with the regular price under it at one size so the strike is one even line. */
.bd-price-free { display: none; color: var(--ok); font-size: 1.375rem; font-weight: 600; line-height: 1.2; }
.bd-players[data-free="amazon"] .bd-player[data-model="amazon"] .bd-price-free { display: block; }
.bd-players[data-free="amazon"] .bd-player[data-model="amazon"] .bd-price-list { text-decoration: line-through; text-decoration-thickness: 1px; }
.bd-players[data-free="amazon"] .bd-player[data-model="amazon"] .bd-price-list b { color: inherit; font-size: inherit; font-weight: 500; }
.bd-stick-quantity { order: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: -12px; padding: 12px 16px; border: 2px solid var(--blue); border-top: 0; border-radius: 0 0 12px 12px; background: #fff; }
.bd-players[data-player="displai"] .bd-stick-quantity { order: 4; }
.bd-players[data-player="amazon"] .bd-player[data-model="amazon"],
.bd-players[data-player="displai"] .bd-player[data-model="displai"] { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.bd-stick-total { margin-left: auto; color: var(--navy); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- your account: full-height fields with their message underneath */
.bd-customer-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bd-customer-fields label { display: grid; gap: 6px; align-content: start; font-size: .9375rem; font-weight: 500; }
.bd-customer-wide { grid-column: 1 / -1; }
.bd-customer-fields input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; font-size: 1rem; font-weight: 400; }
.bd-customer-fields input[readonly] { color: var(--muted); background: var(--bg); }
.bd-customer-fields input.is-invalid { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
.bd-field-error { color: var(--err); font-size: .875rem; font-weight: 500; }
.bd-customer p, .bd-customer-sample { margin-top: 10px; font-size: .875rem; }
.bd-customer p { color: var(--muted); }
.bd-customer-sample { display: inline-flex; align-items: center; min-height: 44px; margin-top: 0; padding: 0; border: 0; color: var(--blue); background: none; font-weight: 500; text-decoration: underline; cursor: pointer; }
.bd-buyer { margin-top: 18px; }

/* ---- test-mode controls, kept apart from the buying path */
.bd-test { min-width: 0; margin: 0; padding: 10px 14px 12px; border: 1px dashed var(--line-strong); border-radius: 10px; background: #FAFBFD; }
.bd-test legend { padding: 0 6px; color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.bd-synthetic { display: flex; gap: 8px; align-items: flex-start; min-height: 32px; padding: 6px 0; color: var(--ink); line-height: 1.35; }
.bd-synthetic input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--blue); }
.bd-synthetic { font-size: .8125rem; }
.bd-ready { color: var(--muted); font-size: .875rem; line-height: 1.4; }
.bd-next-note { color: var(--muted); font-size: .8125rem; text-align: center; }
.bd-checkout-status { color: var(--navy); font-size: .875rem; }
.bd-checkout-status:empty { display: none; }

/* ---- confirmation: a page of its own, not a dialog over the storefront */
.bd-confirm { padding-top: clamp(24px, 5vh, 48px); padding-bottom: 48px; }
.bd-confirm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.bd-confirm-icon { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); }
.bd-confirm-icon svg { width: 30px; height: 30px; fill: currentColor; }
.bd-confirm-head > div { flex: 1 1 320px; min-width: 0; }
.bd-confirm h1 { color: var(--navy); font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.5rem); font-weight: 500; line-height: 1.1; letter-spacing: -.02em; }
.bd-confirm h1:focus { outline: none; }
.bd-confirm-head p { margin-top: 8px; color: var(--muted); font-size: 1.0625rem; }
.bd-confirm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 28px; align-items: start; margin-top: 28px; }
.bd-confirm-next, .bd-confirm-receipt { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.bd-confirm-next[hidden] + .bd-confirm-receipt { grid-column: 1 / -1; max-width: 480px; }
.bd-confirm h2 { color: var(--navy); font-size: 1.25rem; font-weight: 500; }
.bd-confirm-next ol { display: grid; gap: 14px; margin-top: 14px; padding: 0; list-style: none; counter-reset: next; }
.bd-confirm-next li { position: relative; min-height: 28px; padding-left: 42px; counter-increment: next; line-height: 1.45; }
.bd-confirm-next li::before { content: counter(next); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .875rem; font-weight: 600; }
.bd-confirm-ref { margin-top: 4px; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.bd-confirm-receipt ul { margin: 12px 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.bd-confirm-receipt li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #EEF0F4; font-weight: 500; }
.bd-confirm-receipt li strong { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-confirm-receipt .bd-due-row strong { font-size: 1.75rem; }
.bd-confirm-tax { margin: 6px 0 0; text-align: right; color: var(--muted); font-size: .875rem; }
.bd-confirm-actions { margin-top: 24px; }

@media (max-width: 899px) {
  .bd-confirm-grid { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 639px) {
  .bd-player { grid-template-columns: 56px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; padding-top: 12px; padding-bottom: 12px; }
  .bd-player-media { grid-row: 1 / span 2; width: 56px; height: 52px; }
  .bd-player-media img { max-width: 48px; max-height: 42px; }
  .bd-player-media svg { width: 40px; }
  .bd-player-price { grid-column: 2; text-align: left; }
  .bd-player-price b, .bd-price-free { font-size: 1.0625rem; }
  .bd-hw-name { font-size: 1rem; }
  .bd-hw-desc { font-size: .875rem; }
  .bd-stick-quantity { padding: 12px; }
  .bd-customer-fields { grid-template-columns: 1fr; }
}

