/* Kestrer customer webview. Brand tokens are overridden per bank at runtime (js/script.js → applyTheme). */

:root {
    --brand: #E30613;
    --brand-dark: #B3050F;
    --brand-soft: #FDECEE;
    --on-brand: #FFFFFF;

    --bg: #F4F5F7;
    --surface: #FFFFFF;
    --text: #111827;
    --muted: #6B7280;
    --border: #E5E7EB;
    --border-strong: #D1D5DB;

    --success: #15803D;
    --success-soft: #E8F7EE;
    --warn: #B45309;
    --warn-soft: #FEF5E7;
    --danger: #B91C1C;
    --danger-soft: #FDECEC;
    --info: #1D4ED8;
    --info-soft: #EBF1FE;

    --sponsored-bg: #ffffdc;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, .16);
    --gutter: 16px;
    --frame: 440px;
    --header-h: 57px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: #E6E8EC;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
    margin: 0;
}
a {
    color: inherit;
    text-decoration: none;
}
button,
input,
select {
    font: inherit;
    color: inherit;
}
img,
svg {
    display: block;
}
[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* ---------- Shell ---------- */

.shell {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

/* Mobile layout: phone-width frame (centred with a shadow on wide screens). */
[data-layout="mobile"] .shell {
    max-width: var(--frame);
}
[data-layout="mobile"] .desktop-only {
    display: none !important;
}
[data-layout="desktop"] .mobile-only {
    display: none !important;
}

@media (min-width: 520px) {
    [data-layout="mobile"] .shell {
        box-shadow: 0 0 0 1px var(--border), 0 20px 60px rgba(16, 24, 40, .12);
    }
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 88px 1fr 88px;
    align-items: center;
    gap: 8px;
    padding: calc(env(safe-area-inset-top) + 6px) 10px 6px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.topbar-actions {
    display: flex;
    justify-content: flex-end;
}

/* Mobile burger menu: drops down below the header */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    padding: 8px var(--gutter) 14px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(16, 24, 40, .12);
    animation: fade .15s ease-out;
}
.mobile-menu a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 12px;
    border-radius: 10px;
    font-weight: 600;
}
.mobile-menu a:hover {
    background: var(--bg);
}
.mobile-menu a[aria-current] {
    color: var(--brand);
    background: var(--brand-soft);
}
.m-limit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 12px;
    border-radius: 10px;
    background: var(--bg);
    font-size: 14px;
    color: var(--muted);
}
.m-limit b {
    font-size: 16px;
    color: var(--text);
}
#menu-btn[aria-expanded="true"] {
    background: var(--bg);
}
#menu-btn .icon-close,
#menu-btn[aria-expanded="true"] .icon-open {
    display: none;
}
#menu-btn[aria-expanded="true"] .icon-close {
    display: block;
}

.bank-logo {
    display: flex;
    justify-content: center;
}
.bank-logo-img {
    height: 40px;
    width: auto;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}
.text-mark .mark {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.5px;
    color: var(--brand);
}
.text-mark .mark-sub {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    align-self: flex-end;
    padding-bottom: 2px;
}
.badge-mark .mark {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 30px;
    padding: 0 7px;
    background: var(--brand);
    color: var(--on-brand);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .02em;
}
.badge-mark .mark-sub {
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
}

.icon-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}
.icon-btn:hover {
    background: var(--bg);
}
.icon-btn.danger {
    color: var(--danger);
}

.cart-count {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--brand);
    color: var(--on-brand);
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

#app {
    flex: 1;
}
.view {
    padding-bottom: 24px;
    animation: fade .2s ease-out;
}
@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.powered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom));
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.powered img {
    height: 16px;
    width: auto;
}

/* ---------- Typography & layout helpers ---------- */

.pad {
    padding: 16px var(--gutter) 0;
}
.page-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.3px;
}
.section-title {
    font-size: 15px;
    font-weight: 700;
    margin: 22px 0 10px;
}
.muted {
    color: var(--muted);
}
.fine {
    font-size: 12px;
    color: var(--muted);
    margin-top: 12px;
    display: flex;
    gap: 6px;
    align-items: flex-start;
}
.fine svg {
    flex: none;
    width: 14px;
    height: 14px;
    margin-top: 2px;
}
.fine.center {
    justify-content: center;
    text-align: center;
}
.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
}
.text-warn {
    color: var(--warn);
}
.center {
    text-align: center;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 14px;
    box-shadow: var(--shadow);
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background .15s, opacity .15s, transform .05s;
    text-align: center;
}
.btn:active {
    transform: scale(.98);
}
.btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}
.btn svg {
    width: 18px;
    height: 18px;
}
.btn-primary {
    background: var(--brand);
    color: var(--on-brand);
}
.btn-primary:hover:not(:disabled) {
    background: var(--brand-dark);
}
.btn-outline {
    background: var(--surface);
    border-color: var(--brand);
    color: var(--brand);
}
.btn-outline:hover {
    background: var(--brand-soft);
}
.btn-ghost {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
}
.btn-ghost:hover {
    background: var(--bg);
}
.btn-block {
    width: 100%;
}
.btn-sm {
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
    border-radius: 10px;
}
.btn + .btn-block,
.btn-block + .btn-block {
    margin-top: 10px;
}
.grow {
    flex: 1;
}

.action-bar {
    position: sticky;
    bottom: 0;
    z-index: 10;
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
}

