:root {
    --ink: #111827;
    --muted: #687287;
    --line: rgba(24, 39, 75, .11);
    --surface: rgba(255, 255, 255, .91);
    --accent: #5b4ff7;
    --accent-deep: #4035d1;
    --mint: #14b88a;
    --danger: #d84d66;
    --shadow: 0 24px 70px rgba(40, 38, 90, .12), 0 3px 12px rgba(40, 38, 90, .06);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #f6f7fb; }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 15% 0%, rgba(121, 108, 255, .10), transparent 34rem),
        radial-gradient(circle at 100% 42%, rgba(32, 199, 161, .09), transparent 30rem),
        linear-gradient(180deg, #fafaff 0%, #f4f6fa 100%);
    font: 500 16px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button, a { -webkit-tap-highlight-color: transparent; }

.ambient { position: fixed; border-radius: 50%; filter: blur(1px); pointer-events: none; opacity: .55; }
.ambient-one { width: 18rem; height: 18rem; top: -10rem; right: 10%; background: rgba(111, 91, 255, .10); }
.ambient-two { width: 16rem; height: 16rem; bottom: -9rem; left: 4%; background: rgba(13, 196, 157, .08); }

.checkout-shell {
    position: relative;
    width: min(100% - 28px, 880px);
    margin: 0 auto;
    padding: max(18px, env(safe-area-inset-top)) 0 max(28px, env(safe-area-inset-bottom));
}

.checkout-header, .simple-header {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.brand { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand > span:last-child { display: flex; align-items: baseline; gap: 6px; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }
.brand small { color: var(--muted); font-weight: 700; }

.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; }

.language-switcher { position: relative; z-index: 10; }
.language-switcher summary { list-style: none; cursor: pointer; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.76); box-shadow: 0 3px 10px rgba(30,40,80,.04); overflow: hidden; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.language-switcher summary::-webkit-details-marker { display: none; }
.language-switcher summary:hover { border-color: var(--accent); box-shadow: 0 6px 16px rgba(91,79,247,.16); transform: translateY(-1px); }
.language-switcher summary .fi { width: 26px; height: 26px; border-radius: 50%; background-size: cover; background-position: center; }
.language-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); padding: 7px; display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.language-menu a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: 10px; text-decoration: none; transition: background-color .14s ease, transform .14s ease; }
.language-menu a .fi { width: 24px; height: 24px; border-radius: 50%; background-size: cover; background-position: center; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.language-menu a:hover { background: #f0efff; transform: translateY(-1px); }
.language-menu a.active { background: #ebe8ff; box-shadow: inset 0 0 0 1.5px var(--accent); }

.payment-card, .instruction-card, .development-card, .state-card {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,.95);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.payment-card { padding: 22px; margin-bottom: 24px; }
.order-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.eyebrow { display: block; margin-bottom: 3px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; }
.amount { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.amount span { font-size: clamp(31px, 8vw, 46px); line-height: 1.05; font-weight: 780; letter-spacing: -.055em; }
.amount em { color: var(--muted); font-size: 14px; font-style: normal; font-weight: 800; letter-spacing: .04em; }
.secure-note { display: flex; align-items: center; gap: 6px; color: #287d69; padding: 7px 9px; border-radius: 10px; background: #ebfaf6; font-size: 11px; font-weight: 800; white-space: nowrap; }
.secure-note svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.order-description { margin-top: 18px; font-weight: 720; letter-spacing: -.01em; }
.order-reference { margin-top: 5px; color: var(--muted); font-size: 12px; }
.order-reference span { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.methods-section { margin-top: 4px; }
.section-heading { margin: 0 3px 15px; display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.section-heading > div { display: flex; align-items: center; gap: 10px; }
.section-heading h1 { margin: 0; font-size: clamp(21px, 4vw, 27px); letter-spacing: -.035em; }
.section-heading p { max-width: 300px; margin: 0; color: var(--muted); font-size: 13px; text-align: end; }
.step-pill { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: #fff; background: var(--accent); font-size: 13px; font-weight: 850; box-shadow: 0 5px 12px rgba(91,79,247,.24); }

.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.method-form { margin: 0; }
.method-button {
    position: relative;
    width: 100%;
    padding: 18px 18px 46px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    overflow: hidden;
    cursor: pointer;
    color: var(--ink);
    text-align: start;
    font: inherit;
    background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(249,250,255,.92));
    border: 1px solid rgba(32, 41, 73, .10);
    border-radius: 21px;
    box-shadow: 0 6px 18px rgba(39, 43, 83, .055);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.method-button::after { content: ""; position: absolute; width: 110px; height: 110px; inset-inline-end: -55px; top: -55px; border-radius: 50%; background: rgba(91,79,247,.045); }
.method-button:hover { border-color: rgba(91,79,247,.34); background: #fff; box-shadow: 0 16px 32px rgba(53, 49, 114, .13); }
.method-button:active { box-shadow: 0 6px 14px rgba(53,49,114,.10); }
.method-button:focus-visible { outline: 3px solid rgba(91,79,247,.27); outline-offset: 3px; }
.method-icon { width: 100%; aspect-ratio: 1; display: grid; place-items: center; color: var(--accent); padding: 14px; border-radius: 17px; background: linear-gradient(145deg, #eeecff, #f7f6ff); transition: background .18s ease, color .18s ease; }
.method-icon svg { width: 100%; height: 100%; }
.method-button:hover .method-icon { color: var(--accent-deep); background: linear-gradient(145deg, #e2ddff, #d9d4ff); }
.method-copy { display: grid; gap: 5px; width: 100%; }
.method-copy strong { padding-inline-end: 24px; font-size: clamp(14px, 2.4vw, 17px); line-height: 1.16; letter-spacing: -.02em; }
.method-copy > span { color: var(--muted); font-size: clamp(11px, 1.7vw, 12.5px); line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.method-arrow { position: absolute; inset-inline-end: 17px; bottom: 16px; color: #9299ac; font-size: 20px; transition: transform .18s ease, color .18s ease; }
.method-button:hover .method-arrow { color: var(--accent); transform: translateX(3px); }
[dir="rtl"] .method-button:hover .method-arrow { transform: translateX(-3px); }
.method-badge { position: absolute; z-index: 1; top: 12px; inset-inline-end: 12px; max-width: 48%; padding: 4px 7px; color: #087d61; background: #e7faf5; border-radius: 8px; font-size: 9px; line-height: 1.1; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; }

.alert, .empty-state { margin: 0 0 18px; padding: 13px 15px; border: 1px solid #f4cbd3; border-radius: 14px; color: #a22d45; background: #fff2f4; font-size: 13px; }
.alert ul { margin: 0; padding-inline-start: 20px; }
.empty-state { color: var(--muted); border-color: var(--line); background: rgba(255,255,255,.7); }

.checkout-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; padding: 0 5px; color: #7a8397; font-size: 11px; }
.checkout-footer span { display: flex; align-items: center; gap: 6px; }
.checkout-footer svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.simple-header { justify-content: flex-start; }
.back-link { color: #525d73; text-decoration: none; font-size: 13px; font-weight: 750; }
.back-link:hover { color: var(--accent); }
.instruction-card, .development-card, .state-card { max-width: 620px; margin: 4vh auto 0; padding: clamp(24px, 6vw, 42px); }
.instruction-icon, .state-icon { width: 54px; height: 54px; margin-bottom: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #6a5cff, #493bdc); border-radius: 17px; font-size: 27px; font-weight: 800; box-shadow: 0 10px 22px rgba(79,65,220,.22); }
.instruction-card h1, .development-card h1, .state-card h1 { margin: 6px 0 8px; font-size: clamp(27px, 7vw, 38px); line-height: 1.1; letter-spacing: -.045em; }
.instruction-card > p, .development-card > p, .state-card > p { margin: 0; color: var(--muted); }
.payment-details { margin: 26px 0 20px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.payment-details > div { padding: 13px 15px; display: grid; grid-template-columns: minmax(100px, .65fr) 1fr; gap: 16px; border-bottom: 1px solid var(--line); }
.payment-details > div:last-child { border-bottom: 0; }
.payment-details dt { color: var(--muted); font-size: 12px; }
.payment-details dd { margin: 0; overflow-wrap: anywhere; text-align: end; font-weight: 760; font-variant-numeric: tabular-nums; }
.pending-note { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 11px; color: #655c2a; background: #fff9db; border-radius: 12px; font-size: 12px; font-weight: 750; }
.pulse { width: 8px; height: 8px; background: #d7a719; border-radius: 50%; box-shadow: 0 0 0 0 rgba(215,167,25,.35); animation: pulse 1.8s infinite; }

.development-banner { margin: -12px -12px 27px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #795b16; background: #fff5ce; border-radius: 14px; font-size: 11px; }
.development-banner strong { text-transform: uppercase; letter-spacing: .06em; }
.amount.centered { margin: 6px 0 27px; }
.simulation-actions { margin-top: 28px; }
.simulation-actions form { display: grid; gap: 10px; }
.primary-action, .secondary-action { min-height: 50px; padding: 12px 17px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 14px; cursor: pointer; text-decoration: none; font: 760 14px/1.2 inherit; transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.primary-action { color: #fff; background: linear-gradient(135deg, #5f52f7, #4337d2); box-shadow: 0 10px 22px rgba(76,62,217,.21); }
.primary-action:hover, .secondary-action:hover { transform: translateY(-2px); filter: brightness(1.02); }
.primary-action:active, .secondary-action:active { transform: scale(.985); }
.secondary-action { color: #a22d45; background: #fff1f3; border: 1px solid #f6d2d8; }
.success-button { background: linear-gradient(135deg, #19b98c, #0c9672); box-shadow: 0 10px 22px rgba(18,161,121,.19); }

.state-card { text-align: center; }
.state-card.standalone { margin-top: 11vh; }
.state-card .state-icon { margin-inline: auto; }
.state-card .primary-action { width: 100%; margin-top: 25px; }
.success-state .state-icon { background: linear-gradient(145deg, #21c496, #0b9570); box-shadow: 0 10px 22px rgba(18,161,121,.20); }
.failure-state .state-icon { background: linear-gradient(145deg, #e76178, #c83f59); box-shadow: 0 10px 22px rgba(198,59,86,.18); }
.state-icon.muted { color: #777f91; background: #eef0f5; box-shadow: none; font-size: 22px; }

.welcome-card {
    max-width: 760px;
    margin: clamp(18px, 6vh, 58px) auto 0;
    padding: clamp(26px, 6vw, 54px);
    text-align: center;
    background: var(--surface);
    border: 1px solid rgba(255,255,255,.95);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}
.welcome-visual { display: block; width: 100%; height: auto; aspect-ratio: 2098 / 750; margin: 0 auto 22px; border-radius: 18px; object-fit: cover; }
.welcome-card h1 { max-width: 590px; margin: 6px auto 14px; font-size: clamp(31px, 6vw, 48px); line-height: 1.05; letter-spacing: -.055em; }
.welcome-lead { max-width: 610px; margin: 0 auto; color: var(--muted); font-size: clamp(14px, 2.3vw, 17px); line-height: 1.6; }
.welcome-features { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; text-align: start; }
.welcome-features > div { min-height: 158px; padding: 18px; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); border-radius: 18px; background: rgba(249,250,255,.72); }
.feature-icon { width: 34px; height: 34px; margin-bottom: 22px; display: grid; place-items: center; color: var(--accent-deep); background: #eceaff; border-radius: 11px; font-size: 16px; font-weight: 850; }
.welcome-features strong { margin-bottom: 5px; font-size: 13px; letter-spacing: -.01em; }
.welcome-features small { color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.welcome-note { margin-top: 18px; padding: 13px 15px; display: flex; align-items: center; gap: 11px; color: #545d72; text-align: start; background: #f4f5fa; border-radius: 15px; font-size: 12px; }
.welcome-note > span { flex: 0 0 25px; height: 25px; display: grid; place-items: center; color: #fff; background: #7c8497; border-radius: 50%; font: 800 12px/1 serif; }
.welcome-note p { margin: 0; }
.welcome-footer { max-width: 750px; margin-inline: auto; }

@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(215,167,25,0); } 100% { box-shadow: 0 0 0 0 rgba(215,167,25,0); } }

@media (max-width: 640px) {
    .checkout-shell { width: min(100% - 22px, 520px); }
    .payment-card { padding: 18px; border-radius: 20px; }
    .secure-note span { display: none; }
    .section-heading { display: block; }
    .section-heading p { margin: 6px 0 0 38px; text-align: start; }
    [dir="rtl"] .section-heading p { margin: 6px 38px 0 0; }
    .method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
    .method-button { padding: 14px 14px 40px; border-radius: 18px; }
    .method-arrow { inset-inline-end: 13px; bottom: 12px; }
    .checkout-footer { display: grid; justify-content: center; text-align: center; }
    .checkout-footer span { justify-content: center; }
    .instruction-card, .development-card, .state-card { border-radius: 21px; }
    .welcome-card { margin-top: 8px; padding: 28px 20px 22px; border-radius: 22px; }
    .welcome-features { grid-template-columns: 1fr; margin-top: 28px; }
    .welcome-features > div { min-height: auto; display: grid; grid-template-columns: 38px 1fr; column-gap: 11px; align-items: center; }
    .feature-icon { grid-row: 1 / 3; margin: 0; }
    .welcome-features strong { margin: 0; }
    .welcome-note { align-items: flex-start; }
}

@media (max-width: 365px) {
    .method-copy > span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
