:root {
    --background: #ffffff;
    --accent: #233960;
    --accent-hover: #132b55;
    --accent-2: #d2d8e7;
    --accent-3: #5e729f;
    --button-hover: #506491;
    --line: #e6e6e6;
    --black: #1d1d1d;
    --secondary: #8e8e8e;
    --error: #ea3b36;
    --radius: 20px;
    --page-x: 40px;
}

* {
    box-sizing: border-box;
}

body {
    position: relative;
    margin: 0;
    color: var(--black);
    background: var(--accent);
    font-family: "Manrope", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.45;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(
            180deg,
            rgba(35, 57, 96, 0.04) 0%,
            rgba(35, 57, 96, 0.76) 100%
        ),
        url("assets/sds-lines.svg") 0 0 / cover no-repeat,
        var(--accent);
    content: "";
    pointer-events: none;
}

main {
    position: relative;
    z-index: 1;
}

button {
    font: inherit;
}

.boundary {
    width: 100%;
    max-width: none;
    margin: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    min-height: 72px;
    padding: 14px var(--page-x);
    color: #ffffff;
    background: transparent;
    backdrop-filter: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: inherit;
    text-decoration: none;
}

.brand__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 67px;
    height: 25px;
}

.brand__logo img,
.brand__logo svg {
    display: block;
    width: 67px;
    height: 25px;
}

.brand__text {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 500;
}

.screen {
    position: relative;
    overflow: hidden;
    display: none;
    min-height: calc(100vh - 72px);
    padding: 64px var(--page-x);
    background: transparent;
}

.screen--active {
    display: block;
}

.screen--wallet {
    background: transparent;
}

.screen > * {
    position: relative;
    z-index: 0;
}

.wallet-screen {
    display: grid;
    min-height: calc(100vh - 200px);
    align-content: center;
}

.hero {
    padding: 0 0 42px;
    color: #ffffff;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--accent-2);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    max-width: none;
    margin-bottom: 28px;
    color: #ffffff;
    font-size: clamp(42px, 4.4vw, 68px);
    font-weight: 500;
    line-height: 0.92;
}

#instructionTitle {
    max-width: 100%;
    font-size: clamp(40px, 4.2vw, 60px);
    overflow-wrap: normal;
}

h2 {
    margin-bottom: 14px;
    color: #ffffff;
    font-size: clamp(30px, 3vw, 48px);
    font-weight: 500;
    line-height: 1;
}

.hero p:not(.eyebrow),
#instructionLead {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 22px;
}

.wallet-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(320px, 520px));
    gap: 16px;
    justify-content: start;
}

.wallet-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    min-height: 230px;
    padding: 28px;
    text-align: left;
    text-decoration: none;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius);
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.wallet-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.34);
    transform: translateY(-2px);
}

.wallet-card--featured {
    min-height: 220px;
}

.wallet-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    color: #ffffff;
    background: var(--accent);
    border-radius: 18px;
    font-size: 22px;
    font-weight: 700;
}

.wallet-card__icon--image {
    overflow: hidden;
    background: transparent;
    box-shadow: none;
}

.wallet-card__icon--image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wallet-card strong {
    color: #ffffff;
    font-size: 26px;
    line-height: 1.05;
}

.wallet-card small {
    display: block;
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 15px;
}

.wallet-card__content {
    display: block;
    min-width: 0;
}

.slider-shell {
    display: grid;
    gap: 20px;
    width: 100%;
}

.slider-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
}

.back-button,
.copy-button,
.nav-button,
.step-counter {
    min-height: 40px;
    padding: 9px 18px;
    border-radius: 100px;
    font-weight: 700;
}

.back-button,
.copy-button,
.nav-button {
    color: var(--accent-3);
    background: #ffffff;
    border: 1px solid var(--accent-3);
    cursor: pointer;
    text-decoration: none;
}

.back-button:hover,
.copy-button:hover,
.copy-button.is-copied,
.nav-button:hover {
    color: #ffffff;
    background: var(--accent-3);
}

.step-counter {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.instruction-card {
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
    gap: 22px;
    min-height: 650px;
    padding: 28px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(35, 57, 96, 0.94);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    width: 100%;
}

.instruction-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 22px;
}

.current-step {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 18px;
    margin-top: auto;
    padding-top: 40px;
}

.current-step > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    color: var(--accent);
    background: #ffffff;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 800;
}

.current-step p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 20px;
}

