
:root {
    --survey-ink: #172033;
    --survey-muted: #64748b;
    --survey-border: #e2e8f0;
    --survey-soft: #f8fafc;
    --survey-blue: #2878d0;
    --survey-green: #168052;
}

/* Page */
.survey-page {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 40px 24px 72px;
    box-sizing: border-box;
    color: var(--survey-ink);
}

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

.survey-page-header {
    margin-bottom: 42px;
}

.survey-eyebrow {
    margin: 0 0 10px;
    color: var(--survey-blue);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .13em;
}

.survey-page h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -.035em;
}

.survey-intro {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--survey-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.survey-section {
    width: 100%;
    min-width: 0;
    margin-top: 34px;
}

.survey-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

    .survey-section-heading h2 {
        margin: 0;
        font-size: 1.45rem;
        font-weight: 600;
        line-height: 1.3;
    }

.survey-section-subtitle {
    margin: 6px 0 0;
    color: var(--survey-muted);
    font-size: .9rem;
}

/* Survey cards */
.survey-telerik-card,
.survey-card-active,
.survey-card-previous {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border: 1px solid var(--survey-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 8px rgb(15 23 42 / 3%);
}

.survey-card-active {
    border-color: #c4dcf5;
    box-shadow: 0 8px 28px rgb(15 23 42 / 5%);
}

.survey-card-previous {
    border-radius: 14px;
}

.survey-telerik-card > .k-card-body {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 24px;
}

/* Description on left, graph on right */
.survey-card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    align-items: center;
    gap: 28px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.survey-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

/* Status and dates */
.survey-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    margin: 0 0 18px;
    color: var(--survey-muted);
    font-size: .8rem;
    line-height: 1.5;
}

    .survey-card-meta .k-badge {
        position: static !important;
        inset: auto !important;
        display: inline-flex;
        align-items: center;
        flex: 0 0 auto;
        width: auto;
        max-width: 100%;
        min-height: 26px;
        padding: 5px 11px;
        border-radius: 999px;
        white-space: nowrap;
        line-height: 1.2;
    }

.survey-status-content {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.survey-status-dot {
    display: inline-block;
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d1fae5;
}

/* Title and description */
.survey-copy h3 {
    width: 100%;
    max-width: 100%;
    margin: 0 0 10px;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
}

.survey-copy > p {
    width: 100%;
    max-width: 100%;
    margin: 0 0 20px;
    color: var(--survey-muted);
    font-size: .95rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.survey-dates {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 20px;
    width: 100%;
    margin-top: auto;
    color: var(--survey-muted);
    font-size: .8rem;
    line-height: 1.6;
}

    .survey-dates strong {
        margin-right: 4px;
        color: #334155;
        font-weight: 700;
    }

.survey-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

    .survey-card-actions .k-button {
        max-width: 100%;
        border-radius: 9px;
        font-weight: 650;
    }

/* Results panel */
.survey-results {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    border: 1px solid #edf1f6;
    border-radius: 13px;
    background: var(--survey-soft);
}

    .survey-results > .k-card-body {
        display: flex;
        flex-direction: column;
        gap: 16px;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        padding: 18px;
    }

.survey-results-historical {
    background: #fbfcfe;
}

.survey-results-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

    .survey-results-header span {
        color: var(--survey-muted);
        font-size: .67rem;
        font-weight: 800;
        letter-spacing: .09em;
    }

    .survey-results-header strong {
        color: #475569;
        font-size: .76rem;
        white-space: nowrap;
    }

.survey-result-row {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.survey-result-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    margin-bottom: 7px;
    font-size: .78rem;
    line-height: 1.45;
}

    .survey-result-label span {
        display: block;
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        color: #475569;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .survey-result-label strong {
        flex: 0 0 auto;
        color: #1e293b;
        font-size: .78rem;
        font-weight: 700;
    }

.survey-bar-track {
    width: 100%;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.survey-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--survey-blue);
    transition: width .25s ease;
}

/* Telerik ProgressBar */
.survey-telerik-progress {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 7px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #e2e8f0;
}

    .survey-telerik-progress .k-progressbar-value {
        height: 100%;
        border: 0;
        border-radius: 999px;
        background: var(--survey-blue);
    }

.survey-results-historical .survey-bar-fill,
.survey-results-historical .k-progressbar-value {
    background: #8190a5;
}

.survey-no-votes {
    margin: 0;
    color: var(--survey-muted);
    font-size: .85rem;
    line-height: 1.5;
}

/* Empty state and loading */
.survey-no-active {
    width: 100%;
    border: 1px solid var(--survey-border);
    border-radius: 16px;
    background: var(--survey-soft);
}

    .survey-no-active > .k-card-body {
        padding: 24px;
    }

.survey-no-active-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.survey-no-active-icon {
    display: grid;
    flex: 0 0 40px;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #e8f7ef;
    color: var(--survey-green);
    font-size: 1.1rem;
    font-weight: 800;
}

.survey-no-active-content h1,
.survey-no-active-content h2 {
    margin: 0 0 8px;
}

.survey-no-active-content p {
    margin: 0 0 16px;
    color: var(--survey-muted);
    line-height: 1.65;
}

.survey-no-active-large {
    margin-top: 12px;
}

.survey-empty {
    width: 100%;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    color: var(--survey-muted);
    text-align: center;
}

    .survey-empty > .k-card-body {
        padding: 28px;
    }

.survey-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 130px;
    color: var(--survey-muted);
}

/* Voting page */
.survey-vote-page {
    max-width: 900px;
}

.survey-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 22px;
    color: var(--survey-muted);
    font-size: .9rem;
    text-decoration: none;
}

    .survey-back-link:hover {
        color: var(--survey-blue);
    }

