.crfe-form-shell {
    --crfe-brand: #AC3C3E;
    position: relative;
    max-width: 1120px;
    margin: 40px auto;
    padding: 0 20px;
    color: #111;
    font-family: inherit;
}

.crfe-form-header {
    position: relative;
    min-height: 112px;
    padding-right: 320px;
    margin-bottom: 28px;
}

.crfe-form-header h1 {
    margin: 0 0 10px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.1;
    font-weight: 500;
}

.crfe-form-header p {
    margin: 6px 0;
    font-size: 18px;
}

.crfe-warning {
    color: var(--crfe-brand);
}

.crfe-editor-card {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 5;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.crfe-editor-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 300px;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--crfe-brand) !important;
    font: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
}

.crfe-editor-toggle:hover,
.crfe-editor-toggle:focus,
.crfe-editor-toggle:active {
    border: 0 !important;
    outline: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--crfe-brand) !important;
}

.crfe-editor-photo {
    display: inline-flex;
    width: 78px;
    height: 78px;
    flex: 0 0 78px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .16);
    object-fit: cover;
}

.crfe-editor-photo-placeholder {
    background: var(--crfe-brand);
    color: #fff;
    font-size: 30px;
    font-weight: 700;
}

.crfe-editor-speech {
    position: relative;
    display: inline-block;
    padding: 12px 14px;
    border: 1px solid #ead1d1;
    border-radius: 8px;
    background: #fff !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .10);
    color: var(--crfe-brand) !important;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

.crfe-editor-toggle:hover .crfe-editor-speech,
.crfe-editor-toggle:focus .crfe-editor-speech,
.crfe-editor-toggle:active .crfe-editor-speech {
    background: #fff !important;
    color: var(--crfe-brand) !important;
}

.crfe-editor-speech::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 24px;
    width: 14px;
    height: 14px;
    border-left: 1px solid #e8d0d0;
    border-bottom: 1px solid #e8d0d0;
    background: #fff;
    transform: rotate(45deg);
}

.crfe-editor-details {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: none;
    width: min(380px, calc(100vw - 40px));
    padding: 14px;
    border: 1px solid #dedede;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    line-height: 1.5;
}

.crfe-editor-details p {
    margin: 8px 0 0;
    font-size: 15px;
}

.crfe-editor-card.is-open .crfe-editor-details {
    display: block;
}

.crfe-form {
    background: #fff;
    border: 1px solid #dedede;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .12);
    padding: 34px;
}

.crfe-section {
    margin: 0 0 32px;
}

.crfe-section h2 {
    margin: 0 0 18px;
    font-size: 21px;
    line-height: 1.3;
    font-weight: 700;
}

.crfe-intro {
    font-weight: 700;
}

.crfe-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 20px 18px;
}

.crfe-field {
    min-width: 0;
}

.crfe-width-16 {
    grid-column: span 2;
}

.crfe-width-20 {
    grid-column: span 2;
}

.crfe-width-25 {
    grid-column: span 3;
}

.crfe-width-33 {
    grid-column: span 4;
}

.crfe-width-40 {
    grid-column: span 5;
}

.crfe-width-50 {
    grid-column: span 6;
}

.crfe-width-66 {
    grid-column: span 8;
}

.crfe-width-75 {
    grid-column: span 9;
}

.crfe-width-100 {
    grid-column: span 12;
}

.crfe-label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 500;
}

.crfe-label span {
    color: var(--crfe-brand);
}

.crfe-field input[type="text"],
.crfe-field input[type="email"],
.crfe-field input[type="tel"],
.crfe-field input[type="number"],
.crfe-field input[type="url"],
.crfe-field input[type="date"],
.crfe-field input[type="time"],
.crfe-field input[type="password"],
.crfe-field input[type="file"],
.crfe-field select,
.crfe-field textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid #df8f8f;
    border-radius: 0;
    padding: 10px 14px;
    font: inherit;
}

