.evm-app {
    --evm-primary: #ffe700;
    --evm-primary-hover: #ffc300;
    --evm-accent: #3278b4;
    --evm-panel: #070f19;
    --evm-panel-rgb: 7, 15, 25;
    --evm-text: #fafafa;
    --evm-muted: #c9d0d8;
    --evm-border: rgba(255, 255, 255, 0.14);
    --evm-panel-border: transparent;
    --evm-primary-text: #151515;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    color: var(--evm-text);
    font-family: var(--evm-font-family, inherit);
    font-size: var(--evm-base-font-size, 18px);
    font-weight: 400;
    line-height: 1.6;
}

.evm-layout--content {
    max-width: 100%;
}

.evm-layout--wide,
.evm-layout--full {
    position: relative;
    left: 50%;
    max-width: none;
    transform: translateX(-50%);
}

.evm-layout--wide {
    width: min(calc(100vw - 32px), var(--evm-max-width, 1320px));
}

.evm-layout--full {
    width: calc(100vw - 32px);
}

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

.evm-app button,
.evm-app input {
    font: inherit;
}

.evm-card,
.evm-result-screen {
    width: 100%;
    min-height: var(--evm-card-min-height, 620px);
    border: 1px solid var(--evm-panel-border);
    border-radius: var(--evm-panel-radius, 10px);
    background: rgba(var(--evm-panel-rgb), var(--evm-panel-opacity, 0.82));
    color: var(--evm-text);
    box-shadow: 0 18px 46px rgba(0, 0, 0, var(--evm-panel-shadow, 0.34));
    -webkit-backdrop-filter: blur(var(--evm-panel-blur, 14px)) saturate(90%);
    backdrop-filter: blur(var(--evm-panel-blur, 14px)) saturate(90%);
}

.evm-card {
    display: flex;
    flex-direction: column;
    padding: var(--evm-card-padding, 42px);
}

.evm-theme--dark .evm-card,
.evm-theme--dark .evm-result-screen {
    background: var(--evm-panel);
    backdrop-filter: none;
}

.evm-theme--light {
    --evm-text: #17202a;
    --evm-muted: #536170;
    --evm-border: rgba(13, 32, 53, 0.18);
}

.evm-theme--light .evm-card,
.evm-theme--light .evm-result-screen {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.16);
}

.evm-card h1,
.evm-card h2,
.evm-card h3,
.evm-result-screen h1,
.evm-result-screen h2,
.evm-result-screen h3,
.evm-result-screen h4 {
    margin: 0;
    color: var(--evm-text);
    font-family: inherit;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.evm-card h1 {
    max-width: 820px;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
}

.evm-machine-title {
    max-width: 100%;
    padding-bottom: 0;
    border-bottom: 0;
    font-size: 2rem !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
}

.evm-start-card > .evm-machine-title {
    margin-bottom: var(--evm-start-heading-gap, 16px);
}

.evm-start-card .evm-election-title {
    font-size: clamp(var(--evm-mobile-election-title-size, 26px), 3vw, var(--evm-election-title-size, 36px));
    line-height: 1.2;
}

.evm-start-card .evm-start-content > h1 {
    font-size: clamp(var(--evm-mobile-start-title-size, 26px), 3vw, var(--evm-start-title-size, 36px));
}

.evm-start-layout {
    display: flex;
    flex: 1;
    width: 100%;
    min-width: 0;
}

.evm-start-layout--with-image {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, var(--evm-start-image-max-width, 400px));
    gap: clamp(24px, 4vw, 60px);
    align-items: stretch;
}

.evm-start-content { min-width: 0; }

.evm-start-image-wrap {
    display: flex;
    align-self: stretch;
    align-items: flex-end;
    justify-content: center;
    min-width: 0;
    pointer-events: none;
}

.evm-start-image {
    display: block;
    width: 100%;
    max-width: var(--evm-start-image-max-width, 400px);
    max-height: calc(var(--evm-card-min-height, 620px) - 100px);
    object-fit: contain;
    object-position: center bottom;
}

.evm-card h2,
.evm-result-screen h2 {
    font-size: 1.75rem;
    font-weight: 700;
}

.evm-card h3,
.evm-result-screen h3 {
    font-size: 1.375rem;
    font-weight: 700;
}

.evm-result-screen h4 {
    font-size: 1.125rem;
    font-weight: 700;
}

.evm-card p,
.evm-result-screen p {
    margin: 0;
}

.evm-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    width: 100%;
}

.evm-card-content--center {
    align-items: center;
    text-align: center;
}

.evm-election-title {
    color: var(--evm-primary);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.evm-lead {
    max-width: 760px;
    color: var(--evm-muted);
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.6;
}

.evm-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
}

