/* ==========================================================================
   Företagslådan / designsystem
   Premium, minimalistisk och teknisk business-design.
   1 Tokens · 2 Bas · 3 Layout · 4 Header · 5 Knappar · 6 Hero · 7 Kort
   8 Formulär · 9 Verktygslayout · 10 Dokument · 11 FAQ · 12 Annonser
   13 Footer · 14 CTA · 15 Övrigt · 16 Animationer · 17 Responsivt · 18 Print
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  /* Yta */
  --surface:            #FFFFFF;
  --surface-2:          #F8FAFC;
  --surface-3:          #F1F5F9;
  --surface-inverse:    #0A1020;

  /* Text, nästan svart marinblå */
  --ink:                #0A1020;
  --ink-2:              #1B2740;
  --ink-3:              #33415C;
  --muted:              #56637B;
  --muted-2:            #7C8899;
  --on-inverse:         #E8EDF5;
  --on-inverse-muted:   #98A6BC;

  /* Linjer */
  --line:               #E4E9F0;
  --line-2:             #D8DFEA;
  --line-inverse:       rgba(255, 255, 255, .12);

  /* Mörkblå brand */
  --brand:              #12447F;
  --brand-600:          #0E3768;
  --brand-500:          #1A5599;
  --brand-400:          #2E6DBB;
  --brand-tint:         #EEF4FB;
  --brand-tint-2:       #DFEAF7;

  /* Status, diskreta */
  --pos:                #0F6B4F;
  --pos-tint:           #ECF6F2;
  --neg:                #9B2C2C;
  --neg-tint:           #FBEFEF;
  --note-tint:          #FBF6E9;
  --note-line:          #EFE3C2;
  --note-ink:           #6B5310;

  /* Radier */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* Skuggor, mycket diskreta */
  --sh-xs: 0 1px 2px rgba(10, 16, 32, .05);
  --sh-sm: 0 1px 2px rgba(10, 16, 32, .05), 0 2px 6px rgba(10, 16, 32, .04);
  --sh-md: 0 2px 4px rgba(10, 16, 32, .04), 0 8px 20px rgba(10, 16, 32, .06);
  --sh-lg: 0 4px 10px rgba(10, 16, 32, .05), 0 20px 44px rgba(10, 16, 32, .09);
  --sh-xl: 0 6px 14px rgba(10, 16, 32, .06), 0 32px 70px rgba(10, 16, 32, .14);
  --ring:  0 0 0 3px rgba(26, 85, 153, .18);

  /* Inre ljuskant, ger ytor en tunn upphöjd överkant */
  --edge-light: inset 0 1px 0 rgba(255, 255, 255, .75);
  --edge-dark:  inset 0 1px 0 rgba(255, 255, 255, .08);

  /* Filmkorn som lägger djup på mörka ytor */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");

  /* Mått */
  --nav-h: 68px;
  --wrap: 1200px;
  --wrap-narrow: 780px;

  /* Typografi */
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Rörelse */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --fast: 140ms;
  --mid: 220ms;
}