/* ---------- Forms ---------- */

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}
.field-error {
    color: var(--danger);
    font-size: 13px;
    margin: -6px 0 10px;
}

.select-wrap {
    position: relative;
    margin-bottom: 14px;
}
.select-wrap::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    pointer-events: none;
}
select,
input[type="text"],
input[type="number"],
input[type="search"],
input[type="password"],
input[type="tel"],
input:not([type]) {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--surface);
    font-size: 16px; /* prevents iOS zoom */
}
select {
    appearance: none;
    padding-right: 40px;
    cursor: pointer;
}
select:focus,
input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}
.select-sm {
    margin: 0;
}
.select-sm select {
    min-height: 38px;
    font-size: 14px;
    border-radius: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.form-grid .span-2 {
    grid-column: span 2;
}
.form-grid .fine {
    margin: 0;
}

/* ---------- Welcome ---------- */

.hero {
    padding: 22px var(--gutter) 34px;
    background: linear-gradient(150deg, var(--brand) 0%, var(--brand-dark)
        100%);
    color: var(--on-brand);
}
.eyebrow {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .85;
}
.hero h1 {
    font-size: 23px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -.3px;
    margin-top: 8px;
}
.hero-perks {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}
.hero-perks li {
    display: flex;
    align-items: center;
    gap: 10px;
}
.hero-perks svg {
    flex: none;
    width: 22px;
    height: 22px;
    padding: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    stroke-width: 3;
}

#panel {
    margin: -20px var(--gutter) 0;
    position: relative;
}

.checking {
    display: grid;
    justify-items: center;
    gap: 8px;
    text-align: center;
    padding: 28px 8px;
}
.checking-title {
    font-weight: 600;
    margin-top: 6px;
}

.result-block {
    text-align: center;
}
.result-block h2 {
    font-size: 19px;
    margin: 12px 0 6px;
}
.result-block .muted {
    margin-bottom: 4px;
}
.result-block .btn {
    margin-top: 16px;
}
.result-block .btn + .btn {
    margin-top: 10px;
}
.result-block .select-wrap {
    text-align: left;
}
.result-block .field-label {
    text-align: left;
    margin-top: 18px;
}
.result-block #browse-btn {
    margin-top: 2px;
}
.limit-amount {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -.8px;
    color: var(--brand);
}

.result-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 20px;
    border-radius: 50%;
}
.result-icon svg {
    width: 26px;
    height: 26px;
    stroke-width: 2.5;
}
.result-icon.lg {
    width: 72px;
    height: 72px;
}
.result-icon.lg svg {
    width: 36px;
    height: 36px;
}
.result-icon.success {
    background: var(--success-soft);
    color: var(--success);
}
.result-icon.warn {
    background: var(--warn-soft);
    color: var(--warn);
}
.result-icon.danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.how {
    padding: 8px var(--gutter) 0;
}
.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}
.steps li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.steps p {
    color: var(--muted);
    font-size: 14px;
}
.step-n {
    flex: none;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 700;
    font-size: 14px;
}

.link-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px var(--gutter) 0;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-weight: 600;
}
.link-row span {
    flex: 1;
}
.link-row svg:first-child {
    color: var(--brand);
}

.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid var(--brand-soft);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
.spinner.lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Catalogue ---------- */

.sticky-top {
    position: sticky;
    top: var(--header-h);
    z-index: 15;
}
.limit-strip {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px var(--gutter);
    background: var(--brand-soft);
    border-bottom: 1px solid var(--border);
}
.limit-strip small {
    display: block;
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}
.limit-strip b {
    font-size: 15px;
}
.limit-strip .btn svg {
    width: 18px;
    height: 18px;
}

.search {
    position: relative;
    margin: 14px var(--gutter) 0;
}
.search svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}
.search input {
    padding-left: 42px;
}

.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 12px var(--gutter) 4px;
}
.chips::-webkit-scrollbar {
    display: none;
}
.chip {
    flex: none;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}
.chip.active {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--on-brand);
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px var(--gutter);
    font-size: 13px;
}
.toolbar .select-wrap {
    width: 180px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0 var(--gutter);
}
.grid > .empty {
    grid-column: 1 / -1;
}

.product-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.product-link {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}
.product-link .art {
    margin-bottom: 6px;
}
.product-card .tag {
    position: absolute;
    top: 6px;
    left: 6px;
}

/* Sponsored listings: tinted card + pill on the image's top-right corner */
.product-card.is-sponsored {
    background: var(--sponsored-bg);
    border-color: #EADF9A;
}
.sponsored-pill {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--sponsored-bg);
    border: 1px solid #D9C65A;
    color: #6B5300;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .02em;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}
.product-card .stepper {
    align-self: stretch;
    justify-content: space-between;
}

