/* Blixtflow – de juridiska sidorna: lugn hjälte med dokumentflikar, "I korthet", innehållsförteckning
   som följer med (legal.js markerar avsnittet man läser), läsmätare, tabeller och utskrift. */

/* ==========================================================================
   Hjälten
   ========================================================================== */
.lg-hero { position: relative; isolation: isolate; overflow: clip; padding: calc(var(--header-h) + env(safe-area-inset-top) + 26px) 0 calc(var(--sheet-r) + 46px); color: #fff; background: var(--natt); }
.lg-hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.lg-hero__bg::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(200, 168, 242, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(200, 168, 242, .07) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(70% 90% at 70% 0%, #000, transparent 75%); mask-image: radial-gradient(70% 90% at 70% 0%, #000, transparent 75%); }
.lg-hero__bg i { position: absolute; border-radius: 50%; filter: blur(70px); }
.lg-hero__bg i:nth-child(1) { right: -8%; top: -30%; width: 46vw; height: 46vw; background: rgba(155, 93, 229, .38); }
.lg-hero__bg i:nth-child(2) { left: -10%; bottom: -40%; width: 34vw; height: 34vw; background: rgba(242, 250, 163, .08); }
.motion .lg-hero__bg i:nth-child(1) { animation: drift-a 18s ease-in-out infinite alternate; }
.lg-hero__title { max-width: 16ch; font-size: clamp(2.3rem, 5.6vw, 4.2rem); font-weight: 800; line-height: 1.02; letter-spacing: -.035em; text-wrap: balance; }
.lg-hero__lead { max-width: 640px; margin-top: 18px; font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.6; color: var(--on-dark-muted); }
.lg-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.lg-meta li { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; font-size: .86rem; color: var(--on-dark-muted); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--on-dark-line); }
.lg-meta b { font-weight: 700; color: #fff; }
.lg-meta .ic { width: 15px; height: 15px; color: var(--gnista); }
.lg-meta__print { padding: 0 !important; background: none !important; box-shadow: none !important; }
.lg-print { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-size: .86rem; font-weight: 700; color: var(--natt); background: var(--gnista); transition: transform .3s var(--spring); }
.lg-print:hover { transform: translateY(-2px); }
.lg-print .ic { width: 15px; height: 15px; color: var(--natt); }
.lg-docs { margin-top: 30px; }
.lg-docs ul { display: flex; gap: 6px; overflow-x: auto; padding: 5px; border-radius: 18px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--on-dark-line); scrollbar-width: none; }
.lg-docs ul::-webkit-scrollbar { display: none; }
.lg-docs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 13px; font-size: .9rem; font-weight: 650; white-space: nowrap; color: var(--on-dark-muted); transition: background-color .25s, color .25s; }
.lg-docs a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.lg-docs a[aria-current] { color: var(--natt); background: #fff; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); }
.lg-docs .ic { width: 16px; height: 16px; }
.lg-docs a[aria-current] .ic { color: var(--primar-ink); }

/* Läsmätaren */
.lg-progress { position: fixed; left: 0; right: 0; top: 0; z-index: 60; height: 3px; pointer-events: none; }
.lg-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--primar), var(--gnista)); transform: scaleX(var(--read, 0)); transform-origin: 0 50%; }

/* ==========================================================================
   I korthet
   ========================================================================== */
.lg-body { padding-top: clamp(48px, 6vw, 80px); padding-bottom: calc(clamp(76px, 10vw, 136px) + var(--sheet-r)); }
.lg-sum { max-width: 1100px; margin: 0 auto clamp(40px, 6vw, 70px); padding: clamp(22px, 3vw, 34px); border-radius: 28px; background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow-2); }
.lg-sum__h { display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px; border-radius: 999px; font-size: .9rem; font-weight: 800; color: var(--natt); background: var(--gnista); }
.lg-sum__h .ic { width: 15px; height: 15px; }
.lg-sum__list { display: grid; gap: 14px; margin-top: 20px; }
@media (min-width: 720px) { .lg-sum__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lg-sum__list li { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 16px; border-radius: 18px; background: var(--ljus); }
.lg-sum__list span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--primar-ink), var(--natt)); }
.lg-sum__list span .ic { width: 19px; height: 19px; }
.lg-sum__list h3 { font-size: 1rem; font-weight: 800; }
.lg-sum__list p { margin-top: 3px; font-size: .92rem; line-height: 1.55; color: var(--ink-2); }
.reveal-on .lg-sum__list li { opacity: 0; transform: translateY(12px); }
.reveal-on .is-in .lg-sum__list li { opacity: 1; transform: none; transition: opacity .45s, transform .6s var(--ease-out); transition-delay: calc(.15s + var(--i) * .08s); }
.lg-sum__note { margin-top: 16px; font-size: .84rem; color: var(--muted); }