/* ---------- 2. Reset & bas ----------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.62;
  color: var(--ink-2);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  color: var(--ink);
  font-weight: 640;
  line-height: 1.14;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 1.35rem + 3.1vw, 3.55rem); letter-spacing: -0.032em; }
h2 { font-size: clamp(1.6rem, 1.15rem + 1.7vw, 2.35rem); letter-spacing: -0.028em; }
h3 { font-size: clamp(1.16rem, 1.02rem + .55vw, 1.4rem); letter-spacing: -0.018em; }
h4 { font-size: 1.02rem; letter-spacing: -0.012em; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--fast) var(--ease);
}
a:hover { color: var(--brand-400); }

img, svg { max-width: 100%; display: block; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

ul, ol { margin: 0 0 1.05em; padding-left: 1.25em; }
li { margin-bottom: .38em; }
li:last-child { margin-bottom: 0; }

strong { font-weight: 620; color: var(--ink); }

::selection { background: var(--brand-tint-2); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font-size: .9rem;
  font-weight: 560;
  transition: top var(--fast) var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

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

/* ---------- 3. Layout ---------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}
.wrap-narrow { max-width: var(--wrap-narrow); }

.section { padding-block: clamp(56px, 6vw, 100px); }
.section--tight { padding-block: clamp(40px, 4vw, 64px); }
.section--tint { background: var(--surface-2); border-block: 1px solid var(--line); }

.grid { display: grid; gap: 20px; }

.section-head { max-width: 660px; margin-bottom: clamp(28px, 3vw, 44px); }
.section-head p {
  color: var(--muted);
  font-size: 1.045rem;
  margin-top: .7rem;
  margin-bottom: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .755rem;
  font-weight: 620;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--brand-400);
  opacity: .7;
}

.lead {
  font-size: clamp(1.02rem, .97rem + .28vw, 1.16rem);
  color: var(--muted);
  line-height: 1.68;
}

.prose { max-width: 72ch; color: var(--ink-3); }
.prose h2 {
  margin-top: 2.1em;
  margin-bottom: .55em;
  font-size: clamp(1.35rem, 1.15rem + .8vw, 1.7rem);
}
.prose h3 { margin-top: 1.6em; margin-bottom: .45em; }
.prose > :first-child { margin-top: 0; }
.prose ul { padding-left: 1.15em; }
.prose li::marker { color: var(--brand-400); }

.page-shell { display: flex; flex-direction: column; min-height: 100vh; }
.page-shell > main { flex: 1 0 auto; }

/* ---------- 4. Header ---------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--mid) var(--ease), border-color var(--mid) var(--ease);
}
.site-header[data-scrolled="true"] {
  box-shadow: var(--sh-sm);
  border-bottom-color: var(--line-2);
}

.nav { display: flex; align-items: center; gap: 16px; height: var(--nav-h); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  flex: 0 0 auto;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 8px; }
.brand__name {
  font-size: 1.135rem;
  font-weight: 660;
  letter-spacing: -0.028em;
  color: var(--ink);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 18px;
  flex: 1 1 auto;
}
.nav__link {
  padding: 8px 13px;
  border-radius: var(--r-sm);
  font-size: .935rem;
  font-weight: 520;
  color: var(--ink-3);
  transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.nav__link:hover { color: var(--ink); background: var(--surface-3); }
.nav__link[aria-current="page"] { color: var(--brand); font-weight: 570; }

.nav__actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.nav__toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--ink);
  padding: 0;
}
.nav__toggle:hover { background: var(--surface-3); }
.nav__toggle span {
  display: block;
  width: 17px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: transform var(--mid) var(--ease), opacity var(--fast) var(--ease);
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 17px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--mid) var(--ease);
}
.nav__toggle span::before { top: -5.5px; }
.nav__toggle span::after { top: 5.5px; }
.nav__toggle[aria-expanded="true"] span { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::before { transform: translateY(5.5px) rotate(-90deg); }
.nav__toggle[aria-expanded="true"] span::after { opacity: 0; transform: translateY(-5.5px); }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 10px 0 22px;
}
.mobile-menu[data-open="true"] { display: block; animation: fadeSlide var(--mid) var(--ease); }
.mobile-menu a {
  display: block;
  padding: 13px 4px;
  font-size: 1.02rem;
  font-weight: 540;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.mobile-menu a[aria-current="page"] { color: var(--brand); }
.mobile-menu .btn { margin-top: 18px; width: 100%; }

/* ---------- 5. Knappar --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: .935rem;
  font-weight: 560;
  letter-spacing: -0.008em;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease),
              color var(--fast) var(--ease), box-shadow var(--fast) var(--ease),
              transform var(--fast) var(--ease);
}
.btn:active { transform: translateY(.5px); }
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }

.btn--primary {
  background: linear-gradient(180deg, #17518F 0%, var(--brand) 100%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(10, 16, 32, .16), var(--edge-dark);
}
.btn--primary:hover {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-600) 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(10, 16, 32, .18), var(--edge-dark);
}

.btn--secondary {
  background: linear-gradient(180deg, #fff 0%, var(--surface-2) 100%);
  color: var(--ink);
  border-color: var(--line-2);
  box-shadow: var(--sh-xs), var(--edge-light);
}
.btn--secondary:hover { background: var(--surface-2); border-color: #C4CEDE; color: var(--ink); }

.btn--ghost { background: transparent; color: var(--ink-3); border-color: transparent; }
.btn--ghost:hover { background: var(--surface-3); color: var(--ink); }

.btn--lg { padding: 14px 26px; font-size: 1rem; border-radius: var(--r-md); }
.btn--sm { padding: 7px 13px; font-size: .855rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.btn--icon {
  background: transparent;
  color: var(--muted-2);
  border-color: transparent;
  padding: 7px;
}
.btn--icon:hover { color: var(--neg); background: var(--neg-tint); }

/* ---------- 6. Hero ------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(64px, 7.5vw, 128px) clamp(52px, 6vw, 96px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 460px at 78% -8%, rgba(18, 68, 127, .055), transparent 62%),
    linear-gradient(180deg, #FCFDFF 0%, #FFFFFF 46%);
}
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(10, 16, 32, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10, 16, 32, .045) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(ellipse 110% 78% at 50% 22%, #000 12%, transparent 76%);
  mask-image: radial-gradient(ellipse 110% 78% at 50% 22%, #000 12%, transparent 76%);
}
.hero__inner { max-width: 800px; }
.hero h1 { margin-bottom: 22px; }
.hero .lead { max-width: 620px; font-size: clamp(1.06rem, 1rem + .38vw, 1.22rem); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* Tvåspaltig hero: budskap till vänster, levande verktyg till höger */
.hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  gap: clamp(36px, 4.5vw, 72px);
  align-items: center;
}
.hero__layout .hero__inner { max-width: 560px; }
.hero__layout h1 { font-size: clamp(2.05rem, 1.4rem + 2.5vw, 3.15rem); }
.hero__layout .lead { max-width: 500px; }

