/* prosjekt.nla.no — felles stilark
   Ren CSS, ingen rammeverk. Fargene er samlet øverst. */

@font-face {
  font-family: "Bricolage";
  src: url("fonts/bricolage-grotesque-300-800.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #eef1ec;
  --paper-solid: #f8faf6;
  --ink: #0e1a16;
  --muted: #56625c;
  --grid: rgba(14, 26, 22, 0.055);
  --line: rgba(14, 26, 22, 0.18);
  --marker: #c6f432;

  /* Prosjektfarger — brukes via feltet "farge" i prosjekter.js */
  --lime: #c6f432;
  --himmel: #8fd0ff;
  --rosa: #ffb3d1;
  --sol: #ffd84a;
  --mynte: #7fe6bd;
  --lavendel: #c9b8ff;

  --sans: "Bricolage", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --border: 1.5px solid var(--ink);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c1210;
    --paper-solid: #131b18;
    --ink: #e6eee8;
    --muted: #9aa8a1;
    --grid: rgba(230, 238, 232, 0.045);
    --line: rgba(230, 238, 232, 0.2);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--muted); }

:focus-visible { outline: 3px solid var(--marker); outline-offset: 3px; }

mark {
  background: linear-gradient(transparent 12%, var(--marker) 12%, var(--marker) 88%, transparent 88%);
  color: #0e1a16;
  padding: 0 0.08em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.mono, .label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.label { text-transform: uppercase; color: var(--muted); }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10;
}
.skip:focus { left: 8px; }

/* ---------- Topp ---------- */

.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 22px; padding-bottom: 22px;
  border-bottom: var(--border);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 750; font-size: 1.2rem; letter-spacing: -0.02em;
}
.brand::before {
  content: ""; width: 14px; height: 14px; background: var(--marker);
  border: var(--border);
}
.brand span { font-family: var(--mono); font-weight: 400; font-size: 0.95rem; color: var(--muted); letter-spacing: 0; }

.site-nav { display: flex; gap: clamp(12px, 3vw, 28px); }
.site-nav a {
  font-family: var(--mono); font-size: 0.82rem; text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; }

/* ---------- Forside: topp ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: end;
  padding-top: clamp(40px, 8vw, 96px);
  padding-bottom: clamp(40px, 6vw, 72px);
}
.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-weight: 720;
  margin: 0 0 28px;
  text-wrap: balance;
}
.hero p.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  max-width: 34em;
  margin: 0 0 24px;
}
.hero .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; }

.sandbox {
  position: relative;
  border: var(--border);
  background: var(--paper-solid);
  aspect-ratio: 5 / 4;
  min-height: 220px;
}
.sandbox canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.sandbox .corner {
  position: absolute; z-index: 1; padding: 6px 9px;
  font-family: var(--mono); font-size: 0.7rem; color: var(--muted);
  pointer-events: none; background: var(--paper-solid);
}
.sandbox .corner.tl { top: 0; left: 0; }
.sandbox .corner.br { bottom: 0; right: 0; }

/* ---------- Seksjoner ---------- */

.section { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(48px, 7vw, 88px); }

.section-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 28px;
  border-top: var(--border); padding-top: 16px;
}
.section-head h2 {
  margin: 0; font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -0.03em; line-height: 1.05; font-weight: 700;
}
.section-head h2 .count { font-family: var(--mono); font-size: 0.45em; font-weight: 400; color: var(--muted); vertical-align: super; margin-left: 6px; letter-spacing: 0; }

/* Filter */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-family: var(--mono); font-size: 0.8rem;
  color: var(--ink); background: var(--paper-solid);
  border: var(--border); padding: 6px 12px; cursor: pointer;
  border-radius: 999px;
}
.chip:hover { background: var(--paper); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- Prosjektkort ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 22px;
  list-style: none; margin: 0; padding: 0;
}

.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--paper-solid);
  border: var(--border);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover, .card:focus-within {
  transform: translate(-4px, -4px);
  box-shadow: 6px 6px 0 var(--ink);
}
.card a.cover-link { text-decoration: none; }
.card a.cover-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }

.cover {
  position: relative;
  aspect-ratio: 16 / 10;
  border-bottom: var(--border);
  background: var(--card-color, var(--lime));
  overflow: hidden;
}
.cover img, .cover svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover .num {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--mono); font-size: 0.75rem; font-weight: 500;
  background: var(--paper-solid); color: var(--ink); border: var(--border); padding: 2px 7px;
}
.cover .status {
  position: absolute; top: 10px; right: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 0.72rem;
  background: #0e1a16; color: #eef1ec; padding: 3px 9px; border-radius: 999px;
}
.cover .status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--marker);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.25; } }

