/* ==========================================================================
   PrimePay — public website
   Light, mobile-first. One display face (Bricolage Grotesque), system body.
   Motif: the purchase card is a ticket; the price summary is its tear-off stub.
   ========================================================================== */

:root {
  /* Ink (brand navy) */
  --ink: #0e2440;
  --ink-2: #3a4c63;
  --ink-3: #5c6b80;
  --ink-4: #8a97a8;

  /* Surfaces */
  --bg: #f5f7fa;
  --bg-wash: #eaf3fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e2e8f0;
  --line-strong: #cdd6e1;

  /* Accent (brand blue) — links, focus, selection */
  --accent: #0a6fb5;
  --accent-strong: #085a93;
  --accent-soft: #e8f2fb;
  --sky: #4aaee0;

  /* M-Pesa green — the pay action only */
  --pay: #1b873b;
  --pay-hover: #166f31;
  --pay-soft: #e7f5ec;
  --mpesa: #25a244;

  /* Feedback */
  --ok: #17713a;
  --ok-soft: #e6f5eb;
  --warn: #8a4b00;
  --warn-soft: #fff3df;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --promo: #7a2e8e;
  --promo-soft: #f6ebf9;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 20px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px rgba(14, 36, 64, .06);
  --shadow-2: 0 1px 2px rgba(14, 36, 64, .05), 0 10px 30px -12px rgba(14, 36, 64, .18);
  --shadow-3: 0 2px 6px rgba(14, 36, 64, .06), 0 24px 60px -20px rgba(14, 36, 64, .28);

  --wrap: 1120px;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
dl, dd { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Until the site config has been applied, hold back admin-driven hero copy so
   the defaults don't flash. JS reveals it (with a timeout fallback). */
.js body:not(.cfg-ready) .cfg-hold { opacity: 0; }
.cfg-hold { transition: opacity .25s ease; }

/* ---------- Icons ---------- */
.i { width: 20px; height: 20px; flex: none; }
.i--sm { width: 16px; height: 16px; }
.i--lg { width: 28px; height: 28px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: var(--r);
  font-family: var(--font-display); font-weight: 650; font-size: 1rem; letter-spacing: -.005em;
  text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; opacity: .55; }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover:not(:disabled) { background: #183457; color: #fff; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover:not(:disabled) { background: var(--accent-strong); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover:not(:disabled) { background: var(--surface); border-color: var(--ink-4); color: var(--ink); }
.btn--quiet { background: transparent; color: var(--accent); padding-left: 8px; padding-right: 8px; min-height: 40px; }
.btn--quiet:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent-strong); }
.btn--danger { background: transparent; color: var(--bad); border-color: #f1c2bd; }
.btn--danger:hover:not(:disabled) { background: var(--bad-soft); }
.btn--sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; border-radius: 10px; }
.btn--block { width: 100%; }

.btn--pay {
  width: 100%; min-height: 56px;
  background: var(--pay); color: #fff;
  font-size: 1.125rem; font-weight: 700;
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 8px 20px -10px rgba(27, 135, 59, .7);
}
.btn--pay:hover:not(:disabled) { background: var(--pay-hover); color: #fff; }
.btn--pay .mpesa-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #b9f5c9; box-shadow: 0 0 0 3px rgba(255,255,255,.18);
}
.btn[aria-busy="true"] { position: relative; color: transparent !important; }
.btn[aria-busy="true"] > * { visibility: hidden; }
.btn[aria-busy="true"]::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.45); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
.btn--ghost[aria-busy="true"]::after, .btn--quiet[aria-busy="true"]::after {
  border-color: rgba(14,36,64,.2); border-top-color: var(--ink);
}

.link-btn {
  background: none; border: 0; padding: 0; color: var(--accent);
  font-weight: 600; text-decoration: underline; text-underline-offset: 2px;
}
.link-btn:hover { color: var(--accent-strong); }

