:root {
    color-scheme: light;
    --ink: #152324;
    --muted: #667274;
    --border: #e4e8e7;
    --green: #24694d;
    --surface: #f5f7f6;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: #fff;
    font-synthesis: none;
    letter-spacing: 0.01rem;
}

* {
    box-sizing: border-box
}

body {
    margin: 0
}

a {
    color: inherit
}

button,
input {
    font: inherit
}

svg {
    display: block
}

img {
    object-fit: cover
}

strong {
    font-variant-numeric: tabular-nums
}

h1,
h2,
p {
    margin: 0
}

::selection {
    background: #ffd500;
    color: #152324
}

.skip-link {
    position: absolute;
    top: -80px;
    left: 16px;
    padding: 12px;
    background: white;
    z-index: 10
}

.skip-link:focus {
    top: 12px
}

.site-header {
    border-bottom: 1px solid var(--border)
}

.header-inner {
    max-width: 1184px;
    margin: auto;
    padding: 25px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2.5px
}

.brand img {
    object-fit: contain
}

.brand-subtitle {
    display: block;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .4px;
    margin-top: 3px;
    color: var(--muted)
}

.header-label {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #355348;
    letter-spacing: 0.02rem;
    font-weight: 600;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #347653;
    box-shadow: 0 0 0 4px #3476530c
}

.page {
    max-width: 1184px;
    padding: 46px 32px 36px;
    margin: auto
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 29px
}

.eyebrow {
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px
}

h1 {
    font-size: 46px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: 0.05rem;
}

.count-status {
    font-size: 13px;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fafbfa;
    color: #5f6b6b;
    white-space: nowrap
}

.results-panel {
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden
}

.reporting-panel {
    padding: 17px 22px;
    margin-bottom: 24px;
    border: 1px solid #d8e7dd;
    border-radius: 10px;
    background: #f3f8f4;
    color: var(--green)
}

.reporting-panel[hidden] {
    display: none
}

.reporting-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 16px;
    margin-bottom: 11px;
    font-size: 14px
}

.reporting-heading strong {
    font-weight: 650
}

.reporting-track {
    height: 10px;
    background: #dfece3;
    border-radius: 5px;
    overflow: hidden
}

.reporting-fill {
    width: 0%;
    height: 100%;
    background: #347557;
    border-radius: inherit
}

.panel-heading {
    padding: 21px 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center
}

.section-label {
    font-weight: 600;
    font-size: 14px
}

.counted {
    font-size: 13px;
    color: var(--muted)
}

.counted strong {
    color: var(--ink)
}

.candidates {
    display: grid;
    grid-template-columns: 1fr 1fr
}

.candidate {
    padding: 31px 38px 27px;
    position: relative;
    min-width: 0
}

.candidate+.candidate {
    border-left: 1px solid var(--border)
}

.candidate-top {
    display: flex;
    align-items: center;
    gap: 18px
}

.portrait {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    position: relative;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    overflow: hidden
}

.portrait .initials {
    font-size: 25px;
    font-weight: 600;
    color: #7d8788
}

.portrait img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%
}

.candidate h2 {
    font-size: 29px;
    line-height: 1.25;
    font-weight: 700
}

.party {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 9px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted)
}

.party-color {
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--party-color);
    flex-shrink: 0
}

.vote-tally {
    margin-top: 23px;
    display: flex;
    align-items: baseline;
    gap: 12px
}

.vote-number {
    font-size: 76px;
    line-height: 1.05;
    font-weight: 700;
    font-variant-numeric: tabular-nums
}

.votes-label {
    font-size: 14px;
    color: var(--muted)
}

.candidate-bottom {
    height: 27px;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px
}

.party-tag {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .7px;
    padding: 5px 8px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--party-color) 15%, white);
    color: var(--ink);
    border: 1px solid color-mix(in srgb, var(--party-color) 32%, white)
}

.election-status {
    font-size: 13px;
    font-weight: 600;
    padding: 5px 9px;
    border-radius: 4px;
    color: var(--muted);
    background: #f4f5f4
}

.election-status.elected {
    color: #24694d;
    background: #edf5ef
}

.election-status.elected::before {
    content: '✓';
    margin-right: 6px
}

