/* ==========================================================
   UiS Studentkapital – stilark
   Farger fra logoen: marine #152238, skifer #3A4E6B, gull #B08D57.
   Lys modus er standard; mørk modus følger systemet eller bryteren.
   ========================================================== */

:root {
  /* Merkefarger (like i begge moduser) */
  --brand-navy: #152238;
  --brand-slate: #3a4e6b;
  --brand-gold: #b08d57;
  --band: #152238;           /* mørke "tittelslide"-bånd */
  --band-2: #1c2c47;
  --band-ink: #f2eee6;
  --band-muted: #a9b4c6;
  --band-line: rgba(242, 238, 230, 0.14);

  /* Lys modus */
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eaedf2;
  --ink: #152238;
  --ink-2: #3a4e6b;
  --muted: #5b687c;
  --line: rgba(21, 34, 56, 0.13);
  --gold: #8f6d3c;           /* mørkere gull for lesbar tekst på lys bakgrunn */
  --gold-mark: #b08d57;      /* gull for flater og streker */
  --btn-bg: #152238;
  --btn-ink: #f2eee6;
  --btn-hover: #24375a;
  --pos: #23744a;
  --neg: #a8352f;
  --shadow: 0 18px 40px -24px rgba(21, 34, 56, 0.45);
  color-scheme: light;

  --radius: 4px;
  --maxw: 1180px;
  --font-serif: "Cormorant Garamond", "Times New Roman", serif;
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1526;
    --surface: #152238;
    --surface-2: #1b2b45;
    --ink: #eef0f4;
    --ink-2: #c9d1de;
    --muted: #98a4b8;
    --line: rgba(238, 240, 244, 0.12);
    --gold: #cfaa6e;
    --gold-mark: #b08d57;
    --btn-bg: #c9a46a;
    --btn-ink: #0c1526;
    --btn-hover: #ddbd87;
    --pos: #62c58f;
    --neg: #ec8a83;
    --band: #101b2f;
    --band-2: #152238;
    --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1526;
  --surface: #152238;
  --surface-2: #1b2b45;
  --ink: #eef0f4;
  --ink-2: #c9d1de;
  --muted: #98a4b8;
  --line: rgba(238, 240, 244, 0.12);
  --gold: #cfaa6e;
  --gold-mark: #b08d57;
  --btn-bg: #c9a46a;
  --btn-ink: #0c1526;
  --btn-hover: #ddbd87;
  --pos: #62c58f;
  --neg: #ec8a83;
  --band: #101b2f;
  --band-2: #152238;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s, color 0.25s;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1.1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: 24px; }
@media (max-width: 520px) { .container { padding-inline: 18px; } }

/* Små versaler over titler – som "AGENDA", "PORTEFØLJEN" i møtepresentasjonene */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--gold-mark); }

.lead { font-size: 1.15rem; max-width: 62ch; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Knapper ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 24px; border-radius: var(--radius);
  font: 700 0.9rem/1 var(--font-sans); letter-spacing: 0.04em;
  border: 1px solid transparent; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); }