.card-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.card h3 {
  margin: 0; font-size: 1.42rem; line-height: 1.15; letter-spacing: -0.02em; font-weight: 680;
  text-wrap: balance;
}
.card p { margin: 0; color: var(--muted); font-size: 0.98rem; line-height: 1.5; }

.card-foot {
  margin-top: auto; padding-top: 14px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px;
  border-top: 1px dashed var(--line);
}
.dest { font-family: var(--mono); font-size: 0.78rem; font-weight: 500; overflow-wrap: anywhere; }
.dest.pending { color: var(--muted); font-weight: 400; }

.empty { font-family: var(--mono); color: var(--muted); padding: 24px 0; }

/* ---------- Slik fungerer det (mørk stripe) ---------- */

.band {
  background: #0e1a16; color: #e6eee8;
  --ink: #e6eee8; --muted: #9aa8a1; --line: rgba(230, 238, 232, 0.2);
  --paper-solid: #131b18; --paper: #0e1a16;
  --border: 1.5px solid #e6eee8;
}
.how {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; counter-increment: step; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono); font-size: 0.8rem; color: #0e1a16; background: var(--marker);
  height: 28px; display: grid; place-items: center;
}
.steps h3 { margin: 0 0 4px; font-size: 1.2rem; letter-spacing: -0.01em; }
.steps p { margin: 0; color: var(--muted); }

.tree {
  font-family: var(--mono); font-size: clamp(0.74rem, 1.4vw, 0.88rem); line-height: 1.9;
  border: var(--border); padding: 20px 22px; margin: 0;
  white-space: pre; overflow-x: auto;
}
.tree b { color: var(--marker); font-weight: 500; }
.tree i { color: var(--muted); font-style: normal; }

.examples { border: var(--border); padding: 20px 22px; }
.examples .label { margin: 0 0 8px; }
.examples ul { list-style: none; margin: 0; padding: 0; }
.examples li { border-top: 1px dashed var(--line); }
.examples a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 14px 0; text-decoration: none; font-size: 1.08rem; line-height: 1.35;
}
.examples a span::after { content: " →"; color: var(--marker); }
.examples a:hover span { text-decoration: underline; }
.examples i { font-style: normal; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); white-space: nowrap; }

/* ---------- Bidra ---------- */

.contribute {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px);
}
.contribute h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 18px; }
.contribute p { max-width: 36em; }
.checklist { list-style: none; padding: 0; margin: 0; border-top: var(--border); }
.checklist li { padding: 12px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 12px; }
.checklist li::before { content: "□"; font-family: var(--mono); }

/* ---------- Bunn ---------- */

.site-foot {
  border-top: var(--border);
  padding-top: 22px; padding-bottom: 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  color: var(--muted);
}

/* ---------- Artikkel (prosjektsider) ---------- */

.article-head {
  border-bottom: var(--border);
  background: var(--card-color, var(--lime));
  color: #0e1a16;
}
.article-head .wrap { padding-top: clamp(36px, 6vw, 72px); padding-bottom: clamp(28px, 4vw, 48px); }
.article-head .label { color: rgba(14, 26, 22, 0.7); }
.article-head h1 {
  font-size: clamp(2.1rem, 5vw, 4.2rem); line-height: 1; letter-spacing: -0.035em; font-weight: 720;
  margin: 14px 0 20px; max-width: 18em; text-wrap: balance;
}
.article-head .ingress { font-size: clamp(1.1rem, 1.6vw, 1.3rem); max-width: 38em; margin: 0; line-height: 1.5; }
.back { font-family: var(--mono); font-size: 0.82rem; text-decoration: none; }
.back:hover { text-decoration: underline; }

.facts-band { border-bottom: var(--border); background: var(--paper-solid); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 0; margin-bottom: 0; }
.facts div { padding: 14px var(--gutter) 14px 0; }
.facts dt { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; }

.article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 40rem) minmax(0, 1fr);
  padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(48px, 6vw, 80px);
}
.article > * { grid-column: 2; }
.article > .wide { grid-column: 1 / -1; }
.article h2 { font-size: 1.6rem; letter-spacing: -0.02em; line-height: 1.15; margin: 2.2em 0 0.5em; }
.article p { margin: 0 0 1.1em; }
.article .first { font-size: 1.22rem; line-height: 1.55; }

