
.rf-page {
    --rf-brand: #23287e;
    --rf-border: #dfe2ec;
    --rf-muted: #6b7083;
    --rf-error: #d63031;

    --rf-bg: var(--bg-white-grey);
    --rf-input-bg: var(--bg-body);
    --rf-text: var(--text-body);
    --rf-section-bg: var(--bg-white-grey);
    --rf-consent-bg: var(--bg-body);
}

/* Typography */
.rf-page,
.rf-page * {
    font-family: IRANSansX-Regular, sans-serif;
}

.rf-title {
    font-size: 2rem;
    font-weight: 400;
    color: var(--rf-brand);
    margin-bottom: .75rem;
}

.rf-description {
    color: var(--rf-muted);
    font-size: 1.4rem;
    line-height: 1.9;
    margin-bottom: 2rem !important;
    white-space: pre-line;
}

/* Sections */
.rf-section {
    border: 1px solid var(--rf-border);
    border-radius: 14px;
    padding: 1.5rem 1.5rem .5rem;
    margin-bottom: 1.75rem;
    background: var(--rf-section-bg);
}

.rf-section-title {
    float: none;
    width: auto;
    padding: 0 .5rem;
    margin: 0 0 1rem;
    font-size: 1.5rem;
    color: var(--rf-brand);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.rf-section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--rf-brand);
    color: #fff;
    font-size: 1.2rem;
}

.rf-section-description {
    color: var(--rf-muted);
    font-size: 1.2rem;
    margin-top: -.5rem;
}

/* Fields */
.rf-field {
    margin-bottom: 1.25rem;
}

.rf-label {
    display: block;
    font-size: 1.3rem;
    margin-bottom: .4rem;
    color: var(--rf-text);
    line-height: 1.7;
}

.rf-required {
    color: var(--rf-error);
    margin-inline-start: 2px;
}

.rf-input {
    display: block;
    width: 100%;
    border: 1px solid var(--rf-border);
    border-radius: 10px;
    padding: .6rem .85rem;
    font-size: 1.3rem;
    color: var(--rf-text);
    background: var(--rf-input-bg);
    transition: border-color .15s, box-shadow .15s;
}

.rf-input::placeholder {
    color: var(--rf-muted);
    font-size: 1.2rem;
}

.rf-input:focus {
    outline: none;
    border-color: var(--rf-brand);
    box-shadow: 0 0 0 3px rgba(35, 40, 126, .12);
    background: var(--rf-bg);
    color: var(--rf-text);
}

textarea.rf-input {
    resize: vertical;
    min-height: 110px;
}

select.rf-input {
    appearance: auto;
}

.rf-file {
    padding: .45rem .6rem;
}

.rf-help {
    display: block;
    color: var(--rf-muted);
    font-size: 1.1rem;
    margin-top: .3rem;
}

/* Choices */
.rf-choices {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
}

.rf-choices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: .5rem 1.25rem;
}

.rf-choice {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: 1.3rem;
    color: var(--rf-text);
    cursor: pointer;
    line-height: 1.7;
    margin: 0;
}

.rf-choice input {
    margin-top: .35rem;
    width: 16px;
    height: 16px;
    accent-color: var(--rf-brand);
    flex-shrink: 0;
}

.rf-consent {
    background: var(--rf-consent-bg);
    border-radius: 10px;
    padding: .85rem 1rem;
    color: var(--rf-text);
}

/* Validation */
.rf-field.has-error .rf-input {
    border-color: var(--rf-error);
    background: rgba(214, 48, 49, .05);
}

.rf-field.has-error .rf-consent,
.rf-field.has-error .rf-choices {
    outline: 1px dashed var(--rf-error);
    outline-offset: 4px;
    border-radius: 6px;
}

.rf-error {
    color: var(--rf-error);
    font-size: 1.1rem;
    margin-top: .3rem;
    min-height: 0;
}

/* Actions */
.rf-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: .5rem;
}

.rf-submit {
    background: var(--rf-brand);
    color: #fff;
    border: 0;
    border-radius: 24px;
    padding: .75rem 2.5rem;
    font-size: 1.4rem;
    cursor: pointer;
    transition: opacity .15s;
}

.rf-submit:hover {
    opacity: .9;
}

.rf-submit:disabled {
    opacity: .6;
    cursor: wait;
}

/* Honeypot */
.rf-hp {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Success */
.rf-success {
    text-align: center;
    border: 1px solid var(--rf-border);
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    margin-bottom: 2rem;
    background: var(--rf-section-bg);
}

.rf-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #27ae60;
    color: #fff;
    font-size: 2rem;
    line-height: 64px;
    margin: 0 auto 1rem;
}

.rf-success h2 {
    font-size: 1.7rem;
    color: var(--rf-brand);
}

.rf-success p {
    color: var(--rf-muted);
    font-size: 1.3rem;
    white-space: pre-line;
}

.rf-code-box {
    display: inline-flex;
    flex-direction: column;
    gap: .25rem;
    background: var(--rf-consent-bg);
    border-radius: 12px;
    padding: 1rem 2rem;
    margin-top: .75rem;
}

.rf-code-box strong {
    font-size: 2rem;
    letter-spacing: 3px;
    color: var(--rf-brand);
}

/* Cards */
.rf-card {
    display: block;
    height: 100%;
    border: 1px solid var(--rf-border);
    border-radius: 14px;
    padding: 1.5rem;
    color: var(--rf-text);
    background: var(--rf-section-bg);
    text-decoration: none;
    transition: box-shadow .15s, transform .15s;
}

.rf-card:hover {
    box-shadow: 0 10px 25px rgba(35, 40, 126, .1);
    transform: translateY(-2px);
    color: var(--rf-text);
}

.rf-card h2 {
    font-size: 2rem;
    color: var(--rf-brand);
    margin-bottom: 1rem;
    line-height: 32px;
}

.rf-card p {
    color: var(--rf-muted);
    font-size: 1.4rem;
    line-height: 1.8;
	margin-bottom: 15px !important;
}

.rf-card-link {
    color: var(--rf-brand);
    font-size: 1.4rem;
}

/* Dark Mode */
body.dark .rf-page {
    --rf-border: #193765;
    --rf-muted: #a5b5d0;
    --rf-bg: #001034;
    --rf-input-bg: #051944;
    --rf-text: #fff;
    --rf-section-bg: #001034;
    --rf-consent-bg: #09234c;
}

body.dark .rf-input {
    color: #fff;
}

body.dark .rf-input:focus {
    background: #001034;
    color: #fff;
    border-color: #1e9aff;
    box-shadow: 0 0 0 3px rgba(30, 154, 255, .12);
}

body.dark .rf-input::placeholder {
    color: #8fa5c5;
}

body.dark .rf-brand {
    color: #1e9aff;
}

body.dark .rf-title,
body.dark .rf-section-title,
body.dark .rf-success h2,
body.dark .rf-code-box strong,
body.dark .rf-card h2,
body.dark .rf-card-link {
    color: #1e9aff;
}

body.dark .rf-submit,
body.dark .rf-section-number {
    background: #0060ae;
}

/* Responsive */
@media (max-width: 575px) {
    .rf-section {
        padding: 1.1rem 1rem .25rem;
    }

    .rf-title {
        font-size: 1.8rem;
    }

    .rf-submit {
        width: 100%;
    }

    .rf-choices-grid {
        grid-template-columns: 1fr;
    }

    .rf-card h2 {
        font-size: 1.8rem;
    }
}
