/* Företagsguiden — en fil, ett typsnitt (Manrope, självhostat), inga CDN.
   Riktning: ett verktyg, inte en tidning. Sval grund, marinblått för allt som
   räknar, klarblått för det man klickar på, limegrönt för svaret. */

@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --ink: #0b1b3f;
  --ink-2: #394764;
  --ink-3: #5f6b85;
  --line: #dfe4ee;
  --line-strong: #c5cddd;
  --accent: #2451ff;
  --accent-ink: #1a3fd8;
  --accent-soft: #eaefff;
  --navy: #0b1b3f;
  --navy-2: #142a5c;
  --navy-3: #1e3a78;
  --on-navy: #e8edf8;
  --on-navy-2: #a9b6d3;
  --lime: #c8f560;
  --lime-ink: #3d5a00;
  --amber-bg: #fff4d9;
  --amber-ink: #7a4d00;
  --amber-line: #f1d48f;
  --green-bg: #e3f6ec;
  --green-ink: #145c37;
  --red-bg: #fde8e8;
  --red-ink: #9b1c1c;
  --shadow-sm: 0 1px 2px rgba(11, 27, 63, .06);
  --shadow-md: 0 2px 4px rgba(11, 27, 63, .04), 0 10px 30px rgba(11, 27, 63, .08);
  --radius: 12px;
  --radius-lg: 18px;
  --wrap: 74rem;
  --measure: 42rem;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1022;
    --surface: #111a33;
    --surface-2: #0e162c;
    --ink: #e9eefb;
    --ink-2: #bcc6de;
    --ink-3: #8f9bb8;
    --line: #223158;
    --line-strong: #2f4274;
    --accent: #7d9bff;
    --accent-ink: #9fb5ff;
    --accent-soft: #17244a;
    --navy: #060b19;
    --navy-2: #0f1a38;
    --navy-3: #1c2e5e;
    --amber-bg: #2d2410;
    --amber-ink: #f2c66b;
    --amber-line: #5b4717;
    --lime-ink: #c8f560;
    --green-bg: #0f2a1d;
    --green-ink: #7fd8a5;
    --red-bg: #2e1215;
    --red-ink: #f5a3a3;
    --shadow-sm: none;
    --shadow-md: 0 10px 30px rgba(0, 0, 0, .35);
  }
}

/* ------------------------------------------------------------ bas --- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; font-weight: 800; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.8vw, 3.1rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 700px) { .wrap { padding: 0 1.5rem; } }

.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: .6rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; }

/* -------------------------------------------------------- header --- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; height: 4rem; }

.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.logo-mark {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 9px;
  background: var(--navy); color: var(--lime); font-weight: 800; font-size: .95rem; letter-spacing: -.04em;
}
.logo-text { font-weight: 600; font-size: 1.12rem; letter-spacing: -.02em; }
.logo-text b { font-weight: 800; }

.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.site-nav a {
  display: block; padding: .5rem .75rem; border-radius: 8px; text-decoration: none;
  color: var(--ink-2); font-weight: 600; font-size: .95rem;
}
.site-nav a:hover { background: var(--accent-soft); color: var(--ink); }
.site-nav a[aria-current] { color: var(--accent-ink); background: var(--accent-soft); }

.header-actions { display: flex; align-items: center; gap: .5rem; }
.search-toggle {
  display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .7rem; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  text-decoration: none; font-weight: 600; font-size: .92rem;
}
.search-toggle:hover { border-color: var(--line-strong); color: var(--ink); }
.search-toggle kbd {
  font: inherit; font-size: .75rem; padding: 0 .35rem; border-radius: 5px; border: 1px solid var(--line);
  color: var(--ink-3);
}
.nav-toggle {
  display: none; border: 0; background: none; color: var(--ink); padding: .5rem; border-radius: 8px; cursor: pointer;
}
.nav-toggle .icon { width: 1.5rem; height: 1.5rem; }

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }
  .search-toggle kbd, .search-toggle span { display: none; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 4rem; margin: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: .5rem 1rem 1rem; }
  .site-nav a { padding: .8rem .75rem; font-size: 1.05rem; }
  .header-actions { margin-left: auto; }
}

/* --------------------------------------------------------- knappar --- */

.btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.2rem; border-radius: 10px;
  font: inherit; font-weight: 700; text-decoration: none; border: 0; cursor: pointer;
}
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-ink); }
.btn--light { background: var(--lime); color: var(--navy); }
.btn--light:hover { filter: brightness(1.05); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .7rem; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .18); background: transparent; color: var(--on-navy);
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-ghost.is-done { border-color: var(--lime); color: var(--lime); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem; margin: 0 0 .75rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink);
}
.eyebrow a { color: inherit; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }

/* ------------------------------------------------------ startsida --- */

.home-hero {
  background:
    radial-gradient(60rem 30rem at 85% -20%, rgba(36, 81, 255, .45), transparent 60%),
    radial-gradient(40rem 24rem at -10% 120%, rgba(200, 245, 96, .12), transparent 60%),
    var(--navy);
  color: var(--on-navy);
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(3rem, 7vw, 4.5rem);
}
.hero-kicker { margin: 0 0 .75rem; color: var(--lime); font-weight: 700; font-size: .95rem; }
.home-hero h1 { color: #fff; max-width: 16ch; }

.search-box {
  position: relative; display: flex; align-items: center; gap: .6rem;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: 14px; padding: .35rem .35rem .35rem 1rem;
}
.search-box > .icon { color: var(--ink-3); width: 1.3rem; height: 1.3rem; }
.search-box input {
  flex: 1; min-width: 0; border: 0; background: none; color: inherit; font: inherit; font-size: 1.1rem;
  padding: .7rem 0; outline: none;
}
.search-box input::-webkit-search-cancel-button { display: none; }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.search-box--hero { max-width: 44rem; margin-top: 1.75rem; border: 0; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.search-box--hero input { font-size: 1.15rem; padding: .95rem 0; }
.search-box--page { max-width: 44rem; margin-top: 1rem; }

.hero-chips { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1.25rem; font-size: .9rem; }
.hero-chips > span { color: var(--on-navy-2); margin-right: .25rem; }
.hero-chip {
  padding: .35rem .8rem; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .2);
  color: var(--on-navy); text-decoration: none; font-weight: 600;
}
.hero-chip:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .35); }

.home-section { margin: clamp(2.5rem, 6vw, 4rem) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.section-head h2 { margin: 0; }
.more { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; text-decoration: none; font-size: .95rem; white-space: nowrap; }

.cat-grid { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
.cat-tile {
  display: flex; flex-direction: column; gap: .3rem; padding: 1.1rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  transition: border-color .15s, transform .15s;
}
.cat-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.cat-icon {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-ink); margin-bottom: .35rem;
}
.cat-icon .icon { width: 1.3rem; height: 1.3rem; }
.cat-label { font-weight: 800; letter-spacing: -.01em; }
.cat-count { font-size: .85rem; color: var(--ink-3); }

.feature {
  display: grid; gap: 2rem; align-items: center; margin: clamp(2.5rem, 6vw, 4rem) 0;
  background: var(--navy); color: var(--on-navy); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
@media (min-width: 860px) { .feature { grid-template-columns: 1.3fr 1fr; } }
.feature h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); }
.feature p { color: var(--on-navy-2); }
.feature p b { color: var(--lime); }
.eyebrow--light { color: var(--lime); }
.feature-figure { background: var(--navy-2); border-radius: var(--radius); padding: 1.25rem; font-variant-numeric: tabular-nums; }
.ff-row { display: flex; justify-content: space-between; padding: .6rem 0; border-bottom: 1px dashed rgba(255, 255, 255, .12); color: var(--on-navy-2); }
.ff-row b { color: #fff; }
.ff-row--total { border: 0; padding-top: 1rem; font-size: 1.15rem; }
.ff-row--total b { color: var(--lime); font-size: 1.4rem; }

.home-split { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .home-split { grid-template-columns: 1fr 1fr; } }

.question-list, .link-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.question-list a, .link-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .95rem .25rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700;
}
.question-list a:hover, .link-list a:hover { color: var(--accent-ink); }
.question-list .icon, .link-list .icon { color: var(--ink-3); transition: transform .15s; }
.question-list a:hover .icon, .link-list a:hover .icon { transform: translateX(3px); color: var(--accent-ink); }

