/* Roligt, lyst tema */
:root {
  color-scheme: light;
  --bg: #f5f3ee;          /* varm papirfarve */
  --surface: #ffffff;
  --surface2: #faf9f6;
  --border: #e2ded5;
  --border-strong: #cfc9bd;
  --text: #24272b;
  --muted: #6a6e74;
  --faint: #9a9da2;
  --accent: #2f6b61;      /* dæmpet grøn-blå til knapper og "dit forløb" */
  --accent-soft: #e5efec;
  --real: #b07a26;        /* betalinger (okker) */
  --fin: #00978b;         /* opsparing og lån (grøn-blå) */
  --pos: #3a70b0;         /* flere penge end ellers */
  --neg: #c2602f;         /* færre penge end ellers */
  --gold: #b07a26;        /* mål */
  --base-line: #9a9da2;
  --good-text: #2f7d4a; --good-bg: #e7f2ea;
  --warn-text: #8a6100; --warn-bg: #fbf1d9;
  --bad-text: #a4402a;  --bad-bg: #f8e6e0;
  --radius: 10px;
  font-family: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); min-height: 100vh; padding: 0 24px 24px; font-size: 14.5px; line-height: 1.5; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.005em; }
h2 { font-size: 16px; }
h3 { font-size: 14.5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
b { font-weight: 600; }
button { font: inherit; color: inherit; cursor: pointer; }
.pill { display: inline-block; font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 99px; background: var(--surface2); border: 1px solid var(--border); color: var(--muted); vertical-align: middle; margin-left: 6px; }

/* ---------- Topbar ---------- */
.topbar { display: flex; align-items: center; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 230px; }
.brand-logo { width: 34px; height: 34px; color: var(--accent); }
.brand-logo circle:last-child { fill: var(--real); }
.brand h1 { font-size: 19px; }
.brand .sub { margin: 0; color: var(--muted); font-size: 13px; }

.timeline { display: flex; list-style: none; margin: 0 auto; padding: 0; align-items: center; }
.timeline li { display: flex; align-items: center; }
.timeline .yr { display: grid; place-items: center; width: 54px; height: 28px; border-radius: 99px; font-weight: 500; font-size: 13px; color: var(--faint); border: 1px solid var(--border); background: var(--surface); }
.timeline .yr.done { color: var(--text); border-color: var(--border-strong); }
.timeline .yr.current { color: #fff; background: var(--accent); border-color: var(--accent); font-weight: 600; }
.timeline .bar { width: 20px; height: 1px; background: var(--border); }
.timeline .bar.done { background: var(--border-strong); }

.top-actions { display: flex; align-items: center; gap: 6px; }
.btn { border: 1px solid var(--border-strong); background: var(--surface); padding: 7px 13px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--text); }
.btn:hover { background: var(--surface2); border-color: var(--faint); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: #ece9e2; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; padding: 9px 18px; font-size: 14.5px; font-weight: 600; }
.btn.primary:hover { background: #275a52; }
.btn.primary:disabled { opacity: .45; cursor: default; }
.btn.icon { width: 32px; padding: 5px 0; }
.btn:focus-visible, .tab:focus-visible, .seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.select { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; padding: 5px 8px; color: var(--text); font: inherit; font-size: 13px; }

.score-btn { display: grid; grid-template-columns: 40px auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; background: transparent; border: 0; padding: 0 10px 0 0; text-align: left; }
.score-btn .ring { grid-row: 1 / 3; width: 40px; height: 40px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--border); stroke-width: 4; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: 113.1; transition: stroke-dashoffset .8s ease; }
.score-num { font-size: 19px; font-weight: 600; line-height: 1; }
.score-lbl { font-size: 11.5px; color: var(--muted); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px 10px; }
.kpi .k-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; gap: 6px; }
.kpi .k-val { font-size: 25px; font-weight: 600; margin: 4px 0 2px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi .k-val small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 3px; }
.kpi .k-sub { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); gap: 6px; }
.kpi .delta.up, .kpi .delta.down { color: var(--text); }
.kpi .meter { height: 4px; border-radius: 4px; background: #eeebe4; margin-top: 9px; overflow: hidden; }
.kpi .meter i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transition: width .8s ease; }
.status { font-size: 11.5px; padding: 1px 8px; border-radius: 99px; font-weight: 600; white-space: nowrap; }
.status.good { background: var(--good-bg); color: var(--good-text); }
.status.warn { background: var(--warn-bg); color: var(--warn-text); }
.status.bad { background: var(--bad-bg); color: var(--bad-text); }
.kpi.flash { animation: flash 1.4s ease; }
@keyframes flash { 0% { background: var(--accent-soft); } 100% { background: var(--surface); } }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.panel-head { padding: 14px 16px 8px; }
.panel-head.row { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.panel-head p { margin: 4px 0 0; }

/* ---------- Politik ---------- */
.policy { position: sticky; top: 16px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.policy-groups { overflow-y: auto; padding: 0 12px; flex: 1; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.group { border-top: 1px solid var(--border); }
.group:last-child { border-bottom: 1px solid var(--border); }
.group summary { list-style: none; cursor: pointer; padding: 11px 4px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 14px; }
.group summary::-webkit-details-marker { display: none; }
.group summary .chev { transition: transform .2s; color: var(--faint); }
.group[open] summary .chev { transform: rotate(90deg); }
.group summary .badge { font-size: 11px; background: var(--accent); color: #fff; border-radius: 99px; padding: 0 7px; margin-left: 6px; font-weight: 600; }
.instr { padding: 4px 4px 14px; }
.instr-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.instr-label { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.info { width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--border-strong); color: var(--muted); font-size: 10.5px; display: inline-grid; place-items: center; background: transparent; padding: 0; }
.info:hover { border-color: var(--accent); color: var(--accent); }
.instr-val { display: flex; align-items: center; gap: 4px; }
.instr-val input { width: 74px; text-align: right; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; color: var(--text); padding: 3px 6px; font: inherit; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.instr-val input.changed { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.instr-val .unit { font-size: 12px; color: var(--muted); min-width: 46px; }
.instr-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); margin-top: 1px; }
.instr-meta .cum { color: var(--muted); }
.instr-meta .cum b { color: var(--text); font-weight: 600; }
.instr-hint { font-size: 13px; color: var(--muted); background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 7px 9px; margin-top: 6px; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 3px 0 0; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--track, var(--border)); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--track, var(--border)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); margin-top: -6px; }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }
input[type=range]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.preview { margin: 10px 12px 0; padding: 10px 12px; border-radius: 8px; background: var(--surface2); border: 1px solid var(--border); }
.preview-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; margin-bottom: 6px; }
.preview-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.pv { text-align: center; }
.pv .l { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv .v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pv .d { font-size: 11px; font-variant-numeric: tabular-nums; }
.pv .d.better { color: var(--good-text); }
.pv .d.worse { color: var(--bad-text); }
.pv .d.same { color: var(--faint); }
.policy-actions { display: flex; justify-content: space-between; gap: 8px; padding: 12px; }
.policy-actions .primary { flex: 1; }

/* ---------- Kredsløb ---------- */
.circuit-panel { overflow: hidden; position: relative; }
.circuit-controls { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; margin: 0 4px; }
.toggle input { accent-color: var(--accent); }
.circuit-wrap { position: relative; width: 100%; aspect-ratio: 1000 / 660; }
.circuit-wrap svg, .circuit-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.circuit-wrap canvas { pointer-events: none; }
#circuit .flow-path { fill: none; stroke-linecap: round; transition: stroke-width .9s ease, opacity .3s; }
#circuit .flow-path.real { stroke: rgba(176, 122, 38, .16); }
#circuit .flow-path.fin { stroke: rgba(0, 151, 139, .14); }
#circuit .flow-hit { fill: none; stroke: transparent; stroke-width: 24; cursor: pointer; pointer-events: stroke; }
#circuit .flow-g:hover .flow-path.real, #circuit .flow-g.hl .flow-path.real { stroke: rgba(176, 122, 38, .38); }
#circuit .flow-g:hover .flow-path.fin, #circuit .flow-g.hl .flow-path.fin { stroke: rgba(0, 151, 139, .34); }
#circuit.dim .flow-g:not(.hl) { opacity: .25; }
#circuit .flow-g.off { opacity: 0; pointer-events: none; }
#circuit .arrow { opacity: .75; }
#circuit .flow-label { pointer-events: none; transition: opacity .3s; }
#circuit .flow-label rect { fill: rgba(255, 255, 255, .94); stroke: var(--border); }
#circuit .flow-label text { fill: var(--text); font-size: 12.5px; }
#circuit .flow-label .val { fill: var(--muted); font-variant-numeric: tabular-nums; }
#circuit .flow-label .chg.pos { fill: var(--pos); font-weight: 600; }
#circuit .flow-label .chg.neg { fill: var(--neg); font-weight: 600; }
#circuit .flow-label .chg.none { fill: var(--faint); }
#circuit.novalues .flow-label .val, #circuit.novalues .flow-label .chg { display: none; }
#circuit .node { cursor: pointer; }
#circuit .node rect.box { fill: #fff; stroke: var(--border-strong); stroke-width: 1.2; transition: stroke .2s; }
#circuit .node:hover rect.box, #circuit .node.active rect.box { stroke: var(--accent); stroke-width: 2; }
#circuit .node .title { fill: var(--text); font-size: 17px; font-weight: 600; }
#circuit .node .stat { fill: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
#circuit .node .stat .em { fill: var(--text); font-weight: 600; }
#circuit .node .stat .em.pos { fill: var(--pos); }
#circuit .node .stat .em.neg { fill: var(--neg); }
#circuit .node .ico { font-size: 22px; }
#circuit .core { pointer-events: none; }
#circuit .core circle { fill: #fff; stroke: var(--border-strong); stroke-width: 1.2; }
#circuit .core text { fill: var(--muted); font-size: 12px; text-anchor: middle; }
#circuit .core .big { fill: var(--text); font-size: 19px; font-weight: 600; }
#circuit .core .big.pos { fill: var(--pos); }
#circuit .core .big.neg { fill: var(--neg); }

/* Ændringsvisning */
#circuit .delta { fill: none; stroke-linecap: round; transition: stroke-width .45s ease; pointer-events: none; }
#circuit .delta.pos { stroke: rgba(58, 112, 176, .28); }
#circuit .delta.neg { stroke: rgba(194, 96, 47, .28); }
#circuit:not(.effect) .delta { display: none; }
#circuit.effect .flow-path { opacity: .45; }
#circuit.effect .flow-g:not(.changed) .arrow { opacity: .2; }
#circuit .flow-label.quiet { opacity: .4; }

.circuit-legend { display: flex; gap: 18px; padding: 4px 16px 14px; font-size: 13px; color: var(--text); flex-wrap: wrap; }
.circuit-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.dot.real { background: var(--real); }
.dot.fin { background: var(--fin); }
.dot.pos { background: var(--pos); }
.dot.neg { background: transparent; border: 2px solid var(--neg); }
.view-seg button { padding: 5px 11px; }
.effect-bar { padding: 4px 16px 6px; font-size: 13.5px; min-height: 8px; }
.effect-bar .ctx { margin-bottom: 6px; }
.effect-bar .chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; gap: 5px; align-items: center; padding: 2px 10px; border-radius: 99px; font-size: 12.5px; border: 1px solid var(--border); background: var(--surface2); font-variant-numeric: tabular-nums; }
.chip.pos b { color: var(--pos); }
.chip.neg b { color: var(--neg); }
.chip.pos::before, .chip.neg::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.chip.pos::before { background: var(--pos); }
.chip.neg::before { border: 2px solid var(--neg); width: 5px; height: 5px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; font: inherit; cursor: pointer; }

