/* ==========================================================
   TeoriMentor – artikkelmal (.article-*)
   Last NÅ ETTER /brand.css. Bruker variablene derfra
   (--navy --coral --ink --muted --line --soft). Ingen inline style (CSP).
   Erstatter de gamle reglene .article, .crumbs, .toc, .faq, .pass-cta
   i brand.css for artikkelsidene (se spec: slett dem eller la dem ligge,
   de er ikke lenger i bruk fordi klassene byttes til .article-*).
   ========================================================== */

.article-page {
  --a-navy: var(--navy, #2b2f8f);
  --a-navy-dark: var(--navy-dark, #1d216e);
  --a-coral: var(--coral, #f2846b);
  --a-coral-dark: var(--coral-dark, #e06d52);
  --a-ink: #17182b;
  --a-body: #2a2d45;
  --a-muted: var(--muted, #5c6078);
  --a-line: var(--line, #e6e7f2);
  --a-soft: var(--soft, #f4f5fb);
  --a-cream: #fbf6ef;
  --a-header-h: 76px;
  --a-radius: 20px;
  --a-radius-sm: 14px;
  --a-shadow: 0 18px 50px rgba(23, 24, 43, 0.08);
  --a-shadow-sm: 0 6px 20px rgba(23, 24, 43, 0.06);
  background: #fff;
}
.article-page main { display: block; }
.article-page .article-wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

/* ---------- HERO / ARTIKKELHODE ---------- */
.article-hero {
  background: linear-gradient(180deg, var(--a-cream) 0%, #fff 100%);
  border-bottom: 1px solid var(--a-line);
  padding: 20px 0 28px;
}
.article-hero-grid { display: grid; gap: 22px; align-items: center; }
.article-crumbs { margin: 0 0 16px; font-size: 0.875rem; color: var(--a-muted); }
.article-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; }
.article-crumbs li { display: inline-flex; align-items: center; gap: 8px; }
.article-crumbs li + li::before { content: "›"; color: #a3a7c0; }
.article-crumbs a { color: var(--a-navy); font-weight: 700; text-decoration: none; }
.article-crumbs a:hover { text-decoration: underline; }
.article-crumbs [aria-current] { color: var(--a-muted); font-weight: 600; }

.article-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  background: #eef0ff; color: var(--a-navy);
  font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.02em;
  border-radius: 999px; padding: 6px 12px; margin: 0 0 14px;
}
.article-title {
  margin: 0; color: var(--a-ink);
  font-size: 2rem; line-height: 1.12; font-weight: 800; letter-spacing: -0.035em;
  text-wrap: balance;
}
.article-lead { margin: 16px 0 0; color: var(--a-muted); font-size: 1.0625rem; line-height: 1.6; max-width: 38rem; }
.article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  margin: 20px 0 0; padding: 0; list-style: none;
  font-size: 0.875rem; font-weight: 600; color: var(--a-muted);
}
.article-meta li { display: inline-flex; align-items: center; gap: 8px; }
@media (min-width: 560px) { .article-meta li + li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #b8bcd6; } }
.article-meta img { width: 28px; height: 28px; border-radius: 8px; }
.article-hero-art { display: none; }
.article-hero-art img { width: 100%; height: auto; border-radius: var(--a-radius); box-shadow: var(--a-shadow); }

/* ---------- LAYOUT ---------- */
.article-layout { display: block; padding: 24px 0 8px; }
.article-aside { margin: 0 0 28px; }
.article-main { min-width: 0; }

/* ---------- INNHOLD (TOC) ---------- */
.article-toc {
  background: var(--a-soft); border: 1px solid var(--a-line);
  border-radius: var(--a-radius-sm); overflow: hidden;
}
.article-toc > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 0 16px; cursor: pointer; list-style: none;
  font-size: 0.9375rem; font-weight: 800; color: var(--a-ink);
}
.article-toc > summary::-webkit-details-marker { display: none; }
.article-toc > summary::after {
  content: ""; width: 10px; height: 10px; flex: none;
  border-right: 2px solid var(--a-navy); border-bottom: 2px solid var(--a-navy);
  transform: rotate(45deg) translateY(-2px); transition: transform 0.2s ease;
}
.article-toc[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.article-toc ol { list-style: none; counter-reset: toc; margin: 0; padding: 0 8px 10px; }
.article-toc li { counter-increment: toc; margin: 0; }
.article-toc a {
  display: flex; gap: 10px; align-items: baseline;
  padding: 9px 10px; border-radius: 10px;
  font-size: 0.9375rem; line-height: 1.35; font-weight: 600;
  color: var(--a-body); text-decoration: none;
}
.article-toc a::before { content: counter(toc); flex: none; width: 1.4em; font-weight: 800; color: var(--a-coral-dark); font-variant-numeric: tabular-nums; }
.article-toc a:hover { background: #fff; color: var(--a-navy); }
.article-toc a[aria-current="true"] { background: #fff; color: var(--a-navy); font-weight: 800; box-shadow: inset 3px 0 0 var(--a-coral); }

/* Mini-CTA i sidekolonnen (kun desktop) */
.article-side-cta { display: none; }

/* ---------- BRØDTEKST ---------- */
.article-prose { color: var(--a-body); font-size: 1.0625rem; line-height: 1.72; font-weight: 500; counter-reset: sec; }
.article-prose > :first-child { margin-top: 0; }
.article-prose p { margin: 0 0 1.15em; max-width: 68ch; }
.article-prose a { color: var(--a-navy); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(43, 47, 143, 0.35); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.article-prose a:hover { text-decoration-color: var(--a-coral); }
.article-prose strong { color: var(--a-ink); font-weight: 800; }
.article-prose em { font-style: italic; }

/* Første avsnitt = ingress */
.article-prose > p:first-child { font-size: 1.1875rem; line-height: 1.65; color: var(--a-ink); font-weight: 600; }

.article-prose h2 {
  counter-increment: sec;
  margin: 2.6rem 0 0.7rem; padding-top: 2rem;
  border-top: 1px solid var(--a-line);
  font-size: 1.5rem; line-height: 1.2; font-weight: 800; letter-spacing: -0.025em; color: var(--a-ink);
  scroll-margin-top: calc(var(--a-header-h) + 16px);
  max-width: 30ch; text-wrap: balance;
}
.article-prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.article-prose h2::before {
  content: counter(sec, decimal-leading-zero);
  display: block; margin-bottom: 8px;
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.14em; color: var(--a-coral-dark);
}
.article-prose h3 { margin: 1.8rem 0 0.4rem; font-size: 1.125rem; line-height: 1.3; font-weight: 700; color: var(--a-ink); letter-spacing: -0.015em; }

/* ---------- CALLOUT (pakker inn eksisterende avsnitt) ---------- */
.article-callout {
  position: relative; margin: 2.4rem 0 1.6rem;
  background: linear-gradient(180deg, #fff 0%, #fff7f4 100%);
  border: 1px solid #f9d9cf; border-left: 5px solid var(--a-coral);
  border-radius: var(--a-radius-sm); padding: 22px 20px 6px;
  box-shadow: var(--a-shadow-sm);
}
.article-prose .article-callout h2 { margin: 0 0 0.6rem; padding: 0; border: 0; max-width: none; }
.article-prose .article-callout h2::before { content: none; }
.article-callout p { max-width: none; }
.article-callout-label {
  display: inline-block; margin: 0 0 10px;
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--a-coral-dark);
}

/* ---------- FAQ ---------- */
.article-faq { margin: 2.6rem 0 0; }
.article-faq h2 { margin-bottom: 1.1rem; }
.article-faq details {
  background: #fff; border: 1px solid var(--a-line); border-radius: var(--a-radius-sm);
  margin: 0 0 10px; transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.article-faq details[open] { border-color: #cfd3f5; box-shadow: var(--a-shadow-sm); }
.article-faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px; cursor: pointer; list-style: none;
  font-size: 1rem; line-height: 1.4; font-weight: 700; color: var(--a-ink);
}
.article-faq summary::-webkit-details-marker { display: none; }
.article-faq summary::after {
  content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--a-soft); color: var(--a-navy);
  font-size: 1.25rem; font-weight: 700; line-height: 1;
}
.article-faq details[open] summary::after { content: "–"; background: var(--a-navy); color: #fff; }
.article-faq summary:focus-visible { outline: 3px solid var(--a-coral); outline-offset: 2px; border-radius: var(--a-radius-sm); }
.article-faq details > p { margin: 0; padding: 0 18px 18px; color: var(--a-muted); font-size: 1rem; line-height: 1.65; max-width: none; }

/* ---------- KILDER ---------- */
.article-sources {
  margin: 2.4rem 0 0; padding: 18px 20px 4px;
  background: var(--a-soft); border-radius: var(--a-radius-sm);
  font-size: 0.9375rem; color: var(--a-muted);
}
.article-prose .article-sources h2 {
  counter-increment: none; margin: 0 0 0.5rem; padding: 0; border: 0;
  font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--a-navy);
}
.article-prose .article-sources h2::before { content: none; }
.article-sources p { max-width: none; font-size: 0.9375rem; line-height: 1.6; }

/* ---------- CTA-KORT (midt i / slutt) ---------- */
.article-cta {
  margin: 2.6rem 0; padding: 22px 18px;
  background: linear-gradient(135deg, var(--a-navy) 0%, var(--a-navy-dark) 100%);
  color: #fff; border-radius: var(--a-radius); box-shadow: var(--a-shadow);
  position: relative; overflow: hidden;
}
.article-cta::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(91, 103, 232, 0.35); pointer-events: none; }
.article-cta > * { position: relative; z-index: 1; }
.article-cta-title { margin: 0 0 4px; font-size: 1.375rem; line-height: 1.2; font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.article-cta-sub { margin: 0 0 18px; font-size: 0.9375rem; color: #d6d9ff; max-width: none; }
.article-passes { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.article-passes a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 60px; padding: 12px 16px; border-radius: 16px;
  background: #fff; color: var(--a-ink); text-decoration: none; font-weight: 700;
  border: 2px solid transparent; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.article-prose .article-passes a { color: var(--a-ink); text-decoration: none; }
.article-passes a:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25); }
.article-passes strong { color: var(--a-navy); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.article-passes .is-featured { border-color: var(--a-coral); background: #fff7f4; }
.article-passes .pill { margin-left: 6px; vertical-align: middle; }
.article-passes small { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--a-muted); }
.article-cta-note { margin: 14px 0 0; font-size: 0.8125rem; color: #c3c7f5; max-width: none; }

/* ---------- RELATERTE ARTIKLER + KORT (også /artikler) ---------- */
.article-related { margin: 3.2rem 0 0; padding: 40px 0 8px; border-top: 1px solid var(--a-line); }
.article-related-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
.article-related-title { margin: 0; font-size: 1.375rem; line-height: 1.2; font-weight: 800; letter-spacing: -0.03em; color: var(--a-ink); }
.article-related-all { font-size: 0.9375rem; font-weight: 700; color: var(--a-navy); text-decoration: none; white-space: nowrap; }
.article-related-all:hover { text-decoration: underline; }
.article-cards { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.article-card {
  display: flex; flex-direction: column; height: 100%;
  background: #fff; border: 1px solid var(--a-line); border-radius: var(--a-radius);
  overflow: hidden; text-decoration: none; color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--a-shadow); border-color: #cfd3f5; }
.article-card:focus-visible { outline: 3px solid var(--a-coral); outline-offset: 3px; }
.article-card-media { aspect-ratio: 16 / 10; background: var(--a-navy); }
.article-card-media img { width: 100%; height: 100%; object-fit: cover; }
.article-card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 20px; flex: 1; }
.article-card-tag { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--a-coral-dark); }
.article-card-title { margin: 0; font-size: 1.1875rem; line-height: 1.25; font-weight: 800; letter-spacing: -0.025em; color: var(--a-ink); }
.article-card-text { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--a-muted); }
.article-card-more { margin-top: auto; padding-top: 6px; font-size: 0.9375rem; font-weight: 800; color: var(--a-navy); }
.article-card-more::after { content: " →"; }

/* ---------- /artikler (hub) ---------- */
.article-hub-hero { padding: 36px 0 28px; background: linear-gradient(180deg, var(--a-cream) 0%, #fff 100%); border-bottom: 1px solid var(--a-line); }
.article-hub-title { margin: 0; font-size: 2.25rem; line-height: 1.08; font-weight: 800; letter-spacing: -0.04em; color: var(--a-ink); }
.article-hub-lead { margin: 14px 0 0; color: var(--a-muted); font-size: 1.0625rem; max-width: 38rem; }
.article-hub-list { padding: 28px 0 40px; }
.article-hub-list .article-card.is-featured { }

/* ---------- Bunn-CTA på mobil: la standard-buybar fra brand.css være av ---------- */

/* ---------- DESKTOP ---------- */
@media (min-width: 700px) {
  .article-passes { grid-template-columns: repeat(3, 1fr); }
  .article-passes a { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; }
  .article-cards { grid-template-columns: repeat(2, 1fr); }
  .article-cta { padding: 28px 28px 24px; }
}

@media (min-width: 1024px) {
  .article-hero { padding: 28px 0 44px; }
  .article-hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; }
  .article-hero-art { display: block; }
  .article-title { font-size: 3rem; line-height: 1.07; }
  .article-lead { font-size: 1.25rem; margin-top: 20px; }

  .article-layout {
    display: grid; grid-template-columns: 272px minmax(0, 700px);
    gap: 64px; justify-content: center; align-items: start; padding: 48px 0 16px;
  }
  .article-aside { position: sticky; top: calc(var(--a-header-h) + 20px); margin: 0; align-self: start; max-height: calc(100vh - var(--a-header-h) - 40px); overflow: auto; }
  .article-toc > summary { pointer-events: none; cursor: default; min-height: 48px; font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--a-navy); }
  .article-toc > summary::after { display: none; }

  .article-side-cta { display: block; margin-top: 16px; padding: 18px; border-radius: var(--a-radius-sm); background: linear-gradient(180deg, #fff 0%, #fff7f4 100%); border: 1px solid #f9d9cf; }
  .article-side-cta p { margin: 0 0 12px; font-size: 0.9375rem; font-weight: 800; line-height: 1.3; color: var(--a-ink); }
  .article-side-cta .btn { width: 100%; }

  .article-prose { font-size: 1.125rem; line-height: 1.75; }
  .article-prose > p:first-child { font-size: 1.25rem; line-height: 1.65; }
  .article-prose h2 { font-size: 1.75rem; margin-top: 3.4rem; padding-top: 2.4rem; }
  .article-prose > h2:first-child { margin-top: 0; padding-top: 0; }
  .article-prose h3 { font-size: 1.25rem; }
  .article-callout { padding: 26px 28px 8px; }
  .article-faq summary { font-size: 1.0625rem; padding: 18px 22px; }
  .article-faq details > p { padding: 0 22px 20px; }
  .article-cta { padding: 34px 36px 30px; }
  .article-cta-title { font-size: 1.625rem; }
  .article-cards.is-three { grid-template-columns: repeat(3, 1fr); }
  .article-hub-title { font-size: 3rem; }
  .article-hub-hero { padding: 56px 0 44px; }
  .article-cards.is-hub { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (min-width: 1100px) {
  .article-cards.is-hub { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Tilgjengelighet / bevegelse ---------- */
@media (prefers-reduced-motion: reduce) {
  .article-card, .article-passes a, .article-toc > summary::after, .article-faq details { transition: none; }
  .article-card:hover, .article-passes a:hover { transform: none; }
}
@media print { .article-aside, .article-cta, .article-related, .topbar, .site-footer { display: none; } }

/* ---------- Footer-fiks (gjelder hele siden) ----------
   De to .links-radene lå begge i rad 1 / kolonne 2 og overlappet på desktop. */
@media (min-width: 768px) {
  .footer-grid .links { grid-column: 2; grid-row: 1; justify-self: end; text-align: right; }
  .footer-grid .links + .links { grid-row: 2; margin-top: 4px; }
  .footer-grid .blurb { grid-column: 1; grid-row: 2 / span 2; }
}
