main[data-image-free-form] {
    min-height: 100svh;
    padding: 1.25rem 1rem;
    align-items: stretch;
}

main[data-image-free-form] [data-form-renderer] {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    max-width: none;
    min-height: calc(100svh - 2.5rem);
    height: auto !important;
    margin: 0 auto;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

main[data-image-free-form] [data-logo-overlay] {
    width: 3.5rem;
    height: 3.5rem;
}

main[data-image-free-form] [data-question-pane] {
    width: 100%;
    max-width: 46rem;
    min-height: min(42rem, calc(100svh - 3rem));
    height: auto !important;
    margin: 0 auto;
    padding: clamp(1.25rem, 4vw, 3.5rem) clamp(0.25rem, 3vw, 2rem) 1.5rem;
    overflow: visible !important;
}

main[data-image-free-form] [data-question-pane] > header {
    padding-bottom: 1.25rem;
}

main[data-image-free-form] [data-question-pane] > header .rich-text:first-of-type {
    font-size: 1.5rem;
    line-height: 1.35;
    font-weight: 600;
}

main[data-image-free-form] [data-question-pane] > header .rich-text + .rich-text {
    margin-top: 0.4rem;
    font-size: 1rem;
    line-height: 1.6;
}

main[data-image-free-form] [data-question-pane] > form {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    gap: 0;
    margin-top: 0;
    overflow: visible;
}

main[data-image-free-form] [data-page-progress] {
    padding-bottom: 1.25rem;
}

main[data-image-free-form] [data-page-progress] > span {
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

main[data-image-free-form] [data-question-viewport] {
    flex: 1;
    min-height: 0;
    padding: 0;
    overflow: visible !important;
}

main[data-image-free-form] [data-question-track] {
    min-height: 100%;
}

main[data-image-free-form] [data-question-stage] {
    min-height: clamp(19rem, 55svh, 43rem);
    gap: clamp(1.25rem, 3vw, 2rem);
    padding: 1.25rem 0 1.75rem;
    justify-content: center;
}

main[data-image-free-form] [data-respondent-field] {
    width: 100%;
    max-width: 42rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

main[data-image-free-form] [data-respondent-field] > label,
main[data-image-free-form] [data-respondent-field] > fieldset > legend {
    font-size: clamp(1.65rem, 4vw, 2.5rem);
    line-height: 1.22;
    letter-spacing: -0.035em;
    font-weight: 600;
}

main[data-image-free-form] [data-respondent-field] :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="url"], textarea) {
    min-height: 3.5rem;
    border-width: 0 0 2px;
    border-color: #a1a1aa;
    border-radius: 0;
    background: transparent;
    padding: 0.6rem 0;
    font-size: clamp(1.125rem, 2.6vw, 1.5rem);
    line-height: 1.5;
    box-shadow: none;
}

main[data-image-free-form] [data-respondent-field] :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="url"], textarea):focus-visible {
    border-color: #285243;
    outline: 0;
    box-shadow: 0 2px 0 #285243;
}

main[data-image-free-form] [data-respondent-field] [data-choice-options] label,
main[data-image-free-form] [data-respondent-field] fieldset > label {
    min-height: 3.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
}

main[data-image-free-form] [data-question-stage] [data-submit-alignment] {
    justify-content: flex-start;
}

main[data-image-free-form] [data-question-stage] > div:last-child:has([data-submit-alignment]) {
    max-width: 42rem;
    margin: 0 auto;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0.5rem 0 1rem;
    backdrop-filter: none;
}

main[data-image-free-form] [data-question-stage] [data-submit-alignment] button {
    min-height: 3rem;
}

main[data-image-free-form] [data-mykayd-branding] {
    padding-bottom: 0.75rem;
}

@media (max-width: 640px) {
    main[data-image-free-form] {
        padding: 0.75rem 1rem;
    }
    main[data-image-free-form] [data-form-renderer] {
        min-height: calc(100svh - 1.5rem);
    }
    main[data-image-free-form] [data-question-pane] {
        min-height: calc(100svh - 2rem);
        padding: 1.25rem 0 0.75rem;
    }
    main[data-image-free-form] [data-question-stage] {
        min-height: max(19rem, 48svh);
        padding: 1rem 0;
    }
    main[data-image-free-form] [data-respondent-field] > label,
    main[data-image-free-form] [data-respondent-field] > fieldset > legend {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    main[data-image-free-form] [data-question-stage],
    main[data-image-free-form] [data-question-stage] * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

main[data-image-free-form] [data-question-navigation] {
    position: sticky;
    bottom: max(1rem, env(safe-area-inset-bottom));
    align-self: flex-end;
    display: flex;
    gap: 1px;
    z-index: 10;
    margin-top: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgb(0 0 0 / 12%);
}

main[data-image-free-form] [data-question-navigation] button {
    display: grid;
    place-items: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    background: var(--color-hufan-700, #285243);
    color: white;
    cursor: pointer;
}

main[data-image-free-form] [data-question-navigation] button:disabled {
    opacity: 0.5;
    cursor: default;
}

main[data-image-free-form] [data-question-navigation] button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -4px;
}

main[data-image-free-form] [data-respondent-field] { min-width: 0; overflow-wrap: anywhere; }
main[data-image-free-form] [data-respondent-field] :is(input, select, textarea) { max-width: 100%; }
main[data-image-free-form] [data-page-progress] { position: relative; }