.art {
    background: var(--art-bg, #F1F3F6);
    border-radius: var(--radius-sm);
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    padding: 10%;
}
.art svg {
    width: 100%;
    height: 100%;
}
.art-lg {
    border-radius: 0;
    aspect-ratio: 16 / 10;
    padding: 8% 18%;
}
.art-sm {
    width: 76px;
    padding: 8px;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}
.tag-warn {
    background: var(--warn-soft);
    color: var(--warn);
}

.vendor-name {
    font-size: 12px;
    color: var(--muted);
}
.product-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}
.price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 6px;
    font-weight: 700;
    font-size: 15px;
}
.price s {
    color: var(--muted);
    font-weight: 400;
    font-size: 12px;
}
.discount {
    align-self: center;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--success-soft);
    color: var(--success);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
}
.price-lg {
    font-size: 24px;
    letter-spacing: -.4px;
    margin-top: 6px;
    column-gap: 10px;
}
.price-lg s {
    font-size: 16px;
    letter-spacing: 0;
}
.price-lg .discount {
    font-size: 13px;
    padding: 2px 8px;
}
.monthly {
    font-size: 12px;
    color: var(--muted);
}
.monthly b {
    color: var(--brand);
}

.stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--surface);
}
.step-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--brand);
}
.step-btn:disabled {
    color: var(--border-strong);
    cursor: not-allowed;
}
.step-btn svg {
    width: 16px;
    height: 16px;
}
.step-qty {
    min-width: 28px;
    text-align: center;
    font-weight: 700;
}

/* ---------- Product detail ---------- */

.gallery-main {
    position: relative;
    cursor: zoom-in;
}
.zoom-hint {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(17, 24, 39, .55);
    color: #fff;
    pointer-events: none;
}
.photo-count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, .7);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.thumbs {
    position: relative;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    padding: 10px var(--gutter) 4px;
}
.thumb-btn {
    flex: none;
    width: 64px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    background: none;
    cursor: pointer;
    scroll-snap-align: center;
    opacity: .75;
    transition: opacity .15s, border-color .15s;
}
.thumb-btn:hover {
    opacity: 1;
}
.thumb-btn.active {
    border-color: var(--brand);
    opacity: 1;
}
.art-thumb {
    aspect-ratio: 1 / 1;
    padding: 6px;
    border-radius: 10px;
}
/* Real product photos: show the whole product (no cropping) on white,
   since vendor shots are usually packshots on a white background. */
.art.art-photo {
    position: relative;
    padding: 6%;
    overflow: hidden;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--border);
}
/* Pinned to the frame so the photo scales to the frame, not its own pixel size;
   `padding: inherit` keeps the frame's breathing room around the product. */
.art-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: inherit;
    object-fit: contain;
}
.art-thumb.art-photo {
    padding: 4px;
}

.product-desc p {
    font-size: 15px;
    line-height: 1.65;
    color: #374151;
}
.product-desc p + p {
    margin-top: 10px;
}

.product-title {
    font-size: 21px;
    line-height: 1.3;
    font-weight: 700;
    margin-top: 4px;
}
.product-view .monthly,
.pad > .monthly {
    font-size: 13px;
    margin-top: 2px;
}

.note {
    display: flex;
    gap: 8px;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    margin-top: 12px;
}
.note svg {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 2px;
}
.note.warn {
    background: var(--warn-soft);
    color: var(--warn);
}

.highlights {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: grid;
    gap: 8px;
}
.highlights li {
    display: flex;
    gap: 8px;
    font-size: 14px;
}
.highlights svg {
    flex: none;
    width: 18px;
    height: 18px;
    color: var(--success);
    margin-top: 1px;
}

.delivery {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 16px;
}
.delivery > svg {
    flex: none;
    color: var(--brand);
    margin-top: 2px;
}
.delivery p {
    font-size: 13px;
}

/* ---------- Rows (definition lists) ---------- */

.rows {
    margin: 0;
    display: grid;
    gap: 10px;
}
.row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
}
.row dt {
    color: var(--muted);
}
.row dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}
.row.emph {
    padding-top: 10px;
    border-top: 1px dashed var(--border-strong);
}
.row.emph + .row.emph {
    border-top: 0;
    padding-top: 0;
}
.row.emph dt {
    color: var(--text);
    font-weight: 600;
}
.row.emph dd {
    font-size: 16px;
}
.row.warn dd {
    color: var(--warn);
}

/* ---------- Cart ---------- */

.cart-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0 var(--gutter);
    display: grid;
    gap: 10px;
}
.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.thumb {
    flex: none;
}
.cart-info {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 2px;
}
.cart-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.alert {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    margin-top: 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
}
.alert-icon {
    flex: none;
    margin-top: 1px;
}
.alert-title {
    font-weight: 600;
}
.alert-body {
    margin-top: 2px;
    opacity: .9;
}
.alert-warn {
    background: var(--warn-soft);
    color: var(--warn);
}
.alert-info {
    background: var(--info-soft);
    color: var(--info);
}
.alert-error {
    background: var(--danger-soft);
    color: var(--danger);
}
.alert-success {
    background: var(--success-soft);
    color: var(--success);
}

.empty {
    text-align: center;
    padding: 48px var(--gutter);
    display: grid;
    justify-items: center;
    gap: 8px;
}
.empty-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    margin-bottom: 6px;
}
.empty h2 {
    font-size: 18px;
}
.empty p {
    color: var(--muted);
    max-width: 280px;
}
.empty .btn {
    margin-top: 12px;
}

/* ---------- Checkout ---------- */

.slider-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.tenor-out {
    font-size: 18px;
    font-weight: 700;
    color: var(--brand);
}

input[type="range"] {
    --pct: 50%;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 32px;
    margin: 6px 0 2px;
    background: transparent;
    cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--brand) var(--pct), var(--border)
        var(--pct));
}
input[type="range"]::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: var(--border);
}
input[type="range"]::-moz-range-progress {
    height: 8px;
    border-radius: 4px;
    background: var(--brand);
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    margin-top: -10px;
    border-radius: 50%;
    background: var(--surface);
    border: 3px solid var(--brand);
    box-shadow: var(--shadow);
}
input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--surface);
    border: 3px solid var(--brand);
}
.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
}

