:where([data-iform-richtext], body.iform-markdown-content-body) {
    --iform-rich-font: var(--font, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    --iform-rich-font-size: 15px;
    --iform-rich-line-height: 1.7;
    --iform-rich-color: var(--text-primary, #1f2937);
    --iform-rich-align: left;
    --iform-rich-link-color: color-mix(in srgb, var(--accent, #2563eb) 72%, #6ec2ff 28%);
    --iform-rich-link-hover-color: color-mix(in srgb, var(--accent, #2563eb) 86%, #9dd8ff 14%);
    --iform-rich-blockquote-color: var(--text-secondary, #6b7280);
    --iform-rich-blockquote-border: color-mix(in srgb, var(--accent, #2563eb) 28%, var(--input-border, #d1d5db));
    --iform-rich-hr-color: var(--border, #e5e7eb);
    font-family: var(--iform-rich-font);
    font-size: var(--iform-rich-font-size);
    line-height: var(--iform-rich-line-height);
    color: var(--iform-rich-color);
    text-align: var(--iform-rich-align);
    overflow-wrap: anywhere;
    word-break: break-word;
}

:where([data-iform-richtext], body.iform-markdown-content-body) > *:first-child {
    margin-top: 0;
}

:where([data-iform-richtext], body.iform-markdown-content-body) > *:last-child {
    margin-bottom: 0;
}

:where([data-iform-richtext], body.iform-markdown-content-body) :is(p, div, li, blockquote, h1, h2, h3, h4, pre) {
    margin-top: 0;
    margin-bottom: 0.6em;
    color: inherit;
    line-height: inherit;
}

:where([data-iform-richtext], body.iform-markdown-content-body) :is(ul, ol) {
    margin-top: 0;
    margin-bottom: 0.6em;
    padding-left: 1.4em;
}

:where([data-iform-richtext], body.iform-markdown-content-body) .iform-task-list {
    list-style: none;
    padding-left: 0;
}

:where([data-iform-richtext], body.iform-markdown-content-body) .iform-task-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.55em;
}

:where([data-iform-richtext], body.iform-markdown-content-body) .iform-task-list input[type="checkbox"] {
    margin: 0.22em 0 0;
    flex: 0 0 auto;
}

:where([data-iform-richtext], body.iform-markdown-content-body) .iform-task-list span {
    flex: 1 1 auto;
}

:where([data-iform-richtext], body.iform-markdown-content-body) :is(li > ul, li > ol) {
    margin-top: 0.35em;
    margin-bottom: 0;
}

:where([data-iform-richtext], body.iform-markdown-content-body) blockquote {
    padding-left: 12px;
    border-left: 3px solid var(--iform-rich-blockquote-border);
    color: var(--iform-rich-blockquote-color);
}

:where([data-iform-richtext], body.iform-markdown-content-body) hr {
    margin-top: 0.8em;
    margin-bottom: 0.8em;
    border: 0;
    border-top: 1px solid var(--iform-rich-hr-color);
}

:where([data-iform-richtext], body.iform-markdown-content-body) :is(img, video, iframe, table) {
    max-width: 100%;
}

.iform-query-richtext {
    overflow-x: auto;
    max-width: 100%;
    text-align: left !important;
}

.iform-query-richtext * {
    text-align: left;
}

:where([data-iform-richtext], body.iform-markdown-content-body) table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
}

:where([data-iform-richtext], body.iform-markdown-content-body) :is(th, td) {
    border: 1px solid var(--border, #e5e7eb);
    padding: 8px 10px;
    vertical-align: top;
    text-align: left;
}

:where([data-iform-richtext], body.iform-markdown-content-body) th {
    background: color-mix(in srgb, var(--bg-secondary, #f8fafc) 88%, var(--accent, #2563eb) 12%);
    font-weight: 700;
}

:where([data-iform-richtext], body.iform-markdown-content-body) table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
}

:where([data-iform-richtext], body.iform-markdown-content-body) :is(th, td) {
    border: 1px solid var(--border, #e5e7eb);
    padding: 8px 10px;
    vertical-align: top;
    text-align: left;
}

:where([data-iform-richtext], body.iform-markdown-content-body) th {
    background: color-mix(in srgb, var(--bg-secondary, #f8fafc) 88%, var(--accent, #2563eb) 12%);
    font-weight: 700;
}

:where([data-iform-richtext], body.iform-markdown-content-body) a {
    color: var(--iform-rich-link-color);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease, opacity 0.15s ease;
}

:where([data-iform-richtext], body.iform-markdown-content-body) a:hover {
    color: var(--iform-rich-link-hover-color);
    text-decoration-color: currentColor;
}

:where([data-iform-richtext], body.iform-markdown-content-body) :is(h1, h2, h3, h4) {
    color: var(--iform-rich-heading-color, currentColor);
}

:where([data-iform-richtext][data-iform-richtext-style="form-desc"], body.iform-markdown-content-body[data-iform-richtext-style="form-desc"]) {
    --iform-rich-color: var(--text-secondary, #6b7280);
}

:where([data-iform-richtext][data-iform-richtext-style="form-desc"], body.iform-markdown-content-body[data-iform-richtext-style="form-desc"]) a {
    color: var(--accent, #2563eb);
}

:where([data-iform-richtext][data-iform-richtext-style="form-desc"], body.iform-markdown-content-body[data-iform-richtext-style="form-desc"]) a:hover {
    opacity: 0.8;
}

:where([data-iform-richtext][data-iform-richtext-style="field-desc"], body.iform-markdown-content-body[data-iform-richtext-style="field-desc"]) {
    --iform-rich-font-size: 13px;
    --iform-rich-color: var(--text-secondary, #6b7280);
}

.field-desc[data-iform-richtext][data-iform-richtext-style="field-desc"] {
    margin-bottom: 10px;
}

:where([data-iform-richtext][data-iform-richtext-style="success-markdown-content"], body.iform-markdown-content-body[data-iform-richtext-style="success-markdown-content"]) {
    --iform-rich-align: center;
}

:where([data-iform-richtext][data-iform-richtext-style="success-markdown-content"], body.iform-markdown-content-body[data-iform-richtext-style="success-markdown-content"]) > :is(p, ul, ol, blockquote, pre, h1, h2, h3, h4) {
    margin: 0;
}

:where([data-iform-richtext][data-iform-richtext-style="success-markdown-content"], body.iform-markdown-content-body[data-iform-richtext-style="success-markdown-content"]) > * + * {
    margin-top: 1em !important;
}

:where([data-iform-richtext][data-iform-richtext-style="email-body"], body.iform-markdown-content-body[data-iform-richtext-style="email-body"]) {
    --iform-rich-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --iform-rich-color: #1f2937;
    --iform-rich-link-color: #2563eb;
    --iform-rich-link-hover-color: #1d4ed8;
    --iform-rich-blockquote-color: #6b7280;
    --iform-rich-blockquote-border: #d1d5db;
    --iform-rich-hr-color: #e5e7eb;
}

:where([data-iform-richtext][data-iform-richtext-style="form-footer"], body.iform-markdown-content-body[data-iform-richtext-style="form-footer"]) {
    --iform-footer-scale: 0.8;
    --iform-rich-font-size: calc(15px * var(--iform-footer-scale));
    --iform-rich-align: center;
    --iform-rich-link-hover-color: color-mix(in srgb, var(--accent, #2563eb) 72%, #6ec2ff 28%);
}

:where([data-iform-richtext][data-iform-richtext-style="form-footer"], body.iform-markdown-content-body[data-iform-richtext-style="form-footer"]) :is(p, div, li) {
    color: var(--text-primary, #1f2937);
}

:where([data-iform-richtext][data-iform-richtext-style="form-footer"], body.iform-markdown-content-body[data-iform-richtext-style="form-footer"]) h1 {
    font-size: 1.7em;
    font-weight: 600;
    line-height: 1.35;
}

:where([data-iform-richtext][data-iform-richtext-style="form-footer"], body.iform-markdown-content-body[data-iform-richtext-style="form-footer"]) h2 {
    font-size: 1.35em;
    font-weight: 600;
    line-height: 1.35;
}

:where([data-iform-richtext][data-iform-richtext-style="form-footer"], body.iform-markdown-content-body[data-iform-richtext-style="form-footer"]) h3 {
    font-size: 1.15em;
    font-weight: 600;
    line-height: 1.35;
}

:where([data-iform-richtext][data-iform-richtext-style="form-footer"], body.iform-markdown-content-body[data-iform-richtext-style="form-footer"]) h4 {
    font-size: 1em;
    font-weight: 600;
    line-height: 1.35;
}

:where([data-iform-richtext][data-iform-richtext-style="form-footer"], body.iform-markdown-content-body[data-iform-richtext-style="form-footer"]) a {
    text-decoration: underline;
}

:where([data-iform-richtext][data-iform-richtext-style="form-footer"], body.iform-markdown-content-body[data-iform-richtext-style="form-footer"]) :is(p, ul, ol, blockquote, pre, h1, h2, h3, h4) {
    margin: 0 0 0.8em;
}

:where([data-iform-richtext][data-iform-richtext-style="form-footer"], body.iform-markdown-content-body[data-iform-richtext-style="form-footer"]) > *:last-child {
    margin-bottom: 0;
}

:where([data-iform-richtext][data-iform-richtext-style="form-footer"], body.iform-markdown-content-body[data-iform-richtext-style="form-footer"]) a:hover {
    text-decoration: underline;
}

:where([data-iform-richtext][data-iform-richtext-style="form-footer"], body.iform-markdown-content-body[data-iform-richtext-style="form-footer"]) :is(ul, ol) {
    padding-left: 1.5em;
}

:where([data-iform-richtext][data-iform-richtext-style="form-footer"], body.iform-markdown-content-body[data-iform-richtext-style="form-footer"]) blockquote {
    margin-left: 0;
    padding: 0.1em 0 0.1em 1em;
    border-left: 3px solid color-mix(in srgb, var(--accent, #2563eb) 28%, var(--input-border, #d1d5db));
    color: var(--text-secondary, #6b7280);
}

:where([data-iform-richtext][data-iform-richtext-style="form-footer"], body.iform-markdown-content-body[data-iform-richtext-style="form-footer"]) :not(pre) > code {
    display: inline-block;
    padding: 0.12em 0.42em;
    border: 1px solid color-mix(in srgb, var(--input-border, #d1d5db) 92%, transparent);
    border-radius: calc(6px * var(--iform-footer-scale));
    background: color-mix(in srgb, var(--bg-secondary, #f3f4f6) 82%, var(--input-bg, #ffffff));
    color: var(--text-primary, #1f2937);
    font-size: 0.92em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

:where([data-iform-richtext][data-iform-richtext-style="form-footer"], body.iform-markdown-content-body[data-iform-richtext-style="form-footer"]) pre {
    overflow: auto;
    position: relative;
    padding: calc(14px * var(--iform-footer-scale)) calc(16px * var(--iform-footer-scale));
    border: 1px solid #d0d7de;
    border-radius: calc(10px * var(--iform-footer-scale));
    background: #f6f8fa;
    color: #24292f;
}

:where([data-iform-richtext][data-iform-richtext-style="form-footer"], body.iform-markdown-content-body[data-iform-richtext-style="form-footer"]) pre code {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: calc(13px * var(--iform-footer-scale));
    line-height: 1.65;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    white-space: pre;
}

.success-screen [data-iform-richtext][data-iform-richtext-style="success-markdown-content"] {
    text-align: center;
}