.vote-share {
    padding: 25px 30px 24px;
    border-top: 1px solid var(--border);
    background: #fcfdfc
}

.share-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px
}

.share-heading h2 {
    font-size: 14px;
    font-weight: 600
}

.share-heading>span {
    font-size: 12px;
    color: var(--muted)
}

.share-labels {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px
}

.share-label {
    display: flex;
    align-items: baseline;
    gap: 9px;
    font-size: 13px;
    color: var(--muted)
}

.share-label strong {
    font-size: 24px;
    font-weight: 650;
    color: var(--ink)
}

.share-label:last-child {
    text-align: right;
    flex-direction: row-reverse
}

.proportion-bar {
    height: 16px;
    background: #e9edeb;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    gap: 0
}

.bar-segment {
    width: 0%;
    height: 100%;
    flex-shrink: 0
}

.share-footnote {
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted);
    margin-top: 13px
}

.turnout-panel {
    margin-top: 27px;
    padding: 31px 34px;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 44px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px
}

.turnout-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px
}

.turnout-copy h2 {
    font-size: 24px;
    line-height: 1.3;
}

.turnout-description {
    font-size: 14px;
    line-height: 1.65;
    margin-top: 10px;
    color: var(--muted);
    max-width: 175px
}

.turnout-display {
    position: relative;
    width: 176px;
    height: 176px;
    flex: 0 0 176px;
    display: grid;
    place-items: center
}

.turnout-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
    transform: rotate(-90deg)
}

.turnout-ring circle {
    fill: none;
    stroke-width: 7
}

.ring-track {
    stroke: #e1e8e3
}

.ring-fill {
    stroke: #347557;
    stroke-linecap: round;
    stroke-dasharray: 483.80526865;
    stroke-dashoffset: 483.80526865
}

.turnout-number {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px
}

.turnout-number>strong {
    font-size: 40px;
    font-weight: 650;
    line-height: 1.2
}

.turnout-number>strong span {
    font-size: 23px;
}

.turnout-number>span {
    font-size: 12px;
    color: var(--muted)
}

.turnout-stats {
    border-left: 1px solid #dfe5e2;
    padding-left: 34px;
    align-self: center
}

.stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e1e7e3
}

.stat:first-child {
    padding-top: 0
}

.stat:nth-child(3) {
    border: 0
}

.stat-icon {
    color: #788a80
}

.stat-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round
}

.stat>span {
    font-size: 14px;
    color: #576662
}

.stat strong {
    margin-left: auto;
    font-size: 22px;
    line-height: 1;
    font-weight: 650;
}

.turnout-summary {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
    margin-top: 9px
}

.results-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 20px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted)
}

.results-note svg {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    margin-top: 2px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round
}

.site-footer {
    position: relative;
    background: #152324;
    min-height: 145px;
    overflow: hidden;
    color: #fff
}

.footer-landscape {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #152324e8, #152324b5), url('https://static.gaplagov.org/files/beautifulgapla.png') center 55%/cover;
    opacity: .8
}

.footer-inner {
    position: relative;
    max-width: 1184px;
    margin: auto;
    min-height: 145px;
    padding: 36px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px
}

.footer-brand {
    display: flex;
    gap: 13px;
    align-items: center
}

.footer-brand img {
    border-radius: 2px;
    object-fit: cover
}

.footer-brand>span {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px
}

.footer-brand>span span {
    display: block;
    font-size: 12px;
    letter-spacing: .2px;
    font-weight: 400;
    margin-top: 5px;
    color: #d0d9d5
}

.footer-inner>p {
    font-size: 12px;
    color: #d0d9d5
}

.config-error {
    border: 1px solid #d44949;
    background: #fff4f4;
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 24px;
    color: #9c2525;
    font-size: 14px;
    line-height: 1.5
}

.noscript {
    padding: 20px;
    background: #fff0d6;
    text-align: center
}

@media(min-width:1400px) {
    .page {
        padding-top: 54px;
        padding-bottom: 45px
    }

    .candidate {
        padding-top: 37px;
        padding-bottom: 32px
    }
}