.explore-grid { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 800px) { .explore-grid { grid-template-columns: repeat(4, 1fr); } }
.explore-tile {
  display: flex; align-items: center; gap: .75rem; padding: 1rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700;
}
.explore-tile .cat-icon { margin: 0; }
.explore-tile:hover { border-color: var(--accent); }
.explore-tile--big { grid-column: span 2; flex-direction: column; align-items: flex-start; gap: .35rem; padding: 1.4rem; background: var(--accent-soft); border-color: transparent; }
.explore-tile--big .cat-icon { background: var(--surface); }
.explore-title { font-weight: 800; letter-spacing: -.01em; }
.explore-tile--big .explore-title { font-size: 1.25rem; }
.explore-desc { font-weight: 500; color: var(--ink-2); font-size: .95rem; }

.branch-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.branch-pill {
  display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1rem; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem;
}
.branch-pill .icon { color: var(--accent-ink); }
.branch-pill:hover { border-color: var(--accent); }

.trust { display: grid; gap: 1.5rem; padding: 2rem 0 3rem; border-top: 1px solid var(--line); margin-top: 3rem; }
@media (min-width: 800px) { .trust { grid-template-columns: repeat(3, 1fr); } }
.trust-item { display: flex; gap: .9rem; }
.trust-item > .icon { width: 1.6rem; height: 1.6rem; color: var(--accent-ink); margin-top: .15rem; }
.trust-item p { margin: .3rem 0 0; color: var(--ink-2); font-size: .95rem; }

/* ----------------------------------------------------------- kort --- */

.grid { display: grid; gap: .75rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid--tools { grid-template-columns: repeat(4, 1fr); } }
.grid--stack { grid-template-columns: 1fr !important; }
@media (min-width: 1000px) { .grid--compact { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex; gap: .9rem; align-items: flex-start; padding: 1.1rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.card-icon {
  display: grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-ink);
}
.card--tool .card-icon { background: var(--navy); color: var(--lime); }
.card-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.card-kind { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.card-title { font-weight: 800; letter-spacing: -.01em; line-height: 1.3; }
.card-desc { font-size: .9rem; color: var(--ink-2); line-height: 1.45; }

/* ------------------------------------------------------- brödsmulor --- */

.crumbs ol { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; font-size: .88rem; }
.crumbs li { color: inherit; opacity: .75; }
.crumbs li + li::before { content: "/"; margin-right: .35rem; opacity: .6; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { opacity: 1; font-weight: 600; }

/* -------------------------------------------------------- sidhuvud --- */

.tool-hero, .article-hero, .hub-hero { padding: clamp(1.75rem, 4vw, 2.75rem) 0 clamp(1.5rem, 3vw, 2rem); }
.tool-hero { background: var(--navy); color: var(--on-navy); padding-bottom: 5.5rem; }
.tool-hero h1 { color: #fff; max-width: 22ch; }
.tool-hero .eyebrow { color: var(--lime); }
.tool-hero .lede { color: var(--on-navy-2); }
.lede { font-size: clamp(1.08rem, 1.8vw, 1.25rem); color: var(--ink-2); max-width: 44rem; margin: 0; line-height: 1.55; }
.page-meta { display: flex; align-items: center; gap: .4rem; font-size: .88rem; color: var(--ink-3); margin: 1rem 0 0; }
.article-hero { border-bottom: 1px solid var(--line); background: var(--surface); }
.article-hero h1 { max-width: 24ch; }
.hub-hero { background: var(--surface); border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.hub-icon { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: 12px; background: var(--navy); color: var(--lime); margin-bottom: 1rem; }
.hub-icon .icon { width: 1.5rem; height: 1.5rem; }

/* ------------------------------------------------------ kalkylator --- */

.tool-main { margin-top: -4rem; position: relative; }

.calc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); overflow: hidden;
}
.calc--embedded { margin: 2rem 0; }
.calc-head { padding: 1.1rem 1.25rem 0; }
.calc-head .eyebrow { margin: 0; }
.calc-title { margin: .2rem 0 0; font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }

.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) {
  .calc-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .calc--embedded .calc-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1100px) {
  .calc--embedded .calc-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}

.calc-form { padding: 1.25rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-content: start; }
@media (min-width: 560px) { .calc-form { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 1.5rem; } }
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field[hidden] { display: none; }
.field-top { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.field label { font-weight: 700; font-size: .92rem; line-height: 1.3; }
.input {
  display: flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: 10px;
  background: var(--surface-2); transition: border-color .15s, box-shadow .15s;
}
.input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); background: var(--surface); }
.input input, .input select {
  flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700;
  font-size: 1.05rem; padding: .65rem .8rem; outline: none; font-variant-numeric: tabular-nums;
}
.input select { appearance: none; cursor: pointer; font-size: .95rem; padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 1.1rem) 55%, calc(100% - .8rem) 55%; background-size: .3rem .3rem; background-repeat: no-repeat;
}
.input--select { grid-column: 1 / -1; }
.unit { padding: 0 .8rem 0 .2rem; color: var(--ink-3); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.field.is-invalid .input { border-color: var(--red-ink); }
.hint { margin: 0; font-size: .82rem; color: var(--ink-3); line-height: 1.4; }
.field--fakta .input { border-style: solid; border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong)); }

