:root {
    --ink: #0a0a0a;
    --muted: #5c5c5c;
    --soft: #6d6d6d;
    --paper: #f7f7f5;
    --card: #ffffff;
    --line: rgba(10, 10, 10, 0.12);
    --red: #ed1c24;
    --red-deep: #d01920;
    --field: #ffffff;
    --panel: #f3f3f1;
    --warn: #8a4b12;
    --warn-bg: #fff4e8;
    --danger: #9f1239;
    --shadow: 0 28px 70px rgba(10, 10, 10, 0.07);
    --button-shadow: 0 10px 24px rgba(225, 6, 0, 0.35);
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--ink);
    background: var(--paper);
    font-family: "Instrument Sans", "Segoe UI", sans-serif;
    overflow-x: hidden;
}

.site-header,
.site-footer {
    background: var(--paper);
}

.announce {
    margin: 0;
    padding: 14px 20px 0;
    color: var(--ink);
    font-size: 0.92rem;
    line-height: 1.4;
    text-align: center;
}

.page {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
}

.canvas {
    background-color: var(--paper);
    background-image:
        linear-gradient(rgba(10, 10, 10, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10, 10, 10, 0.07) 1px, transparent 1px);
    background-size: 56px 56px;
    padding: 8px 0 72px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0 22px;
}

.brand {
    display: flex;
    align-items: center;
    min-width: 0;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: min(168px, 46vw);
    height: auto;
}

.brand-logo-small {
    width: min(140px, 40vw);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    background: transparent;
    color: var(--ink);
    padding: 0;
    font-family: "Instrument Sans", "Segoe UI", sans-serif;
    font-size: clamp(1.7rem, 4vw, 2.15rem);
    font-style: italic;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
}

.mark-o {
    display: inline-block;
    width: 0.72em;
    height: 0.56em;
    margin: 0 0.03em 0 0.02em;
    border: 0.11em solid var(--red);
    border-radius: 999px;
    background: transparent;
    box-sizing: border-box;
    flex: 0 0 auto;
}

.mark-z {
    color: var(--red);
    margin-left: -0.02em;
}

.top-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.secure,
.env {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1;
}

.secure { padding: 11px 16px; }

.env {
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 700;
}

.env-uat { color: var(--red); }