.btn-primary:hover { background: var(--btn-hover); color: var(--btn-ink); transform: translateY(-1px); }
.btn-gold { background: var(--brand-gold); color: var(--brand-navy); }
.btn-gold:hover { background: #c5a46f; color: var(--brand-navy); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--gold-mark); color: var(--gold); }
.btn svg { width: 16px; height: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 16px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 40px; width: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0 12px 0 0; padding: 0; }
.nav-links a { color: var(--ink-2); font-size: 0.88rem; font-weight: 600; position: relative; padding: 6px 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--gold-mark); transition: width 0.25s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links .btn { padding: 10px 16px; color: var(--btn-ink); }
.nav-links .btn::after { display: none; }
.nav-links .btn[aria-current="page"] { color: var(--btn-ink); }

.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { border-color: var(--gold-mark); color: var(--gold); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

.nav-toggle { display: none; }
@media (max-width: 1180px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: fixed; inset: 74px 0 auto 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 24px 24px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links a { display: block; padding: 15px 0; }
  .nav-links li:last-child { border: 0; padding-top: 16px; }
}
@media (max-width: 420px) { .brand img { height: 32px; } }

/* ---------- Mørke bånd (som tittel-slides) ---------- */
.band {
  background: var(--band);
  color: var(--band-muted);
  position: relative;
  overflow: hidden;
}
.band h1, .band h2, .band h3 { color: var(--band-ink); }
.band .eyebrow { color: var(--brand-gold); }
.band .eyebrow::before { background: var(--brand-gold); }
.band .lead { color: #d5dbe5; }
.band .btn-ghost { color: var(--band-ink); border-color: var(--band-line); }
.band .btn-ghost:hover { color: var(--brand-gold); border-color: var(--brand-gold); }
.band a:not(.btn) { color: #d8bd8b; }

/* Diskré okse-vannmerke i båndene */
.band .watermark {
  position: absolute; right: -40px; bottom: -60px; width: 340px; opacity: 0.06; pointer-events: none;
}

/* Slide-bunntekst: "UiS Studentkapital AS · 01" */
.slide-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--band-line);
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--band-muted);
}

/* ---------- Hero ---------- */
.hero { padding: 96px 0 0; }
.hero .stats { margin-bottom: 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.hero h1 em { font-style: italic; color: var(--brand-gold); }
.hero .lead { margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-figure { position: relative; margin: 0; }
.hero-figure img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.hero-figure::before { content: ""; position: absolute; inset: -12px 12px 12px -12px; pointer-events: none; border: 1px solid rgba(176, 141, 87, 0.45); border-radius: var(--radius); }
.hero-figure .fallback { aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--band-2); display: grid; place-items: center; }
.hero-figure .fallback img { width: 34%; aspect-ratio: auto; opacity: 0.9; }
@media (max-width: 900px) {
  .hero { padding-top: 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
}

/* Nøkkeltall-stripe under hero */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--band-line); margin-top: 72px;
}
.stat { padding: 24px 22px 28px; border-right: 1px solid var(--band-line); }
.stat:last-child { border-right: 0; }
.stat .label { display: block; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--band-muted); margin-bottom: 4px; }
.stat .value { font-family: var(--font-serif); font-size: 1.9rem; color: var(--band-ink); line-height: 1.1; }
@media (max-width: 700px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 20px 16px 22px; }
  .stat .value { font-size: 1.6rem; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n + 2) { border-bottom: 1px solid var(--band-line); }
}

/* ---------- Seksjoner ---------- */
.section { padding: 104px 0; }
.section-alt { background: var(--surface-2); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.section-head > div { min-width: 0; }
.section-head p { max-width: 54ch; margin: 0; color: var(--muted); }
@media (max-width: 700px) { .section { padding: 68px 0; } }

.split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 72px; }
.split > * { min-width: 0; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 24px; } }
.prose p { color: var(--ink-2); }
.dropcap > p:first-child::first-letter {
  font-family: var(--font-serif); float: left; font-size: 4.2rem; line-height: 0.85;
  padding: 6px 12px 0 0; color: var(--gold-mark);
}

