/* ==========================================================================
   räntefond.se – designen "Kurva" (projektbrief avsnitt 7)
   Lugn, saklig och förtroendeingivande. Mörk bläckblå med petroleumgrön accent.
   Djärvheten ligger i räntekurvan och fondtabellen, allt annat hålls lugnt.
   ========================================================================== */

/* ---------- Typsnitt (självhostade, inga externa anrop) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  /* Färger enligt briefen (kontrasten är kontrollerad där) */
  --ink: #1F2A44;          /* rubriker, sidhuvud, logga. På vitt 14,3:1 */
  --ink-dark: #14213A;     /* text på ljus petroleum: 13,9:1 */
  --teal: #0F7B75;         /* knappar, länkar, positiv utveckling. Vit text 5,1:1, på bakgrunden 4,8:1 */
  --teal-light: #E4F1EF;   /* snabbsvar, tabellhuvud */
  --red: #B42318;          /* negativ utveckling och risk. På vitt 6,6:1 */
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --text: #161B26;
  --text-muted: #525C6B;

  /* Härledda hjälpfärger */
  --teal-dark: #0B5F5A;    /* hover på knappar och länkar */
  --ink-2: #2B3857;        /* hover i mörka ytor */
  --on-ink: #E8ECF3;       /* text på bläckblått */
  --on-ink-muted: #B9C2D3; /* sekundär text på bläckblått */
  --teal-on-ink: #6FD0C7;  /* kurvan och accenttext på bläckblått */
  --red-light: #FBEAE8;    /* bakgrund för riskmarkering */
  --line: #DADFE7;         /* tunna linjer */
  --line-strong: #7A8494;  /* kanter på kontroller, 3,6:1 mot vitt */

  /* Typografi */
  --font-head: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --text-base: 1.0625rem;
  --leading: 1.65;
  --measure: 68ch;

  /* Mått */
  --wrap: 72rem;
  --wrap-bred: 86rem;
  --gutter: 1rem;
  --radius: 10px;
  --radius-sm: 6px;
  --focus: 3px solid var(--teal);
}

@media (min-width: 48rem) {
  :root { --text-base: 1.125rem; --gutter: 1.5rem; }
}

/* ---------- Grund ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.95rem, 1.5rem + 2vw, 2.8rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 1.2rem + .9vw, 1.8rem); font-weight: 700; margin-top: 2em; }
h3 { font-size: 1.2rem; font-weight: 600; margin-top: 1.6em; }

p, ul, ol, dl, table, figure, details { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; }
li + li { margin-top: .3em; }
strong, b { font-weight: 600; }

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--teal-dark); text-decoration-thickness: 2px; }

:focus-visible { outline: var(--focus); outline-offset: 2px; border-radius: 2px; }

/* Avdelare: räntekurvan i liten skala */
hr {
  border: 0; height: 18px; margin: 2.5rem 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 18'%3E%3Cpath d='M1 16C22 15.5 34 11 48 7.5S82 2.5 119 2' fill='none' stroke='%230F7B75' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") left center / 120px 18px no-repeat;
}

.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-bred { max-width: var(--wrap-bred); }

.hoppa {
  position: absolute; left: var(--gutter); top: -6rem; z-index: 10;
  background: var(--surface); color: var(--ink); padding: .6rem 1rem; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none; box-shadow: 0 0 0 3px var(--teal);
}
.hoppa:focus { top: .75rem; }
main:focus { outline: none; }

/* Utveckling: aldrig bara färg, alltid plus- eller minustecken */
.utv { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }
.utv-pos { color: var(--teal); }
.utv-neg { color: var(--red); }
.utv-noll { color: var(--text-muted); }

