
.elections-page { width:min(1224px,calc(100% - 40px)); margin:40px auto 64px; color:var(--theme-ink,#142039); }
.elections-intro { max-width:800px; margin-bottom:32px; }
.elections-page .eyebrow { color:var(--theme-accent,#7534c9); font-size:.74rem; font-weight:750; text-transform:uppercase; letter-spacing:.06em; }
.elections-page h1 { font-size:clamp(32px,4vw,48px); line-height:1.15; letter-spacing:-.035em; margin:12px 0 18px; }
.elections-page h2 { font-size:1.45rem; margin:10px 0 16px; }
.elections-page p { color:var(--theme-muted,#506487); line-height:1.75; }
.elections-intro p { font-size:1.1rem; }
/* Election overview: open editorial sections rather than nested cards. */
.elections-hero { display:grid; grid-template-columns:minmax(0,1fr) 330px; align-items:center; gap:50px; padding:38px 0 64px; position:relative; isolation:isolate; }
.elections-hero::before { content:""; position:absolute; inset:-40px -30px 0; pointer-events:none; z-index:-1; background:radial-gradient(ellipse at 65% 40%,color-mix(in srgb,var(--theme-accent,#7534c9) 10%,transparent),transparent 68%); mask-image:linear-gradient(to right,transparent,#000 12%,#000 75%,transparent); }
.elections-hero h1 { font-size:clamp(42px,5.2vw,68px); line-height:1.08; letter-spacing:-.045em; margin:22px 0; }
.elections-hero h1 em { color:var(--theme-accent,#7534c9); font-style:normal; }
.elections-hero-copy > p { max-width:56ch; font-size:1.15rem; }
.elections-hero-link { display:inline-flex; align-items:center; gap:14px; margin-top:20px; font-size:.9rem; font-weight:650; text-decoration:none; }
.elections-hero-link svg { width:20px; height:20px; }
.elections-ballot { color:var(--theme-muted,#506487); transform:rotate(3deg); }
.elections-ballot svg { display:block; width:100%; }
.ballot-caption { display:block; text-align:center; font-size:.72rem; letter-spacing:.04em; }
.ballot-paper { fill:var(--theme-panel,white); stroke:var(--theme-border,#dce5f1); }
.ballot-shadow { fill:color-mix(in srgb,var(--theme-accent,#7534c9) 13%,var(--theme-panel,white)); }
.ballot-cross { stroke:var(--theme-accent,#7534c9); }
.election-choices { scroll-margin-top:100px; }
.election-choices-heading { padding-top:28px; }
.election-choices-heading h2 { font-size:1.8rem; margin:10px 0 28px; }
.election-types { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:34px; margin:24px 0 58px; }
.election-type { --election-accent:var(--theme-accent,#7534c9); display:flex; flex-direction:column; align-items:flex-start; padding:22px 0 20px; border-top:3px solid var(--election-accent); color:var(--theme-ink,#142039); text-decoration:none; }
.election-national { --election-accent:#bc3949; }
.election-local { --election-accent:#27857d; }
.election-european { --election-accent:#5274cd; }
.election-type-top { display:flex; align-items:center; justify-content:space-between; width:100%; gap:12px; color:var(--theme-muted,#506487); font-size:.75rem; font-weight:650; }
.election-type-top .icon { width:28px; height:28px; color:var(--election-accent); }
.election-type h3 { font-size:clamp(1.2rem,1.8vw,1.55rem); letter-spacing:-.025em; margin:24px 0 10px; }
.election-type p { margin:0 0 12px; font-size:.95rem; }
.election-type .election-next { margin-bottom:24px; color:var(--theme-muted,#506487); font-size:.87rem; }
.election-next time { color:var(--theme-ink,#142039); font-weight:600; }
.election-type strong { display:flex; align-items:center; gap:12px; margin-top:auto; font-size:.87rem; color:var(--theme-accent,#7534c9); }
.election-type strong svg { width:19px; height:19px; transition:transform .15s ease; }
.election-type:hover h3 { text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:5px; }
.election-type:hover strong svg { transform:translateX(4px); }
.election-follow-through { display:grid; grid-template-columns:1fr 1.65fr; gap:60px; padding:42px 0; border-top:1px solid var(--theme-border,#dce5f1); }
.election-follow-through h2 { font-size:clamp(1.6rem,2.5vw,2rem); line-height:1.25; letter-spacing:-.025em; }
.election-follow-through p:first-child { margin-top:0; }
.election-follow-links { display:flex; flex-wrap:wrap; gap:16px 28px; margin-top:24px; font-size:.9rem; font-weight:650; }
.election-explainer { padding:28px; margin:24px 0; border:1px solid var(--theme-border,#dce5f1); border-radius:22px; background:var(--theme-panel,white); scroll-margin-top:100px; }
.election-explainer > p { max-width:85ch; }
.election-section-links,.election-breadcrumbs { display:flex; flex-wrap:wrap; gap:12px 24px; margin-bottom:28px; font-size:.85rem; }
.election-section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; flex-wrap:wrap; }
.election-selection { display:flex; align-items:flex-end; gap:16px; flex-wrap:wrap; padding:20px 0; margin:8px 0 16px; }
.election-selection label { display:grid; gap:8px; font-size:.8rem; font-weight:650; min-width:150px; }
.election-selection select { min-height:44px; border:1px solid var(--theme-border,#dce5f1); border-radius:10px; background:var(--theme-panel-soft,#f8faff); color:var(--theme-ink,#142039); font:inherit; padding:10px 14px; }
.election-selection button { display:flex; align-items:center; gap:8px; min-height:44px; border:0; border-radius:10px; padding:10px 18px; background:var(--theme-accent,#7534c9); color:white; font:inherit; font-size:.85rem; font-weight:650; cursor:pointer; }
.election-selection button svg { width:16px; height:16px; }
.election-empty { padding:20px; border-radius:12px; background:var(--theme-panel-soft,#f8faff); }
.election-result-summary { display:flex; flex-wrap:wrap; align-items:baseline; gap:8px 24px; margin-bottom:16px; }
.election-result-summary h3 { margin:0; }
.election-result-summary span { color:var(--theme-muted,#506487); font-size:.8rem; }
.election-scale-note { font-size:.78rem; margin:8px 0 20px; max-width:85ch; }
.election-table-scroll { overflow-x:auto; }
.election-results-table { width:100%; table-layout:fixed; border-collapse:collapse; font-size:.88rem; }
.election-results-table caption { text-align:left; color:var(--theme-muted,#506487); margin-bottom:14px; font-size:.75rem; }
.election-results-table :is(th,td) { padding:16px 0; border-bottom:1px solid var(--theme-border,#dce5f1); text-align:right; font-variant-numeric:tabular-nums; }
.election-results-table th:first-child { width:30%; text-align:left; padding-right:22px; }
.election-results-table th:nth-child(2) { width:46%; text-align:left; }
.election-results-table thead th { color:var(--theme-muted,#506487); font-size:.75rem; font-weight:600; }
.election-party-identity { display:flex; align-items:center; gap:12px; font-weight:650; line-height:1.4; }
.election-party-mark { flex:0 0 36px; width:36px; height:36px; display:grid; place-items:center; border-radius:8px; overflow:hidden; background:var(--result-party-color,#64748b); color:white; font-size:1.1rem; font-weight:800; }
.election-party-mark:has(img) { background:white; border:1px solid #e3e7ee; padding:4px; }
.election-party-mark img { width:100%; height:100%; object-fit:contain; }
.election-share { display:flex; align-items:center; gap:16px; }
.election-share-track { flex:1; height:23px; background:var(--theme-panel-soft,#f2f5fa); overflow:hidden; border-radius:3px; }
.election-share-track > span { display:block; height:100%; background:var(--result-party-color,#64748b); border-radius:3px; }
.election-share strong { flex:0 0 64px; text-align:right; font-size:1rem; }
.election-seat-count { font-weight:750; font-size:1.1rem; }
.election-vote-count { color:var(--theme-muted,#506487); }
.election-result-section { padding:28px 0; border:0; border-radius:0; background:transparent; }
.election-next { display:inline-block; margin-top:22px; font-weight:650; font-size:.85rem; }
.european-members { list-style:none; padding:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 24px; }
.european-members li { display:grid; gap:5px; padding:18px 0; border-bottom:1px solid var(--theme-border,#dce5f1); }
.european-members :is(span,small) { color:var(--theme-muted,#506487); font-size:.8rem; }
.elections-page :is(a,button,select):focus-visible { outline:2px solid var(--theme-accent,#7534c9); outline-offset:4px; }
@media(max-width:850px) { .election-types { grid-template-columns:1fr; } .european-members { grid-template-columns:1fr 1fr; } }
@media(max-width:550px) { .elections-page { width:calc(100% - 28px); margin-top:24px; } .election-explainer { padding:18px; } .election-selection > label { width:100%; } .european-members { grid-template-columns:1fr; } }

@media(max-width:950px) {
    .elections-hero { grid-template-columns:minmax(0,1fr) 240px; gap:24px; }
    .election-types { gap:24px; }
}
@media(max-width:850px) {
    .elections-hero { grid-template-columns:1fr; padding:22px 0 42px; }
    .elections-ballot { display:none; }
    .election-types { grid-template-columns:1fr; gap:8px; }
    .election-type { padding:22px 0 28px; }
    .election-type h3 { margin-top:16px; }
    .election-type p { max-width:65ch; }
    .election-follow-through { grid-template-columns:1fr; gap:12px; padding:32px 0; }
}
@media(max-width:650px) {
    .election-results-table,.election-results-table tbody { display:block; }
    .election-results-table caption { display:block; }
    .election-results-table thead { display:none; }
    .election-results-table tr { display:grid; grid-template-columns:1fr auto; column-gap:24px; padding:18px 0; border-bottom:1px solid var(--theme-border,#dce5f1); }
    .election-results-table :is(th,td) { width:auto; border:0; padding:0; }
    .election-results-table th:first-child { grid-column:1/-1; width:auto; padding:0 0 14px; }
    .election-share-cell { grid-column:1/-1; margin-bottom:12px; }
    .election-share-track { height:20px; }
    .election-vote-count { text-align:left !important; font-size:.8rem; }
    .election-vote-count::after { content:" stemmer"; }
    .election-seat-count { font-size:.85rem; }
    .election-seat-count::before { content:"Mandater: "; font-weight:400; color:var(--theme-muted,#506487); }
    .election-result-section { padding-inline:0; }
    .elections-hero::before { inset:-24px -14px 0; }
}

/* Detail-page hierarchy: one page introduction, then one result heading and controls. */
.election-detail-intro { max-width:850px; padding:12px 0 30px; margin-bottom:20px; }
.election-detail-intro h1 { margin-top:0; }
.election-about-link { display:inline-block; margin:14px 22px 0 0; font-size:.85rem; }
.election-results-heading { display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap; margin-bottom:24px; }
.election-results-heading h2 { font-size:1.7rem; margin:0 0 6px; }
.election-results-heading p { margin:0; font-size:.9rem; }
.election-results-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:12px 28px; }
.election-selection.election-year-selection { padding:0; margin:0; border:0; gap:10px; }
.election-year-selection label { min-width:100px; }
.election-selection button { background:var(--accent-solid,#7940c7); color:#fff; }
.election-scale-note { margin:0 0 12px; }
.election-totals { display:flex; flex-wrap:wrap; gap:24px 60px; margin:30px 0 8px; }
.election-totals dt { color:var(--theme-muted,#506487); font-size:.8rem; font-weight:400; }
.election-totals dd { margin:6px 0 4px; font-size:1.5rem; font-weight:750; font-variant-numeric:tabular-nums; }
.election-totals small { color:var(--theme-muted,#506487); font-size:.75rem; }
.municipality-lookup { padding:32px; margin:8px 0 42px; border-radius:20px; background:var(--theme-panel,white); box-shadow:0 10px 35px #00000008; }
.municipality-lookup h2 { font-size:clamp(1.6rem,3vw,2.1rem); letter-spacing:-.025em; }
.municipality-lookup details > p { margin:10px 0 20px; }
.municipality-lookup summary { cursor:pointer; }
.municipality-lookup summary h2 { display:inline; }
.municipality-lookup summary > span { display:block; margin-top:8px; }
.municipality-change { margin-left:12px; text-decoration:underline; font-size:.85rem; }
.municipality-lookup:has(details:not([open])) { padding:18px 24px; margin-bottom:20px; }
.municipality-lookup details:not([open]) h2 { font-size:1.1rem; }
#kommune-kort { scroll-margin-top:90px; }
.election-selection.municipality-search-form { border:0; padding:0; margin:24px 0 12px; }
.municipality-search-field { position:relative; flex:1; min-width:240px; }
.municipality-search-field label { margin-bottom:8px; }
.municipality-search-field input { box-sizing:border-box; width:100%; min-height:50px; border:1px solid var(--theme-border,#dce5f1); border-radius:10px; background:var(--theme-panel-soft,#f8faff); color:var(--theme-ink,#142039); padding:12px 16px; font:inherit; }
.municipality-search-form :is(select,button) { min-height:50px; }
.municipality-lookup .municipality-search-hint { margin:10px 0; font-size:.8rem; }
.municipality-suggestions { position:absolute; z-index:15; inset:100% 0 auto; max-height:300px; overflow:auto; list-style:none; padding:6px; margin:6px 0 0; border:1px solid var(--theme-border,#dce5f1); border-radius:12px; background:var(--theme-panel,white); box-shadow:0 12px 30px #0003; }
.municipality-suggestions[hidden] { display:none; }
.municipality-suggestions a { display:block; padding:10px 12px; border-radius:7px; text-decoration:none; color:var(--theme-ink,#142039); }
.municipality-suggestions a:is(:hover,[aria-selected="true"]) { background:var(--theme-panel-soft,#f4f0fb); }
.municipality-search-matches { display:flex; flex-wrap:wrap; gap:16px; align-items:baseline; }
@media(max-width:650px) {
    .election-detail-intro { padding-bottom:18px; }
    .election-results-actions { justify-content:flex-start; }
    .municipality-lookup { padding:22px 18px; }
    .municipality-search-form > * { width:100%; }
    .municipality-search-form button { justify-content:center; }
    .election-totals { gap:24px; }
    .election-totals > div { flex:1 1 150px; }
}

.european-members li { display:flex; align-items:flex-start; gap:14px; }
.european-member-portrait { flex:0 0 58px; width:58px; height:72px; overflow:hidden; display:grid; place-items:center; border-radius:9px; background:var(--theme-panel-soft,#f4f0fb); color:var(--theme-accent,#7534c9); font-size:1.1rem; font-weight:700; }
.european-member-portrait img { width:100%; height:100%; object-fit:cover; object-position:center top; }
.european-member-copy { display:grid; gap:9px; min-width:0; }
.european-national-party { display:flex; align-items:center; gap:7px; line-height:1.4; }
.european-members .european-party-letter { display:inline-grid; place-items:center; flex:0 0 23px; height:23px; border-radius:5px; background:var(--badge-color,#64748b); color:white; font-size:.75rem; font-weight:750; }

.election-selection.election-top-year { margin:0 0 28px; }