/* Nummerert liste – som agenda-slidene */
.agenda { list-style: none; margin: 0; padding: 0; counter-reset: a; border-top: 1px solid var(--line); }
.agenda li { counter-increment: a; display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.agenda li::before { content: counter(a); font-family: var(--font-serif); font-size: 2rem; line-height: 1; color: var(--gold-mark); }
.agenda strong { display: block; font-family: var(--font-serif); font-size: 1.4rem; font-weight: 600; color: var(--ink); line-height: 1.2; margin-bottom: 4px; }
.agenda span { color: var(--muted); font-size: 0.97rem; }

/* ---------- Sektorer ---------- */
.sectors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.sector { background: var(--surface); padding: 28px 24px 30px; }
.sector .tag { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.sector h3 { margin: 10px 0 8px; font-size: 1.7rem; }
.sector p { margin: 0; font-size: 0.92rem; color: var(--muted); }
.sector .mult { display: block; margin-top: 14px; font-size: 0.8rem; color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .sectors { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .sectors { grid-template-columns: 1fr; } }

/* ---------- Innleggskort ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }
.post-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink-2);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.post-card:hover { transform: translateY(-3px); border-color: var(--gold-mark); box-shadow: var(--shadow); color: var(--ink-2); }
.post-card .thumb { aspect-ratio: 16 / 10; background: var(--band-2); overflow: hidden; position: relative; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.post-card:hover .thumb img { transform: scale(1.04); }
.post-card .thumb .placeholder { position: absolute; inset: 0; display: grid; place-items: center; }
.post-card .thumb .placeholder img { width: 22%; height: auto; opacity: 0.85; transform: none !important; }
.post-card .body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 1.4rem; margin-bottom: 10px; }
.post-card p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.post-meta { display: flex; align-items: center; gap: 10px; font-size: 0.78rem; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--gold);
}
.badge svg { width: 12px; height: 12px; }
.read-more { font-size: 0.85rem; font-weight: 700; color: var(--gold); letter-spacing: 0.03em; margin-top: 8px; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.filter {
  background: transparent; border: 1px solid var(--line); color: var(--ink-2);
  padding: 9px 18px; border-radius: 999px; font: 600 0.85rem var(--font-sans); cursor: pointer;
}
.filter:hover { border-color: var(--gold-mark); }
.filter.active { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-ink); }
.empty { padding: 40px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; color: var(--muted); }

/* ---------- Enkeltinnlegg ---------- */
.article { max-width: 760px; margin: 0 auto; }
.article-hero img { width: 100%; border-radius: var(--radius); margin: 30px 0 38px; aspect-ratio: 16 / 9; object-fit: cover; }
.article-body { font-size: 1.08rem; }
.article-body h2 { font-size: 2rem; margin-top: 1.6em; }
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.article-body blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--gold-mark); font-family: var(--font-serif); font-size: 1.5rem; color: var(--ink); }
.embed-wrap { margin: 30px 0; display: flex; justify-content: center; }
.embed-wrap iframe { width: 100%; max-width: 560px; min-height: 600px; border: 0; border-radius: var(--radius); background: #fff; }
/* Instagram setter position:absolute til innlegget er lastet – hold det i flyten så det aldri dekker teksten */
.embed-wrap .instagram-media { position: static !important; }

/* ---------- Medlemmer ---------- */
.group { margin-bottom: 72px; }
.group:last-child { margin-bottom: 0; }
.group-title { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 28px; border-bottom: 2px solid var(--ink); }
.group-title h3 { margin: 0; font-size: 1.9rem; }
.group-title .count { font-size: 0.74rem; color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; }
.members { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 1000px) { .members { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .members { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
.member { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.25s, box-shadow 0.25s; }
.member:hover { border-color: var(--gold-mark); box-shadow: var(--shadow); }
.member .photo { aspect-ratio: 4 / 5; background: linear-gradient(160deg, var(--band-2), var(--band)); position: relative; overflow: hidden; }
.member .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.member:hover .photo img { transform: scale(1.03); }
.member .initials { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-serif); font-size: 2.8rem; color: var(--brand-gold); }
.member .info { padding: 15px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.member .name { font-family: var(--font-serif); font-size: 1.28rem; font-weight: 600; color: var(--ink); line-height: 1.2; margin-bottom: 3px; }
.member .role { font-size: 0.8rem; color: var(--muted); margin-bottom: 12px; flex: 1; }
.member .li {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-size: 0.78rem; font-weight: 700; color: var(--ink);
  padding: 7px 11px; border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.member .li svg { width: 14px; height: 14px; color: #0a66c2; }
.member .li:hover { border-color: #0a66c2; color: #0a66c2; }
:root[data-theme="dark"] .member .li svg { color: #70b5f9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .member .li svg { color: #70b5f9; } }
.member .li.none { color: var(--muted); border-style: dashed; font-weight: 600; }

/* ---------- Portefølje ---------- */
.kpis { display: grid; grid-template-columns: repeat(var(--kpi-n, 4), 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 48px; }
.kpi { background: var(--surface); padding: 24px 22px; }
.kpi .label { display: block; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.kpi .value { font-family: var(--font-serif); font-size: 2.1rem; color: var(--ink); line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi .sub { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
@media (max-width: 800px) { .kpis { grid-template-columns: repeat(2, 1fr); } .kpis.odd > :first-child { grid-column: span 2; } .kpi { padding: 18px 16px; min-width: 0; } .kpi .value { font-size: 1.65rem; overflow-wrap: anywhere; } }

.holdings-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.holdings { width: 100%; border-collapse: collapse; min-width: 560px; font-variant-numeric: tabular-nums; }
.holdings th { text-align: left; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.holdings td { padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.holdings tr:last-child td { border-bottom: 0; }
.holdings tbody tr:hover { background: var(--surface-2); }
.holdings .ticker { font-weight: 700; color: var(--ink); font-size: 0.9rem; letter-spacing: 0.04em; }
.holdings .co { display: block; font-size: 0.85rem; color: var(--muted); }
.holdings .r { text-align: right; }
.weight-cell { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.weight-track { flex: 1; height: 10px; position: relative; }
.weight-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gold-mark); border-radius: 0 4px 4px 0; }
.weight-val { width: 66px; white-space: nowrap; text-align: right; color: var(--ink); font-weight: 600; }
.ret { font-weight: 700; white-space: nowrap; }
.ret.pos { color: var(--pos); }
.ret.neg { color: var(--neg); }
.chart-tip {
  position: fixed; pointer-events: none; z-index: 60; background: var(--ink); color: var(--bg);
  padding: 8px 11px; border-radius: var(--radius); font-size: 0.8rem; line-height: 1.4;
  box-shadow: var(--shadow); opacity: 0; transition: opacity 0.12s; font-variant-numeric: tabular-nums;
}
.chart-tip.on { opacity: 1; }
.chart-tip b { display: block; }
.note { font-size: 0.85rem; color: var(--muted); margin-top: 14px; }

.strategy { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.strategy li { display: flex; gap: 12px; align-items: baseline; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font-weight: 600; }
.strategy li::before { content: "→"; color: var(--gold-mark); font-weight: 700; }

/* ---------- Sponsorer ---------- */
.sponsors { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sponsor { background: var(--surface); aspect-ratio: 3 / 2; display: grid; place-items: center; padding: 20px; }
.sponsor img { max-height: 70px; width: auto; object-fit: contain; }
@media (max-width: 900px) { .sponsors { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .sponsors { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Tilbud (bedrifter) ---------- */
.offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.offer { background: var(--surface); padding: 34px 30px; }
.offer .tag { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); font-weight: 700; display: block; margin-bottom: 20px; }
.offer h3 { font-size: 1.6rem; }
.offer p { color: var(--muted); margin: 0; font-size: 0.97rem; }
@media (max-width: 900px) { .offers { grid-template-columns: 1fr; } }
.figure-frame { margin: 0; border-radius: var(--radius); background: var(--band-2); }
.figure-frame img { border-radius: var(--radius); width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* ---------- CTA ---------- */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding: 64px 56px; border-radius: var(--radius); }
.cta h2 { margin: 0 0 6px; }
.cta p { margin: 0; color: var(--band-muted); }
@media (max-width: 700px) { .cta { padding: 40px 26px; } }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; }
.contact-grid > * { min-width: 0; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 44px; } }
.contact-list { list-style: none; padding: 0; margin: 30px 0 0; }
.contact-list li { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-list li:first-child { border-top: 1px solid var(--line); }
.contact-list svg { width: 20px; height: 20px; color: var(--gold-mark); flex-shrink: 0; margin-top: 3px; }
.contact-list .k { display: block; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.contact-list a, .contact-list .v { color: var(--ink); overflow-wrap: anywhere; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 38px; box-shadow: var(--shadow); }
@media (max-width: 600px) { .form-card { padding: 26px 20px; } }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field label { font-size: 0.82rem; font-weight: 700; color: var(--ink); }
.field label .req { color: var(--gold); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); padding: 13px 14px; font: 1rem var(--font-sans); transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold-mark); box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.2); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 0.88rem; color: var(--muted); margin-bottom: 24px; }
.check input { margin-top: 4px; accent-color: var(--brand-gold); width: 16px; height: 16px; }
.hidden { position: absolute; left: -9999px; }
.form-note { font-size: 0.8rem; color: var(--muted); margin: 14px 0 0; }

/* ---------- Sidetopp for undersider ---------- */
.page-hero { padding: 84px 0 26px; }
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
.page-hero .slide-foot { margin-top: 64px; }

/* ---------- Footer ---------- */
.site-footer { padding: 70px 0 30px; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 52px; }
.footer-grid > * { min-width: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font: 700 0.7rem var(--font-sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--brand-gold); margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.site-footer.band a:not(.btn) { color: var(--band-ink); overflow-wrap: anywhere; }
.site-footer.band a:not(.btn):hover { color: var(--brand-gold); }
.footer-about img { height: 44px; width: auto; }
.footer-about p { max-width: 36ch; margin-top: 18px; }
.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--ink); }
.band .socials a { border-color: var(--band-line); color: var(--band-ink); }
.socials a:hover { border-color: var(--gold-mark); color: var(--gold); }
.socials svg { width: 17px; height: 17px; }
.footer-bottom { border-top: 1px solid var(--band-line); padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.8rem; }

/* ---------- Diverse ---------- */
img.img-failed { visibility: hidden; }
.reveal { transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal:not(.in) { opacity: 0; transform: translateY(14px); }
@media (prefers-reduced-motion: reduce) {
  .js .reveal:not(.in) { opacity: 1; transform: none; }
  .reveal, body { transition: none; }
  html { scroll-behavior: auto; }
}
.skip { position: absolute; left: -9999px; top: 8px; background: var(--brand-gold); color: var(--brand-navy); padding: 10px 16px; z-index: 100; border-radius: var(--radius); }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gold-mark); outline-offset: 3px; }

/* ---------- Diagramfarger (sektorer) – validert for fargeblindhet ---------- */
:root {
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  --series-5: #e87ba4; --series-6: #008300; --series-7: #6250d6; --series-8: #e34948;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
    --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
  }
}
:root[data-theme="dark"] {
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
}

.alloc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; margin-bottom: 48px; }
.alloc h3 { font-size: 1.35rem; margin-bottom: 18px; }
.sector-bar { display: flex; gap: 2px; height: 22px; }
.sector-bar .seg { min-width: 4px; }
.sector-bar .seg:first-child { border-radius: 4px 0 0 4px; }
.sector-bar .seg:last-child { border-radius: 0 4px 4px 0; }
.sector-legend { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 0.9rem; }
.sector-legend li { display: flex; align-items: center; gap: 8px; }
.sector-legend .nm { color: var(--ink); font-weight: 600; }
.sector-legend .vl { color: var(--muted); font-variant-numeric: tabular-nums; }
.sw { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; display: inline-block; }
.sector-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--ink-2); white-space: nowrap; }

/* ---------- Instagram-strøm ---------- */

/* ---------- Bli medlem ---------- */
.apply-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); }
.apply-card.open { border-top: 3px solid var(--pos); }
.apply-card.closed { border-top: 3px solid var(--gold-mark); }
.apply-card h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-top: 14px; }
.apply-card p { max-width: 60ch; }
.apply-card .deadline { color: var(--ink); }
.apply-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
@media (max-width: 600px) { .apply-card { padding: 28px 22px; } }
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); }
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; }
.status-pill.open { color: var(--pos); }
.status-pill.open .dot { background: var(--pos); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pos) 25%, transparent); }
.status-pill.closed { color: var(--gold); }
.status-pill.closed .dot { background: var(--gold-mark); }
.benefits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.benefits li { background: var(--surface); padding: 26px 24px; }
.benefits strong { display: block; font-family: var(--font-serif); font-size: 1.4rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; line-height: 1.2; }
.benefits span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 700px) { .benefits { grid-template-columns: 1fr; } }

