body.form-page,
body.sourcewrap-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
}

body > main.form-shell {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: clamp(1rem, 2.5vh, 2rem) clamp(0.875rem, 4vw, 2rem);
}

main.form-shell > .form-card {
    width: 100%;
    max-width: 44rem;
    min-width: 0;
    margin: 0 auto;
}

.form-card > .panel {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-top: clamp(1rem, 3.5vh, 1.75rem);
    padding-bottom: clamp(1rem, 3.5vh, 1.75rem);
}

.form-card h1 {
    font-size: clamp(2rem, 4.7vw, 2.75rem);
}

.form-card > .panel > .outline {
    margin-top: 1rem;
}

main.form-shell .fields input,
main.form-shell .fields textarea,
main.form-shell .fields select {
    font-weight: 400;
}

main.form-shell .fields input,
main.form-shell .fields textarea,
main.form-shell .fields select,
main.form-shell .fields button {
    border-width: 1px;
    box-shadow: none;
    filter: none;
}

main.form-shell .fields input:focus,
main.form-shell .fields textarea:focus,
main.form-shell .fields select:focus {
    border-color: var(--navy);
    outline: none;
    box-shadow: none;
}

main.form-shell .fields button:focus {
    outline: none;
    box-shadow: none;
}

main.form-shell .fields button:focus-visible,
.form-shell .outline:focus-visible {
    outline: 1px solid var(--navy);
    outline-offset: 2px;
}

@media (forced-colors: active) {
    .form-shell .fields input:focus,
    .form-shell .fields textarea:focus,
    .form-shell .fields select:focus {
        outline: 1px solid Highlight;
        outline-offset: 1px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    main.form-shell .form-card:has(.fields) {
        animation: ghee-form-appear 200ms ease-out;
    }

    main.form-shell .fields :is(input, textarea, select, button) {
        transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
    }
}

@keyframes ghee-form-appear {
    from { opacity: .6; translate: 0 .35rem; }
    to { opacity: 1; translate: 0 0; }
}