.figures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}
.figure {
    display: grid;
    gap: 2px;
    align-content: start;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.figure small {
    font-size: 12px;
    color: var(--muted);
}
.figure b {
    font-size: 17px;
    letter-spacing: -.2px;
}
.figure .muted {
    font-size: 12px;
}
.figure-main {
    grid-column: 1 / -1;
    background: var(--brand-soft);
    border-color: transparent;
}
.figure:last-child {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto;
    align-items: center;
}
.figure-main b {
    font-size: 28px;
    color: var(--brand);
    letter-spacing: -.6px;
}

.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.schedule {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    white-space: nowrap;
}
.schedule th,
.schedule td {
    padding: 9px 6px;
    text-align: left;
}
.schedule th:first-child,
.schedule td:first-child {
    padding-left: 12px;
}
.schedule th:last-child,
.schedule td:last-child {
    padding-right: 12px;
}
.schedule thead th {
    position: sticky;
    top: 0;
    background: var(--bg);
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.schedule tbody tr + tr td {
    border-top: 1px solid var(--border);
}
.schedule tfoot td {
    border-top: 2px solid var(--border-strong);
    font-weight: 700;
}
.schedule .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.schedule .strong {
    font-weight: 600;
}

.consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 18px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
}
.consent input {
    flex: none;
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: var(--brand);
}

/* "I'm not a robot" check (stand-in for reCAPTCHA-style widgets) */
.human-check {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 12px 14px;
    background: #F9FAFB;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
}
.hc-box {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: #fff;
    border: 2px solid #C1C7D0;
    border-radius: 3px;
    cursor: pointer;
}
.hc-box:hover {
    border-color: #9AA3AF;
}
.hc-box:disabled {
    cursor: default;
}
.hc-tick,
.hc-spinner {
    display: none;
}
.hc-tick svg {
    width: 26px;
    height: 26px;
    stroke-width: 3.5;
    color: var(--success);
}
.hc-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #D7E3FC;
    border-top-color: #4A80F5;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
.human-check[data-state="checking"] .hc-box {
    border-color: transparent;
}
.human-check[data-state="checking"] .hc-spinner,
.human-check[data-state="verified"] .hc-tick {
    display: block;
}
.human-check[data-state="verified"] .hc-box {
    border-color: transparent;
    background: transparent;
}
.hc-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}
.human-check[data-state="verified"] .hc-label {
    cursor: default;
}
.hc-brand {
    display: grid;
    justify-items: center;
    gap: 2px;
    color: #6B7280;
}
.hc-brand svg {
    width: 22px;
    height: 22px;
    color: #4A80F5;
}
.hc-brand small {
    font-size: 9px;
    letter-spacing: .02em;
}

/* ---------- Delivery options (checkout) ---------- */

.delivery-step {
    margin-top: 20px;
}
.delivery-step .section-title {
    margin-top: 0;
}
.dlv-form,
.dlv-pickup {
    display: grid;
    gap: 14px;
    margin-top: 12px;
}
.dlv-form[hidden],
.dlv-pickup[hidden] {
    display: none;
}
.dlv-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.dlv-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}
.select-flush {
    margin-bottom: 0;
}
.link-btn {
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--brand);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: right;
}
.link-btn:hover {
    text-decoration: underline;
}
.dlv-pickup .delivery {
    margin-top: 0;
}
.dlv-pickup .fine {
    margin-top: 0;
}
.idv-field .field-error {
    margin: 0;
}
.action-hint {
    align-self: center;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}
/* The aside grows with the address form, so stop it sticking on desktop. */
[data-layout="desktop"] .split-aside:has(.delivery-step) {
    position: static;
}

/* ---------- Pay excess ---------- */

.pay-amount {
    margin-top: 16px;
    padding: 18px;
    text-align: center;
    border-radius: var(--radius);
    background: var(--brand-soft);
}
.pay-amount small {
    display: block;
    color: var(--muted);
    font-size: 13px;
}
.pay-amount b {
    font-size: 32px;
    font-weight: 800;
    color: var(--brand);
    letter-spacing: -.6px;
}

.methods {
    border: 0;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}
.method:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-soft);
}
.method input {
    accent-color: var(--brand);
    width: 18px;
    height: 18px;
    margin: 0;
}
.method small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}
.method-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--bg);
    color: var(--brand);
}

/* ---------- Result ---------- */

.result-hero {
    text-align: center;
    padding-top: 28px;
}
.result-hero h1 {
    font-size: 22px;
    margin: 14px 0 6px;
}

.item-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.item-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}
.next-steps .delivery:first-child {
    margin-top: 0;
}

.details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--brand);
    list-style: none;
    display: flex;
    justify-content: space-between;
}
.details summary::-webkit-details-marker {
    display: none;
}
.details summary::after {
    content: '+';
    font-size: 18px;
    line-height: 1;
}
.details[open] summary::after {
    content: '–';
}
.details[open] summary {
    margin-bottom: 12px;
}

.refund-card {
    border-color: var(--warn-soft);
}
.refund-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.refund-head > svg {
    flex: none;
    color: var(--warn);
}
.refund-head small {
    display: block;
    color: var(--muted);
}