/* ---------- Announcement bar ---------- */
.announce {
  --tone-bg: var(--ink); --tone-fg: #fff;
  background: var(--tone-bg); color: var(--tone-fg);
  font-size: .925rem;
}
.announce--info { --tone-bg: var(--ink); --tone-fg: #fff; }
.announce--success { --tone-bg: #145c2d; --tone-fg: #fff; }
.announce--warning { --tone-bg: #ffe8b8; --tone-fg: #4a2a00; }
.announce--promo { --tone-bg: #5c1f6e; --tone-fg: #fff; }
.announce__in {
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding-top: 8px; padding-bottom: 8px;
}
.announce__text { flex: 1; min-width: 0; }
.announce__text a { color: inherit; font-weight: 700; margin-left: 6px; }
.announce__close {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; margin-right: -8px;
  background: transparent; border: 0; border-radius: 8px; color: inherit; opacity: .8;
}
.announce__close:hover { opacity: 1; background: rgba(255,255,255,.12); }
.announce--warning .announce__close:hover { background: rgba(0,0,0,.06); }
.announce :focus-visible { outline-color: currentColor; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(245, 247, 250, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background-color .2s ease;
}
.topbar.is-scrolled { border-bottom-color: var(--line); background: rgba(255,255,255,.92); }
.topbar__in { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; min-width: 0;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__logo { height: 34px; width: auto; max-width: 120px; object-fit: contain; flex: none; }
.brand__name {
  font-family: var(--font-display); font-weight: 750; font-size: 1.25rem; letter-spacing: -.03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topnav { display: none; margin-left: auto; gap: 4px; }
.topnav a {
  color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .95rem;
  padding: 8px 12px; border-radius: 10px;
}
.topnav a:hover { color: var(--ink); background: rgba(14,36,64,.05); }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.topnav + .topbar__actions { margin-left: 8px; }
@media (min-width: 860px) {
  .topnav { display: flex; }
}

.acct-chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 4px 14px 4px 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill);
  font-weight: 600; color: var(--ink); max-width: 180px;
}
.acct-chip:hover { border-color: var(--line-strong); }
.acct-chip__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: .95rem;
}
.avatar--lg { width: 48px; height: 48px; font-size: 1.2rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 20px 0 48px;
  background:
    radial-gradient(1200px 420px at 85% -10%, var(--bg-wash), transparent 70%),
    var(--bg);
  overflow: hidden;
}
.hero__signal {
  position: absolute; pointer-events: none;
  right: -120px; top: -90px; width: 520px; height: 520px;
  color: var(--sky); opacity: .22;
}
.hero__grid {
  position: relative;
  display: grid; gap: 24px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "copy" "buy" "extra";
}
.hero__copy { grid-area: copy; padding-top: 8px; }
.hero__buy { grid-area: buy; min-width: 0; }
.hero__extra { grid-area: extra; display: grid; gap: 20px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor;
}
.hero h1 {
  font-size: clamp(2.05rem, 8.2vw, 3.75rem);
  font-weight: 780;
  letter-spacing: -.035em;
  line-height: 1.02;
  text-wrap: balance;
}
.hero__sub {
  margin-top: 14px; max-width: 34rem;
  font-size: 1.075rem; color: var(--ink-2);
}
.highlights { list-style: none; display: grid; gap: 10px; }
.highlights li {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; color: var(--ink);
}
.highlights .tick {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--pay-soft); color: var(--pay);
}
.hero__figure {
  margin: 0; border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
}
.hero__figure img { width: 100%; max-height: 260px; object-fit: cover; }

@media (min-width: 960px) {
  .hero { padding: 48px 0 80px; }
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) 460px;
    grid-template-areas: "copy buy" "extra buy";
    /* Two equal rows beside the card: copy sits just above its midline, highlights just below. */
    grid-template-rows: 1fr 1fr;
    column-gap: 64px; row-gap: 28px;
  }
  .hero__copy { align-self: end; }
  .hero__extra { align-self: start; }
  .hero__sub { font-size: 1.2rem; }
  .hero__figure img { max-height: 320px; }
  .hero__signal { right: auto; left: 38%; top: -160px; width: 760px; height: 760px; }
}

/* ---------- Purchase card (the ticket) ---------- */
.buy {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
}
.buy__head { padding: 14px 14px 0; }
.tabs {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
  padding: 4px; border-radius: 14px; background: var(--surface-2);
  border: 1px solid var(--line);
}
.tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 12px;
  background: transparent; border: 0; border-radius: 10px;
  font-family: var(--font-display); font-weight: 650; font-size: 1rem; color: var(--ink-3);
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.tab { position: relative; }
/* Sits on the tab's top edge like a sticker, so it never squeezes the label. */
.tab__badge {
  position: absolute; top: -9px; right: 6px;
  padding: 1px 7px; border-radius: var(--r-pill);
  background: var(--pay); color: #fff;
  font-family: var(--font-body); font-size: .7rem; font-weight: 800; letter-spacing: .02em;
  white-space: nowrap; line-height: 1.5;
  box-shadow: 0 0 0 2px var(--surface);
}
.tab__badge--off { background: var(--ink-3); }
.tabs--single { display: none; }
#buyPaused { margin-bottom: 14px; }

.buy__notice {
  margin: 14px 14px 0; padding: 14px 16px;
  border-radius: var(--r); background: var(--warn-soft); color: #4a2a00;
  display: flex; gap: 12px; align-items: flex-start;
}
.buy__notice strong { display: block; font-family: var(--font-display); font-size: 1.05rem; color: #3d2300; }
.buy__notice p { font-size: .95rem; margin-top: 2px; }
.buy__notice .i { color: var(--warn); margin-top: 2px; }

.panel { display: block; }
.panel__body { padding: 18px 18px 6px; display: grid; gap: 18px; }

/* Segmented "who is this for" */
.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden;
}
.seg label { position: relative; display: block; min-width: 0; }
.seg label + label { border-left: 1px solid var(--line-strong); }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: 6px 8px;
  font-weight: 600; font-size: .95rem; color: var(--ink-2);
  transition: background-color .15s ease, color .15s ease;
}
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: -3px; }
.seg input:disabled + span { opacity: .5; cursor: not-allowed; }

