:root {
    --cor-fundo: #f3f7fb;
    --cor-card: #ffffff;
    --cor-texto: #1f2937;
    --cor-texto-suave: #6b7280;
    --cor-primaria: #0a749f;
    --cor-primaria-suave: #e8f4fa;
    --cor-borda: #d8e2ea;
    --cor-alerta: #b45309;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Roboto", sans-serif;
    color: var(--cor-texto);
    background: radial-gradient(circle at top, #fbfdff 0%, var(--cor-fundo) 50%);
    touch-action: pan-y;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: auto;
    scrollbar-color: #5f9fb8 transparent;
    -ms-overflow-style: auto;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.publico-wrapper::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.publico-wrapper::-webkit-scrollbar-track {
    background: #edf3f7;
    border-radius: 999px;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.publico-wrapper::-webkit-scrollbar-thumb {
    background: #5f9fb8;
    border-radius: 999px;
    border: 2px solid #edf3f7;
    background-clip: padding-box;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.publico-wrapper::-webkit-scrollbar-thumb:hover {
    background: #4f95b2;
    border: 2px solid #edf3f7;
    background-clip: padding-box;
}

html::-webkit-scrollbar-thumb:active,
body::-webkit-scrollbar-thumb:active,
.publico-wrapper::-webkit-scrollbar-thumb:active {
    background: #3f829d;
    border: 2px solid #edf3f7;
    background-clip: padding-box;
}

.publico-header {
    background: #ffffff;
    border-bottom: 1px solid var(--cor-borda);
    box-shadow: 0 10px 24px -24px #0f172acc;
}

.publico-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    justify-content: center;
}

.publico-header-empresa {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    justify-content: center;
}

.publico-header-empresa h1 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 700;
}

.publico-header-empresa img {
    max-height: 54px;
    width: auto;
    object-fit: contain;
}

.publico-wrapper {
    padding: 24px;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.enquete-card {
    max-width: 860px;
    margin: 0 auto;
    background: var(--cor-card);
    border: 1px solid var(--cor-borda);
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 16px 40px -28px #0f172a66;
    overflow-x: hidden;
}

.enquete-header h1 {
    margin: 0;
    font-size: 1.7rem;
}

.enquete-header p {
    margin: 10px 0 0;
    color: var(--cor-texto-suave);
    line-height: 1.45;
    white-space: pre-line;
}

.wizard-meta {
    margin-top: 14px;
}

.wizard-progress-text {
    margin: 0 0 6px;
    font-size: 0.95rem;
    color: var(--cor-texto-suave);
}

.wizard-progress-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #ebf0f4;
    overflow: hidden;
}

.wizard-progress-bar span {
    display: block;
    height: 100%;
    width: calc(100% * var(--step-progress));
    background: linear-gradient(90deg, #0a749f, #1b8fbd);
    transition: width 220ms ease;
}

.wizard-last-hint {
    margin: 4px 0 0;
    color: var(--cor-alerta);
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 160ms ease;
}

.wizard-last-hint.active {
    opacity: 1;
}

.wizard-step {
    margin-top: 14px;
    display: none;
}

.wizard-step.active {
    display: block;
    animation: fade-in 180ms ease;
}

.wizard-step h2 {
    margin: 0;
    font-size: 1.2rem;
}

.enquete-intro-image-container {
    margin-bottom: 12px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--cor-borda);
    background: #fff;
    position: relative;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enquete-intro-image-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(15px);
    transform: scale(1.08);
    opacity: .8;
}

.enquete-intro-image {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    display: block;
    background: transparent;
    /* -webkit-mask-image: linear-gradient( */
    /*     90deg, */
    /*     transparent 0%, */
    /*     #000 10%, */
    /*     #000 90%, */
    /*     transparent 100% */
    /* ); */
    /* mask-image: linear-gradient( */
    /*     90deg, */
    /*     transparent 0%, */
    /*     #000 50%, */
    /*     #000 90%, */
    /*     transparent 100% */
    /* ); */
}

.wizard-question-text {
    margin: 6px 0 14px;
    color: var(--cor-texto-suave);
    line-height: 1.45;
}

.descricao-html {
    white-space: pre-wrap;
}

.wizard-textarea {
    width: 100%;
    resize: vertical;
    min-height: 120px;
    border-radius: 10px;
    border: 1px solid var(--cor-borda);
    padding: 12px;
    font-size: 0.98rem;
    font-family: inherit;
}

.wizard-textarea:focus {
    outline: 2px solid #8fd3ea;
    border-color: var(--cor-primaria);
}

.wizard-options-container {
    overflow: visible;
}

.wizard-options-two-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px 12px;
    align-items: start;
}

.wizard-options-two-cols .wizard-option-input {
    grid-column: 1;
}

.wizard-options-two-cols .wizard-option-label {
    grid-column: 1;
}

.wizard-options-two-cols.wizard-options-split-five .wizard-option-input:nth-child(n + 11),
.wizard-options-two-cols.wizard-options-split-five .wizard-option-label:nth-child(n + 12) {
    grid-column: 2;
}

.wizard-options-two-cols.wizard-options-split-even {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    grid-template-rows: repeat(var(--split-left-count), auto);
}

.wizard-options-two-cols.wizard-options-split-even .wizard-option-label {
    margin-bottom: 0;
}

.wizard-option-input {
    appearance: none;
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.wizard-option-label {
    display: block;
    cursor: pointer;
    user-select: none;
    position: relative;
    margin-bottom: 8px;
    padding: 9px 12px;
    min-height: 44px;
    border: 1px solid var(--cor-borda);
    border-radius: 9px;
    background: #fff;
    transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
    overflow: hidden;
}

.wizard-option-label::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 6px;
    height: 2px;
    background: var(--cor-primaria);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
}

.wizard-option-label:hover {
    background: #f8fbfd;
    border-color: #bcd5e3;
}

.wizard-option-input:checked + .wizard-option-label {
    background: var(--cor-primaria-suave);
    border-color: #84c1dc;
    transform: translateX(0);
}

.wizard-option-input:checked + .wizard-option-label::after {
    transform: scaleX(1);
}

.wizard-option-label.shake {
    animation: subtle-shake 120ms cubic-bezier(0.5, -0.5, 0.5, 1.5) 2 alternate;
}

.wizard-validation {
    min-height: 18px;
    margin: 8px 0 0;
    color: #b42318;
    font-size: 0.88rem;
}

.wizard-actions {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-nav,
.btn-submit {
    border: 0;
    border-radius: 9px;
    padding: 10px 14px;
    font-size: 0.94rem;
    cursor: pointer;
}

a.btn-nav {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-nav {
    color: #123043;
    background: #ebf4f9;
}

.btn-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-submit {
    display: none;
    color: #fff;
    background: linear-gradient(90deg, #0a749f, #1a8eba);
}

.btn-submit.visible {
    display: inline-block;
}

.enquete-success {
    margin-top: 18px;
    border: 1px solid #99dfbf;
    background: #ecfdf3;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.enquete-success i {
    font-size: 1.5rem;
    color: #0e9f6e;
}

.enquete-success h2 {
    margin: 8px 0 4px;
}

.enquete-success p {
    margin: 0;
    color: #0f5132;
}

.success-back {
    margin-top: 12px;
}

.scroll-controls {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scroll-btn {
    border: 0;
    border-radius: 999px;
    width: 46px;
    height: 46px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(90deg, #0a749f, #1a8eba);
    box-shadow: 0 10px 20px -12px #0f172acc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.scroll-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@keyframes subtle-shake {
    from { transform: translateX(0); }
    to { transform: translateX(5px); }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
    .publico-header-inner {
        padding: 12px 14px;
    }

    .publico-header-empresa {
        gap: 10px;
    }

    .publico-header-empresa h1 {
        font-size: 0.86rem;
    }

    .publico-header-empresa img {
        max-height: 40px;
    }

    .publico-wrapper {
        padding: 14px;
    }

    .enquete-card {
        padding: 18px;
    }

    .wizard-options-two-cols {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px 0;
    }

    .wizard-options-two-cols .wizard-options-column {
        display: contents;
    }

    .wizard-actions {
        justify-content: stretch;
        flex-wrap: wrap;
    }

    .btn-nav,
    .btn-submit {
        flex: 1;
    }

    .scroll-controls {
        display: none;
    }

    .scroll-btn {
        width: 42px;
        height: 42px;
        font-size: 0.9rem;
    }
}