.badge {
  display: inline-flex; align-items: center; padding: .1rem .45rem; border-radius: 6px; font-size: .7rem;
  font-weight: 800; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
}
.field-top .badge { white-space: normal; max-width: 100%; }
.badge--rule { background: var(--accent-soft); color: var(--accent-ink); }
.badge--assume { background: var(--amber-bg); color: var(--amber-ink); }

.calc-result {
  background: var(--navy); color: var(--on-navy); padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 560px) { .calc-result { padding: 1.75rem; } }
.result-verdict {
  margin: 0; padding: .75rem 1rem; border-radius: 10px; background: var(--navy-2); font-weight: 600; line-height: 1.45;
  border-left: 4px solid var(--on-navy-2);
}
.result-verdict.is-good { border-left-color: var(--lime); }
.result-verdict.is-bad { border-left-color: #ff8f7a; }
.result-main { display: flex; flex-direction: column; gap: .1rem; }
.result-main + .result-main { padding-top: .9rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.result-label { font-size: .88rem; color: var(--on-navy-2); font-weight: 600; }
.result-value { font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 800; color: var(--lime); letter-spacing: -.03em; line-height: 1.1; }
.result-main + .result-main .result-value { font-size: clamp(1.5rem, 3.6vw, 1.9rem); color: #fff; }
.result-sub { font-size: .82rem; color: var(--on-navy-2); }
.result-list { margin: 0; display: grid; gap: 0; }
.result-row { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.result-row dt { color: var(--on-navy-2); font-size: .92rem; }
.result-row dd { margin: 0; font-weight: 700; color: #fff; text-align: right; }
.result-row a, .result-label a { color: inherit; }
[data-row][hidden] { display: none; }

.result-table { overflow-x: auto; }
.result-table table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.result-table caption { text-align: left; color: var(--on-navy-2); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding-bottom: .4rem; }
.result-table th, .result-table td { padding: .45rem .4rem; text-align: right; border-bottom: 1px solid rgba(255, 255, 255, .08); white-space: nowrap; }
.result-table th:first-child, .result-table td:first-child { text-align: left; white-space: normal; }
.result-table th { color: var(--on-navy-2); font-weight: 600; }
.result-table tr.is-hl td { color: var(--lime); font-weight: 700; }

.result-bars { display: grid; gap: .6rem; }
.bar-label { display: flex; justify-content: space-between; font-size: .88rem; margin-bottom: .25rem; }
.bar-label b { color: #fff; }
.bar-track { height: .6rem; border-radius: 99px; background: var(--navy-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--on-navy-2); transition: width .3s; }
.bar.is-hl .bar-fill { background: var(--lime); }

.result-notes { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; font-size: .88rem; color: var(--on-navy-2); }
.result-notes li { padding-left: 1.1rem; position: relative; }
.result-notes li::before { content: ""; position: absolute; left: 0; top: .55em; width: .45rem; height: .45rem; border-radius: 50%; background: var(--lime); }
.result-notes li.is-warn::before { background: #ffb86b; }

.calc-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .5rem; }
.calc-disclaimer { display: flex; gap: .5rem; margin: 0; font-size: .78rem; color: var(--on-navy-2); line-height: 1.45; }
.calc-disclaimer .icon { margin-top: .1rem; }
.calc-disclaimer b { color: var(--on-navy); }
.calc-more { margin: 0; padding: .8rem 1.25rem; border-top: 1px solid var(--line); background: var(--surface-2); }
.calc-more a { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; text-decoration: none; }

/* ------------------------------------------------------ brödtext --- */

.content-wrap { padding-top: 2.5rem; padding-bottom: 1rem; }
.content-wrap .prose { max-width: var(--measure); margin: 0 auto; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding-top: 2.5rem; padding-bottom: 1rem; }
@media (min-width: 1000px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 17rem; gap: 4rem; }
  .article-side { position: sticky; top: 5.5rem; align-self: start; }
}
.article-layout .prose { max-width: var(--measure); }

.prose { font-size: 1.07rem; }
.prose > * + * { margin-top: 1.1em; }
.prose p, .prose ul, .prose ol { margin: 0; }
.prose * + p, .prose * + ul, .prose * + ol { margin-top: 1em; }
.prose h2 { margin: 2.2em 0 .6em; }
.prose h3 { margin: 1.8em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: .4em; }
.prose strong, .prose b { font-weight: 800; }
.prose a.fact { font-weight: 700; text-decoration-style: dotted; }
.prose blockquote { margin: 1.5em 0; padding: .25rem 0 .25rem 1.25rem; border-left: 3px solid var(--accent); color: var(--ink-2); font-size: 1.15rem; font-weight: 600; }

.table-wrap { overflow-x: auto; margin: 1.5em 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: .65rem .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 700; font-size: .85rem; color: var(--ink-2); }
.prose tr:last-child td { border-bottom: 0; }
.prose td.num, .prose th.num { text-align: right; white-space: nowrap; }
.prose tr.total td { font-weight: 800; background: var(--accent-soft); }

.short-answer {
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--accent);
  border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow-sm);
}
.short-answer-title, .callout-title, .example-title {
  margin: 0 0 .35rem !important; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink);
}
.short-answer p { margin: 0; }
.short-answer p + p { margin-top: .6em; }

.example {
  background: var(--navy); color: var(--on-navy); border-radius: var(--radius); padding: 1.25rem 1.4rem;
  font-variant-numeric: tabular-nums;
}
.example .example-title { color: var(--lime); }
.example strong, .example b { color: #fff; }
.example a { color: var(--lime); }
.example table { color: var(--on-navy); }
.example .table-wrap { background: transparent; border-color: rgba(255, 255, 255, .12); }
.example th { background: var(--navy-2); color: var(--on-navy-2); }
.example th, .example td { border-color: rgba(255, 255, 255, .1); }
.example tr.total td { background: var(--navy-2); color: var(--lime); }

/* "Vårt tips": tydligt avsändarmärkt, med upplysningen i själva rutan. */
.tip-box {
  margin: 1.75em 0; padding: 1.1rem 1.25rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--lime);
  box-shadow: var(--shadow-sm);
}
.tip-box p { margin: 0; }
.tip-box p + p { margin-top: .6em; }
.tip-box-title {
  display: flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--lime-ink);
}
.tip-box-note { font-size: .85rem; color: var(--ink-2); }
.prose > .tip-box:first-child { margin-top: 0; }

.callout { border-radius: var(--radius); padding: 1rem 1.2rem; background: var(--surface-2); border: 1px solid var(--line); }
.callout p { margin: 0; }
.callout p + p, .callout ul { margin-top: .5em; }
.callout--rule { background: var(--accent-soft); border-color: transparent; }
.callout--tip { background: var(--green-bg); border-color: transparent; }
.callout--tip .callout-title { color: var(--green-ink); }
.callout--warn { background: var(--amber-bg); border-color: var(--amber-line); }
.callout--warn .callout-title { color: var(--amber-ink); }

.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { position: relative; padding-left: 1.9rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 1.2rem; height: 1.2rem; border-radius: 5px;
  border: 2px solid var(--accent); background: var(--surface);
}

.mistakes { list-style: none; padding-left: 0 !important; counter-reset: m; }
.mistakes li { position: relative; padding-left: 2.4rem; counter-increment: m; }
.mistakes li::before {
  content: counter(m); position: absolute; left: 0; top: .05em; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--red-bg); color: var(--red-ink); font-weight: 800; font-size: .85rem;
}