/* Fields */
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field__label, .field > legend {
  font-weight: 650; font-size: .95rem; color: var(--ink);
}
.field > legend { margin-bottom: 8px; }
/* Grid children must be allowed to shrink, or an input's intrinsic width pushes past the card at 360px. */
.field > * { min-width: 0; }
.field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.field__aside { font-size: .85rem; color: var(--ink-3); }
.input {
  width: 100%; min-height: 50px; padding: 12px 14px;
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r);
  font-size: 1.05rem; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: var(--ink-4); }
.input:hover { border-color: var(--ink-4); }
.input:focus, .input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(10,111,181,.16); }
.amount__input:focus-visible { outline: none; }
.input[aria-invalid="true"] { border-color: var(--bad); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(180,35,24,.14); }
.input:disabled { background: var(--surface-2); color: var(--ink-3); cursor: not-allowed; }
.input[readonly] { background: var(--surface-2); }
textarea.input { min-height: 150px; resize: vertical; font-family: var(--font-mono); font-size: .95rem; line-height: 1.5; }
.input--tel { letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.input--code {
  font-family: var(--font-mono); font-size: 1.4rem; letter-spacing: .35em; text-align: center;
  font-variant-numeric: tabular-nums;
}

.phone { position: relative; }
.phone .input { padding-right: 104px; }
.phone__tag {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: var(--r-pill);
  font-size: .75rem; font-weight: 700; letter-spacing: .01em;
  background: var(--ok-soft); color: var(--ok);
  pointer-events: none;
}
.phone__tag--other { background: var(--warn-soft); color: var(--warn); }

.hint { font-size: .875rem; color: var(--ink-3); }
.hint--warn { color: var(--warn); }
.err {
  display: flex; gap: 6px; align-items: flex-start;
  font-size: .9rem; font-weight: 550; color: var(--bad);
}
.err::before {
  content: "!"; flex: none; display: grid; place-items: center;
  width: 18px; height: 18px; margin-top: 1px; border-radius: 50%;
  background: var(--bad); color: #fff; font-size: .75rem; font-weight: 800;
}

/* Amount */
.amount {
  display: flex; align-items: center;
  border: 1.5px solid var(--line-strong); border-radius: var(--r);
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.amount:hover { border-color: var(--ink-4); }
.amount:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(10,111,181,.16); }
.amount.is-invalid { border-color: var(--bad); }
.amount__cur {
  padding-left: 16px; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--ink-3);
}
.amount__input {
  flex: 1; width: 0; min-width: 0; min-height: 58px; padding: 10px 14px 10px 10px;
  border: 0; background: transparent; outline: none;
  font-family: var(--font-display); font-weight: 750; font-size: 1.75rem; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.amount__input::placeholder { color: var(--line-strong); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--scroll {
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  margin: 0 -18px; padding: 2px 18px 4px;
  scroll-padding: 0 18px;
}
.chips--scroll::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 40px; padding: 6px 14px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  font-weight: 600; font-size: .95rem; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip:disabled { opacity: .5; cursor: not-allowed; }
.chip small { font-weight: 500; color: inherit; opacity: .75; font-size: .82rem; }

.saved-picks { display: grid; gap: 6px; }
.saved-picks__label { font-size: .8rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }

.check {
  display: flex; align-items: center; gap: 10px;
  font-size: .95rem; color: var(--ink-2); cursor: pointer; min-height: 32px;
}
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }

/* Bundles */
.bundle-list {
  display: grid; gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 420px) {
  .bundle-list { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
}
.bundle { position: relative; display: block; min-width: 0; }
.bundle__radio { position: absolute; opacity: 0; inset: 0; margin: 0; }
.bundle__body {
  position: relative;
  display: grid; gap: 2px; height: 100%;
  padding: 12px 12px 12px;
  border: 1.5px solid var(--line-strong); border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.bundle__body:hover { border-color: var(--ink-4); }
.bundle__amt {
  font-family: var(--font-display); font-weight: 780; font-size: 1.3rem; letter-spacing: -.02em; line-height: 1.1;
  overflow-wrap: anywhere;
}
.bundle__name { font-size: .82rem; color: var(--ink-3); line-height: 1.3; overflow-wrap: anywhere; }
.bundle__val { font-size: .82rem; color: var(--ink-3); }
.bundle__price {
  margin-top: 6px; font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.bundle__flag {
  position: absolute; top: -9px; right: 10px;
  padding: 1px 8px; border-radius: var(--r-pill);
  background: var(--sky); color: var(--ink);
  font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.bundle__radio:checked + .bundle__body {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 1.5px var(--accent) inset;
}
.bundle__radio:checked + .bundle__body::after {
  content: ""; position: absolute; top: 10px; right: 10px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-7'/%3E%3C/svg%3E") center/14px no-repeat;
}
.bundle__radio:focus-visible + .bundle__body { outline: 3px solid var(--accent); outline-offset: 2px; }
.bundle__radio:disabled + .bundle__body { opacity: .55; cursor: not-allowed; }

.list-status { font-size: .95rem; color: var(--ink-3); padding: 12px 0; }
.list-status--error { color: var(--bad); }
.skeleton-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.skeleton {
  height: 92px; border-radius: 14px;
  background: linear-gradient(90deg, var(--surface-2) 0%, #eef2f6 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r);
  font-size: .92rem;
  background: var(--warn-soft); color: #4a2a00;
}
.notice .i { color: var(--warn); margin-top: 1px; }
.notice--info { background: var(--accent-soft); color: #0b3a5e; }
.notice--info .i { color: var(--accent); }

/* Promo */
.promo { display: grid; gap: 8px; }
.promo__toggle {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0; background: none; border: 0;
  color: var(--accent); font-weight: 650;
}
.promo__toggle:hover { color: var(--accent-strong); }
.promo__toggle .i { transition: transform .2s ease; }
.promo__toggle[aria-expanded="true"] .i--chev { transform: rotate(180deg); }
.promo__row { display: flex; gap: 8px; }
.promo__row .input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .08em; font-family: var(--font-mono); font-size: 1rem; }
.promo__row .input::placeholder { text-transform: none; letter-spacing: normal; font-family: var(--font-body); }
.promo__row .btn { flex: none; min-height: 50px; }
.promo__applied {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 14px; border-radius: var(--r);
  border: 1.5px dashed #c99bd6; background: var(--promo-soft); color: var(--promo);
}
.promo__applied-text { flex: 1; min-width: 0; font-size: .92rem; }
.promo__applied-text strong { font-family: var(--font-mono); letter-spacing: .06em; margin-right: 4px; }
.promo__applied .btn { color: var(--promo); }
.promo__applied .btn:hover { background: rgba(122,46,142,.08); color: var(--promo); }

/* The stub: perforated tear-off with notches */
.stub {
  position: relative;
  margin-top: 18px;
  padding: 22px 18px 14px;
  background: var(--surface-2);
}
.stub::before {
  /* perforation */
  content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 2px;
  background-image: linear-gradient(90deg, var(--line-strong) 50%, transparent 50%);
  background-size: 10px 2px;
}
.stub__notch {
  position: absolute; top: -11px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line);
}
.stub__notch--l { left: -12px; clip-path: inset(0 0 0 50%); }
.stub__notch--r { right: -12px; clip-path: inset(0 50% 0 0); }

.summary { display: grid; gap: 6px; margin-bottom: 16px; }
.summary__row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: .95rem; color: var(--ink-2);
}
.summary__row dd { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); text-align: right; }
.summary__row--save dd { color: var(--ok); }
.summary__row--promo dd { color: var(--promo); }
.summary__row--total {
  margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line);
  align-items: center;
}
.summary__row--total dt { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.summary__row--total dd {
  font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; letter-spacing: -.02em; color: var(--ink);
}
.summary__muted { color: var(--ink-4) !important; }
.stub__note {
  display: flex; gap: 8px; align-items: flex-start; justify-content: center;
  margin-top: 12px; font-size: .85rem; color: var(--ink-3); text-align: center;
}
.stub__note .i { color: var(--ink-4); }

.buy__trust {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px;
  padding: 4px 18px 18px; background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg);
  font-size: .82rem; font-weight: 600; color: var(--ink-3);
}
.buy__trust span { display: inline-flex; align-items: center; gap: 6px; }
.buy__trust .i { color: var(--ink-4); }
/* When nothing is buyable the card has no stub above the trust row */
.buy.is-empty .buy__trust { background: transparent; padding-top: 14px; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section--alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { margin-bottom: 28px; max-width: 40rem; }
.section__kicker {
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 8px;
}
.section__title { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 760; letter-spacing: -.03em; }
.section__lead { margin-top: 10px; color: var(--ink-2); font-size: 1.05rem; }
@media (min-width: 960px) {
  .section { padding: 88px 0; }
  .section__head { margin-bottom: 40px; }
}

/* Banners carousel */
.banners { padding: 8px 0 32px; }
.carousel { position: relative; }
.carousel__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 88%;
  gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain; scrollbar-width: none;
  padding: 4px var(--gutter) 8px; margin: 0 calc(var(--gutter) * -1);
  scroll-padding: 0 var(--gutter);
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel--single .carousel__track { grid-auto-columns: 100%; }
@media (min-width: 720px) {
  .carousel__track { grid-auto-columns: calc((100% - 14px) / 2); }
  .carousel--single .carousel__track { grid-auto-columns: 100%; }
}
.banner {
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; min-width: 0;
  box-shadow: var(--shadow-1);
}
.banner__img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; background: var(--surface-2); }
.carousel--single .banner__img { aspect-ratio: 16 / 6; }
.banner__body { padding: 16px 18px 18px; display: grid; gap: 6px; align-content: start; flex: 1; }
.banner__title { font-size: 1.2rem; font-weight: 720; }
.banner__sub { color: var(--ink-2); font-size: .95rem; }
.banner__cta { justify-self: start; margin-top: 6px; }
.banner--plain {
  background:
    radial-gradient(400px 200px at 100% 0%, rgba(74,174,224,.35), transparent 70%),
    var(--ink);
  color: #fff; border-color: var(--ink);
}
.banner--plain .banner__body { padding: 24px 22px; min-height: 160px; }
.banner--plain .banner__sub { color: rgba(255,255,255,.82); }
.banner--plain .banner__title { font-size: 1.4rem; }
.banner--plain .btn--ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.banner--plain .btn--ghost:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }
.banner--plain :focus-visible { outline-color: #fff; }
.carousel__nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.carousel__dots { display: flex; gap: 6px; flex-wrap: wrap; }
.carousel__dot {
  width: 28px; height: 28px; padding: 0; border: 0; background: transparent; display: grid; place-items: center;
}
.carousel__dot::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong);
  transition: width .2s ease, background-color .2s ease;
}
.carousel__dot[aria-current="true"]::before { width: 20px; border-radius: 4px; background: var(--ink); }
.carousel__arrows { display: flex; gap: 8px; }
.icon-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink);
}
.icon-btn:hover:not(:disabled) { border-color: var(--ink-3); }
.icon-btn:disabled { opacity: .4; cursor: default; }
.icon-btn--plain { border-color: transparent; background: transparent; }
.icon-btn--plain:hover:not(:disabled) { background: rgba(14,36,64,.06); border-color: transparent; }