.step-body {
    display: grid;
    gap: 14px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 20px;
}

.step-body p {
    margin: 0;
}

.step-details {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 22px;
    color: rgba(255, 255, 255, 0.82);
}

.step-details li {
    overflow-wrap: anywhere;
}

.step-warning {
    padding: 14px 16px;
    color: #ffffff;
    background: var(--error);
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
}

.slider-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.nav-button {
    min-width: 130px;
}

.nav-button--primary {
    color: #ffffff;
    background: var(--accent-3);
}

.nav-button:disabled {
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    cursor: default;
}

.visual-panel {
    display: grid;
    grid-template-rows: 10px minmax(0, 1fr);
    gap: 18px;
    min-width: 0;
    min-height: 0;
    padding-right: 0;
}

.slide-progress {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 100px;
}

.slide-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: #ffffff;
    border-radius: inherit;
    transition: width 0.25s ease;
}

.slide-images {
    display: flex;
    gap: 16px;
    min-height: 0;
    max-height: 620px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior: contain;
    padding: 0 18px 12px 0;
    scroll-padding-right: 18px;
    scroll-snap-type: x mandatory;
    scrollbar-color: rgba(255, 255, 255, 0.72) rgba(255, 255, 255, 0.16);
    scrollbar-width: thin;
    cursor: grab;
    user-select: none;
    touch-action: pan-x pan-y;
}

.slide-images.is-dragging {
    cursor: grabbing;
}

.slide-images::-webkit-scrollbar {
    height: 8px;
}

.slide-images::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 100px;
}

.slide-images::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.72);
    border-radius: 100px;
}

.slide-image {
    flex: 0 0 min(82vw, 760px);
    overflow: hidden;
    display: flex;
    min-height: 520px;
    max-height: 620px;
    max-width: 100%;
    width: min(82vw, 760px);
    margin: 0;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    scroll-snap-align: start;
}

.slide-image:only-child {
    flex-basis: 100%;
    width: 100%;
}

.slide-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
}

.network-card {
    padding: 28px;
    color: #ffffff;
    background: rgba(19, 43, 85, 0.92);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    width: 100%;
}

.network-card__heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: 18px;
    align-items: end;
    margin-bottom: 20px;
}

.network-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.network-row {
    display: grid;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
}

.network-row span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 13px;
    font-weight: 700;
}

.network-row code {
    color: #ffffff;
    font-family: "Manrope", Arial, sans-serif;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.network-row .copy-button {
    width: fit-content;
}

.warning {
    padding: 16px;
    color: #ffffff;
    background: var(--error);
    border-radius: 14px;
    font-weight: 700;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 30;
    max-width: min(380px, calc(100vw - 40px));
    padding: 14px 18px;
    color: #ffffff;
    background: var(--accent-hover);
    border-radius: 14px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1279px) {
    .wallet-grid {
        grid-template-columns: minmax(320px, 520px);
    }

    .instruction-card,
    .network-card__heading,
    .network-list {
        grid-template-columns: 1fr;
    }

    .slide-image {
        min-height: 420px;
    }
}

@media (max-width: 767px) {
    :root {
        --page-x: 16px;
    }

    .boundary {
        width: 100%;
        margin: 0;
    }

    .brand__text {
        display: none;
    }

    .screen {
        padding: 34px var(--page-x);
    }

    .hero,
    .instruction-card,
    .network-card,
    .wallet-card {
        border-radius: 16px;
    }

    .hero {
        padding: 0 0 28px;
    }

    .hero p:not(.eyebrow),
    #instructionLead {
        font-size: 18px;
    }

    .wallet-grid {
        grid-template-columns: 1fr;
    }

    .wallet-card {
        grid-template-columns: 1fr;
        min-height: 180px;
    }

    .wallet-card--featured {
        min-height: 200px;
    }

    .instruction-card {
        padding: 18px;
    }

    .instruction-copy {
        padding: 10px;
    }

    .current-step {
        grid-template-columns: 1fr;
        padding-top: 24px;
    }

    .slide-image {
        flex-basis: calc(100vw - (var(--page-x) * 2) - 54px);
        width: calc(100vw - (var(--page-x) * 2) - 54px);
        min-height: 360px;
    }

    .slider-actions,
    .nav-button {
        width: 100%;
    }

    .network-card {
        padding: 22px;
    }

    .network-row .copy-button {
        width: 100%;
    }
}