.env-production {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.shell {
    display: grid;
    gap: 22px;
}

.hero,
.card,
.facts article,
.steps li {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.hero,
.card {
    padding: 36px 32px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 7px 12px 7px 8px;
    border-radius: 999px;
    background: #f3f3f1;
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.pill-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, #fff 0 3px, transparent 3.5px),
        var(--red);
    box-shadow: inset 0 0 0 5px #ffe4e6;
}

h1 {
    margin: 0;
    max-width: 14ch;
    font-size: clamp(2.6rem, 6.4vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 0.98;
}

.lede,
.about p,
.facts p,
.fine,
.notice {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.about { margin-top: 16px; max-width: 46rem; }
.about p { margin: 0 0 12px; }
.lede { margin: 12px 0 0; }

.pay-panel {
    margin-top: 26px;
    padding: 18px;
    border-radius: 18px;
    background: var(--panel);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-head p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.chip {
    border-radius: 999px;
    background: #ffe4e6;
    color: var(--red);
    padding: 4px 8px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

fieldset {
    border: 0;
    margin: 0 0 4px;
    padding: 0;
}

legend {
    margin-bottom: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--soft);
}

label {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 600;
}

input, select, button { font: inherit; }

input, select {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--field);
    color: var(--ink);
    color-scheme: light;
    font-size: 16px;
    padding: 12px 14px;
}

select option {
    background: #fff;
    color: var(--ink);
}

input:focus, select:focus {
    outline: 2px solid rgba(237, 28, 36, 0.28);
    border-color: var(--red);
}

input::placeholder { color: #9a9a9a; }

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.amount {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--field);
    padding-left: 14px;
}

.amount span {
    color: var(--red);
    font-weight: 800;
}

.amount input {
    min-width: 0;
    border: 0;
    padding-left: 0;
    background: transparent;
}

.amount input:focus { outline: none; }

.amount:focus-within {
    outline: 2px solid rgba(237, 28, 36, 0.28);
    border-color: var(--red);
}

button, a.button, .text-link { border-radius: 999px; }

a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 52px;
    padding: 14px 22px;
    background: var(--red);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    box-shadow: var(--button-shadow);
}

a.button:hover { background: var(--red-deep); }

button {
    width: 100%;
    min-height: 52px;
    border: 0;
    background: var(--red);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 18px;
    box-shadow: var(--button-shadow);
}

button:hover { background: var(--red-deep); }
button:disabled { opacity: 0.7; cursor: progress; }

button.secondary,
a.button.secondary {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: none;
}

button.secondary:hover,
a.button.secondary:hover { background: #fafafa; }

.fine { margin: 12px 2px 0; font-size: 0.9rem; }

.notice {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 0.9rem;
}

.notice-warn {
    background: var(--warn-bg);
    border-color: #f3d2b0;
    color: var(--warn);
}

.notice ul { margin: 0; padding-left: 18px; }

.mono {
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.steps li {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 16px 18px;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.3;
    box-shadow: rgba(255, 255, 255, 0.8) 0 1px 0 inset, 0 18px 40px rgba(10, 10, 10, 0.05);
}

.steps span {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
}

.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.facts article {
    padding: 20px 22px;
    box-shadow: rgba(255, 255, 255, 0.8) 0 1px 0 inset, 0 18px 40px rgba(10, 10, 10, 0.05);
}

.facts p { margin: 0; font-size: 0.98rem; }
.facts a { color: var(--ink); font-weight: 700; text-decoration: none; }
.facts a:hover { color: var(--red); }

.fact-label {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.result-shell { justify-content: center; }
.result-card h1 { max-width: none; font-size: clamp(2.2rem, 5vw, 3.2rem); }

.amount-hero {
    margin: 18px 0 0;
    color: var(--ink);
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1;
}

.amount-hero span {
    color: var(--red);
    font-size: 0.48em;
    letter-spacing: 0.04em;
}

.status {
    display: inline-block;
    margin: 0 0 14px;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-paid { background: var(--red); color: #fff; }
.status-authorized, .status-initiated, .status-pending { background: #fff4e8; color: var(--warn); }
.status-failed, .status-unmatched { background: #ffe4e6; color: var(--danger); }

.receipt {
    display: grid;
    gap: 0;
    margin: 22px 0 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: var(--panel);
}

.receipt div {
    display: grid;
    grid-template-columns: minmax(110px, 160px) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}

.receipt div:last-child { border-bottom: 0; }
.receipt dt { color: var(--soft); font-size: 0.86rem; }
.receipt dd { margin: 0; min-width: 0; font-weight: 600; }

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}

.actions form { flex: 1 1 180px; }
.actions .button { flex: 1 1 200px; }
.text-link { color: var(--red); font-weight: 700; padding: 8px 0; }

.wordmark-small { font-size: 1.35rem; }

.site-footer {
    margin-top: 0;
    padding: 28px 0 8px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px 32px;
}

.footer-brand p,
.site-footer p { margin: 0 0 4px; }

.footer-brand { display: grid; gap: 8px; align-content: start; }
.footer-brand .brand { justify-self: start; }
.footer-brand strong { color: var(--ink); font-weight: 700; }

.footer-label {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.footer-label-spaced { margin-top: 18px; }

.site-footer a { color: var(--ink); font-weight: 700; text-decoration: none; }
.site-footer a:hover { color: var(--red); }

.footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px 24px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--soft);
    font-size: 0.82rem;
}

.footer-credit { text-align: center; }
.footer-credit a { color: var(--red); font-weight: 700; }
.footer-credit a:hover { color: var(--ink); }

@media (max-width: 900px) {
    .steps, .facts, .footer-grid { grid-template-columns: 1fr; }
    h1 { max-width: none; }
}

@media (max-width: 640px) {
    .page { width: min(1080px, calc(100% - 24px)); }
    .announce { padding-top: 12px; font-size: 0.82rem; }
    .secure { display: none; }
    .hero, .card { padding: 22px 16px; border-radius: 20px; }
    .pay-panel { padding: 14px; }
    .grid { grid-template-columns: 1fr; }
    .panel-head { align-items: flex-start; flex-direction: column; }
    .receipt div { grid-template-columns: 1fr; gap: 4px; }
    .actions { display: grid; }
    .actions form, .actions .button { width: 100%; }
    .footer-grid, .footer-bar { display: grid; grid-template-columns: 1fr; }
    .footer-bar { gap: 6px; }
}

@media (max-width: 380px) {
    .page { width: min(1080px, calc(100% - 16px)); }
    h1 { font-size: 2.15rem; }
}