/* Panelen ser ut som ett fönster i produkten */
.hero__panel {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-xl), var(--edge-light);
  overflow: hidden;
}
.hero__panel-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #fff 0%, var(--surface-2) 100%);
  border-bottom: 1px solid var(--line);
}
.hero__panel-dots { display: flex; gap: 5px; flex: 0 0 auto; }
.hero__panel-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-2);
  display: block;
}
.hero__panel-dots i:first-child { background: #D9C3A0; }
.hero__panel-title {
  font-size: .755rem;
  font-weight: 640;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.hero__panel-live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 560;
  color: var(--pos);
}
.hero__panel-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pos);
  box-shadow: 0 0 0 3px var(--pos-tint);
}
.hero__panel-body { padding: clamp(18px, 2vw, 22px); }
.hero__panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  font-size: .8rem;
  color: var(--muted-2);
}
.hero__panel-foot a { font-weight: 560; }

@media (max-width: 980px) {
  .hero__layout { grid-template-columns: 1fr; gap: 40px; }
  .hero__layout .hero__inner { max-width: 640px; }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  margin-bottom: 26px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .7);
  box-shadow: var(--sh-xs);
  font-size: .82rem;
  font-weight: 520;
  color: var(--ink-3);
}
.hero__badge b { font-weight: 620; color: var(--ink); }
.hero__badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pos);
  box-shadow: 0 0 0 3px var(--pos-tint);
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: .875rem;
  color: var(--muted);
}
.hero__trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero__trust svg { width: 15px; height: 15px; color: var(--brand-400); flex: 0 0 auto; }

/* ---------- 7. Kort ------------------------------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--sh-sm);
}
.card--pad-lg { padding: clamp(22px, 2.4vw, 34px); }
.card--tint { background: var(--surface-2); }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  color: var(--ink-2);
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--mid) var(--ease), box-shadow var(--mid) var(--ease),
              border-color var(--mid) var(--ease);
}
.tool-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: linear-gradient(180deg, rgba(18, 68, 127, .045), rgba(18, 68, 127, 0) 58%);
  transition: opacity var(--mid) var(--ease);
}
/* Tunn toningskant som tänds vid hover */
.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(155deg, rgba(46, 109, 187, .65), rgba(46, 109, 187, 0) 46%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--mid) var(--ease);
}
.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
  border-color: var(--brand-tint-2);
  color: var(--ink-2);
}
.tool-card:hover::after { opacity: 1; }
.tool-card:hover::before { opacity: 1; }
.tool-card:hover .tool-card__arrow { transform: translateX(3px); color: var(--brand); }
.tool-card:hover .tool-card__icon {
  border-color: var(--brand-tint-2);
  background: linear-gradient(180deg, #F6FAFE 0%, var(--brand-tint) 100%);
}

.tool-card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, #fff 0%, var(--surface-2) 100%);
  box-shadow: var(--sh-xs), var(--edge-light);
  color: var(--brand);
  transition: background var(--mid) var(--ease), border-color var(--mid) var(--ease),
              box-shadow var(--mid) var(--ease), transform var(--mid) var(--ease);
}
.tool-card__icon svg { width: 20px; height: 20px; }
.tool-card:hover .tool-card__icon { transform: translateY(-1px); }

.tool-card h3 { font-size: 1.055rem; margin-bottom: 7px; }
.tool-card p {
  font-size: .915rem;
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.58;
}

.tool-card__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .855rem;
  font-weight: 560;
  color: var(--ink-3);
}
.tool-card__arrow {
  display: flex;
  transition: transform var(--mid) var(--ease), color var(--mid) var(--ease);
}
.tool-card__arrow svg { width: 17px; height: 17px; }

