:root {
    --survey-primary: #b5462f;
    --survey-primary-dark: #8f3320;
    --survey-primary-soft: #f6e2d8;
    --survey-accent: #e8a33d;
    --survey-bg: #faf5f1;
    --survey-ink: #3a2723;
}

body.survey-bg {
    background: linear-gradient(160deg, var(--survey-bg) 0%, #f2e6dd 100%);
    min-height: 100vh;
    color: var(--survey-ink);
}

.survey-card {
    border-radius: 1rem;
    overflow: hidden;
}

.survey-card-header {
    background: #fff;
    border-bottom: 1px solid #efe2da;
    padding: 1rem 1.25rem;
}

.survey-title {
    color: var(--survey-primary-dark);
    font-weight: 700;
}

.brand-emoji {
    font-size: 2.5rem;
    line-height: 1;
}

.uid-badge {
    background: var(--survey-primary);
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.btn-survey {
    background: var(--survey-primary);
    border-color: var(--survey-primary);
    color: #fff;
}

.btn-survey:hover,
.btn-survey:focus {
    background: var(--survey-primary-dark);
    border-color: var(--survey-primary-dark);
    color: #fff;
}

.btn-primary {
    background: var(--survey-primary);
    border-color: var(--survey-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--survey-primary-dark);
    border-color: var(--survey-primary-dark);
}

.section-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--survey-primary-dark);
    background: #f6e7de;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

.question-heading h5 {
    line-height: 1.4;
    color: var(--survey-ink);
}

.option-box {
    padding: 0.85rem 1rem;
    border: 1px solid #ecdfd7;
    border-radius: 0.65rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.option-box:hover {
    border-color: var(--survey-primary);
    background: #fdf7f4;
}

.option-box:has(input:checked) {
    border-color: var(--survey-primary);
    background: #fbeee8;
    box-shadow: 0 0 0 1px var(--survey-primary) inset;
}

.question-step-badge {
    background: #f6e7de;
    color: var(--survey-primary-dark);
    font-weight: 600;
}

.enumerator-note {
    background: #fdf3e6 !important;
    color: #8a5a1c;
    font-size: 0.9rem;
    line-height: 1.45;
}

.enumerator-icon {
    margin-right: 0.35rem;
}

.other-text-input {
    max-width: 28rem;
    border-color: #e3d0c6;
}

.progress {
    background-color: #eaded6;
    height: 10px;
    border-radius: 999px;
}

.progress-bar {
    background-color: var(--survey-primary);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.table thead th {
    font-size: 0.9rem;
}

/* Grouped single-select (chips) */
.group-field {
    padding: 0.85rem 1rem;
    border: 1px solid #ecdfd7;
    border-radius: 0.75rem;
    background: #fff;
}

.group-field-label {
    font-weight: 600;
    color: var(--survey-ink);
}

.choice-amount-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.choice-amount-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.65rem;
    margin: 0;
    cursor: pointer;
}

.choice-amount-row .js-choice-amount {
    max-width: 8.5rem;
}

.choice-amount-affix {
    font-weight: 600;
    color: var(--survey-primary-dark);
}

.group-heading-field {
    margin-top: 0.75rem;
}

.chip-option {
    position: relative;
    cursor: pointer;
    margin: 0;
}

.chip-option .chip-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip-option span {
    display: inline-block;
    padding: 0.45rem 0.85rem;
    border: 1px solid #e3d0c6;
    border-radius: 999px;
    background: #faf5f1;
    font-size: 0.9rem;
    transition: all 0.15s ease;
    user-select: none;
    white-space: normal;
}

.chip-option:hover span {
    border-color: var(--survey-primary);
    color: var(--survey-primary-dark);
}

.chip-option .chip-input:checked + span {
    background: var(--survey-primary);
    border-color: var(--survey-primary);
    color: #fff;
}

.chip-option .chip-input:focus-visible + span {
    outline: 2px solid var(--survey-accent);
    outline-offset: 2px;
}

/* Matrix rating tables */
.matrix-table td,
.matrix-table th {
    vertical-align: middle;
}

.matrix-table .js-matrix-input {
    width: 1.15rem;
    height: 1.15rem;
    cursor: pointer;
}

.matrix-table tbody tr:hover {
    background: #fdf7f4;
}

.scale-legend {
    display: flex;
    align-items: center;
}

/* Price tables */
.price-table td {
    vertical-align: middle;
}

.price-table th:last-child,
.price-table td:last-child {
    min-width: 16rem;
}

.price-cell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1rem;
}

.price-cell .input-group {
    flex: 1 1 11rem;
    min-width: 10rem;
    max-width: 16rem;
}

.price-cell .form-check {
    white-space: nowrap;
}

.price-instruction {
    background: #f8f3ef;
    border-left: 3px solid var(--survey-primary, #8b5a3c);
    padding: 0.65rem 0.85rem;
    border-radius: 0 8px 8px 0;
}

.number-input-group {
    max-width: 30rem;
}

.input-group-text {
    background: #f6e7de;
    border-color: #e3d0c6;
    color: var(--survey-primary-dark);
    font-weight: 600;
}

/* Landing & consent pages */
.survey-card {
    border-radius: 20px;
    background: #ffffff;
}

.brand-mark {
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--survey-primary);
    background: var(--survey-primary-soft);
    padding: .35rem .75rem;
    border-radius: 999px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .75rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem;
    border: 1px solid #efe0d6;
    border-radius: 12px;
    background: #fdf7f4;
}

.info-icon {
    font-size: 1.4rem;
}

.terms-box {
    background: #fdf7f4;
    border: 1px solid #efe0d6;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    line-height: 1.7;
}