.survey-vote-page > .k-button {
    margin-bottom: 20px;
}

.survey-vote-card {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--survey-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 36px rgb(15 23 42 / 5%);
}

    .survey-vote-card > .k-card-header {
        padding: 0;
        border-bottom: 1px solid var(--survey-border);
        background: transparent;
    }

.survey-vote-heading {
    padding: 32px 32px 26px;
}

    .survey-vote-heading .k-badge {
        margin-bottom: 20px;
    }

    .survey-vote-heading h1 {
        margin: 0;
        font-size: clamp(1.7rem, 4vw, 2.3rem);
        line-height: 1.2;
        letter-spacing: -.03em;
    }

.survey-vote-description {
    margin: 12px 0 20px;
    color: var(--survey-muted);
    line-height: 1.7;
}

.survey-vote-dates {
    margin-top: 0;
}

.survey-vote-card > .k-card-body {
    padding: 28px 32px;
}

.survey-choice-fieldset {
    display: grid;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

    .survey-choice-fieldset legend {
        margin-bottom: 14px;
        font-size: 1rem;
        font-weight: 750;
    }

    .survey-choice-fieldset .k-radio-list {
        display: grid;
        gap: 10px;
    }

    .survey-choice-fieldset .k-radio-list-item {
        padding: 14px 16px;
        border: 1px solid var(--survey-border);
        border-radius: 12px;
    }

        .survey-choice-fieldset .k-radio-list-item:hover {
            border-color: #9ac6f2;
            background: #f8fbff;
        }

.survey-submit-area {
    margin-top: 24px;
}

    .survey-submit-area .k-button {
        min-width: 190px;
        border-radius: 9px;
        font-weight: 700;
    }

.survey-privacy-note {
    margin: 12px 0 0;
    color: var(--survey-muted);
    font-size: .78rem;
    line-height: 1.55;
}

.survey-login-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 26px 0 0;
}

    .survey-login-panel h2 {
        margin: 0 0 6px;
        font-size: 1.05rem;
    }

    .survey-login-panel p {
        margin: 0;
        color: var(--survey-muted);
        font-size: .9rem;
        line-height: 1.55;
    }

    .survey-login-panel .k-button {
        flex: 0 0 auto;
        border-radius: 9px;
    }

.survey-notice {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0 0 22px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: .9rem;
    line-height: 1.5;
}

.survey-notice-success {
    color: #126343;
    background: #e8f7ef;
}

.survey-notice-error {
    color: #9f1239;
    background: #fff1f2;
}

.survey-notice + .survey-results {
    margin-top: 20px;
}

/* Responsive layout */
@media (max-width: 900px) {
    .survey-card-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .survey-results {
        align-self: auto;
    }
}

@media (max-width: 600px) {
    .survey-page {
        padding: 26px 16px 48px;
    }

    .survey-page-header {
        margin-bottom: 30px;
    }

    .survey-intro {
        font-size: .95rem;
    }

    .survey-section {
        margin-top: 28px;
    }

    .survey-telerik-card > .k-card-body {
        padding: 18px;
    }

    .survey-card-meta {
        gap: 8px;
        margin-bottom: 14px;
    }

    .survey-dates {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .survey-results > .k-card-body {
        padding: 15px;
    }

    .survey-vote-heading {
        padding: 24px 20px 22px;
    }

    .survey-vote-card > .k-card-body {
        padding: 22px 20px;
    }

    .survey-login-panel {
        align-items: flex-start;
        flex-direction: column;
        padding-top: 22px;
    }

    .survey-notice {
        margin-bottom: 18px;
    }
}


.survey-status {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    margin-bottom: 1rem;
}