.tool-card__tag {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: .69rem;
  font-weight: 620;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-tint);
  border: 1px solid var(--brand-tint-2);
  padding: 3px 8px;
  border-radius: var(--r-xs);
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}
.feature__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
  border-radius: var(--r-sm);
  background: var(--brand-tint);
  color: var(--brand);
}
.feature__icon svg { width: 18px; height: 18px; }
.feature h3 { font-size: 1.01rem; margin-bottom: 7px; }
.feature p { font-size: .915rem; color: var(--muted); margin: 0; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.stat {
  position: relative;
  background: linear-gradient(180deg, #fff 0%, var(--surface-2) 100%);
  padding: 26px 22px 24px;
}
/* Liten accentmarkör över varje nyckeltal */
.stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  width: 24px;
  height: 2px;
  background: var(--brand-400);
  border-radius: 0 0 2px 2px;
}
.stat__value {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.95rem);
  font-weight: 640;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat__label { font-size: .855rem; color: var(--muted); margin-top: 4px; }

/* ---------- 8. Formulär -------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.form-grid--2 { grid-template-columns: repeat(2, 1fr); }
.col-span-2 { grid-column: 1 / -1; }

.fieldset { border: 0; padding: 0; margin: 0 0 26px; }
.fieldset:last-child { margin-bottom: 0; }
.fieldset__legend {
  padding: 0;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .78rem;
  font-weight: 640;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted-2);
  width: 100%;
}
.fieldset__legend::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field__label {
  font-size: .845rem;
  font-weight: 560;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.field__hint { font-size: .795rem; color: var(--muted-2); line-height: 1.45; }

.input,
.select,
.textarea {
  width: 100%;
  font-family: inherit;
  font-size: .945rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 10px 13px;
  line-height: 1.45;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
.input::placeholder,
.textarea::placeholder { color: #A7B1C1; }
.input:hover,
.select:hover,
.textarea:hover { border-color: #C4CEDE; }
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: var(--ring);
}
.textarea { resize: vertical; min-height: 84px; }

/* Chevron ritas i CSS, inga externa bilder eller data-URI:er */
.select-wrap { position: relative; display: block; }
.select-wrap .select { padding-right: 38px; cursor: pointer; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.input--num { font-variant-numeric: tabular-nums; }
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.input-affix { position: relative; display: flex; align-items: center; }
.input-affix .input { padding-right: 48px; }
.input-affix__suffix {
  position: absolute;
  right: 13px;
  font-size: .855rem;
  color: var(--muted-2);
  pointer-events: none;
  font-weight: 520;
}
.input-affix--lg .input {
  font-size: 1.3rem;
  font-weight: 600;
  padding: 15px 66px 15px 15px;
  letter-spacing: -0.02em;
  border-radius: var(--r-md);
}
.input-affix--lg .input-affix__suffix { right: 16px; font-size: .95rem; }

.segmented {
  display: flex;
  padding: 3px;
  gap: 3px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  width: 100%;
}
.segmented__btn {
  flex: 1 1 0;
  padding: 9px 14px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  font-family: inherit;
  font-size: .89rem;
  font-weight: 550;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease);
}
.segmented__btn:hover { color: var(--ink-2); }
.segmented__btn[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--sh-xs);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: .9rem;
  color: var(--ink-2);
}
.check input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--brand);
  cursor: pointer;
  flex: 0 0 auto;
}

/* ---------- 9. Verktygslayout -------------------------------------------- */
.tool-hero {
  position: relative;
  padding-block: clamp(34px, 3.6vw, 56px) clamp(26px, 2.6vw, 38px);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
/* Samma diskreta rutnät som på startsidan, håller ihop uttrycket */
.tool-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(10, 16, 32, .035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10, 16, 32, .035) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(ellipse 90% 120% at 20% 0%, #000 5%, transparent 70%);
  mask-image: radial-gradient(ellipse 90% 120% at 20% 0%, #000 5%, transparent 70%);
}
.tool-hero > .wrap { position: relative; z-index: 1; }
.tool-hero h1 { font-size: clamp(1.85rem, 1.35rem + 2vw, 2.8rem); margin-bottom: 14px; }
.tool-hero .lead { max-width: 640px; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  color: var(--muted-2);
  margin-bottom: 16px;
}
.breadcrumbs a { color: var(--muted); font-weight: 500; }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs svg { width: 13px; height: 13px; opacity: .55; }

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 34px;
  align-items: start;
}
.tool-layout__aside {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: grid;
  gap: 20px;
}

.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-lg), var(--edge-light);
}
.calc__inputs { padding: clamp(22px, 2.4vw, 32px); }
.calc__output {
  padding: clamp(22px, 2.4vw, 32px);
  background: linear-gradient(180deg, var(--surface-2) 0%, #F3F7FC 100%);
  border-left: 1px solid var(--line);
}
.calc--stack { grid-template-columns: 1fr; }
.calc--stack .calc__output { border-left: 0; border-top: 1px solid var(--line); }

.calc__title {
  font-size: .77rem;
  font-weight: 640;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 18px;
}

.result-hero {
  padding: 22px 24px;
  border-radius: var(--r-lg);
  background: var(--ink);
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.result-hero {
  box-shadow: var(--sh-md), var(--edge-dark);
}
.result-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 200px at 100% 0%, rgba(46, 109, 187, .3), transparent 70%);
  pointer-events: none;
}
/* Filmkorn för djup */
.result-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: .16;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.result-hero > * { position: relative; z-index: 1; }
.result-hero__label { font-size: .8rem; color: var(--on-inverse-muted); font-weight: 520; }
.result-hero__value {
  font-size: clamp(1.85rem, 1.4rem + 1.9vw, 2.6rem);
  font-weight: 660;
  letter-spacing: -0.035em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-top: 5px;
}
.result-hero__sub { font-size: .855rem; color: var(--on-inverse-muted); margin-top: 7px; }