/* Offers — coupon cards */
.offers { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .offers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .offers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.offer {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-1);
}
.offer__img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; background: var(--surface-2); }
.offer__body { padding: 18px; display: grid; gap: 8px; align-content: start; flex: 1; }
.offer__badge {
  justify-self: start;
  padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--promo-soft); color: var(--promo);
  font-size: .75rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}
.offer__title { font-size: 1.25rem; font-weight: 740; }
.offer__desc { color: var(--ink-2); font-size: .95rem; }
.offer__foot {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 14px 18px 18px;
}
.offer__foot--coupon { background: var(--surface-2); }
.offer__foot--coupon::before {
  content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 2px;
  background-image: linear-gradient(90deg, var(--line-strong) 50%, transparent 50%);
  background-size: 10px 2px;
}
.offer__code {
  font-family: var(--font-mono); font-weight: 700; letter-spacing: .1em;
  padding: 6px 10px; border-radius: 8px; border: 1.5px dashed var(--ink-4); color: var(--ink);
  background: var(--surface);
}
.offer__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }

/* Steps */
.steps {
  list-style: none; counter-reset: step;
  display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 720px) { .steps { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; } }
.step {
  counter-increment: step;
  position: relative; padding: 20px 20px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.section--alt .step { background: var(--bg); }
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block; margin-bottom: 14px;
  font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; letter-spacing: -.04em; line-height: 1;
  color: var(--sky);
}
.step__title { font-size: 1.15rem; font-weight: 720; margin-bottom: 6px; }
.step__desc { color: var(--ink-2); font-size: .97rem; }