.timeline {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
}
.timeline li {
    position: relative;
    display: flex;
    gap: 12px;
    padding-bottom: 16px;
}
.timeline li:last-child {
    padding-bottom: 0;
}
.timeline li:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 24px;
    bottom: 0;
    width: 2px;
    background: var(--border);
}
.timeline li.done:not(:last-child)::before {
    background: var(--success);
}
.timeline .dot {
    flex: none;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border-strong);
    background: var(--surface);
    color: #fff;
}
.timeline .dot svg {
    width: 14px;
    height: 14px;
    stroke-width: 3;
}
.timeline li.done .dot {
    background: var(--success);
    border-color: var(--success);
}
.timeline li.current .dot {
    border-color: var(--warn);
    box-shadow: 0 0 0 4px var(--warn-soft);
}
.timeline b {
    font-size: 14px;
}
.timeline small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

/* ---------- Applications ---------- */

.app-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0 var(--gutter);
    display: grid;
    gap: 10px;
}
.app-card {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 14px 40px 14px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.app-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.app-items {
    font-weight: 600;
}
.app-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--muted);
}
.app-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.badge-success {
    background: var(--success-soft);
    color: var(--success);
}
.badge-warn {
    background: var(--warn-soft);
    color: var(--warn);
}
.badge-danger {
    background: var(--danger-soft);
    color: var(--danger);
}

/* ---------- Photo lightbox ---------- */

.lb-open,
.lb-open body {
    overflow: hidden;
}
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background: rgba(10, 12, 16, .96);
    color: #fff;
    animation: fade .15s ease-out;
}
/* Mobile layout: keep the viewer inside the phone frame (as in the bank's webview). */
[data-layout="mobile"] .lightbox {
    left: 50%;
    right: auto;
    width: min(100%, var(--frame));
    transform: translateX(-50%);
}
.lb-top,
.lb-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: calc(env(safe-area-inset-top) + 8px) 12px 8px 20px;
}
.lb-bottom {
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px calc(env(safe-area-inset-bottom) + 14px);
}
.lb-count {
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    opacity: .85;
}
.lb-stage {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    touch-action: none;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-select: none;
}
.lb-stage.is-zoomed {
    cursor: grab;
}
.lb-stage.is-zoomed:active {
    cursor: grabbing;
}
.lb-inner {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    transform-origin: center;
    will-change: transform;
}
.art-zoom {
    width: 100%;
    max-width: min(100%, calc(100dvh - 190px));
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    pointer-events: none;
}
.art-zoom img,
.art-zoom svg {
    -webkit-user-drag: none;
}
.lb-btn {
    display: grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.lb-btn:hover {
    background: rgba(255, 255, 255, .22);
}
.lb-btn:focus-visible {
    outline: 2px solid #fff;
}
.lb-nav {
    position: absolute;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
}
.lb-prev {
    left: 8px;
}
.lb-next {
    right: 8px;
}
.lb-zoom {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lb-level {
    min-width: 64px;
    font-variant-numeric: tabular-nums;
}
.lb-hint {
    font-size: 12px;
    opacity: .6;
}
/* Desktop: larger image, arrows further out */
[data-layout="desktop"] .lb-top {
    padding: 16px 24px 8px 32px;
}
[data-layout="desktop"] .art-zoom {
    max-width: min(900px, calc(100dvh - 200px));
}
[data-layout="desktop"] .lb-prev {
    left: 24px;
}
[data-layout="desktop"] .lb-next {
    right: 24px;
}
[data-layout="desktop"] .lb-nav {
    width: 52px;
    height: 52px;
}

/* ---------- Identity verification flow ---------- */

.idv {
    position: fixed;
    inset: 0;
    z-index: 115;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    background: var(--bg);
    animation: fade .15s ease-out;
}
[data-layout="mobile"] .idv {
    left: 50%;
    right: auto;
    width: min(100%, var(--frame));
    transform: translateX(-50%);
}
.idv-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: calc(env(safe-area-inset-top) + 10px) 8px 10px var(--gutter);
    background: var(--surface);
}
.idv-head h2 {
    font-size: 17px;
}
.idv-step {
    font-size: 13px;
    color: var(--muted);
}
.idv-progress {
    height: 4px;
    background: var(--border);
}
.idv-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--brand);
    transition: width .3s ease-out;
}
.idv-body {
    overflow-y: auto;
    padding: 20px var(--gutter) calc(env(safe-area-inset-bottom) + 24px);
}
.idv-form,
.idv-capture {
    display: grid;
    gap: 16px;
    max-width: 480px;
    margin: 0 auto;
}
.idv-intro {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.idv-intro > svg {
    flex: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand);
}
.idv-intro h3,
.idv-capture h3 {
    font-size: 18px;
    margin-bottom: 4px;
}
.idv-field {
    display: grid;
    gap: 6px;
}
.idv-field .field-label {
    margin-bottom: 0;
}
.idv-form .alert,
.idv-form .fine {
    margin-top: 0;
}
.idv-form .methods legend {
    margin-bottom: 8px;
}
.idv-center {
    display: grid;
    justify-items: center;
    gap: 12px;
    max-width: 420px;
    margin: 0 auto;
    padding-top: 40px;
    text-align: center;
}
.idv-title {
    font-size: 19px;
    font-weight: 700;
}
.idv-tips,
.idv-results {
    list-style: none;
    margin: 0;
    padding: 16px;
    display: grid;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.idv-tips li,
.idv-results li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    text-align: left;
}
.idv-tips svg {
    flex: none;
    color: var(--brand);
}
.idv-results {
    width: 100%;
}
.idv-results svg {
    flex: none;
    width: 22px;
    height: 22px;
    padding: 3px;
    border-radius: 50%;
    background: var(--success-soft);
    color: var(--success);
    stroke-width: 3;
}
.idv-results small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}
.idv-actions {
    display: flex;
    gap: 10px;
}