.result-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.result-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  background: var(--surface);
  font-size: .93rem;
}
.result-row__label { color: var(--muted); }
.result-row__value {
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.result-row--total { background: var(--surface-3); }
.result-row--total .result-row__label { color: var(--ink-2); font-weight: 560; }
.result-row--total .result-row__value { font-size: 1.06rem; }
.result-row--pos .result-row__value { color: var(--pos); }
.result-row--neg .result-row__value { color: var(--neg); }

.meter {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  overflow: hidden;
  display: flex;
}
.meter__fill { height: 100%; transition: width 420ms var(--ease); }
.meter__fill--brand { background: var(--brand); }
.meter__fill--pos { background: var(--pos); }
.meter__fill--neg { background: var(--neg); }
.meter__fill--muted { background: var(--line-2); }
.meter-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
  font-size: .835rem;
  color: var(--muted);
}
.meter-legend span { display: inline-flex; align-items: center; gap: 7px; }
.meter-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* Break-even-skala: förlust, nollpunkt och vinst på en axel */
.scale { margin-top: 4px; }
.scale__track {
  position: relative;
  height: 10px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  display: flex;
  overflow: visible;
}
.scale__seg { height: 100%; transition: width 420ms var(--ease); }
.scale__seg--loss {
  background: linear-gradient(90deg, rgba(155, 44, 44, .22), rgba(155, 44, 44, .55));
  border-radius: var(--r-pill) 0 0 var(--r-pill);
}
.scale__seg--profit {
  background: linear-gradient(90deg, rgba(15, 107, 79, .5), rgba(15, 107, 79, .85));
  border-radius: 0 var(--r-pill) var(--r-pill) 0;
}
.scale__be {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: left 420ms var(--ease);
}
.scale__marker {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--brand);
  box-shadow: var(--sh-sm);
  transition: left 420ms var(--ease);
}
.scale__axis {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  font-size: .78rem;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.scale__zones {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-size: .82rem;
}
.scale__zone { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.scale__zone b { color: var(--ink); font-weight: 600; }
.scale__zone i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* Status: tydlig text över eller under nollpunkten */
.verdict {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-radius: var(--r-md);
  font-size: .9rem;
  font-weight: 540;
  border: 1px solid var(--line);
  background: var(--surface);
}
.verdict svg { width: 17px; height: 17px; flex: 0 0 auto; }
.verdict--pos { background: var(--pos-tint); border-color: #CFE6DC; color: var(--pos); }
.verdict--neg { background: var(--neg-tint); border-color: #EFD3D3; color: var(--neg); }
.verdict--even { background: var(--brand-tint); border-color: var(--brand-tint-2); color: var(--brand); }

.note {
  display: flex;
  gap: 11px;
  padding: 13px 15px;
  border-radius: var(--r-md);
  font-size: .855rem;
  line-height: 1.55;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
}
.note svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; opacity: .8; }
.note--info { background: var(--brand-tint); border-color: var(--brand-tint-2); color: var(--ink-3); }
.note--warn { background: var(--note-tint); border-color: var(--note-line); color: var(--note-ink); }
.note a { font-weight: 560; }

.disclaimer { font-size: .805rem; color: var(--muted-2); line-height: 1.55; margin-top: 14px; }

/* ---------- 10. Rader & dokument ----------------------------------------- */
.lines { display: grid; gap: 10px; }
.line-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  grid-template-columns: repeat(4, minmax(0, 1fr)) 36px;
  align-items: end;
}
/* Följesedeln har inga pris- och momsfält */
.line-item--simple { grid-template-columns: repeat(2, minmax(0, 1fr)) 36px; }
.line-item__index {
  grid-column: 1 / -1;
  font-size: .705rem;
  font-weight: 640;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.line-item .field--desc { grid-column: 1 / -1; }
.line-item__sum {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
  color: var(--muted);
  padding-top: 6px;
  border-top: 1px dashed var(--line-2);
}
.line-item__sum b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 620; }
.line-item .field__label {
  font-size: .705rem;
  text-transform: uppercase;
  letter-spacing: .045em;
  color: var(--muted-2);
  font-weight: 620;
}
.line-item .input,
.line-item .select { padding: 8px 11px; font-size: .89rem; background: var(--surface); }
.line-item .select-wrap .select { padding-right: 30px; }
.line-item .select-wrap::after { right: 11px; width: 6px; height: 6px; }
.line-remove { align-self: end; margin-bottom: 3px; }

/* Formulär + förhandsvisning sida vid sida */
.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .94fr);
  gap: 28px;
  align-items: start;
}

.doc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 18px;
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-xs);
}
.doc-toolbar__spacer { flex: 1 1 auto; }