/* ---------- Sidhuvud ---------- */
.sidhuvud { background: var(--ink); color: var(--on-ink); position: relative; }
.sidhuvud :focus-visible { outline-color: #fff; }
.sidhuvud-inre {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .25rem 2rem; padding-block: .8rem .5rem;
}
.logga { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: #fff; }
.logga:hover { color: #fff; }
.logga-symbol { width: 34px; height: 34px; flex: none; border-radius: 8px; box-shadow: 0 0 0 1px rgb(255 255 255 / .16); }
.logga-text { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; letter-spacing: -.02em; line-height: 1; }
.logga-tld { color: var(--teal-on-ink); }

.huvudmeny { width: calc(100% + 2 * var(--gutter)); margin-inline: calc(var(--gutter) * -1); overflow-x: auto; scrollbar-width: none; }
.huvudmeny::-webkit-scrollbar { display: none; }
.huvudmeny ul { display: flex; gap: .1rem; list-style: none; margin: 0; padding: .1rem var(--gutter) .2rem; white-space: nowrap; }
.huvudmeny li + li { margin-top: 0; }
.huvudmeny a {
  display: block; padding: .5rem .7rem; border-radius: var(--radius-sm);
  color: var(--on-ink); text-decoration: none;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
}
.huvudmeny a:hover { background: var(--ink-2); color: #fff; }
.huvudmeny a[aria-current] { color: #fff; box-shadow: inset 0 -2px 0 var(--teal-on-ink); border-radius: 0; }

@media (min-width: 66rem) {
  .sidhuvud-inre { flex-wrap: nowrap; padding-block: .9rem .6rem; }
  .huvudmeny { width: auto; margin: 0; overflow: visible; }
  .huvudmeny ul { padding: 0; }
}

/* Signaturen: den tunna räntekurvan längs sidhuvudets underkant */
.kurvband { display: block; width: 100%; height: 20px; }
.kurvband path { fill: none; stroke: var(--teal-on-ink); stroke-width: 1.6; vector-effect: non-scaling-stroke; opacity: .85; }
.kurvband-fot { transform: scaleY(-1); margin-bottom: 1.5rem; }

/* ---------- Startsidans topp ---------- */
.hem-topp { background: var(--ink); color: var(--on-ink); padding-block: 1.5rem 5rem; position: relative; overflow: hidden; }
.hem-kurva { position: absolute; inset: auto 0 0 0; width: 100%; height: 70%; pointer-events: none; }
.hem-kurva path { fill: none; vector-effect: non-scaling-stroke; }
.hem-kurva .hk-1 { stroke: var(--teal-on-ink); stroke-width: 2; opacity: .55; }
.hem-kurva .hk-2 { stroke: #fff; stroke-width: 1; opacity: .14; }
.hem-topp-inre { position: relative; }
.hem-topp h1 { color: #fff; max-width: 24ch; margin-bottom: .45em; }
.hem-ingress { font-size: 1.08em; max-width: 58ch; color: var(--on-ink); }
.hem-topp .fortroende { color: var(--on-ink-muted); }
.hem-topp .fortroende a { color: var(--on-ink); }
.hem-topp :focus-visible { outline-color: #fff; }
.hem-jamfor { margin-top: -3.25rem; position: relative; }
.hem-jamfor .fondtabell { margin-top: 0; box-shadow: 0 14px 34px -16px rgb(20 33 58 / .4); }
@media (min-width: 48rem) { .hem-topp { padding-block: 2.5rem 6rem; } .hem-jamfor { margin-top: -4rem; } }

/* ---------- Artikel ---------- */
.artikel-wrap { padding-block: 1.25rem 4rem; }
.artikel > :not(.prosa),
.prosa > * { max-width: var(--measure); }
.prosa > .fondtabell,
.prosa > .bred,
.prosa > .diagram,
.artikel > .fondtabell { max-width: none; }
.prosa > .diagram { max-width: 52rem; }

.artikel-huvud { margin-top: 1.25rem; }
.artikel-huvud h1 { margin-bottom: .4em; }

/* Förtroenderad */
.fortroende {
  display: flex; flex-wrap: wrap; gap: .25rem 0;
  color: var(--text-muted); font-size: .875rem; margin: 0 0 1.5rem;
  font-variant-numeric: tabular-nums;
}
.fortroende-del { display: inline-flex; align-items: center; gap: .35rem; }
.fortroende-del + .fortroende-del::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; margin: 0 .65rem; }
@media (max-width: 39.99rem) {
  .fortroende { gap: .2rem 1.1rem; }
  .fortroende-del + .fortroende-del::before { display: none; }
}
.fortroende a { color: inherit; }
.ikon { flex: none; }

/* Brödsmulor */
.brodsmulor { font-size: .875rem; color: var(--text-muted); }
.brodsmulor ol { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.brodsmulor li + li { margin-top: 0; }
.brodsmulor li + li::before { content: "›"; margin: 0 .5em; color: var(--line-strong); }
.brodsmulor a { color: var(--text-muted); }
.brodsmulor [aria-current] { color: var(--text); }

/* Snabbsvarsruta */
.snabbsvar {
  background: var(--teal-light); color: var(--ink-dark);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 1.1rem;
  margin: 0 0 2rem;
  position: relative;
}
.snabbsvar::before { content: ""; position: absolute; left: 0; top: 1rem; bottom: 1rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--teal); }
.snabbsvar-rubrik { font-family: var(--font-head); font-weight: 700; font-size: 1rem; color: var(--ink-dark); margin: 0 0 .25rem; }
.snabbsvar p:last-child { margin-bottom: 0; }
.snabbsvar p:not(.snabbsvar-rubrik) { font-size: 1.04em; }
.snabbsvar a { color: var(--ink-dark); }

/* Utkast */
.utkast { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: .8rem 1rem; margin: 0 0 2rem; background: var(--surface); color: var(--text-muted); font-size: .95rem; }
.utkast p { margin: 0; }
.utkast strong { color: var(--text); }

/* Innehållsförteckning */
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 0 0 2rem; }
.toc-rubrik { font-family: var(--font-head); font-weight: 700; font-size: 1rem; color: var(--ink); margin: 0 0 .5rem; }
.toc ol { list-style: none; counter-reset: toc; padding: 0; margin: 0; font-size: .95rem; }
.toc li { counter-increment: toc; display: flex; gap: .6rem; }
.toc li::before { content: counter(toc); font-variant-numeric: tabular-nums; color: var(--teal); font-weight: 600; min-width: 1.1rem; }
.toc li + li { margin-top: .25rem; }

/* Faktaruta, tipsruta och exempelruta */
.ruta { border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.5rem 0; background: var(--surface); border: 1px solid var(--line); }
.ruta > :last-child { margin-bottom: 0; }
.ruta-rubrik { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; margin: 0 0 .35rem; color: var(--ink); }
.ruta-fakta { border-top: 3px solid var(--ink); }
.ruta-tips { border-left: 3px solid var(--teal); }
.ruta-exempel { background: #FBFCFD; border-style: dashed; border-color: var(--line-strong); }
.ruta-etikett { display: inline-block; font-family: var(--font-body); font-size: .75rem; font-weight: 600; color: var(--ink-dark); background: var(--teal-light); border-radius: 999px; padding: .05rem .55rem; margin-right: .5rem; vertical-align: .12em; }
.ruta table { font-size: .9rem; }

/* Riskruta */
.riskruta { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 2.5rem 0; font-size: .95rem; }
.riskruta-rubrik { display: flex; align-items: center; gap: .5rem; font-family: var(--font-head); font-weight: 700; color: var(--ink); margin: 0 0 .4rem; font-size: 1.05rem; }
.riskruta-rubrik svg { color: var(--red); flex: none; }
.riskruta p:last-child { margin-bottom: 0; }

/* Knapp (CTA) – vit text på petroleum (5,1:1) */
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin: 1.5rem 0; }
.knapp {
  display: inline-block; background: var(--teal); color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem; line-height: 1.25;
  padding: .75rem 1.25rem; border-radius: 999px; text-decoration: none;
}
.knapp:hover { background: var(--teal-dark); color: #fff; }
.knapp:focus-visible { outline-color: var(--ink); outline-offset: 3px; }
.annons { font-size: .8rem; font-weight: 600; color: var(--ink-dark); border: 1px solid var(--line-strong); padding: .1rem .55rem; border-radius: 999px; background: var(--surface); }

/* FAQ */
.faq { margin-top: 3rem; }
.faq h2 { margin-top: 0; }
.faq-fraga { border-top: 1px solid var(--line); margin: 0; }
.faq-fraga:last-of-type { border-bottom: 1px solid var(--line); }
.faq-fraga summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
  padding: 1rem 0; font-family: var(--font-head); font-weight: 600; font-size: 1.08rem; line-height: 1.35; color: var(--ink);
}
.faq-fraga summary::-webkit-details-marker { display: none; }
.faq-fraga summary::after {
  content: ""; flex: none; width: .6rem; height: .6rem; margin-top: .35rem;
  border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq-fraga[open] summary::after { transform: rotate(-135deg); margin-top: .6rem; }
.faq-fraga summary:hover { color: var(--teal-dark); }
.faq-svar { padding: 0 0 1rem; }
.faq-svar > :last-child { margin-bottom: 0; }

/* Källor */
.kallor { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--text-muted); }
.kallor h2 { font-size: 1.15rem; margin-top: 0; }
.kallor ul { padding-left: 1.1em; }
.disclaimer { font-style: italic; }

/* Tabeller i löptext */
.prosa table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .95rem; font-variant-numeric: tabular-nums; border-radius: var(--radius-sm); }
@media (max-width: 47.99rem) { .prosa table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; font-size: .875rem; } }
.prosa table th, .prosa table td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prosa table thead th { background: var(--teal-light); color: var(--ink-dark); font-family: var(--font-head); font-weight: 700; font-size: .9rem; }

/* ---------- Riskskala 1–7 ---------- */
.riskskala { display: inline-flex; align-items: center; gap: .45rem; margin: 0; }
.rs-rutor { display: inline-grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.rs-ruta { display: grid; place-items: center; background: #EDF0F4; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rs-ruta.is-under { background: #CFE6E2; }
.rs-ruta.is-vald { background: var(--ink); color: #fff; font-weight: 700; }
.rs-mini .rs-ruta { width: 7px; height: 14px; border-radius: 2px; }
.rs-mini .rs-tal { font-weight: 600; font-variant-numeric: tabular-nums; }
.rs-stor { display: flex; flex-direction: column; align-items: stretch; max-width: 22rem; margin: 1rem 0 1.5rem; }
.rs-stor .rs-ruta { height: 2.25rem; border-radius: 4px; font-size: .95rem; }
.rs-etiketter { display: flex; justify-content: space-between; font-size: .8rem; color: var(--text-muted); margin-top: .3rem; }

/* ==========================================================================
   Fondtabellen
   Tunna linjer, tabulära siffror, tydliga tecken för utveckling.
   ========================================================================== */
.fondtabell {
  margin: 2rem 0 2.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.ft-huvud {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem 1rem;
  background: var(--ink); color: #fff;
  padding: .8rem 1rem .7rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 60' preserveAspectRatio='none'%3E%3Cpath d='M0 56C80 55 130 40 190 30S300 12 400 8' fill='none' stroke='%236FD0C7' stroke-opacity='.45' stroke-width='1.4' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  background-size: 100% 100%;
}
.ft-rubrik { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; line-height: 1.25; }
.ft-meta { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; color: var(--on-ink-muted); }
.ft-pip { width: .5rem; height: .5rem; border-radius: 50%; background: var(--teal-on-ink); box-shadow: 0 0 0 3px rgb(111 208 199 / .25); }

.ft-verktyg {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .9rem;
  padding: .75rem 1rem; border-bottom: 1px solid var(--line);
}
.ft-filter { display: flex; flex-wrap: wrap; gap: .35rem; }
.ft-filterknapp {
  font: 600 .875rem/1.2 var(--font-body);
  padding: .45rem .8rem; margin: 0; cursor: pointer;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 999px;
}
.ft-filterknapp:hover { border-color: var(--ink); background: #F3F5F8; }
.ft-filterknapp[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ft-filterknapp:focus-visible, .ft-sortknapp:focus-visible, .ft-sortera select:focus-visible { outline: var(--focus); outline-offset: 2px; }
.ft-sortera { display: inline-flex; align-items: center; gap: .5rem; font-size: .875rem; font-weight: 600; color: var(--ink); }
.ft-sortera select { font: 500 .875rem/1.2 var(--font-body); color: var(--text); padding: .45rem 2rem .45rem .7rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.ft-status { flex: 1 1 100%; margin: 0; font-size: .85rem; color: var(--text-muted); }
.ft-status [data-antal] { font-weight: 600; color: var(--text); }
@media (min-width: 64rem) { .ft-sortera { margin-left: auto; } }

.ft-tabell { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ft-tabell:focus-visible { outline-offset: -3px; }
.ft-tabell table { width: 100%; margin: 0; border-collapse: collapse; font-size: .9rem; line-height: 1.4; }
.ft-tabell thead th {
  background: var(--teal-light); color: var(--ink-dark);
  font-family: var(--font-head); font-weight: 700; font-size: .85rem; line-height: 1.2;
  text-align: right; vertical-align: bottom;
  padding: .6rem .75rem;
  border-bottom: 1px solid #C4DDD9;
  white-space: nowrap;
}
.ft-tabell thead th.ft-fondkol, .ft-tabell thead th.ft-k-riskniva { text-align: left; }
.ft-sortknapp {
  font: inherit; color: inherit; background: none; border: 0; padding: .1rem 0; margin: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: .3rem; text-align: inherit;
}
.ft-sortknapp:hover { color: var(--teal-dark); text-decoration: underline; text-underline-offset: .2em; }
.ft-pil { width: .5rem; height: .5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) scale(.8); opacity: .25; margin-top: -.2rem; }
th[aria-sort] .ft-pil { opacity: 1; }
th[aria-sort="ascending"] .ft-pil { transform: rotate(-135deg) scale(.8); margin-top: .2rem; }
.ft-tabell tbody th, .ft-tabell tbody td {
  text-align: right; vertical-align: top;
  padding: .7rem .75rem;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
}
.ft-tabell tbody tr:last-child > * { border-bottom: 0; }
.ft-tabell tbody tr:hover > * { background: #F8FAFB; }
.ft-tabell tbody th.ft-fondkol, .ft-tabell td.ft-k-riskniva { text-align: left; }
.ft-fondkol { min-width: 15rem; width: 40%; }
.ft-tabell td { white-space: nowrap; }

.ft-namn { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1rem; color: var(--ink); line-height: 1.3; }
.ft-namn a { color: inherit; text-decoration-color: var(--teal); }
.ft-namn a:hover { color: var(--teal-dark); }
.ft-bolag { display: block; font-size: .8rem; color: var(--text-muted); margin-top: .1rem; }
.ft-bolag a { color: var(--text-muted); }
.ft-taggar { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .35rem; }
.ft-tagg { font-size: .72rem; font-weight: 600; color: var(--ink-dark); background: var(--teal-light); border-radius: 999px; padding: .05rem .5rem; }
.ft-tagg-varning { background: var(--red-light); color: #7A1810; }
.ft-tagg-datum { background: #EEF0F4; color: var(--text); }
.ft-kalla { display: block; font-size: .75rem; color: var(--text-muted); margin-top: .3rem; }
.ft-kalla a { color: var(--text-muted); }
.ft-tom { color: var(--text-muted); }

.ft-fot { border-top: 1px solid var(--line); background: #FAFBFC; padding: .75rem 1rem; font-size: .8rem; color: var(--text-muted); }
.ft-fot p { margin: 0; max-width: 90ch; }
.ft-fot p + p { margin-top: .3rem; }
.ft-fot a { color: var(--teal); font-weight: 600; }
.ft-streck { font-weight: 700; color: var(--text); margin-right: .2rem; }

/* Kort på mobil */
.ft-kortlista { list-style: none; margin: 0; padding: 0; }
.ft-kort { padding: 1rem; border-bottom: 1px solid var(--line); margin: 0; }
.ft-kort + .ft-kort { margin-top: 0; }
.ft-kort:last-child { border-bottom: 0; }
.ft-kort dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr)); gap: .5rem; margin: .75rem 0 0; }
.ft-rad { background: #F6F8FA; border-radius: var(--radius-sm); padding: .45rem .6rem; }
.ft-rad dt { font-size: .72rem; color: var(--text-muted); font-weight: 500; }
.ft-rad dd { margin: 0; font-weight: 600; font-size: .95rem; }
.ft-visning-tabell .ft-kortlista { display: none; }
.fondtabell .ft-kortlista { display: none; }
@media (max-width: 47.99rem) {
  .fondtabell .ft-tabell { display: none; }
  .fondtabell .ft-kortlista { display: block; }
  .ft-sortera { width: 100%; }
  .ft-sortera select { flex: 1; }
  .ft-filter { overflow-x: auto; flex-wrap: nowrap; width: calc(100% + 2rem); margin-inline: -1rem; padding: 0 1rem .2rem; scrollbar-width: none; }
  .ft-filter::-webkit-scrollbar { display: none; }
  .ft-filterknapp { white-space: nowrap; }
}

/* ---------- Topplistor ---------- */
.topplista { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1.5rem 0 2rem; font-variant-numeric: tabular-nums; }
.tl-huvud { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .15rem 1rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); background: var(--teal-light); color: var(--ink-dark); }
.tl-rubrik { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }
.tl-kriterium { font-size: .8rem; }
.tl-lista { list-style: none; margin: 0; padding: 0; }
.tl-post { display: grid; grid-template-columns: 2rem 1fr auto; align-items: center; gap: .75rem; padding: .65rem 1rem; border-bottom: 1px solid var(--line); margin: 0; }
.tl-post + .tl-post { margin-top: 0; }
.tl-plats { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: .85rem; }
.tl-namn { display: block; font-family: var(--font-head); font-weight: 700; color: var(--ink); line-height: 1.3; font-size: .98rem; }
.tl-namn a { color: inherit; }
.tl-bolag { display: block; font-size: .8rem; color: var(--text-muted); }
.tl-bolag a { color: var(--text-muted); }
.tl-varde { font-weight: 700; font-size: 1rem; white-space: nowrap; }
.tl-fot, .tl-tom { font-size: .8rem; color: var(--text-muted); padding: .6rem 1rem; margin: 0; background: #FAFBFC; }

/* ---------- Diagram ---------- */
.diagram { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1rem .75rem; margin: 1.75rem 0; }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram figcaption { font-size: .8rem; color: var(--text-muted); margin-top: .5rem; }
.d-grid { stroke: var(--line); stroke-width: 1; }
.d-noll { stroke: var(--line-strong); stroke-width: 1; }
.d-axel { font: 500 12px var(--font-body); fill: var(--text-muted); }
.d-etikett { font: 600 13px var(--font-body); fill: var(--ink); }
.d-linje { fill: none; stroke: var(--teal); stroke-width: 2.5; stroke-linejoin: round; }
.d-punkt { fill: var(--ink); stroke: #fff; stroke-width: 2; }
.d-stapel { fill: var(--ink); }
.d-stapel-pos { fill: var(--teal); }
.d-stapel-neg { fill: var(--red); }

/* ---------- För och emot ---------- */
.for-mot { display: grid; gap: 1rem 2rem; max-width: var(--measure); }
@media (min-width: 40rem) { .for-mot { grid-template-columns: 1fr 1fr; } }
.for-mot h3 { margin-top: 0; font-size: 1.05rem; }
.lista-for, .lista-mot { list-style: none; padding: 0; }
.lista-for li, .lista-mot li { position: relative; padding-left: 1.5rem; }
.lista-for li::before { content: "+"; position: absolute; left: .1rem; top: 0; font-weight: 700; color: var(--teal); }
.lista-mot li::before { content: "−"; position: absolute; left: .15rem; top: 0; font-weight: 700; color: var(--red); }

/* ---------- Ingångar ---------- */
.ingangar { list-style: none; padding: 0; display: grid; gap: .75rem; max-width: none; }
@media (min-width: 40rem) { .ingangar { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); } }
.ingangar li { margin: 0; }
.ingangar a { display: block; height: 100%; padding: .9rem 1rem; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ingangar a:hover { border-color: var(--teal); }
.ingangar a:hover .ingang-rubrik { color: var(--teal-dark); }
.ingang-rubrik { display: block; font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1.05rem; line-height: 1.3; }
.ingang-text { display: block; color: var(--text-muted); font-size: .9rem; margin-top: .25rem; }

/* ---------- Läs vidare ---------- */
.las-vidare { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.las-vidare h2 { margin-top: 0; }
.las-vidare .ingangar { margin-bottom: 1rem; }
.las-vidare-pelare, .las-vidare-bolag { font-size: .95rem; color: var(--text-muted); }
.las-vidare-pelare span:first-child, .las-vidare-bolag span:first-child { font-weight: 600; color: var(--text); margin-right: .25rem; }
.las-vidare .cta { margin-bottom: 0; }

/* ---------- Guider på startsidan ---------- */
.guider { margin-top: 2.5rem; }
.guider h3 { font-size: 1.15rem; margin: 1.75rem 0 .75rem; }

/* ---------- Sidfot ---------- */
.sidfot { background: var(--ink); color: var(--on-ink); padding-block: 0 2.5rem; font-size: .92rem; margin-top: 2rem; }
.sidfot a { color: #fff; }
.sidfot-inre { display: grid; gap: 1.5rem; }
.sidfot-namn { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: #fff; margin-bottom: .4rem; }
.sidfot-rubrik { font-family: var(--font-head); font-weight: 700; font-size: .95rem; color: var(--on-ink-muted); margin-bottom: .4rem; }
.sidfot-om p { max-width: 46ch; }
.sidfot-intressen { font-size: .85rem; color: var(--on-ink-muted); }
.sidfot-meny ul { list-style: none; padding: 0; margin: 0; }
.sidfot-meny li + li { margin-top: .35rem; }
.sidfot-disclaimer { font-size: .82rem; margin: 0; padding-top: 1.25rem; border-top: 1px solid rgb(255 255 255 / .15); max-width: 80ch; color: var(--on-ink-muted); }
.sidfot :focus-visible { outline-color: #fff; }
@media (min-width: 48rem) {
  .sidfot-inre { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .sidfot-disclaimer { grid-column: 1 / -1; }
}

/* ---------- Rörelse bara när användaren vill ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Utskrift ---------- */
@media print {
  .sidhuvud, .sidfot, .hoppa, .toc, .ft-verktyg, .kurvband, .hem-kurva { display: none !important; }
  body { background: #fff; }
  .hem-topp { background: #fff; color: var(--text); padding: 0; }
  .hem-topp h1 { color: var(--ink); }
  .fondtabell .ft-tabell { display: block !important; overflow: visible; }
  .fondtabell .ft-kortlista { display: none !important; }
}