/* Camera viewport with card / face guides */
.cam {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: #0B0D12;
}
.cam-card {
    aspect-ratio: 4 / 3;
}
.cam-face {
    aspect-ratio: 3 / 4;
    max-height: 56vh;
    width: 100%;
    margin: 0 auto;
}
.cam video,
.cam img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cam-face video {
    transform: scaleX(-1);
}
.cam-preview img {
    object-fit: contain;
}
.cam-guide {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 3px dashed rgba(255, 255, 255, .9);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45);
    pointer-events: none;
}
.cam-card .cam-guide {
    width: 86%;
    aspect-ratio: 1.586;
    border-radius: 12px;
}
.cam-face .cam-guide,
.cam-face .ring {
    width: 66%;
    aspect-ratio: 3 / 4;
    border-radius: 50%;
}
.cam-face .cam-guide {
    border-style: solid;
    border-color: rgba(255, 255, 255, .35);
}
.ring {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    overflow: visible;
    pointer-events: none;
}
.ring circle {
    fill: none;
    stroke: var(--success);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 295;
    stroke-dashoffset: 295;
    vector-effect: non-scaling-stroke;
}
.cam-status {
    position: absolute;
    inset: auto 16px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 13px;
}
.cam-status.cam-error {
    inset: auto 12px 12px;
    background: rgba(185, 28, 28, .92);
}
.cam-status svg {
    flex: none;
}
.cam-sim {
    background: linear-gradient(160deg, #3B4254, #161A22);
}
.sim-face {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .5);
}
.sim-face svg {
    width: 45%;
    height: auto;
    stroke-width: 1;
}
.shutter {
    justify-self: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 4px solid var(--surface);
    background: var(--brand);
    box-shadow: 0 0 0 3px var(--brand), var(--shadow-lg);
    cursor: pointer;
}
.shutter:disabled {
    opacity: .4;
    cursor: not-allowed;
}
.upload-btn {
    cursor: pointer;
}
.liveness-prompt {
    min-height: 28px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
}
.liveness-prompt .btn + .btn {
    margin-top: 10px;
}

/* Checkout: verified badge */
.idv-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--success-soft);
    color: var(--success);
    font-size: 14px;
}
.idv-badge small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}
#idv-status .alert {
    margin-top: 14px;
}

[data-layout="desktop"] .idv-head {
    padding: 16px max(24px, calc((100% - 720px) / 2)) 16px;
}
[data-layout="desktop"] .idv-body {
    padding-top: 32px;
}

/* ---------- Overlay & toast ---------- */

.overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: var(--gutter);
    background: rgba(17, 24, 39, .55);
    backdrop-filter: blur(2px);
    animation: fade .15s ease-out;
}
.overlay-card {
    width: min(340px, 100%);
    display: grid;
    justify-items: center;
    gap: 10px;
    text-align: center;
    padding: 28px 22px;
    background: var(--surface);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
}
.overlay-title {
    font-weight: 700;
    font-size: 16px;
    margin-top: 6px;
}
.overlay-sub {
    font-size: 13px;
    color: var(--muted);
}

#toast-root {
    position: fixed;
    left: 50%;
    bottom: 96px;
    z-index: 110;
    transform: translateX(-50%);
    display: grid;
    gap: 8px;
    justify-items: center;
    width: min(calc(100% - 32px), 400px);
    pointer-events: none;
}
.toast {
    padding: 10px 16px;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s, transform .2s;
}
.toast.show {
    opacity: 1;
    transform: none;
}
.toast-success {
    background: var(--success);
}

/* ---------- Demo controls ---------- */

.demo-toggle {
    position: fixed;
    left: 12px;
    bottom: 96px;
    z-index: 90;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 0;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    opacity: .85;
}
.demo-toggle:hover {
    opacity: 1;
}
.demo-toggle svg {
    width: 14px;
    height: 14px;
}
@media (max-width: 519px) {
    .demo-toggle {
        padding: 10px;
        opacity: .6;
    }
    .demo-toggle span {
        display: none;
    }
}

.demo-panel {
    position: fixed;
    left: 12px;
    bottom: 140px;
    z-index: 95;
    width: min(300px, calc(100vw - 24px));
    max-height: calc(100vh - 170px);
    overflow-y: auto;
    padding: 14px;
    background: #111827;
    color: #F9FAFB;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    font-size: 13px;
}
.demo-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.demo-head .icon-btn {
    color: #F9FAFB;
    width: 36px;
    height: 36px;
}
.demo-head .icon-btn:hover {
    background: rgba(255, 255, 255, .1);
}
.demo-label {
    display: block;
    margin: 12px 0 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #9CA3AF;
}
.demo-panel select,
.demo-panel input {
    min-height: 38px;
    font-size: 14px;
    border-radius: 8px;
    background: #1F2937;
    border-color: #374151;
    color: #F9FAFB;
}
.demo-panel .btn {
    margin-top: 16px;
    background: transparent;
    border-color: #4B5563;
    color: #F9FAFB;
}
.demo-panel .fine {
    color: #9CA3AF;
}
.demo-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}
.demo-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #F9FAFB;
}
.seg {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
    background: #1F2937;
    border-radius: 10px;
}
.seg a,
.seg button {
    text-align: center;
    padding: 7px 4px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: #D1D5DB;
    cursor: pointer;
}
.seg a:hover,
.seg button:hover {
    color: #fff;
}
.seg a.active,
.seg button.active {
    background: #F9FAFB;
    color: #111827;
}

