/* Kindly Forms on the page (markup: includes/forms/render.php; behavior: assets/forms/runtime.js).
   Defaults only, inside :where() so a theme or the form's own CSS wins without fighting specificity. The theme's
   type and colors carry through; fields are square with a clear border (Kindly does not round a bordered box).
   Design values come from custom properties a form's Style settings set on the form element:
   --kf-accent, --kf-text, --kf-muted, --kf-line, --kf-field-bg, --kf-field-text, --kf-error, --kf-ok, --kf-gap,
   --kf-row-gap, --kf-pad, --kf-label-weight, --kf-label-size, --kf-font-size, --kf-btn-bg, --kf-btn-text, --kf-btn-radius. */

.kf-form {
	--kf-a: var(--kf-accent, var(--cb-accent, var(--ce-accent, #2f5bd3)));
	--kf-t: var(--kf-text, inherit);
	--kf-m: var(--kf-muted, color-mix(in srgb, currentColor 62%, transparent));
	--kf-l: var(--kf-line, color-mix(in srgb, currentColor 32%, transparent));
	--kf-bg: var(--kf-field-bg, transparent);
	--kf-ft: var(--kf-field-text, inherit);
	--kf-e: var(--kf-error, #b42318);
	--kf-g: var(--kf-gap, 18px);
	--kf-p: var(--kf-pad, 10px 12px);
	--kf-soft: color-mix(in srgb, currentColor 6%, transparent);
}
.kf-form [hidden], .kf-form[hidden] { display: none !important; }
.kf-force-hide { display: none !important; }
:where(.kf-form) { display: grid; gap: var(--kf-row-gap, var(--kf-g)); color: var(--kf-t); font-size: var(--kf-font-size, inherit); min-width: 0; }
:where(.kf-title) { margin: 0 0 12px; }
:where(.kf-form fieldset) { margin: 0; padding: 0; border: 0; min-width: 0; }
:where(.kf-form legend) { padding: 0; }
.kf-sr, .kf-form .kf-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.kf-sr-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.kf-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* a field: label, control, help, error */
:where(.kf-field) { display: grid; gap: 6px; min-width: 0; align-content: start; }
:where(.kf-label, .kf-group > legend) { display: block; font-weight: var(--kf-label-weight, 600); font-size: var(--kf-label-size, inherit); color: inherit; margin: 0; }
:where(.kf-group > legend) { margin-bottom: 6px; }
:where(.kf-asterisk) { color: var(--kf-e); margin-inline-start: 2px; }
:where(.kf-asterisk-left .kf-asterisk) { margin-inline: 0 4px; }
:where(.kf-asterisk-none .kf-asterisk) { display: none; }
:where(.kf-help) { margin: 0; color: var(--kf-m); font-size: .9em; }
:where(.kf-help-above .kf-field) { display: flex; flex-direction: column; }
:where(.kf-help-above .kf-help) { order: -1; }
:where(.kf-help-above .kf-label, .kf-help-above .kf-group > legend) { order: -2; }
:where(.kf-error) { margin: 0; color: var(--kf-e); font-size: .9em; }
:where(.kf-error:empty) { display: none; }
:where(.kf-invalid .kf-input, .kf-invalid .kf-control) { border-color: var(--kf-e); }
:where(.kf-tip) { display: inline-grid; place-items: center; width: 1.2em; height: 1.2em; padding: 0; margin-inline-start: 4px; border: 0; border-radius: 50%; background: var(--kf-soft); color: var(--kf-m); font: inherit; font-size: .8em; cursor: help; position: relative; vertical-align: middle; }
:where(.kf-tip [role=tooltip]) { display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 5; width: max-content; max-width: 260px; padding: 8px 10px; background: #1f2937; color: #fff; font-size: .85rem; font-weight: 400; text-align: start; }
:where(.kf-tip:hover [role=tooltip], .kf-tip:focus [role=tooltip], .kf-tip.kf-tip-open [role=tooltip]) { display: block; }

/* labels beside the field */
@media (min-width: 640px) {
	:where(.kf-labels-left .kf-field:not(.kf-label-top), .kf-field.kf-label-left, .kf-labels-right .kf-field:not(.kf-label-top), .kf-field.kf-label-right) { grid-template-columns: minmax(120px, var(--kf-label-w, 30%)) 1fr; column-gap: 16px; align-items: start; }
	:where(.kf-labels-left .kf-field:not(.kf-label-top) > :not(.kf-label), .kf-field.kf-label-left > :not(.kf-label), .kf-labels-right .kf-field:not(.kf-label-top) > :not(.kf-label), .kf-field.kf-label-right > :not(.kf-label)) { grid-column: 2; }
	:where(.kf-labels-left .kf-field > .kf-label, .kf-field.kf-label-left > .kf-label, .kf-labels-right .kf-field > .kf-label, .kf-field.kf-label-right > .kf-label) { padding-top: 10px; }
	:where(.kf-labels-right .kf-field > .kf-label, .kf-field.kf-label-right > .kf-label) { text-align: end; }
}
:where(.kf-labels-hidden .kf-field:not(.kf-label-top) > .kf-label, .kf-field.kf-label-hidden > .kf-label) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* boxes */
:where(.kf-input, .kf-form select, .kf-form textarea, .kf-form input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button])) {
	box-sizing: border-box; width: 100%; min-width: 0; padding: var(--kf-p); margin: 0; border: 1px solid var(--kf-l); border-radius: 0; background: var(--kf-bg); color: var(--kf-ft); font: inherit; line-height: 1.4;
}
:where(.kf-form textarea) { resize: vertical; min-height: 6em; }
:where(.kf-form select:not([multiple])) { appearance: none; padding-inline-end: 36px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
:where(.kf-form :is(input, select, textarea):focus-visible) { outline: 2px solid var(--kf-a); outline-offset: 1px; border-color: var(--kf-a); }
:where(.kf-form :is(input, select, textarea)[readonly]) { background: var(--kf-soft); }
:where(.kf-form :is(input, select, textarea):disabled) { opacity: .6; cursor: not-allowed; }
:where(.kf-form ::placeholder) { color: var(--kf-m); opacity: 1; }
:where(.kf-control) { display: flex; align-items: stretch; min-width: 0; }
:where(.kf-control > .kf-input, .kf-control > input, .kf-control > select, .kf-control > textarea) { flex: 1; }
:where(.kf-control > div:only-child) { flex: 1; min-width: 0; }
:where(.kf-prefix, .kf-suffix) { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--kf-l); background: var(--kf-soft); color: var(--kf-m); white-space: nowrap; }
:where(.kf-prefix) { border-inline-end: 0; }
:where(.kf-suffix) { border-inline-start: 0; }
:where(.kf-counter, .kf-calc-value) { color: var(--kf-m); font-size: .85em; }
:where(.kf-counter) { justify-self: end; }
:where(.kf-type-number .kf-calc, .kf-calc) { font-variant-numeric: tabular-nums; }

/* password */
:where(.kf-reveal) { position: relative; flex: 1; display: flex; }
:where(.kf-reveal-btn) { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); padding: 4px 8px; border: 0; background: none; color: var(--kf-a); font: inherit; font-size: .85em; cursor: pointer; }
:where(.kf-strength-meter) { height: 4px; background: var(--kf-soft); position: relative; font-size: .85em; color: var(--kf-m); margin-top: 2px; }
:where(.kf-strength-meter)::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 0; background: var(--kf-e); transition: width .2s; }
:where(.kf-strength-meter[data-score="1"])::before { width: 25%; }
:where(.kf-strength-meter[data-score="2"])::before { width: 50%; background: #c27c0e; }
:where(.kf-strength-meter[data-score="3"])::before { width: 75%; background: #3a8a4b; }
:where(.kf-strength-meter[data-score="4"])::before { width: 100%; background: #23743a; }
:where(.kf-strength-meter > span) { position: absolute; top: 8px; inset-inline-end: 0; }

/* names, addresses and other parts side by side */
:where(.kf-subs) { display: grid; gap: 12px; }
:where(.kf-sub-row) { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
:where(.kf-sub) { display: grid; gap: 4px; min-width: 0; }
:where(.kf-sublabel) { font-size: .9em; color: var(--kf-m); }
:where(.kf-address-tools) { display: grid; gap: 8px; }
:where(.kf-locate) { justify-self: start; padding: 0; border: 0; background: none; color: var(--kf-a); font: inherit; font-size: .9em; cursor: pointer; text-decoration: underline; }
:where(.kf-map) { aspect-ratio: 16 / 7; background: var(--kf-soft); }
:where(.kf-map iframe) { width: 100%; height: 100%; border: 0; }
:where(.kf-phone) { display: flex; width: 100%; }
:where(.kf-phone .kf-phone-country) { flex: 0 0 auto; width: auto; max-width: 9em; border-inline-end: 0; }

/* choices */
:where(.kf-choices) { display: grid; gap: 8px; }
:where(.kf-choice) { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; line-height: 1.4; }
:where(.kf-choice input) { margin: .2em 0 0; flex: none; width: 1.05em; height: 1.05em; accent-color: var(--kf-a); }
:where(.kf-list-inline) { display: flex; flex-wrap: wrap; gap: 8px 20px; }
:where(.kf-list-cols-2) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:where(.kf-list-cols-3) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
:where(.kf-list-cols-4) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
:where(.kf-list-cols-5) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 639px) { :where(.kf-list-cols-3, .kf-list-cols-4, .kf-list-cols-5) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
:where(.kf-list-buttons) { display: flex; flex-wrap: wrap; gap: 8px; }
:where(.kf-list-buttons .kf-choice) { position: relative; padding: 8px 14px; border: 1px solid var(--kf-l); }
:where(.kf-list-buttons .kf-choice input) { position: absolute; opacity: 0; pointer-events: none; }
:where(.kf-list-buttons .kf-choice:has(input:checked)) { background: var(--kf-a); border-color: var(--kf-a); color: #fff; }
:where(.kf-list-buttons .kf-choice:has(input:focus-visible)) { outline: 2px solid var(--kf-a); outline-offset: 2px; }
:where(.kf-has-images) { grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--kf-img-w, 150px)), 1fr)); }
:where(.kf-has-images .kf-choice) { flex-direction: column; align-items: stretch; position: relative; padding: 6px; outline: 1px solid var(--kf-l); }
:where(.kf-has-images .kf-choice input) { position: absolute; top: 12px; left: 12px; }
:where(.kf-has-images .kf-choice:has(input:checked)) { outline: 2px solid var(--kf-a); }
:where(.kf-choice-img) { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
:where(.kf-has-images .kf-choice-label) { text-align: center; }
:where(.kf-other-text) { margin-top: 2px; }
:where(.kf-select-all) { font-weight: 600; }
:where(.kf-scroll) { max-height: 220px; overflow: auto; padding: 12px; border: 1px solid var(--kf-l); margin-bottom: 8px; }
:where(.kf-terms-text) { color: inherit; }

/* grid (rows of questions with the same choices) */
:where(.kf-grid-wrap) { overflow-x: auto; }
:where(.kf-grid) { width: 100%; border-collapse: collapse; }
:where(.kf-grid th, .kf-grid td) { padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--kf-l); }
:where(.kf-grid tbody th) { text-align: start; font-weight: 400; }
:where(.kf-grid thead th) { font-weight: 600; font-size: .9em; }
:where(.kf-grid input) { accent-color: var(--kf-a); width: 1.1em; height: 1.1em; }

/* ratings, scales */
:where(.kf-rating) { display: inline-flex; gap: 4px; --kf-rs: var(--kf-rate-size, 28px); }
:where(.kf-rating label) { cursor: pointer; color: var(--kf-rate-off, #d4d4d8); line-height: 0; }
:where(.kf-rating label svg) { width: var(--kf-rs); height: var(--kf-rs); fill: currentColor; }
:where(.kf-rating label.kf-on, .kf-rating label.kf-hover) { color: var(--kf-rate-on, #f5a623); }
:where(.kf-rating:hover label.kf-on:not(.kf-hover)) { color: var(--kf-rate-off, #d4d4d8); }
:where(.kf-rating input:focus-visible + label) { outline: 2px solid var(--kf-a); outline-offset: 2px; }
:where(.kf-rate-num) { display: inline-grid; place-items: center; min-width: var(--kf-rs); height: var(--kf-rs); font-size: .9rem; line-height: 1; background: currentColor; }
:where(.kf-rate-num) { color: inherit; }
:where(.kf-rating-text) { color: var(--kf-m); font-size: .9em; }
:where(.kf-scale) { display: grid; grid-template-columns: repeat(var(--kf-scale-n, 11), minmax(0, 1fr)); gap: 0; }
:where(.kf-scale label) { display: grid; place-items: center; min-height: 40px; border: 1px solid var(--kf-l); margin-inline-start: -1px; cursor: pointer; font-variant-numeric: tabular-nums; }
:where(.kf-scale input:checked + label) { background: var(--kf-a); border-color: var(--kf-a); color: #fff; position: relative; }
:where(.kf-scale input:focus-visible + label) { outline: 2px solid var(--kf-a); outline-offset: 2px; position: relative; z-index: 1; }
:where(.kf-scale-ends) { display: flex; justify-content: space-between; color: var(--kf-m); font-size: .85em; margin-top: 4px; }
@media (max-width: 479px) { :where(.kf-scale) { grid-template-columns: repeat(min(var(--kf-scale-n, 11), 6), minmax(0, 1fr)); row-gap: 6px; } }

/* range, color */
:where(.kf-range-row, .kf-color-row) { display: flex; align-items: center; gap: 12px; width: 100%; }
:where(.kf-range) { flex: 1; accent-color: var(--kf-a); }
:where(.kf-range-value, .kf-color-value) { min-width: 3ch; font-variant-numeric: tabular-nums; }
:where(.kf-color) { width: 48px; height: 40px; padding: 2px; border: 1px solid var(--kf-l); background: none; }

/* ranking */
:where(.kf-ranking) { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: kf-rank; grid-template-columns: repeat(var(--kf-rank-cols, 1), minmax(0, 1fr)); }
:where(.kf-rank-item) { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--kf-soft); touch-action: none; user-select: none; counter-increment: kf-rank; }
:where(.kf-ranking:not(.kf-no-numbers) .kf-rank-item)::before { content: counter(kf-rank); min-width: 1.6em; font-weight: 600; color: var(--kf-a); font-variant-numeric: tabular-nums; }
:where(.kf-rank-grip) { cursor: grab; color: var(--kf-m); }
:where(.kf-rank-label) { flex: 1; }
:where(.kf-rank-move) { display: flex; gap: 2px; }
:where(.kf-rank-move button, .kf-rank-reset) { padding: 2px 8px; border: 0; background: none; color: var(--kf-m); font: inherit; cursor: pointer; }
:where(.kf-rank-move button:hover, .kf-rank-reset:hover) { color: var(--kf-a); }
:where(.kf-rank-item.kf-dragging) { opacity: .7; outline: 2px dashed var(--kf-a); cursor: grabbing; }
:where(.kf-rank-reset) { justify-self: start; padding: 0; text-decoration: underline; font-size: .9em; }

/* uploads */
:where(.kf-upload) { display: grid; gap: 10px; width: 100%; }
:where(.kf-file-input) { position: absolute; opacity: 0; width: 1px; height: 1px; }
:where(.kf-upload-target) { display: grid; place-items: center; gap: 4px; padding: 24px 16px; border: 1px dashed var(--kf-l); text-align: center; cursor: pointer; color: var(--kf-m); }
:where(.kf-upload-button) { display: inline-block; padding: 8px 14px; background: var(--kf-soft); color: var(--kf-t); font-weight: 600; }
:where(.kf-upload-button .kf-upload-target) { place-items: start; padding: 0; border: 0; }
:where(.kf-upload.kf-drop .kf-upload-target) { border-color: var(--kf-a); background: color-mix(in srgb, var(--kf-a) 6%, transparent); }
:where(.kf-upload:has(.kf-file-input:focus-visible) .kf-upload-target) { outline: 2px solid var(--kf-a); outline-offset: 2px; }
:where(.kf-files) { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
:where(.kf-file) { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: var(--kf-soft); font-size: .9em; }
:where(.kf-file img) { width: 40px; height: 40px; object-fit: cover; }
:where(.kf-file-name) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.kf-file progress) { width: 90px; accent-color: var(--kf-a); }
:where(.kf-file-remove) { border: 0; background: none; font-size: 1.3em; line-height: 1; color: var(--kf-m); cursor: pointer; padding: 0 4px; }
:where(.kf-file-remove:hover) { color: var(--kf-e); }
:where(.kf-crop) { width: min(720px, 94vw); padding: 16px; border: 0; }
:where(.kf-crop::backdrop) { background: rgb(0 0 0 / .55); }
:where(.kf-crop-area) { max-height: 70vh; }
:where(.kf-crop-area img) { display: block; max-width: 100%; }

/* signature */
:where(.kf-signature) { display: grid; gap: 6px; width: 100%; }
:where(.kf-signature canvas) { width: 100%; height: var(--kf-sig-h, 160px); border: 1px solid var(--kf-l); background: var(--kf-bg); touch-action: none; cursor: crosshair; }
:where(.kf-sig-clear) { justify-self: end; padding: 0; border: 0; background: none; color: var(--kf-a); font: inherit; font-size: .9em; cursor: pointer; text-decoration: underline; }

/* formatted text */
:where(.kf-rich-bar) { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border: 1px solid var(--kf-l); border-bottom: 0; background: var(--kf-soft); }
:where(.kf-rich-bar button) { min-width: 32px; height: 30px; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
:where(.kf-rich-bar button:hover) { background: var(--kf-soft); }
:where(.kf-rich) { overflow: auto; }
:where(.kf-rich:focus) { outline: 2px solid var(--kf-a); outline-offset: 1px; }
:where(.kf-rich p) { margin: 0 0 .6em; }

/* repeating rows, groups */
:where(.kf-repeat-table) { width: 100%; border-collapse: collapse; }
:where(.kf-repeat-table th) { text-align: start; font-weight: 600; font-size: .9em; padding: 0 8px 6px 0; }
:where(.kf-repeat-table td) { padding: 0 8px 8px 0; vertical-align: top; }
:where(.kf-repeat-table td:last-child) { width: 1%; white-space: nowrap; padding-inline-end: 0; }
@media (max-width: 639px) {
	:where(.kf-repeat-table, .kf-repeat-table tbody, .kf-repeat-table tr, .kf-repeat-table td) { display: block; width: 100%; box-sizing: border-box; }
	:where(.kf-repeat-table thead) { display: none; }
	:where(.kf-repeat-table tr) { padding: 10px; background: var(--kf-soft); margin-bottom: 8px; }
	:where(.kf-repeat-table td::before) { content: attr(data-label); display: block; font-size: .85em; color: var(--kf-m); margin-bottom: 2px; }
}
:where(.kf-row-remove) { padding: 8px 10px; border: 0; background: none; color: var(--kf-m); font: inherit; font-size: 1.1em; cursor: pointer; }
:where(.kf-row-remove:hover) { color: var(--kf-e); }
:where(.kf-row-add, .kf-add-row) { justify-self: start; padding: 6px 0; border: 0; background: none; color: var(--kf-a); font: inherit; font-weight: 600; cursor: pointer; }
:where(.kf-group-rows) { display: grid; gap: 12px; }
:where(.kf-group-row) { display: grid; gap: var(--kf-g); padding: 16px; background: var(--kf-soft); }
:where(.kf-row-tools) { display: flex; justify-content: space-between; align-items: center; }
:where(.kf-group-title, .kf-row-title) { font-weight: 600; }

/* layout: columns, sections, dividers, headings */
:where(.kf-columns) { display: flex; gap: var(--kf-col-gap, 16px); align-items: flex-start; min-width: 0; }
:where(.kf-cols-align-center) { align-items: center; }
:where(.kf-cols-align-end) { align-items: flex-end; }
:where(.kf-cols-align-stretch) { align-items: stretch; }
:where(.kf-col) { flex: 0 1 calc(var(--kf-col-w, 50%) - var(--kf-col-gap, 16px) / 2); min-width: 0; display: grid; gap: var(--kf-row-gap, var(--kf-g)); align-content: start; }
:where(.kf-col:only-child) { flex-basis: 100%; }
@media (max-width: 1023px) { :where(.kf-stack-tablet) { flex-direction: column; align-items: stretch; } :where(.kf-stack-tablet > .kf-col) { flex-basis: auto; } }
@media (max-width: 639px) { :where(.kf-stack-phone) { flex-direction: column; align-items: stretch; } :where(.kf-stack-phone > .kf-col) { flex-basis: auto; } }
:where(.kf-section) { display: grid; gap: var(--kf-g); }
:where(.kf-section-title) { font-weight: 700; font-size: 1.1em; margin: 0; }
:where(.kf-section-text) { margin: 0; color: var(--kf-m); }
:where(.kf-section-body) { display: grid; gap: var(--kf-row-gap, var(--kf-g)); }
:where(.kf-box) { padding: 18px; outline: 1px solid var(--kf-l); }
:where(.kf-box > legend) { padding: 0 6px; margin-inline-start: -6px; }
:where(details.kf-section) { gap: 0; border-top: 1px solid var(--kf-l); border-bottom: 1px solid var(--kf-l); }
:where(details.kf-section > summary) { padding: 12px 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
:where(details.kf-section > summary)::-webkit-details-marker { display: none; }
:where(details.kf-section > summary)::after { content: "+"; font-weight: 400; font-size: 1.3em; color: var(--kf-m); }
:where(details.kf-section[open] > summary)::after { content: "\2212"; }
:where(details.kf-section > .kf-section-body, details.kf-section > .kf-section-text) { padding-bottom: 16px; }
:where(.kf-section-accordion + .kf-section-accordion details) { border-top: 0; }
:where(.kf-tabs) { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--kf-l); }
:where(.kf-tabs [role=tab]) { padding: 10px 16px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--kf-m); font: inherit; font-weight: 600; cursor: pointer; }
:where(.kf-tabs [role=tab][aria-selected=true]) { color: var(--kf-t); border-bottom-color: var(--kf-a); }
:where(.kf-tabpanel) { padding-top: 6px; }
:where(.kf-divider hr) { margin: 4px 0; border: 0; border-top: 1px solid var(--kf-l); }
:where(.kf-spacer) { min-height: var(--kf-space, 16px); }
:where(.kf-heading) { margin: 0; }
:where(.kf-line .kf-heading) { padding-bottom: 8px; border-bottom: 1px solid var(--kf-l); }
:where(.kf-align-center) { text-align: center; }
:where(.kf-align-end, .kf-align-right) { text-align: end; }
:where(.kf-html > :first-child) { margin-top: 0; }
:where(.kf-html > :last-child) { margin-bottom: 0; }

/* steps */
:where(.kf-steps) { display: grid; gap: var(--kf-g); }
:where(.kf-step) { display: grid; gap: var(--kf-row-gap, var(--kf-g)); }
:where(.kf-step-title) { font-weight: 700; font-size: 1.15em; margin-bottom: 4px; }
/* the progress line already names the step: its heading stays for screen readers only */
.kf-progress:has([data-kf-progress-title]) ~ .kf-steps .kf-step-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:where(.kf-step-text) { margin: 0; color: var(--kf-m); }
:where(.kf-progress) { display: grid; gap: 8px; }
:where(.kf-progress-text) { display: flex; gap: 8px; font-size: .9em; color: var(--kf-m); }
:where(.kf-progress-title) { color: var(--kf-t); font-weight: 600; }
:where(.kf-progress-bar[role=progressbar]) { height: 6px; background: var(--kf-soft); overflow: hidden; }
:where(.kf-progress-bar[role=progressbar] > span) { display: block; height: 100%; background: var(--kf-a); transition: width .3s; }
:where(.kf-progress-steps) { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; counter-reset: none; }
:where(.kf-progress-steps li) { color: var(--kf-m); font-size: .92em; }
:where(.kf-progress-steps li > *) { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: inherit; font: inherit; }
:where(.kf-progress-steps button:not(:disabled)) { cursor: pointer; }
:where(.kf-progress-n) { display: inline-grid; place-items: center; width: 1.8em; height: 1.8em; border-radius: 50%; background: var(--kf-soft); font-weight: 700; font-size: .9em; }
:where(.kf-progress-steps li[aria-current] , .kf-progress-steps li.kf-done) { color: var(--kf-t); }
:where(.kf-progress-steps li[aria-current] .kf-progress-n) { background: var(--kf-a); color: #fff; }
:where(.kf-progress-steps li.kf-done .kf-progress-n) { background: color-mix(in srgb, var(--kf-a) 18%, transparent); color: var(--kf-a); }
:where(.kf-nav) { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 4px; }
:where(.kf-nav .kf-next, .kf-nav .kf-submit-row) { margin-inline-start: auto; }
:where(.kf-nav .kf-submit-row) { padding: 0; }
.kf-in-right { animation: kf-in-right .28s ease-out; }
.kf-in-left { animation: kf-in-left .28s ease-out; }
.kf-in-fade { animation: kf-fade .25s ease-out; }
@keyframes kf-in-right { from { opacity: 0; transform: translateX(24px); } }
@keyframes kf-in-left { from { opacity: 0; transform: translateX(-24px); } }
@keyframes kf-fade { from { opacity: 0; } }

/* buttons: the theme's own button class is on .kf-submit; these are fallbacks */
:where(.kf-submit-row) { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
:where(.kf-submit-row.kf-align-center) { justify-content: center; }
:where(.kf-submit-row.kf-align-end, .kf-submit-row.kf-align-right) { justify-content: flex-end; }
:where(.kf-submit, .kf-next, .kf-back) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border: 0; border-radius: var(--kf-btn-radius, 0); font: inherit; font-weight: 600; cursor: pointer; }
:where(.kf-submit, .kf-next) { background: var(--kf-btn-bg, var(--kf-a)); color: var(--kf-btn-text, #fff); }
:where(.kf-back) { background: var(--kf-soft); color: inherit; }
:where(.kf-submit:hover, .kf-next:hover) { filter: brightness(1.08); }
:where(.kf-submit:focus-visible, .kf-next:focus-visible, .kf-back:focus-visible) { outline: 2px solid var(--kf-a); outline-offset: 2px; }
:where(.kf-submit.kf-full) { width: 100%; }
:where(.kf-submit.kf-size-small) { padding: 7px 14px; font-size: .9em; }
:where(.kf-submit.kf-size-large) { padding: 14px 30px; font-size: 1.1em; }
:where(.kf-submit:disabled) { opacity: .65; cursor: progress; }
:where(.kf-submit img) { max-height: 1.4em; }
:where(.kf-busy .kf-submit)::after { content: ""; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: kf-spin .7s linear infinite; }
@keyframes kf-spin { to { transform: rotate(360deg); } }
:where(.kf-link, .kf-save-link) { padding: 0; border: 0; background: none; color: var(--kf-a); font: inherit; text-decoration: underline; cursor: pointer; }

/* messages */
:where(.kf-summary, .kf-result, .kf-done, .kf-resume, .kf-closed, .kf-note) { margin: 0; padding: 14px 16px; background: var(--kf-soft); }
:where(.kf-summary) { color: var(--kf-e); background: color-mix(in srgb, var(--kf-e) 8%, transparent); }
:where(.kf-summary p, .kf-summary ul) { margin: 0; }
:where(.kf-summary ul) { margin-top: 6px; padding-inline-start: 1.2em; }
:where(.kf-summary a) { color: inherit; }
:where(.kf-result:not(.kf-result-on)) { display: none; }
:where(.kf-done) { background: color-mix(in srgb, var(--kf-ok, #23743a) 9%, transparent); }
:where(.kf-done:focus) { outline: none; }
:where(.kf-done > :first-child, .kf-result > :first-child) { margin-top: 0; }
:where(.kf-done > :last-child, .kf-result > :last-child) { margin-bottom: 0; }
:where(.kf-resume) { display: grid; gap: 10px; }
:where(.kf-resume-row) { display: flex; gap: 10px; align-items: center; }
:where(.kf-resume-row .kf-input) { flex: 1; }
:where(.kf-note) { font-size: .9em; color: var(--kf-m); }
:where(.kf-captcha) { min-height: 65px; }

/* conversational: one question at a time */
:where(.kf-conversational) { min-height: min(80vh, 640px); align-content: center; font-size: var(--kf-font-size, 1.15rem); }
:where(.kf-conversational.kf-conv-ready .kf-field:not(.kf-conv-on)) { display: none; }
:where(.kf-conversational .kf-conv-on) { animation: kf-conv-in .3s ease-out; }
:where(.kf-conversational .kf-label, .kf-conversational .kf-group > legend) { font-size: 1.4em; font-weight: 600; }
:where(.kf-conv-progress) { position: sticky; top: 0; height: 4px; background: var(--kf-soft); }
:where(.kf-conv-progress > span) { display: block; height: 100%; background: var(--kf-a); transition: width .3s; }
:where(.kf-conv-nav) { display: flex; gap: 12px; align-items: center; }
:where(.kf-conv-hint) { color: var(--kf-m); font-size: .85em; }
@keyframes kf-conv-in { from { opacity: 0; transform: translateY(18px); } }
@media (prefers-reduced-motion: reduce) { .kf-form *, .kf-form { animation: none !important; transition: none !important; } }

/* style presets the form's Style settings choose ("theme" adds nothing) */
:where(.kf-style-filled) { --kf-field-bg: color-mix(in srgb, currentColor 6%, transparent); --kf-line: transparent; }
:where(.kf-style-filled :is(.kf-input, select, textarea, input:not([type=checkbox]):not([type=radio]):not([type=range]))) { border-radius: var(--kf-radius, 6px); }
:where(.kf-style-underline :is(.kf-input, select, textarea, input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]))) { border-width: 0 0 1px; padding-inline: 2px; }
:where(.kf-style-card) { padding: clamp(18px, 4vw, 36px); background: var(--kf-card-bg, #fff); color: var(--kf-text, #1f2933); box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 8px 24px rgb(0 0 0 / .08); border-radius: var(--kf-radius, 0); }
:where(.kf-style-compact) { --kf-gap: 12px; --kf-pad: 7px 10px; font-size: .95em; }
:where(.kf-style-large) { --kf-gap: 24px; --kf-pad: 14px 16px; font-size: 1.08em; }

/* third-party widgets, toned to the form */
.kf-form .ts-wrapper { width: 100%; }
.kf-form .ts-wrapper.kf-input { padding: 0; border: 0; background: none; }
.kf-form .ts-control { border: 1px solid var(--kf-l); border-radius: 0; padding: var(--kf-p); background: var(--kf-bg); color: var(--kf-ft); font: inherit; box-shadow: none; }
.kf-form .ts-wrapper.focus .ts-control { outline: 2px solid var(--kf-a); outline-offset: 1px; box-shadow: none; }
.kf-form .ts-wrapper.multi .ts-control > .item { background: var(--kf-soft); border: 0; color: inherit; }
.kf-form .ts-dropdown { border-radius: 0; font: inherit; }
.kf-form .ts-dropdown .active { background: color-mix(in srgb, var(--kf-a) 12%, transparent); color: inherit; }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange { background: var(--kf-a, #2f5bd3); border-color: var(--kf-a, #2f5bd3); }

/* the builder's canvas: nothing animates, hidden-by-condition fields stay visible but faded */
.kf-canvas .kf-field[data-kf-off] { display: grid !important; opacity: .45; }
.kf-canvas .kf-step[hidden] { display: grid !important; }
.kf-canvas * { animation: none !important; }

/* quiz result under the confirmation */
:where(.kf-quiz-result) { margin-top: 16px; }
:where(.kf-quiz-headline) { font-weight: 600; font-size: 1.1em; margin: 0 0 12px; }
:where(.kf-quiz-table) { width: 100%; border-collapse: collapse; font-size: .95em; }
:where(.kf-quiz-table) :where(th, td) { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--kf-line, #d6d3dc); vertical-align: top; }
:where(.kf-quiz-table .kf-mark) { display: inline-block; margin-left: 6px; font-size: .85em; font-weight: 600; }
:where(.kf-quiz-table .kf-right .kf-mark) { color: #1f7a4d; }
:where(.kf-quiz-table .kf-wrong .kf-mark) { color: #b4332a; }
@media (max-width: 560px) { :where(.kf-quiz-table) :where(th:nth-child(3), td:nth-child(3)) { display: none; } }

/* survey results after sending and in [kindly_forms_results] */
:where(.kf-survey) { margin-top: 18px; }
:where(.kf-survey-q) { font-weight: 600; margin: 0 0 8px; }
:where(.kf-survey-list) { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
:where(.kf-survey-list li) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, 2fr) auto; gap: 10px; align-items: center; }
:where(.kf-survey-bar) { display: block; height: 10px; background: color-mix(in srgb, currentColor 10%, transparent); }
:where(.kf-survey-bar > span) { display: block; height: 100%; background: var(--kf-accent, #2f5bd3); }
:where(.kf-survey-n) { font-variant-numeric: tabular-nums; white-space: nowrap; }
:where(.kf-survey-count) { opacity: .7; }

/* stock (inventory.php): sold-out choices, what is left, a field with nothing left */
:where(.kf-choice-note) { font-size: .875em; color: var(--kf-m); white-space: nowrap; }
:where(.kf-choice.is-sold-out) { opacity: .55; cursor: not-allowed; }
:where(.kf-choice.is-sold-out .kf-choice-label) { text-decoration: line-through; }
:where(.kf-sold-out) { margin: 4px 0 0; color: var(--kf-m); font-size: .9em; }
