:root {
    --bg: #eef2f6;
    --card: #ffffff;
    --ink: #122033;
    --muted: #5d6b7c;
    --line: #dce3ec;
    --soft: #f5f8fb;
    --brand: #0f6e56;
    --brand-2: #148f6e;
    --brand-soft: #e6f5ef;
    --warn: #9a3412;
    --warn-bg: #fff4ed;
    --ok: #166534;
    --ok-bg: #ecfdf3;
    --shadow: 0 18px 50px rgba(18, 32, 51, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Segoe UI", "Inter", Roboto, Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top right, #d9efe6 0, transparent 32%),
        linear-gradient(180deg, #f7fafc 0%, var(--bg) 100%);
}

.page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 16px 40px;
}

.card {
    width: min(720px, 100%);
    background: var(--card);
    border: 1px solid #e7eef4;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card header {
    padding: 28px 28px 18px;
    background:
        linear-gradient(180deg, #f3fbf7 0%, #ffffff 88%);
    border-bottom: 1px solid var(--line);
}

.eyebrow {
    margin: 0 0 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 5px var(--brand-soft);
}

h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.sub {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 28px;
    margin-top: 16px;
}

.facts p {
    margin: 0;
}

.facts span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.facts strong {
    display: block;
    margin-top: 4px;
    font-size: 16px;
}

form {
    padding: 22px 28px 28px;
}

.amount-label,
h2 {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

h2 {
    margin-top: 0;
}

.routes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.route {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    min-height: 196px;
    padding: 14px 8px 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
}

.route:hover {
    border-color: #bfd0dc;
}

.route.selected {
    border-color: var(--brand);
    background: var(--brand-soft);
    box-shadow: inset 0 0 0 1px var(--brand);
}

.route:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.58;
    background: #f8fafc;
}

.route input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.meta {
    min-width: 0;
    width: 100%;
}

.meta strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.limit {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.rate {
    --rate: #0f6e56;
    display: grid;
    justify-items: center;
    gap: 4px;
}

.rate-mid {
    --rate: #ca8a04;
}

.rate-low {
    --rate: #c2410c;
}

.rate-ring {
    position: relative;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--rate) calc(var(--p) * 1%), #e4ebf1 0);
}

.rate-ring::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: #fff;
}

.route.selected .rate-ring::before {
    background: var(--brand-soft);
}

.rate-ring span {
    position: relative;
    z-index: 1;
    font-size: 10px;
    font-weight: 800;
    color: var(--rate);
}

.rate em {
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.badge {
    min-height: 16px;
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
}

.route:has(input:disabled) .badge {
    color: var(--muted);
}

.empty,
.error,
.result {
    margin: 12px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
}

.routes .empty {
    grid-column: 1 / -1;
    margin: 0;
}

.empty,
.error {
    background: var(--warn-bg);
    color: var(--warn);
}

.result {
    background: var(--ok-bg);
    color: var(--ok);
}

.pay {
    width: 100%;
    margin-top: 18px;
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(180deg, var(--brand-2), var(--brand));
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.pay:hover:not(:disabled) {
    filter: brightness(1.05);
}

.pay:disabled {
    cursor: not-allowed;
    background: #c5d0d8;
    color: #6b7784;
}

@media (max-width: 520px) {
    .card header,
    form {
        padding-left: 18px;
        padding-right: 18px;
    }

    h1 {
        font-size: 26px;
    }

    .routes {
        gap: 6px;
    }

    .route {
        min-height: 176px;
        padding: 10px 4px;
        border-radius: 12px;
    }

    .mark {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .meta strong {
        font-size: 12px;
    }

    .limit,
    .badge {
        font-size: 10px;
    }
}
