/* ───────────────────────────────────────────────────────────────
   Xovah — package builder

   Mobile-first. The summary is a bottom bar on phones and a sticky rail
   from 1024px up, because on a phone the total has to follow you and on
   a desktop it should sit beside the choices without covering them.

   Restraint is the whole visual strategy: one accent, used only to show
   what is selected. Everything else is ink, line and space. Colour used
   for decoration is what makes a page look cheap.
   ─────────────────────────────────────────────────────────────── */

/* ── Shell ─────────────────────────────────────────────────────── */
.bd-wrap {
  max-width: 78rem;
  margin: 0 auto;
  padding: 0 clamp(1.15rem, 5vw, 2.5rem);
}

.bd-head { padding: clamp(3rem, 9vw, 6rem) 0 clamp(1.5rem, 4vw, 2.5rem); }
.bd-head h1 {
  font-size: clamp(2.1rem, 7.2vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: rgb(var(--c-ink));
  max-width: 16ch;
}
.bd-head p {
  margin-top: 1.1rem;
  max-width: 46ch;
  font-size: clamp(1rem, 2.6vw, 1.15rem);
  line-height: 1.65;
  color: rgb(var(--c-ink-mid));
}

/* The reassurance line. Deposit-first framing is the single biggest
   lever on this page: "€50 today" converts where "€200" does not. */
.bd-assure {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 0.6rem 1rem 0.6rem 0.75rem;
  border: 1px solid rgb(var(--c-line-firm));
  border-radius: 999px;
  background: rgb(var(--c-paper));
  font-size: 0.875rem;
  color: rgb(var(--c-ink-mid));
}
.bd-assure svg { width: 17px; height: 17px; flex: none; color: rgb(var(--c-accent-text)); }

/* ── Layout: single column, then rail ──────────────────────────── */
.bd-grid { display: grid; gap: clamp(2rem, 5vw, 3rem); align-items: start; }
@media (min-width: 1024px) {
  .bd-grid { grid-template-columns: minmax(0, 1fr) 22.5rem; gap: 3.5rem; }
}

/* ── Steps ─────────────────────────────────────────────────────── */
.bd-step { padding-bottom: clamp(2.25rem, 6vw, 3.5rem); }
.bd-step-head {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgb(var(--c-line));
}
.bd-step-n {
  flex: none;
  width: 1.75rem; height: 1.75rem;
  display: grid; place-items: center;
  border-radius: 999px;
  background: rgb(var(--c-ink));
  color: rgb(var(--c-paper));
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  align-self: center;
}
.bd-step-head h2 {
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  letter-spacing: -0.025em;
  color: rgb(var(--c-ink));
}
.bd-step-head span {
  margin-left: auto;
  font-size: 0.8125rem;
  color: rgb(var(--c-ink-soft));
  white-space: nowrap;
}

/* ── Tier cards ────────────────────────────────────────────────── */
.bd-tiers { display: grid; gap: 0.85rem; }
@media (min-width: 700px) { .bd-tiers { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }

.bd-tier { position: relative; display: block; cursor: pointer; }
.bd-tier input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  pointer-events: none;
}

.bd-tier-box {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.35rem 1.25rem;
  border: 1.5px solid rgb(var(--c-line));
  border-radius: 1.15rem;
  background: rgb(var(--c-surface));
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms cubic-bezier(.22,1,.36,1);
}
.bd-tier:hover .bd-tier-box { border-color: rgb(var(--c-line-firm)); }
.bd-tier:active .bd-tier-box { transform: translateY(1px); }

/* Selection is the ONLY thing the accent is used for on this page. */
.bd-tier input:checked + .bd-tier-box {
  border-color: rgb(var(--c-accent));
  box-shadow: 0 0 0 3px rgb(var(--c-accent) / 0.12),
              0 14px 30px -20px rgb(var(--c-shadow) / 0.35);
}
/* Keyboard users must see focus even though the input is visually gone. */
.bd-tier input:focus-visible + .bd-tier-box {
  outline: 2px solid rgb(var(--c-accent));
  outline-offset: 3px;
}

.bd-tier-top { display: flex; align-items: center; gap: 0.6rem; }
.bd-tier-name {
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: rgb(var(--c-ink));
}
.bd-tier-flag {
  margin-left: auto;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgb(var(--c-accent));
  color: rgb(var(--c-on-accent));
  white-space: nowrap;
}

.bd-tier-price {
  margin-top: 0.9rem;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.bd-tier-price b {
  font-size: 1.9rem;
  letter-spacing: -0.035em;
  line-height: 1;
  color: rgb(var(--c-ink));
}
.bd-tier-price span { font-size: 0.8125rem; color: rgb(var(--c-ink-soft)); }

.bd-tier-dep {
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  color: rgb(var(--c-accent-text));
  font-weight: 600;
}
.bd-tier-blurb {
  margin-top: 0.85rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgb(var(--c-ink-mid));
}

/* The tick only appears once chosen — an empty circle on every card
   reads as four unfinished checkboxes. */
.bd-tier-tick {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(var(--c-accent-text));
  opacity: 0;
  transition: opacity 160ms ease;
}
.bd-tier input:checked + .bd-tier-box .bd-tier-tick { opacity: 1; }
.bd-tier-tick svg { width: 15px; height: 15px; }

/* ── Extras, grouped and collapsed ─────────────────────────────── */
.bd-group { border-bottom: 1px solid rgb(var(--c-line)); }
.bd-group:first-child { border-top: 1px solid rgb(var(--c-line)); }

/* 56px tall: comfortably past the 44px minimum, and it is the primary
   way through 66 options on a phone. */
.bd-group-btn {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 0.25rem;
  background: none;
  border: 0;
  font: inherit;
  text-align: left;
  color: rgb(var(--c-ink));
  cursor: pointer;
}
.bd-group-btn:hover { color: rgb(var(--c-accent-text)); }
.bd-group-name { font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.01em; }
.bd-group-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: rgb(var(--c-ink-soft));
}
.bd-group-count {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.6875rem;
  padding: 0.2rem 0.45rem;
  border-radius: 0.4rem;
  background: rgb(var(--c-accent-tint));
  color: rgb(var(--c-accent-text));
}
.bd-group-chev {
  width: 18px; height: 18px; flex: none;
  transition: transform 220ms cubic-bezier(.22,1,.36,1);
  color: rgb(var(--c-ink-soft));
}
.bd-group.is-open .bd-group-chev { transform: rotate(180deg); }

/* Height is animated via max-height rather than height:auto, which
   cannot transition. Grid-template-rows would be cleaner but has no
   Safari support below 16. */
.bd-group-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 320ms cubic-bezier(.22,1,.36,1);
}
.bd-group.is-open .bd-group-body { max-height: 220rem; }
.bd-group-inner { padding-bottom: 1rem; display: grid; gap: 0.15rem; }