.formula { margin-top: 2.5rem; }
.formula ol { counter-reset: f; list-style: none; padding: 0 !important; }
.formula li {
  counter-increment: f; position: relative; padding: .7rem .9rem .7rem 2.8rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; font-variant-numeric: tabular-nums;
}
.formula li::before { content: counter(f); position: absolute; left: .9rem; top: .7rem; font-weight: 800; color: var(--accent-ink); }

.faq { margin-top: 2.5rem; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-of-type { border-top: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; font-weight: 700; position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: .25rem; top: .8rem; font-size: 1.4rem; font-weight: 400; color: var(--accent-ink);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item > div { padding: 0 0 1.1rem; color: var(--ink-2); }

.sources {
  margin-top: 2.5rem; padding: 1.25rem 1.4rem; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); font-size: .92rem;
}
.sources h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; margin: 0 0 .75rem; }
.sources ul { padding-left: 1.1rem; margin: 0; }
.sources li + li { margin-top: .4rem; }
.src-from { color: var(--ink-3); }
.sources-checked { margin: .9rem 0 0 !important; color: var(--ink-3); font-size: .85rem; }

.disclosure {
  display: flex; gap: .7rem; margin-top: 2rem; padding: .9rem 1.1rem; border-radius: var(--radius);
  background: var(--surface-2); border: 1px dashed var(--line-strong); color: var(--ink-3); font-size: .88rem;
}
.disclosure p { margin: 0; }
.disclosure .icon { margin-top: .2rem; }

