/* Grafik för artikeln Omställningen behöver kärnkraft. Allt utom :root är avgränsat under .nnk.
   Färgvariablerna läses av grafik.js och måste därför ligga på :root. */
:root {
  --panel: #0E3B2C; --p-raise: #134634; --p-line: #2B5A49; --p-ink: #FFFFFF; --p-ink2: #A8C9B9;
  --volt: #8FD1B0; --bad: #F08A7E;
  --s1: #4C9BF0; --s2: #E8743B; --s3: #3CC48A; --s4: #D9A23A; --s5: #D86A9A; --flex: #9DB3A8;
}
.nnk canvas { display: block; width: 100%; }
.nnk .num { font-variant-numeric: tabular-nums; }
.nnk-lede { font-size: 21px; line-height: 1.5; font-weight: 500; color: var(--ink); }
.nnk-kicker { margin: 56px 0 8px !important; font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.nnk-kicker + h2 { margin-top: 0 !important; }
.nnk-sec > h2:first-child { margin-top: 56px; }
.nnk-after { margin-top: 24px; }

/* Två stora siffror överst */
.nnk .duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 8px 0 8px; padding: 24px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.nnk .duo b { display: block; font-family: var(--display); font-weight: 600; font-size: clamp(56px, 12vw, 96px); line-height: .9; letter-spacing: -.035em; color: var(--forest); }
.nnk .duo b small { font-size: .45em; letter-spacing: 0; margin-left: .06em; }
.nnk .duo span { display: block; font-size: 15px; line-height: 1.35; color: var(--muted); margin-top: 10px; }
.nnk .meter { height: 6px; background: var(--line); margin-top: 12px; overflow: hidden; }
.nnk .meter i { display: block; height: 100%; }

/* Grafikpaneler */
.nnk-panel { margin: 28px 0 8px; background: var(--panel); color: var(--p-ink); padding: 20px; font-size: 15px; line-height: 1.45; }
.nnk-panel p { margin: 0; }
.nnk-panel h3 { font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.25; margin: 0 0 12px; color: #fff; }
.nnk-panel figcaption { font-size: 13.5px; line-height: 1.45; color: var(--p-ink2); margin-top: 14px; }
.nnk .legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--p-ink2); margin: 0 0 12px; }
.nnk .legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.nnk .legend i.dash { width: 14px; height: 0; border-top: 2px dashed var(--p-ink2); vertical-align: 3px; }