/* FAQ */
.faq-wrap { display: grid; gap: 28px; }
@media (min-width: 960px) { .faq-wrap { grid-template-columns: 340px minmax(0, 1fr); gap: 64px; } }
.faqs { display: grid; gap: 10px; align-content: start; }
.faq {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.faq[open] { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px; min-height: 56px;
  font-family: var(--font-display); font-weight: 650; font-size: 1.05rem;
  border-radius: var(--r);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { flex: none; color: var(--ink-3); transition: transform .2s ease; }
.faq[open] summary .i { transform: rotate(45deg); color: var(--ink); }
.faq__a { padding: 0 18px 18px; color: var(--ink-2); white-space: pre-line; }

/* Contact */
.contact-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .contact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.contact-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; min-height: 76px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  color: var(--ink); text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
a.contact-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); color: var(--ink); }
.contact-card__icon {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
}
.contact-card__icon--wa { background: var(--pay-soft); color: var(--pay); }
.contact-card__label { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.contact-card__value { font-weight: 650; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #c9d4e2; padding: 48px 0 28px; }
.footer a { color: #fff; }
.footer :focus-visible { outline-color: var(--sky); }
.footer__grid { display: grid; gap: 28px; }
@media (min-width: 800px) { .footer__grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } }
.footer__brand { display: flex; align-items: center; gap: 10px; color: #fff; margin-bottom: 12px; text-decoration: none; }
.footer__brand:hover { color: #fff; }
.footer .brand__mark { --mark-bg: #1d3a5f; }
.footer__brand .brand__name { font-size: 1.35rem; }
.footer__about { max-width: 30rem; font-size: .95rem; }
.footer h2 { font-size: .8rem; font-family: var(--font-body); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8fa3bd; margin-bottom: 12px; }
.footer__links { list-style: none; display: grid; gap: 4px; }
.footer__links a { display: inline-block; padding: 6px 0; text-decoration: none; color: #e3eaf3; }
.footer__links a:hover { color: #fff; text-decoration: underline; }
.social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.social a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,255,255,.08); color: #fff;
}
.social a:hover { background: rgba(255,255,255,.16); }
.footer__bottom {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
  font-size: .875rem; color: #8fa3bd;
}
.footer__mpesa { display: inline-flex; align-items: center; gap: 8px; }
.footer__mpesa::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mpesa); }

/* ---------- Dialogs (status sheet, auth, account) ---------- */
dialog {
  padding: 0; border: 0; color: var(--ink);
  background: var(--surface);
  max-width: 100vw; max-height: 100vh; max-height: 100dvh;
}
dialog::backdrop { background: rgba(9, 22, 40, .52); }
html.is-locked, html.is-locked body { overflow: hidden; }

.sheet {
  position: fixed; inset: auto 0 0 0;
  width: 100%; margin: 0;
  max-height: 92vh; max-height: 92dvh; overflow: auto;
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-3);
  overscroll-behavior: contain;
}
.sheet[open] { animation: sheet-up .28s var(--ease); }
@media (min-width: 640px) {
  .sheet {
    inset: 0; margin: auto;
    width: min(460px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 48px));
    max-height: min(760px, calc(100dvh - 48px));
    border-radius: 22px;
  }
  .sheet[open] { animation: pop-in .22s var(--ease); }
}
.sheet__grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 10px auto 0; }
@media (min-width: 640px) { .sheet__grab { display: none; } }
.sheet__head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 12px 4px 20px; background: var(--surface);
}
.sheet__title { font-size: 1.3rem; font-weight: 760; }
.sheet__body { padding: 8px 20px 24px; }
.sheet__foot { display: grid; gap: 10px; margin-top: 20px; }