.doc-preview-wrap {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-3);
  overflow: hidden;
}
.doc-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.doc-preview-bar__title {
  font-size: .74rem;
  font-weight: 640;
  color: var(--muted-2);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.doc-preview-scroll { max-height: min(78vh, 980px); overflow: auto; padding: 18px; }

/* A4-liknande dokument */
.doc {
  width: 100%;
  max-width: 620px;
  margin-inline: auto;
  background: #fff;
  color: #2B3750;
  box-shadow: var(--sh-lg);
  padding: 40px 42px;
  font-size: 11.5px;
  line-height: 1.55;
  border-radius: 3px;
}
.doc__top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 30px;
}
.doc__brand { font-size: 17px; font-weight: 680; letter-spacing: -0.02em; color: #0A1020; }
.doc__brand span { display: block; font-size: 10.5px; font-weight: 400; color: #64708A; margin-top: 3px; }
.doc__type {
  text-align: right;
  font-size: 22px;
  font-weight: 680;
  letter-spacing: -0.03em;
  color: var(--brand);
  text-transform: uppercase;
  line-height: 1.1;
}
.doc__no { text-align: right; font-size: 11px; color: #64708A; margin-top: 3px; }
.doc__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-bottom: 24px; }
.doc__label {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #8A94A8;
  margin-bottom: 6px;
}
.doc__party b { display: block; font-size: 12.5px; font-weight: 640; color: #0A1020; margin-bottom: 2px; }
.doc__party span { display: block; color: #445068; }
.doc__meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-block: 1px solid #E4E9F0;
  margin-bottom: 22px;
}
.doc__meta div span {
  display: block;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8A94A8;
  margin-bottom: 3px;
}
.doc__meta div b { font-size: 11.5px; font-weight: 600; color: #16233A; }

.doc table { width: 100%; border-collapse: collapse; font-size: 11px; margin-bottom: 16px; }
.doc thead th {
  text-align: left;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8A94A8;
  padding: 0 0 7px;
  border-bottom: 1px solid #CBD3E0;
}
.doc tbody td {
  padding: 8px 0;
  border-bottom: 1px solid #EEF1F6;
  vertical-align: top;
  color: #2B3750;
}
.doc .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc__totals { display: flex; justify-content: flex-end; margin-bottom: 22px; }
.doc__totals table { width: min(285px, 100%); margin: 0; }
.doc__totals td { padding: 5px 0; border: 0; font-size: 11px; color: #445068; }
.doc__totals tr.grand td {
  border-top: 1.5px solid #0A1020;
  padding-top: 9px;
  font-size: 14px;
  font-weight: 680;
  color: #0A1020;
}
.doc__pay {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 16px;
  border-top: 1px solid #E4E9F0;
}
.doc__pay p { margin: 0 0 3px; color: #445068; font-size: 10.5px; }
/* Kvittensrader på följesedeln */
.doc__sign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 42px;
}
.doc__sign span {
  display: block;
  border-bottom: 1px solid #CBD3E0;
  height: 26px;
}
.doc__sign small {
  display: block;
  margin-top: 5px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #8A94A8;
}

.doc__foot {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid #E4E9F0;
  font-size: 9.5px;
  color: #8A94A8;
  text-align: center;
}
.doc__note {
  background: #F6F8FC;
  border-left: 2px solid var(--brand);
  padding: 10px 13px;
  margin-bottom: 18px;
  font-size: 10.5px;
  color: #445068;
}
.doc__empty { color: #A7B1C1; font-style: italic; }

/* ---------- 11. FAQ ------------------------------------------------------ */
.faq { display: grid; border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 20px 2px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.015rem;
  font-weight: 560;
  color: var(--ink);
  text-align: left;
  letter-spacing: -0.012em;
  transition: color var(--fast) var(--ease);
}
.faq__q:hover { color: var(--brand); }
.faq__icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  position: relative;
  transition: transform var(--mid) var(--ease);
  color: var(--muted-2);
}
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 2px;
  transition: opacity var(--fast) var(--ease);
}
.faq__icon::before { top: 9.5px; left: 3px; width: 14px; height: 1.5px; }
.faq__icon::after { left: 9.5px; top: 3px; width: 1.5px; height: 14px; }
.faq__q[aria-expanded="true"] .faq__icon { transform: rotate(90deg); color: var(--brand); }
.faq__q[aria-expanded="true"] .faq__icon::after { opacity: 0; }
.faq__a {
  display: none;
  padding: 0 44px 22px 2px;
  color: var(--muted);
  font-size: .955rem;
  line-height: 1.68;
}
.faq__a p:last-child { margin-bottom: 0; }
.faq__q[aria-expanded="true"] + .faq__a { display: block; animation: fadeSlide var(--mid) var(--ease); }

/* ---------- 12. Annonsplatser -------------------------------------------- */
.ad {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  contain: layout;
}
.ad::before {
  content: "Annons";
  position: absolute;
  top: 7px;
  left: 10px;
  font-size: .625rem;
  font-weight: 620;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #A9B3C4;
}
.ad__inner { width: 100%; }
/* Fasta minimihöjder så layouten aldrig hoppar när annonser laddas */
.ad--leaderboard { min-height: 106px; }
.ad--inline { min-height: 262px; }
.ad--sidebar { min-height: 620px; }
.ad-band { padding-block: clamp(26px, 3vw, 44px); }

/* Utan konfigurerat annonsnätverk döljs ytorna helt, i stället för att
   lämna tomma rutor. Sätts av consent.js utifrån adsenseClientId. */
.ads-off .ad,
.ads-off .ad-band { display: none; }

/* ---------- 13. Footer --------------------------------------------------- */
.site-footer {
  position: relative;
  background: var(--surface-inverse);
  color: var(--on-inverse-muted);
  padding-block: clamp(48px, 5vw, 72px) 30px;
  margin-top: auto;
  overflow: hidden;
}
/* Tunn ljuslinje längst upp, tonar ut mot kanterna */
.site-footer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(76, 143, 214, .55) 30%,
              rgba(76, 143, 214, .55) 70%, transparent);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    var(--grain),
    radial-gradient(760px 320px at 12% -10%, rgba(46, 109, 187, .16), transparent 70%),
    linear-gradient(to right, rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: auto, auto, 68px 68px, 68px 68px;
  opacity: .45;
}
.site-footer > .wrap { position: relative; z-index: 1; }
.site-footer a { color: var(--on-inverse-muted); font-size: .915rem; }
.site-footer a:hover { color: #fff; }
.footer__grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(auto-fit, minmax(150px, 1fr));
  gap: 40px 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-inverse);
}
.footer__brand .brand__name { color: #fff; }
.footer__brand p { margin-top: 14px; font-size: .915rem; max-width: 300px; line-height: 1.62; }
.footer__col h4 {
  color: #fff;
  font-size: .78rem;
  font-weight: 640;
  letter-spacing: .095em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.footer__col li { margin: 0; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 26px;
  font-size: .855rem;
  color: #7A879D;
}
.footer__bottom nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer__bottom a { font-size: .855rem; }
.footer__bottom > p { margin: 0; }

/* Kreditering */
.footer__credit {
  font-size: .82rem;
  color: #6B7890;
  letter-spacing: .01em;
}
.footer__credit a {
  font-size: inherit;
  color: var(--on-inverse-muted);
  font-weight: 560;
  position: relative;
  transition: color var(--fast) var(--ease);
}
.footer__credit a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  opacity: .3;
  transition: opacity var(--fast) var(--ease);
}
.footer__credit a:hover { color: #fff; }
.footer__credit a:hover::after { opacity: .8; }

/* ---------- 14. CTA-band -------------------------------------------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--ink);
  color: #fff;
  padding: clamp(34px, 4.2vw, 62px);
  text-align: center;
}
.cta-band { box-shadow: var(--sh-lg), var(--edge-dark); }
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(620px 300px at 22% 0%, rgba(46, 109, 187, .32), transparent 66%),
    radial-gradient(520px 280px at 88% 108%, rgba(18, 68, 127, .42), transparent 66%);
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    var(--grain),
    linear-gradient(to right, rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: auto, 68px 68px, 68px 68px;
  opacity: .4;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; margin-bottom: 14px; }
.cta-band p { color: var(--on-inverse-muted); max-width: 500px; margin-inline: auto; }
.cta-band .btn--primary { background: #fff; color: var(--ink); }
.cta-band .btn--primary:hover { background: #E9EFF7; color: var(--ink); }
.cta-band .btn--secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
}
.cta-band .btn--secondary:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .45);
  color: #fff;
}
.cta-band__cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }

/* ---------- 15. Övrigt ---------------------------------------------------- */
.related { display: grid; gap: 10px; }
.related__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink-2);
  font-size: .9rem;
  font-weight: 530;
  transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease),
              transform var(--fast) var(--ease);
}
.related__item:hover {
  border-color: var(--brand-tint-2);
  background: var(--brand-tint);
  color: var(--ink);
  transform: translateX(2px);
}
.related__item svg { width: 16px; height: 16px; color: var(--brand); flex: 0 0 auto; }

.cat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.cat-head h2 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.55rem); }
.cat-head__count {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted-2);
  background: var(--surface-3);
  border: 1px solid var(--line);
  padding: 2px 9px;
  border-radius: var(--r-pill);
}

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 14px);
  background: var(--ink);
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  font-size: .885rem;
  font-weight: 520;
  box-shadow: var(--sh-lg);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease);
}
.toast[data-show="true"] { opacity: 1; transform: translate(-50%, 0); }

