@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

/* ── Tokens ─────────────────────────────────────────── */
:root {
  --ink: #1D2433;  --ink-2: #3E475A; --muted: #687184; --faint: #98A0AE;
  --line: #E2E6EC; --line-2: #EEF1F4;
  --bg: #F3F5F7;   --surface: #FFFFFF; --sunken: #F7F8FA;
  --brand: #1B2559; --brand-ink: #131A40; --brand-tint: #E9EBF5;
  --saffron: #F7931E; --saffron-tint: #FEF0DD; --grad: linear-gradient(135deg, #2E2470 0%, #D8436F 55%, #F7931E 100%);
  --danger: #B42318; --danger-tint: #FDECEA; --ok: #157F4C; --ok-tint: #E4F4EB;
  --focus: 0 0 0 3px rgba(27,37,89,.28);
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 22px;
  --shadow: 0 1px 2px rgba(29,36,51,.06), 0 6px 24px -12px rgba(29,36,51,.18);
  --font: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --side: 252px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E8ECF2; --ink-2: #C3CAD6; --muted: #949DAD; --faint: #6C7586;
    --line: #2A3242; --line-2: #222937; --bg: #12161E; --surface: #191E28; --sunken: #151A23;
    --brand: #A9B4F2; --brand-ink: #CBD2FF; --brand-tint: #1E2448; --saffron-tint: #3A2C14;
    --danger: #F2766B; --danger-tint: #3A1A18; --ok: #4CC38A; --ok-tint: #143224;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px -14px rgba(0,0,0,.6); color-scheme: dark;
  }
}

/* ── Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15px/1.55 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; }
h1 { font-size: 1.6rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny { font-size: .76rem; }
.nowrap { white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-xs); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── Controls ───────────────────────────────────────── */
.btn { --b: var(--surface); --c: var(--ink); --bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border: 1px solid var(--bd); border-radius: var(--r-sm); background: var(--b); color: var(--c);
  font: 500 .95rem var(--font); cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { border-color: var(--faint); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { --b: var(--brand); --c: #fff; --bd: var(--brand); }
.btn.primary:hover { --b: var(--brand-ink); --bd: var(--brand-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { --c: #0D1230; } }
.btn.danger { --c: var(--danger); }
.btn.ghost { --b: transparent; --bd: transparent; }
.btn.ghost:hover { --b: var(--sunken); }
.btn.lg { min-height: 54px; font-size: 1.05rem; padding: 0 22px; border-radius: var(--r-md); }
.btn.xl { min-height: 64px; font-size: 1.15rem; font-weight: 600; border-radius: var(--r-md); width: 100%; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: .86rem; }
.btn.icon { padding: 0; width: 42px; }
.btn.sm.icon { width: 34px; }
.btn.block { width: 100%; }

.field { display: grid; gap: 6px; }
.field > span { font-size: .86rem; font-weight: 500; color: var(--ink-2); }
.field > small { color: var(--muted); font-size: .8rem; }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: 400 1rem var(--font); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.6; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.input.huge { min-height: 72px; font-size: 2rem; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.input[aria-invalid="true"] { border-color: var(--danger); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.form { display: grid; gap: 14px; }
.grid2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.color-row { display: flex; gap: 10px; align-items: center; }
.color-row input[type=color] { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: none; cursor: pointer; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: background .15s; }
.switch i::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(18px); }
[dir=rtl] .switch input:checked + i::after { transform: translateX(-18px); }
.switch input:focus-visible + i { box-shadow: var(--focus); }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-sm); }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 7px; font: 500 .9rem var(--font); color: var(--muted); cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.choice { position: relative; display: grid; gap: 4px; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; text-align: start; font: inherit; color: inherit; }
.choice:hover { border-color: var(--faint); }
.choice[aria-pressed=true], .choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.choice input { position: absolute; opacity: 0; }
.choice b { font-weight: 600; }
.choice small { color: var(--muted); font-size: .82rem; line-height: 1.45; }
.choice svg { width: 24px; height: 24px; color: var(--brand); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: .8rem; font-weight: 500; background: var(--sunken); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--faint)); }
.chip.ok { background: var(--ok-tint); color: var(--ok); border-color: transparent; }
.chip.warn { background: var(--saffron-tint); color: #8A5A0E; border-color: transparent; }
.chip.bad { background: var(--danger-tint); color: var(--danger); border-color: transparent; }
.chip.brand { background: var(--brand-tint); color: var(--brand-ink); border-color: transparent; }
button.chip { cursor: pointer; font-family: var(--font); }
button.chip[aria-pressed=true] { background: var(--ink); color: var(--surface); border-color: var(--ink); }

/* ── Shell ──────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 12px; background: var(--surface); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.brandmark { display: flex; align-items: center; gap: 10px; padding: 4px 10px 14px; font-weight: 700; font-size: 1.12rem; color: var(--ink); }
.brandmark .dot { width: 26px; height: 26px; flex: none; background: url(../img/mark.svg) center / contain no-repeat; }
.biz-switch { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--sunken); cursor: pointer; width: 100%; font: inherit; color: inherit; text-align: start; }
.biz-switch img, .biz-switch .ph { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; flex: none; background: var(--line); }
.biz-switch b { display: block; font-size: .92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biz-switch small { color: var(--muted); font-size: .76rem; }
.nav-group { padding: 14px 10px 4px; font-size: .76rem; color: var(--faint); font-weight: 500; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 500; font-size: .93rem; text-decoration: none; }
.nav a svg { width: 19px; height: 19px; color: var(--faint); flex: none; }
.nav a:hover { background: var(--sunken); }
.nav a[aria-current=page] { background: var(--brand-tint); color: var(--brand-ink); }
.nav a[aria-current=page] svg { color: var(--brand); }
.nav a.checkout-link { margin: 6px 0 2px; background: var(--brand); color: #fff; }
.nav a.checkout-link svg { color: #fff; }
.nav a.checkout-link[aria-current=page] { background: var(--brand-ink); color: #fff; }
.side-foot { margin-top: auto; padding-top: 14px; display: grid; gap: 6px; border-top: 1px solid var(--line-2); }
.me { display: flex; gap: 10px; align-items: center; padding: 6px 10px; font-size: .86rem; }
.me .av { width: 30px; height: 30px; }

.main { min-width: 0; }
.topbar { display: none; }
.page { padding: 28px clamp(16px, 3vw, 40px) 64px; max-width: 1240px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-bar { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 7px 16px; background: var(--saffron-tint); color: #7A4F0C; font-size: .84rem; text-align: center; }
.demo-bar button { border: 0; background: none; color: inherit; text-decoration: underline; font: inherit; cursor: pointer; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .demo-bar { color: #F1C77E; } }

.bottom-nav { display: none; }
@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; padding: 10px 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .topbar .biz-switch { margin: 0; padding: 6px 10px; border: 0; background: none; flex: 1; min-width: 0; }
  .page { padding: 18px 16px 110px; }
  .page-head { margin-bottom: 16px; }
  h1 { font-size: 1.35rem; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a, .bottom-nav button { display: grid; justify-items: center; gap: 2px; padding: 4px 0; font: 500 .7rem var(--font); color: var(--muted); background: none; border: 0; text-decoration: none; cursor: pointer; }
  .bottom-nav svg { width: 22px; height: 22px; }
  .bottom-nav [aria-current=page] { color: var(--brand); }
  .bottom-nav .fab { margin-top: -22px; }
  .bottom-nav .fab span:first-child { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: #fff; box-shadow: 0 6px 18px -6px rgba(27,37,89,.55); border: 4px solid var(--surface); }
}

/* ── Surfaces ───────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.panel-h h2, .panel-h h3 { font-size: 1rem; }
.panel-b { padding: 16px 18px 18px; }
.panel + .panel { margin-top: 16px; }
.stack { display: grid; gap: 16px; }
.cols { display: grid; gap: 16px; grid-template-columns: repeat(12, 1fr); }
.c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
@media (max-width: 1060px) { .c4, .c5, .c7, .c8 { grid-column: span 12; } .c6 { grid-column: span 12; } }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); display: grid; gap: 14px; justify-items: center; }
.empty svg { width: 36px; height: 36px; color: var(--faint); }

/* KPIs: one strip, divided — not five floating cards */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 16px; }
.kpi { padding: 16px 18px; border-inline-start: 1px solid var(--line-2); min-width: 0; }
.kpi:first-child { border-inline-start: 0; }
.kpi .v { font-size: 1.55rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .l { font-size: .82rem; color: var(--muted); }
.kpi .d { font-size: .78rem; margin-top: 2px; }
.kpi .d.up { color: var(--ok); } .kpi .d.down { color: var(--danger); }
@media (max-width: 1060px) { .kpis { grid-template-columns: repeat(3, 1fr); } .kpi:nth-child(4) { border-inline-start: 0; } .kpi:nth-child(n+4) { border-top: 1px solid var(--line-2); } }
@media (max-width: 560px) { .kpis { grid-template-columns: 1fr 1fr; } .kpi { border-inline-start: 0 !important; border-top: 1px solid var(--line-2); } .kpi:nth-child(-n+2) { border-top: 0; } .kpi:nth-child(even) { border-inline-start: 1px solid var(--line-2) !important; } .kpi:last-child:nth-child(odd) { grid-column: span 2; } .kpi .v { font-size: 1.3rem; } }

/* Lists & tables */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); min-width: 0; }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .s { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: start; font-weight: 500; font-size: .8rem; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--sunken); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover td { background: var(--sunken); }
.tbl .r { text-align: end; }
.tbl tr:last-child td { border-bottom: 0; }
@media (max-width: 700px) { .tbl .hide-sm { display: none; } }

.av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: .85rem; flex: none; background: var(--brand-tint); color: var(--brand-ink); }
.av.sq { border-radius: 10px; }
.pts { font-weight: 600; font-variant-numeric: tabular-nums; }
.pos { color: var(--ok); } .neg { color: var(--danger); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; top: 8px; bottom: 8px; inset-inline-start: 15px; width: 2px; background: var(--line-2); }
.timeline li { position: relative; display: flex; gap: 14px; padding: 8px 0; }
.timeline .ic { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line); flex: none; }
.timeline .ic svg { width: 15px; height: 15px; }
.timeline .ic.purchase { border-color: var(--brand); color: var(--brand); }
.timeline .ic.redeem { border-color: var(--saffron); color: #A66B12; }
.timeline .ic.join { background: var(--brand); border-color: var(--brand); color: #fff; }
.timeline .ic.tier { background: var(--saffron); border-color: var(--saffron); color: #fff; }
.timeline .body { flex: 1; min-width: 0; padding-top: 4px; }

/* Charts */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font: 400 11px var(--font); fill: var(--muted); }
.chart .grid { stroke: var(--line-2); }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(80px, 140px) 1fr auto; gap: 10px; align-items: center; font-size: .88rem; }
.bar-row .track { height: 10px; background: var(--sunken); border-radius: 99px; overflow: hidden; }
.bar-row .fill { height: 100%; background: var(--brand); border-radius: 99px; }

/* Modal & toast */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(18,22,30,.45); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: 0 30px 60px -20px rgba(0,0,0,.35); animation: rise .18s ease-out; }
.modal.wide { width: min(820px, 100%); }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 4px; }
.modal-b { padding: 14px 20px 20px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--line-2); position: sticky; bottom: 0; background: var(--surface); }
@media (max-width: 560px) { .modal-back { place-items: end stretch; padding: 0; } .modal { border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 92vh; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.toasts { position: fixed; z-index: 200; bottom: 22px; inset-inline-start: 50%; transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; }
[dir=rtl] .toasts { transform: translateX(50%); }
.toast { pointer-events: auto; padding: 11px 16px; border-radius: var(--r-sm); background: var(--ink); color: var(--surface); font-size: .92rem; box-shadow: var(--shadow); animation: rise .18s; max-width: min(92vw, 460px); }
.toast.bad { background: var(--danger); color: #fff; }
@media (max-width: 880px) { .toasts { bottom: 96px; } }

/* ── Loyalty card (the one bold thing) ──────────────── */
.lcard { --cb: #0F6E5C; --cs: #E8A33D; --ct: #fff; --cw: 360px;
  width: min(var(--cw), 100%); border-radius: 22px; overflow: hidden; color: var(--ct); background: #fff;
  box-shadow: 0 1px 1px rgba(0,0,0,.05), 0 22px 44px -22px rgba(0,0,0,.45); position: relative; isolation: isolate; font-family: var(--font); text-align: start; }
.lcard .face { position: relative; padding: 18px 20px 20px; background: var(--cb); min-height: 220px; display: flex; flex-direction: column; gap: 14px; }
.lcard.st-gradient .face { background: linear-gradient(145deg, var(--cb) 0%, color-mix(in srgb, var(--cb) 70%, var(--cs)) 120%); }
.lcard.st-gradient .face::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 80% at 100% 0%, rgba(255,255,255,.18), transparent 55%); pointer-events: none; }
.lcard.st-split .face { background: linear-gradient(to bottom, var(--cb) 0 58%, var(--cs) 58% 100%); }
.lcard.st-minimal { --ct: #1D2433; }
.lcard.st-minimal .face { background: #fff; border-bottom: 0; }
.lcard.st-minimal .face::before { content: ''; position: absolute; inset-inline: 0; top: 0; height: 6px; background: var(--cb); }
.lcard.st-minimal .tier-b { background: var(--cb); color: #fff; }
.lcard .cover { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .28; mix-blend-mode: luminosity; z-index: 0; }
.lcard .face > * { position: relative; z-index: 1; }
.lcard .top { display: flex; align-items: center; gap: 12px; }
.lcard .logo { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.95); object-fit: contain; flex: none; display: grid; place-items: center; overflow: hidden; }
.lcard .logo img { width: 100%; height: 100%; object-fit: cover; }
.lcard .logo svg { width: 24px; height: 24px; color: var(--cb); }
.lcard .names { min-width: 0; flex: 1; }
.lcard .names b { display: block; font-size: 1.02rem; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcard .names small { display: block; font-size: .78rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcard .hdr-field { text-align: end; }
.lcard .hdr-field small { display: block; font-size: .68rem; opacity: .75; }
.lcard .hdr-field b { font-size: .95rem; font-variant-numeric: tabular-nums; }
.lcard .balance { display: grid; gap: 2px; margin-top: auto; }
.lcard .balance .big { font-size: 3rem; font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
[dir=rtl] .lcard .balance .big { text-align: right; }
.lcard .balance .unit { font-size: .9rem; opacity: .85; }
.lcard.ly-centered .top { flex-direction: column; text-align: center; }
.lcard.ly-centered .names b, .lcard.ly-centered .names small { white-space: normal; }
.lcard.ly-centered .hdr-field { display: none; }
.lcard.ly-centered .balance { justify-items: center; text-align: center; }
.lcard.ly-centered .balance .big { text-align: center !important; }
.lcard .fields { display: flex; gap: 16px; font-size: .8rem; }
.lcard .fields > div { min-width: 0; }
.lcard .fields small { display: block; opacity: .72; font-size: .68rem; }
.lcard .fields b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.lcard .tier-b { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; background: rgba(255,255,255,.2); font-size: .74rem; font-weight: 600; backdrop-filter: blur(4px); }
.lcard .tier-b i { width: 7px; height: 7px; border-radius: 50%; background: var(--tc, #fff); box-shadow: 0 0 0 1.5px rgba(255,255,255,.7); }
.lcard .stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: auto; }
.lcard .stamps span { aspect-ratio: 1; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--ct) 55%, transparent); display: grid; place-items: center; }
.lcard .stamps span.on { border: 0; background: var(--cs); color: var(--cb); }
.lcard .stamps span.on svg { width: 55%; height: 55%; }
.lcard .stamps span.gift { border-style: solid; }
.lcard .stamps span.gift svg { width: 50%; height: 50%; opacity: .8; }
.lcard .stamps span.gift { position: relative; }
.lcard .stamps span.gift.ready { box-shadow: 0 0 0 3px var(--ct); animation: giftpulse 1.6s ease-in-out infinite; }
.lcard .stamps span.gift.ready svg { opacity: 1; }
.lcard .stamps span.gift em { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px; background: var(--ct); color: var(--cb); font: 700 .7rem/22px var(--font); font-style: normal; text-align: center; }
@keyframes giftpulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--ct) 35%, transparent); } }
/* perforation between the branded face and the scan strip */
.lcard .tear { position: relative; height: 0; border-top: 2px dashed rgba(0,0,0,.12); z-index: 2; }
.lcard .tear::before, .lcard .tear::after { content: ''; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--notch, var(--bg)); }
.lcard .tear::before { left: -10px; } .lcard .tear::after { right: -10px; }
.lcard .code { background: #fff; color: #1D2433; padding: 16px 20px 18px; display: grid; justify-items: center; gap: 8px; }
.lcard .code .qr { width: 132px; height: 132px; }
.lcard .code .qr svg, .lcard .code .bc svg { width: 100%; height: 100%; display: block; }
.lcard .code .bc { width: 100%; max-width: 280px; height: 70px; }
.lcard .code small { font-size: .74rem; color: #687184; letter-spacing: .06em; direction: ltr; }
.lcard .code .rw { font-size: .8rem; font-weight: 600; color: #0F6E5C; }
.lcard.mini { --cw: 300px; }
.lcard.mini .face { min-height: 190px; }
.lcard.mini .balance .big { font-size: 2.4rem; }

/* Phone frame for previews */
.phone { width: 340px; max-width: 100%; margin-inline: auto; padding: 14px; border-radius: 40px; background: var(--sunken); border: 1px solid var(--line); }
.phone .lcard { --notch: var(--sunken); }

/* ── Checkout ───────────────────────────────────────── */
.co-wrap { max-width: 640px; margin-inline: auto; }
.co-find { display: flex; gap: 8px; }
.co-find .input { min-height: 56px; font-size: 1.1rem; }
.co-find .btn { min-height: 56px; }
.co-customer { display: flex; gap: 14px; align-items: center; }
.co-customer .av { width: 52px; height: 52px; font-size: 1.1rem; }
.co-customer .bal { margin-inline-start: auto; text-align: end; }
.co-customer .bal b { font-size: 1.6rem; display: block; line-height: 1.1; }
.co-result { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 26px 18px; }
.co-result .burst { width: 82px; height: 82px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 1.35rem; font-weight: 700; animation: pop .35s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.unlock { padding: 10px 14px; border-radius: var(--r-sm); background: var(--saffron-tint); color: #7A4F0C; font-weight: 500; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .unlock { color: #F1C77E; } }
.scan-box { border-radius: var(--r-md); overflow: hidden; background: #000; }
.scan-box video { width: 100% !important; display: block; }
.keypad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.keypad button { min-height: 44px; border: 1px solid var(--line); background: var(--sunken); border-radius: var(--r-sm); font: 500 .9rem var(--font); color: var(--ink-2); cursor: pointer; }
.suggest { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); margin-top: 6px; overflow: hidden; }
.suggest button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-top: 1px solid var(--line-2); background: none; font: inherit; color: inherit; text-align: start; cursor: pointer; }
.suggest button:first-child { border-top: 0; }
.suggest button:hover, .suggest button:focus { background: var(--sunken); }

/* ── Designer ───────────────────────────────────────── */
.designer { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 24px; align-items: start; }
.designer .preview { position: sticky; top: 24px; display: grid; gap: 14px; justify-items: center; padding: 28px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 16px 16px; }
@media (max-width: 960px) { .designer { grid-template-columns: 1fr; } .designer .preview { position: static; order: -1; } }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatches button[aria-pressed=true] { box-shadow: 0 0 0 2px var(--ink); }
.icon-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.icon-pick button { width: 42px; height: 42px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.icon-pick button[aria-pressed=true] { border-color: var(--brand); background: var(--brand-tint); color: var(--brand); }
.icon-pick svg { width: 20px; height: 20px; }

/* ── Onboarding & auth ──────────────────────────────── */
.ob { min-height: 100vh; display: grid; grid-template-columns: 1fr minmax(320px, 46%); }
.ob-form { padding: 36px clamp(20px, 5vw, 72px); display: flex; flex-direction: column; gap: 22px; max-width: 680px; }
.ob-side { background: var(--surface); border-inline-start: 1px solid var(--line); display: grid; place-items: center; padding: 32px; position: sticky; top: 0; height: 100vh;
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 18px 18px; }
.progress { display: flex; gap: 6px; }
.progress i { flex: 1; height: 4px; border-radius: 99px; background: var(--line); }
.progress i.on { background: var(--brand); }
.ob-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; }
@media (max-width: 880px) { .ob { grid-template-columns: 1fr; } .ob-side { position: static; height: auto; order: -1; border: 0; border-bottom: 1px solid var(--line); padding: 20px; } .ob-form { padding: 22px 18px 32px; } }
.logo-drop { display: flex; align-items: center; gap: 16px; }
.logo-drop .prev { width: 84px; height: 84px; border-radius: 20px; border: 1.5px dashed var(--faint); display: grid; place-items: center; overflow: hidden; background: var(--surface); color: var(--faint); }
.logo-drop .prev img { width: 100%; height: 100%; object-fit: cover; }

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 1fr); }
.auth-pitch { padding: clamp(28px, 6vw, 80px); display: flex; flex-direction: column; gap: 28px; background: var(--brand); color: #fff; position: relative; overflow: hidden; }
.auth-pitch .brandmark { color: #fff; padding: 0; }
.auth-pitch h1 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 700; line-height: 1.15; max-width: 15ch; }
.auth-pitch p { opacity: .85; max-width: 44ch; font-size: 1.05rem; }
.auth-pitch .cards { position: relative; height: 330px; margin-top: auto; }
.auth-pitch .cards .lcard { position: absolute; --notch: var(--brand); }
.auth-pitch .cards .lcard:nth-child(1) { inset-inline-start: 0; top: 30px; transform: rotate(-6deg); }
.auth-pitch .cards .lcard:nth-child(2) { inset-inline-start: 190px; top: 0; transform: rotate(5deg); }
.auth-form { padding: clamp(24px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; gap: 22px; max-width: 520px; width: 100%; margin-inline: auto; }
.demo-list { display: grid; gap: 8px; }
.demo-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); text-align: start; font: inherit; color: inherit; cursor: pointer; }
.demo-list button:hover { border-color: var(--brand); }
.demo-list b { font-weight: 600; font-size: .92rem; }
.demo-list small { display: block; color: var(--muted); font-size: .8rem; }
.lang-btn { position: absolute; top: 18px; inset-inline-end: 18px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-pitch { padding: 24px 20px; gap: 14px; } .auth-pitch .cards { display: none; } .auth-pitch h1 { font-size: 1.7rem; } }

/* ── Customer app ───────────────────────────────────── */
.cust { --cb: #0F6E5C; min-height: 100vh; max-width: 480px; margin-inline: auto; background: var(--bg); padding-bottom: 92px; }
.cust-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px; }
.cust-head img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }
.cust-head b { flex: 1; font-weight: 600; }
.cust-body { padding: 10px 18px 24px; display: grid; gap: 16px; }
.cust .lcard { --cw: 444px; margin-inline: auto; }
.cust-nav { position: fixed; bottom: 0; inset-inline: 0; z-index: 20; display: flex; justify-content: center; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); }
.cust-nav > div { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; max-width: 480px; }
.cust-nav button { display: grid; justify-items: center; gap: 2px; padding: 6px 0; border: 0; background: none; font: 500 .74rem var(--font); color: var(--muted); cursor: pointer; position: relative; }
.cust-nav button svg { width: 22px; height: 22px; }
.cust-nav button[aria-current=page] { color: var(--cb); }
.cust-nav .badge { position: absolute; top: 2px; inset-inline-start: 55%; min-width: 17px; height: 17px; border-radius: 99px; background: var(--saffron); color: #fff; font-size: .68rem; display: grid; place-items: center; padding: 0 4px; }
.progress-line { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress-line i { display: block; height: 100%; background: var(--cb); border-radius: 99px; }
.reward-row { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.reward-row .ri { width: 48px; height: 48px; border-radius: 12px; background: color-mix(in srgb, var(--cb) 12%, transparent); color: var(--cb); display: grid; place-items: center; flex: none; }
.reward-row .ri svg { width: 24px; height: 24px; }
.reward-row.locked { opacity: .78; }
.reward-row.locked .ri { background: var(--sunken); color: var(--faint); }
.cust .btn.primary { --b: var(--cb); --bd: var(--cb); --c: #fff; }
.code-big { font-size: 2.1rem; font-weight: 700; letter-spacing: .08em; text-align: center; direction: ltr; font-variant-numeric: tabular-nums; }
.join-hero { padding: 30px 22px 22px; text-align: center; display: grid; gap: 10px; justify-items: center; color: #fff; background: var(--cb); border-radius: 0 0 28px 28px; }
.join-hero img { width: 76px; height: 76px; border-radius: 20px; background: #fff; object-fit: cover; box-shadow: 0 8px 24px -8px rgba(0,0,0,.4); }
.join-hero h1 { font-size: 1.5rem; }
.join-hero p { opacity: .88; }

/* ── Poster (print) ─────────────────────────────────── */
.poster { width: 100%; max-width: 420px; aspect-ratio: 1 / 1.414; margin-inline: auto; background: var(--pb, #0F6E5C); color: #fff; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; padding: 8% 8% 7%; box-shadow: var(--shadow); }
.poster img { width: 22%; aspect-ratio: 1; border-radius: 18%; background: #fff; object-fit: cover; }
.poster h2 { font-size: clamp(1.4rem, 5vw, 2.1rem); font-weight: 700; line-height: 1.15; }
.poster .qrbox { background: #fff; padding: 5%; border-radius: 6%; width: 62%; }
.poster .qrbox svg { width: 100%; height: auto; display: block; }
.poster p { font-size: 1rem; opacity: .9; }
.poster small { opacity: .75; direction: ltr; font-size: .78rem; }
@media print {
  body * { visibility: hidden !important; }
  .print-me, .print-me * { visibility: visible !important; }
  .print-me { position: fixed; inset: 0; margin: 0; max-width: none; border-radius: 0; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4; margin: 0; }
}

/* misc */
.spinner { width: 22px; height: 22px; border: 2.5px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center-load { min-height: 60vh; display: grid; place-items: center; }
.kbd { font-size: .78rem; padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--sunken); }
.hr { height: 1px; background: var(--line-2); margin: 4px 0; }
.note { padding: 12px 14px; border-radius: var(--r-sm); background: var(--sunken); color: var(--ink-2); font-size: .88rem; display: flex; gap: 10px; }
.note svg { width: 18px; height: 18px; flex: none; color: var(--brand); margin-top: 2px; }
.rule-row { display: grid; grid-template-columns: 1.4fr 1fr .8fr auto; gap: 8px; align-items: center; }
@media (max-width: 560px) { .rule-row { grid-template-columns: 1fr 1fr; } }
.tier-row { display: grid; grid-template-columns: 44px 1fr 1fr 1fr 120px auto; gap: 8px; align-items: center; }
.tier-row input[type=color] { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: none; }
@media (max-width: 760px) { .tier-row { grid-template-columns: 44px 1fr 1fr; } .tier-row .tb { grid-column: span 2; } }
.list .t, .list .s { display: block; }
.demo-list svg { width: 22px; height: 22px; flex: none; color: var(--brand); }
.demo-list .grow { flex: 1; min-width: 0; }
/* default icon size; contexts above (.btn, .nav, .choice…) override */
svg.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.av svg.i { width: 52%; height: 52%; }
.unlock { display: inline-flex; align-items: center; gap: 8px; }

/* ── Subscription banner ────────────────────────────── */
.sub-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px clamp(16px, 3vw, 40px); background: var(--brand-tint); color: var(--brand-ink); font-size: .9rem; border-bottom: 1px solid var(--line); }
.sub-bar svg { width: 18px; height: 18px; flex: none; }
.sub-bar span { flex: 1; min-width: 180px; }
.sub-bar.warn { background: var(--saffron-tint); color: #7A4F0C; }
.sub-bar.bad { background: var(--danger-tint); color: var(--danger); }
.sub-bar.info { background: var(--sunken); color: var(--ink-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sub-bar.warn { color: #F1C77E; } }
.plan-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.plan { border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 16px; display: grid; gap: 4px; background: var(--surface); }
.plan.cur { border-color: var(--brand); background: var(--brand-tint); }
.plan .price { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.payinfo { white-space: pre-wrap; padding: 14px 16px; border-radius: var(--r-sm); background: var(--sunken); border: 1px dashed var(--line); line-height: 1.7; }

/* ── My cards (customer wallet) ─────────────────────── */
.wdot { width: 12px; height: 12px; border-radius: 50%; background: var(--saffron); box-shadow: 0 0 0 4px var(--saffron-tint); flex: none; margin-inline: 4px; }
.wallet { display: grid; gap: 12px; }
.wtile { --cb: #0F6E5C; --cs: #E8A33D; --ct: #fff;
  position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "logo names bal" "logo ready bal";
  column-gap: 12px; row-gap: 2px; align-items: center; min-height: 92px; padding: 16px 18px; border-radius: 20px;
  color: var(--ct); background: var(--cb); text-decoration: none !important; overflow: hidden; isolation: isolate;
  box-shadow: 0 1px 1px rgba(0,0,0,.05), 0 14px 28px -18px rgba(0,0,0,.55); transition: transform .12s; }
.wtile.st-gradient { background: linear-gradient(145deg, var(--cb) 0%, color-mix(in srgb, var(--cb) 70%, var(--cs)) 130%); }
.wtile.st-split { background: linear-gradient(to bottom, var(--cb) 0 70%, var(--cs) 70% 100%); }
.wtile::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.16), transparent 55%); }
a.wtile:active { transform: scale(.985); }
.wtile .wlogo { grid-area: logo; width: 48px; height: 48px; border-radius: 13px; background: rgba(255,255,255,.95); display: grid; place-items: center; overflow: hidden; }
.wtile .wlogo img { width: 100%; height: 100%; object-fit: cover; }
.wtile .wlogo svg { width: 26px; height: 26px; color: var(--cb); }
.wtile .wnames { grid-area: names; min-width: 0; align-self: end; }
.wtile .wnames b { display: block; font-weight: 600; font-size: 1.02rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wtile .wnames small { display: block; font-size: .78rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wtile .wbal { grid-area: bal; text-align: end; line-height: 1.05; }
.wtile .wbal b { display: block; font-size: 1.75rem; font-weight: 700; letter-spacing: -.01em; direction: ltr; }
.wtile .wbal .of { font-size: .55em; font-weight: 500; opacity: .75; }
.wtile .wbal small { font-size: .74rem; opacity: .8; }
.wtile .wready { grid-area: ready; justify-self: start; align-self: start; display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 2px 9px; border-radius: 99px;
  background: var(--saffron); color: #3B2604; font-size: .74rem; font-weight: 600; }
.wtile .wready svg { width: 13px; height: 13px; }
.wtile .wremove { position: absolute; top: 8px; inset-inline-end: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; display: grid; place-items: center; cursor: pointer; }
.wtile .wremove svg { width: 16px; height: 16px; }
.wtile.skel { background: var(--line-2); box-shadow: none; animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .55; } }
.cust-head .btn.icon { margin-inline-end: -6px; }
[hidden] { display: none !important; }
.empty svg.i { width: 36px; height: 36px; }

/* ── Legal pages ────────────────────────────────────── */
.legal { max-width: 760px; margin-inline: auto; padding: 20px 20px 64px; }
.legal-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.legal-head .brandmark { color: var(--ink); text-decoration: none; }
.legal article { line-height: 1.8; }
.legal h1 { font-size: 1.8rem; margin-bottom: 4px; }
.legal .lead { font-size: 1.05rem; margin: 18px 0 22px; color: var(--ink-2); }
.legal h2 { font-size: 1.1rem; margin: 30px 0 8px; scroll-margin-top: 16px; }
.legal p, .legal li { max-width: 70ch; }
.legal ul { padding-inline-start: 1.3em; margin: 6px 0; }
.legal li { margin: 6px 0; }
.legal .toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 18px; }
.legal .toc ol { margin: 0; padding-inline-start: 1.4em; columns: 2; column-gap: 28px; }
.legal .toc li { margin: 3px 0; break-inside: avoid; }
@media (max-width: 560px) { .legal .toc ol { columns: 1; } }
.legal-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; font-size: .82rem; }
.legal-links a { color: var(--muted); }

/* Google Wallet button */
.gw { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 4px 0 2px; }
.gw-link { display: inline-flex; text-decoration: none; }
.gw-link img { height: 48px; width: auto; display: block; }
.gw-btn { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 999px; background: #1F1F1F; color: #fff; font-weight: 600; font-size: 15px; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.gw-btn svg { width: 20px; height: 20px; }
.gw-link:active .gw-btn { transform: scale(.98); }
.gw p { text-align: center; margin: 0; display: flex; align-items: center; gap: 4px; }
.gw p svg { width: 14px; height: 14px; }

/* Public home page */
.home { max-width: 1080px; margin-inline: auto; padding: 16px 16px 48px; }
.home-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 18px; }
.home-top .brandmark { padding: 0; text-decoration: none; }
.home-top nav { display: flex; gap: 8px; }
.home-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 28px 0 40px; }
.home-hero h1 { font-size: clamp(1.8rem, 4.2vw, 2.8rem); line-height: 1.15; margin: 0 0 14px; letter-spacing: -.01em; }
.home-lead { font-size: 1.08rem; line-height: 1.8; color: var(--ink-2); margin: 0 0 22px; }
.home-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.home-card { max-width: 360px; width: 100%; justify-self: center; transform: rotate(-2deg); }
[dir="rtl"] .home-card { transform: rotate(2deg); }
.home-sec { padding: 30px 0; border-top: 1px solid var(--line); }
.home-sec h2 { font-size: 1.35rem; margin: 0 0 18px; }
.home-sec p { line-height: 1.8; color: var(--ink-2); max-width: 760px; }
.home-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.home-steps li, .home-feats > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; position: relative; }
.home-steps .n { position: absolute; top: 14px; inset-inline-end: 16px; font-weight: 700; color: var(--faint); }
.home-steps svg, .home-feats svg { width: 26px; height: 26px; color: var(--brand); }
.home-steps h3, .home-feats h3 { font-size: 1rem; margin: 10px 0 6px; }
.home-steps p, .home-feats p { margin: 0; font-size: .93rem; line-height: 1.7; color: var(--muted); }
.home-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.home-demo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 12px; }
.home-demo-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--r-md); background: var(--brand-tint); color: var(--ink); text-decoration: none; border: 1px solid transparent; }
.home-demo-card:hover { border-color: var(--brand); }
.home-demo-card svg { width: 24px; height: 24px; color: var(--brand); }
.home-demo-card span { font-size: .9rem; color: var(--ink-2); line-height: 1.7; }
.home-demo-card code { background: var(--surface); padding: 1px 6px; border-radius: 6px; }
.home-foot { border-top: 1px solid var(--line); padding-top: 24px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.home-foot .btn svg { width: 18px; height: 18px; }
.home-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: .92rem; color: var(--muted); }
.home-links a { color: var(--ink-2); }
@media (max-width: 860px) {
  .home-hero { grid-template-columns: 1fr; gap: 28px; padding-top: 12px; }
  .home-card { max-width: 320px; }
  .home-steps { grid-template-columns: repeat(2, 1fr); }
  .home-feats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .home-steps, .home-feats, .home-demo-grid { grid-template-columns: 1fr; }
  .home-cta .btn { flex: 1 1 100%; justify-content: center; }
}
.home-foot .btn { white-space: normal; flex-wrap: wrap; max-width: 100%; height: auto; min-height: 44px; text-align: start; }
.home, .home * { min-width: 0; }
@media (max-width: 520px) { .home-card, [dir="rtl"] .home-card { transform: none; } }

.home-logo { display: inline-flex; align-items: center; }
.home-logo img { height: 34px; width: auto; display: block; }
.home-tag { margin: 0 0 10px; font-weight: 700; font-size: 1rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-pitch .brandmark .dot { background-image: url(../img/mark-white.svg); }
.cust-head .wdot { width: 24px !important; height: 24px !important; border-radius: 0 !important; box-shadow: none !important; background: url(../img/mark.svg) center / contain no-repeat !important; flex: none; }