.flow-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 220px; max-width: 290px; background: #fff; border: 1px solid var(--border-strong); border-radius: 8px; padding: 10px 12px; font-size: 13px; box-shadow: 0 4px 14px rgba(40, 35, 25, .1); }
.flow-tip h4 { margin: 0 0 4px; font-size: 14px; }
.flow-tip .row { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.flow-tip p { margin: 6px 0 0; color: var(--muted); }

.sector-card { position: absolute; top: 70px; right: 14px; width: 300px; z-index: 6; background: #fff; border: 1px solid var(--border-strong); border-radius: 10px; padding: 14px; box-shadow: 0 6px 20px rgba(40, 35, 25, .12); }
.sector-card h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 4px; }
.sector-card .x { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 20px; color: var(--muted); }
.sector-card p { margin: 4px 0 10px; color: var(--muted); font-size: 13px; }
.sector-card table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sector-card td { padding: 4px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.sector-card td:last-child { text-align: right; }
.sector-card .links { margin-top: 10px; font-size: 12.5px; color: var(--muted); }

/* ---------- Faner ---------- */
.bottom { margin-top: 16px; }
.tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab { background: none; border: 0; padding: 12px 14px 10px; color: var(--muted); font-weight: 500; font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tab-body { padding: 16px 16px 20px; }
.tab-body[hidden] { display: none !important; }
.chart-legend { display: flex; gap: 18px; font-size: 13px; margin-bottom: 10px; flex-wrap: wrap; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend svg { width: 26px; height: 10px; }
.charts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.chart { border: 1px solid var(--border); border-radius: 8px; padding: 10px 10px 6px; position: relative; }
.chart h3 { font-size: 13.5px; margin: 0 0 2px; }
.chart .unit { font-size: 11.5px; color: var(--muted); }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid line { stroke: #eeebe4; }
.chart .axis text { fill: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.chart .zero { stroke: var(--border-strong); }
.chart .target { stroke: var(--gold); stroke-dasharray: 2 4; stroke-width: 1.5; }
.chart .target-lbl { fill: var(--gold); font-size: 10px; }
.chart .base { fill: none; stroke: var(--base-line); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .mine { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; }
.chart .mine-dot { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.chart .prev-line { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 2 4; }
.chart .prev-dot { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.chart .cross { stroke: var(--border-strong); }
.chart .hit { fill: transparent; }
.chart-tip { position: absolute; pointer-events: none; background: #fff; border: 1px solid var(--border-strong); border-radius: 6px; padding: 6px 9px; font-size: 12.5px; white-space: nowrap; z-index: 4; box-shadow: 0 4px 14px rgba(40, 35, 25, .1); }
.chart-tip .r { display: flex; gap: 10px; justify-content: space-between; font-variant-numeric: tabular-nums; }
.chart-tip .sw { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

.analysis-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.analysis-head p { margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { background: transparent; border: 0; padding: 6px 12px; font-size: 13px; color: var(--muted); border-right: 1px solid var(--border); }
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.contrib { display: grid; grid-template-columns: 200px 1fr 90px; gap: 6px 12px; align-items: center; font-size: 13.5px; }
.contrib .bar-track { position: relative; height: 18px; }
.contrib .bar-track::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--border-strong); }
.contrib .bar { position: absolute; top: 3px; height: 12px; border-radius: 3px; transition: all .5s ease; }
.contrib .bar.pos { background: var(--pos); }
.contrib .bar.neg { background: var(--neg); }
.contrib .num { text-align: right; font-variant-numeric: tabular-nums; }
.contrib .empty { grid-column: 1 / -1; color: var(--muted); padding: 20px 0; text-align: center; }
.contrib-note { color: var(--muted); font-size: 13px; margin-top: 12px; }

.table-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 6px 10px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
table.data tr.sec td { color: var(--text); font-weight: 600; padding-top: 16px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border-strong); }
table.data td.fut { color: var(--faint); }

.learn { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.learn .card { border: 1px solid var(--border); border-radius: 8px; padding: 14px; background: var(--surface2); }
.learn .card h3 { margin-bottom: 6px; }
.learn .card p { margin: 0; color: var(--muted); font-size: 13.5px; }

.foot { text-align: center; padding: 18px 0 0; }

/* ---------- Dialoger ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(36, 39, 43, .35); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal-backdrop[hidden] { display: none; }
.modal { background: #fff; border: 1px solid var(--border); border-radius: 12px; max-width: 760px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 26px 28px 22px; position: relative; box-shadow: 0 20px 50px rgba(40, 35, 25, .18); }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: 0; font-size: 26px; color: var(--muted); line-height: 1; }
.modal h2 { font-size: 21px; margin-bottom: 6px; }
.modal .lead { color: var(--muted); margin: 0 0 16px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.event-card { display: flex; gap: 14px; align-items: center; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.event-card .ei { font-size: 30px; }
.event-card h4 { margin: 0 0 2px; font-size: 15px; }
.event-card p { margin: 0; color: var(--muted); font-size: 13.5px; }
.result-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.rg { border: 1px solid var(--border); border-radius: 8px; padding: 10px; text-align: center; }
.rg .l { font-size: 12px; color: var(--muted); }
.rg .v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rg .d { font-size: 12px; font-variant-numeric: tabular-nums; }
.rg .d.better { color: var(--good-text); }
.rg .d.worse { color: var(--bad-text); }
.rg .d.same { color: var(--faint); }
.explain { margin: 0; padding-left: 18px; }
.explain li { margin: 6px 0; font-size: 14px; }
.explain li span { color: var(--muted); }
.goals-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.goals-table th, .goals-table td { padding: 8px; border-bottom: 1px solid var(--border); text-align: right; font-variant-numeric: tabular-nums; }
.goals-table th:first-child, .goals-table td:first-child { text-align: left; }
.goals-table th { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.goals-table input { width: 80px; text-align: right; background: #fff; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--text); padding: 4px 6px; font: inherit; }
.final-score { display: flex; align-items: center; gap: 20px; margin: 10px 0 18px; }
.final-score .big { font-size: 60px; font-weight: 600; color: var(--accent); line-height: 1; }
.final-score .title { font-size: 20px; font-weight: 600; }
.glossary dt { font-weight: 600; margin-top: 12px; }
.glossary dd { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0; }
.steps .s { border: 1px solid var(--border); border-radius: 8px; padding: 14px; background: var(--surface2); }
.steps .s .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.steps .s p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.check input { accent-color: var(--accent); }

/* ---------- Responsivt ---------- */
@media (max-width: 1250px) {
  .charts { grid-template-columns: repeat(3, 1fr); }
  .learn { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1080px) {
  .topbar { flex-wrap: wrap; }
  .timeline { order: 3; width: 100%; justify-content: center; }
  .layout { grid-template-columns: 1fr; }
  .policy { position: static; max-height: none; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  body { padding: 0 10px 10px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .charts, .learn, .steps { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: repeat(2, 1fr); }
  .top-actions { flex-wrap: wrap; }
  .contrib { grid-template-columns: 120px 1fr 70px; }
  .sector-card { position: static; width: auto; margin: 0 12px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