@media (min-width: 520px) {
    [data-layout="mobile"] .demo-toggle,
    [data-layout="mobile"] .demo-panel {
        left: max(12px, calc(50% - var(--frame) / 2 - 320px));
    }
}

/* =====================================================================
   Layout wrappers. On mobile they dissolve so pages stack as a single
   column (and the sticky .action-bar keeps the page as its container);
   on desktop they become multi-column grids.
   ===================================================================== */

.card-flush-top {
    margin-top: 14px;
}
.aside-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

[data-layout="mobile"] .split {
    display: flex;
    flex-direction: column;
}
[data-layout="mobile"] .split-main,
[data-layout="mobile"] .split-aside {
    display: contents;
}
[data-layout="mobile"] .split-main > .pad,
[data-layout="mobile"] .split-aside > .pad {
    padding-top: 0;
}
[data-layout="mobile"] .mobile-first {
    order: -1;
}
[data-layout="mobile"] .split .action-bar {
    order: 99;
}

[data-layout="mobile"] .catalog {
    display: flex;
    flex-direction: column;
}
[data-layout="mobile"] .catalog-side,
[data-layout="mobile"] .catalog-main {
    display: contents;
}
[data-layout="mobile"] .catalog .sticky-top {
    order: 1;
}
[data-layout="mobile"] .catalog .search {
    order: 2;
}
[data-layout="mobile"] .catalog .chips {
    order: 3;
}
[data-layout="mobile"] .catalog .toolbar {
    order: 4;
}
[data-layout="mobile"] .catalog .grid {
    order: 5;
}

[data-layout="mobile"] .product-layout {
    display: flex;
    flex-direction: column;
}
[data-layout="mobile"] .product-media,
[data-layout="mobile"] .product-info {
    display: contents;
}
[data-layout="mobile"] .product-info .action-bar {
    order: 99;
}

/* ---------- Desktop layout ---------- */

[data-layout="desktop"] {
    --header-h: 80px;
}
[data-layout="desktop"] body {
    background: var(--bg);
}

[data-layout="desktop"] .topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--header-h);
    padding: 0 max(24px, calc((100% - 1200px) / 2 + 16px));
}
[data-layout="desktop"] .bank-logo {
    justify-content: flex-start;
    margin-right: auto;
}
[data-layout="desktop"] .bank-logo .text-mark .mark {
    font-size: 24px;
}

.desk-nav {
    display: flex;
    gap: 4px;
}
.desk-nav a {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
}
.desk-nav a:hover {
    color: var(--text);
    background: var(--bg);
}
.desk-nav a[aria-current] {
    color: var(--brand);
    background: var(--brand-soft);
}
.limit-pill {
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}
.limit-pill b {
    color: var(--text);
    margin-left: 4px;
}

[data-layout="desktop"] .view {
    --gutter: 0px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 32px 64px;
}
[data-layout="desktop"] .page-title {
    font-size: 28px;
}
[data-layout="desktop"] .card {
    padding: 20px;
}

/* Action bar becomes inline buttons */
[data-layout="desktop"] .action-bar {
    position: static;
    margin-top: 16px;
    padding: 0;
    background: none;
    border: 0;
    backdrop-filter: none;
}

/* Two-column split with sticky aside */
[data-layout="desktop"] .split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 32px;
    align-items: start;
    margin-top: 8px;
}
[data-layout="desktop"] .split-main {
    grid-column: 1;
    grid-row: 1;
}
[data-layout="desktop"] .split-aside {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: calc(var(--header-h) + 16px);
}
[data-layout="desktop"] .card-flush-top {
    margin-top: 0;
}
[data-layout="desktop"] .section-title-flush {
    margin-top: 0;
}
[data-layout="desktop"] .split-aside > .pad + .pad {
    padding-top: 0;
}
[data-layout="desktop"] .split-aside .consent {
    margin-top: 16px;
}

