/* White Friday Experience Card (resources/views/white-friday). Values from Figma pfdLBBP29N2rn9vaX7P0TP (mobile, 390 wide).
   --serif-scale and --book come from partials/fonts (lookalike fonts until the brand files are added).
   Logical properties (inline-start/end) so the Arabic page only flips dir. */

:root {
    --ink: #0b0b0b; --paper: #fff; --muted: #77746e; --subtle: #a6a39d; --stone: #d9d6cf; --rule-dark: #2e2e2e;
    --error: #b3261e; --line-soft: #e3e3e3; --radio-off: #767676; --text-primary: #111; --applepay: #121216;
    --serif: "PP Editorial New", "Instrument Serif", Georgia, serif;
    --sans: "PP Neue Montreal", "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --arabic: "Noto Sans Arabic", var(--sans);
    --pass-logo: 1.07; /* Card Ready logos vs the Choose card's */
}
[dir="rtl"] { --sans: "Noto Sans Arabic", "PP Neue Montreal", "Inter Tight", sans-serif; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--ink); color: var(--ink); font-family: var(--sans); font-weight: var(--book); font-size: 16px; line-height: 1.6;
    -webkit-font-smoothing: antialiased; }
body.sheet-open { overflow: hidden; }
p, h1, h2 { margin: 0; }
a { color: inherit; }
button, input, select { font-family: inherit; font-weight: var(--book); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.hidden { display: none !important; }

.page { position: relative; max-width: 480px; min-height: 100vh; margin: 0 auto; background: var(--ink); }
.step { display: flex; flex-direction: column; min-height: 100vh; }
.step-checkout { background: var(--paper); }

/* Type (Figma text styles) */
.display-xl { font-family: var(--serif); font-weight: 400; font-size: calc(40px * var(--serif-scale)); line-height: 1.04; letter-spacing: -.4px; }
.display-l { font-family: var(--serif); font-weight: 400; font-size: calc(30px * var(--serif-scale)); line-height: 1.12; letter-spacing: -.15px; }
.display-m { font-family: var(--serif); font-weight: 400; font-size: calc(24px * var(--serif-scale)); line-height: 1.2; }
.display-s { font-family: var(--serif); font-weight: 400; font-size: calc(20px * var(--serif-scale)); line-height: 1.24; }
.body { font-size: 16px; line-height: 1.6; letter-spacing: -.08px; }
.body-s, .link-btn { font-size: 12px; line-height: 1.5; letter-spacing: -.036px; }
/* Review notes 2026-11-17 (Figma "Test" page): small checkout/success text at 16px */
.helper, .helper .link-btn, #pay-note, .your-card-text .body-s, #change-offer, .ready-email { font-size: 16px; line-height: 1.5; letter-spacing: -.08px; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.center { text-align: center; }
em { font-style: italic; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; }
.topbar > img { display: block; width: 83px; height: 40px; }
.lang-link { padding: 4px 8px; color: var(--paper); font-family: var(--arabic); font-weight: 700; font-size: 16px; line-height: 24px; text-decoration: none; }

/* Buttons and links */
.btn { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; height: 56px; padding: 0 20px; border: 0; border-radius: 0;
    font-weight: 500; font-size: 16px; line-height: 1.2; letter-spacing: -.08px; cursor: pointer; }
.btn-paper { height: 52px; background: var(--paper); color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:disabled { background: var(--stone); color: var(--muted); cursor: default; }
.btn-applepay { gap: 8px; padding-inline-end: 24px; background: var(--applepay); color: var(--paper); font-size: 20px; line-height: 1.3; }
.btn-applepay img { display: block; width: 20px; height: 24px; }
.link-btn { padding: 0; border: 0; background: none; color: var(--ink); text-decoration: underline; white-space: nowrap; cursor: pointer; }
.link-paper { color: var(--paper); }
.btn:focus-visible, .link-btn:focus-visible, .offer:focus-visible, .toggle-option:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ---------- Step 1: Choose ---------- */
.choose { padding: 20px 20px 0; color: var(--paper); }
.hero { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 52px 0 46px; text-align: center; }
.hero .display-xl { max-width: 314px; }
.hero-text { opacity: .85; }
.choose-body { display: flex; flex-direction: column; gap: 32px; }

/* Card preview */
.balance-card { position: relative; height: 200px; overflow: hidden; border-radius: 16px; color: var(--ink);
    background: linear-gradient(-42.35deg, #fff 23.296%, #f9f7f5 50.753%, #ebe8e3 69.058%); box-shadow: 0 16px 32px -8px rgba(0, 0, 0, .18); }
.balance-label { position: absolute; top: 20px; inset-inline-start: 20px; color: var(--muted); font-family: var(--serif); font-size: calc(14px * var(--serif-scale)); line-height: 1.24; }
.balance-amount { position: absolute; top: 43px; inset-inline-start: 20px; font-weight: 700; font-size: 40px; line-height: 1.04; letter-spacing: -.4px; white-space: nowrap; }
.seal { position: absolute; top: 31.8px; inset-inline-end: 21.85px; display: flex; align-items: center; justify-content: center; width: 72.965px; height: 72.965px; }
.seal-inner { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 64px; height: 64px; overflow: hidden;
    border: 1px solid #000; border-radius: 999px; background: var(--stone); transform: rotate(8.72deg);
    box-shadow: inset -5px -2px 10px rgba(0, 0, 0, .05), inset 0 4px 10px rgba(255, 255, 255, .8); }
.seal-pct { font-family: var(--serif); font-style: italic; font-size: calc(19px * var(--serif-scale)); line-height: normal; }
.seal-word { color: #0b0b0b; font-weight: 500; font-size: 12px; line-height: normal; }
.brand-strip { position: absolute; inset-inline: 0; bottom: 0; display: flex; align-items: center; height: 46px; padding: 10px; padding-inline-end: 14px; background: #fff; }
.brand-logos { display: flex; flex: 1; align-items: center; justify-content: space-between; min-width: 0; padding: 2px 6px 0; opacity: .5; }
.brand-logos img { display: block; object-fit: contain; }
.brand-text { font-family: Arimo, Arial, sans-serif; font-weight: 700; font-size: 7.969px; line-height: normal; letter-spacing: .478px; color: var(--ink); }

/* Country toggle + offers */
.picker { display: flex; flex-direction: column; gap: 12px; }
.picker-head { display: flex; align-items: center; justify-content: space-between; }
.toggle { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.toggle-option { height: 32px; padding: 0 12px 0 10px; border: 0; border-radius: 999px; background: none; color: var(--paper);
    font-weight: 500; font-size: 12px; line-height: 1.2; letter-spacing: -.024px; cursor: pointer; }
.toggle-option.is-active { background: var(--paper); color: var(--ink); }
.offers { display: flex; flex-wrap: wrap; gap: 10px; } /* wraps only with staff test offers (5 buttons) */
.offer { flex: 1; min-width: max-content;padding: 11px; border: 1px solid transparent; border-radius: 0; background: rgba(255, 255, 255, .1); color: var(--paper);
    font-weight: 500; font-size: 16px; line-height: 1.2; letter-spacing: -.08px; white-space: nowrap; cursor: pointer;
    box-shadow: inset 8px 8px 20px rgba(255, 255, 255, .05); filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .5)); }
.offer.is-active { border-color: var(--paper); background: rgba(255, 255, 255, .3); }

.ctas { display: flex; flex-direction: column; gap: 8px; }
.learn-more { display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; padding: 0; border: 0; background: none; color: var(--paper);
    font-weight: 700; font-size: 16px; line-height: 1.46; letter-spacing: -.08px; text-decoration: underline; cursor: pointer; }

/* ---------- Step 2: Checkout ---------- */
.checkout-header { display: flex; flex-direction: column; gap: 40px; padding: 20px; background: var(--ink); color: var(--paper); }
.your-card { display: flex; align-items: flex-end; gap: 12px; }
.your-card-text { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
#change-offer { font-weight: 700; }
.summary { display: none; } /* desktop only */
.checkout { display: flex; flex-direction: column; gap: 40px; padding: 48px 20px; }
.group { display: flex; flex-direction: column; gap: 16px; }
.fields { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
fieldset.lockable { transition: opacity .2s; }
fieldset.lockable:disabled { opacity: .5; }

/* Inputs */
.input { display: block; width: 100%; height: 52px; padding: 0 16px; border: 1px solid var(--muted); border-radius: 0; background: var(--paper); color: var(--ink);
    font-size: 16px; line-height: 1.6; letter-spacing: -.08px; -webkit-appearance: none; appearance: none; }
.input::placeholder { color: var(--muted); opacity: 1; }
.input:disabled { opacity: 1; } /* iOS Safari fades disabled inputs on top of the fieldset's .5 */
.input:focus, .code-box:focus-visible, [aria-expanded="true"].code-box, [aria-expanded="true"].combo-trigger { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 .5px var(--ink); }
.select { position: relative; }
.select .input { padding-inline-end: 44px; cursor: pointer; }
.select .input:invalid { color: var(--muted); }
.select .input option { color: var(--ink); }
.select-chev { position: absolute; top: 50%; inset-inline-end: 19px; width: 10.12px; height: 6.12px; margin-top: -3.06px; pointer-events: none; }
.field.is-invalid .input { border-color: var(--error); box-shadow: none; }

/* Helper lines (hint, error, verified) */
.helper { display: flex; align-items: center; gap: 6px; }
.helper > img { display: block; flex: none; width: 16px; height: 16px; }
.helper.is-hint { color: var(--muted); }
.helper.is-error { color: var(--error); }
.helper .check-sm { width: 16px; height: 16px; padding: 3.27px 1.61px 3.28px; object-fit: contain; }

/* Phone field: code + number; its state class picks the line under it */
.phone { display: flex; gap: 8px; }
.code-box { position: relative; display: flex; flex: none; align-items: center; gap: 6px; width: 104px; height: 52px; padding: 0 10px 0 12px;
    border: 1px solid var(--muted); background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.6; letter-spacing: -.08px; text-align: start; cursor: pointer; }
.code-box:disabled { cursor: default; }
.code-box .flag { display: block; width: 22px; height: 16px; object-fit: cover; }
.code-box .chev { display: block; width: 16px; height: 16px; padding: 4.94px 2.94px; }
.number { position: relative; flex: 1; min-width: 0; }
.number .tick { position: absolute; top: 50%; inset-inline-end: 16px; width: 20px; height: 20px; margin-top: -10px; padding: 4.36px 2.27px 4.35px; display: none; }
.phone-field .is-error, .phone-field .is-verified { display: none; }
.phone-field.is-invalid .is-hint, .phone-field.is-verified .is-hint { display: none; }
.phone-field.is-invalid .is-error, .phone-field.is-verified .is-verified { display: flex; }
.phone-field.is-invalid .number .input { border-color: var(--error); box-shadow: none; }
.phone-field.is-verified .number .input { padding-inline-end: 44px; }
.phone-field.is-verified .tick { display: block; }
.phone-field.is-verified .is-verified { color: #000; }

/* Payment method */
.pay-options { display: flex; flex-direction: column; gap: 12px; }
.pay-option { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line-soft); background: var(--paper); cursor: pointer; }
.pay-option:has(input[type="radio"]:checked) { border-color: var(--text-primary); }
.pay-option input[type="radio"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.radio { flex: none; width: 20px; height: 20px; border: 1.5px solid var(--radio-off); border-radius: 10px; background: var(--paper); }
.pay-option input:checked + .radio { border: 6px solid var(--text-primary); }
.pay-option input:focus-visible + .radio { outline: 2px solid var(--ink); outline-offset: 2px; }
.pay-name { flex: 1; min-width: 0; color: var(--text-primary); font-weight: 500; font-size: 14px; line-height: 20px; }
.pay-brands { display: flex; align-items: center; gap: 4px; }
.mark { position: relative; display: block; height: 20px; }
.mark img { position: absolute; display: block; }
.mark-applepay { width: 31.241px; }
.mark-applepay img { inset: 0; width: 100%; height: 100%; }
.mark-mada { width: 52px; }
.mark-mada img { top: 2px; inset-inline-start: 2.007px; }
.mark-visa { width: 44px; }
.mark-visa img { inset: 0; }
.mark-mastercard { width: 27px; }
.mark-mastercard img { top: 3px; inset-inline-start: 2.147px; }
[data-country="uae"] [data-only-country="ksa"] { display: none; }

/* Consent */
.consent { border-top: 1px solid var(--stone); }
.check { display: flex; align-items: flex-start; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--stone); color: #000; font-size: 16px; line-height: 1.5; letter-spacing: -.08px; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 0; border: 1.5px solid var(--ink); border-radius: 0; background: var(--paper);
    -webkit-appearance: none; appearance: none; cursor: pointer; }
.check input:checked { background: var(--ink) url("../images/wallet-gifts/white-friday/icon-check-white.svg") no-repeat center / 12.788px 9.455px; }
.check input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.check.is-invalid input { border-color: var(--error); }
.check-text { display: flex; flex: 1; flex-direction: column; gap: 8px; min-width: 0; }
.check-error { display: none; font-size: 13px; line-height: 19px; }
.check.is-invalid .check-error { display: flex; }
.check u, .check a { text-decoration: underline; }

.submit { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Code sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(11, 11, 11, .55); }
/* --visible-bottom / --visible-height: set by page.js from visualViewport, so the sheet ends where the visible area ends
   (above the iPhone keyboard). 100% = the fixed box's own height, so no window size is assumed */
.sheet { position: fixed; bottom: 0; bottom: max(0px, 100% - var(--visible-bottom, 100%)); left: 50%; z-index: 51; display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 480px;
    max-height: var(--visible-height, 100vh); overflow-y: auto; padding: 24px 20px 34px; background: var(--paper); transform: translateX(-50%); }
.sheet-head { display: flex; align-items: flex-start; gap: 16px; }
.sheet-title { display: flex; flex: 1; flex-direction: column; gap: 8px; min-width: 0; }
.sheet-close { flex: none; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.sheet-close img { display: block; }
.code { display: flex; flex-direction: column; gap: 10px; }
.digits { position: relative; display: flex; gap: 8px; }
.digit { display: flex; flex: 1; align-items: center; justify-content: center; min-width: 0; height: 56px; border: 1px solid var(--muted); background: var(--paper);
    font-family: var(--serif); font-size: calc(32px * var(--serif-scale)); line-height: 1.12; }
.digits.is-focused .digit.is-active { border: 1.5px solid var(--ink); }
.digits.is-focused .digit.is-active:empty::after { content: ""; width: 1.5px; height: 26px; background: var(--ink); animation: wf-blink 1s steps(1) infinite; }
.digits.is-error .digit { border: 1px solid var(--error); }
.digits input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; font-size: 16px; caret-color: transparent; cursor: pointer; }
.digits input:disabled { cursor: default; }
.sheet-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 21px; font-size: 14px; line-height: 1.5; letter-spacing: -.056px; }
.sheet-row .link-btn { font-size: 14px; line-height: 1.5; letter-spacing: -.056px; } /* PM: 12px was too small on phones */
.sheet-row .grow { flex: 1; }
.sheet-row[data-mode="after-lock"] #resend-btn { order: 1; } /* alone at the end, as in the design */
@keyframes wf-blink { 50% { opacity: 0; } }

/* ---------- Country picker (dial code and "Your country"), Figma "Country Picker" ---------- */
.phone, .combo-field { position: relative; }
.combo-trigger { display: flex; align-items: center; padding-inline-end: 44px; text-align: start; cursor: pointer; }
.combo-trigger.is-empty { color: var(--muted); }
.combo-trigger:disabled { cursor: default; }
.combo-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-panel { position: absolute; top: 52px; inset-inline: 0; z-index: 30; display: flex; flex-direction: column; max-height: 360px; overflow: hidden;
    border: 1px solid var(--ink); background: var(--paper); box-shadow: 0 12px 32px rgba(0, 0, 0, .12); font-size: 15px; line-height: normal; }
.combo-panel::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 32px; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff); pointer-events: none; }
.combo-panel.is-empty { padding-bottom: 8px; }
.combo-panel.is-empty::after, .combo-panel.is-short::after { display: none; }
.combo-search { display: flex; flex: none; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-bottom: 1px solid var(--stone); }
.combo-search > img { display: block; flex: none; }
/* 16px, not Figma's 15px: smaller text makes iOS Safari zoom in on focus */
.combo-input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: none; color: var(--ink); font-size: 16px; }
.combo-input::placeholder { color: var(--subtle); opacity: 1; }
.combo-clear { display: flex; flex: none; padding: 0; border: 0; background: none; cursor: pointer; }
.combo-list { display: flex; flex: 1; flex-direction: column; min-height: 0; margin: 0; padding: 4px 0 8px; overflow-y: auto; overscroll-behavior: contain; list-style: none; }
.combo-panel.is-searching .combo-list { padding-top: 0; }
.combo-option { display: flex; flex: none; align-items: center; gap: 12px; height: 48px; padding: 0 16px; cursor: pointer; }
.combo-option.is-active { background: var(--stone); }
.combo-flag { flex: none; font-size: 18px; line-height: 1; }
.combo-flag-img { display: block; flex: none; width: 22px; height: 16px; object-fit: cover; }
.combo-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-name strong { font-weight: 600; }
.combo-code { flex: none; color: var(--muted); }
.combo-check { display: block; flex: none; width: 16px; height: 16px; padding: 3.29px 1.96px 3.96px; visibility: hidden; }
.combo-option[aria-selected="true"] .combo-check { visibility: visible; }
.combo-empty { padding: 24px 16px 16px; font-weight: 500; }

/* ---------- Card option (no Apple Pay on the device: card only) ---------- */
.is-card-only .pay-apple { display: none; }

/* reCAPTCHA under the number until it's verified (Google's box is a fixed 304px wide) */
.captcha { min-height: 78px; }
.phone-field.is-verified .captcha { display: none; }
@media (max-width: 359px) { .captcha { transform: scale(.9); transform-origin: 0 0; } [dir="rtl"] .captcha { transform-origin: 100% 0; } }

/* ---------- Submit: declined banner ---------- */
.label { font-weight: 500; font-size: 16px; line-height: 1.2; letter-spacing: -.08px; }
.pay-error { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--error); background: #faedeb; }
.pay-error > img { display: block; flex: none; }
.pay-error > div { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.pay-error .label { color: var(--error); }
.btn[aria-busy="true"] { cursor: progress; opacity: .7; }
#pay-note.is-error { color: var(--error); }

/* ---------- Sale ended (whole page, as Wallet Gift's ended page) ---------- */
.ended { max-width: 480px; min-height: 100vh; margin: 0 auto; padding: 20px 24px; color: var(--paper); }
.ended img { display: block; width: 92px; height: 44.46px; }
.ended h1 { margin: 0; padding-top: 136px; font-family: var(--serif); font-weight: 400; font-size: calc(44px * var(--serif-scale)); line-height: .87; letter-spacing: -.66px; text-align: center; }
@media (max-width: 359px) { .ended { padding-left: 16px; padding-right: 16px; } .ended h1 { font-size: calc(38px * var(--serif-scale)); } }

/* ---------- Step 3: Card Ready ---------- */
.step-ready { color: var(--paper); }
.ready { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 20px 20px 48px; }
.ready > * { position: relative; z-index: 1; }
.ready > .ready-mark { position: absolute; z-index: 0; top: 520px; inset-inline-start: -40px; width: 560px; height: 138.227px; max-width: none; pointer-events: none; }
.ready-head { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 72px 0 40px; text-align: center; }
.ready-head h1:focus { outline: none; }
.ready-check { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border: 1.2px solid var(--paper); border-radius: 28px; }
.ready-check img { display: block; width: 24px; height: 24px; padding: 4.94px 2.94px 5.94px; }
.pass { display: flex; flex-direction: column; gap: 24px; padding: 28px 20px 24px; background: var(--paper); color: var(--ink); }
.pass-balance { display: flex; flex-direction: column; gap: 18px; }
.pass-logos { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pass-logos img { display: block; object-fit: contain; }
.pass-text { font-family: Arimo, Arial, sans-serif; font-size: 8.5px; line-height: normal; letter-spacing: .51px; }
.pass-rows, .order-rows { margin: 0; }
.pass > .body { font-weight: 500; }
.pass-rows > div, .order-rows > div { display: flex; justify-content: space-between; gap: 16px; font-size: 16px; letter-spacing: -.08px; }
.pass-rows dd, .order-rows dd { margin: 0; text-align: end; }
.pass-rows > div { padding: 12px 0; }
.pass-rows > div + div { border-top: 1px solid var(--stone); }
.pass-rows dt { color: var(--muted); font-weight: 500; line-height: 1.5; }
.pass-rows dd { font-weight: 500; line-height: 1.2; letter-spacing: -.024px; }
.ready-wallet { padding-top: 16px; }
.btn-outline { gap: 10px; border: 1px solid var(--paper); background: var(--ink); color: var(--paper); }
.btn-outline img { display: block; }
.order { display: flex; flex-direction: column; padding-top: 40px; }
.order .label { padding-bottom: 12px; border-bottom: 1px solid var(--rule-dark); }
.order-rows > div { padding: 14px 0; border-bottom: 1px solid var(--rule-dark); font-weight: 500; line-height: 1.5; }
.order-rows dt { color: var(--subtle); }
.ready-email { margin-top: 24px; font-weight: 500; }

/* ---------- How it works ("Learn more", Figma "How It Works / Mobile" 228:15358; desktop in the media block) ---------- */
.step-how { background: var(--paper); }
.body-l { font-size: 16px; line-height: 1.6; letter-spacing: -.08px; }
.how-hero { position: relative; overflow: hidden; padding: 20px 20px 40px; background: var(--ink); color: var(--paper); }
.how-hero > * { position: relative; z-index: 1; }
.how-hero > .how-mark { position: absolute; z-index: 0; bottom: 36px; inset-inline-start: -20px; width: 560px; height: 138.2px; max-width: none; pointer-events: none; }
.how-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 36px; max-width: 600px; margin: 0 auto; padding-top: 48px; }
.how-title { display: flex; flex-direction: column; gap: 12px; }
.how-title h1:focus { outline: none; }
.how-content { display: flex; flex-direction: column; align-items: center; gap: 40px; max-width: 640px; margin: 0 auto; padding: 48px 20px; color: var(--ink); }
.how-sections { display: flex; flex-direction: column; gap: 40px; width: 100%; }
.how-section { display: flex; flex-direction: column; gap: 8px; }
.how-section ul { margin: 0; padding-inline-start: 24px; }
.how-cta { width: 100%; }
.how-section p { margin: 0; }
.how-table-wrap { overflow-x: auto; margin-top: 8px; }
.how-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.4; text-align: start; }
.how-table th, .how-table td { padding: 12px; border: 1px solid var(--stone); text-align: start; vertical-align: middle; }
.how-table th { background: var(--ink); color: var(--paper); font-weight: 700; }
.how-back { font-size: 16px; font-weight: 700; line-height: 1.5; letter-spacing: -.08px; }

/* ---------- Footer ---------- */
.footer { position: relative; display: flex; flex-direction: column; gap: 20px; overflow: hidden; margin-top: auto; padding: 40px 20px 32px; background: var(--ink); color: var(--paper);
    font-size: 16px; line-height: 1.5; letter-spacing: -.08px; }
.footer-home { padding-top: 32px; line-height: 1.46; }
.footer-home .subtle { color: var(--paper); }
.footer a { font-weight: 700; }
.rule-dark { position: relative; z-index: 1; height: 1px; background: var(--rule-dark); }
.footer-row, .footer-links { position: relative; z-index: 1; display: flex; }
.footer-row { justify-content: space-between; gap: 12px; }
.footer-home .footer-row a { text-decoration: underline; }
.footer-links { gap: 24px; }
.footer-links a { text-decoration: underline; }
.footer-bar { display: contents; } /* a row on desktop only */
.footer-bar > .subtle { position: relative; z-index: 1; }
.footer-mark { display: none; position: absolute; top: 60px; inset-inline-start: 150px; width: 600px; height: 148.101px; max-width: none; pointer-events: none; }
.footer-home .footer-mark { top: 0; inset-inline-start: 75px; }

@media (max-width: 359px) {
    .offer { font-size: 14px; padding-inline: 6px; }
    .balance-amount { font-size: 34px; }
}

/* ---------- Desktop (Figma "/ Desktop (1440)" frames). Below 1024 the phone layout stays, centred at 480 ---------- */
@media (min-width: 1024px) {
    :root { --gutter: clamp(40px, 8.34vw, 120px); --pass-logo: 1.6; }
    .page { max-width: none; }
    .display-xl.big { font-size: calc(48px * var(--serif-scale)); letter-spacing: -.48px; }
    .body-l { font-size: 18px; letter-spacing: -.09px; }
    .topbar > img { width: auto; height: 56px; }
    .footer-mark { display: block; } /* mobile has none */

    /* Choose: the phone column, centred under a wider hero */
    .hero .display-xl { max-width: none; }
    .hero-text { font-size: 18px; letter-spacing: -.09px; }
    .choose-body { width: 100%; max-width: 400px; margin: 0 auto; gap: 40px; }
    .picker { gap: 16px; }
    .footer-home { padding-bottom: 48px; }
    .footer-home .footer-mark { inset-inline-start: auto; inset-inline-end: -20px; }

    /* Checkout: summary column + form panel */
    .step-checkout { background: #fafafa; }
    .checkout-header { padding: 28px var(--gutter); }
    .checkout-header .your-card { display: none; }
    .checkout-body { display: flex; align-items: flex-start; justify-content: center; gap: var(--gutter); padding: 64px var(--gutter); }
    .summary { display: flex; flex: 0 1 440px; flex-direction: column; gap: 32px; min-width: 0; padding: 36px 32px 32px; }
    .summary-rows { margin: 0; }
    .summary-rows > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(0, 0, 0, .05);
        font-size: 16px; letter-spacing: -.08px; }
    .summary-rows dt { font-weight: 500; line-height: 1.6; }
    .summary-rows dd { margin: 0; font-weight: 500; line-height: 1.2; text-align: end; }
    .summary-change { align-self: flex-start; font-weight: 500; font-size: 16px; line-height: 1.2; letter-spacing: -.08px; }
    .checkout { flex: 1 1 0; max-width: 500px; min-width: 0; padding: 40px; background: var(--paper); }
    .checkout .group > h2 { font-size: calc(30px * var(--serif-scale)); line-height: 1.12; letter-spacing: -.15px; }

    /* Code sheet: a centred dialog */
    .sheet { top: 50%; bottom: auto; gap: 32px; max-width: 520px; padding: 40px; transform: translate(-50%, -50%); }
    .sheet-row, .sheet-row .link-btn { font-size: 16px; line-height: 1.6; letter-spacing: -.08px; }

    /* Card Ready: one 540 column */
    .ready { padding: 0; }
    .ready > .topbar { padding: 28px var(--gutter); }
    .ready > .ready-mark { display: none; }
    .ready-head { gap: 24px; padding: 64px var(--gutter) 88px; }
    .ready-check { width: 64px; height: 64px; border-width: 1.5px; border-radius: 32px; }
    .ready-check img { width: 28px; height: 28px; padding: 5.76px 3.43px 6.93px; }
    .ready-main, .ready-order { width: 540px; max-width: calc(100% - 2 * var(--gutter)); margin-inline: auto; }
    .ready-order { padding: 64px 0; }
    .order { padding-top: 0; }
    .pass-balance { gap: 24px; }
    .pass-value { font-size: calc(40px * var(--serif-scale)); line-height: 1.04; letter-spacing: -.4px; }
    .pass-rows > div, .order-rows > div { font-size: 16px; letter-spacing: -.08px; }
    .pass-rows dt, .order-rows > div { line-height: 1.6; }
    .order .label { font-family: var(--serif); font-weight: 400; font-size: calc(24px * var(--serif-scale)); line-height: 1.2; letter-spacing: 0; }
    .ready-email { margin-top: 20px; font-size: 16px; line-height: 1.6; letter-spacing: -.08px; }

    /* How it works */
    .how-hero { padding: 0 0 96px; }
    .how-hero > .topbar { padding: 28px var(--gutter); }
    .how-hero > .how-mark { top: 205px; bottom: auto; inset-inline-start: calc(50% - 409px); width: 1280px; height: 316px; opacity: .83; } /* Figma: 5%, the file is 6% */
    .how-intro { gap: 40px; }
    .how-section h2 { font-size: calc(30px * var(--serif-scale)); line-height: 1.12; letter-spacing: -.15px; }
    .how-section ul { padding-inline-start: 27px; }
    .how-cta { width: 320px; }
    .how-content { gap: 64px; padding: 96px var(--gutter) 120px; max-width: calc(600px + 2 * var(--gutter)); }
    .step-how .footer { padding-inline: var(--gutter); }
    .step-how .footer-mark { inset-inline-end: -40px; }

    /* Footer with links (Checkout, Card Ready): one row, larger mark */
    .footer-links { gap: 32px; }
    .footer:not(.footer-home) { gap: 24px; padding: 40px var(--gutter) 48px; }
    .footer:not(.footer-home) .rule-dark { background: rgba(255, 255, 255, .15); }
    .footer-bar { position: relative; z-index: 1; display: flex; flex-direction: row; align-items: center; justify-content: space-between; font-size: 16px; line-height: normal; letter-spacing: -.08px; }
    .footer-bar .footer-links { color: rgba(255, 255, 255, .85); }
    .footer-bar .subtle { color: rgba(255, 255, 255, .5); }
    .footer:not(.footer-home) .footer-mark { top: 20px; inset-inline-start: calc(50% - 196px); width: 956px; height: 236px; }
}

/* Arabic page (dir=rtl, Figma's "(AR)" frames). Layout flips by itself through the logical properties; these are the exceptions.
   One Arabic font for everything, headings too (designer, Figma 462:18309). Phone row, code boxes, brand logos, card numbers and email stay left to right. */
:root[dir="rtl"] { --serif: "Noto Sans Arabic", "PP Neue Montreal", "Inter Tight", sans-serif; --serif-scale: 1; }
[dir="rtl"] em { font-style: normal; }
[dir="rtl"] .seal-pct { font-family: "PP Editorial New", "Instrument Serif", Georgia, serif; direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .phone, [dir="rtl"] .digits, [dir="rtl"] .brand-logos, [dir="rtl"] .pass-logos { direction: ltr; }
[dir="rtl"] .phone > .combo-panel { direction: rtl; }
[dir="rtl"] .combo-code { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] input[type="email"] { direction: ltr; text-align: right; }
[dir="rtl"] .ended h1 { line-height: 1.2; letter-spacing: 0; }
/* Arabic review, Figma 463:18566: seal % sits lower, thicker underline set off from the text (Learn more = footer link),
   home footer stacked with a grey, regular-weight copyright (Figma 464:18752) */
[dir="rtl"] .seal-pct { line-height: 1; }
[dir="rtl"] .seal-word { margin-top: 3px; line-height: 1.3; }
[dir="rtl"] .learn-more, [dir="rtl"] .footer a { text-decoration-thickness: 1.5px; text-underline-offset: 6px; }
[dir="rtl"] .footer-home .footer-row { flex-direction: column; align-items: flex-start; gap: 16px; line-height: 1.65; }
[dir="rtl"] .footer-home .subtle { color: #a6a39d; font-weight: 400; }
/* Arabic checkout review (Figma 464:18777 → design 464:18944): offer on two lines, regular "تغيير" link (16px: Figma 514:12083) */
[dir="rtl"] .your-card .display-m { line-height: 1.3; }
[dir="rtl"] #change-offer { font-weight: 400; font-size: 16px; line-height: 1.65; letter-spacing: -.048px; }
