.install-body {
    min-height: 100vh;
    background: var(--bg);
}

html[data-theme="dark"] .install-body {
    background:
        radial-gradient(900px 420px at 0% 0%, #16332c 0%, transparent 55%),
        var(--bg);
}

.install-shell {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    min-height: 100vh;
}

.install-rail {
    padding: 2rem 1.5rem;
    border-right: 1px solid var(--line);
    background: var(--bg-elevated);
}

.install-brand {
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.install-kicker {
    margin: 0.2rem 0 1.75rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.stepper {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
}

.stepper li {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    color: var(--muted);
}

.stepper .step-num {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    flex: 0 0 auto;
}

.stepper .is-current {
    color: var(--text);
}

.stepper .is-current .step-num {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: var(--accent);
    font-weight: 700;
}

.install-stage {
    display: flex;
    align-items: flex-start;
    padding: 2.5rem 1.25rem 3rem;
}

.install-card {
    width: min(720px, 100%);
    margin: 0 auto;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.6rem 1.7rem 1.8rem;
}

.install-points,
.review-list {
    margin: 0 0 1.4rem;
    padding: 0;
}

.install-points {
    padding-left: 1.1rem;
    color: var(--muted);
}

.install-points li + li {
    margin-top: 0.4rem;
}

.install-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1.4rem;
}

.button-quiet {
    display: inline-flex;
    align-items: center;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.65rem 1rem;
    font: inherit;
    cursor: pointer;
}

.button-quiet:hover,
.button-quiet:focus-visible {
    text-decoration: none;
    border-color: var(--muted);
}

button.button {
    font: inherit;
    border: 0;
    cursor: pointer;
}

button.button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.1rem;
}

.form-grid label,
.form-grid .wide {
    display: grid;
    gap: 0.35rem;
}

.form-grid .wide {
    grid-column: 1 / -1;
}

.form-grid span {
    font-size: 0.86rem;
    color: var(--muted);
}

.form-grid input,
.form-grid select {
    width: 100%;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.7rem 0.75rem;
    font: inherit;
    min-height: 2.9rem;
}

.form-grid input:focus,
.form-grid select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.field-error {
    color: var(--danger);
}

.field-feedback {
    display: block;
    min-height: 1.35rem;
    font-size: 0.82rem;
}

.auth-shell {
    width: min(560px, 100%);
}

.auth-password-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.1rem;
    grid-column: 1 / -1;
    align-items: start;
}

.auth-field {
    display: grid;
    grid-template-rows: auto 2.9rem 1.35rem;
    gap: 0.35rem;
    min-width: 0;
}

.auth-field > span:first-child {
    font-size: 0.86rem;
    color: var(--muted);
}

.auth-social {
    margin-top: 1.25rem;
    display: grid;
    gap: 0.65rem;
}

.auth-social-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
    margin: 0.25rem 0 0.35rem;
    color: var(--muted, #667085);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.auth-social-divider::before,
.auth-social-divider::after {
    content: "";
    height: 1px;
    background: color-mix(in srgb, currentColor 28%, transparent);
}

.auth-social-btn {
    display: flex;
    justify-content: center;
    width: 100%;
    text-align: center;
}

.auth-secret {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    min-height: 2.9rem;
    width: 100%;
}

.auth-secret input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 2.9rem;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.auth-toggle {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-left: 0;
    background: var(--bg-soft);
    color: var(--muted);
    border-radius: 0 10px 10px 0;
    padding: 0 0.85rem;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 650;
    cursor: pointer;
    white-space: nowrap;
}

.auth-toggle:hover,
.auth-toggle:focus-visible {
    color: var(--text);
    background: color-mix(in srgb, var(--accent) 12%, var(--bg-soft));
}

html[data-theme="light"] .auth-card,
html[data-theme="light"] .install-card {
    background: #ffffff;
    color: var(--text);
}

html[data-theme="light"] .auth-card h1,
html[data-theme="light"] .install-card h1 {
    color: #121826;
}

html[data-theme="light"] .auth-card .lede,
html[data-theme="light"] .install-card .lede,
html[data-theme="light"] .auth-card .hint,
html[data-theme="light"] .auth-card .muted {
    color: #5b6675;
}

html[data-theme="light"] .form-grid input,
html[data-theme="light"] .form-grid select,
html[data-theme="light"] .auth-secret input {
    background: #ffffff;
    color: #121826;
    border-color: #d0d7e2;
}

.auth-strength {
    display: grid;
    gap: 0.35rem;
}

.auth-strength-bar {
    display: block;
    height: 6px;
    border-radius: 999px;
    background: var(--accent);
    width: 0;
    transition: width 0.2s ease;
}

.hint {
    color: var(--muted);
}

.banner {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    background: var(--bg-soft);
}

.banner-warn {
    color: var(--warn);
    border-color: rgba(227, 179, 65, 0.35);
}

.req-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.1rem 0;
}

.req-table th,
.req-table td {
    text-align: left;
    padding: 0.65rem 0.2rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.review-list {
    display: grid;
    gap: 0.85rem;
}

.review-list div {
    display: grid;
    gap: 0.15rem;
}

.review-list dt {
    color: var(--muted);
    font-size: 0.82rem;
}

.review-list dd {
    margin: 0;
}

.color-row {
    display: flex;
    gap: 0.6rem;
}

.color-row input[type="color"] {
    width: 3.2rem;
    padding: 0.2rem;
}

.swatch {
    display: inline-block;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    vertical-align: -1px;
    margin-right: 0.35rem;
}

.auth-body {
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}

.auth-shell {
    width: min(560px, 100%);
}

.auth-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.1rem;
    margin: 1.25rem 0 0;
    font-size: 0.86rem;
}

.auth-legal a {
    color: var(--muted, #9aa7b8);
}

.auth-card .install-brand {
    margin-bottom: 1rem;
}

@media (max-width: 840px) {
    .install-shell {
        grid-template-columns: 1fr;
    }

    .install-rail {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding-bottom: 1.2rem;
    }

    .stepper {
        grid-template-columns: 1fr;
    }

    .form-grid,
    .auth-password-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .install-card {
        padding: 1.15rem 1rem 1.3rem;
    }

    .req-table th:first-child,
    .req-table td:first-child {
        width: 42%;
    }
}
