.aier-survey-shell {
    --aier-survey-ink: #17212b;
    --aier-survey-muted: #667085;
    --aier-survey-border: #e4e7ec;
    --aier-survey-soft: #f8fafc;
    --aier-survey-accent: #176b87;
    --aier-survey-accent-dark: #0f556c;
    --aier-survey-danger: #b42318;
    --aier-survey-danger-bg: #fef3f2;
    --aier-survey-success: #067647;
    --aier-survey-success-bg: #ecfdf3;
    --aier-survey-star: #f4b400;
    width: 100%;
    max-width: 920px;
    margin: 36px auto;
    padding: 0 16px;
    color: var(--aier-survey-ink);
    box-sizing: border-box;
}

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

.aier-survey-card {
    background: #fff;
    border: 1px solid var(--aier-survey-border);
    border-radius: 20px;
    box-shadow: 0 18px 48px rgba(16, 24, 40, .08);
    overflow: hidden;
}

.aier-survey-heading {
    padding: 34px 38px 26px;
    border-bottom: 1px solid var(--aier-survey-border);
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.aier-survey-kicker {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--aier-survey-accent);
}

.aier-survey-heading h2,
.aier-survey-login h2,
.aier-survey-success h2 {
    margin: 0;
    color: var(--aier-survey-ink);
    font-size: clamp(27px, 4vw, 38px);
    line-height: 1.15;
    font-weight: 750;
}

.aier-survey-heading p,
.aier-survey-login p,
.aier-survey-success p {
    margin: 12px 0 0;
    color: var(--aier-survey-muted);
    font-size: 16px;
    line-height: 1.6;
}

.aier-survey-form {
    margin: 0;
}

.aier-survey-questions {
    padding: 12px 38px 0;
}

.aier-survey-question {
    margin: 0;
    padding: 26px 0 28px;
    border: 0;
    border-bottom: 1px solid var(--aier-survey-border);
    min-width: 0;
}

.aier-survey-question:last-child {
    border-bottom: 0;
}

.aier-survey-question-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    margin: 0 0 16px;
    padding: 0;
    color: var(--aier-survey-ink);
    font-size: 17px;
    font-weight: 650;
    line-height: 1.45;
}

.aier-survey-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    margin-top: -3px;
    border-radius: 50%;
    background: #eef7fa;
    color: var(--aier-survey-accent);
    font-size: 13px;
    font-weight: 800;
}

.aier-survey-label {
    min-width: 0;
}

.aier-survey-required {
    margin-left: 3px;
    color: var(--aier-survey-danger);
}

.aier-survey-control {
    margin-left: 42px;
}

.aier-survey-control input[type="text"],
.aier-survey-control input[type="email"],
.aier-survey-control input[type="number"],
.aier-survey-control input[type="date"],
.aier-survey-control input[type="datetime-local"],
.aier-survey-control textarea,
.aier-survey-control select {
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 11px 14px;
    border: 1px solid #cfd4dc;
    border-radius: 10px;
    background: #fff;
    color: var(--aier-survey-ink);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    font: inherit;
    outline: 0;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.aier-survey-control textarea {
    min-height: 126px;
    resize: vertical;
}

.aier-survey-control input:focus,
.aier-survey-control textarea:focus,
.aier-survey-control select:focus {
    border-color: var(--aier-survey-accent);
    box-shadow: 0 0 0 4px rgba(23, 107, 135, .11);
}

.aier-survey-counter {
    margin-top: 6px;
    text-align: right;
    color: var(--aier-survey-muted);
    font-size: 12px;
}

.aier-survey-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.aier-survey-choice {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 48px;
    margin: 0;
    padding: 11px 14px 11px 44px;
    border: 1px solid var(--aier-survey-border);
    border-radius: 10px;
    background: #fff;
    color: var(--aier-survey-ink);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.aier-survey-choice:hover {
    border-color: #a9bac2;
    background: #fbfdfe;
}

.aier-survey-choice input {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--aier-survey-accent);
}

.aier-survey-choice:has(input:checked) {
    border-color: var(--aier-survey-accent);
    background: #f3fafc;
    box-shadow: 0 0 0 2px rgba(23, 107, 135, .06);
}

.aier-survey-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    cursor: pointer;
    font-weight: 550;
}

.aier-survey-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.aier-survey-checkbox-box {
    position: relative;
    width: 22px;
    height: 22px;
    border: 1.5px solid #98a2b3;
    border-radius: 6px;
    background: #fff;
    transition: all .15s ease;
}

.aier-survey-checkbox input:checked + .aier-survey-checkbox-box {
    border-color: var(--aier-survey-accent);
    background: var(--aier-survey-accent);
}

