/* Matches the SmartSurvey theme used by the screening questionnaire */
:root {
    --blue: #0060a6;
    --blue-dark: #004373;
    --blue-light: #3088c7;
    --blue-tint: rgba(0, 96, 166, 0.05);
    --text: #000000;
    --text-soft: rgba(0, 0, 0, 0.9);
    --muted: rgba(0, 0, 0, 0.6);
    --line: rgba(0, 0, 0, 0.1);
    --hover: rgba(0, 0, 0, 0.05);
    --white: #ffffff;
    --error: #a81f31;
    --error-text: #65131d;
    --progress: #0a802f;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
}

body {
    font-family: "Lato", sans-serif;
    font-size: 18px;
    line-height: 1.51;
    color: var(--text);
    background: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
}

a:focus,
a:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.inner {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 575px) {
    .inner {
        padding: 0 16px;
    }
}

.skip-link {
    position: absolute;
    left: -10000px;
    top: 0;
    background: var(--white);
    padding: 8px 16px;
    z-index: 10;
}

.skip-link:focus {
    left: 16px;
}

/* Header bands */
.band {
    color: var(--white);
}

.band-logo {
    background: var(--blue);
    padding: 16px 0;
}

.band-logo .inner {
    display: flex;
    justify-content: flex-end;
}

.band-title {
    background: var(--blue-light);
    padding: 16px 0;
}

.logo {
    display: block;
    width: 150px;
    height: auto;
}

.survey-title {
    margin: 0;
    font-size: 27.2px;
    font-weight: 500;
    line-height: 1.44;
}

@media (min-width: 576px) {
    .survey-title {
        font-size: 32px;
    }
}

/* Content */
.content {
    flex: 1;
    padding-top: 32px;
    padding-bottom: 32px;
    color: var(--text-soft);
}

.content p {
    margin: 0 0 16px;
}

.page-description :last-child {
    margin-bottom: 0;
}

.page-rule {
    border: 0;
    height: 2px;
    background: var(--line);
    margin: 24px 0;
}

/* Questions */
.question-container {
    position: relative;
    padding: 24px 0;
}

.question-container fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.question-container.has-error::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -24px;
    width: 8px;
    background: var(--error);
}

@media (max-width: 575px) {
    .question-container.has-error::before {
        left: -12px;
        width: 6px;
    }
}

.question-separator {
    height: 2px;
    background: var(--line);
}

.q-legend {
    padding: 0;
    width: 100%;
    margin-bottom: 16px;
}

.q-title {
    display: flex;
    gap: 6px;
    color: var(--text);
}

.q-required-asterisk {
    display: none; /* the theme hides it; the "Required" badge says it instead */
}

.q-num {
    font-weight: 400;
}

.q-text-wrapper {
    flex: 1;
    min-width: 0;
}

.q-text p {
    margin: 0 0 8px;
}

.q-text :last-child {
    margin-bottom: 0;
}

.q-required-badge {
    font-size: 14.4px;
    color: var(--muted);
    margin-top: 4px;
}

.question-error {
    color: var(--error-text);
    font-size: 16.2px;
    margin: 0 0 12px;
}

.error-summary {
    background: var(--error);
    color: var(--white);
    border-radius: 10px;
    font-size: 16.2px;
    padding: 8px 12px;
    margin: 0 0 16px;
}

.error-summary a {
    color: var(--white);
}

/* Radio / checkbox options */
.q-options-option {
    border-radius: 10px;
    margin-bottom: 4px;
}

.q-options-option:hover {
    background: var(--hover);
}

.q-options-option:has(input:checked) {
    background: var(--blue-tint);
}

.q-options-option:focus-within {
    box-shadow: inset 0 0 0 2px var(--blue);
}

.q-options-control {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.q-options-label {
    display: flex;
    align-items: flex-start;
    column-gap: 8.1px;
    padding: 9px 13.5px;
    cursor: pointer;
    color: var(--text);
}

.tickbox {
    flex: none;
    width: 22.5px;
    height: 22.5px;
    margin-top: 2px;
    border: 2px solid rgba(0, 0, 0, 0.4);
    background: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tickbox.radio {
    border-radius: 50%;
}

.tickbox.checkbox {
    border-radius: 4px;
}

.tickbox svg {
    width: 18px;
    height: 18px;
    stroke: var(--white);
    stroke-width: 2.5;
    visibility: hidden;
}

.q-options-option:hover .tickbox {
    border-color: var(--blue);
}

.q-options-control:checked + .q-options-label .tickbox {
    background: var(--blue);
    border-color: var(--blue);
}

.q-options-control:checked + .q-options-label .tickbox svg {
    visibility: visible;
}

.q-other-block {
    padding: 0 13.5px 12px 44px;
}

.max-note {
    font-size: 16.2px;
    color: var(--error-text);
    margin: 0 0 8px;
}

/* Text inputs and select */
.q-input,
.q-select {
    font: inherit;
    font-size: 18px;
    color: var(--text);
    width: 100%;
    padding: 10px 12px;
    border: 2px solid rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    background: var(--white);
}

.q-input:hover,
.q-select:hover {
    border-color: var(--blue);
}

.q-input:focus,
.q-select:focus {
    outline: 2px solid var(--blue);
    outline-offset: 0;
    border-color: var(--blue);
}

.has-error fieldset > .q-input,
.has-error .q-select {
    border-color: var(--error);
}

.q-select {
    max-width: 480px;
}

.q-input.size-short {
    max-width: 14ch;
}

.q-comments {
    margin-top: 16px;
}

.q-comments label {
    display: block;
    margin-bottom: 8px;
}

/* Matrix: table on wide screens, stacked cards on narrow ones */
.matrix-head {
    display: none;
}

.matrix-row {
    padding: 12px 0;
    border-top: 2px solid var(--line);
}

.matrix-label {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

@media (min-width: 768px) {
    .matrix-head,
    .matrix-row {
        display: grid;
        grid-template-columns: minmax(200px, 30%) repeat(var(--cols), 1fr);
        align-items: center;
        column-gap: 4px;
    }

    .matrix-head {
        font-size: 15.3px;
        text-align: center;
        padding-bottom: 8px;
    }

    .matrix-row {
        border-top: 0;
        padding: 4px 0;
    }

    .matrix-row:nth-of-type(even) {
        background: var(--blue-tint);
        border-radius: 10px;
    }

    .matrix-label {
        font-weight: 400;
        margin: 0;
        padding: 8px 12px;
    }

    .matrix .q-options-option {
        margin: 0;
        background: none;
        display: flex;
        justify-content: center;
    }

    .matrix .q-options-label {
        justify-content: center;
    }

    .matrix .q-options-label .option-title {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }
}

/* Endings */
.message-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 16px;
}

/* Bot gate */
.cf-turnstile {
    margin: 24px 0 0;
}

/* Honeypot – off-screen rather than display:none so naive bots still fill it */
.hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Buttons */
.nav-buttons {
    display: flex;
    justify-content: center;
    margin: 32px 0;
}

.button {
    display: inline-block;
    font: inherit;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 16px 24px;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}

.button.primary {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--white);
}

.button.primary:hover:not(:disabled) {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
}

.button:focus,
.button:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

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

@media (max-width: 575px) {
    .button {
        width: 100%;
        text-align: center;
    }
}

/* Progress */
.progress {
    font-size: 14.4px;
    margin-top: 16px;
}

.progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.13);
    overflow: hidden;
}

.progress-bar span {
    display: block;
    height: 100%;
    background: var(--progress);
    border-radius: 10px 0 0 10px;
}