/* ==========================================================================
   Innehållet
   ========================================================================== */
.lg-grid { display: grid; gap: 34px; max-width: 1100px; margin-inline: auto; }
@media (min-width: 1000px) { .lg-grid { grid-template-columns: 270px minmax(0, 1fr); gap: 56px; } }
.lg-toc__in { padding: 18px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
@media (min-width: 1000px) { .lg-toc__in { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; } }
.lg-toc__h { margin-bottom: 8px; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lg-toc ol { display: grid; gap: 2px; }
.lg-toc a { display: grid; grid-template-columns: 26px 1fr; gap: 6px; padding: 7px 8px; border-radius: 10px; font-size: .88rem; line-height: 1.35; color: var(--ink-2); transition: background-color .2s, color .2s; }
.lg-toc a span { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); }
.lg-toc a:hover { background: var(--ljus); }
.lg-toc a.is-on { font-weight: 700; color: var(--natt); background: #F1E9FC; }
.lg-toc a.is-on span { color: var(--primar-ink); }
@media (max-width: 999px) {
  .lg-toc ol { grid-template-columns: minmax(0, 1fr); max-height: 280px; overflow-y: auto; }
}

.lg-doc { min-width: 0; }
.lg-sec { scroll-margin-top: calc(var(--header-h) + 20px); padding-bottom: 34px; margin-bottom: 34px; border-bottom: 1px solid var(--line); }
.lg-sec h2 { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: 12px; font-size: clamp(1.3rem, 2.2vw, 1.65rem); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
.lg-sec__n { flex: none; display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 11px; font-size: .9rem; color: var(--primar-ink); background: #F1E9FC; transform: translateY(-3px); }
.lg-anchor { margin-left: 2px; padding: 0 6px; border-radius: 6px; font-size: .95em; color: var(--ton); opacity: 0; transition: opacity .2s, color .2s; }
.lg-sec h2:hover .lg-anchor, .lg-anchor:focus-visible { opacity: 1; }
.lg-anchor:hover { color: var(--primar-ink); }
@media (hover: none) { .lg-anchor { opacity: .6; } }

.lg-prose { margin-top: 14px; font-size: 1rem; line-height: 1.75; color: var(--ink-2); }
.lg-prose > * + * { margin-top: 14px; }
.lg-prose h3 { margin-top: 26px; font-size: 1.08rem; font-weight: 800; color: var(--ink); }
.lg-prose strong { font-weight: 700; color: var(--ink); }
.lg-prose a { font-weight: 600; color: var(--primar-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.lg-prose a:hover { color: var(--natt); }
.lg-prose ul, .lg-prose ol { display: grid; gap: 8px; padding-left: 0; }
.lg-prose ul > li { position: relative; padding-left: 24px; }
.lg-prose ul > li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 8px; height: 8px; border-radius: 3px; background: var(--primar); transform: rotate(45deg); }
.lg-prose ol { counter-reset: lg; }
.lg-prose ol > li { position: relative; padding-left: 34px; counter-increment: lg; }
.lg-prose ol > li::before { content: counter(lg, lower-alpha) ")"; position: absolute; left: 4px; top: 0; font-weight: 800; color: var(--primar-ink); }
.lg-note { padding: 16px 18px; border-radius: 16px; background: #FBFDE3; box-shadow: inset 3px 0 0 var(--gnista), inset 0 0 0 1px #EEF2B8; color: var(--ink); }
.lg-note--info { background: #F4EEFC; box-shadow: inset 3px 0 0 var(--primar), inset 0 0 0 1px #E4D6F7; }
.lg-defs { display: grid; gap: 10px; }
.lg-defs div { display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
@media (min-width: 700px) { .lg-defs div { grid-template-columns: 200px 1fr; gap: 16px; } }
.lg-defs dt { font-weight: 800; color: var(--ink); }
.lg-defs dd { margin: 0; }

/* Tabeller – rullar i sidled inuti sin ruta på små skärmar */
.lg-table { overflow-x: auto; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.lg-table table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: .9rem; line-height: 1.5; }
.lg-table th { padding: 12px 14px; text-align: left; font-size: .76rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--ljus); }
.lg-table td { padding: 13px 14px; vertical-align: top; border-top: 1px solid var(--line-2); }
.lg-table td:first-child { font-weight: 700; color: var(--ink); }
.lg-table tr:hover td { background: #FCFAFE; }
.lg-tag { display: inline-block; margin: 0 4px 4px 0; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; color: var(--primar-ink); background: #F1E9FC; }
.lg-tag--eu { color: #1d6b3a; background: var(--ok-soft); }
.lg-tag--us { color: #8a5a00; background: #FFF4D6; }

/* Kontakt och slut */
.lg-contact { display: grid; gap: 24px; margin-top: 10px; padding: clamp(22px, 3vw, 34px); border-radius: 26px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #5b2a80, var(--natt) 60%); box-shadow: var(--shadow-3); }
@media (min-width: 760px) { .lg-contact { grid-template-columns: 1fr 1fr; align-items: center; } }
.lg-contact h2 { font-size: 1.4rem; font-weight: 800; }
.lg-contact p { margin: 6px 0 16px; color: var(--on-dark-muted); }
.lg-contact .btn .ic { width: 17px; height: 17px; }
.lg-contact dl { display: grid; gap: 10px; }
.lg-contact dl div { display: grid; gap: 2px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.lg-contact dt { font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ton); }
.lg-contact dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.lg-contact dd a { color: var(--gnista); }
.lg-top { margin-top: 22px; text-align: center; }
.lg-top a { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 700; color: var(--primar-ink); }
.lg-top .ic { width: 15px; height: 15px; transform: rotate(-90deg); }
.lg-toast { position: fixed; left: 50%; bottom: 24px; z-index: 70; padding: 10px 18px; border-radius: 999px; font-size: .9rem; font-weight: 700; color: var(--natt); background: var(--gnista); box-shadow: 0 20px 40px -14px rgba(0, 0, 0, .5); opacity: 0; transform: translate(-50%, 12px); transition: opacity .25s, transform .4s var(--spring); pointer-events: none; }
.lg-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   Navet (Juridiskt)
   ========================================================================== */
.lg-hub__top { display: grid; gap: 30px; align-items: center; }
@media (min-width: 900px) { .lg-hub__top { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); } }
.lg-seal { position: relative; display: grid; place-items: center; width: min(320px, 70vw); aspect-ratio: 1; margin-inline: auto; }
.lg-seal__ring { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed rgba(200, 168, 242, .4); }
.lg-seal__ring--2 { inset: 16%; border: 3px solid rgba(242, 250, 163, .25); border-top-color: var(--gnista); }
.motion .lg-seal__ring { animation: lg-spin 50s linear infinite; }
.motion .lg-seal__ring--2 { animation-duration: 10s; animation-direction: reverse; }
.lg-seal__core { display: grid; place-items: center; width: 42%; aspect-ratio: 1; border-radius: 30%; color: var(--primar-ink); background: linear-gradient(150deg, #fff, var(--ton)); box-shadow: 0 0 0 10px rgba(155, 93, 229, .2), 0 40px 80px -20px rgba(155, 93, 229, .8); }
.lg-seal__core .ic { width: 56%; height: 56%; stroke-width: 1.3; }
.lg-seal__tag { position: absolute; padding: 7px 14px; border-radius: 999px; font-size: .82rem; font-weight: 800; white-space: nowrap; color: var(--natt); background: #fff; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .8); }
.lg-seal__tag--1 { left: 0; top: 16%; }
.lg-seal__tag--2 { right: -6%; top: 46%; color: var(--natt); background: var(--gnista); }
.lg-seal__tag--3 { left: 8%; bottom: 8%; }
.motion .lg-seal__tag { animation: bob 6s ease-in-out infinite; }
.motion .lg-seal__tag--2 { animation-delay: -2s; }
.motion .lg-seal__tag--3 { animation-delay: -4s; }
.lg-hub { padding-bottom: calc(clamp(76px, 10vw, 136px) + var(--sheet-r)); }
.lg-cards { display: grid; gap: 16px; max-width: 1100px; margin-inline: auto; }
@media (min-width: 680px) { .lg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .lg-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lg-card { position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; height: 100%; overflow: hidden; padding: 26px; border-radius: 26px; color: var(--ink); background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow-1); transition: transform .45s var(--spring), box-shadow .45s; }
.lg-card::after { content: ""; position: absolute; right: -50px; top: -50px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(155, 93, 229, .16), transparent 70%); transition: transform .6s var(--ease-out); }
.lg-card:hover { transform: translateY(-5px); box-shadow: 0 0 0 1px var(--ton), var(--shadow-2); }
.lg-card:hover::after { transform: scale(1.5); }
.lg-card__ic { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; color: #fff; background: linear-gradient(135deg, var(--primar-ink), var(--natt)); }
.lg-card__ic .ic { width: 23px; height: 23px; }
.lg-card h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.lg-card p { font-size: .94rem; line-height: 1.55; color: var(--muted); }
.lg-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.lg-card__foot small { font-size: .78rem; color: var(--muted); }
.lg-card__foot b { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--primar-ink); }
.lg-card__foot .ic { width: 15px; height: 15px; transition: transform .3s var(--spring); }
.lg-card:hover .lg-card__foot .ic { transform: translateX(4px); }
.lg-hub__grid { display: grid; gap: 16px; max-width: 1100px; margin: clamp(36px, 5vw, 56px) auto 0; }
@media (min-width: 900px) { .lg-hub__grid { grid-template-columns: 1.15fr .85fr; } }
.lg-facts { padding: 26px; border-radius: 26px; background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }
.lg-facts h2, .lg-delete h2 { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 800; }
.lg-facts h2 .ic { width: 20px; height: 20px; color: var(--primar-ink); }
.lg-facts dl { display: grid; margin-top: 14px; }
.lg-facts dl div { display: grid; gap: 2px 16px; padding: 11px 0; border-top: 1px solid var(--line-2); }
@media (min-width: 560px) { .lg-facts dl div { grid-template-columns: 190px 1fr; } }
.lg-facts dt { font-size: .86rem; color: var(--muted); }
.lg-facts dd { margin: 0; font-weight: 650; }
.lg-delete { padding: 26px; border-radius: 26px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #5b2a80, var(--natt) 60%); box-shadow: var(--shadow-3); scroll-margin-top: calc(var(--header-h) + 20px); }
.lg-delete__ic { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px; border-radius: 14px; color: var(--natt); background: var(--gnista); }
.lg-delete__ic .ic { width: 22px; height: 22px; }
.lg-delete p { margin-top: 8px; color: var(--on-dark-muted); }
.lg-delete__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px !important; }
.lg-delete .btn .ic { width: 16px; height: 16px; }

@keyframes lg-spin { to { rotate: 360deg; } }

/* ==========================================================================
   Utskrift / PDF
   ========================================================================== */
@media print {
  .site-header, .site-footer, .loader, .lg-docs, .lg-toc, .lg-progress, .lg-print, .lg-anchor, .lg-top, .lg-toast, .skip, .lg-hero__bg { display: none !important; }
  body, .lg-body, .lg-hero { color: #000 !important; background: #fff !important; }
  .lg-hero { padding: 0 0 16px; }
  .lg-hero__title { font-size: 26pt; }
  .lg-hero__lead, .lg-meta li, .lg-meta b { color: #333 !important; }
  .lg-meta li { box-shadow: none; background: none; padding: 0 12px 0 0; }
  .crumbs { display: none; }
  .sheet { border-radius: 0 !important; box-shadow: none !important; margin: 0 !important; }
  .lg-grid { display: block; }
  .lg-sum, .lg-contact, .lg-table, .lg-defs div { box-shadow: 0 0 0 1px #ccc !important; }
  .lg-contact { color: #000; background: #fff; }
  .lg-contact p, .lg-contact dt, .lg-contact dd, .lg-contact dd a { color: #000 !important; }
  .lg-contact .btn { display: none; }
  .lg-sec { break-inside: auto; page-break-inside: auto; }
  .lg-sec h2 { break-after: avoid; }
  .lg-prose a::after { content: " (" attr(href) ")"; font-weight: 400; font-size: .85em; }
  [data-reveal], .reveal-on [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* Långa svenska ord (Personuppgiftsbiträdesavtal) får brytas på smala skärmar. */
.lg-hero__title, .lg-sec h2, .lg-card h2, .lg-toc a, .lg-docs a, .lg-prose { overflow-wrap: break-word; hyphens: auto; }
.lg-sum__list a { font-weight: 650; color: var(--primar-ink); text-decoration: underline; text-underline-offset: 3px; }

/* Webbplatskartan */
.sm-grid { display: grid; gap: 16px; max-width: 1100px; margin-inline: auto; }
@media (min-width: 700px) { .sm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1060px) { .sm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sm-group { padding: 22px; border-radius: 24px; background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }
.sm-group h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 1.15rem; font-weight: 800; }
.sm-group h2 span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--primar-ink), var(--natt)); }
.sm-group h2 .ic { width: 18px; height: 18px; }
.sm-group ul { display: grid; gap: 2px; }
.sm-group a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 10px; font-weight: 600; color: var(--ink-2); transition: background-color .2s, color .2s; }
.sm-group a:hover { color: var(--primar-ink); background: var(--ljus); }
.sm-group a .ic { flex: none; width: 15px; height: 15px; opacity: .4; transition: transform .25s var(--spring), opacity .2s; }
.sm-group a:hover .ic { opacity: 1; transform: translateX(3px); }
.sm-xml { font-weight: 700; color: var(--gnista); text-decoration: underline; text-underline-offset: 3px; }