.toc { padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-size: .92rem; }
.toc-title, .side-title { margin: 0 0 .5rem; font-weight: 800; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); display: flex; gap: .4rem; align-items: center; }
.toc ol { margin: 0; padding-left: 1.1rem; }
.toc li + li { margin-top: .35rem; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--accent-ink); text-decoration: underline; }
.side-box { margin-top: 1rem; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--navy); color: var(--on-navy); }
.side-box .side-title { color: var(--lime); }
.side-link {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .55rem 0; font-weight: 700; font-size: .93rem;
  color: #fff; text-decoration: none; border-top: 1px solid rgba(255, 255, 255, .1);
}
.side-link .icon { color: var(--lime); }
.side-link:hover { color: var(--lime); }
@media (max-width: 999px) { .article-side .toc { display: none; } }

.related { margin: 3rem 0; }
.related h2 { font-size: 1.3rem; }

/* ------------------------------------------------------------ nav --- */

.hub-section { margin: 2rem 0 3rem; scroll-margin-top: 5rem; }
.hub-section h2 { display: flex; align-items: center; gap: .55rem; }
.hub-section h2 .icon { color: var(--accent-ink); }
.section-desc { margin: -.25rem 0 1rem; color: var(--ink-2); }
.hub-intro { max-width: var(--measure); margin: 1rem 0 4rem; }

.tool-filter { display: grid; gap: 1rem; margin-bottom: 1rem; }
.filter-box {
  display: flex; align-items: center; gap: .6rem; max-width: 28rem; padding: 0 .9rem; border-radius: 10px;
  background: var(--surface); border: 1.5px solid var(--line-strong); color: var(--ink-3);
}
.filter-box:focus-within { border-color: var(--accent); }
.filter-box input { flex: 1; border: 0; background: none; font: inherit; color: var(--ink); padding: .7rem 0; outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: .88rem;
}
.chip .icon { color: var(--accent-ink); }
.chip:hover { border-color: var(--accent); color: var(--ink); }
.filter-empty { padding: 2rem 0; color: var(--ink-2); }

