:root {
    color-scheme: light;
    --ink: #202328;
    --muted: #626b75;
    --line: #d9dde3;
    --paper: #ffffff;
    --surface: #f4f7f5;
    --accent: #e8533f;
    --accent-dark: #bf3e2d;
    --mint: #1f7a6b;
    --mint-soft: #dff2ec;
    --sky: #dcecff;
    --shadow: 0 22px 60px rgba(31, 45, 61, 0.14);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        linear-gradient(135deg, rgba(220, 236, 255, 0.72), rgba(223, 242, 236, 0.62)),
        var(--surface);
}

button,
input,
a {
    font: inherit;
}

.connect-shell {
    width: min(1120px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(280px, 0.88fr) minmax(320px, 1.12fr);
    gap: 18px;
    align-items: center;
    padding: 32px 0;
}

.intro-panel,
.steps-panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(32, 35, 40, 0.08);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.intro-panel {
    min-height: 520px;
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.steps-panel {
    padding: 20px;
    display: grid;
    gap: 14px;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
}

.brand-logo {
    width: 58px;
    height: 58px;
    border-radius: 8px;
    object-fit: cover;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--mint);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

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

h1 {
    margin-bottom: 0;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.94;
    letter-spacing: 0;
}

.intro-copy {
    max-width: 520px;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.55;
}

.status-line {
    width: fit-content;
    max-width: 100%;
    margin-bottom: 18px;
    padding: 9px 12px;
    border: 1px solid rgba(31, 122, 107, 0.24);
    border-radius: 8px;
    color: var(--mint);
    background: var(--mint-soft);
    font-size: 14px;
    font-weight: 700;
}

.status-line.is-error {
    color: var(--accent-dark);
    border-color: rgba(232, 83, 63, 0.28);
    background: #ffe6df;
}

.primary-action,
.secondary-action,
.copy-action {
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 800;
    letter-spacing: 0;
    transition: transform 160ms ease, background 160ms ease, color 160ms ease, opacity 160ms ease;
}

.primary-action {
    width: min(100%, 310px);
    color: #ffffff;
    background: var(--accent);
    box-shadow: 0 12px 24px rgba(232, 83, 63, 0.24);
}

.primary-action:hover,
.secondary-action:hover,
.copy-action:hover {
    transform: translateY(-1px);
}

.primary-action:disabled,
.copy-action:disabled {
    cursor: default;
    opacity: 0.58;
    transform: none;
}

.primary-action:not(:disabled):hover {
    background: var(--accent-dark);
}

.button-icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    line-height: 1;
    background: rgba(255, 255, 255, 0.22);
}

.step-block {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.step-number {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: var(--ink);
    font-weight: 900;
}

.step-content {
    min-width: 0;
}

.step-content h2 {
    margin-bottom: 8px;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: 0;
}

.step-content p {
    color: var(--muted);
    line-height: 1.5;
}

.secondary-action {
    min-width: min(100%, 260px);
    padding: 0 16px;
    color: var(--ink);
    background: var(--sky);
}

.secondary-action .button-icon,
.copy-action .button-icon {
    color: #ffffff;
    background: var(--mint);
}

.copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

#subscription-link {
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #f8fafb;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 14px;
}

.copy-action {
    padding: 0 14px;
    color: #ffffff;
    background: var(--mint);
}

.copy-action.is-done {
    background: #16805c;
}

.hint {
    margin: 10px 0 0;
    font-size: 14px;
}

@media (max-width: 820px) {
    .connect-shell {
        width: min(100% - 20px, 560px);
        min-height: auto;
        grid-template-columns: 1fr;
        align-items: stretch;
        padding: 18px 0;
    }

    .intro-panel {
        min-height: 0;
        padding: 24px;
    }

    .steps-panel {
        padding: 12px;
    }

    h1 {
        font-size: 48px;
    }

    .intro-copy {
        font-size: 16px;
    }

    .copy-row {
        grid-template-columns: 1fr;
    }

    .copy-action,
    .secondary-action,
    .primary-action {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .brand-row {
        align-items: flex-start;
    }

    .brand-logo {
        width: 48px;
        height: 48px;
    }

    h1 {
        font-size: 40px;
    }

    .step-block {
        grid-template-columns: 1fr;
        padding: 18px;
    }
}