/* Datatabell, t.ex. kaklistan i integritetspolicyn */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .865rem;
  margin: 4px 0 8px;
  min-width: 640px;
}
.data-table th {
  text-align: left;
  font-size: .72rem;
  font-weight: 640;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 0 14px 9px 0;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.data-table td {
  padding: 11px 14px 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  vertical-align: top;
  line-height: 1.5;
}
.data-table td:last-child, .data-table th:last-child { padding-right: 0; }
.data-table code {
  font-size: .82em;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: 2px 6px;
  white-space: nowrap;
}

/* Textknapp som öppnar cookieinställningarna mitt i brödtext */
.prose button[data-consent-open] {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--brand);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose button[data-consent-open]:hover { color: var(--brand-400); }

/* ---------- 15b. Cookie-samtycke ----------------------------------------- */

.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 250;
  padding: 16px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}
.consent[data-open="true"] { opacity: 1; transform: none; pointer-events: auto; }

.consent__card {
  width: 100%;
  max-width: 1000px;
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
  padding: clamp(18px, 2vw, 24px) clamp(20px, 2.4vw, 28px);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
}

.consent__body { flex: 1 1 auto; min-width: 0; }
.consent__title { font-size: 1.02rem; margin-bottom: 6px; letter-spacing: -0.018em; }
.consent__text {
  font-size: .885rem;
  line-height: 1.58;
  color: var(--muted);
  margin: 0;
  max-width: 62ch;
}
.consent__text a { font-weight: 550; }

.consent__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Godkänn och neka har samma storlek och form, bara olika fyllning. */
.consent__actions .btn--primary,
.consent__actions .btn--secondary { min-width: 168px; }