/* ---------- Egenkapital per år ---------- */
.hist-plot { position: relative; height: 280px; margin: 8px 0 34px 52px; }
.hist-grid { position: absolute; inset: 0; }
.hist-tick { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.hist-tick span { position: absolute; right: calc(100% + 8px); top: -0.6em; font-size: 0.72rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hist-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.hist-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 0; }
.hist-stack { width: min(70%, 44px); height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.hist-seg { display: block; width: 100%; }
.hist-seg.inn { background: var(--series-1); }
.hist-seg.opp { background: var(--gold-mark); border-radius: 4px 4px 0 0; }
.hist-col:not(:has(.opp)) .hist-seg.inn { border-radius: 4px 4px 0 0; }
.hist-col:hover .hist-seg { filter: brightness(1.12); }
.hist-x { position: absolute; top: calc(100% + 8px); font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hist-label { position: absolute; top: 0; transform: translateY(-120%); font-size: 0.78rem; font-weight: 700; color: var(--ink); white-space: nowrap; }
.hist-col.last { }
@media (max-width: 600px) { .hist-plot { margin-left: 44px; height: 220px; } .hist-x { font-size: 0.6rem; } .hist-col:nth-child(even) .hist-x { visibility: hidden; } }
details.table-toggle { margin-top: 8px; }
details.table-toggle summary { cursor: pointer; font-size: 0.85rem; font-weight: 700; color: var(--gold); }
.holdings.small { min-width: 420px; }
.holdings.small td, .holdings.small th { padding: 10px 14px; font-size: 0.88rem; }

/* ---------- Investorer ---------- */
.owners { display: grid; gap: 10px; }
.owner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.owner:hover { border-color: var(--gold-mark); }
.owner-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.owner-id img, .owner-mono { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.owner-mono { display: grid; place-items: center; background: var(--band); color: var(--brand-gold); font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; }
.owner-text { min-width: 0; }
.owner h3 { font-size: 1.25rem; margin: 0 0 2px; }
.owner h3 a { color: var(--ink); }
.owner h3 a:hover { color: var(--gold); }
.owner-meta { font-size: 0.82rem; color: var(--muted); }
.owner-share { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 14px; align-items: center; }
.owner-track { height: 10px; background: var(--surface-2); border-radius: 0 4px 4px 0; }
.owner-bar { height: 100%; background: var(--gold-mark); border-radius: 0 4px 4px 0; }
.owner-pct { font-family: var(--font-serif); font-size: 1.5rem; color: var(--ink); text-align: right; min-width: 84px; }
.owner-shares { grid-column: 1 / -1; font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
@media (max-width: 720px) { .owner { grid-template-columns: 1fr; gap: 14px; } }

/* ---------- Personvern og lange tekster ---------- */
.prose-doc h2 { font-size: 1.7rem; margin-top: 1.8em; scroll-margin-top: 90px; }
.prose-doc h2:first-child { margin-top: 0; }
.prose-doc p, .prose-doc li { color: var(--ink-2); }

/* ---------- Rediger-knapp for administratorer ---------- */
.admin-edit {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px;
  background: var(--brand-gold); color: var(--brand-navy); font: 700 0.86rem var(--font-sans);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}
.admin-edit:hover { background: #c5a46f; color: var(--brand-navy); }
.admin-edit svg { width: 16px; height: 16px; }
.sponsor { grid-template-rows: 1fr auto; gap: 10px; }
.sponsor-name { font-size: 0.78rem; font-weight: 600; color: var(--ink-2); text-align: center; }

@media (max-width: 600px) {
  /* Ramme rundt gruppebildet holdes innenfor marginen på mobil */
  .hero-figure::before { inset: -8px 8px 8px -8px; }
}