.aier-survey-checkbox input:checked + .aier-survey-checkbox-box::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.aier-survey-checkbox input:focus-visible + .aier-survey-checkbox-box {
    box-shadow: 0 0 0 4px rgba(23, 107, 135, .12);
}

.aier-star-rating {
    display: inline-block;
}

.aier-star-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.aier-star-item {
    position: relative;
    display: inline-flex;
}

.aier-star-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.aier-star-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin: 0;
    border-radius: 10px;
    color: #d0d5dd;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    transition: color .12s ease, background .12s ease, transform .12s ease;
}

.aier-star-label:hover,
.aier-star-label.is-on {
    color: var(--aier-survey-star);
    background: #fff8df;
}

.aier-star-label:hover {
    transform: translateY(-1px);
}

.aier-star-input:focus-visible + .aier-star-label {
    outline: 3px solid rgba(23, 107, 135, .22);
    outline-offset: 2px;
}

.aier-star-caption {
    min-height: 20px;
    margin-top: 6px;
    color: var(--aier-survey-muted);
    font-size: 13px;
}

.aier-survey-actions {
    padding: 28px 38px 34px;
    border-top: 1px solid var(--aier-survey-border);
    background: var(--aier-survey-soft);
}

.aier-survey-submit,
.aier-survey-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 22px;
    border: 0;
    border-radius: 10px;
    background: var(--aier-survey-accent);
    color: #fff !important;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(23, 107, 135, .18);
    transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.aier-survey-submit:hover,
.aier-survey-button:hover {
    background: var(--aier-survey-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(23, 107, 135, .23);
}

.aier-survey-submit:focus-visible,
.aier-survey-button:focus-visible {
    outline: 3px solid rgba(23, 107, 135, .22);
    outline-offset: 3px;
}

.aier-survey-submit-note {
    margin: 10px 0 0;
    color: var(--aier-survey-muted);
    font-size: 13px;
}

.aier-survey-notice {
    margin: 24px 38px 0;
    padding: 14px 16px;
    border: 1px solid var(--aier-survey-border);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--aier-survey-ink);
    line-height: 1.5;
}

.aier-survey-notice--error {
    border-color: #fecdca;
    background: var(--aier-survey-danger-bg);
    color: var(--aier-survey-danger);
}

.aier-survey-notice--info {
    border-color: #b9dfea;
    background: #f1f9fb;
    color: #17566b;
}

.aier-survey-notice ul {
    margin: 7px 0 0 20px;
    padding: 0;
}

.aier-survey-login,
.aier-survey-success {
    padding: 58px 38px;
    text-align: center;
}

.aier-survey-login .aier-survey-button {
    margin-top: 24px;
}

.aier-survey-icon,
.aier-survey-success-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: #eef7fa;
    color: var(--aier-survey-accent);
    font-size: 30px;
}

.aier-survey-success-mark {
    background: var(--aier-survey-success-bg);
    color: var(--aier-survey-success);
    font-weight: 800;
}

.aier-survey-success p {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 640px) {
    .aier-survey-shell {
        margin: 20px auto;
        padding: 0 10px;
    }

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

    .aier-survey-heading,
    .aier-survey-actions,
    .aier-survey-login,
    .aier-survey-success {
        padding-left: 20px;
        padding-right: 20px;
    }

    .aier-survey-questions {
        padding-left: 20px;
        padding-right: 20px;
    }

    .aier-survey-control {
        margin-left: 0;
    }

    .aier-survey-question-title {
        gap: 10px;
    }

    .aier-survey-choice-grid {
        grid-template-columns: 1fr;
    }

    .aier-star-row {
        gap: 2px;
    }

    .aier-star-label {
        width: 41px;
        height: 41px;
        font-size: 31px;
    }

    .aier-survey-submit {
        width: 100%;
    }

    .aier-survey-notice {
        margin-left: 20px;
        margin-right: 20px;
    }
}

/* v1.2.0 - validation, progress, and user messaging */
.aier-survey-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--aier-survey-muted);
    font-size: 13px;
    font-weight: 650;
}

.aier-survey-progress-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.aier-survey-progress {
    position: relative;
    flex: 1 1 auto;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9eef2;
}

.aier-survey-progress > span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--aier-survey-accent);
    transition: width .2s ease;
}

.aier-survey-progress-text {
    flex: 0 0 auto;
    min-width: 104px;
    color: var(--aier-survey-muted);
    font-size: 12px;
    font-weight: 650;
    text-align: right;
}

