/* Politikersiden (ny utforming november 2026). Samme oppsett som partisidene:
   lyst hode med nøkkeltallene, standpunktene, gangene representanten brøt med
   partiet, de siste sakene og spørsmålene til regjeringen. Den lange lista
   over alle sakene ligger på /politiker/<id>/stemmer. */
html { scroll-behavior: smooth; }
.pt { padding-top: 24px; }
.pt [id] { scroll-margin-top: 90px; }

/* --- Hodet --- */
.pt-hode { display: flex; flex-direction: column; gap: 18px; margin-bottom: 24px; }
.pt-sti { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; font-size: 0.9rem; color: var(--text-muted); }
.pt-sti a { color: #475569; text-decoration: none; }
.pt-sti a:hover { text-decoration: underline; }
.pt-topp { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.po-bilde { width: 96px; height: 120px; object-fit: cover; border-radius: 16px; background: #e2e8f0;
    border: 1px solid var(--border); flex-shrink: 0; }
.pt-navn { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pt-hode > .pt-navn { flex: 0 0 auto; }
.pt-navn-rad { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pt-navn h1 { margin: 0; font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); line-height: 1.1; letter-spacing: -0.02em;
    font-weight: 700; color: var(--primary); }
.pt-merke { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; background: #f1f5f9;
    color: #334155; font-size: 0.85rem; font-weight: 600; line-height: 1.4; }
.pt-merke-regjering { background: var(--accent-soft); color: #1e40af; }
.pt-ledelse { margin: 0; color: #475569; font-size: 0.95rem; line-height: 1.7; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pt-ledelse a { color: var(--primary); font-weight: 600; text-decoration: none; }
.pt-ledelse a:hover { text-decoration: underline; }
.po-partilogo { width: 26px; height: 26px; object-fit: contain; border-radius: 7px; background: #fff;
    border: 1px solid var(--border); padding: 2px; box-sizing: border-box; }
.po-prikk { color: #94a3b8; }
.po-grunnlag { margin: 0; font-size: 0.85rem; color: #475569; }

.pt-tall { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.pt-tall-kort { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px;
    display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; }
a.pt-tall-kort:hover { border-color: #94a3b8; text-decoration: none; }
.pt-tall-navn { font-size: 0.82rem; color: #475569; font-weight: 600; }
.pt-tall-verdi { font-size: 1.75rem; font-weight: 700; line-height: 1.2; color: var(--primary); font-variant-numeric: tabular-nums; }
.pt-tall-tekst { font-size: 0.82rem; color: #475569; line-height: 1.45; }
.pt-tall-tekst a { color: var(--accent); }

.pt-hopp { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 0.9rem; }
.pt-hopp a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
    background: var(--surface); border: 1px solid #cbd5e1; color: var(--primary); text-decoration: none; font-weight: 600; }
.pt-hopp a:hover { background: #f1f5f9; }

/* --- Oppsettet --- */
.pt-oppsett { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
@media (min-width: 960px) {
    .pt-oppsett { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; margin-bottom: 24px; align-items: start; }
    .pt-oppsett.po-like { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.pt .section-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    box-shadow: var(--shadow-sm); padding: 24px; margin: 0 0 20px; min-width: 0; }
.pt-oppsett .section-card { margin: 0; }
.pt .section-card h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 6px; color: var(--primary); }
.pt .section-card h2::before { display: none; }
.pt .section-card h2.po-liten { font-size: 1.1rem; }
.pt .section-card h3 { font-size: 0.95rem; margin: 18px 0 4px; color: var(--primary); }
.pt-ingress { margin: 0 0 16px; font-size: 0.92rem; color: #475569; line-height: 1.55; max-width: 66ch; }
.pt-fot { margin: 14px 0 0; font-size: 0.85rem; color: #475569; line-height: 1.55; }
.pt-fot a, .pt-ingress a { color: var(--accent); }
.pt-metode { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; font-size: 0.88rem; color: #475569; }
.pt-metode > summary { cursor: pointer; font-weight: 600; color: #334155; min-height: 32px; }
.pt-metode p { margin: 8px 0 0; max-width: 72ch; line-height: 1.6; }
.pt-tom { color: #475569; margin: 0; }
.pt-knapp { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px;
    border: 1px solid #cbd5e1; background: var(--surface); color: var(--primary); font: inherit; font-size: 0.95rem;
    font-weight: 600; cursor: pointer; margin-top: 14px; text-decoration: none; }
.pt-knapp:hover { background: #f8fafc; border-color: #94a3b8; text-decoration: none; }

/* --- Standpunktene --- */
.pt-temaer { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 32px; }
.pt-temaer h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 0.95rem; }
.pt-temaer h3::before { content: ""; width: 10px; height: 10px; border-radius: 999px; }
.pt-temaer-for h3 { color: var(--for-sterk); }
.pt-temaer-for h3::before { background: #16a34a; }
.pt-temaer-mot h3 { color: var(--mot-sterk); }
.pt-temaer-mot h3::before { background: var(--mot); }
.pt-temaliste { list-style: none; margin: 0; padding: 0; }
.pt-temaliste a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid #f1f5f9;
    color: var(--primary); text-decoration: none; }
.pt-temaliste a:hover .pt-tema-navn { text-decoration: underline; }
.pt-tema-navn { font-weight: 600; min-width: 0; }
.pt-tema-meta { color: #475569; font-size: 0.88rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pt-tema-ekstra { display: none; }
.pt-temaer.pt-alle .pt-tema-ekstra { display: block; }

/* --- Stemmer likest med --- */
.pt-likhet { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pt-likhet a, .pt-likhet .po-uten-lenke { display: flex; align-items: center; gap: 10px; color: var(--primary); text-decoration: none; min-height: 36px; }
.pt-likhet a:hover .pt-likhet-navn { text-decoration: underline; }
.pt-likhet img, .pt-likhet .pt-logo-tom { width: 28px; height: 28px; object-fit: contain; border-radius: 7px; background: #fff;
    border: 1px solid var(--border); padding: 2px; box-sizing: border-box; flex-shrink: 0; }
.pt-logo-tom { display: inline-flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; }
.pt-likhet-maal { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pt-likhet-tekst { display: flex; justify-content: space-between; gap: 8px; font-size: 0.9rem; }
.pt-likhet-navn { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-likhet-pct { color: #334155; font-weight: 600; font-variant-numeric: tabular-nums; }
.pt-spor { display: block; height: 6px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.pt-spor span { display: block; height: 100%; border-radius: 999px; background: #334155; }

/* --- Sakslistene --- */
.stemme-liste, .mot-partiet-liste { list-style: none; padding: 0; margin: 0; }
.stemme-liste li, .mot-partiet-liste li { padding: 12px 0; border-top: 1px solid #f1f5f9; line-height: 1.5; }
.stemme-liste li:first-child, .mot-partiet-liste li:first-child { border-top: 0; }
.stemme-liste a, .mot-partiet-liste a { color: var(--primary); font-weight: 600; text-decoration: none; }
.stemme-liste a:hover, .mot-partiet-liste a:hover { text-decoration: underline; }
.po-rad-meta, .mot-partiet-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px;
    font-size: 0.88rem; color: #475569; }
.stemme-tag, .mot-partiet-stemme { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; }
.stemme-tag.for, .mot-partiet-stemme.for { background: #d1fae5; color: #065f46; }
.stemme-tag.mot, .mot-partiet-stemme.mot { background: #fee2e2; color: #991b1b; }
.stemme-tag.ikke_avgitt, .stemme-tag.ikke_tilstede, .stemme-tag.delt { background: #f1f5f9; color: #475569; }
.sak-tagger { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sak-tag-badge { display: inline-block; padding: 3px 8px; border-radius: 6px; background: #f1f5f9; color: #475569; font-weight: 500; font-size: 0.8rem; }
.po-flere { margin-top: 4px; }
.po-flere > summary { cursor: pointer; color: var(--accent); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.filter-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; }
.filter-tag label { font-weight: 600; font-size: 0.9rem; }
.filter-tag input { padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px; font: inherit; min-width: min(320px, 100%); }

/* --- Spørsmålene --- */
.po-sporsmal { list-style: none; margin: 0; padding: 0; }
.po-sporsmal li { padding: 12px 0; border-top: 1px solid #f1f5f9; }
.po-sporsmal li:first-child { border-top: 0; }
.po-sporsmal a { color: var(--primary); font-weight: 600; text-decoration: none; line-height: 1.45; }
.po-sporsmal a:hover { text-decoration: underline; }
.po-svar { font-weight: 600; color: var(--for-sterk); }
.po-venter { font-weight: 600; color: #92400e; }

/* --- Regjeringsmedlem --- */
.regjeringsinfo-tittel { font-weight: 600; color: var(--primary); font-size: 1.05rem; margin-bottom: 4px; }
.regjeringsinfo-dep { color: #475569; font-size: 0.95rem; margin-bottom: 14px; }
.regjeringsinfo-tekst { color: #334155; font-size: 0.95rem; line-height: 1.65; max-width: 72ch; }

/* --- Medforslagsstillerne --- */
.network-meta { margin: 0 0 10px; color: #475569; font-size: 0.9rem; }
.nettverk { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: start; }
.nettverk svg { display: block; overflow: visible; }
.nettverk-rader { list-style: none; margin: 0; padding: 0; min-width: 0; }
.nettverk-rader li { height: 30px; display: flex; align-items: center; min-width: 0; }
.nettverk-rader a { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--primary); text-decoration: none; }
.nettverk-rader a:hover .nettverk-navn { text-decoration: underline; }
.nettverk-tall { flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; box-sizing: border-box; }
.nettverk-tall.lys { color: #1f2937; }
.nettverk-navn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.92rem; }
.nettverk-parti { flex: none; color: #64748b; font-size: 0.8rem; }
.nettverk-flere { margin-top: 10px; font-size: 0.9rem; color: #475569; }
.nettverk-flere summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.nettverk-flere p { margin: 8px 0 0 0; line-height: 1.6; }
.nettverk-flere a { color: var(--primary); }
.skjult-tekst, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* --- Bildeopplasting for admin --- */
.admin-bilde-boks { background: var(--accent-soft); border: 1px solid var(--border); border-radius: 16px; padding: 20px 24px; margin-bottom: 24px; }
.admin-bilde-boks h2 { margin: 0 0 12px 0; font-size: 1rem; color: var(--primary); }
.admin-bilde-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.admin-bilde-actions button { padding: 8px 14px; border-radius: 8px; font-weight: 500; font-size: 0.9rem; cursor: pointer;
    border: 1px solid var(--border); background: var(--surface); color: var(--primary); }
.admin-bilde-actions .btn-fjern { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

@media (max-width: 520px) {
    .pt .section-card { padding: 18px; }
    .pt-tall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pt-tall-verdi { font-size: 1.5rem; }
    .po-bilde { width: 76px; height: 96px; border-radius: 12px; }
    .pt-topp { align-items: flex-start; flex-wrap: nowrap; }
    .pt-navn { flex: 1 1 auto; }
    .nettverk { margin-left: -6px; }
    .nettverk-navn { font-size: 0.88rem; }
    .nettverk-parti { font-size: 0.72rem; }
}
