:root {
    --bg: #f3ede3;
    --bg-deep: #e5d6bf;
    --surface: rgba(255, 251, 245, 0.78);
    --surface-strong: #fffaf2;
    --text: #24332b;
    --muted: #5e6d60;
    --line: rgba(99, 111, 92, 0.22);
    --brand: #2d5b47;
    --brand-hover: #214435;
    --brand-soft: #dfe8df;
    --accent: #b8884b;
    --danger-bg: #fff0ec;
    --danger-text: #8b3a2e;
    --ok-bg: #edf7ef;
    --ok-text: #2d6840;
    --shadow: 0 24px 60px rgba(60, 54, 33, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI Variable Text", "Trebuchet MS", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.72), transparent 34%),
        radial-gradient(circle at bottom right, rgba(184, 136, 75, 0.2), transparent 26%),
        linear-gradient(180deg, #f9f4eb 0%, var(--bg) 56%, #efe6d7 100%);
    color: var(--text);
    min-height: 100vh;
}

.container {
    width: min(1180px, 92vw);
    margin: 0 auto;
}

.site-header {
    border-bottom: 1px solid rgba(77, 94, 81, 0.12);
    background: rgba(249, 244, 235, 0.72);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0;
}

.brand-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-kicker,
.card-kicker,
.hero-badge,
.intro-modal__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
}

h1 {
    margin: 0;
    font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
}

main.container {
    padding: 44px 0 72px;
}

.gateway-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.1fr) minmax(360px, 0.9fr);
    gap: 28px;
    align-items: start;
}

.hero-panel,
.card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.hero-panel {
    padding: 36px;
    min-height: 100%;
    background:
        linear-gradient(160deg, rgba(255, 250, 242, 0.95), rgba(239, 228, 209, 0.88)),
        linear-gradient(180deg, #fef9f0, #f2e7d6);
}

.hero-panel::after,
.auth-card::after {
    content: "";
    position: absolute;
    inset: auto -80px -80px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(184, 136, 75, 0.18), transparent 68%);
    pointer-events: none;
}

.hero-panel h2,
.auth-card h3,
.verify-header h4,
.intro-modal__dialog h3 {
    margin: 0;
    font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
    font-weight: 700;
    line-height: 1.08;
}

.hero-panel h2 {
    margin-top: 14px;
    font-size: clamp(34px, 5vw, 56px);
    max-width: 12ch;
}

.hero-text {
    margin: 20px 0 0;
    max-width: 58ch;
    font-size: 17px;
    line-height: 1.65;
    color: var(--muted);
}

.hero-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.fact-card {
    padding: 18px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid rgba(99, 111, 92, 0.18);
}

.fact-value {
    display: block;
    margin-bottom: 6px;
    font-size: 22px;
    font-weight: 700;
    color: var(--brand);
}

.fact-label {
    display: block;
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
}

.hero-note {
    margin-top: 24px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(45, 91, 71, 0.07);
    border: 1px solid rgba(45, 91, 71, 0.12);
    line-height: 1.6;
}

.card {
    background: var(--surface);
    backdrop-filter: blur(14px);
    padding: 30px;
}

.auth-card {
    background:
        linear-gradient(180deg, rgba(255, 251, 245, 0.88), rgba(252, 246, 237, 0.78));
}

.card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.auth-card h3 {
    margin-top: 10px;
    font-size: clamp(28px, 4vw, 40px);
}

.readonly-field {
    margin: 18px 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 230px;
}

.readonly-field.compact {
    margin: 0;
    text-align: left;
}

.readonly-field span {
    font-size: 12px;
    color: var(--muted);
}

.steps-row {
    display: flex;
    gap: 12px;
    margin: 24px 0;
}

.step-chip {
    flex: 1;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid rgba(99, 111, 92, 0.12);
    color: var(--muted);
}

.step-chip span {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    letter-spacing: 0.12em;
}

.step-chip.active {
    background: linear-gradient(180deg, rgba(45, 91, 71, 0.12), rgba(45, 91, 71, 0.06));
    border-color: rgba(45, 91, 71, 0.24);
    color: var(--text);
}

.panel-form + .panel-form {
    margin-top: 18px;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field-block.full-width,
.code-field {
    grid-column: 1 / -1;
}

.verify-panel {
    padding-top: 22px;
    border-top: 1px solid rgba(99, 111, 92, 0.14);
}

.verify-header {
    margin-bottom: 14px;
}

.verify-header h4 {
    font-size: 26px;
}

.verify-header p {
    margin: 10px 0 0;
    color: var(--muted);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(100, 111, 92, 0.24);
    font-size: 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.82);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus {
    outline: none;
    border-color: rgba(45, 91, 71, 0.55);
    box-shadow: 0 0 0 4px rgba(45, 91, 71, 0.12);
    transform: translateY(-1px);
}

.button {
    border: 0;
    border-radius: 999px;
    padding: 13px 18px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(135deg, var(--brand), #46745b);
    box-shadow: 0 14px 26px rgba(45, 91, 71, 0.22);
}

.button-primary:hover {
    background: var(--brand-hover);
}

.button-secondary {
    background: linear-gradient(135deg, var(--accent), #c69a5e);
    box-shadow: 0 14px 26px rgba(184, 136, 75, 0.22);
}

.button-secondary:hover {
    background: #a8783d;
}

.button-wide {
    width: 100%;
    margin-top: 20px;
}

.message {
    padding: 14px 16px;
    border-radius: 16px;
    margin-top: 16px;
    border: 1px solid transparent;
}

.message-error {
    background: var(--danger-bg);
    color: var(--danger-text);
    border-color: rgba(139, 58, 46, 0.12);
}

.message-success {
    background: var(--ok-bg);
    color: var(--ok-text);
    border-color: rgba(45, 104, 64, 0.12);
}

.validation {
    display: block;
    margin-top: 6px;
    color: var(--danger-text);
    font-size: 13px;
}

.intro-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 50;
}

.intro-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.intro-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(32, 41, 33, 0.46);
    backdrop-filter: blur(8px);
}

.intro-modal__dialog {
    position: relative;
    width: min(680px, calc(100vw - 32px));
    padding: 32px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 251, 245, 0.98), rgba(247, 239, 225, 0.96));
    border: 1px solid rgba(99, 111, 92, 0.16);
    box-shadow: 0 30px 80px rgba(30, 26, 16, 0.28);
}

.intro-modal__dialog h3 {
    margin-top: 10px;
    font-size: clamp(28px, 4vw, 42px);
}

.intro-modal__dialog p {
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.intro-modal__list {
    margin: 18px 0 24px;
    padding-left: 20px;
    color: var(--text);
    line-height: 1.8;
}

.intro-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(45, 91, 71, 0.08);
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
}

@media (max-width: 720px) {
    .site-header .container,
    .card-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .gateway-grid,
    .hero-facts,
    .field-grid {
        grid-template-columns: 1fr;
    }

    .hero-panel,
    .card,
    .intro-modal__dialog {
        padding: 22px;
    }

    .steps-row {
        flex-direction: column;
    }
}