.evm-security-link {
    align-self: center;
    margin-right: auto;
    color: var(--evm-muted);
    font-size: .9375em;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.evm-security-link:hover,
.evm-security-link:focus-visible {
    color: var(--evm-text);
}

.evm-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 11px 24px;
    border: 2px solid transparent;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.evm-button:hover {
    transform: translateY(-1px);
}

.evm-button:focus-visible,
.evm-back-button:focus-visible,
.evm-tab:focus-visible,
.evm-answer-option:focus-within {
    outline: 3px solid rgba(255, 255, 255, 0.95);
    outline-offset: 3px;
}

.evm-button--primary {
    gap: 10px;
    min-height: 48px;
    padding: 11px 24px;
    color: var(--evm-primary-text, #151515);
    background-color: var(--evm-primary-button-background, var(--evm-primary));
    border-color: transparent;
    font-size: var(--evm-primary-button-font-size, 16px);
    font-weight: var(--evm-primary-button-font-weight, 600);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.evm-button--primary:not(:disabled):hover,
.evm-button--primary:focus-visible {
    color: var(--evm-primary-text, #151515);
    background-color: var(--evm-primary-button-hover-background, var(--evm-primary-hover));
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.evm-button--secondary {
    border-color: var(--evm-secondary-button-border, var(--evm-border));
    background: var(--evm-secondary-button-background, rgba(255, 255, 255, 0.06));
    color: var(--evm-secondary-button-text, var(--evm-text));
    font-size: var(--evm-secondary-button-font-size, 16px);
    font-weight: var(--evm-secondary-button-font-weight, 600);
}

.evm-button--secondary:hover,
.evm-button--secondary:focus-visible {
    border-color: var(--evm-secondary-button-hover-border, rgba(255, 255, 255, 0.38));
    background-color: var(--evm-secondary-button-hover-background, rgba(255, 255, 255, 0.11));
    color: var(--evm-secondary-button-text, var(--evm-text));
}

.evm-button:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    transform: none;
}

.evm-back-button {
    align-self: flex-start;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: var(--evm-text);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.evm-text-link {
    color: var(--evm-text);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.65);
    text-underline-offset: 4px;
}

.evm-text-link:hover,
.evm-text-link:focus-visible {
    color: var(--evm-text);
    text-decoration-color: currentColor;
}

.evm-text-button {
    flex: 0 0 auto;
    padding: 8px;
    border: 0;
    background: transparent;
    color: var(--evm-muted);
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.evm-card-actions .evm-text-button {
    order: 2;
    flex-basis: 100%;
    padding: 4px 0;
    text-align: right;
}

.evm-page .ps-page-content {
    width: min(100%, var(--ps-wide-width, 1320px));
}

.evm-hide-theme-title .ps-entry__header,
.evm-hide-theme-title article.page > .entry-header,
.evm-hide-theme-title article.page > .entry-title,
.evm-hide-theme-title main > .entry-title,
.evm-hide-theme-title .wp-block-post-title {
    display: none;
}

.evm-topic-pills {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: var(--evm-topic-pill-gap, 10px);
}

.evm-topic-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: var(--evm-topic-pill-padding-y, 7px) var(--evm-topic-pill-padding-x, 14px);
    border: 1px solid var(--evm-topic-pill-border, transparent);
    border-radius: 999px;
    background: var(--evm-topic-pill-background, #27417d);
    color: var(--evm-topic-pill-text, #fafafa);
    max-width: 100%;
    font-size: clamp(var(--evm-mobile-topic-pill-font-size, 14px), 1.25vw, var(--evm-topic-pill-font-size, 15px));
    font-weight: var(--evm-topic-pill-font-weight, 600);
    line-height: 1.3;
    white-space: normal;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.evm-topic-pill:hover {
    background: var(--evm-topic-pill-hover, #375cb2);
}

.evm-total-count,
.evm-topic-count {
    color: var(--evm-muted);
    font-size: 1.125rem;
    font-weight: 600;
}

.evm-start-card .evm-total-count {
    color: var(--evm-start-count-color, var(--evm-muted));
    font-size: var(--evm-start-count-font-size, 18px);
    font-weight: var(--evm-start-count-font-weight, 600);
}

.evm-start-card .evm-start-button {
    background-color: var(--evm-start-button-background, var(--evm-primary));
    font-size: var(--evm-start-button-font-size, 16px);
    font-weight: var(--evm-start-button-font-weight, 600);
}

.evm-start-card .evm-start-button:not(:disabled):hover,
.evm-start-card .evm-start-button:focus-visible {
    background-color: var(--evm-start-button-hover-background, var(--evm-primary-hover));
}

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

.evm-unavailable {
    padding: 24px;
    border: 1px solid #c3c4c7;
    background: #fff;
    color: #1d2327;
}