/* ---------- Inställningsdialog -------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 220ms var(--ease);
}
.modal[data-open="true"] { opacity: 1; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 32, .48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal__card {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  overflow: hidden;
  transform: translateY(10px) scale(.99);
  transition: transform 220ms var(--ease);
}
.modal[data-open="true"] .modal__card { transform: none; }

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
}
.modal__head h2 { font-size: 1.15rem; letter-spacing: -0.022em; }

.modal__close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.modal__close:hover { background: var(--surface-3); color: var(--ink); }

.modal__body {
  padding: 6px 24px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.modal__note {
  font-size: .8rem;
  line-height: 1.55;
  color: var(--muted-2);
  padding: 0 24px 16px;
  margin: 0;
}

.modal__foot {
  display: flex;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.modal__foot .btn { flex: 1 1 0; }

/* Kategori i dialogen */
.consent-cat { padding: 18px 0; border-bottom: 1px solid var(--line); }
.consent-cat:last-of-type { border-bottom: 0; }
.consent-cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}
.consent-cat__title {
  font-size: .995rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.012em;
  cursor: pointer;
}
.consent-cat__always {
  font-size: .74rem;
  font-weight: 620;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted-2);
  background: var(--surface-3);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  flex: 0 0 auto;
}
.consent-cat__text {
  font-size: .875rem;
  line-height: 1.58;
  color: var(--muted);
  margin: 0;
  max-width: 58ch;
}

/* Reglage */
.switch { position: relative; flex: 0 0 auto; display: inline-flex; }
.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.switch__track {
  display: block;
  width: 42px;
  height: 24px;
  border-radius: var(--r-pill);
  background: var(--line-2);
  position: relative;
  transition: background-color var(--mid) var(--ease);
}
.switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--sh-sm);
  transition: transform var(--mid) var(--ease);
}
.switch input:checked + .switch__track { background: var(--brand); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { box-shadow: var(--ring); }

/* Länken i sidfoten som öppnar dialogen igen */
.footer__bottom button[data-consent-open] {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: .855rem;
  color: var(--on-inverse-muted);
  cursor: pointer;
  transition: color var(--fast) var(--ease);
}
.footer__bottom button[data-consent-open]:hover { color: #fff; }

@media (max-width: 860px) {
  .consent { padding: 12px; }
  .consent__card { flex-direction: column; align-items: stretch; gap: 18px; }
  .consent__actions { flex-direction: column; align-items: stretch; }
  .consent__actions .btn { width: 100%; min-width: 0; }
  .consent__actions .btn--primary,
  .consent__actions .btn--secondary { min-width: 0; }
  .modal__foot { flex-direction: column; }
}

@media print {
  .consent, .modal { display: none !important; }
}

/* ---------- 16. Animationer ---------------------------------------------- */
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* Dölj-tillståndet gäller bara när JavaScript är aktivt (html.js sätts i <head>),
   så att innehållet alltid är synligt om skript saknas eller fallerar. */
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal[data-visible="true"] {
  opacity: 1;
  transform: none;
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}
.js .reveal[data-visible="true"]:nth-child(2) { transition-delay: 60ms; }
.js .reveal[data-visible="true"]:nth-child(3) { transition-delay: 120ms; }
.js .reveal[data-visible="true"]:nth-child(4) { transition-delay: 180ms; }
.js .reveal[data-visible="true"]:nth-child(5) { transition-delay: 60ms; }
.js .reveal[data-visible="true"]:nth-child(6) { transition-delay: 120ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* FAQ-svaren är öppna utan JavaScript så att innehållet alltid går att läsa. */
html:not(.js) .faq__a { display: block; }
html:not(.js) .faq__icon { display: none; }
html:not(.js) .faq__q { cursor: default; }

/* ---------- 17. Responsivt ----------------------------------------------- */
@media (max-width: 1080px) {
  .tool-layout { grid-template-columns: 1fr; }
  .tool-layout__aside { position: static; }
  .ad--sidebar { display: none; }
}

@media (max-width: 1080px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-preview-wrap { position: static; }
}

@media (max-width: 900px) {
  .calc { grid-template-columns: 1fr; }
  .calc__output { border-left: 0; border-top: 1px solid var(--line); }
  .doc-preview-scroll { max-height: none; }
}

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__actions .btn--nav { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav { justify-content: space-between; }
  .footer__grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
  .ad--leaderboard { min-height: 262px; }
}

@media (max-width: 720px) {
  .wrap { padding-inline: 18px; }
  .line-item { grid-template-columns: 1fr 1fr; }
  .line-remove { grid-column: 1 / -1; justify-self: start; }
  .doc { padding: 24px 22px; font-size: 10.5px; }
  .doc__cols,
  .doc__pay { grid-template-columns: 1fr; gap: 16px; }
  .doc__meta { grid-template-columns: repeat(2, 1fr); }
  .form-grid--2 { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .segmented { flex-wrap: wrap; }
  .segmented__btn { flex: 1 1 40%; }
  .hero__cta .btn { width: 100%; }
}

/* ---------- 18. Utskrift -------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .ad,
  .no-print,
  .doc-preview-bar { display: none !important; }
  body { background: #fff; }
  .doc { box-shadow: none; max-width: none; padding: 0; }
  .doc-preview-scroll { max-height: none; overflow: visible; padding: 0; }
  .doc-preview-wrap { border: 0; background: #fff; }
}