.article blockquote {
  margin: 1.8em 0; padding: 0 0 0 22px; border-left: 6px solid var(--marker);
  font-size: 1.45rem; line-height: 1.3; letter-spacing: -0.015em; font-weight: 600;
}
.article blockquote footer { font-family: var(--mono); font-size: 0.8rem; font-weight: 400; color: var(--muted); margin-top: 10px; letter-spacing: 0; }

.article figure { margin: 2em 0; }
.article figure img { border: var(--border); }
.article figcaption { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); margin-top: 8px; }

.gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 18px;
  margin: 2.4em 0;
}
.gallery figure { margin: 0; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; object-position: top left; width: 100%; }

.split {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 28px; align-items: center;
  margin: 2em 0;
}
.split figure { margin: 0; }

.person {
  display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: center;
  border: var(--border); background: var(--paper-solid); padding: 14px; margin: 2em 0;
}
.person img { width: 88px; height: 88px; object-fit: cover; object-position: top; border: var(--border); }
.person p { margin: 0; }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6em 0; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.88rem; font-weight: 500; text-decoration: none;
  background: var(--ink); color: var(--paper); border: var(--border); padding: 12px 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translate(-3px, -3px); box-shadow: 4px 4px 0 var(--marker); }
.btn.ghost { background: transparent; color: var(--ink); }

