/* —— Studio builder (canvas + palette) —— */
.cf-studio {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cf-studio__content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.cf-studio__rail {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    overflow: hidden;
}

.cf-studio__rail .cf-palette__scroll {
    padding-bottom: 1.5rem;
}

.cf-studio-rail__item {
    cursor: pointer;
    -webkit-user-drag: none;
    align-items: flex-start;
}

.cf-studio-rail__item.is-active {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.cf-studio-rail__text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .12rem;
}

.cf-studio-rail__summary {
    display: block;
    color: #64748b;
    font-size: .72rem;
    line-height: 1.35;
    font-weight: 400;
}

.cf-studio__form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.cf-studio.is-settings-extra .cf-studio__content {
    flex-direction: row;
}

.cf-studio.is-settings-extra .cf-studio__form {
    flex: 0 0 250px;
    width: 250px;
    min-width: 250px;
    max-width: 250px;
}

.cf-studio.is-settings-extra .cf-studio__panel[data-cf-panel="builder"],
.cf-studio.is-settings-extra .cf-settings-main,
.cf-studio.is-settings-extra .cf-studio__footer {
    display: none !important;
}

.cf-studio.is-settings-extra .cf-studio__panel[data-cf-panel="settings"] {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.cf-studio.is-settings-extra .cf-settings-workspace {
    display: block;
    min-height: 0;
    height: 100%;
}

.cf-studio.is-settings-extra .cf-studio__extra {
    display: flex;
    flex: 1;
    min-width: 0;
    min-height: 0;
}

.cf-studio.is-settings-extra .cf-studio__extra > .cf-studio__panel.is-active {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.cf-studio:has(.cf-studio__extra .is-active):not(.is-settings-extra) .cf-studio__form {
    min-height: 0;
    flex: 0 0 auto;
}

.cf-studio__tabs {
    display: flex;
    gap: 0;
    padding: 0 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
    align-items: stretch;
    flex-wrap: wrap;
}

.cf-studio__help-link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .7rem .4rem .65rem;
    color: #64748b;
    font-weight: 600;
    font-size: .88rem;
    text-decoration: none;
    white-space: nowrap;
}

.cf-studio__help-link:hover {
    color: #2563eb;
}

.cf-studio__tab {
    appearance: none;
    border: 0;
    background: transparent;
    padding: .95rem 1rem .85rem;
    margin: 0;
    font-weight: 600;
    font-size: .92rem;
    color: #64748b;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.cf-studio__tab:hover {
    color: #0f172a;
}

.cf-studio__tab.is-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.cf-studio__panel {
    display: none;
    flex: 1;
}

.cf-studio__panel.is-active {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.cf-studio__panel[data-cf-panel="settings"] {
    overflow: hidden;
}

.cf-studio__panel[data-cf-panel="versions"],
.cf-studio__panel[data-cf-panel="translations"],
.cf-studio__panel[data-cf-panel="panel"],
.cf-studio__panel[data-cf-panel="rounds"],
.cf-studio__panel[data-cf-panel="approval"] {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.cf-studio__extra {
    display: none;
}

.cf-studio.is-settings-extra .cf-studio__extra {
    display: flex;
}

.cf-studio__extra > .cf-studio__panel.is-active {
    flex: 1;
    min-height: 0;
}

.cf-settings-workspace {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    flex: 1;
    min-height: 0;
    background: #f8fafc;
    overflow: hidden;
}

.cf-settings-main {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    min-height: 0;
}

.cf-studio__workspace {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    flex: 1;
    min-height: 520px;
    background: #f8fafc;
    overflow: hidden;
}

.cf-studio__canvas {
    position: relative;
    padding: 1.25rem 1.35rem 2rem;
    overflow: auto;
    min-height: 0;
    height: 100%;
    border-left: 1px solid #e5e7eb;
    transition: background .15s, box-shadow .15s;
    -webkit-overflow-scrolling: touch;
}

.cf-studio__canvas.is-drop-target {
    background: #eff6ff;
}

.cf-studio__canvas.is-drag-over {
    box-shadow: inset 0 0 0 2px #93c5fd;
}

.cf-canvas-empty {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    background: #fff;
    color: #64748b;
    margin-bottom: 1rem;
}

.cf-canvas-empty.d-none {
    display: none !important;
}

.cf-canvas-empty__inner {
    text-align: center;
    padding: 2rem 1.5rem;
}

.cf-canvas-empty__inner i {
    font-size: 2rem;
    color: #94a3b8;
    margin-bottom: .75rem;
}

.cf-canvas-empty__inner p {
    margin: 0 0 .35rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #334155;
}

.cf-canvas-empty__inner span {
    font-size: .88rem;
    color: #94a3b8;
}

.cf-studio__palette {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    background: #fff;
    overflow: hidden;
}

.cf-palette__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: .75rem .85rem 1.25rem;
    -webkit-overflow-scrolling: touch;
}

.cf-palette__title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #94a3b8;
    margin: 0 0 .75rem .35rem;
}

.cf-palette__group {
    margin-bottom: 1rem;
}

.cf-palette__group-label {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #94a3b8;
    margin: 0 .35rem .4rem;
}

.cf-palette__item {
    display: flex;
    align-items: center;
    gap: .65rem;
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 8px;
    padding: .55rem .6rem;
    margin: 0 0 .15rem;
    color: #0f172a;
    cursor: grab;
    -webkit-user-drag: element;
    transition: background .12s, border-color .12s;
}

.cf-palette__item:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.cf-palette__item.is-dragging {
    opacity: .55;
}

.cf-palette__icon {
    width: 1.6rem;
    height: 1.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    flex-shrink: 0;
}

.cf-palette__label {
    font-size: .9rem;
    font-weight: 500;
    line-height: 1.2;
}

.cf-palette__clear {
    margin-top: .75rem;
    width: 100%;
}

.cf-palette__hint {
    margin: .45rem 0 0;
    padding: 0 .15rem;
    font-size: .75rem;
    line-height: 1.35;
}

.cf-studio__settings {
    padding: 1.5rem 1.75rem 2rem;
    max-width: 860px;
    width: 100%;
    box-sizing: border-box;
}

.cf-settings-pane {
    display: none;
}

.cf-settings-pane.is-active {
    display: block;
}

.cf-settings-pane__title {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    font-weight: 650;
}

.cf-export-cols {
    margin: 1.25rem 0 0;
    padding: 1rem 1.1rem 1.1rem;
    border: 1px solid var(--hh-border-color-soft, #e5e7eb);
    border-radius: 10px;
    background: #fff;
}

.cf-export-cols__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .65rem;
}

.cf-export-cols__toolbar {
    display: flex;
    gap: .25rem;
    flex-wrap: wrap;
}

.cf-export-col {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-weight: 400;
    margin: 0 0 .4rem;
    cursor: pointer;
}

.cf-export-col.is-locked {
    opacity: .65;
    cursor: not-allowed;
}

.cf-export-col__tag {
    font-size: .7rem;
    font-weight: 650;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #9a3412;
    background: #ffedd5;
    border-radius: 999px;
    padding: .05rem .4rem;
    margin-left: .15rem;
}
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.1rem 1.15rem;
    margin: 0 0 1.25rem;
    background: #fff;
}

.cf-end-block > legend {
    float: none;
    width: auto;
    padding: 0 .25rem;
    margin-bottom: .65rem;
    font-size: .95rem;
}

.cf-radio-stack {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    margin-bottom: 1rem;
}

.cf-radio-stack__item {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0;
    font-weight: 500;
    cursor: pointer;
}

.cf-fill-done__message {
    margin: .75rem 0 1rem;
    text-align: left;
    max-width: 36rem;
}

.cf-fill-done__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    margin-top: 1rem;
}

@media (max-width: 991px) {
    .cf-settings-workspace {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
    }

    .cf-studio__rail {
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
        max-height: 42vh;
    }

    .cf-studio-rail__summary {
        display: none;
    }

    .cf-studio.is-settings-extra .cf-studio__content {
        flex-direction: column;
    }

    .cf-studio.is-settings-extra .cf-studio__form {
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
        min-width: 0;
    }
}


.cf-studio__settings--versions {
    max-width: none;
    width: 100%;
    box-sizing: border-box;
}

/* Versions panel (shared versioning UI inside studio) */
.cf-studio__settings--versions .tc-versions__intro {
    max-width: 720px;
    margin-bottom: 1.25rem;
}

.cf-studio__settings--versions .tc-versions__heading {
    margin: 1.5rem 0 0.65rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.cf-studio__settings--versions .tc-versions__wrap,
.cf-studio__settings--versions .cf-form-table-wrap {
    margin-bottom: 0.25rem;
}

.cf-studio__settings--versions .tc-versions__table {
    width: 100%;
    min-width: 960px;
    margin: 0;
    border-collapse: collapse;
    table-layout: auto;
}

.cf-studio__settings--versions .tc-versions__table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
    vertical-align: middle;
}