/* Flödet under topplasttimmen */
.nnk #peakflow { height: 350px; }
.nnk .pct { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; font-size: 13px; color: var(--p-ink2); }
.nnk .pct b { color: #fff; font-weight: 600; }

/* Kartan och elområdena */
.nnk .mapgrid { display: grid; grid-template-columns: minmax(136px, 45%) 1fr; gap: 12px; align-items: stretch; }
.nnk #map { aspect-ratio: .46; align-self: center; }
.nnk .zones { display: flex; flex-direction: column; justify-content: space-between; gap: 4px; min-width: 0; }
.nnk .zone { background: var(--p-raise); padding: 9px 10px; }
.nnk .zone .zn { display: flex; align-items: baseline; gap: 6px; font-family: var(--display); font-weight: 600; font-size: 17px; line-height: 1.1; }
.nnk .zone .zn small { font-family: var(--body); font-weight: 500; font-size: 12px; color: var(--p-ink2); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nnk .zr { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px; line-height: 1.2; color: var(--p-ink2); margin-top: 6px; }
.nnk .zr b { color: #fff; font-weight: 600; white-space: nowrap; }
.nnk .zr b.zp { color: var(--volt); }
.nnk .zb { height: 6px; margin-top: 3px; }
.nnk .zb.p { background-color: var(--s1); }
.nnk .zb.u { background: #fff; }
.nnk .snitt { font-size: 12px; line-height: 1.25; color: var(--p-ink2); text-align: center; padding: 1px 2px; }
.nnk .snitt b { color: #fff; font-weight: 600; white-space: nowrap; }
.nnk .punch { margin-top: 14px; border: 1.5px solid var(--volt); padding: 14px; }
.nnk .punch .pt { font-weight: 600; font-size: 15px; color: #fff; margin-bottom: 8px; }
.nnk .pr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: baseline; margin-top: 8px; }
.nnk .pr span { font-size: 14px; line-height: 1.3; color: var(--p-ink2); }
.nnk .pr b { font-weight: 600; font-size: 15px; color: #fff; white-space: nowrap; }
.nnk .pr .pb { grid-column: 1 / -1; height: 10px; overflow: hidden; }
.nnk .pr .pb i { display: block; height: 100%; width: 100%; }
.nnk .punch p { font-size: 14px; line-height: 1.45; color: #fff; margin-top: 12px; }

/* Stapeljämförelser */
.nnk .rows { display: grid; gap: 14px; }
.nnk .r .q { font-size: 14px; line-height: 1.35; color: #fff; margin-bottom: 6px; }
.nnk .b { display: grid; grid-template-columns: 1fr 52px; gap: 8px; align-items: center; margin-top: 4px; }
.nnk .b i { display: block; height: 14px; }
.nnk .b span { font-size: 14px; font-weight: 600; text-align: right; color: #fff; }
.nnk .gw .b { grid-template-columns: 124px 1fr 40px; }
.nnk .gw .b em { font-style: normal; font-size: 13.5px; color: var(--p-ink2); line-height: 1.2; }
.nnk .gw .tr { position: relative; }
.nnk .gw .tr::after { content: ""; position: absolute; left: 46.67%; top: -5px; bottom: -5px; border-left: 2px dashed var(--p-ink2); opacity: .7; }

/* Prognosdiagrammet */
.nnk #trend { width: 100%; height: auto; display: block; }
.nnk #trend text { font-family: var(--body); fill: var(--p-ink2); font-size: 10.5px; }
.nnk #trend .big { font-weight: 700; font-size: 13px; fill: #fff; }
.nnk #trend .halo { paint-order: stroke; stroke: var(--panel); stroke-width: 4px; stroke-linejoin: round; }
.nnk #trend .fc { animation: nnk-march 1.1s linear infinite; }
.nnk #trend .ring { transform-box: fill-box; transform-origin: center; animation: nnk-ring 2.4s ease-out infinite; }
@keyframes nnk-march { to { stroke-dashoffset: -18; } }
@keyframes nnk-ring { from { transform: scale(1); opacity: .8; } to { transform: scale(4.2); opacity: 0; } }
.nnk .readout { font-size: 14px; color: #fff; margin-top: 6px; min-height: 21px; }
.nnk .keylist { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13px; color: var(--p-ink2); display: grid; gap: 3px; }
.nnk .keylist b { display: inline-block; min-width: 34px; color: #fff; font-weight: 700; }

/* 59 till 141 */
.nnk .finale { margin: 24px 0 8px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.nnk .finale div b { display: block; font-family: var(--display); font-weight: 600; font-size: clamp(56px, 14vw, 104px); line-height: .88; letter-spacing: -.035em; color: var(--forest); }
.nnk .finale div span { display: block; max-width: 11ch; font-size: 14px; line-height: 1.3; color: var(--muted); margin-top: 6px; }
.nnk .finale svg { width: 100%; height: 26px; color: var(--accent); margin-bottom: 22px; }
.nnk .finale svg line { animation: nnk-march .9s linear infinite; }

/* Listor */
.nnk .sum, .nnk .steps { margin: 8px 0 20px; padding-left: 1.3em; }
.nnk .sum li, .nnk .steps li { margin-bottom: 10px; padding-left: .2em; }
.nnk .sum li::marker { color: var(--accent); }
.nnk .steps li::marker { font-family: var(--display); font-weight: 600; color: var(--accent); }
.nnk .steps li b { font-weight: 600; color: var(--ink); }
.nnk > ul:last-child { font-size: 15px; line-height: 1.5; color: var(--muted); padding-left: 1.2em; }
.nnk > ul:last-child li { margin-bottom: 6px; }

/* Ljusreflex som löper längs staplarna */
@keyframes nnk-run { from { background-position: -40px 0; } to { background-position: calc(100% + 40px) 0; } }
.nnk .meter i, .nnk .b i, .nnk .zb.p, .nnk .pr .pb i {
  background-image: linear-gradient(90deg, transparent 0, rgba(255,255,255,.45) 50%, transparent 100%);
  background-repeat: no-repeat; background-size: 36px 100%;
  animation: nnk-run 2.6s linear infinite;
}
.nnk .zb.p { animation-duration: 2.2s; }

@media (min-width: 640px) {
  .nnk .mapgrid { grid-template-columns: 300px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .nnk #trend .fc, .nnk #trend .ring, .nnk .finale svg line, .nnk .meter i, .nnk .b i, .nnk .zb.p, .nnk .pr .pb i { animation: none; }
}