/* Drawer (account) */
.drawer {
  position: fixed; inset: 0 0 0 auto;
  width: 100%; margin: 0;
  height: 100vh; max-height: 100vh;
  height: 100dvh; max-height: 100dvh;
  display: none; flex-direction: column;
  box-shadow: var(--shadow-3);
  overscroll-behavior: contain;
}
.drawer[open] { display: flex; animation: drawer-in .26s var(--ease); }
@media (min-width: 640px) { .drawer { width: min(560px, 100vw); } }
.drawer__head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 12px 14px 20px; border-bottom: 1px solid var(--line);
}
.drawer__who { flex: 1; min-width: 0; }
.drawer__name { font-family: var(--font-display); font-weight: 720; font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer__phone { font-size: .9rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.drawer__tabs {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2);
  flex: none;
}
.drawer__tabs::-webkit-scrollbar { display: none; }
.dtab {
  flex: none; min-height: 40px; padding: 6px 14px;
  background: transparent; border: 0; border-radius: 10px;
  font-weight: 650; font-size: .95rem; color: var(--ink-3); white-space: nowrap;
}
.dtab:hover { color: var(--ink); background: rgba(14,36,64,.05); }
.dtab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.drawer__body { flex: 1; overflow-y: auto; padding: 20px; -webkit-overflow-scrolling: touch; }
.drawer__panel { display: grid; gap: 18px; align-content: start; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-title { font-size: 1.15rem; font-weight: 720; }

/* Auth */
.auth-view { display: grid; gap: 16px; }
.auth-lead { color: var(--ink-2); }
.auth-alt { text-align: center; font-size: .95rem; color: var(--ink-2); }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pw { position: relative; }
.pw .input { padding-right: 76px; }
.pw__toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  min-height: 38px; padding: 0 10px; border: 0; background: transparent; border-radius: 8px;
  font-size: .85rem; font-weight: 700; color: var(--accent);
}
.pw__toggle:hover { background: var(--accent-soft); }
.form-error {
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--bad-soft); color: var(--bad); font-size: .92rem; font-weight: 550;
}
.form-ok {
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--ok-soft); color: var(--ok); font-size: .92rem; font-weight: 550;
}