@media(max-width:1000px) {
    .candidate {
        padding: 28px
    }

    .candidate h2 {
        font-size: 24px
    }

    .portrait {
        width: 64px;
        height: 64px;
        flex-basis: 64px
    }

    .turnout-panel {
        gap: 25px;
        padding: 26px
    }

    .turnout-main {
        gap: 12px
    }

    .turnout-copy h2 {
        font-size: 21px
    }

    .turnout-display {
        width: 154px;
        height: 154px;
        flex-basis: 154px
    }

    .turnout-stats {
        padding-left: 25px
    }
}

@media(max-width:740px) {
    .header-inner {
        padding: 20px 24px
    }

    .page {
        padding: 32px 24px
    }

    .page-heading {
        align-items: flex-start
    }

    h1 {
        font-size: 37px
    }

    .eyebrow {
        font-size: 12px
    }

    .count-status {
        margin-top: 28px;
        padding: 7px 9px;
        font-size: 12px
    }

    .candidate {
        padding: 25px 22px
    }

    .candidate-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px
    }

    .candidate h2 {
        font-size: 24px
    }

    .party {
        font-size: 12px;
        align-items: flex-start;
        gap: 6px
    }

    .party-color {
        margin-top: 6px
    }

    .vote-number {
        font-size: 65px
    }

    .vote-tally {
        margin-top: 20px;
        gap: 8px
    }

    .panel-heading,
    .vote-share {
        padding-left: 22px;
        padding-right: 22px
    }

    .turnout-panel {
        grid-template-columns: 1fr;
        gap: 22px
    }

    .turnout-main {
        justify-content: space-between;
        gap: 20px
    }

    .turnout-copy h2 {
        font-size: 24px
    }

    .turnout-display {
        width: 170px;
        height: 170px;
        flex-basis: 170px
    }

    .turnout-stats {
        padding: 23px 0 0;
        border-left: 0;
        border-top: 1px solid #dfe5e2
    }

    .stat {
        padding: 13px 0
    }

    .footer-inner {
        padding: 30px 24px
    }
}

@media(max-width:420px) {
    .header-inner {
        padding: 18px
    }

    .brand {
        font-size: 17px
    }

    .brand img {
        width: 35px;
        height: 35px
    }

    .header-label {
        font-size: 12px
    }

    .page {
        padding: 29px 16px
    }

    .page-heading {
        gap: 8px
    }

    h1 {
        font-size: 32px
    }

    .count-status {
        font-size: 12px;
        padding: 6px 8px;
        margin-top: 27px
    }

    .candidate {
        padding: 22px 16px
    }

    .candidate h2 {
        font-size: 22px
    }

    .portrait {
        width: 60px;
        height: 60px;
        flex-basis: 60px
    }

    .party {
        display: block;
        font-size: 12px
    }

    .party-color {
        display: none
    }

    .vote-number {
        font-size: 56px
    }

    .votes-label {
        font-size: 12px
    }

    .candidate-bottom {
        height: auto;
        min-height: 28px;
        align-items: flex-start;
        flex-wrap: wrap
    }

    .election-status {
        font-size: 12px
    }

    .panel-heading,
    .vote-share {
        padding-left: 16px;
        padding-right: 16px
    }

    .panel-heading {
        gap: 8px
    }

    .section-label {
        font-size: 13px
    }

    .counted {
        font-size: 12px
    }

    .share-label {
        gap: 5px;
        font-size: 12px
    }

    .share-label strong {
        font-size: 21px
    }

    .share-heading>span {
        font-size: 12px
    }

    .turnout-panel {
        padding: 22px
    }

    .turnout-main {
        gap: 12px
    }

    .turnout-copy h2 {
        font-size: 22px
    }

    .turnout-description {
        font-size: 13px
    }

    .turnout-display {
        width: 142px;
        height: 142px;
        flex-basis: 142px
    }

    .turnout-number>strong {
        font-size: 32px
    }

    .turnout-number>strong span {
        font-size: 21px
    }

    .turnout-number>span {
        font-size: 12px
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
        padding: 28px 22px
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important
    }
}

@media(max-width:360px) {
    .turnout-main {
        flex-direction: column;
        align-items: flex-start
    }

    .turnout-display {
        align-self: center
    }

    .turnout-description {
        max-width: none
    }
}
