/* Grafik för artikeln Skatt på skatten. Allt är avgränsat under .nns.
   Samma panelfärger som artikeln om kärnkraft: mörkgrön yta, vit text. */
.nns {
  --panel: #0E3B2C; --p-raise: #134634; --p-line: #2B5A49; --p-ink: #FFFFFF; --p-ink2: #A8C9B9;
  --c-el: #4C9BF0; --c-nat: #3CC48A; --c-skatt: #D9A23A; --c-moms: #D86A9A; --c-kpi: #9DB3A8;
  --paper: #FBFAF5; --paper-ink: #1A1A18; --paper-2: #66655F; --mark: #FFE24A; --stamp: #C8281E;
}
.nns .num { font-variant-numeric: tabular-nums; }
.nns-lede { font-size: 21px; line-height: 1.5; font-weight: 500; color: var(--ink); }
.nns-kicker { margin: 56px 0 8px !important; font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.nns-kicker + h2 { margin-top: 0 !important; }
.nns-after { margin-top: 24px; }

/* Två stora siffror överst */
.nns .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); }
.nns .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); }
.nns .duo b small { font-size: .45em; letter-spacing: 0; margin-left: .06em; }
.nns .duo span { display: block; font-size: 15px; line-height: 1.35; color: var(--muted); margin-top: 10px; }
.nns .meter { height: 6px; background: var(--line); margin-top: 12px; overflow: hidden; }
.nns .meter i { display: block; height: 100%; background: var(--c-skatt); }

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