/* Status sheet internals */
.status { display: grid; gap: 18px; text-align: center; padding-top: 4px; }
.status__art {
  justify-self: center; position: relative;
  width: 88px; height: 88px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.status__art--ok { background: var(--ok-soft); color: var(--ok); }
.status__art--bad { background: var(--bad-soft); color: var(--bad); }
.status__art--warn { background: var(--warn-soft); color: var(--warn); }
.status__art .i { width: 40px; height: 40px; }
.status__art--pulse::before, .status__art--pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--sky); opacity: 0;
  animation: ring 2.2s var(--ease) infinite;
}
.status__art--pulse::after { animation-delay: 1.1s; }
.status__art--spin::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 3px solid transparent; border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}
.status__art--ok .i { animation: pop .4s var(--ease) both; }
.status__h { font-size: 1.45rem; font-weight: 780; letter-spacing: -.025em; }
.status__p { color: var(--ink-2); font-size: 1rem; }
.status__p strong { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.status__server {
  padding: 10px 12px; border-radius: var(--r-sm); background: var(--bad-soft); color: var(--bad);
  font-weight: 600; font-size: .95rem;
}
.status__small { font-size: .875rem; color: var(--ink-3); }

.track { list-style: none; display: grid; gap: 0; text-align: left; margin: 4px 0 0; }
.track__step {
  position: relative; display: flex; gap: 12px; align-items: flex-start;
  padding: 0 0 14px 0; color: var(--ink-3); font-weight: 600; font-size: .95rem;
}
.track__step:last-child { padding-bottom: 0; }
.track__step:not(:last-child)::after {
  content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px; background: var(--line);
}
.track__dot {
  position: relative; z-index: 1; flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--line-strong);
}
.track__dot .i { width: 14px; height: 14px; display: none; }
.track__step.is-done .tk-ok, .track__step.is-failed .tk-bad { display: block; }
.track__step.is-done { color: var(--ink); }
.track__step.is-done .track__dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.track__step.is-done:not(:last-child)::after { background: var(--ok); }
.track__step.is-active { color: var(--ink); }
.track__step.is-active .track__dot { border-color: var(--accent); }
.track__step.is-active .track__dot::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
  animation: blink 1.2s ease-in-out infinite;
}
.track__step.is-failed { color: var(--bad); }
.track__step.is-failed .track__dot { background: var(--bad); border-color: var(--bad); color: #fff; }
.track__label { padding-top: 1px; }
.track__sub { display: block; font-weight: 500; font-size: .85rem; color: var(--ink-3); }

.timer { display: grid; gap: 6px; }
.timer__bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.timer__fill { height: 100%; width: 100%; background: var(--accent); transform-origin: left; transition: transform 1s linear; }
.timer__text { font-size: .85rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.receipt {
  position: relative; text-align: left;
  padding: 16px 18px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.receipt__row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: .95rem; }
.receipt__row + .receipt__row { border-top: 1px dashed var(--line-strong); }
.receipt__row dt { color: var(--ink-3); }
.receipt__row dd { font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.receipt__code { font-family: var(--font-mono); letter-spacing: .06em; }
.status__actions { display: grid; gap: 10px; }
.status__actions--row { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }

/* ---------- Lists in the account drawer ---------- */
.rows { list-style: none; display: grid; gap: 10px; }
.row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
}
.row__icon {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
}
.row__icon--bundle { background: #eef0ff; color: #3b45b5; }
.row__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.row__title { font-weight: 700; overflow-wrap: anywhere; }
.row__meta { font-size: .85rem; color: var(--ink-3); overflow-wrap: anywhere; }
.row__side { text-align: right; display: grid; gap: 4px; justify-items: end; flex: none; }
.row__amt { font-family: var(--font-display); font-weight: 750; font-variant-numeric: tabular-nums; }
button.row { width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
button.row:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--r-pill);
  font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line);
  white-space: nowrap;
}
.pill--ok { background: var(--ok-soft); color: var(--ok); border-color: #bfe5cc; }
.pill--bad { background: var(--bad-soft); color: var(--bad); border-color: #f4c7c2; }
.pill--wait { background: var(--warn-soft); color: var(--warn); border-color: #f3d9a8; }
.pill--info { background: var(--accent-soft); color: var(--accent); border-color: #c4def3; }

.empty {
  display: grid; justify-items: center; gap: 8px; text-align: center;
  padding: 28px 16px; border: 1.5px dashed var(--line-strong); border-radius: 16px;
  color: var(--ink-3);
}
.empty .i { width: 32px; height: 32px; color: var(--ink-4); }
.empty strong { color: var(--ink); font-family: var(--font-display); font-size: 1.05rem; }

.stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.stat { padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.stat__label { font-size: .8rem; color: var(--ink-3); font-weight: 650; }
.stat__value { font-family: var(--font-display); font-size: 1.35rem; font-weight: 780; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat__value--ok { color: var(--ok); }
.stat__value--bad { color: var(--bad); }
.stat__value--warn { color: var(--warn); }

.card {
  padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  display: grid; gap: 12px;
}
.card__title { font-size: 1rem; font-weight: 720; }
.card--soft { background: var(--surface-2); }

.progress { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.progress__fill { height: 100%; background: var(--ok); }

.file-drop {
  position: relative; display: grid; justify-items: center; gap: 6px; text-align: center;
  padding: 22px 16px; border: 1.5px dashed var(--line-strong); border-radius: 14px;
  background: var(--surface-2); color: var(--ink-2); cursor: pointer;
}
.file-drop:hover { border-color: var(--accent); }
.file-drop:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-drop strong { color: var(--ink); }

.msg-list { list-style: none; display: grid; gap: 4px; max-height: 180px; overflow: auto; font-size: .88rem; }
.msg-list--bad { color: var(--bad); }
.msg-list--warn { color: var(--warn); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; max-height: 320px; overflow-y: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { position: sticky; top: 0; background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }

.items-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.item {
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  display: grid; gap: 4px; font-size: .9rem;
}
.item--completed { border-color: #bfe5cc; background: #f6fcf8; }
.item--failed { border-color: #f4c7c2; background: #fff8f7; }
.item__phone { font-weight: 700; font-variant-numeric: tabular-nums; }
.item__note { font-size: .78rem; color: var(--ink-3); overflow-wrap: anywhere; }
.item__note--bad { color: var(--bad); }

details.disclose summary { cursor: pointer; font-weight: 650; padding: 8px 0; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed; z-index: 1000; left: 12px; right: 12px; bottom: 12px;
  display: grid; gap: 8px; justify-items: center; pointer-events: none;
}
@media (min-width: 640px) { .toasts { left: auto; right: 20px; bottom: 20px; justify-items: end; } }
.toast {
  pointer-events: auto;
  max-width: 420px; width: 100%;
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 14px;
  background: var(--ink); color: #fff; box-shadow: var(--shadow-3);
  font-size: .95rem; font-weight: 550;
  animation: toast-in .25s var(--ease);
}
.toast.is-leaving { animation: toast-out .2s ease forwards; }
.toast .i { flex: none; margin-top: 1px; }
.toast--success .i { color: #7fe0a0; }
.toast--error { background: #7a1810; }
.toast--warning { background: #5b3500; }
.toast--info .i { color: var(--sky); }

/* ---------- Motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes ring { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes pop-in { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drawer-in { from { transform: translateX(30px); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { transform: translateY(6px); opacity: 0; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Page-load: one orchestrated rise for the hero */
.cfg-ready .hero__copy > * { animation: rise .5s var(--ease) both; }
.cfg-ready .hero__copy > *:nth-child(2) { animation-delay: .05s; }
.cfg-ready .hero__copy > *:nth-child(3) { animation-delay: .1s; }
.cfg-ready .hero__buy { animation: rise .55s var(--ease) .08s both; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
  }
  .status__art--pulse::before, .status__art--pulse::after { display: none; }
  .skeleton { animation: none; }
}

/* ---------- Utilities ---------- */
.stack-sm { display: grid; gap: 8px; }
.stack { display: grid; gap: 14px; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.mono { font-family: var(--font-mono); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

@media print {
  .topbar, .announce, .buy, .toasts, .footer { display: none; }
}