/* ── One extra ─────────────────────────────────────────────────── */
.bd-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 48px;
  padding: 0.55rem 0.6rem;
  border-radius: 0.7rem;
  cursor: pointer;
  transition: background-color 140ms ease;
}
.bd-item:hover { background: rgb(var(--c-paper)); }
.bd-item input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

.bd-box {
  flex: none;
  width: 21px; height: 21px;
  display: grid; place-items: center;
  border: 1.5px solid rgb(var(--c-line-firm));
  border-radius: 0.4rem;
  background: rgb(var(--c-surface));
  transition: background-color 140ms ease, border-color 140ms ease;
}
.bd-box svg { width: 13px; height: 13px; color: rgb(var(--c-on-accent)); opacity: 0; transition: opacity 120ms ease; }
.bd-item input:checked + .bd-box { background: rgb(var(--c-accent)); border-color: rgb(var(--c-accent)); }
.bd-item input:checked + .bd-box svg { opacity: 1; }
.bd-item input:focus-visible + .bd-box { outline: 2px solid rgb(var(--c-accent)); outline-offset: 2px; }

.bd-item-name { font-size: 0.9375rem; line-height: 1.4; color: rgb(var(--c-ink)); }
.bd-item-price {
  margin-left: auto;
  flex: none;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.8125rem;
  color: rgb(var(--c-ink-mid));
  white-space: nowrap;
}

/* ── Summary ───────────────────────────────────────────────────── */
.bd-sum {
  border: 1px solid rgb(var(--c-line));
  border-radius: 1.35rem;
  background: rgb(var(--c-surface));
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgb(var(--c-shadow) / 0.04),
              0 18px 40px -28px rgb(var(--c-shadow) / 0.30);
}
@media (min-width: 1024px) { .bd-sum { position: sticky; top: 6.5rem; } }

