.asl-results-page {
    min-height: 100vh;
    margin: 0;
    background: #f4f6f8;
}

.asl-public-results {
    --red: #b91c1c;
    --ink: #17202a;
    --muted: #64748b;
    --line: #d9e0e7;
    box-sizing: border-box;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 40px;
    color: var(--ink);
    font-family: "Sarabun", system-ui, sans-serif;
}

.asl-public-results *,
.asl-public-results *::before,
.asl-public-results *::after {
    box-sizing: inherit;
}

.asl-results-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.asl-results-brand {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    background: var(--red);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.asl-results-header h1 {
    margin: 0;
    font-size: 32px;
    letter-spacing: 0;
}

.asl-results-header p {
    margin: 4px 0 0;
    color: var(--muted);
}

.asl-results-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 20px 0;
    padding: 14px 18px;
    border-left: 4px solid var(--red);
    background: #fff;
}

.asl-results-toolbar span,
.asl-results-toolbar small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.asl-results-toolbar > div:last-child {
    text-align: right;
}

.asl-results-toolbar button {
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 5px;
    background: var(--red);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.asl-results-toolbar button:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.asl-results-summary {
    display: grid;
    grid-template-columns: minmax(280px, .75fr) minmax(0, 1.75fr);
    gap: 20px;
}

.asl-turnout-panel,
.asl-vote-chart-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}

.asl-results-summary h2 {
    margin: 0 0 20px;
    font-size: 22px;
    letter-spacing: 0;
}

.asl-turnout-donut {
    --turnout: 0%;
    display: grid;
    width: min(250px, 90%);
    aspect-ratio: 1;
    margin: 10px auto 20px;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--red) var(--turnout), #e2e8f0 0);
}

.asl-turnout-donut::before {
    grid-area: 1 / 1;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #fff;
    content: "";
}

.asl-turnout-donut > div {
    z-index: 1;
    grid-area: 1 / 1;
    text-align: center;
}

.asl-turnout-donut strong,
.asl-turnout-donut span {
    display: block;
}

.asl-turnout-donut strong {
    font-size: 38px;
}

.asl-turnout-donut span {
    color: var(--muted);
}

.asl-turnout-panel > p {
    margin: 0;
    font-size: 20px;
    text-align: center;
}

.asl-result-bars {
    display: grid;
    gap: 20px;
}

.asl-result-label {
    margin-bottom: 7px;
    font-weight: 700;
}

.asl-result-track {
    position: relative;
    height: 42px;
    overflow: hidden;
    border-radius: 4px;
    background: #edf1f5;
}

.asl-result-bar {
    min-width: 4px;
    height: 100%;
    background: var(--red);
    transition: width .35s ease;
}

.asl-result-bar.is-abstain {
    background: #64748b;
}

.asl-result-track strong {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: #17202a;
    font-size: 18px;
}

@media (max-width: 760px) {
    .asl-results-summary {
        grid-template-columns: 1fr;
    }

    .asl-results-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .asl-results-toolbar > div:last-child {
        text-align: left;
    }
}
