/* ═══════════════════════════════════════════════════════════════
   CONNECTIFY NORDIC — legal.css
   Gjelder personvern.html, vilkar.html, cookies.html og 404.html.
   Bygger på light.css (lastes før denne). HVER regel starter med
   .cn-lt. Klassene har prefikset lg-.
   Oppsett: sidehode på blågrå flate, selve dokumentet på hvit flate
   med innholdsfortegnelse i egen spalte, avslutning på blågrå flate.
═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════
   SIDEHODE
═══════════════════════════════════════ */
.cn-lt .lg-head .lt-lead {
  max-width: 44rem;
  color: var(--lt-muted);
}
.cn-lt .lg-meta,
.cn-lt .lg-disclaimer {
  max-width: none;
  font-size: var(--lt-fs-cap);
  line-height: 1.5;
}
.cn-lt .lg-meta {
  margin-top: 1.75rem;
  color: var(--lt-ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cn-lt .lg-disclaimer {
  margin-top: 0.25rem;
}

/* ═══════════════════════════════════════
   DOKUMENT: innholdsfortegnelse + brødtekst
═══════════════════════════════════════ */
.cn-lt .lg-layout {
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 7vw, 7rem);
}

.cn-lt .lg-toc {
  position: sticky;
  top: 6.5rem;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
}
.cn-lt main .lg-toc h2 {
  margin-bottom: 0.875rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: var(--lt-fs-cap);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}
.cn-lt .lg-toc ul {
  display: grid;
  gap: 0.125rem;
}
.cn-lt .lg-toc a {
  display: block;
  padding: 0.375rem 0;
  color: var(--lt-muted);
  font-size: var(--lt-fs-small);
  line-height: 1.4;
  transition: color 180ms var(--lt-ease);
}
.cn-lt .lg-toc a:hover {
  color: var(--lt-primary-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Lesbar spalte: ca. 70 tegn. */
.cn-lt .lg-body {
  max-width: 70ch;
  color: var(--lt-muted);
}
.cn-lt main .lg-body h2 {
  margin: 3.25rem 0 1rem;
  font-size: clamp(1.375rem, 2vw, 1.625rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.cn-lt main .lg-body h2:first-child {
  margin-top: 0;
}
.cn-lt main .lg-body h3 {
  margin: 2rem 0 0.625rem;
  font-size: 1.125rem;
}
.cn-lt .lg-body h2[id],
.cn-lt .lg-body h3[id] {
  scroll-margin-top: 6.5rem;
}
.cn-lt .lg-body p {
  max-width: none;
  margin-bottom: 1rem;
}
.cn-lt .lg-body ul {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}
.cn-lt .lg-body ul li {
  position: relative;
  padding-left: 1.25rem;
}
.cn-lt .lg-body ul li::before {
  content: "";
  position: absolute;
  left: 0.125rem;
  top: 0.7em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lt-line-strong);
}
.cn-lt .lg-body strong {
  color: var(--lt-ink);
  font-weight: 600;
}
.cn-lt .lg-body a {
  color: var(--lt-primary);
  text-decoration: underline;
  text-decoration-color: var(--lt-line-strong);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: color 180ms var(--lt-ease), text-decoration-color 180ms var(--lt-ease);
}
.cn-lt .lg-body a:hover {
  color: var(--lt-primary-strong);
  text-decoration-color: currentColor;
}
.cn-lt .lg-body code {
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  background: var(--lt-tint);
  color: var(--lt-ink);
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

/* Fremhevet blokk (kontaktopplysninger): flate, ingen ramme. */
.cn-lt .lg-callout {
  margin: 1.25rem 0 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--lt-radius);
  background: var(--lt-tint);
}
.cn-lt .lg-callout p {
  margin: 0;
  color: var(--lt-muted);
  line-height: 1.7;
}

/* Knappen som åpner samtykkeboksen på nytt (cookies.html). */
.cn-lt .lg-body .cn-consent-reopen {
  color: var(--lt-primary);
  font-weight: 600;
  text-decoration-color: var(--lt-line-strong);
  text-underline-offset: 3px;
}
.cn-lt .lg-body .cn-consent-reopen:hover {
  color: var(--lt-primary-strong);
  text-decoration-color: currentColor;
}
.cn-lt .lg-body .cn-consent-reopen:focus-visible {
  outline: 2px solid var(--lt-primary);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════
   TABELL (cookies.html)
   Bred skjerm: vanlig tabell. Smal skjerm: ruller sidelengs inne i
   rammen, så siden selv aldri får horisontal scroll.
═══════════════════════════════════════ */
.cn-lt .lg-table-wrap {
  margin: 1.5rem 0 0.75rem;
  border: 1px solid var(--lt-edge);
  border-radius: var(--lt-radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.cn-lt .lg-table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: var(--lt-fs-small);
  line-height: 1.5;
}
.cn-lt .lg-table th,
.cn-lt .lg-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--lt-line);
  text-align: left;
  vertical-align: top;
}
.cn-lt .lg-table thead th {
  border-bottom-color: var(--lt-edge);
  background: var(--lt-bg);
  color: var(--lt-ink);
  font-size: var(--lt-fs-cap);
  font-weight: 600;
  white-space: nowrap;
}
.cn-lt .lg-table tbody tr:last-child td {
  border-bottom: 0;
}
.cn-lt .lg-body .lg-table-note {
  margin-bottom: 1.5rem;
  font-size: var(--lt-fs-cap);
}

/* ═══════════════════════════════════════
   404
═══════════════════════════════════════ */
.cn-lt .lg-notfound {
  display: flex;
  align-items: center;
  min-height: 78vh;
  min-height: 78svh;
  padding: clamp(8rem, 12vw, 10rem) 0 clamp(4rem, 8vw, 6rem);
}
.cn-lt .lg-notfound .lt-lead {
  max-width: 36rem;
  margin: 1.25rem 0 2.25rem;
}

/* ═══════════════════════════════════════
   RESPONSIVT
═══════════════════════════════════════ */
@media (max-width: 1024px) {
  .cn-lt .lg-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }
  .cn-lt .lg-toc {
    position: static;
    max-height: none;
    overflow: visible;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--lt-edge);
  }
  .cn-lt .lg-toc ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
  }
}

@media (max-width: 560px) {
  .cn-lt .lg-toc ul {
    grid-template-columns: minmax(0, 1fr);
  }
  .cn-lt .lg-toc a {
    padding: 0.625rem 0;
  }
  .cn-lt .lg-callout {
    padding: 1rem 1.125rem;
  }
  .cn-lt .lg-notfound .v3-btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cn-lt .lg-toc a,
  .cn-lt .lg-body a {
    transition: none;
  }
}