.crfe-form.crfe-country-other .crfe-field input[type="text"],
.crfe-form.crfe-country-other .crfe-field input[type="email"],
.crfe-form.crfe-country-other .crfe-field input[type="tel"],
.crfe-form.crfe-country-other .crfe-field input[type="number"],
.crfe-form.crfe-country-other .crfe-field input[type="url"],
.crfe-form.crfe-country-other .crfe-field input[type="date"],
.crfe-form.crfe-country-other .crfe-field input[type="time"],
.crfe-form.crfe-country-other .crfe-field input[type="password"],
.crfe-form.crfe-country-other .crfe-field input[type="file"],
.crfe-form.crfe-country-other .crfe-field select,
.crfe-form.crfe-country-other .crfe-field textarea {
    border-color: #3b82c4;
}

.crfe-field textarea {
    min-height: 104px;
}

.crfe-country-region {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
    padding: 16px;
    border: 1px solid #f0c5c5;
    background: #fffafa;
}

.crfe-country-region-main {
    min-width: 0;
}

.crfe-country-region-status {
    grid-column: 1 / -1;
    padding: 10px 12px;
    border-left: 4px solid var(--crfe-brand);
    background: #fff4f4;
    color: #7f1d1d;
    font-weight: 700;
}

.crfe-country-other .crfe-country-region,
.crfe-country-region.crfe-region-other {
    border-color: #b9d7f0;
    background: #f6fbff;
}

.crfe-country-other .crfe-country-region-status,
.crfe-country-region.crfe-region-other .crfe-country-region-status {
    border-left-color: #3b82c4;
    background: #eef6ff;
    color: #17446d;
}

.crfe-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.crfe-options-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.crfe-options label {
    font-size: 16px;
}

.crfe-acceptance {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.crfe-muted {
    color: #646970;
    font-size: 14px;
}

.crfe-step-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 14px;
}

.crfe-step-nav button {
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid var(--crfe-brand);
    background: #fff;
    color: var(--crfe-brand);
    cursor: pointer;
}

.crfe-step-nav button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.crfe-html,
.crfe-source-notice {
    line-height: 1.6;
}

.crfe-mode-notice .crfe-html {
    padding: 12px 14px;
    border-left: 4px solid var(--crfe-brand);
    background: #fff4f4;
    font-weight: 700;
}

.crfe-mode-other .crfe-html {
    border-left-color: #3b82c4;
    background: #eef6ff;
    color: #17446d;
}

.crfe-mode-spain .crfe-html {
    color: #7f1d1d;
}

.crfe-subsection-note {
    grid-column: span 12;
}

.crfe-subsection-note .crfe-html {
    margin: 8px 0 0;
    padding: 12px 14px;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    font-weight: 700;
}

.crfe-guardian-heading .crfe-html {
    border-left: 4px solid currentColor;
    color: #7f1d1d;
}

.crfe-source-notice ul {
    margin: 12px 0 0 20px;
}

.crfe-form-footer {
    border-top: 1px solid #eee;
    padding-top: 22px;
    text-align: center;
}

.crfe-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 12px;
    padding: 0 24px;
    border: 0;
    background: var(--crfe-brand);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.crfe-alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-left: 4px solid;
    background: #fff;
}

.crfe-alert-success {
    border-color: #2b8a3e;
}

.crfe-alert-error {
    border-color: var(--crfe-brand);
}

.crfe-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.crfe-summary {
    width: 100%;
    border-collapse: collapse;
}

@media (max-width: 760px) {
    .crfe-form-header {
        min-height: 0;
        padding-right: 0;
    }

    .crfe-editor-card {
        position: relative;
        right: auto;
        margin-bottom: 18px;
    }

    .crfe-editor-toggle {
        max-width: 100%;
    }

    .crfe-editor-details {
        right: auto;
        left: 0;
    }

    .crfe-form {
        padding: 22px 16px;
        box-shadow: none;
    }

    .crfe-country-region {
        grid-template-columns: 1fr;
    }

    .crfe-width-16,
    .crfe-width-20,
    .crfe-width-25,
    .crfe-width-33,
    .crfe-width-40,
    .crfe-width-50,
    .crfe-width-66,
    .crfe-width-75,
    .crfe-width-100 {
        grid-column: span 12;
    }
}