.cf-studio__settings--versions .tc-versions__table tbody td {
    padding: .85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.cf-studio__settings--versions .tc-versions__table tbody tr:last-child td {
    border-bottom: 0;
}

.cf-studio__settings--versions .tc-versions__table tbody tr:hover td {
    background: #f8fafc;
}

.cf-studio__settings--versions .tc-versions__th-actions,
.cf-studio__settings--versions .tc-versions__actions {
    width: 1%;
    white-space: nowrap;
    text-align: right;
    vertical-align: middle;
}

.cf-studio__settings--versions .tc-versions__btn-row {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}

.cf-studio__settings--versions .tc-versions__btn-row .btn {
    margin: 0;
    white-space: nowrap;
}

.cf-studio__settings--versions .tc-versions__hidden-form {
    display: none !important;
}

.cf-studio__settings--versions .tc-versions__summary {
    margin: 0;
    padding-left: 1.1rem;
}

.cf-studio__settings--versions .tc-versions__col-status {
    white-space: nowrap;
}

.cf-style-accs {
    margin: 1rem 0 0;
}

.cf-style-acc {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: .5rem;
    background: #fff;
}

.cf-style-acc > summary {
    cursor: pointer;
    font-weight: 600;
    padding: .75rem 1rem;
    list-style: none;
}

.cf-style-acc > summary::-webkit-details-marker {
    display: none;
}

.cf-style-acc > summary::after {
    content: "\f107";
    font-family: FontAwesome;
    float: right;
    color: #94a3b8;
}

.cf-style-acc[open] > summary::after {
    content: "\f106";
}

.cf-style-acc__body {
    padding: .15rem 1rem 1rem;
    border-top: 1px solid #e2e8f0;
}

.cf-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .85rem 1rem;
    padding-top: .85rem;
}

.cf-style-grid__item--color {
    grid-column: 1 / -1;
    max-width: 26rem;
}

.cf-style-color {
    position: relative;
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: nowrap;
}

.cf-style-color__trigger {
    width: 2.4rem;
    height: 2.4rem;
    padding: 2px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.cf-style-color__trigger[aria-expanded="true"] {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .2);
}

.cf-style-color__preview {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 5px;
    background-color: #fff;
}

.cf-style-color .form-control {
    min-width: 0;
    flex: 1 1 auto;
}

.cf-style-color__clear {
    flex-shrink: 0;
}

.cf-style-color__panel {
    position: absolute;
    z-index: 40;
    top: calc(100% + .35rem);
    left: 0;
    right: auto;
    width: min(22rem, calc(100vw - 2rem));
    padding: .85rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
}

.cf-style-color__panel-title {
    font-weight: 600;
    margin-bottom: .65rem;
}

.cf-style-color__panel-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .85rem 1rem;
    align-items: end;
    margin-bottom: .75rem;
}

.cf-style-color__swatch-wrap,
.cf-style-color__alpha-wrap {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    margin: 0;
}

.cf-style-color__swatch {
    width: 3.2rem;
    height: 2.4rem;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.cf-style-color__swatch::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.cf-style-color__swatch::-webkit-color-swatch {
    border: 0;
    border-radius: 5px;
}

.cf-style-color__alpha {
    width: 100%;
}

.cf-style-color__transparent {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0 0 .5rem;
    font-weight: 500;
}

.cf-style-color__panel .cf-hint {
    margin-top: 0;
}

.cf-css-editor {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: .85rem;
    line-height: 1.45;
}

.cf-hint {
    font-size: .85rem;
    margin-top: .5rem;
    margin-bottom: 0;
}

.cf-copy-feedback {
    margin-top: .5rem;
    font-size: .85rem;
    font-weight: 600;
}

.cf-thankyou__body {
    padding: 2rem 1.5rem;
}

.cf-thankyou__default {
    text-align: center;
    padding: 1rem 0 1.5rem;
}

.cf-thankyou__default .fa {
    font-size: 2.5rem;
    color: #16a34a;
    margin-bottom: .75rem;
}

.cf-thankyou__default h2 {
    margin: 0 0 .5rem;
    font-size: 1.5rem;
}

.cf-thankyou__content {
    margin-bottom: 1.25rem;
}

.cf-thankyou__actions {
    margin-top: 1.5rem;
}

.cf-rich-editor {
    margin-top: .35rem;
}

.cf-rich-editor .te-field {
    min-height: 8rem;
}

.cf-studio__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
}

.cf-studio__footer-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cf-fields-list.is-sorting .cf-field-card {
    transition: transform .1s;
}

.cf-field-card.is-reordering {
    opacity: .7;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}

.cf-field-card.is-collapsed > .cf-field-card__body {
    display: none;
}

.cf-field-card.is-expanded {
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}

.cf-field-card__header {
    cursor: pointer;
}

.cf-field-card__handle {
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #64748b;
    flex-shrink: 0;
}

.cf-field-card__handle:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.cf-field-card__handle:active,
.cf-fields-list.is-sorting .cf-field-card__handle {
    cursor: grabbing;
}

.cf-field-card.is-reordering {
    opacity: .85;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
    border-color: #2563eb;
    z-index: 5;
    position: relative;
}

@media (max-width: 991px) {
    .cf-studio__workspace {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        height: auto !important;
        min-height: 0;
        overflow: visible;
    }

    .cf-studio__palette {
        max-height: 42vh;
        border-bottom: 1px solid #e5e7eb;
    }

    .cf-studio__canvas {
        height: auto;
        max-height: none;
        overflow: visible;
        min-height: 50vh;
        border-left: 0;
    }

    [data-cf-palette-panel="fields"] {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: .35rem;
    }

    .cf-palette__title,
    .cf-palette__group-label {
        grid-column: 1 / -1;
    }

    .cf-palette__group {
        display: contents;
    }

    .cf-palette__clear {
        grid-column: 1 / -1;
    }
}

