.theme-poll {
    --theme-poll-accent: var(--primary, var(--accent, var(--blue, #4f46e5)));
    --theme-poll-border: var(--border, var(--line, #e5e7eb));
    --theme-poll-muted: var(--muted, #6b7280);
    --theme-poll-track: color-mix(in srgb, var(--theme-poll-accent) 12%, transparent);
}

.theme-poll[hidden],
.theme-poll [hidden] {
    display: none !important;
}

.theme-poll__title {
    margin-bottom: 0.75rem;
}

.theme-poll__question {
    margin: 0 0 0.8rem;
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1.45;
}

.theme-poll__options {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.theme-poll__option {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.58rem 0.68rem;
    border: 1px solid var(--theme-poll-border);
    border-radius: 0.65rem;
    cursor: pointer;
    font-size: 0.88rem;
    line-height: 1.35;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.theme-poll__option:hover,
.theme-poll__option:focus-within {
    border-color: var(--theme-poll-accent);
    background: color-mix(in srgb, var(--theme-poll-accent) 6%, transparent);
}

.theme-poll__option input {
    flex: 0 0 auto;
    margin-top: 0.16rem;
    accent-color: var(--theme-poll-accent);
}

.theme-poll__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    padding: 0.48rem 0.9rem;
    border: 1px solid var(--theme-poll-accent);
    border-radius: 0.65rem;
    background: var(--theme-poll-accent);
    color: #fff;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.18s ease, transform 0.18s ease;
}

.theme-poll__submit:hover {
    filter: brightness(0.94);
    transform: translateY(-1px);
}

.theme-poll__submit:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--theme-poll-accent) 28%, transparent);
    outline-offset: 2px;
}

.theme-poll__submit:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
}

.theme-poll__error {
    margin: 0.55rem 0 0;
    color: #dc2626;
    font-size: 0.82rem;
    line-height: 1.4;
}

.theme-poll__results {
    display: grid;
    gap: 0.65rem;
}

.theme-poll__result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.7rem;
    margin-bottom: 0.28rem;
    font-size: 0.84rem;
    line-height: 1.35;
}

.theme-poll__result-head span:last-child {
    flex: 0 0 auto;
    color: var(--theme-poll-muted);
    font-variant-numeric: tabular-nums;
}

.theme-poll__track {
    height: 0.55rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--theme-poll-track);
}

.theme-poll__bar {
    width: var(--theme-poll-percent, 0%);
    height: 100%;
    border-radius: inherit;
    background: var(--theme-poll-accent);
    transition: width 0.35s ease;
}

.theme-poll__total {
    margin: 0.12rem 0 0;
    color: var(--theme-poll-muted);
    font-size: 0.8rem;
}

@media (prefers-reduced-motion: reduce) {
    .theme-poll__option,
    .theme-poll__submit,
    .theme-poll__bar {
        transition: none;
    }
}