.bd-sum h3 {
  font-size: 0.6875rem;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(var(--c-ink-soft));
}

.bd-sum-lines { margin-top: 1.15rem; display: grid; gap: 0.7rem; }
.bd-sum-line { display: flex; align-items: baseline; gap: 1rem; font-size: 0.9375rem; }
.bd-sum-line dt { color: rgb(var(--c-ink-mid)); min-width: 0; }
.bd-sum-line dd {
  margin-left: auto;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  color: rgb(var(--c-ink));
  white-space: nowrap;
}
.bd-sum-line--muted dt, .bd-sum-line--muted dd { color: rgb(var(--c-ink-soft)); }

.bd-sum-rule { height: 1px; background: rgb(var(--c-line)); margin: 1.15rem 0; }

.bd-sum-total { display: flex; align-items: baseline; gap: 1rem; }
.bd-sum-total dt { font-size: 0.9375rem; font-weight: 600; color: rgb(var(--c-ink)); }
.bd-sum-total dd {
  margin-left: auto;
  font-size: 1.85rem;
  letter-spacing: -0.035em;
  line-height: 1;
  color: rgb(var(--c-ink));
  white-space: nowrap;
}

/* The number that actually gets charged. Given its own block because
   it is the one figure that decides whether they click. */
.bd-sum-today {
  margin-top: 1.15rem;
  padding: 1rem 1.1rem;
  border-radius: 0.9rem;
  background: rgb(var(--c-accent-tint));
  border: 1px solid rgb(var(--c-line-firm));
}
.bd-sum-today-row { display: flex; align-items: baseline; gap: 1rem; }
.bd-sum-today-row dt { font-size: 0.875rem; font-weight: 600; color: rgb(var(--c-accent-text)); }
.bd-sum-today-row dd {
  margin-left: auto;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: rgb(var(--c-accent-text));
  white-space: nowrap;
}
.bd-sum-today p { margin-top: 0.5rem; font-size: 0.8125rem; line-height: 1.5; color: rgb(var(--c-ink-mid)); }

.bd-cta {
  margin-top: 1.15rem;
  width: 100%;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.4rem;
  border: 0;
  border-radius: 999px;
  background: rgb(var(--c-accent));
  color: rgb(var(--c-on-accent));
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms cubic-bezier(.22,1,.36,1);
}
.bd-cta:hover { background: rgb(var(--c-accent-hi)); }
.bd-cta:active { transform: translateY(1px); }
.bd-cta[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.bd-cta svg { width: 15px; height: 15px; }

.bd-sum-foot { margin-top: 0.9rem; font-size: 0.75rem; line-height: 1.55; color: rgb(var(--c-ink-soft)); text-align: center; }
.bd-sum-clear {
  margin-top: 0.9rem;
  width: 100%;
  min-height: 44px;            /* the interaction minimum, not 40 */
  background: none;
  border: 0;
  font: inherit;
  font-size: 0.8125rem;
  color: rgb(var(--c-ink-soft));
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.bd-sum-clear:hover { color: rgb(var(--c-ink)); }

/* ── Mobile bar ────────────────────────────────────────────────── */
/* Below the rail breakpoint the summary is far down the page, so the
   figure that matters follows the user instead. */
.bd-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem clamp(1rem, 4vw, 1.5rem);
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  background: rgb(var(--c-surface) / 0.94);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border-top: 1px solid rgb(var(--c-line));
  transform: translateY(110%);
  transition: transform 280ms cubic-bezier(.22,1,.36,1);
}
.bd-bar.is-up { transform: translateY(0); }
@media (min-width: 1024px) { .bd-bar { display: none; } }

.bd-bar-figs { min-width: 0; }
.bd-bar-today {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgb(var(--c-ink));
  white-space: nowrap;
}
.bd-bar-sub {
  font-size: 0.75rem;
  color: rgb(var(--c-ink-soft));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bd-bar .bd-cta { margin-top: 0; width: auto; flex: none; min-height: 46px; padding: 0.7rem 1.25rem; }

/* Room for the bar so it never covers the last control. */
@media (max-width: 1023px) {
  .bd-pad { height: 5.5rem; }
}

/* ── Empty state ───────────────────────────────────────────────── */
.bd-empty {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgb(var(--c-ink-soft));
  padding: 0.5rem 0 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
  .bd-group-body { transition: none; }
  .bd-bar { transition: none; }
}