/* —— Builder (legacy helpers kept) —— */
.cf-builder__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.cf-builder__sub {
    color: var(--hh-text-color-soft, #6c757d);
    font-size: .875rem;
    margin-top: .25rem;
}

.cf-section {
    background: var(--hh-background-color-secondary, #f7f8fa);
    border: 1px solid var(--hh-border-color-soft, #e6e8eb);
    border-radius: 10px;
    padding: 1.25rem 1.35rem;
    margin-bottom: 1.25rem;
}

.cf-section__title {
    font-weight: 600;
    margin: 0 0 1rem;
}

.cf-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cf-label {
    display: block;
    font-weight: 600;
    font-size: .85rem;
    margin-bottom: .35rem;
}

.cf-optional,
.cf-hint {
    font-weight: 400;
    color: var(--hh-text-color-soft, #6c757d);
    font-size: .8rem;
    margin-left: .35rem;
}

.cf-checks {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    padding-top: .15rem;
}

.cf-lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: .35rem 1rem;
    max-height: 28rem;
    overflow: auto;
    border: 1px solid #dde2e6;
    border-radius: 4px;
    padding: .75rem;
    background: #fafbfc;
}

.cf-lang-check {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin: 0 !important;
    font-weight: normal;
    padding: .2rem .15rem;
}

.cf-lang-check__label {
    flex: 1 1 auto;
    min-width: 0;
}

.cf-lang-check__code {
    flex: 0 0 auto;
    font-size: .75em;
    opacity: .7;
}

.cf-set-toolbar {
    display: flex;
    gap: .5rem;
    margin-bottom: .85rem;
}

.cf-set-acc {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: .55rem;
    background: #fff;
}

.cf-set-acc > summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .25rem .75rem;
    cursor: pointer;
    list-style: none;
    padding: .8rem 1rem;
}

.cf-set-acc > summary::-webkit-details-marker {
    display: none;
}

.cf-set-acc > summary::after {
    content: "\f107";
    font-family: FontAwesome;
    margin-inline-start: auto;
    color: #94a3b8;
}

.cf-set-acc[open] > summary::after {
    content: "\f106";
}

.cf-set-acc__title {
    font-weight: 700;
    color: #0f172a;
}

.cf-set-acc__summary {
    font-size: .82rem;
    color: #64748b;
    font-weight: 500;
}

.cf-set-acc__body {
    padding: .15rem 1rem 1.1rem;
    border-top: 1px solid #e2e8f0;
}

.cf-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: .4rem;
    align-items: center;
}

.cf-field > .cf-label,
.cf-field > .cf-section__title,
.cf-field > h5,
.cf-field > label {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0;
}

/* Hints sit under the label, not on the same grid row (was overlapping). */
.cf-field > p:not(.form-control-plaintext),
.cf-field > .cf-hint {
    grid-column: 1 / -1;
    grid-row: auto;
    margin: .35rem 0 0;
}

.cf-check-setting {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: .4rem;
    align-items: center;
}

.cf-check-setting > label {
    grid-column: 1;
    grid-row: 1;
}

.cf-guide {
    display: contents;
}

/* Guides outside a grid (.cf-field / .cf-check-setting) still need a real box */
.cf-end-block > .cf-guide,
fieldset > .cf-guide,
.cf-settings-pane > .cf-guide {
    display: block;
    margin: 0 0 .65rem;
}

.cf-end-block > .cf-guide .cf-guide__toggle,
fieldset > .cf-guide .cf-guide__toggle,
.cf-settings-pane > .cf-guide .cf-guide__toggle {
    grid-column: auto;
    grid-row: auto;
    justify-self: auto;
}

.cf-guide__toggle {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: none;
    color: #64748b;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.cf-guide__toggle:hover,
.cf-guide__toggle:focus,
.cf-guide__toggle.is-open {
    color: #2563eb;
    background: #eff6ff;
}

.cf-guide__panel {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: .4rem 0 .15rem;
    padding: .65rem .75rem;
    border-radius: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-size: .82rem;
    line-height: 1.45;
}

.cf-guide__panel > :last-child {
    margin-bottom: 0;
}

.cf-guide__panel p,
.cf-guide__panel ol {
    margin: 0 0 .5rem;
}

.cf-guide__panel ol {
    padding-inline-start: 1.2rem;
}

.cf-field > .form-control,
.cf-field > .form-control-plaintext,
.cf-field > .cf-rich-editor,
.cf-field > .cf-checks,
.cf-field > .cf-lang-grid,
.cf-field > select,
.cf-field > textarea,
.cf-field > input {
    grid-column: 1 / -1;
    grid-row: auto;
    margin-top: .4rem;
}

.cf-checks label,
.cf-switch label {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-weight: 400;
    margin: 0;
    cursor: pointer;
}

.cf-fields-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--hh-text-color-soft, #6c757d);
    border: 1px dashed var(--hh-border-color-soft, #d0d5dd);
    border-radius: 10px;
    background: var(--hh-background-color-main, #fff);
}

.cf-fields-empty i {
    font-size: 1.75rem;
    margin-bottom: .5rem;
    opacity: .6;
}

.cf-fields-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.cf-field-card {
    background: var(--hh-background-color-main, #fff);
    border: 1px solid var(--hh-border-color-soft, #dce1e7);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    overflow: hidden;
}

.cf-field-card.is-group {
    border-color: #93c5fd;
    background: #f8fbff;
    overflow: visible;
}

.cf-group-shell {
    padding: .75rem 1rem 1rem;
    background: rgba(59, 130, 246, .04);
    border-top: 1px dashed #bfdbfe;
}

.cf-group-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
    margin-bottom: .65rem;
}

.cf-group-body {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    min-height: 3.5rem;
    padding: .65rem;
    border: 1px dashed #93c5fd;
    border-radius: 8px;
    background: #fff;
}

.cf-group-empty {
    margin: 0;
    padding: .85rem .5rem;
    text-align: center;
    color: #64748b;
    font-size: .88rem;
}

.cf-field-card.is-group-end {
    display: none !important;
}

.cf-question-group {
    margin: .35rem 0 1rem;
    padding: 0;
}

.cf-question-group.cf-hidden {
    display: none;
}

.cf-question-group__title {
    margin: 0 0 .5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.cf-field-card__header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    background: linear-gradient(180deg, #fafbfc 0%, #f4f6f8 100%);
    border-bottom: 1px solid var(--hh-border-color-soft, #e8ebef);
}

.cf-field-card__title {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.cf-field-card__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: #e8eef7;
    color: #344054;
    font-size: .75rem;
    font-weight: 700;
}

.cf-field-card__name {
    font-weight: 600;
    color: var(--hh-text-color-main, #1f2937);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 240px;
}

.cf-field-card__type-badge,
.cf-field-card__req {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .02em;
    padding: .15rem .45rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
}

.cf-field-card__req {
    background: #fef3c7;
    color: #92400e;
}

.cf-field-card__actions {
    display: flex;
    gap: .25rem;
    flex-shrink: 0;
}

.cf-field-card__body {
    padding: 1rem 1.1rem 1.15rem;
}

.cf-options-panel {
    margin-top: 1rem;
    padding: .9rem 1rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.cf-options-panel.d-none {
    display: none !important;
}

.cf-field-note {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    margin-top: .75rem;
    padding: .65rem .75rem;
    border-radius: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-size: .82rem;
    line-height: 1.45;
}

.cf-field-note.d-none {
    display: none !important;
}

.cf-field-note .fa {
    margin-top: .15rem;
    color: #2563eb;
    flex-shrink: 0;
}

.cf-field-note strong {
    display: block;
    margin-bottom: .2rem;
    font-weight: 700;
}

.cf-fn-guide {
    margin: 0 0 .5rem;
    padding-inline-start: 1.2rem;
}

.cf-fn-guide li {
    margin-bottom: .35rem;
}

.cf-field-note .cf-fn-guide {
    color: inherit;
}

.cf-action-row [data-cf-action-hint] .cf-hint {
    margin-top: .15rem;
}

.cf-field-help {
    margin-top: .3rem;
    font-size: .75rem;
    color: #64748b;
    line-height: 1.3;
}

.cf-advanced-panel {
    display: none;
    margin-top: 1rem;
    padding: .9rem 1rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

.cf-advanced-panel.is-open {
    display: block;
}

.cf-actions-panel {
    margin-top: 1rem;
    padding: .9rem 1rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

.cf-fn-guide {
    margin: 0 0 .5rem;
    padding-inline-start: 1.2rem;
}
.cf-fn-guide li {
    margin-bottom: .35rem;
}

.cf-advanced-title {
    font-weight: 600;
    font-size: .85rem;
    margin-bottom: .75rem;
}

.cf-builder__footer {
    display: flex;
    gap: .75rem;
    align-items: center;
    padding-top: .25rem;
}

html:has(body.cf-fill-standalone) {
    scroll-padding-top: 0;
}

body.cf-fill-standalone {
    padding-top: 0 !important;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    min-height: 100vh;
    min-height: 100dvh;
    background: #f8fafc;
}

body.cf-fill-standalone #topbar-first,
body.cf-fill-standalone #topbar-second {
    display: none !important;
}

.cf-fill-standalone__wrap {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: calc(env(safe-area-inset-top, 0px) + 1.75rem) 1rem calc(env(safe-area-inset-bottom, 0px) + 2.5rem);
}

/* —— Fill form —— */
.cf-fill-page {
    max-width: 1800px;
    width: 100%;
    margin: 0 auto 2rem;
}

@media (max-width: 575px) {
    .cf-fill-standalone__wrap {
        padding-top: calc(env(safe-area-inset-top, 0px) + 2.25rem);
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .cf-fill-page {
        max-width: none;
        margin: 0 0 1.25rem;
    }

    .cf-fill-body {
        padding: 1rem .9rem 1.15rem;
        border-radius: 10px;
    }
}

.cf-fill-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}

.cf-fill-toolbar__actions,
.cf-fill-toolbar__danger {
    display: flex;
    gap: .4rem;
    align-items: center;
}

.cf-fill-toolbar__delete {
    margin: 0;
}

.cf-fill-progress-wrap {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--hh-background-color-page, #f1f5f9);
}

.cf-fill-progress {
    height: 6px;
    background: var(--hh-background-color-page, #e2e8f0);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: .45rem;
}

.cf-fill-progress__bar {
    height: 100%;
    background: var(--bs-primary, #2563eb);
    border-radius: 999px;
    transition: width .2s ease;
}

.cf-fill-progress__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.cf-fill-progress__label {
    font-size: .8rem;
    color: var(--hh-text-color-secondary, #64748b);
}

.cf-fill-body {
    background: var(--hh-background-color-main, #fff);
    border: 1px solid var(--hh-background-color-page, #e5e7eb);
    border-radius: 14px;
    padding: 1.5rem 2rem 1.75rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .03);
}

.cf-fill-hero {
    margin: 0 0 1.15rem;
    padding-bottom: 1.05rem;
    border-bottom: 1px solid var(--hh-background-color-page, #e2e8f0);
}

.cf-fill-hero__title {
    margin: 0 0 .55rem;
    font-size: 1.55rem;
    font-weight: 750;
    line-height: 1.25;
    color: var(--hh-text-color-main, #0f172a);
}

.cf-fill-hero__desc {
    margin: 0;
    color: var(--hh-text-color-secondary, #475569);
    font-size: .98rem;
    line-height: 1.55;
}

.cf-question {
    padding: 1.15rem 0;
    border-bottom: 1px solid var(--hh-background-color-page, #f1f5f9);
}

.cf-question:last-of-type {
    border-bottom: 0;
}

.cf-question.cf-hidden {
    display: none;
}

.cf-question.cf-respondent-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cf-question__meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .55rem;
}

.cf-question__num {
    display: none;
}

.cf-question__required {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #b45309;
    background: #fffbeb;
    border-radius: 999px;
    padding: .1rem .45rem;
}

.cf-question__label {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--hh-text-color-main, #0f172a);
    margin-bottom: .35rem;
}

.cf-question__help {
    color: var(--hh-text-color-secondary, #64748b);
    font-size: .9rem;
    margin: 0 0 .75rem;
}

.cf-input {
    border-radius: 10px !important;
    padding: .7rem .9rem !important;
    border-color: var(--hh-background-color-page, #cbd5e1) !important;
    min-height: 2.75rem;
}

.cf-input:focus {
    border-color: var(--bs-primary, #2563eb) !important;
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .15) !important;
}

.cf-choice-list {
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.cf-choice {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin: 0;
    padding: .75rem .9rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-weight: 500;
    color: #334155;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.cf-choice:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.cf-choice:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 1px #2563eb;
}

.cf-choice input {
    margin: 0;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    width: 1.15rem;
    height: 1.15rem;
    border: 2px solid #94a3b8;
    background: #fff;
    box-shadow: none;
    cursor: pointer;
}

.cf-choice input[type="radio"] {
    border-radius: 50%;
}

.cf-choice input[type="checkbox"] {
    border-radius: .25rem;
}

.cf-choice input:checked {
    border-color: #2563eb;
    background-color: #2563eb;
    background-image: none;
}

.cf-choice input[type="radio"]:checked {
    background-image: radial-gradient(circle, #fff 0 32%, #2563eb 36% 100%);
}

.cf-choice input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='M3.5 8.5l2.8 2.8 6.2-6.6'/%3E%3C/svg%3E");
    background-size: 100% 100%;
}

.cf-other-specify {
    margin: .15rem 0 .65rem 1.85rem;
}

.cf-other-specify__label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--hh-text-color-secondary, #64748b);
    margin-bottom: .3rem;
}

/* Rating scale (fill form) */
.cf-rating-scale {
    margin-top: .65rem;
    width: 100%;
    padding: .85rem 1rem 1rem;
    border: 1px solid #e8eef5;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    box-sizing: border-box;
}

.cf-rating-options {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0;
    z-index: 0;
}

/* Connecting track behind the pills */
.cf-rating-options::before {
    content: '';
    position: absolute;
    left: calc(100% / (var(--cf-rating-count, 5) * 2));
    right: calc(100% / (var(--cf-rating-count, 5) * 2));
    top: 50%;
    height: 2px;
    margin-top: -1px;
    border-radius: 999px;
    background: #e8eef5;
    z-index: -1;
    pointer-events: none;
}

.cf-rating-option {
    position: relative;
    margin: 0;
    flex: 1 1 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    min-width: 0;
    z-index: 1;
}

.cf-rating-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.cf-rating-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    max-width: 100%;
    padding: 0;
    border: 2px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-weight: 700;
    font-size: .95rem;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
    transition: border-color .15s, background .15s, color .15s, transform .15s, box-shadow .15s;
}

.cf-rating-option:hover .cf-rating-pill {
    border-color: #2563eb;
    color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, .15);
}

.cf-rating-option.is-selected .cf-rating-pill,
.cf-rating-option:has(input:checked) .cf-rating-pill,
.cf-rating-option input:checked + .cf-rating-pill {
    border-color: #2563eb;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .28);
    transform: translateY(-1px);
}

.cf-rating-option:not(:has(input:checked)):not(.is-selected) .cf-rating-pill {
    background: #fff;
    color: #334155;
    border-color: #cbd5e1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
    transform: none;
}

.cf-rating-labels {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.25rem;
    margin-top: .75rem;
    width: 100%;
    font-size: .82rem;
    color: #64748b;
    line-height: 1.35;
}

.cf-rating-label {
    flex: 1 1 0;
    min-width: 0;
}

.cf-rating-label-low {
    text-align: start;
    padding-inline-end: .5rem;
}

.cf-rating-label-high {
    text-align: end;
    padding-inline-start: .5rem;
}

@media (max-width: 575px) {
    .cf-rating-scale {
        padding: .7rem .65rem .85rem;
    }

    .cf-rating-pill {
        width: 2.35rem;
        height: 2.35rem;
        font-size: .85rem;
    }

    .cf-rating-labels {
        font-size: .75rem;
        gap: .75rem;
    }
}

/* Vertical VAS / thermometer (ruler: spine, 1/5/10 ticks, numbers on the right) */
.cf-vas {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.25rem 2rem;
    align-items: start;
    margin-top: .35rem;
}

.cf-vas__copy {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    min-width: 0;
}

.cf-vas__help {
    margin: 0;
    color: #111;
    font-size: .95rem;
    line-height: 1.45;
    white-space: pre-line;
}

.cf-vas__score {
    margin-top: auto;
    max-width: 9rem;
}

.cf-vas__score-label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: .25rem;
}

.cf-vas__input {
    font-size: 1.35rem;
    font-weight: 700;
    text-align: center;
    padding: .45rem .5rem;
}

.cf-vas__scale {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: max-content;
}

.cf-vas__end {
    width: 5.5rem;
    margin-inline-start: 0.2rem;
    text-align: start;
    font-size: .8rem;
    font-weight: 400;
    line-height: 1.2;
    color: #111;
}

.cf-vas__end--high {
    margin-bottom: .35rem;
}

.cf-vas__end--low {
    margin-top: .35rem;
}

.cf-vas__ruler {
    position: relative;
    height: min(72vh, 560px);
    width: auto;
    aspect-ratio: 200 / 1032;
}

.cf-vas__svg {
    display: block;
    width: auto;
    height: 100%;
    overflow: visible;
}

.cf-vas__spine,
.cf-vas__tick {
    stroke: #111;
    stroke-linecap: square;
    shape-rendering: crispEdges;
    vector-effect: non-scaling-stroke;
}

.cf-vas__spine {
    stroke-width: 1.25px;
}

.cf-vas__tick--major {
    stroke-width: 1.25px;
}

.cf-vas__tick--mid {
    stroke-width: 1px;
}

.cf-vas__tick--minor {
    stroke-width: 1px;
}

.cf-vas__n {
    fill: #111;
    font-size: 22px;
    font-family: Arial, Helvetica, sans-serif;
    font-variant-numeric: tabular-nums;
    dominant-baseline: middle;
}

.cf-vas__hit {
    position: absolute;
    cursor: pointer;
    touch-action: none;
    outline: none;
}

.cf-vas__hit:focus-visible {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .35);
}

.cf-vas__marker {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    margin-top: -1px;
    border-top: 2px solid #111;
    pointer-events: none;
}

.cf-vas__marker::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -4px;
    width: 8px;
    height: 8px;
    margin-left: -4px;
    border-radius: 50%;
    background: #111;
}

.is-frozen .cf-vas__hit {
    cursor: not-allowed;
    opacity: .7;
}

@media (max-width: 640px) {
    .cf-vas {
        grid-template-columns: 1fr;
    }

    .cf-vas__ruler {
        height: min(62vh, 480px);
        margin: 0 auto;
    }

    .cf-vas__scale {
        align-items: center;
        width: 100%;
    }

    .cf-vas__score {
        max-width: none;
    }
}

.cf-licence-footer {
    margin: 1.25rem 0 0;
    font-size: .75rem;
    color: #64748b;
    line-height: 1.35;
}

/* Ranking (fill form) */
.cf-ranking {
    margin-top: .15rem;
}

.cf-ranking-hint {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    margin: 0 0 .85rem;
    padding: .55rem .75rem;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: .86rem;
    line-height: 1.35;
}

.cf-ranking-hint .fa {
    color: #64748b;
    margin-top: .15rem;
    flex-shrink: 0;
}

.cf-ranking-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .55rem;
    counter-reset: none;
}

.cf-ranking-list.is-sorting {
    user-select: none;
    -webkit-user-select: none;
}

.cf-ranking-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .65rem .75rem;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: border-color .15s, box-shadow .15s, opacity .15s, transform .15s;
}

.cf-ranking-item:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .08);
}

.cf-ranking-item.is-dragging {
    opacity: .75;
    border-color: #2563eb;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .18);
    background: #eff6ff;
    z-index: 2;
}

.cf-ranking-placeholder {
    list-style: none;
    border: 2px dashed #93c5fd;
    border-radius: 12px;
    background: rgba(37, 99, 235, .06);
}

.cf-ranking-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    flex-shrink: 0;
}

.cf-ranking-handle:hover,
.cf-ranking-handle:focus {
    background: #e2e8f0;
    color: #1e293b;
    outline: none;
}

.cf-ranking-handle:active,
.is-sorting .cf-ranking-handle {
    cursor: grabbing;
}

.cf-ranking-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.cf-ranking-label {
    flex: 1 1 auto;
    min-width: 0;
    color: #0f172a;
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.35;
    word-break: break-word;
}

.cf-ranking-controls {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: .25rem;
    flex-shrink: 0;
}

.cf-ranking-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    line-height: 1;
    cursor: pointer;
}

.cf-ranking-btn:hover:not(:disabled) {
    border-color: #2563eb;
    color: #1d4ed8;
    background: #eff6ff;
}

.cf-ranking-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

@media (max-width: 575px) {
    .cf-ranking-item {
        gap: .4rem;
        padding: .55rem .6rem;
    }

    .cf-ranking-handle,
    .cf-ranking-btn {
        width: 2rem;
        height: 2rem;
    }

    .cf-ranking-order {
        width: 1.65rem;
        height: 1.65rem;
        font-size: .75rem;
    }

    .cf-ranking-label {
        font-size: .92rem;
    }

    .cf-ranking-hint {
        font-size: .8rem;
    }
}

.cf-rating-panel {
    margin-top: 1rem;
    padding: .9rem 1rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.cf-rating-panel.d-none {
    display: none !important;
}

.cf-rating-panel > .cf-field-note {
    margin-top: 0;
    margin-bottom: .85rem;
}

.cf-file-box {
    padding: 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
}

.cf-form-page {
    display: none;
}

.cf-form-page.is-active {
    display: block;
}

.cf-form-page__title {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.cf-page-indicator {
    margin-top: .45rem;
    font-size: .85rem;
    font-weight: 600;
    color: #475569;
}

.cf-resume-saved {
    margin: 0 0 1.25rem;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(34, 120, 80, .28);
    border-radius: 10px;
    background: rgba(34, 120, 80, .06);
}

.cf-resume-saved__title {
    font-weight: 650;
    margin-bottom: .35rem;
}

.cf-resume-saved__help {
    margin: 0 0 .85rem;
    color: var(--hh-text-color-secondary, #667);
    font-size: .92rem;
}

.cf-resume-code-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-bottom: .9rem;
}

.cf-resume-code {
    font-size: 1.15rem;
    letter-spacing: .06em;
    padding: .45rem .7rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .1);
}

.cf-resume-email-form .cf-label,
.cf-resume-lookup .cf-label,
.cf-save-panel .cf-label {
    display: block;
    font-size: .85rem;
    margin-bottom: .35rem;
}

.cf-resume-email-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.cf-resume-email-row .form-control {
    flex: 1 1 220px;
    min-width: 0;
}

.cf-resume-lookup {
    margin: 0 0 1rem;
    padding: .65rem .85rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, .03);
}

.cf-resume-lookup > summary {
    cursor: pointer;
    font-weight: 600;
}

.cf-resume-lookup__form {
    margin-top: .75rem;
}

.cf-resume-banner {
    margin-bottom: 1rem;
}

.cf-resume-gate {
    margin: 0 0 1.5rem;
    padding: 1.15rem 1.25rem 1.35rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.cf-resume-gate__title {
    margin: 0 0 .4rem;
    font-size: 1.2rem;
}

.cf-resume-gate__lead {
    margin: 0 0 1.15rem;
    color: var(--hh-text-color-secondary, #667);
}

.cf-resume-gate__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.cf-resume-gate__card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.1rem 1.15rem;
}

.cf-resume-gate__card h3 {
    margin: 0 0 .4rem;
    font-size: 1.02rem;
}

.cf-resume-gate__card > p {
    margin: 0 0 .85rem;
    color: var(--hh-text-color-secondary, #667);
    font-size: .92rem;
}

.cf-save-panel {
    position: fixed;
    inset: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(20, 24, 28, .45);
}

.cf-save-panel[hidden] {
    display: none !important;
}

.cf-save-panel__inner {
    width: min(440px, 100%);
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}

.cf-save-panel__inner h3 {
    margin: 0 0 .5rem;
    font-size: 1.15rem;
}

.cf-save-panel__inner > p {
    margin: 0 0 1rem;
    color: var(--hh-text-color-secondary, #667);
    font-size: .92rem;
}

.cf-save-panel .cf-check {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    margin: .75rem 0 1rem;
    font-size: .9rem;
}

.cf-save-panel__actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
}

.cf-fill-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.cf-fill-nav__start {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.cf-fill-nav__end {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .6rem;
    margin-inline-start: auto;
}

.cf-fill-nav .cf-fill-submit {
    margin: 0;
    padding: 0;
    border: 0;
    display: inline-flex;
}

.cf-fill-errors {
    margin: 1rem 0 0;
    padding: .75rem 1rem;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: .95rem;
}

.cf-question.cf-page-error {
    border-inline-start: 3px solid #ef4444;
    padding-inline-start: .75rem;
}

.cf-question__error {
    margin: .4rem 0 0;
    color: #b91c1c;
    font-size: .875rem;
}

.cf-question .cf-input.is-invalid {
    border-color: #ef4444;
}

.cf-rich-block,
.cf-html-block {
    margin: .25rem 0 .5rem;
    line-height: 1.55;
    color: #0f172a;
}

.cf-rich-block img,
.cf-thankyou__content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: .35rem 0 .75rem;
}

.cf-rich-block p:last-child,
.cf-html-block p:last-child {
    margin-bottom: 0;
}

.cf-page-panel,
.cf-rich-panel,
.cf-html-panel,
.cf-action-panel {
    margin-top: 1rem;
    padding: .9rem 1rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.cf-page-panel.d-none,
.cf-rich-panel.d-none,
.cf-html-panel.d-none,
.cf-action-panel.d-none {
    display: none !important;
}

.cf-branch-row .btn {
    margin-top: .15rem;
}

.cf-fill-submit {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.cf-fill-done {
    text-align: center;
    padding: 2rem 1rem;
}

.cf-fill-done i {
    font-size: 2.5rem;
    color: #16a34a;
    margin-bottom: .75rem;
}

.cf-fill-done h3 {
    margin-bottom: 1rem;
}

/* —— Forms list —— */
.cf-list-page {
    margin-bottom: 2rem;
}

.cf-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.cf-list-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
}

.cf-list-sub {
    margin: .3rem 0 0;
    color: #64748b;
}

.cf-list-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.cf-cms {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 0;
    min-height: 520px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}
.cf-cms-rail {
    background: #fff;
    border-right: 1px solid #e5e7eb;
    padding: .75rem .65rem 1.25rem;
    overflow: auto;
}
.cf-cms-rail__label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #94a3b8;
    margin: .85rem .5rem .35rem;
}
.cf-cms-rail__label:first-child { margin-top: .2rem; }
.cf-cms-folder {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .55rem .6rem;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    border: 1px solid transparent;
}
.cf-cms-folder--nested {
    padding-left: calc(.6rem + var(--cf-depth, 0) * 1rem);
}
.cf-cms-folder:hover { background: #f8fafc; color: inherit; text-decoration: none; }
.cf-cms-folder.is-active {
    background: #eff6ff;
    border-color: #dbeafe;
}
.cf-cms-folder__icon {
    width: 1.7rem;
    height: 1.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    flex-shrink: 0;
    margin-top: .1rem;
}
.cf-cms-folder.is-active .cf-cms-folder__icon { color: #2563eb; }
.cf-cms-folder__body { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.cf-cms-folder__name {
    font-weight: 600;
    color: #0f172a;
    line-height: 1.25;
}
.cf-cms-folder__count { font-size: .75rem; color: #64748b; }
.cf-cms-main {
    min-width: 0;
    padding: 1rem 1.15rem 1.35rem;
    background: #f8fafc;
}
.cf-cms-main__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: .85rem;
}
.cf-cms-main__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}
.cf-cms-main__meta { margin: .2rem 0 0; color: #64748b; }
.cf-cms-main .cf-list-filters { margin-bottom: .85rem; }
.cf-cms-main .cf-list-empty { border-radius: 12px; }
.cf-cms-main .cf-folder-crumbs { margin: .35rem 0 0; }
.cf-cms-main .cf-folder-toolbar { margin: 0; align-items: center; }
@media (max-width: 991px) {
    .cf-cms { grid-template-columns: 1fr; }
    .cf-cms-rail { border-right: 0; border-bottom: 1px solid #e5e7eb; max-height: 240px; }
}

.cf-list-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    color: #64748b;
}

.cf-list-empty i {
    font-size: 2.25rem;
    margin-bottom: .75rem;
    opacity: .55;
}

.cf-list-empty h3 {
    color: #0f172a;
    margin-bottom: .5rem;
}

.cf-form-table-wrap {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: auto;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}

.cf-form-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    min-width: 720px;
}

.cf-form-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
    vertical-align: middle;
}

.cf-form-table tbody td {
    padding: .85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.cf-form-table tbody tr:last-child td {
    border-bottom: 0;
}

.cf-form-table tbody tr:hover td {
    background: #f8fafc;
}

.cf-form-table__actions-col {
    width: 1%;
    white-space: nowrap;
}

.cf-form-table__status-col {
    width: 1%;
    white-space: nowrap;
}

.cf-form-table__form-col {
    min-width: 280px;
}

.cf-form-table__num-col {
    width: 1%;
    text-align: center;
    white-space: nowrap;
}

.cf-form-row__actions {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: nowrap;
}

.cf-form-row__delete {
    display: inline;
    margin: 0;
}

.cf-form-row__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.3;
}

.cf-form-row__title a {
    color: #0f172a;
    text-decoration: none;
    min-width: 0;
}

.cf-form-row__title a:hover {
    color: #2563eb;
}

.cf-form-row__chip {
    display: inline-flex;
    align-items: center;
    padding: .12rem .55rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    flex-shrink: 0;
}

.cf-form-row__chip--icon {
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    justify-content: center;
}

.cf-form-row__desc {
    margin-top: .2rem;
    color: #64748b;
    font-size: .85rem;
    line-height: 1.4;
}

.cf-form-row__stat {
    display: inline-block;
    min-width: 1.75rem;
    font-weight: 650;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.cf-form-table__type-col,
.cf-form-table__date-col {
    width: 1%;
    white-space: nowrap;
    color: #64748b;
    font-size: .85rem;
}

.cf-form-table thead th a {
    color: inherit;
    text-decoration: none;
}

.cf-form-table thead th a:hover {
    color: #0f172a;
}

.cf-form-table thead th a.asc:after,
.cf-form-table thead th a.desc:after {
    font-size: .65em;
    margin-left: .25rem;
}

.cf-form-table thead th a.asc:after {
    content: "▲";
}

.cf-form-table thead th a.desc:after {
    content: "▼";
}

.cf-list-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin: 0 0 1rem;
    padding: .75rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.cf-list-filters__search {
    position: relative;
    flex: 1 1 220px;
    min-width: 180px;
}

.cf-list-filters__search i {
    position: absolute;
    left: .75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.cf-list-filters__search input {
    width: 100%;
    padding: .4rem .75rem .4rem 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.cf-list-filters select {
    min-width: 140px;
    max-width: 260px;
    padding: .4rem .6rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.cf-folder-jump {
    min-width: 200px;
    max-width: 320px;
}

.cf-list-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.cf-list-pager__count {
    color: #64748b;
    font-size: .9rem;
}

.cf-folder-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
    margin: 0 0 .85rem;
    color: #64748b;
    font-size: .92rem;
}

.cf-folder-crumbs a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.cf-folder-crumbs a:hover {
    text-decoration: underline;
}

.cf-folder-crumbs__sep {
    color: #cbd5e1;
}

.cf-folder-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: -.35rem 0 1rem;
}

.cf-folder-toolbar__delete {
    display: inline;
    margin: 0;
}

.cf-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .75rem;
    margin: 0 0 1.1rem;
}

.cf-folder-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}

.cf-folder-card:hover {
    border-color: #93c5fd;
    color: inherit;
}

.cf-folder-card__icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cf-folder-card__name {
    display: block;
    font-weight: 650;
    color: #0f172a;
}

.cf-folder-card__meta {
    display: block;
    color: #64748b;
    font-size: .8rem;
    margin-top: .1rem;
}

.cf-move-form {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin: 0;
}

.cf-move-form__label {
    font-size: .72rem;
    color: #64748b;
    white-space: nowrap;
}

.cf-move-form__select {
    max-width: 160px;
    padding: .2rem .35rem;
    font-size: .75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #334155;
}

.cf-folder-form__card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    margin-bottom: 1rem;
}

.cf-folder-form__h {
    margin: 0 0 .5rem;
    font-size: 1.1rem;
}

.cf-folder-form__actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.cf-email-colors .form-group {
    margin-bottom: .65rem;
}

.cf-email-color {
    height: 38px;
    max-width: 100%;
    padding: .15rem .25rem;
}

.cf-email-vars {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.cf-email-vars .btn.is-copied {
    background: #dcfce7;
    border-color: #86efac;
}

.cf-acl-table th,
.cf-acl-table td {
    text-align: left;
}

.cf-acl-table td:not(:first-child),
.cf-acl-table th:not(:first-child) {
    text-align: center;
    width: 8rem;
}

.cf-studio__nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
    padding: .7rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 5;
    flex-shrink: 0;
}

.cf-studio__back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: #334155;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    white-space: nowrap;
}

.cf-studio__back:hover {
    color: #2563eb;
}

.cf-studio__nav-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
    margin-inline-start: .5rem;
}

.cf-studio__delete-form {
    display: inline;
    margin: 0;
}

.cf-studio__footer-actions .btn,
.cf-studio__nav-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 2.4rem;
    padding: .45rem 1rem;
    font-size: .95rem;
    font-weight: 700;
    white-space: nowrap;
}

.cf-studio__nav-title {
    flex: 1;
    min-width: 0;
    font-weight: 700;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cf-answer-row.is-active td {
    background: #eff6ff;
}

.cf-answer-row__open {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    border: 0;
    background: none;
    padding: 0;
    text-align: left;
    cursor: pointer;
    color: inherit;
}

.cf-answer-row__name {
    display: block;
    font-weight: 650;
    color: #0f172a;
}

.cf-answer-row__meta {
    display: block;
    color: #94a3b8;
    font-size: .75rem;
}

.cf-answers-page.is-drawer-open {
    position: relative;
}

.cf-answer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .35);
    z-index: 1040;
}

.cf-answer-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(560px, 100%);
    height: 100%;
    background: #fff;
    z-index: 1050;
    box-shadow: -8px 0 24px rgba(15, 23, 42, .18);
    display: none;
    flex-direction: column;
}

.cf-answers-page.is-drawer-open .cf-answer-overlay {
    display: block;
}

.cf-answers-page.is-drawer-open .cf-answer-drawer {
    display: flex;
}

.cf-answer-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid #e5e7eb;
}

.cf-answer-drawer__head h2 {
    margin: 0;
    font-size: 1.1rem;
}

.cf-answer-drawer__close {
    border: 0;
    background: #f1f5f9;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    cursor: pointer;
}

.cf-answer-drawer__body {
    overflow: auto;
    padding: 1.1rem;
    flex: 1;
}

.cf-answer-detail__name {
    font-size: 1.15rem;
    font-weight: 700;
}

.cf-answer-detail__when {
    color: #64748b;
    margin: .25rem 0 .6rem;
}

.cf-answer-detail__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .85rem;
}

.cf-answer-fields--stack {
    grid-template-columns: 1fr;
}

.cf-answer-drawer__loading {
    color: #64748b;
    padding: 1rem 0;
}

.cf-answer-map {
    margin: .25rem 0 .5rem;
}

.cf-answer-map .tm-shell {
    border-radius: 8px;
}

.cf-answer-map__count {
    margin: .4rem 0 0;
    color: #64748b;
    font-size: .85rem;
}

.cf-integrity-enable {
    margin: 0 0 1rem;
    padding: .85rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
}
.cf-integrity-enable .checkbox {
    margin: 0 0 .35rem;
}
.cf-integrity-enable .checkbox:last-of-type {
    margin-bottom: .5rem;
}
[data-cf-integrity-when-on].is-disabled {
    opacity: .45;
    pointer-events: none;
}

.cf-integrity-banner {
    margin: 0 0 1.1rem;
    padding: .9rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}
.cf-integrity-banner--ok {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.cf-integrity-banner--review {
    border-color: #fde68a;
    background: #fffbeb;
}
.cf-integrity-banner--low {
    border-color: #fecaca;
    background: #fef2f2;
}
.cf-integrity-banner__top {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.cf-integrity-banner__score {
    min-width: 4.5rem;
    text-align: center;
    line-height: 1;
}
.cf-integrity-banner__num {
    display: block;
    font-size: 1.85rem;
    font-weight: 750;
    color: #0f172a;
}
.cf-integrity-banner__out {
    font-size: .75rem;
    color: #64748b;
    font-weight: 600;
}
.cf-integrity-banner__title {
    font-weight: 700;
    margin-bottom: .25rem;
}
.cf-integrity-banner__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .35rem;
}
.cf-integrity-banner__components,
.cf-integrity-banner__flags {
    margin: .65rem 0 0;
    padding: 0;
    font-size: .85rem;
    color: #334155;
}
.cf-integrity-banner__flags {
    padding-inline-start: 1.1rem;
}
.cf-integrity-banner__form {
    display: grid;
    grid-template-columns: 1fr;
    gap: .65rem;
    margin-top: .85rem;
}
.cf-integrity-banner__save {
    padding-bottom: .1rem;
}
.cf-form-row__chip--analysis {
    background: #e0e7ff;
    color: #3730a3;
}
.cf-score-pill {
    display: inline-flex;
    min-width: 2.4rem;
    justify-content: center;
    padding: .15rem .45rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .85rem;
}
.cf-score-pill--ok {
    background: #dcfce7;
    color: #166534;
}
.cf-score-pill--review {
    background: #fef3c7;
    color: #92400e;
}
.cf-score-pill--low {
    background: #fee2e2;
    color: #991b1b;
}
.cf-answer-field__flags {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-top: .4rem;
}

/* —— Answers —— */
.cf-answers-page {
    margin-bottom: 2rem;
}

.cf-answer-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cf-answer-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
    overflow: hidden;
}

.cf-answer-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e8edf3;
}

.cf-answer-card__who {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}

.cf-answer-card__avatar {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.cf-answer-card__name {
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.cf-answer-card__when {
    margin-top: .2rem;
    font-size: .82rem;
    color: #64748b;
}

.cf-answer-card__dot {
    margin: 0 .25rem;
}

.cf-answer-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    justify-content: flex-end;
}

.cf-answer-card__chip {
    display: inline-flex;
    align-items: center;
    font-size: .72rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: .2rem .55rem;
}

.cf-answer-card__body {
    padding: 1rem 1.2rem 1.2rem;
}

.cf-answer-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: .75rem;
}

.cf-answer-field {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    padding: .8rem .9rem;
}

.cf-answer-field.is-empty {
    opacity: .72;
}

.cf-answer-field__label {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    margin-bottom: .35rem;
}

.cf-answer-field__value {
    color: #0f172a;
    font-size: .98rem;
    line-height: 1.45;
    word-break: break-word;
}

.cf-answer-field__blank {
    color: #94a3b8;
    font-style: italic;
}

.cf-answer-empty {
    margin: 0;
    color: #64748b;
}

/* —— Dashboard —— */
.cf-dashboard { margin-bottom: 2rem; }
.cf-dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.cf-dash-kicker {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
}
.cf-dash-title {
    margin: .15rem 0 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
}
.cf-dash-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.cf-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}
.cf-stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.cf-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.1;
}
.cf-stat-label {
    margin-top: .25rem;
    font-size: .82rem;
    color: #64748b;
}
.cf-dash-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.1rem 1.2rem 1.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.cf-dash-panel h3 {
    margin: 0 0 .85rem;
    font-size: 1rem;
    font-weight: 650;
}
.cf-dash-help {
    color: #64748b;
    font-size: .88rem;
    margin: -.35rem 0 1rem;
}
.cf-chart-wrap { position: relative; width: 100%; }
.cf-chart-wrap--timeline { height: 240px; }
.cf-chart-wrap--overview { height: 280px; }
.cf-chart-wrap--pie { height: 240px; }
.cf-chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}
.cf-chart-card {
    border: 1px solid #eef2f7;
    border-radius: 10px;
    padding: .9rem;
    background: #f8fafc;
}
.cf-chart-card__title { font-weight: 650; color: #0f172a; }
.cf-chart-card__meta {
    font-size: .8rem;
    color: #64748b;
    margin-bottom: .5rem;
}
.cf-rate-list { display: flex; flex-direction: column; gap: .75rem; }
.cf-rate-label {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    font-size: .9rem;
    margin-bottom: .3rem;
}
.cf-rate-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.cf-rate-bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    border-radius: 999px;
}
.cf-table-wrap { overflow-x: auto; }
.cf-table { margin: 0; }
.cf-table th {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #64748b;
    border-top: 0;
}

