:root {
    --brand: #1b4f9c;
    --brand-dark: #143a76;
    --brand-soft: #e8eef8;
    --ink: #10233d;
    --muted: #5b6b80;
    --bg: #eef2f7;
    --paper: #ffffff;
    --line: #d7e0ea;
    --ok: #0f7a56;
    --fail: #b42318;
    --shadow: 0 18px 50px rgba(16, 35, 61, 0.08);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: Manrope, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(900px 420px at 0% 0%, #d9e6f7 0%, transparent 55%),
        radial-gradient(700px 360px at 100% 100%, #dce7f4 0%, transparent 50%),
        var(--bg);
}

.shell {
    width: min(760px, 100%);
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px 16px 28px;
}

.topbar {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.logo-wide {
    display: none;
    height: 58px;
    width: auto;
    max-width: min(420px, 100%);
    object-fit: contain;
}

.logo-mark {
    display: block;
    height: 72px;
    width: auto;
    object-fit: contain;
}

.card {
    width: 100%;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 28px 26px 26px;
    box-shadow: var(--shadow);
    flex: 1;
}

.card-head {
    text-align: center;
    margin-bottom: 26px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.kicker {
    margin: 0 0 8px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 800;
    color: var(--brand);
}

h1 {
    margin: 0;
    font-size: clamp(22px, 4.6vw, 30px);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.lede {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 16px;
}

.field {
    display: block;
    margin-bottom: 16px;
}

.field span,
fieldset.field legend {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.field em {
    font-style: normal;
    color: var(--muted);
    font-weight: 500;
}

input {
    width: 100%;
    border: 1px solid var(--line);
    background: #f8fafc;
    border-radius: 12px;
    padding: 13px 14px;
    font: inherit;
    color: var(--ink);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(27, 79, 156, 0.12);
}

.field.is-invalid input,
.field.is-invalid .mobile-wrap,
.field.is-invalid .method {
    border-color: var(--fail);
}

fieldset.field {
    border: 0;
    padding: 0;
    margin: 0 0 16px;
}

fieldset.field legend {
    padding: 0;
}

.method-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.method {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    background: #f8fafc;
    cursor: pointer;
}

.method:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-soft);
    box-shadow: 0 0 0 4px rgba(27, 79, 156, 0.1);
}

.method input {
    width: auto;
    accent-color: var(--brand);
}

.method span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
}

.method strong { font-size: 14px; }
.method em { font-style: normal; color: var(--muted); font-size: 12px; font-weight: 500; }

.fee-box {
    margin: 4px 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 16px;
    background: #f8fafc;
}

.fee-box div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    color: var(--muted);
    font-size: 14px;
}

.fee-box .fee-total {
    border-top: 1px solid var(--line);
    margin-top: 4px;
    padding-top: 10px;
    color: var(--ink);
    font-weight: 700;
}

.fee-box strong { color: var(--ink); }

.mobile-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
    overflow: hidden;
}

.mobile-wrap:focus-within {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(27, 79, 156, 0.12);
}

.mobile-wrap .prefix {
    padding: 0 0 0 14px;
    color: var(--muted);
    font-weight: 700;
}

.mobile-wrap input {
    border: 0;
    box-shadow: none;
    background: transparent;
}

.hint {
    display: none;
    margin-top: 6px;
    color: var(--fail);
    font-size: 13px;
}

.field.is-invalid .hint { display: block; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 4px;
    border: 0;
    border-radius: 12px;
    padding: 14px 18px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: 0.7; cursor: wait; }
.btn-secondary { background: var(--ink); }

.secure-note {
    margin: 14px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.site-foot {
    text-align: center;
    margin-top: 16px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.site-foot p { margin: 0; }

.result-card { text-align: center; }
.result-card .card-head { border: 0; padding-bottom: 0; margin-bottom: 8px; }

.status-icon {
    width: 58px;
    height: 58px;
    margin: 4px auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
}

.status-icon.ok { background: var(--ok); }
.status-icon.fail { background: var(--fail); }

.receipt {
    margin: 22px 0 8px;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px 16px;
    background: #f8fafc;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    color: var(--muted);
}

.receipt-row:last-child { border-bottom: 0; }

.receipt-row strong {
    color: var(--ink);
    text-align: right;
    word-break: break-word;
}

.receipt-row.highlight strong {
    font-size: 16px;
}

.text-ok { color: var(--ok); }
.text-fail { color: var(--fail); }

.error-list {
    text-align: left;
    color: var(--fail);
    line-height: 1.5;
}

@media (min-width: 640px) {
    .shell { padding: 28px 20px 36px; }
    .logo-wide { display: block; }
    .logo-mark { display: none; }
    .card { padding: 34px 36px 32px; }
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .method-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 639px) {
    .card { padding: 22px 16px 20px; }
    .topbar { padding: 8px 12px; }
    .receipt-row { flex-direction: column; gap: 4px; }
    .receipt-row strong { text-align: left; }
}