.aier-survey-guidance {
    margin: 24px 38px 0;
    padding: 14px 16px;
    border: 1px solid #cfe5ec;
    border-radius: 12px;
    background: #f4fafc;
    color: #365563;
    font-size: 14px;
    line-height: 1.55;
}

.aier-survey-guidance strong {
    color: #174c60;
}

.aier-survey-state {
    padding: 58px 38px;
    text-align: center;
}

.aier-survey-state h2 {
    margin: 0;
    color: var(--aier-survey-ink);
    font-size: clamp(27px, 4vw, 38px);
    line-height: 1.15;
    font-weight: 750;
}

.aier-survey-state p {
    max-width: 620px;
    margin: 12px auto 0;
    color: var(--aier-survey-muted);
    font-size: 16px;
    line-height: 1.6;
}

.aier-survey-state .aier-survey-button {
    margin-top: 24px;
}

.aier-survey-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: #eef7fa;
    color: var(--aier-survey-accent);
    font-size: 30px;
    font-weight: 800;
}

.aier-survey-state--success .aier-survey-state-icon {
    background: var(--aier-survey-success-bg);
    color: var(--aier-survey-success);
}

.aier-survey-state--error .aier-survey-state-icon {
    background: var(--aier-survey-danger-bg);
    color: var(--aier-survey-danger);
}

.aier-survey-state--info .aier-survey-state-icon {
    background: #f1f9fb;
    color: #17566b;
}

.aier-survey-question.has-error {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
    border-radius: 12px;
    background: #fffafa;
}

.aier-survey-question.has-error .aier-survey-control input[type="text"],
.aier-survey-question.has-error .aier-survey-control input[type="email"],
.aier-survey-question.has-error .aier-survey-control input[type="number"],
.aier-survey-question.has-error .aier-survey-control input[type="date"],
.aier-survey-question.has-error .aier-survey-control input[type="datetime-local"],
.aier-survey-question.has-error .aier-survey-control textarea,
.aier-survey-question.has-error .aier-survey-control select,
.aier-survey-question.has-error .aier-survey-choice,
.aier-survey-question.has-error .aier-survey-checkbox-box {
    border-color: #f04438;
}

.aier-survey-question.has-error .aier-survey-control input:focus,
.aier-survey-question.has-error .aier-survey-control textarea:focus,
.aier-survey-question.has-error .aier-survey-control select:focus {
    border-color: #d92d20;
    box-shadow: 0 0 0 4px rgba(217, 45, 32, .10);
}

.aier-field-error {
    margin-top: 9px;
    color: var(--aier-survey-danger);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
}

.aier-field-error[hidden] {
    display: none !important;
}

.aier-survey-client-summary[hidden] {
    display: none !important;
}

.aier-survey-server-summary {
    margin-bottom: 0;
}

.aier-survey-server-summary:focus {
    outline: 3px solid rgba(180, 35, 24, .16);
    outline-offset: 3px;
}

.aier-survey-notice-footnote {
    margin: 10px 0 0;
    font-size: 13px;
    font-weight: 650;
}

.aier-survey-counter.is-near-limit {
    color: #b54708;
    font-weight: 700;
}

.aier-survey-submit:disabled {
    cursor: wait;
    opacity: .78;
    transform: none;
    box-shadow: none;
}

.aier-survey-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: aier-survey-spin .75s linear infinite;
}

.aier-survey-submit.is-submitting .aier-survey-spinner {
    display: inline-block;
}

.aier-survey-submit.is-submitting .aier-survey-submit-arrow {
    display: none;
}

