/* Portefølje (trinn 6, 23.11.2026). Mobil først, PC-oppsettet fra pc-skisser/portefolje.html fra 1024 px.
   Alt er prefikset med .side--portefolje (siden) eller .ark--portefolje (arkene i #lag). */
.side--portefolje { max-width: 1240px; }
.side--portefolje .opp { color: var(--gronn); }
.side--portefolje .ned { color: var(--rod); }
.side--portefolje h2 { font-size: 19px; font-weight: 700; letter-spacing: -.015em; }

/* Topp */
.side--portefolje .pf-tilbake { display: inline-flex; align-items: center; gap: 4px; color: var(--bla); font-size: 16px; padding: 6px 0; margin: -6px 0 8px; }
.side--portefolje .pf-tilbake svg, .side--portefolje .pf-inngangsrad svg, .side--portefolje .pf-venter svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }
.side--portefolje .pf-hode { display: flex; flex-direction: column; gap: 14px; }
.side--portefolje .pf-topp { margin-bottom: 0; }
.side--portefolje .pf-status { display: flex; align-items: center; gap: 8px; font-size: 15px !important; color: var(--dempet) !important; margin-top: 8px !important; }
.side--portefolje .pf-status i { width: 8px; height: 8px; border-radius: 50%; background: #9AA0AC; flex: none; }
.side--portefolje .pf-status i.paa { background: var(--gronn); }
.side--portefolje .pf-handl { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.side--portefolje .pf-modus { display: flex; padding: 3px; border-radius: 14px; background: var(--kort2); flex: 1 1 260px; min-width: 0; }
.side--portefolje .pf-modus button { flex: 1; min-height: 40px; padding: 0 10px; border: 0; border-radius: 11px; background: none; font-weight: 600; font-size: 14.5px; color: var(--dempet); white-space: nowrap; }
.side--portefolje .pf-modus button[aria-pressed="true"] { background: #fff; color: var(--tekst); box-shadow: 0 0 0 1px var(--hair); }
.side--portefolje .pf-merke { font-size: 11px; font-weight: 650; color: var(--bla); background: var(--bla-blek); border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: 1px; }
.side--portefolje .pf-kjop { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 24px; border-radius: 14px; background: #1B7F48; color: #fff; font-weight: 700; font-size: 16px; flex: 1 1 140px; }
.side--portefolje .pf-kjop:hover { filter: brightness(1.06); }
.side--portefolje .pf-forklaring { color: var(--tekst2); font-size: 15.5px; margin: 12px 0 18px; }

/* Banner (gjest / uten Premium) */
.side--portefolje .pf-banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 16px; }
.side--portefolje .pf-banner > div { flex: 1; min-width: 0; }
.side--portefolje .pf-banner b { font-weight: 650; }
.side--portefolje .pf-banner p { font-size: 14.5px; color: var(--tekst2); margin-top: 2px; }
.side--portefolje .pf-banner button { flex: none; }
@media (max-width: 520px) { .side--portefolje .pf-banner { flex-direction: column; align-items: stretch; } .side--portefolje .pf-banner button { min-height: 44px; } }

/* Den blå flaten med nøkkeltallene */
.side--portefolje .pf-tall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.side--portefolje .pf-tall .preg-flis { padding: 14px; display: grid; gap: 3px; align-content: start; min-width: 0; }
.side--portefolje .pf-tall small { font-size: 13px; font-weight: 600; color: var(--dempet); }
.side--portefolje .pf-tall b { font-size: 22px; font-weight: 750; letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side--portefolje .pf-tall span { font-size: 13px; color: var(--dempet); }
.side--portefolje .pf-tall span.opp { color: var(--gronn); } .side--portefolje .pf-tall span.ned { color: var(--rod); }
.side--portefolje .pf-tall--fem .preg-flis:last-child { grid-column: 1 / -1; }

/* Graf + høyre kolonne */
.side--portefolje .pf-rutenett { display: grid; gap: 16px; margin-top: 16px; }
.side--portefolje .pf-rutenett > * { min-width: 0; }
.side--portefolje .pf-graf { padding: 16px 16px 14px; position: relative; }
.side--portefolje .pf-graf__topp { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.side--portefolje .pf-graf__endr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 4px; min-height: 24px; }
.side--portefolje .pf-graf__endr b { font-size: 18px; font-weight: 750; white-space: nowrap; }
.side--portefolje .pf-graf__endr span { color: var(--dempet); font-size: 14px; }
.side--portefolje .pf-perioder { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.side--portefolje .pf-perioder::-webkit-scrollbar { display: none; }
.side--portefolje .pf-perioder button { min-height: 34px; min-width: 44px; padding: 0 10px; border: 0; border-radius: 9px; background: none; font-weight: 600; font-size: 14px; color: var(--dempet); white-space: nowrap; }
.side--portefolje .pf-perioder button[aria-pressed="true"] { background: var(--tekst); color: #fff; }
.side--portefolje .pf-graf__inn { position: relative; }
.side--portefolje .pf-graf__inn .graf__flate { position: relative; height: 200px; }
.side--portefolje .pf-graf__inn .graf__flate svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.side--portefolje .pf-graf__inn .graf__tips { position: absolute; top: -6px; transform: translate(-50%, -100%); background: var(--marine); color: #fff; font-size: 13px; padding: 4px 9px; border-radius: 8px; white-space: nowrap; pointer-events: none; }
.side--portefolje .pf-graf__inn .graf__bunn { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; font-size: 13px; color: var(--dempet); }
.side--portefolje .pf-graf__laas { position: absolute; left: 16px; right: 16px; top: 50%; transform: translateY(-50%); margin: 0; }
.side--portefolje .pf-merk { font-size: 13px; color: var(--dempet); margin-top: 10px; }
.side--portefolje .pf-merk--inn { padding: 0 16px 14px; margin-top: 8px; }
.side--portefolje .pf-hoyre { display: grid; gap: 16px; align-content: start; }
.side--portefolje .pf-ford, .side--portefolje .pf-regn { padding: 18px; }
.side--portefolje .pf-ford__inn { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.side--portefolje .pf-ring { width: 92px; height: 92px; flex: none; transform: rotate(-90deg); }
.side--portefolje .pf-ford ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1; min-width: 0; }
.side--portefolje .pf-ford li { display: flex; align-items: center; gap: 8px; font-size: 14.5px; min-width: 0; }
.side--portefolje .pf-ford li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.side--portefolje .pf-ford li i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.side--portefolje .pf-ford li b { font-weight: 650; white-space: nowrap; }
.side--portefolje .pf-linje, .ark--portefolje .pf-linje { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: 15px; }
.side--portefolje .pf-linje small, .ark--portefolje .pf-linje small { display: block; font-size: 12.5px; color: var(--dempet); margin-top: 2px; }
.side--portefolje .pf-linje b, .ark--portefolje .pf-linje b { white-space: nowrap; font-weight: 650; }
.side--portefolje .pf-linje--sum, .ark--portefolje .pf-linje--sum { border-bottom: 0; font-weight: 700; }
.side--portefolje .pf-regn .pf-linje:first-of-type { margin-top: 6px; }

/* Tabellkortet med faner */
.side--portefolje .pf-tabell { margin-top: 16px; overflow: hidden; }
.side--portefolje .pf-faner { display: flex; gap: 2px; padding: 0 8px; border-bottom: 1px solid var(--hair); overflow-x: auto; scrollbar-width: none; }
.side--portefolje .pf-faner::-webkit-scrollbar { display: none; }
.side--portefolje .pf-faner button { position: relative; min-height: 48px; padding: 0 10px; border: 0; background: none; font-weight: 600; font-size: 15px; color: var(--dempet); white-space: nowrap; }
.side--portefolje .pf-faner button span { margin-left: 3px; font-size: 12px; padding: 2px 7px; border-radius: 999px; background: var(--kort2); }
.side--portefolje .pf-faner button[aria-selected="true"] { color: var(--tekst); }
.side--portefolje .pf-faner button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--tekst); border-radius: 2px; }
.side--portefolje .pf-tab { display: none; }
.side--portefolje .pf-liste { display: grid; }
.side--portefolje .pf-mrad { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 16px; border: 0; background: none; text-align: left; width: 100%; color: inherit; }
.side--portefolje .pf-mrad + .pf-mrad { border-top: 1px solid var(--hair); }
.side--portefolje .pf-mrad--penger { grid-template-columns: minmax(0, 1fr) auto; }
.side--portefolje .pf-mrad__navn { min-width: 0; }
.side--portefolje .pf-mrad__navn b { display: block; font-weight: 650; overflow-wrap: anywhere; }
.side--portefolje .pf-mrad__navn small { display: block; font-size: 13.5px; color: var(--dempet); margin-top: 1px; }
.side--portefolje .pf-mrad__tall { display: grid; justify-items: end; gap: 4px; }
.side--portefolje .pf-mrad__tall b { font-weight: 650; white-space: nowrap; }
.side--portefolje .pf-tom { padding: 22px 16px; display: grid; gap: 6px; }
.side--portefolje .pf-tom > b { font-weight: 650; font-size: 16px; }
.side--portefolje .pf-tom p { color: var(--tekst2); font-size: 15px; }
.side--portefolje .pf-steg { list-style: none; margin: 8px 0 6px; padding: 0; display: grid; gap: 12px; counter-reset: steg; }
.side--portefolje .pf-steg li { counter-increment: steg; display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; }
.side--portefolje .pf-steg li::before { content: counter(steg); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; background: var(--bla-blek); color: var(--bla); font-weight: 700; display: grid; place-items: center; }
.side--portefolje .pf-steg b { font-weight: 600; }
.side--portefolje .pf-steg small { color: var(--dempet); font-size: 14px; }
.side--portefolje .pf-tom__knapp { margin-top: 8px; }
.side--portefolje .pf-ordreliste, .side--portefolje .pf-txliste { display: grid; }
.side--portefolje .pf-ordre, .side--portefolje .pf-tx { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; }
.side--portefolje .pf-ordre + .pf-ordre, .side--portefolje .pf-tx + .pf-tx { border-top: 1px solid var(--hair); }
.side--portefolje .pf-ordre__tekst, .side--portefolje .pf-tx__tekst { min-width: 0; }
.side--portefolje .pf-ordre b, .side--portefolje .pf-tx b { font-weight: 650; overflow-wrap: anywhere; }
.side--portefolje .pf-ordre small, .side--portefolje .pf-tx small { display: block; font-size: 13.5px; color: var(--dempet); margin-top: 2px; }
.side--portefolje .pf-tx__tall { text-align: right; }
.side--portefolje .pf-tx__tall b { white-space: nowrap; }
.side--portefolje .pf-selalle { display: block; padding: 12px 16px 14px; border-top: 1px solid var(--hair); font-weight: 600; }
.side--portefolje .pf-kn { min-height: 36px; min-width: 58px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--marine); color: #fff; font-weight: 650; font-size: 14px; white-space: nowrap; }
.side--portefolje .pf-kn + .pf-kn { margin-left: 6px; }
.side--portefolje .pf-kn--kjop { background: #1B7F48; }
.side--portefolje .pf-kn--selg { background: #C2362B; }
.side--portefolje .pf-kn--lys { background: #fff; color: var(--tekst); box-shadow: inset 0 0 0 1px rgb(21 26 38 / .16); }
.side--portefolje .pf-kn:hover { filter: brightness(1.06); }
.side--portefolje .pf-venter { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 14px 16px; text-align: left; background: #FBF6EC; border-color: rgb(180 120 30 / .22); color: inherit; }
.side--portefolje .pf-venter span { flex: 1; min-width: 0; }
.side--portefolje .pf-venter b { font-weight: 650; display: block; }
.side--portefolje .pf-venter small { display: block; font-size: 13.5px; color: var(--dempet); margin-top: 2px; }

/* Markedsstatus */
.side--portefolje .pf-mstatus { margin-top: 16px; padding: 8px 16px; display: grid; }
.side--portefolje .pf-mstatus__rad { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 9px 0; font-size: 14.5px; color: var(--tekst2); }
.side--portefolje .pf-mstatus__rad + .pf-mstatus__rad { border-top: 1px solid var(--hair); }
.side--portefolje .pf-mstatus__rad b { font-weight: 650; color: var(--tekst); }
.side--portefolje .pf-mstatus__kurs { justify-content: space-between; color: var(--dempet); font-size: 13.5px; }
.side--portefolje .pf-mstatus__knapper { padding: 8px 0 10px; border-top: 1px solid var(--hair); }
.side--portefolje .pf-mstatus__knapper .knapp { width: auto; min-height: 42px; }
.side--portefolje .pf-prikk { width: 8px; height: 8px; border-radius: 50%; background: #9AA0AC; flex: none; }
.side--portefolje .pf-prikk.paa { background: var(--gronn); }

/* Mer å øve med + verktøy */
.side--portefolje .pf-sp { display: grid; gap: 12px; }
.side--portefolje .pf-laerflis, .side--portefolje .pf-belonn { display: grid; gap: 6px; padding: 18px; color: inherit; align-content: start; }
.side--portefolje .pf-laerflis b, .side--portefolje .pf-belonn > b { font-weight: 650; font-size: 16px; }
.side--portefolje .pf-laerflis p { color: var(--tekst2); font-size: 14.5px; }
.side--portefolje .pf-laerflis__belop { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.side--portefolje .pf-laerflis__belop strong { font-size: 28px; font-weight: 750; letter-spacing: -.02em; color: var(--gronn); }
.side--portefolje .pf-laerflis__belop span { color: var(--dempet); font-size: 14px; }
.side--portefolje a.pf-laerflis:hover, .side--portefolje .pf-inngangsrad:hover { border-color: var(--kant); }
.side--portefolje .pf-belonn__tall { font-size: 28px; font-weight: 750; letter-spacing: -.02em; }
.side--portefolje .pf-belonn__liste { list-style: none; margin: 4px 0 0; padding: 0; display: grid; }
.side--portefolje .pf-belonn__liste li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--hair); font-size: 14px; color: var(--tekst2); }
.side--portefolje .pf-belonn__liste b { font-weight: 600; color: var(--tekst); white-space: nowrap; }
.side--portefolje .pf-inngang { display: grid; gap: 10px; }
.side--portefolje .pf-inngangsrad { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: inherit; }
.side--portefolje .pf-inngangsrad span { flex: 1; min-width: 0; }
.side--portefolje .pf-inngangsrad b { display: block; font-weight: 650; }
.side--portefolje .pf-inngangsrad small { display: block; font-size: 14px; color: var(--dempet); margin-top: 2px; }
.side--portefolje .pf-inngangsrad svg { color: var(--dempet); }
.side--portefolje .pf-bunn { font-size: 13px; color: var(--dempet); margin-top: 28px; line-height: 1.6; }

/* Markedsoversikten */
.side--portefolje .pf-markedlaas { margin: 16px 0 0; }
.side--portefolje .pf-sok { margin-top: 16px; }
.side--portefolje .pf-filter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 3px; background: var(--kort2); border-radius: 999px; margin-top: 12px; }
.side--portefolje .pf-filter button { border: 0; background: none; min-height: 40px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--tekst2); padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side--portefolje .pf-filter button[aria-pressed="true"] { background: #fff; color: var(--tekst); box-shadow: 0 0 0 1px var(--hair); }
.side--portefolje .pf-markedliste { margin-top: 10px; overflow: hidden; }
.side--portefolje .pf-mkrad { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; }
.side--portefolje .pf-mkrad + .pf-mkrad { border-top: 1px solid var(--hair); }
.side--portefolje .pf-mkrad__aksje { display: flex; align-items: center; gap: 12px; min-width: 0; border: 0; background: none; padding: 0; text-align: left; color: inherit; }
.side--portefolje .pf-mkrad__aksje span { min-width: 0; }
.side--portefolje .pf-mkrad__aksje b { display: block; font-weight: 650; overflow-wrap: anywhere; }
.side--portefolje .pf-mkrad__aksje small { display: block; font-size: 13px; color: var(--dempet); margin-top: 1px; overflow-wrap: anywhere; }
.side--portefolje .pf-mkrad__tall { display: grid; justify-items: end; gap: 3px; }
.side--portefolje .pf-mkrad__tall b { font-weight: 650; white-space: nowrap; font-size: 15px; }
.side--portefolje .pf-mkrad__tall .lapp { min-width: 0; font-size: 13px; padding: 2px 7px; }
.side--portefolje .pf-flere { display: block; width: 100%; min-height: 50px; border: 0; border-top: 1px solid var(--hair); background: none; color: var(--bla); font-weight: 600; }
@media (max-width: 420px) {
  .side--portefolje .pf-mkrad { grid-template-columns: minmax(0, 1fr) auto; }
  .side--portefolje .pf-mkrad > .pf-kn { grid-column: 1 / -1; justify-self: stretch; min-height: 40px; }
  .side--portefolje .pf-mkrad__aksje .flislogo { --str: 36px !important; }
}

/* Alle handler */
.side--portefolje .pf-forste { margin-top: 12px; }

/* Investeringsloggen */
.side--portefolje .pf-loggrutenett { display: grid; gap: 16px; margin-top: 16px; }
.side--portefolje .pf-loggrutenett > * { min-width: 0; }
.side--portefolje .pf-loggskjema { padding: 18px; }
.side--portefolje .pf-loggskjema h2, .side--portefolje .pf-loggliste h2 { margin-bottom: 12px; }
.side--portefolje .pf-loggskjema .skjema { display: grid; gap: 12px; }
.side--portefolje .pf-skjema2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.side--portefolje .pf-skjema2 .felt:first-child { grid-column: 1 / -1; }
.side--portefolje .felt small { font-size: 12px; color: var(--dempet); margin-top: -4px; }
.side--portefolje .felt select { appearance: auto; }
.side--portefolje .pf-logg { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 10px; align-items: center; padding: 14px 16px; }
.side--portefolje .pf-logg + .pf-logg { border-top: 1px solid var(--hair); }
.side--portefolje .pf-logg__retning { grid-column: 1 / 2; font-size: 12.5px; font-weight: 650; }
.side--portefolje .pf-logg__hode { grid-column: 1 / 2; min-width: 0; }
.side--portefolje .pf-logg__hode b { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.side--portefolje .pf-logg__hode small { margin-left: 8px; color: var(--dempet); font-size: 13px; }
.side--portefolje .pf-logg__priser { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--dempet); }
.side--portefolje .pf-logg__priser b { color: var(--tekst); font-weight: 600; }
.side--portefolje .pf-logg__utfall { grid-row: 1 / 3; grid-column: 2; font-size: 13px; font-weight: 650; border-radius: 8px; padding: 3px 9px; background: var(--kort2); color: var(--tekst2); white-space: nowrap; }
.side--portefolje .pf-utfall--win { background: rgb(21 128 61 / .1); color: var(--gronn); }
.side--portefolje .pf-utfall--loss { background: rgb(185 28 28 / .08); color: var(--rod); }
.side--portefolje .pf-logg__slett { grid-row: 1 / 3; grid-column: 3; width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; display: grid; place-items: center; color: var(--dempet); }
.side--portefolje .pf-logg__slett:hover { background: var(--kort2); color: var(--rod); }
.side--portefolje .pf-logg__slett svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.side--portefolje .pf-logg__notat { grid-column: 1 / -1; font-size: 14.5px; color: var(--tekst2); background: var(--bg); border-radius: 10px; padding: 8px 10px; overflow-wrap: anywhere; white-space: pre-wrap; }
.side--portefolje .pf-prinsipper { display: grid; gap: 10px; }
.side--portefolje .pf-prinsipp { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 16px; }
.side--portefolje .pf-prinsipp > span { font-size: 15px; font-weight: 700; color: var(--bla); }
.side--portefolje .pf-prinsipp b { font-weight: 650; }
.side--portefolje .pf-prinsipp p { font-size: 14.5px; color: var(--tekst2); margin-top: 4px; }

/* ---------- Nettbrett ---------- */
@media (min-width: 640px) {
  .side--portefolje .pf-tall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .side--portefolje .pf-tall--fem { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .side--portefolje .pf-tall--fem .preg-flis:last-child { grid-column: auto; }
  .side--portefolje .pf-sp, .side--portefolje .pf-prinsipper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side--portefolje .pf-graf__topp { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}
@media (min-width: 640px) and (max-width: 900px) {
  .side--portefolje .pf-tall b { font-size: 19px; }
  .side--portefolje .pf-tall .preg-flis { padding: 12px; }
}
@media (min-width: 768px) {
  .side--portefolje .pf-rutenett { grid-template-columns: minmax(0, 1fr) minmax(260px, 300px); align-items: stretch; }
  .side--portefolje .pf-hode { flex-direction: row; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
  .side--portefolje .pf-handl { flex: 0 1 auto; flex-wrap: nowrap; }
  .side--portefolje .pf-modus, .side--portefolje .pf-kjop { flex: none; }
  .side--portefolje .pf-loggrutenett { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
}

/* ---------- PC (som pc-skisser/portefolje.html) ---------- */
@media (min-width: 1024px) {
  .side--portefolje .pf-tilbake--mer { display: none; }
  .side--portefolje .pf-tall { gap: 12px; }
  .side--portefolje .pf-tall .preg-flis { padding: 18px 20px; gap: 6px; }
  .side--portefolje .pf-tall b { font-size: 26px; }
  .side--portefolje .pf-rutenett { grid-template-columns: minmax(0, 8fr) minmax(280px, 4fr); gap: 20px; margin-top: 20px; }
  .side--portefolje .pf-graf { padding: 20px 22px; }
  .side--portefolje .pf-graf__inn .graf__flate { height: 300px; }
  .side--portefolje .pf-hoyre { gap: 20px; }
  .side--portefolje .pf-ford, .side--portefolje .pf-regn { padding: 20px 22px; }
  .side--portefolje .pf-ring { width: 104px; height: 104px; }
  .side--portefolje .pf-tabell { margin-top: 20px; }
  .side--portefolje .pf-faner { padding: 0 14px; }
  .side--portefolje .pf-tab { display: table; width: 100%; border-collapse: collapse; }
  .side--portefolje .pf-tabell .pf-liste, .side--portefolje .pf-tabell .pf-merk--inn:not(.pf-merk--ordre) { display: none; }
  .side--portefolje .pf-tabell .pf-ordreliste + .pf-merk--inn { display: block; }
  .side--portefolje .pf-tab th { padding: 12px 12px; font-size: 12.5px; font-weight: 600; color: var(--dempet); text-align: left; white-space: nowrap; border-bottom: 1px solid var(--hair); vertical-align: bottom; }
  .side--portefolje .pf-tab th small { display: block; font-weight: 500; font-size: 11px; opacity: .8; }
  .side--portefolje .pf-tab td { padding: 12px; border-bottom: 1px solid var(--hair); font-size: 15px; white-space: nowrap; vertical-align: middle; }
  .side--portefolje .pf-tab td small { display: block; font-size: 12.5px; color: var(--dempet); margin-top: 2px; }
  .side--portefolje .pf-tab td small.opp { color: var(--gronn); } .side--portefolje .pf-tab td small.ned { color: var(--rod); }
  .side--portefolje .pf-tab .t { text-align: right; }
  .side--portefolje .pf-tab th:first-child, .side--portefolje .pf-tab td:first-child { padding-left: 22px; }
  .side--portefolje .pf-tab th:last-child, .side--portefolje .pf-tab td:last-child { padding-right: 22px; }
  .side--portefolje .pf-tab td:first-child { white-space: normal; }
  .side--portefolje .pf-rad { cursor: pointer; }
  .side--portefolje .pf-rad:hover, .side--portefolje .pf-rad:focus-visible { background: #F7F7F4; outline: none; }
  .side--portefolje .pf-navn { display: flex; align-items: center; gap: 12px; min-width: 0; }
  .side--portefolje .pf-navn b { font-weight: 700; }
  .side--portefolje .pf-tab tfoot td { color: var(--dempet); font-weight: 600; }
  .side--portefolje .pf-tab tfoot td b { color: var(--tekst); }
  .side--portefolje .pf-tab tfoot .sum td { border-bottom: 0; color: var(--tekst); font-weight: 700; }
  .side--portefolje .pf-sp { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side--portefolje .pf-inngang { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .side--portefolje .pf-mstatus { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; column-gap: 20px; padding: 6px 22px; }
  .side--portefolje .pf-mstatus__rad + .pf-mstatus__rad { border-top: 0; }
  .side--portefolje .pf-mstatus__kurs { grid-column: 1 / -1; border-top: 1px solid var(--hair) !important; }
  .side--portefolje .pf-mstatus__knapper { border-top: 0; padding: 6px 0; align-self: center; }
}
@media (min-width: 1280px) { .side--portefolje .pf-prinsipper { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) and (max-width: 1240px) {
  .side--portefolje .pf-tab th:nth-child(3), .side--portefolje .pf-tab td:nth-child(3) { display: none; }
  .side--portefolje .pf-tall b { font-size: 22px; }
}
@media (min-width: 1024px) and (max-width: 1140px) {
  .side--portefolje .pf-tab th:nth-child(5), .side--portefolje .pf-tab td:nth-child(5) { display: none; }
}

/* ---------- Kjøp/selg-arket og «Start på nytt» ---------- */
.ark--portefolje .pfa { display: grid; gap: 10px; }
.ark--portefolje .pfa h2 { font-size: 22px; letter-spacing: -.02em; }
.ark--portefolje .pfa__hode { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.ark--portefolje .pfa__navn { min-width: 0; }
.ark--portefolje .pfa__navn h2 { font-size: 20px; overflow-wrap: anywhere; }
.ark--portefolje .pfa__navn small { display: block; font-size: 13px; color: var(--dempet); overflow-wrap: anywhere; }
.ark--portefolje .pfa__kurs { display: grid; justify-items: end; gap: 3px; }
.ark--portefolje .pfa__kurs b { font-size: 18px; font-weight: 750; white-space: nowrap; }
.ark--portefolje .pfa__graf { padding: 12px 12px 8px; }
.ark--portefolje .pfa__graf .graf__flate { position: relative; }
.ark--portefolje .pfa__graf .graf__flate svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ark--portefolje .pfa__graf .graf__tips { position: absolute; top: -6px; transform: translate(-50%, -100%); background: var(--marine); color: #fff; font-size: 12.5px; padding: 3px 8px; border-radius: 8px; white-space: nowrap; pointer-events: none; }
.ark--portefolje .pfa__graf .graf__bunn { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 10px; margin-top: 8px; font-size: 12.5px; color: var(--dempet); }
.ark--portefolje .pfa__graf .perioder { display: flex; gap: 2px; margin-top: 6px; }
.ark--portefolje .pfa__graf .perioder button { border: 0; background: none; min-height: 32px; padding: 0 8px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--dempet); }
.ark--portefolje .pfa__graf .perioder button[aria-pressed="true"] { background: var(--tekst); color: #fff; }
.ark--portefolje .pfa__graf .opp { color: var(--gronn); } .ark--portefolje .pfa__graf .ned { color: var(--rod); }
.ark--portefolje .pfa__seg { margin: 0; }
.ark--portefolje .pfa__etikett { font-size: 13.5px; font-weight: 600; color: var(--tekst2); margin-top: 2px; }
.ark--portefolje .pfa__linje { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; color: var(--tekst2); padding: 4px 2px; }
.ark--portefolje .pfa__linje b { color: var(--tekst); font-weight: 650; white-space: nowrap; }
.ark--portefolje .pfa__antall { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; gap: 8px; }
.ark--portefolje .pfa__antall button { min-height: 48px; border: 1px solid var(--kant); border-radius: 14px; background: #fff; font-size: 22px; font-weight: 500; }
.ark--portefolje .pfa__antall input, .ark--portefolje .pfa__limit { width: 100%; min-height: 48px; border: 1px solid var(--kant); border-radius: 14px; background: #fff; font: 600 18px var(--skrift); text-align: center; color: var(--tekst); }
.ark--portefolje .pfa__antall input:focus, .ark--portefolje .pfa__limit:focus { outline: 2px solid var(--bla); border-color: transparent; }
.ark--portefolje .pfa__valg { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.ark--portefolje .pfa__valg button { min-height: 38px; border: 0; border-radius: 10px; background: var(--kort2); font-weight: 600; font-size: 14px; color: var(--tekst2); padding: 0; }
.ark--portefolje .pfa__valg button:hover { color: var(--tekst); }
.ark--portefolje .pfa__hint { font-size: 13px; color: var(--dempet); margin-top: 6px; }
.ark--portefolje .pfa__sum { padding: 2px 14px; }
.ark--portefolje .pfa__feil { color: var(--rod); font-size: 14.5px; font-weight: 550; }
.ark--portefolje .pfa__ok { background: #1B7F48; }
.ark--portefolje .pfa__ok--selg { background: #C2362B; }
.ark--portefolje .pfa__ok:disabled { background: var(--kort2); color: var(--dempet); cursor: not-allowed; }
.ark--portefolje .pfa__om { justify-self: center; }
.ark--portefolje .merknad { margin-top: 0; }
@media (max-width: 420px) {
  .side--portefolje .pf-faner { padding: 0 4px; }
  .side--portefolje .pf-faner button { padding: 0 8px; font-size: 14.5px; }
  .side--portefolje .pf-faner button span { padding: 2px 6px; }
}
