/*
 * «Denne uken på Stortinget» (uke.html) og ukearkivet (uke_arkiv.html).
 * Kortene, stemmestolpen og partigruppene kommer fra base.css, slik at
 * voteringene ser like ut her som på forsiden og sakssiden.
 */

.uke-bredde {
    max-width: 1040px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ── Toppen ───────────────────────────────────────────────────── */

.uke-hode {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #334155 100%);
    color: #fff;
    padding: 22px 0 44px;
}
.uke-blaing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
    font-size: 0.9rem;
}
.uke-blaing a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: background-color 0.15s, color 0.15s;
}
.uke-blaing a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.uke-etikett {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #93c5fd;
}
.uke-hode h1 {
    margin: 0 0 12px;
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
}
.uke-ingress {
    margin: 0;
    max-width: 64ch;
    font-size: 1.06rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.86);
}

/* ── Innhold ──────────────────────────────────────────────────── */

.uke-innhold {
    padding-bottom: 56px;
}
.uke-tall {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: -26px;
    margin-bottom: 8px;
}
.uke-tall-kort {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.uke-tall-kort strong {
    font-size: 1.9rem;
    line-height: 1.1;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}
.uke-tall-kort span {
    font-size: 0.86rem;
    color: var(--text-muted);
}
.uke-tall-tap strong {
    color: var(--mot);
}

.uke-seksjon {
    margin-top: 40px;
}
.uke-seksjon > .section-title {
    margin-bottom: 16px;
}
.uke-tomt {
    margin: 0;
    padding: 16px 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: var(--text-muted);
    background: var(--bg);
}

/* Knappeste votering: stort kort */
.uke-knappest {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.uke-knappest h3 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.35;
}
.uke-knappest h3 a {
    color: var(--primary);
    text-decoration: none;
}
.uke-knappest h3 a:hover {
    color: var(--accent);
    text-decoration: underline;
}
.uke-hva {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.uke-flere {
    margin-top: 14px;
}
.uke-flere > summary {
    display: inline-block;
    cursor: pointer;
    list-style: none;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
}
.uke-flere > summary::-webkit-details-marker {
    display: none;
}
.uke-flere > summary:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.uke-flere[open] > summary {
    margin-bottom: 14px;
}

/* Partiene på vinnersiden */
.uke-partier {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.uke-partier li {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 118px;
    align-items: center;
    gap: 14px;
}
.uke-parti {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 650;
    color: var(--primary);
    text-decoration: none;
}
.uke-parti img {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    object-fit: contain;
    background: var(--surface);
}
.uke-stolpe {
    display: block;
    height: 12px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}
.uke-stolpe > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
}
.uke-andel {
    font-variant-numeric: tabular-nums;
    font-size: 0.9rem;
    white-space: nowrap;
}
.uke-andel strong {
    color: var(--primary);
}
.uke-andel span {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* Stemte mot eget parti */
.uke-brudd {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.uke-brudd li {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
}
.uke-brudd-hvem {
    display: flex;
    align-items: center;
    gap: 10px;
}
.uke-brudd-hvem img {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    object-fit: contain;
    flex-shrink: 0;
}
.uke-brudd-hvem a {
    font-weight: 650;
    color: var(--primary);
    text-decoration: none;
}
.uke-brudd-hvem a:hover {
    color: var(--accent);
    text-decoration: underline;
}
.uke-brudd-antall {
    margin-left: auto;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--delt);
    background: var(--delt-soft);
    border: 1px solid var(--delt-linje);
    border-radius: 999px;
    padding: 2px 9px;
    white-space: nowrap;
}
.uke-brudd-saker {
    margin: 8px 0 0;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--text-muted);
}
.uke-brudd-saker a {
    color: var(--primary-muted);
}

/* Alle sakene */
.uke-saker {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.uke-saker li {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 6px 14px;
    padding: 13px 18px;
    border-top: 1px solid var(--border);
}
.uke-saker li:first-child {
    border-top: 0;
}
.uke-saker .utfall-pill {
    justify-self: start;
}
.uke-saker a {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    line-height: 1.45;
}
.uke-saker a:hover {
    color: var(--accent);
    text-decoration: underline;
}
.uke-sak-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.uke-enstemmig {
    background: var(--bg);
    color: var(--text-muted);
    border-color: var(--border);
}
.uke-enstemmig::before {
    background: #94a3b8;
}
.uke-metode {
    margin: 36px 0 0;
    font-size: 0.86rem;
    color: var(--text-muted);
}

/* Arkivet */
.uke-arkiv {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.uke-arkiv a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--primary);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.uke-arkiv a:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}
.uke-arkiv span {
    font-size: 0.86rem;
    color: var(--text-muted);
}
.uke-arkiv .uke-arkiv-antall {
    font-size: 0.8rem;
}

/* ── Mobil ────────────────────────────────────────────────────── */

@media (max-width: 760px) {
    .uke-tall {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .uke-brudd,
    .uke-arkiv {
        grid-template-columns: 1fr;
    }
    .uke-saker li {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }
    .uke-partier li {
        grid-template-columns: 78px minmax(0, 1fr) 92px;
        gap: 10px;
    }
    .uke-andel span {
        display: none;
    }
    .uke-knappest {
        padding: 18px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .uke-blaing a, .uke-arkiv a { transition: none; }
}