/* Knappar */
.nns .chips, .nns .views { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.nns .chips button, .nns .views button { font: 600 14px var(--body); padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--p-line); background: transparent; color: #fff; cursor: pointer; }
.nns .views button { font-size: 13px; padding: 5px 11px; }
.nns .chips button[aria-pressed="true"], .nns .views button[aria-pressed="true"] { background: #fff; border-color: #fff; color: var(--forest); }

/* Kvittot */
.nns .receipt { position: relative; max-width: 420px; margin: 18px auto 14px; background: var(--paper); color: var(--paper-ink); font-family: var(--mono); font-size: 14px; line-height: 1.45; padding: 22px 18px 26px; transform: rotate(-.6deg); box-shadow: 0 14px 28px -16px rgba(0,0,0,.6); }
.nns .receipt::before, .nns .receipt::after { content: ""; position: absolute; left: 0; right: 0; height: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8'%3E%3Cpath d='M0 8 7 0 14 8z' fill='%23FBFAF5'/%3E%3C/svg%3E") repeat-x; }
.nns .receipt::before { top: -8px; }
.nns .receipt::after { bottom: -8px; transform: scaleY(-1); }
.nns .r-head { text-align: center; font-weight: 700; letter-spacing: .08em; }
.nns .r-sub { text-align: center; color: var(--paper-2); font-size: 13px; margin-top: 2px; }
.nns .r-rule { border: 0; border-top: 1.5px dashed var(--paper-ink); margin: 12px 0; opacity: .55; }
.nns .rrow { display: flex; align-items: baseline; gap: 6px; padding: 2px 4px; margin: 0 -4px; }
.nns .rrow .l { flex: 0 1 auto; min-width: 0; }
.nns .rrow .l small { display: block; font-size: 12px; color: var(--paper-2); }
.nns .rrow .d { flex: 1 1 12px; border-bottom: 1.5px dotted var(--paper-2); opacity: .6; transform: translateY(-4px); min-width: 12px; }
.nns .rrow .a { flex: 0 0 auto; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nns .rrow.hot { background: var(--mark); font-weight: 700; }
.nns .rrow.hot .l small { color: var(--paper-ink); }
.nns .rrow.sum { font-weight: 700; font-size: 17px; }
.nns .rrow.sum .d { border-bottom-style: solid; opacity: .9; }
.nns .stampwrap { height: 44px; position: relative; }
.nns .stamp { position: absolute; right: 2px; top: 5px; border: 2.5px solid var(--stamp); color: var(--stamp); font-weight: 700; font-size: 13px; letter-spacing: .14em; padding: 3px 9px 2px; border-radius: 4px; transform: rotate(-7deg); opacity: .88; }
.nns .split { display: flex; gap: 2px; height: 28px; margin-top: 12px; font-family: var(--body); font-size: 12.5px; font-weight: 600; }
.nns .split div { display: flex; align-items: center; padding: 0 8px; white-space: nowrap; overflow: hidden; min-width: 0; }
.nns .split .mk { background: #DAD9D1; color: var(--paper-ink); }
.nns .split .st { background: var(--forest); color: #fff; }

/* Diagram */
.nns .chart { width: 100%; display: block; touch-action: pan-y; }
.nns .chart text { font-family: var(--body); fill: var(--p-ink2); font-size: 11.5px; }
.nns .chart .big { font-weight: 700; font-size: 12.5px; fill: #fff; }
.nns .chart .halo { paint-order: stroke; stroke: var(--panel); stroke-width: 4px; stroke-linejoin: round; }
.nns .readout { font-size: 14px; line-height: 1.5; color: #fff; margin-top: 8px; min-height: 42px; }
.nns .readout i { display: inline-block; width: 9px; height: 9px; margin: 0 4px 0 10px; }
.nns .readout span { white-space: nowrap; }
.nns details { margin-top: 12px; font-size: 13.5px; color: var(--p-ink2); }
.nns summary { cursor: pointer; font-weight: 600; color: #fff; }
.nns .tbl { overflow-x: auto; margin-top: 8px; }
.nns table { border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; min-width: 420px; width: 100%; }
.nns th, .nns td { text-align: right; padding: 3px 8px; border-bottom: 1px solid var(--p-line); }
.nns th:first-child, .nns td:first-child { text-align: left; }
.nns th { color: #fff; font-weight: 600; }

.nns .tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.nns .tile { background: var(--p-raise); padding: 10px; }
.nns .tile b { display: block; font-family: var(--display); font-weight: 600; font-size: clamp(18px, 5.3vw, 28px); line-height: 1.05; white-space: nowrap; }
.nns .tile span { display: block; font-size: 12.5px; line-height: 1.3; color: var(--p-ink2); margin-top: 5px; }

@media (max-width: 560px) { .nns .tiles.stack { grid-template-columns: 1fr; } .nns .tiles.stack .tile b { font-size: 26px; } }

/* Pengarna går runt */
.nns .loop { display: block; width: 100%; max-width: 430px; margin: 0 auto 6px; }
.nns .loop text { font-family: var(--body); font-size: 12px; fill: var(--p-ink2); }
.nns .loop .nm { font-weight: 700; font-size: 13px; fill: #fff; }
.nns .ledger { display: grid; gap: 9px; margin-top: 6px; }
.nns .lr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: baseline; }
.nns .lr span { font-size: 14px; line-height: 1.3; color: var(--p-ink2); }
.nns .lr b { font-weight: 700; font-size: 15px; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nns .lr .bar { grid-column: 1 / -1; height: 12px; }
.nns .lr .bar i { display: block; height: 100%; }
.nns .lr.tot { border-top: 1px solid var(--p-line); padding-top: 9px; }
.nns .lr.tot span { color: #fff; font-weight: 600; }
.nns .lr.tot b { font-size: 19px; }
.nns .punch { margin-top: 14px; border: 1.5px solid var(--c-skatt); padding: 12px 14px; font-size: 14.5px; line-height: 1.45; color: #fff; }

/* Två grupper med skattesatser */
.nns .groups { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nns .grp { background: var(--p-raise); padding: 14px 16px; border-top: 4px solid var(--c-moms); }
.nns .grp.lo { border-top-color: var(--c-nat); }
.nns .grp .rate { margin: 0 0 8px; font-size: 14px; color: var(--p-ink2); }
.nns .grp .rate b { display: block; font-family: var(--display); font-weight: 600; font-size: 34px; line-height: 1.1; color: #fff; }
.nns .grp ul { list-style: none; margin: 0; padding: 0; }
.nns .grp li { margin: 0; padding: 7px 0; border-top: 1px solid var(--p-line); font-size: 15px; line-height: 1.35; color: #fff; }
@media (max-width: 520px) { .nns .groups { grid-template-columns: 1fr; } }

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

@media (max-width: 640px) {
  .nns .receipt { font-size: 13px; padding-inline: 14px; }
  .nns-panel { padding: 16px; margin-inline: -8px; }
}
@media (prefers-reduced-motion: reduce) {
  .nns .receipt { transform: none; }
}