.cf-kind-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0 2rem;
}

.cf-kind-card {
    display: block;
    padding: 1.15rem 1.2rem 1.25rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s, border-color .15s;
}

.cf-kind-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 6px 18px rgba(37, 99, 235, .08);
    text-decoration: none;
    color: inherit;
}

.cf-kind-card__icon {
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    margin-bottom: .65rem;
}

.cf-kind-card__title {
    font-size: 1.05rem;
    margin: 0 0 .35rem;
}

.cf-kind-card__desc {
    margin: 0;
    color: #64748b;
    font-size: .9rem;
}

.cf-create-wizard__h {
    font-size: 1.1rem;
    margin: 1.5rem 0 .75rem;
}

.cf-template-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.cf-template-list li {
    padding: .55rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.cf-palette__tabs {
    display: flex;
    gap: 0;
    flex-shrink: 0;
    margin: 0;
    padding: .75rem .85rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.cf-palette__tab {
    appearance: none;
    border: 0;
    background: transparent;
    padding: .45rem .4rem .5rem;
    font-size: .78rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.cf-palette__tab.is-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.cf-library-item {
    display: flex;
    gap: .25rem;
    align-items: center;
    margin-bottom: .15rem;
}

.cf-library-item__add {
    flex: 1;
    min-width: 0;
}

.cf-library-item__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .1rem;
    min-width: 0;
}

.cf-library-item__meta {
    font-size: .72rem;
    color: #94a3b8;
    font-weight: 500;
}

.cf-library-item__delete {
    flex-shrink: 0;
}

.cf-poll-embed {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.cf-poll-embed__title {
    margin: 0;
    font-size: 1.15rem;
}

.cf-poll-embed__desc {
    margin: 0;
}

.cf-poll-embed__actions {
    margin-top: .5rem;
}

.cf-poll-embed__thanks {
    margin: 0 0 .5rem;
    font-weight: 600;
}

.cf-poll-results__label {
    font-weight: 600;
    margin-bottom: .5rem;
}

.cf-poll-results__list {
    list-style: none;
    padding: 0;
    margin: 0 0 .5rem;
}

.cf-poll-results__row {
    margin-bottom: .55rem;
}

.cf-poll-results__row-head {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    font-size: .88rem;
    margin-bottom: .2rem;
}

.cf-poll-results__bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
}

.cf-poll-results__bar span {
    display: block;
    height: 100%;
    background: #2563eb;
    border-radius: 99px;
}

.cf-poll-results__total {
    font-size: .8rem;
}

.thiscovery-forms-wall-card {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.thiscovery-forms-wall-card .cf-meta {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    align-items: center;
}

.cf-grid-wrap {
    position: relative;
}

.cf-grid-hint {
    display: none;
    align-items: center;
    gap: .4rem;
    margin: 0 0 .45rem;
    font-size: .8rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
}

.cf-grid-wrap.is-overflowing .cf-grid-hint:not([hidden]) {
    display: flex;
}

.cf-grid-hint__icon {
    flex-shrink: 0;
    width: 1.35rem;
    height: .7rem;
    position: relative;
}

.cf-grid-hint__icon::before,
.cf-grid-hint__icon::after {
    content: '';
    position: absolute;
    top: 50%;
    width: .42rem;
    height: .42rem;
    border-block-end: 2px solid currentColor;
    transform: translateY(-60%) rotate(45deg);
}

.cf-grid-hint__icon::before {
    inset-inline-start: 0;
    border-inline-start: 2px solid currentColor;
}

.cf-grid-hint__icon::after {
    inset-inline-end: 0;
    border-inline-end: 2px solid currentColor;
}

.cf-grid-fade {
    position: relative;
}

.cf-grid-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.cf-grid-wrap.has-more-end .cf-grid-fade::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2.75rem;
    pointer-events: none;
    z-index: 3;
    inset-inline-end: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff 72%);
}

.cf-fill-page[dir="rtl"] .cf-grid-wrap.has-more-end .cf-grid-fade::after {
    background: linear-gradient(to left, rgba(255, 255, 255, 0), #fff 72%);
}

.cf-grid-more {
    display: none;
    position: absolute;
    top: 50%;
    inset-inline-end: .45rem;
    transform: translateY(-50%);
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    pointer-events: none;
    z-index: 4;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .22);
    align-items: center;
    justify-content: center;
}

.cf-grid-wrap.has-more-end .cf-grid-more {
    display: flex;
}

.cf-grid-more::after {
    content: '';
    width: .42rem;
    height: .42rem;
    border-inline-end: 2px solid #fff;
    border-block-end: 2px solid #fff;
    transform: rotate(-45deg);
    margin-inline-start: -.15rem;
}

.cf-fill-page[dir="rtl"] .cf-grid-more::after {
    transform: rotate(135deg);
    margin-inline-start: 0;
    margin-inline-end: -.15rem;
}

.cf-grid {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.cf-grid th,
.cf-grid td {
    border: 1px solid #e5e7eb;
    padding: .45rem .55rem;
    text-align: center;
    vertical-align: middle;
    hyphens: none;
    -webkit-hyphens: none;
    -ms-hyphens: none;
    word-break: normal;
    overflow-wrap: break-word;
}

.cf-grid thead th {
    background: #f8fafc;
    font-weight: 600;
    font-size: .8rem;
    line-height: 1.25;
    vertical-align: bottom;
}

.cf-grid tbody th {
    text-align: left;
    font-weight: 600;
    background: #fff;
    min-width: 8rem;
}

.cf-grid-wrap[data-cf-grid] .cf-grid {
    table-layout: fixed;
    width: max-content;
    min-width: 100%;
    display: table;
}

/* Keep scroll-mode grids as real tables even if form custom CSS tries to
   reflow them into card stacks (old SPARCS-style hacks). */
.cf-grid-wrap[data-cf-mobile-layout="scroll"] table.cf-grid {
    display: table !important;
    width: max-content !important;
    min-width: 100%;
    border: 1px solid #e5e7eb;
}
.cf-grid-wrap[data-cf-mobile-layout="scroll"] table.cf-grid thead {
    display: table-header-group !important;
}
.cf-grid-wrap[data-cf-mobile-layout="scroll"] table.cf-grid tbody {
    display: table-row-group !important;
}
.cf-grid-wrap[data-cf-mobile-layout="scroll"] table.cf-grid tbody tr {
    display: table-row !important;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
}
.cf-grid-wrap[data-cf-mobile-layout="scroll"] table.cf-grid tbody tr > th,
.cf-grid-wrap[data-cf-mobile-layout="scroll"] table.cf-grid tbody td {
    display: table-cell !important;
}
.cf-grid-wrap[data-cf-mobile-layout="scroll"] .cf-grid-scroll {
    overflow-x: auto !important;
}
.cf-grid-wrap[data-cf-mobile-layout="scroll"] .cf-grid-fade {
    overflow: hidden;
}

.cf-grid-wrap[data-cf-grid] .cf-grid thead th:first-child,
.cf-grid-wrap[data-cf-grid] .cf-grid tbody th {
    position: sticky;
    inset-inline-start: 0;
    z-index: 2;
    width: 9rem;
    min-width: 8rem;
    max-width: 11rem;
    box-shadow: 1px 0 0 #e5e7eb;
}

.cf-grid-wrap[data-cf-grid] .cf-grid thead th:first-child {
    background: #f8fafc;
}

.cf-grid-wrap[data-cf-grid] .cf-grid tbody th {
    background: #fff;
}

.cf-grid-wrap.has-more-start[data-cf-grid] .cf-grid thead th:first-child,
.cf-grid-wrap.has-more-start[data-cf-grid] .cf-grid tbody th {
    box-shadow: 6px 0 10px rgba(15, 23, 42, .08);
}

.cf-grid-wrap[data-cf-grid] .cf-grid thead th:not(:first-child),
.cf-grid-wrap[data-cf-grid] .cf-grid tbody td {
    width: 8.75rem;
    min-width: 8.75rem;
    max-width: 8.75rem;
}

.cf-grid tbody td input[type="radio"],
.cf-grid tbody td input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    border: 2px solid #94a3b8;
    background: #fff;
    vertical-align: middle;
    cursor: pointer;
}

.cf-grid tbody td input[type="radio"] {
    border-radius: 50%;
}

.cf-grid tbody td input[type="checkbox"] {
    border-radius: .25rem;
}

.cf-grid tbody td input:checked {
    border-color: #2563eb;
    background-color: #2563eb;
}

.cf-grid tbody td input[type="radio"]:checked {
    background-image: radial-gradient(circle, #fff 0 32%, #2563eb 36% 100%);
}

.cf-grid tbody td input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='M3.5 8.5l2.8 2.8 6.2-6.6'/%3E%3C/svg%3E");
    background-size: 100% 100%;
}

.cf-grid-stack {
    display: none;
}

.cf-grid-stack__row {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: .75rem 1rem;
    margin: 0 0 .75rem;
    min-width: 0;
}

.cf-grid-stack__legend {
    float: none !important;
    width: auto !important;
    max-width: 100%;
    padding: 0;
    margin: 0 0 .5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    color: inherit;
}

.cf-grid-stack__options {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.cf-grid-stack__option {
    display: flex !important;
    align-items: flex-start;
    gap: .6rem;
    margin: 0;
    font-weight: 400;
    color: inherit;
    width: 100%;
}

.cf-grid-stack__option > span {
    display: inline !important;
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.35;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

.cf-grid-stack__input {
    margin-top: .2rem;
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
}

@media (max-width: 767.98px) {
    .cf-grid-wrap[data-cf-mobile-layout="stack"] .cf-grid-fade,
    .cf-grid-wrap[data-cf-mobile-layout="stack"] .cf-grid-hint,
    .cf-grid-wrap[data-cf-mobile-layout="stack"] .cf-grid-more {
        display: none !important;
    }

    .cf-grid-wrap[data-cf-mobile-layout="stack"] .cf-grid-stack {
        display: block !important;
    }
}

.cf-maxdiff-set {
    margin-bottom: 1rem;
}

.cf-maxdiff-set__title {
    font-weight: 600;
    margin-bottom: .4rem;
}

.cf-hotspot-stage {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

.cf-hotspot-stage img {
    display: block;
    max-width: 100%;
    height: auto;
}

.cf-hotspot-overlay {
    position: absolute;
    inset: 0;
}

.cf-hotspot-region {
    position: absolute;
    border: 2px solid #2563eb;
    background: rgba(37, 99, 235, .18);
    color: #1e3a8a;
    font-size: .75rem;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cf-hotspot-region.is-selected,
.cf-hotspot-region:focus {
    background: rgba(37, 99, 235, .4);
    outline: none;
}

.cf-image-upload {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.cf-image-upload__status {
    font-size: .85rem;
    color: #64748b;
}

@media (max-width: 767px) {
    .cf-list-header {
        flex-direction: column;
    }

    .cf-form-table {
        min-width: 980px;
    }

    .cf-answer-card__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cf-answer-card__badges {
        justify-content: flex-start;
    }

    .cf-answer-fields {
        grid-template-columns: 1fr;
    }

    .cf-dash-header {
        flex-direction: column;
    }

    .cf-chart-wrap--timeline,
    .cf-chart-wrap--overview,
    .cf-chart-wrap--pie {
        height: 220px;
    }

    .cf-fill-body {
        padding: 1rem;
        border-radius: 10px;
    }

    .cf-fill-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .cf-field-card__actions .btn {
        padding: .2rem .4rem;
    }

    .cf-field-card__name {
        max-width: 140px;
    }
}

.cf-lang-switch {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: .75rem 0 0;
}
.cf-lang-switch__item {
    font-size: .85rem;
    padding: .2rem .65rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    color: #374151;
    text-decoration: none;
}
.cf-lang-switch__item.is-active {
    background: #1a5f4a;
    border-color: #1a5f4a;
    color: #fff;
}

/* Fill page: Arabic / Urdu (and other RTL locales) */
.cf-fill-page[dir="rtl"] {
    text-align: start;
}

.cf-fill-page[dir="rtl"][lang="ur"] {
    font-family: "Noto Nastaliq Urdu", "Noto Naskh Arabic", "Geeza Pro", Tahoma, sans-serif;
}

.cf-fill-page[dir="rtl"][lang^="ar"] {
    font-family: "Noto Naskh Arabic", Tahoma, "Segoe UI", sans-serif;
}

.cf-fill-page[dir="rtl"] .cf-fill-hero__title,
.cf-fill-page[dir="rtl"] .cf-fill-hero__desc,
.cf-fill-page[dir="rtl"] .cf-question__label,
.cf-fill-page[dir="rtl"] .cf-question__help,
.cf-fill-page[dir="rtl"] .cf-vas__help,
.cf-fill-page[dir="rtl"] .cf-vas__end,
.cf-fill-page[dir="rtl"] .cf-rich-block,
.cf-fill-page[dir="rtl"] .cf-html-block,
.cf-fill-page[dir="rtl"] .cf-thankyou__content,
.cf-fill-page[dir="rtl"] .cf-resume-gate__title,
.cf-fill-page[dir="rtl"] .cf-resume-gate__lead {
    line-height: 1.75;
}

.cf-fill-page[dir="rtl"] input[type="number"],
.cf-fill-page[dir="rtl"] input[type="email"],
.cf-fill-page[dir="rtl"] input[type="url"],
.cf-fill-page[dir="rtl"] input[type="tel"],
.cf-fill-page[dir="rtl"] .cf-vas__input {
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
}
.cf-justify {
    margin-top: .75rem;
}
.cf-round-summary {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.cf-prev-answer,
.cf-frozen-note {
    font-size: .9rem;
    color: #475569;
    margin-bottom: .75rem;
}
.cf-question__control.is-frozen {
    pointer-events: none;
    opacity: .72;
}
.cf-programme-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .85rem 0;
    border-bottom: 1px solid #e5e7eb;
}
.cf-panel-table {
    font-size: .92rem;
}
.cf-i18n-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem 1.25rem;
}
.cf-i18n-field {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: 1rem;
}
.cf-inline-form .btn {
    margin-top: 0;
}
.cf-approval-stage {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem 1.1rem 1.15rem;
    margin-bottom: 1.25rem;
    background: #fff;
}
.cf-approval-stage__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
    margin-bottom: .5rem;
}
.cf-approval-stage__move {
    margin-left: auto;
    display: flex;
    gap: .25rem;
}
.cf-catalogue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.cf-catalogue-card {
    display: block;
    padding: 1.1rem 1.15rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: inherit;
    text-decoration: none;
}
.cf-catalogue-card:hover {
    border-color: #94a3b8;
    text-decoration: none;
}
.cf-catalogue-card__eyebrow {
    font-size: .78rem;
    color: #64748b;
    margin-bottom: .35rem;
}
.cf-catalogue-card__title {
    font-size: 1.05rem;
    margin: 0 0 .5rem;
}
.cf-catalogue-card__meta {
    font-size: .82rem;
    color: #64748b;
}
.cf-project-section {
    margin-bottom: 1.75rem;
}
.cf-project-section h2 {
    font-size: 1.15rem;
    margin-bottom: .75rem;
}
.cf-approval-actions {
    margin: 1.5rem 0;
}
.cf-approval-history ul {
    padding-left: 1.1rem;
}
.cf-approval-history li {
    margin-bottom: .65rem;
}
.cf-action-block {
    margin: .15rem 0;
}
.cf-action-btn__status {
    margin-top: .55rem;
    font-size: .88rem;
    color: #475569;
}
.cf-action-btn__status[hidden] {
    display: none;
}
@media (max-width: 767px) {
    .cf-i18n-grid {
        grid-template-columns: 1fr;
    }
}

/* —— In-product Help —— */
.cf-help-page {
    margin-bottom: 2rem;
}

.cf-help-section {
    margin: 0 0 2rem;
}

.cf-help-section__title {
    margin: 0 0 .35rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.cf-help-section__intro {
    margin: 0 0 1rem;
    color: #64748b;
}

.cf-help-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: .85rem;
}

.cf-help-card {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    min-height: 100%;
}

.cf-help-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 6px 18px rgba(37, 99, 235, .08);
    text-decoration: none;
}

.cf-help-card__icon {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cf-help-card__title {
    display: block;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: .25rem;
}

.cf-help-card__summary {
    display: block;
    font-size: .88rem;
    color: #64748b;
    line-height: 1.4;
}

.cf-help-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.cf-help-nav {
    position: sticky;
    top: 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: .75rem .6rem 1rem;
}

.cf-help-nav__group {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #94a3b8;
    padding: .65rem .65rem .25rem;
}

.cf-help-nav__link {
    display: block;
    padding: .45rem .65rem;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-size: .9rem;
}

.cf-help-nav__link:hover {
    background: #f1f5f9;
    text-decoration: none;
}

.cf-help-nav__link.is-active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.cf-help-download-banner {
    margin: 0 0 1.25rem;
    padding: 1rem 1.25rem;
    border: 1px solid #93c5fd;
    border-radius: 12px;
    background: #eff6ff;
}

.cf-help-download-banner .btn {
    margin-top: .35rem;
}

.cf-help-body {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem 1.75rem 2rem;
    color: #0f172a;
    line-height: 1.55;
    overflow-x: auto;
}

.cf-help-body a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: .12em;
}

.cf-help-body a:hover {
    color: #1d4ed8;
}

.cf-help-body h2 {
    margin: 1.6rem 0 .6rem;
    font-size: 1.2rem;
}

.cf-help-body h3 {
    margin: 1.25rem 0 .45rem;
    font-size: 1.05rem;
}

.cf-help-body p,
.cf-help-body ul,
.cf-help-body ol {
    margin: 0 0 .85rem;
}

.cf-help-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1rem;
    font-size: .92rem;
}

.cf-help-body th,
.cf-help-body td {
    border: 1px solid #e5e7eb;
    padding: .45rem .65rem;
    text-align: left;
    vertical-align: top;
}

.cf-help-body th {
    background: #f8fafc;
}

.cf-help-body code {
    background: #f1f5f9;
    padding: .1rem .3rem;
    border-radius: 4px;
    font-size: .88em;
}

.cf-help-body pre {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: .85rem 1rem;
    overflow-x: auto;
    font-size: .86rem;
    line-height: 1.45;
}

.cf-help-body pre code {
    background: none;
    padding: 0;
}

@media (max-width: 991px) {
    .cf-help-layout {
        grid-template-columns: 1fr;
    }

    .cf-help-nav {
        position: static;
    }
}

.cf-panel-field-list {
    margin: 0 0 .5rem;
    padding-inline-start: 1.2rem;
    color: #334155;
}
.cf-panel-field-list code {
    font-size: .85em;
}
.cf-panel-field-row .cf-label {
    font-size: .75rem;
}

/* —— Response integrity —— */
.cf-honeypot {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.cf-fill-form {
    position: relative;
}
.cf-stat-card--link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.cf-stat-card--link:hover {
    border-color: #94a3b8;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
    text-decoration: none;
    color: inherit;
}
.cf-integrity-review {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
}
.cf-integrity-review h3,
.cf-integrity-review h4 {
    margin: 1rem 0 .5rem;
    font-size: 1rem;
    font-weight: 650;
}
.cf-integrity-score {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .75rem;
    margin-bottom: .75rem;
}
.cf-integrity-dl {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: .25rem .75rem;
    margin: 0 0 1rem;
}
.cf-integrity-dl dt {
    color: #64748b;
    font-weight: 600;
}
.cf-integrity-dl dd {
    margin: 0;
}
.cf-integrity-components,
.cf-integrity-flag-group ul,
.cf-integrity-audit {
    margin: 0 0 1rem;
    padding-inline-start: 1.2rem;
}
.cf-integrity-audit li {
    padding: 0.35rem 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
}
.cf-integrity-clusters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.cf-integrity-cluster {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}
.cf-integrity-cluster a {
    margin-right: 0.5rem;
}
.cf-integrity-notes {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: .75rem 1rem;
    white-space: pre-wrap;
    font-size: .88rem;
}
.cf-consistency-rule {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: .75rem;
    background: #f8fafc;
}
.cf-turnstile-wrap {
    margin-bottom: .75rem;
}