/* Welcome: full-bleed hero with the eligibility card beside the copy */
[data-layout="desktop"] .view-bleed {
    max-width: none;
    padding: 0 0 64px;
}
[data-layout="desktop"] .welcome-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 56px;
    align-items: center;
    padding: 64px max(32px, calc((100% - 1200px) / 2 + 32px));
    background: linear-gradient(150deg, var(--brand) 0%, var(--brand-dark)
        100%);
}
[data-layout="desktop"] .hero {
    background: none;
    padding: 0;
}
[data-layout="desktop"] .hero h1 {
    font-size: 42px;
    letter-spacing: -.8px;
    max-width: 560px;
    margin-top: 12px;
}
[data-layout="desktop"] .hero-perks {
    margin-top: 28px;
    gap: 14px;
    font-size: 16px;
}
[data-layout="desktop"] .hero-perks svg {
    width: 26px;
    height: 26px;
}
[data-layout="desktop"] #panel {
    margin: 0;
    padding: 28px;
    box-shadow: var(--shadow-lg);
    border: 0;
}
[data-layout="desktop"] .how {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 32px 0;
}
[data-layout="desktop"] .how .section-title {
    font-size: 20px;
    margin: 0 0 16px;
}
[data-layout="desktop"] .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
[data-layout="desktop"] .steps li {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
[data-layout="desktop"] .view-bleed .link-row {
    width: calc(100% - 64px);
    max-width: 1136px;
    margin: 24px auto 0;
}

/* Catalogue: sidebar + product grid */
[data-layout="desktop"] .catalog {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    padding-top: 16px;
}
[data-layout="desktop"] .catalog-side {
    position: sticky;
    top: calc(var(--header-h) + 16px);
}
[data-layout="desktop"] .catalog-side .sticky-top {
    position: static;
}
[data-layout="desktop"] .limit-strip {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
[data-layout="desktop"] .limit-strip .btn {
    grid-column: 1 / -1;
}
.side-title {
    margin: 24px 0 8px;
    padding-left: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}
[data-layout="desktop"] .chips {
    flex-direction: column;
    gap: 2px;
    padding: 0;
    overflow: visible;
}
[data-layout="desktop"] .chip {
    border: 0;
    background: transparent;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    white-space: normal;
}
[data-layout="desktop"] .chip:hover {
    background: var(--surface);
}
[data-layout="desktop"] .chip.active {
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 600;
}
[data-layout="desktop"] .catalog-main .search {
    margin: 0;
}
[data-layout="desktop"] .toolbar {
    padding: 16px 0;
}
[data-layout="desktop"] .grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
[data-layout="desktop"] .product-card {
    padding: 12px;
    transition: box-shadow .15s, transform .15s;
}
[data-layout="desktop"] .product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Product detail: media + info columns */
[data-layout="desktop"] .product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    padding-top: 16px;
}
[data-layout="desktop"] .product-media {
    position: sticky;
    top: calc(var(--header-h) + 16px);
}
[data-layout="desktop"] .art-lg {
    border-radius: 20px;
    aspect-ratio: 1 / 1;
    padding: 14%;
}
[data-layout="desktop"] .product-title {
    font-size: 30px;
    letter-spacing: -.5px;
}
[data-layout="desktop"] .product-info .action-bar {
    margin-top: 24px;
    max-width: 100%;
}
[data-layout="desktop"] .art-lg.art-photo {
    padding: 8%;
}
[data-layout="desktop"] .thumbs {
    padding: 12px 0 4px;
    gap: 10px;
}
[data-layout="desktop"] .thumb-btn {
    width: 76px;
}
[data-layout="desktop"] .product-desc {
    padding-top: 8px;
}

/* Cart, checkout, payment */
[data-layout="desktop"] .art-sm {
    width: 104px;
}
[data-layout="desktop"] .cart-list {
    margin-top: 0;
    gap: 12px;
}
[data-layout="desktop"] .cart-item {
    padding: 16px;
}
[data-layout="desktop"] .figures {
    grid-template-columns: repeat(3, 1fr);
}
[data-layout="desktop"] .figure:last-child {
    grid-column: auto;
    grid-template-columns: none;
    align-items: start;
}
[data-layout="desktop"] .schedule {
    font-size: 13px;
}
[data-layout="desktop"] .schedule th,
[data-layout="desktop"] .schedule td {
    padding: 10px 14px;
}
[data-layout="desktop"] .pay-amount {
    margin-top: 0;
}

/* Result + applications */
[data-layout="desktop"] .result-hero {
    max-width: 640px;
    margin: 0 auto;
    padding: 32px 0 24px;
}
[data-layout="desktop"] .result-hero h1 {
    font-size: 30px;
}
[data-layout="desktop"] .app-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

/* Overlays and presenter controls */
[data-layout="desktop"] #toast-root {
    left: auto;
    right: 24px;
    bottom: 24px;
    transform: none;
    width: auto;
    justify-items: end;
}
[data-layout="desktop"] .demo-toggle {
    left: 20px;
    bottom: 20px;
}
[data-layout="desktop"] .demo-panel {
    left: 20px;
    bottom: 64px;
}

/* Desktop forced onto a narrow window: collapse the columns. */
@media (max-width: 860px) {
    [data-layout="desktop"] .split,
    [data-layout="desktop"] .catalog,
    [data-layout="desktop"] .product-layout,
    [data-layout="desktop"] .welcome-top {
        grid-template-columns: minmax(0, 1fr);
    }
    [data-layout="desktop"] .split-main,
    [data-layout="desktop"] .split-aside {
        grid-column: 1;
        grid-row: auto;
        position: static;
    }
    [data-layout="desktop"] .catalog-side,
    [data-layout="desktop"] .product-media {
        position: static;
    }
    [data-layout="desktop"] .steps,
    [data-layout="desktop"] .app-list,
    [data-layout="desktop"] .figures {
        grid-template-columns: minmax(0, 1fr);
    }
    [data-layout="desktop"] .desk-nav a {
        padding: 8px;
    }
    [data-layout="desktop"] .limit-pill {
        display: none;
    }
    [data-layout="desktop"] .view {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