/* Video som først lastes ved klikk (ingen sporing før man trykker) */
.video {
  position: relative; aspect-ratio: 16 / 9; border: var(--border); background: #000; margin: 2em 0;
}
.video button {
  position: absolute; inset: 0; width: 100%; padding: 0; border: 0; cursor: pointer; background: #000;
  color: #fff; font: inherit;
}
.video button img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; transition: opacity 0.2s; }
.video button:hover img { opacity: 0.85; }
.video .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--marker); color: #0e1a16; font-family: var(--mono); font-size: 0.9rem; font-weight: 500;
  padding: 12px 18px; border: 1.5px solid #0e1a16;
}
.video small {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px;
  font-family: var(--mono); font-size: 0.7rem; background: rgba(0, 0, 0, 0.6); text-align: left;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Fargeklasser for prosjektsider */
.farge-lime { --card-color: var(--lime); }
.farge-himmel { --card-color: var(--himmel); }
.farge-rosa { --card-color: var(--rosa); }
.farge-sol { --card-color: var(--sol); }
.farge-mynte { --card-color: var(--mynte); }
.farge-lavendel { --card-color: var(--lavendel); }

/* ---------- Mobil ---------- */

@media (max-width: 860px) {
  .hero, .how, .contribute, .split { grid-template-columns: minmax(0, 1fr); }
  .sandbox { aspect-ratio: 16 / 9; }
}
@media (max-width: 520px) {
  .site-head { flex-wrap: wrap; }
  .facts div { padding-right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.split figure img { max-height: 70vh; width: 100%; object-fit: cover; }

[hidden] { display: none !important; }

/* ---------- Komponenter i prosjektartikler ---------- */

.definition { border: var(--border); background: var(--paper-solid); padding: 18px 20px; margin: 2em 0; }
.definition .label { margin: 0 0 6px; }
.definition .def { font-size: 1.3rem; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 12px; }
.definition ul { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.definition li::before { content: "✕ "; color: var(--muted); }
.definition .mono { margin: 0; color: var(--muted); font-size: 0.74rem; }

.timeline { list-style: none; padding: 0; margin: 1.5em 0 2em; border-left: 2px solid var(--ink); }
.timeline li { position: relative; padding: 0 0 22px 24px; }
.timeline li::before {
  content: ""; position: absolute; left: -8px; top: 6px; width: 14px; height: 14px;
  background: var(--paper-solid); border: 2px solid var(--ink); border-radius: 50%;
}
.timeline li.turn::before { background: var(--card-color, var(--marker)); width: 18px; height: 18px; left: -10px; top: 4px; }
.timeline .when { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); text-transform: uppercase; }
.timeline h3 { margin: 2px 0 4px; font-size: 1.15rem; letter-spacing: -0.01em; }
.timeline p { margin: 0; }
.timeline li.turn h3 { background: var(--card-color, var(--marker)); color: #0e1a16; display: inline; padding: 0 4px; }

.versus { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; border: var(--border); margin: 1.5em 0; }
.versus > div { padding: 18px 20px; }
.versus > div + div { border-left: var(--border); background: var(--paper-solid); }
.versus .label { margin: 0; }
.versus h3 { margin: 2px 0 8px; font-size: 1.25rem; }
.versus ul { padding-left: 1.1em; margin: 0 0 12px; }
.versus .verdict { margin: 0; font-weight: 600; border-top: 1px dashed var(--line); padding-top: 10px; }

.sources { list-style: none; padding: 0; margin: 1.2em 0 2em; border-top: var(--border); }
.sources li { display: grid; grid-template-columns: 56px 1fr; gap: 0 14px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.sources .yr { grid-row: 1 / 3; font-family: var(--mono); font-size: 0.85rem; font-weight: 500; background: var(--card-color, var(--marker)); color: #0e1a16; height: 26px; display: grid; place-items: center; }
.sources b { font-weight: 650; }
.sources i { font-style: normal; color: var(--muted); font-size: 0.95rem; }

.model { list-style: none; padding: 0; margin: 1.2em 0 2em; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: m; }
.model li { counter-increment: m; border: var(--border); padding: 14px 16px; background: var(--paper-solid); display: flex; flex-direction: column; gap: 6px; }
.model li::before { content: counter(m, decimal-leading-zero); font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.model b { font-size: 1.1rem; }
.model span { color: var(--muted); font-size: 0.95rem; line-height: 1.45; }

.chat { border: var(--border); background: var(--paper-solid); padding: 0 0 16px; margin: 1.5em 0 2em; display: flex; flex-direction: column; gap: 10px; }
.chat-head { margin: 0; padding: 10px 16px; border-bottom: var(--border); background: var(--card-color, var(--marker)); color: #0e1a16; }
.chat .msg { margin: 0 16px; padding: 10px 14px; max-width: 85%; font-size: 0.98rem; line-height: 1.5; }
.chat .msg p { margin: 0 0 8px; }
.chat .msg p:last-child { margin: 0; }
.chat .bot { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); }
.chat .me { align-self: flex-end; background: var(--ink); color: var(--paper); }

/* ---------- Smakebit / Simulering-teaser i chatbot-artikkel ---------- */
.sim-teaser-card {
  border: var(--border);
  background: var(--paper-solid);
  margin: 1.8em 0 2.5em;
  box-shadow: 6px 6px 0 var(--ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sim-teaser-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-bottom: var(--border);
  background: var(--paper);
}

.sim-teaser-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper-solid);
  border-right: var(--border);
  transition: transform 0.15s ease, background 0.15s ease;
}

.sim-teaser-tab:last-child {
  border-right: 0;
}

.sim-teaser-tab:hover {
  background: var(--paper);
  text-decoration: none;
}

.sim-tab-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.sim-tab-text strong {
  font-size: 1rem;
  line-height: 1.25;
}

.sim-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #0e1a16;
  flex-shrink: 0;
  background: var(--paper);
}

.dot-persona { background: var(--rosa); }
.dot-kilde { background: var(--lime); }

.sim-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 2px 8px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  flex-shrink: 0;
}

.sim-badge.pluss {
  background: var(--lime);
  color: #0e1a16;
}

.sim-badge.minus {
  background: var(--rosa);
  color: #0e1a16;
}

.sim-teaser-window {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--paper-solid);
  transition: background 0.15s ease;
}

.sim-teaser-window:hover {
  text-decoration: none;
}

.sim-teaser-window:hover .sim-teaser-head {
  filter: brightness(0.96);
}

.sim-teaser-window:hover .sim-open-btn {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--marker);
}

.sim-teaser-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: var(--border);
  background: var(--card-color, var(--lavendel));
  color: #0e1a16;
}

.sim-teaser-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.sim-teaser-ver {
  font-size: 0.78rem;
  color: #0e1a16;
  opacity: 0.85;
}

.sim-teaser-cta {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0e1a16;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sim-teaser-body {
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sim-msg {
  padding: 12px 16px;
  max-width: 90%;
  font-size: 0.98rem;
  line-height: 1.5;
}

.sim-msg.me {
  align-self: flex-start;
  background: var(--ink);
  color: var(--paper);
  border: var(--border);
}

.sim-msg.me p {
  margin: 4px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.sim-sender {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--marker);
}

.sim-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.sim-col {
  border: var(--border);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px;
  gap: 10px;
}

.sim-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px;
}

.sim-col-msg {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sim-col-msg p {
  margin: 0;
}

.sim-scene {
  font-style: italic;
  color: var(--muted);
  font-size: 0.86rem;
}

.sim-quote {
  border-left: 2px solid var(--rosa);
  padding-left: 8px;
}

.sim-cite-item {
  border-left: 3px solid var(--lime);
  padding-left: 8px;
  font-size: 0.88rem;
}

.sim-cite-item b {
  display: block;
  font-size: 0.86rem;
}

.sim-cite-tag {
  font-size: 0.72rem;
  background: var(--lime);
  color: #0e1a16;
  border: 1px solid #0e1a16;
  padding: 1px 6px;
  display: inline-block;
  margin-top: 3px;
}

.sim-col-verdict {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.sim-col-verdict.minus { color: #8a1f49; }
.sim-col-verdict.pluss { color: #175429; }
@media (prefers-color-scheme: dark) {
  .sim-col-verdict.minus { color: var(--rosa); }
  .sim-col-verdict.pluss { color: var(--lime); }
}

.sim-teaser-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.sim-teaser-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 550;
}

.sim-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--marker);
  box-shadow: 0 0 0 0 rgba(198, 244, 50, 0.7);
  animation: sim-pulse 2s infinite;
}

@keyframes sim-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(198, 244, 50, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(198, 244, 50, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(198, 244, 50, 0); }
}

.sim-open-btn {
  margin: 0;
  font-size: 0.88rem;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
}

.sim-conf-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 14px 20px;
  background: var(--paper);
  border-top: var(--border);
  font-size: 0.88rem;
}

.sim-conf-info p {
  margin: 2px 0 0;
  color: var(--muted);
  max-width: 45em;
  font-size: 0.86rem;
  line-height: 1.45;
}

.sim-conf-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sim-conf-link {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 4px 10px;
  border: 1px solid var(--ink);
  background: var(--paper-solid);
  text-decoration: none;
  color: var(--ink);
  transition: all 0.15s ease;
}

.sim-conf-link:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

@media (max-width: 720px) {
  .sim-teaser-tabs {
    grid-template-columns: minmax(0, 1fr);
  }
  .sim-teaser-tab {
    border-right: 0;
    border-bottom: var(--border);
  }
  .sim-teaser-tab:last-child {
    border-bottom: 0;
  }
  .sim-compare-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sim-teaser-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .sim-open-btn {
    text-align: center;
    justify-content: center;
  }
}

.note-small { color: var(--muted); margin-top: 2em; }

@media (max-width: 640px) {
  .versus, .model { grid-template-columns: minmax(0, 1fr); }
  .versus > div + div { border-left: 0; border-top: var(--border); }
}

/* ---------- Forfatterboks med stablede bilder ---------- */

.duo {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px;
  border: var(--border); background: var(--paper-solid); padding: 16px 18px; margin: 0 0 2em;
}
.duo-stack {
  display: flex; align-items: center; flex-shrink: 0; gap: 0; padding: 6px 10px 6px 6px;
  border: 0; background: none; cursor: pointer; font: inherit; color: inherit;
}
.duo-stack img {
  width: 88px; height: 88px; object-fit: cover; object-position: top; display: block;
  border: var(--border); background: #fff; position: relative;
  transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
              margin 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.duo-stack img + img { margin-left: -56px; box-shadow: -4px 4px 0 rgba(14, 26, 22, 0.18); }
.duo-back { transform: rotate(-7deg) translateY(3px); }
.duo-back + .duo-back { transform: rotate(-2deg) translateY(-2px); }
.duo-front { z-index: 1; transform: rotate(3deg); }
.duo-stack:hover .duo-front, .duo-stack:focus-visible .duo-front { transform: rotate(5deg) translateX(8px); }

.duo.open .duo-stack { flex-direction: row-reverse; gap: 14px; }
.duo.open .duo-stack img { width: 120px; height: 120px; margin-left: 0; transform: none; box-shadow: none; }

.duo-names { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 240px; }
.duo-names p { margin: 0; line-height: 1.35; }
.duo-names strong { display: block; font-size: 1.1rem; }
.duo-role { display: block; font-weight: 600; font-size: 0.92rem; }
.duo-role::before { content: "→ "; color: var(--muted); }
.duo-names .mono { display: block; color: var(--muted); }
.duo-with strong { font-size: 0.98rem; font-weight: 600; }
.duo-extra { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }

.team { display: grid; gap: 12px; margin-top: 18px; max-width: 36em; }
.team > div { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; border: var(--border); background: var(--paper-solid); padding: 10px 12px; }
.team img { width: 64px; height: 64px; object-fit: cover; object-position: top; border: var(--border); }
.team p { margin: 0; line-height: 1.35; }
.team strong, .team span { display: block; }
.team span { font-weight: 600; font-size: 0.92rem; }
.team .mono { font-weight: 400; color: var(--muted); }