.fact-list { display: grid; gap: .6rem; }
.fact-row {
  display: flex; justify-content: space-between; gap: 1.5rem; padding: 1rem 1.2rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); scroll-margin-top: 5.5rem;
}
.fact-row:target { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.fact-label { margin: 0; font-weight: 800; }
.fact-note, .fact-src, .fact-used { margin: .3rem 0 0; font-size: .88rem; color: var(--ink-2); }
.fact-src, .fact-used { color: var(--ink-3); }
.fact-value { margin: 0; font-weight: 800; font-size: 1.35rem; white-space: nowrap; color: var(--accent-ink); font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------- sök --- */

.search-results:empty { display: none; }
.search-results--hero {
  position: absolute; left: 0; right: 0; top: calc(100% + .5rem); z-index: 30;
  background: var(--surface); color: var(--ink); border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
  max-height: min(60vh, 28rem); overflow-y: auto; padding: .4rem;
}
.sr-item {
  display: flex; flex-direction: column; gap: .1rem; padding: .7rem .8rem; border-radius: 9px; text-decoration: none; color: var(--ink);
}
.sr-item:hover, .sr-item.is-active { background: var(--accent-soft); }
.sr-type { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.sr-title { font-weight: 800; }
.sr-title mark { background: none; color: var(--accent-ink); }
.sr-desc { font-size: .88rem; color: var(--ink-2); line-height: 1.4; }
.sr-empty { padding: 1rem; color: var(--ink-2); margin: 0; }
.search-results--page { margin-bottom: 3rem; display: grid; gap: .25rem; max-width: 48rem; }
.search-results--page .sr-item { background: var(--surface); border: 1px solid var(--line); padding: 1rem 1.1rem; }

.search-overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(6, 11, 25, .55); backdrop-filter: blur(3px);
  display: flex; justify-content: center; align-items: flex-start; padding: 8vh 1rem 1rem;
}
.search-overlay[hidden] { display: none; }
.search-dialog {
  width: 100%; max-width: 40rem; background: var(--surface); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  overflow: hidden;
}
.search-dialog .search-box { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.search-dialog .search-results { max-height: 60vh; overflow-y: auto; padding: .4rem; }
.search-close { border: 0; background: none; color: var(--ink-3); padding: .6rem; cursor: pointer; border-radius: 8px; }
.search-close:hover { background: var(--surface-2); color: var(--ink); }

/* -------------------------------------------------------- sidfot --- */

.site-footer { margin-top: 4rem; background: var(--navy); color: var(--on-navy-2); padding: 3rem 0 2rem; font-size: .93rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr repeat(4, 1fr); } }
.footer-about { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-about { grid-column: auto; } }
.logo--footer { color: #fff; margin-bottom: .75rem; }
.logo--footer .logo-mark { background: var(--lime); color: var(--navy); }
.site-footer h2 { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: #fff; margin: 0 0 .75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: .4rem; }
.site-footer a { color: var(--on-navy-2); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-meta a { color: var(--lime); }
.footer-legal { margin: 2.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }

/* -------------------------------------------------------- utskrift --- */

@media print {
  .site-header, .site-footer, .search-overlay, .calc-actions, .related, .article-side, .crumbs, .calc-more, .hero-chips { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .tool-hero, .article-hero, .hub-hero { background: none; color: #000; padding: 0 0 1rem; }
  .tool-hero h1, .tool-hero .lede, .tool-hero .eyebrow { color: #000; }
  .tool-main { margin: 0; }
  .calc { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  .calc-result, .example, .side-box { background: #f2f2f2 !important; color: #000 !important; }
  .calc-result *, .example * { color: #000 !important; }
  .calc-grid { grid-template-columns: 1fr 1fr !important; }
  body.print-calc .content-wrap, body.print-calc .prose { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
.result-verdict.is-warn { border-left-color: #ffb86b; }