.aier-survey-hp {
    position: absolute !important;
    left: -99999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

@keyframes aier-survey-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
    .aier-survey-guidance,
    .aier-survey-client-summary,
    .aier-survey-server-summary {
        margin-left: 20px;
        margin-right: 20px;
    }

    .aier-survey-state {
        padding-left: 20px;
        padding-right: 20px;
    }

    .aier-survey-progress-wrap {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .aier-survey-progress {
        width: 100%;
        flex-basis: 8px;
    }

    .aier-survey-progress-text {
        min-width: 0;
        text-align: left;
    }

    .aier-survey-question.has-error {
        margin-left: -8px;
        margin-right: -8px;
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* ================================================================
   Event-survey dashboard CTA + My Events notification (v1.5.0)
   ================================================================ */
.aier-event-survey-cta,
.aier-event-survey-compact-notice {
    --aier-event-survey-ink: #143b66;
    --aier-event-survey-accent: #005a78;
    --aier-event-survey-accent-dark: #00465e;
    --aier-event-survey-muted: #667085;
    --aier-event-survey-border: #dbe6ec;
    --aier-event-survey-soft: #f4f9fc;
    box-sizing: border-box;
}

.aier-event-survey-cta *,
.aier-event-survey-cta *::before,
.aier-event-survey-cta *::after,
.aier-event-survey-compact-notice *,
.aier-event-survey-compact-notice *::before,
.aier-event-survey-compact-notice *::after {
    box-sizing: border-box;
}

.aier-event-survey-cta {
    width: 100%;
    margin: 24px 0 8px;
    padding: 24px;
    border: 1px solid var(--aier-event-survey-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(20, 59, 102, .07);
}

.aier-event-survey-cta__head {
    margin-bottom: 16px;
}

.aier-event-survey-cta__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-bottom: 7px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #e9f5f9;
    color: var(--aier-event-survey-accent);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.aier-event-survey-cta h2 {
    margin: 0;
    color: var(--aier-event-survey-ink);
    font-size: 22px;
    line-height: 1.25;
    font-weight: 800;
}

.aier-event-survey-cta__head p {
    margin: 7px 0 0;
    color: var(--aier-event-survey-muted);
    font-size: 14px;
    line-height: 1.55;
}

.aier-event-survey-cta__list {
    display: grid;
    gap: 12px;
}

.aier-event-survey-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--aier-event-survey-border);
    border-radius: 10px;
    background: var(--aier-event-survey-soft);
}

.aier-event-survey-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e5f2f7;
    color: var(--aier-event-survey-accent);
}

.aier-event-survey-card__icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.aier-event-survey-card__content {
    min-width: 0;
}

.aier-event-survey-card__label {
    margin-bottom: 3px;
    color: var(--aier-event-survey-accent);
    font-size: 12px;
    line-height: 1.3;
    font-weight: 800;
}

.aier-event-survey-card h3 {
    margin: 0;
    color: #1f2937;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 750;
}

.aier-event-survey-card__meta {
    margin: 5px 0 0 !important;
    color: var(--aier-event-survey-muted) !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

.aier-event-survey-card__action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.aier-event-survey-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid var(--aier-event-survey-accent);
    border-radius: 5px;
    background: var(--aier-event-survey-accent);
    color: #fff !important;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 750;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.aier-event-survey-card__button:hover,
.aier-event-survey-card__button:focus-visible {
    border-color: var(--aier-event-survey-accent-dark);
    background: var(--aier-event-survey-accent-dark);
    color: #fff !important;
    transform: translateY(-1px);
}

.aier-event-survey-compact-notice {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 20px 0;
    padding: 14px 16px;
    border: 1px solid var(--aier-event-survey-border);
    border-radius: 8px;
    background: #f8fafc;
    color: #475467;
    font-size: 13px;
    line-height: 1.5;
}

.aier-event-survey-compact-notice strong {
    color: var(--aier-event-survey-ink);
}

.aier-event-survey-compact-notice--error {
    border-color: #f1b8b2;
    background: #fff7f6;
}

.aier-event-survey-compact-notice--success {
    border-color: #b7dfc9;
    background: #f3fbf6;
}

/* Inline notification shown next to the dashboard My Events tab/link. */
.aier-has-survey-notification {
    position: relative;
}

.aier-survey-nav-notification {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    margin-left: 7px;
    border-radius: 50%;
    background: #fff1f0;
    color: #c62828;
    vertical-align: middle;
    cursor: help;
    flex: 0 0 auto;
}

.aier-survey-nav-notification__bell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
}

.aier-survey-nav-notification__bell svg {
    display: block;
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.aier-survey-nav-notification__count {
    position: absolute;
    top: -6px;
    right: -7px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #c62828;
    color: #fff;
    font-size: 9px;
    line-height: 1;
    font-weight: 800;
}

.aier-survey-nav-notification__tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    z-index: 99999;
    width: max-content;
    max-width: 250px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #17212b;
    color: #fff;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 600;
    text-align: center;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 3px);
    transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.aier-survey-nav-notification__tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: #17212b;
}

.aier-survey-nav-notification:hover .aier-survey-nav-notification__tooltip,
.aier-survey-nav-notification:focus .aier-survey-nav-notification__tooltip,
.aier-has-survey-notification:focus-visible .aier-survey-nav-notification__tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

@media (max-width: 640px) {
    .aier-event-survey-cta {
        padding: 18px;
    }

    .aier-event-survey-card {
        grid-template-columns: 38px minmax(0, 1fr);
        align-items: start;
    }

    .aier-event-survey-card__icon {
        width: 38px;
        height: 38px;
    }

    .aier-event-survey-card__action {
        grid-column: 1 / -1;
    }

    .aier-event-survey-card__button {
        width: 100%;
    }
}
