/* ============================================
   BYVEKTOR — Site-specifik CSS
   Bygger ovenpå shared/profile.css
   ============================================ */

:root {
  /* Base palette */
  --granit-dyb: #272D36;
  --granit: #3D4550;
  --granit-lys: #5A6370;
  --tegl: #B5553A;
  --tegl-lys: #C9694E;
  --tegl-daempet: #8C3F2B;
  --kalk: #F2EDE6;
  --kalk-dyb: #E5DDD4;
  --hvid: #FAF8F5;

  /* Type */
  --sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --serif: "Playfair Display", "Cormorant Garamond", Georgia, serif;

  /* Semantic — dark mode default */
  --bg: var(--granit-dyb);
  --bg-alt: var(--granit);
  --bg-card: #2E3540;
  --fg: var(--kalk);
  --fg-soft: #CFC8BE;
  --fg-mute: #8A8F98;
  --accent: var(--tegl);
  --accent-alt: var(--tegl-lys);
  --rule: rgba(242, 237, 230, 0.12);

  --nav-h: 72px;
  --section-y: 120px;
  --bezel: 56px;
}

@media (max-width: 720px) {
  :root { --nav-h: 60px; --section-y: 72px; --bezel: 20px; }
}
@media (max-width: 420px) {
  :root { --bezel: 16px; }
}

[data-mode="light"] {
  --bg: var(--kalk);
  --bg-alt: var(--kalk-dyb);
  --bg-card: var(--hvid);
  --fg: var(--granit-dyb);
  --fg-soft: var(--granit);
  --fg-mute: var(--granit-lys);
  --accent: var(--tegl);
  --accent-alt: var(--tegl-daempet);
  --rule: rgba(39, 45, 54, 0.12);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 80;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}
/* On mobile we lock the nav to a fully opaque colour so body text can never
   bleed through it as the page scrolls underneath. The translucent + blur
   treatment is reserved for desktop where the row sits above empty
   margins, not body copy.
   z-index lifted to 100 so compositing layers (will-change on hero slides)
   can never surface above the fixed header. */
@media (max-width: 820px) {
  .nav {
    z-index: 100;
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 1px 0 0 var(--rule);
  }
}
/* Fallback for browsers without backdrop-filter (older Firefox etc.) */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav { background: var(--bg); }
}

.nav__inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--bezel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav__brand {
  font-family: var(--sans);
  font-weight: 200;
  letter-spacing: 0.2em;
  font-size: 15px;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.nav__brand .by { color: var(--fg); }
.nav__brand .vektor { color: var(--accent); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-soft);
  text-decoration: none;
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav__links a:hover { color: var(--fg); }
.nav__links a.is-active { color: var(--fg); }
.nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
}

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
}

@media (max-width: 820px) {
  /* Hide the inline desktop link row entirely on mobile; the panel below
     replaces it and we never want both rendered at the same time. */
  .nav > nav { position: static; }
  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    flex-direction: column;
    background: var(--bg);
    border-top: 1px solid var(--rule);
    padding: 48px var(--bezel);
    gap: 28px;
    align-items: flex-start;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.28s ease, visibility 0s linear 0.28s;
    /* Sit above the fixed nav header (z-index:100 on mobile) and every other
       piece of body content. */
    z-index: 110;
    /* The panel is the only thing that should be tappable when open. */
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  }
  .nav[data-open="true"] .nav__links {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.22s ease, transform 0.28s ease, visibility 0s linear 0s;
  }
  .nav__toggle { display: inline-flex; align-items: center; gap: 8px; }
  .nav__links a { font-size: 18px; letter-spacing: 0.18em; }
  /* When the panel is open lock the body so the underlying scroll position
     doesn't bleed visually through the menu. */
  body.nav-open { overflow: hidden; }
}

/* ============================================
   PAGE FRAME
   ============================================ */
main {
  padding-top: var(--nav-h);
}

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

section {
  padding: var(--section-y) 0;
  position: relative;
}

.section--narrow .wrap { max-width: 980px; }

.section--alt { background: var(--bg-alt); }

.section--hairline { border-top: 1px solid var(--rule); }

/* ============================================
   TYPOGRAFI — page-level
   ============================================ */
h1, h2, h3, h4 { margin: 0; font-weight: 400; }

.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 11px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.04;
  text-wrap: balance;
}
.display--xl { font-size: clamp(48px, 7.6vw, 110px); }
.display--lg { font-size: clamp(38px, 5.4vw, 76px); }
.display--md { font-size: clamp(28px, 3.6vw, 48px); }
.display--sm { font-size: clamp(22px, 2.4vw, 32px); }

.lede {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.55;
  color: var(--fg-soft);
  max-width: 56ch;
  text-wrap: pretty;
}

.body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg-soft);
  max-width: 64ch;
  text-wrap: pretty;
}
.body p + p { margin-top: 1.1em; }

.italic-serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent-alt);
}

.label {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-mute);
}

/* Tegl-accent on inline text */
.tegl { color: var(--accent); }
.tegl-mark {
  background-image: linear-gradient(transparent 62%, color-mix(in oklab, var(--accent) 28%, transparent) 62%, color-mix(in oklab, var(--accent) 28%, transparent) 92%, transparent 92%);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  grid-template-rows: 1fr auto;
  padding-top: 60px;
  padding-bottom: 56px;
  position: relative;
  overflow: hidden;
}
@media (max-width: 720px) {
  .hero { padding-top: 32px; padding-bottom: 32px; }
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 64px;
  position: relative;
  z-index: 2;
}

.hero__eyebrow {
  margin-bottom: 36px;
}

.hero__headline {
  font-size: clamp(36px, 7.2vw, 104px);
  max-width: 16ch;
}

.hero__sub {
  margin-top: 36px;
  max-width: 48ch;
}

.hero__meta {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
  padding-top: 36px;
  border-top: 1px solid var(--rule);
  margin-top: 80px;
  position: relative;
  z-index: 2;
}
@media (max-width: 720px) {
  .hero__meta { margin-top: 48px; padding-top: 24px; gap: 20px; }
}
.hero__meta .col {
  flex: 1;
  min-width: 0;
}
.hero__tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(15px, 1.3vw, 19px);
  color: var(--fg);
}

/* Corner vejkryds (animated) */
.corners {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.corners svg {
  position: absolute;
  width: clamp(60px, 8vw, 120px);
  height: clamp(60px, 8vw, 120px);
}
.corners .c-tl { top: 12px; left: 0; }
.corners .c-tr { top: 12px; right: 0; }
.corners .c-bl { bottom: 12px; left: 0; }
.corners .c-br { bottom: 12px; right: 0; }

.corners line {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawIn 1.2s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.corners .c-tr line { animation-delay: 0.14s; }
.corners .c-bl line { animation-delay: 0.28s; }
.corners .c-br line { animation-delay: 0.42s; }

.corners circle {
  opacity: 0;
  animation: dotIn 0.5s ease-out forwards;
  animation-delay: 1.2s;
}

@keyframes drawIn {
  to { stroke-dashoffset: 0; }
}
@keyframes dotIn {
  to { opacity: 1; }
}

/* ============================================
   HERO — image variant (slideshow bag headline)
   ============================================ */
.hero--image {
  background: var(--granit-dyb);
  color: var(--kalk);
  padding-top: 80px;
  padding-bottom: 56px;
}

.hero__stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}
.hero__slide.is-active { opacity: 1; }
.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Editorial mood: desat + slight warm tone — matcher .case og .portrait */
  filter: saturate(0.62) contrast(0.94) brightness(0.86) sepia(0.10);
  transform: scale(1.04);
  transition: transform 8s ease-out;
}
.hero__slide.is-active img {
  transform: scale(1.0);
}

.hero__cap {
  position: absolute;
  bottom: calc(var(--bezel) + 100px);
  right: var(--bezel);
  max-width: 28ch;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(242, 237, 230, 0.70);
  text-align: right;
  padding-right: 28px;
  opacity: 0;
  transition: opacity 0.6s ease 0.4s;
  pointer-events: none;
}
.hero__cap::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 18px;
  height: 1px;
  background: var(--accent);
}
.hero__slide.is-active .hero__cap { opacity: 1; }

/* Mørk overlay så typografien holder kontrast */
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(110deg,
      rgba(20, 24, 30, 0.78) 0%,
      rgba(20, 24, 30, 0.62) 38%,
      rgba(20, 24, 30, 0.35) 70%,
      rgba(20, 24, 30, 0.48) 100%),
    radial-gradient(120% 80% at 10% 50%, rgba(20, 24, 30, 0.55), transparent 60%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100%;
}

.hero--image .hero__headline,
.hero--image .hero__sub,
.hero--image .hero__tagline {
  color: var(--kalk);
  text-shadow: 0 1px 30px rgba(0, 0, 0, 0.28);
}
.hero--image .hero__sub { color: rgba(242, 237, 230, 0.86); }

.hero--image .btn--accent {
  background: color-mix(in oklab, var(--accent) 92%, transparent);
  color: var(--kalk);
  border-color: var(--accent);
  backdrop-filter: blur(4px);
}
.hero--image .btn--accent:hover {
  background: var(--accent-alt);
  border-color: var(--accent-alt);
}

/* Hero meta: dots + scroll indicator */
.hero--image .hero__meta {
  border-top-color: rgba(242, 237, 230, 0.22);
}
.hero__meta-left {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.hero__meta-right {
  text-align: right;
  align-self: end;
}
.hero__dots {
  display: flex;
  gap: 10px;
  align-items: center;
}
.hero__dot {
  background: transparent;
  border: 0;
  width: 28px;
  height: 1px;
  padding: 14px 0;
  cursor: pointer;
  position: relative;
}
.hero__dot::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(242, 237, 230, 0.30);
  transition: background 0.3s ease, height 0.3s ease;
}
.hero__dot:hover::before { background: rgba(242, 237, 230, 0.60); }
.hero__dot.is-active::before {
  background: var(--accent);
  height: 2px;
}

.hero__scroll {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  text-decoration: none;
  color: rgba(242, 237, 230, 0.72);
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 0;
}
.hero__scroll:hover { color: var(--accent); }
.hero__scroll-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, rgba(242, 237, 230, 0.5), transparent);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: -40%;
  left: 0;
  width: 1px;
  height: 40%;
  background: var(--accent);
  animation: scrollPulse 2.6s ease-in-out infinite;
}
@keyframes scrollPulse {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(180px); opacity: 0; }
}

@media (max-width: 720px) {
  .hero__cap { display: none; }
  .hero--image .hero__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .hero__meta-right { text-align: left; }
}

/* Stenflise vandmærke */
.stenflise-bg {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.stenflise-bg svg { width: 100%; height: 100%; }

/* ============================================
   FADE / REVEAL
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-in {
  opacity: 1 !important;
  transform: translateY(0) !important;
}
/* Hard fallback: if no JavaScript or anything goes wrong, all .reveal
   text must still be readable. Without JS, the .is-in class never gets
   added — so we make the non-JS state visible too. */
html.no-js .reveal,
html:not(.has-js) .reveal { opacity: 1; transform: none; }
.reveal--d1 { transition-delay: 0.08s; }
.reveal--d2 { transition-delay: 0.16s; }
.reveal--d3 { transition-delay: 0.24s; }
.reveal--d4 { transition-delay: 0.32s; }

/* ============================================
   GRID + CARDS
   ============================================ */
.grid {
  display: grid;
  gap: 40px;
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 880px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; gap: 28px; }
}

.product {
  border-top: 1px solid var(--rule);
  padding: 56px 0;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 56px;
  position: relative;
}
@media (max-width: 880px) {
  .product { grid-template-columns: 1fr; gap: 20px; padding: 40px 0; }
}
.product__nr {
  font-family: var(--sans);
  font-weight: 200;
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.product__nr .num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(40px, 5vw, 68px);
  color: var(--fg);
  letter-spacing: -0.02em;
  line-height: 0.9;
}
.product__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.2vw, 44px);
  margin-bottom: 24px;
  line-height: 1.08;
  text-wrap: balance;
}
.product__body { max-width: 60ch; }
.product__list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.product__list li {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  color: var(--fg-soft);
  padding-left: 22px;
  position: relative;
}
.product__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.65em;
  width: 12px;
  height: 1px;
  background: var(--accent);
}

/* Spec list — Fase / Leverance / Forpligtelse */
.product__spec {
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.product__spec-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.product__spec dt {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.product__spec dd {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--fg);
  max-width: 60ch;
  text-wrap: pretty;
}
@media (max-width: 720px) {
  .product__spec-row { grid-template-columns: 1fr; gap: 6px; padding: 14px 0; }
}

/* ============================================
   CASE GRID
   ============================================ */
.case {
  position: relative;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.case__media {
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
  overflow: hidden;
  position: relative;
}
/* Fiktive cases — billede + tekst meget lette / antydet */
.case[aria-disabled="true"] .case__meta,
.case[aria-disabled="true"] .case__body {
  opacity: 0.16;
  transition: opacity 0.6s ease;
}
.case[aria-disabled="true"]:hover .case__meta,
.case[aria-disabled="true"]:hover .case__body {
  opacity: 0.28;
}
.case__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Næsten gennemsigtigt — billedet er bare en antydning af kontekst */
  opacity: 0.16;
  filter: saturate(0.35) contrast(0.96) brightness(1.05);
  transition: opacity 0.6s ease, transform 0.8s ease;
}
.case:hover .case__media img {
  opacity: 0.26;
  transform: scale(1.02);
}

/* "publiceres 2026" — centreret som i den oprindelige idé */
.case__tag {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  color: var(--accent);
  background: transparent;
  padding: 0;
}
.case__tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.case__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}
.case__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
}
.case__loc {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-mute);
  text-transform: uppercase;
}
.case__body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--fg-soft);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 50ch;
}

/* ============================================
   APPROACH / DEFINITION BLOCK
   ============================================ */
.def {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 64px;
  padding: 48px 0;
  border-top: 1px solid var(--rule);
}
@media (max-width: 880px) {
  .def { grid-template-columns: 1fr; gap: 20px; padding: 32px 0; }
}
.def__term {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.def__def {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.35;
  color: var(--fg);
  max-width: 56ch;
  text-wrap: pretty;
}
.def__sub {
  margin-top: 16px;
  color: var(--fg-soft);
  font-size: 15px;
  line-height: 1.65;
  font-family: var(--sans);
  font-weight: 300;
  max-width: 56ch;
}

/* Two-column client framing */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
}
@media (max-width: 880px) { .two-col { grid-template-columns: 1fr; } }
.two-col__cell {
  padding: 36px 32px;
  background: var(--bg-alt);
  position: relative;
}
.two-col__cell + .two-col__cell { border-left: 1px solid var(--rule); }
@media (max-width: 880px) {
  .two-col__cell + .two-col__cell { border-left: 0; border-top: 1px solid var(--rule); }
}
.two-col__lbl {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.two-col__head {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.2;
  margin-bottom: 14px;
}
.two-col__body {
  font-size: 14.5px;
  color: var(--fg-soft);
  line-height: 1.65;
  font-weight: 300;
}

/* ============================================
   PULL QUOTE
   ============================================ */
.pull {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.18;
  text-wrap: balance;
  max-width: 22ch;
  color: var(--fg);
  position: relative;
  padding-left: 26px;
}
.pull::before {
  content: "";
  position: absolute;
  left: 0; top: 0.4em;
  width: 4px;
  height: 1.1em;
  background: var(--accent);
}

/* ============================================
   ABOUT — portrait block
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
}
.portrait {
  aspect-ratio: 4 / 5;
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}
.portrait img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.65) contrast(0.92) brightness(1.04) sepia(0.12);
}
.portrait .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  text-align: center;
  background-image: repeating-linear-gradient(45deg, transparent 0 18px, var(--rule) 18px 19px);
}

/* ============================================
   CTA / FOOTER
   ============================================ */
.cta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 48px;
  padding: 80px 0;
  border-top: 1px solid var(--rule);
}
@media (max-width: 720px) {
  .cta { grid-template-columns: 1fr; gap: 32px; }
}
.cta__head {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.08;
  text-wrap: balance;
  max-width: 18ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--fg);
  border-radius: 0;
  cursor: pointer;
  transition: all 0.22s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn--accent { border-color: var(--accent); color: var(--accent); }
.btn--accent:hover { background: var(--accent); color: var(--kalk); border-color: var(--accent); }
.btn .arrow { font-family: var(--serif); }

footer.site-foot {
  border-top: 1px solid var(--rule);
  padding: 56px 0 40px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 880px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.foot-grid h4 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 16px;
}
.foot-grid a, .foot-grid p {
  display: block;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 14px;
  color: var(--fg-soft);
  text-decoration: none;
  margin: 8px 0;
}
.foot-grid a:hover { color: var(--accent); }
.foot-grid .wordmark-big {
  font-family: var(--sans);
  font-weight: 200;
  letter-spacing: 0.2em;
  font-size: 18px;
  display: inline-flex;
}
.foot-grid .wordmark-big .by { color: var(--fg); }
.foot-grid .wordmark-big .vektor { color: var(--accent); }

.foot-bottom {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-mute);
  text-transform: uppercase;
}

/* ============================================
   TWEAKS PANEL (vanilla)
   ============================================ */
.tweaks {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  z-index: 100;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 13px;
  color: var(--fg);
  display: none;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.tweaks[data-open="true"] { display: block; }
.tweaks__head {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--rule);
}
.tweaks__title {
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.tweaks__close {
  background: none; border: 0; cursor: pointer; color: var(--fg-mute);
  font-family: var(--sans); font-size: 16px; line-height: 1; padding: 0;
}
.tweaks__body { padding: 18px 16px; display: grid; gap: 18px; }
.tweak {
  display: grid; gap: 8px;
}
.tweak__lbl {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.tweak__seg {
  display: grid;
  grid-template-columns: repeat(var(--n, 2), 1fr);
  border: 1px solid var(--rule);
}
.tweak__seg button {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--rule);
  padding: 8px 10px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-soft);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.tweak__seg button:last-child { border-right: 0; }
.tweak__seg button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--kalk);
}

/* ============================================
   APPROACH SCHEMA — independence diagram
   ============================================ */
.indep {
  position: relative;
  padding: 56px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 880px) {
  .indep { grid-template-columns: 1fr; gap: 24px; padding: 32px 0; }
  .indep__center { order: -1; }
}
.indep__side {
  padding: 28px;
  background: var(--bg-alt);
  border-left: 2px solid var(--accent);
}
.indep__side .label { color: var(--accent); margin-bottom: 12px; }
.indep__side h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.15;
  margin-bottom: 12px;
}
.indep__center {
  display: grid;
  place-items: center;
  width: 120px;
}
.indep__center svg { width: 100%; height: auto; }

/* ============================================
   PROCESS / METHOD LIST
   ============================================ */
.method {
  display: grid;
  gap: 0;
}
.method__row {
  display: grid;
  grid-template-columns: 80px 1fr 2fr;
  gap: 40px;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.method__row:last-child { border-bottom: 1px solid var(--rule); }
@media (max-width: 880px) {
  .method__row { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
}
.method__num {
  font-family: var(--sans);
  font-weight: 200;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--accent);
}
.method__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.15;
}
.method__desc {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  color: var(--fg-soft);
  line-height: 1.6;
}

/* ============================================
   PAGE HEAD (sub-pages)
   ============================================ */
.pagehead {
  padding: 96px 0 56px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
@media (max-width: 720px) {
  .pagehead { padding: 56px 0 40px; }
}
.pagehead__inner {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 64px;
  align-items: end;
}
@media (max-width: 880px) {
  .pagehead__inner { grid-template-columns: 1fr; gap: 24px; }
}
.pagehead h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 6.8vw, 96px);
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.pagehead .crumb {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 28px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.pagehead .crumb .sep { color: var(--accent); }

/* ============================================
   UTILITY
   ============================================ */
.divider {
  width: 80px;
  height: 1px;
  background: var(--accent);
  margin: 32px 0;
}

a.inline-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 50%, transparent);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}
a.inline-link:hover {
  color: var(--accent-alt);
  border-bottom-color: var(--accent-alt);
}

/* Mobile: collapse inline-styled 2-col grids that use fixed left column.
   Several sections use a pattern `style="display:grid;grid-template-columns:180px 1fr"`
   directly on .reveal blocks — those need to stack on small screens too. */
@media (max-width: 720px) {
  main [style*="grid-template-columns: 180px 1fr"],
  main [style*="grid-template-columns:180px 1fr"],
  main [style*="grid-template-columns: 200px 1fr"],
  main [style*="grid-template-columns:200px 1fr"],
  main [style*="grid-template-columns: 5fr 7fr"],
  main [style*="grid-template-columns:5fr 7fr"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  /* Long body copy with inline max-width keeps its proportions — nothing here */
  .hero__cap { display: none; }
  /* Footer columns get a little tighter */
  .foot-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ============================================
   DIAGNOSE — forsidens annoterede figur
   Står som analyse-objekt, ikke som problem-blok
   ============================================ */
.diagnose {
  border-top: 1px solid var(--rule);
}
.diagnose__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 22px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--rule);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.diagnose__head .accent { color: var(--accent); }

.diagnose__figure-wrap {
  position: relative;
  padding: 32px 0 16px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.diagnose__figure {
  width: 100%;
  min-width: 760px;
  max-width: 1100px;
  margin: 0 auto;
  display: block;
  height: auto;
}
.diagnose__figure .dgn-box { fill: var(--bg-card); stroke: var(--fg-mute); stroke-width: 0.8; }
[data-mode="light"] .diagnose__figure .dgn-box { fill: var(--hvid); stroke: var(--granit-lys); }
.diagnose__figure .dgn-box.is-gate { stroke: var(--fg); stroke-width: 1.2; }
.diagnose__figure .dgn-box.is-stop { stroke: var(--accent); stroke-width: 1.1; }
.diagnose__figure .dgn-box.is-go { stroke: var(--fg-soft); stroke-width: 1.1; stroke-dasharray: 2 3; }
.diagnose__figure .dgn-title { fill: var(--fg); font-family: var(--sans); font-size: 13px; font-weight: 400; }
.diagnose__figure .dgn-sub { fill: var(--fg-mute); font-family: var(--sans); font-size: 10.5px; font-weight: 300; }
.diagnose__figure .dgn-arrow { stroke: var(--fg-mute); stroke-width: 1.1; fill: none; }
.diagnose__figure .dgn-axis { stroke: var(--fg-mute); stroke-width: 0.5; opacity: 0.35; }
.diagnose__figure .dgn-axis-lab { fill: var(--fg-mute); font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; }
.diagnose__figure .dgn-pin { fill: var(--accent); }
.diagnose__figure .dgn-pin-text { fill: var(--accent); font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; }
.diagnose__figure .dgn-pin-line { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 3; fill: none; }

.diagnose__notes {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.diagnose__notes li {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.diagnose__notes .dgn-key {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.diagnose__notes .dgn-key.is-gate { color: var(--fg); }
.diagnose__notes p {
  margin: 0;
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.55;
  font-weight: 300;
  color: var(--fg-soft);
  text-wrap: pretty;
  max-width: 56ch;
}
.diagnose__notes em {
  font-style: normal;
  color: var(--fg);
}

.diagnose__close {
  margin-top: 32px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  display: flex;
  gap: 18px;
  align-items: baseline;
  flex-wrap: wrap;
}
.diagnose__close .glyph {
  width: 14px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

@media (max-width: 880px) {
  .diagnose__notes li { grid-template-columns: 1fr; gap: 4px; padding: 14px 0; }
  .diagnose__figure-wrap { margin: 0 calc(var(--bezel) * -1); padding-left: var(--bezel); padding-right: var(--bezel); }
}

/* ============================================
   CASEFILE — Overlund, dateret/falsificerbar
   ============================================ */
.casefile {
  border-top: 1px solid var(--rule);
  padding-top: 56px;
}
.casefile__head {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 32px;
  row-gap: 6px;
  align-items: baseline;
  margin-bottom: 40px;
}
.casefile__num {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  grid-row: 1;
}
.casefile__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.012em;
  text-wrap: balance;
  grid-row: 1;
}
.casefile__sub {
  grid-column: 2;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-mute);
  margin-top: 6px;
}
@media (max-width: 720px) {
  .casefile__head { grid-template-columns: 1fr; }
  .casefile__sub { grid-column: 1; }
}

.casefile__meta {
  margin: 0 0 48px;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.casefile__meta-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.casefile__meta dt {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin: 0;
}
.casefile__meta dd {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15.5px;
  color: var(--fg);
  line-height: 1.55;
}
.casefile__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
@media (max-width: 720px) {
  .casefile__meta-row { grid-template-columns: 1fr; gap: 6px; padding: 12px 0; }
}

.casefile__prediction {
  margin: 0 0 56px;
  padding: 32px 36px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  background: var(--bg-card);
}
[data-mode="light"] .casefile__prediction { background: var(--hvid); }
.casefile__pred-lab {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.casefile__pred-big {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.casefile__pred-qual {
  font-style: italic;
  color: var(--fg-soft);
  font-size: 0.78em;
}
.casefile__pred-note {
  margin: 14px 0 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--fg-soft);
  max-width: 60ch;
}

.casefile__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-bottom: 48px;
}
@media (max-width: 880px) {
  .casefile__body { grid-template-columns: 1fr; gap: 28px; }
}
.casefile__col p {
  margin-top: 14px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--fg-soft);
  max-width: 56ch;
  text-wrap: pretty;
}

.casefile__falsify {
  margin: 0 0 48px;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.casefile__falsify-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.casefile__falsify-list li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  align-items: baseline;
}
.casefile__falsify-key {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.casefile__falsify-list li span:last-child {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--fg);
}
@media (max-width: 720px) {
  .casefile__falsify-list li { grid-template-columns: 1fr; gap: 4px; }
}

.casefile__sources {
  margin: 0 0 40px;
}
.casefile__sources p {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--fg-mute);
  max-width: 80ch;
}

.casefile__foot {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

/* ============================================
   PHASE MODEL — beslutningsmodel SVG (tilgang)
   ============================================ */
.phase-model-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  margin: 48px 0 16px;
  padding-bottom: 8px;
}
.phase-model {
  width: 100%;
  max-width: 720px;
  min-width: 540px;
  height: auto;
  display: block;
}

/* SVG shape classes */
.pm-node           { fill: var(--bg-card); stroke: var(--rule); stroke-width: 0.8; }
.pm-gate           { fill: var(--bg-card); stroke: var(--rule); stroke-width: 0.8; }
.pm-gate-bar       { fill: var(--accent); stroke: none; }
.pm-intermediate   { fill: var(--bg); stroke: var(--rule); stroke-width: 0.8; }
.pm-stop-box       { fill: none; stroke: var(--accent); stroke-width: 1.0; }
.pm-wait-box       { fill: none; stroke: var(--fg-mute); stroke-width: 0.8; }
.pm-go-box         { fill: none; stroke: var(--fg); stroke-width: 1.0; }
.pm-sidegren-box   { fill: var(--bg-alt); stroke: var(--fg-mute); stroke-width: 0.8; stroke-dasharray: 5 4; }
.pm-overlevering   { fill: var(--bg-card); stroke: var(--accent); stroke-width: 1.2; }
.pm-overlevering-bar { fill: var(--accent); stroke: none; }

/* SVG line classes */
.pm-line           { stroke: var(--fg-mute); stroke-width: 1.0; fill: none; }
.pm-line-dash      { stroke: var(--fg-mute); stroke-width: 0.8; fill: none; stroke-dasharray: 5 4; }
.pm-arrowhead      { stroke: var(--fg-mute); fill: none; }

/* SVG text classes */
.pm-node-title     { fill: var(--fg);      font-family: var(--sans); font-size: 13px;   font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase; }
.pm-node-sub       { fill: var(--fg-mute); font-family: var(--sans); font-size: 11px;   font-weight: 300; }
.pm-gate-title     { fill: var(--fg);      font-family: var(--sans); font-size: 13.5px; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; }
.pm-gate-sub-head  { fill: var(--fg-mute); font-family: var(--sans); font-size: 11px;   font-weight: 300; letter-spacing: 0.06em; }
.pm-bullet         { fill: var(--fg-mute); font-family: var(--sans); font-size: 12px;   font-weight: 300; }
.pm-product        { fill: var(--accent);  font-family: "JetBrains Mono", monospace; font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; }
.pm-stop-lbl       { fill: var(--accent);  font-family: var(--sans); font-size: 10.5px; font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase; }
.pm-wait-lbl       { fill: var(--fg-mute); font-family: var(--sans); font-size: 10.5px; font-weight: 300; letter-spacing: 0.22em; text-transform: uppercase; }
.pm-go-lbl         { fill: var(--fg);      font-family: var(--sans); font-size: 10.5px; font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase; }
.pm-sidegren-title { fill: var(--fg-mute); font-family: var(--sans); font-size: 10.5px; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; }
.pm-sidegren-bul   { fill: var(--fg-mute); font-family: var(--sans); font-size: 10px;   font-weight: 300; }
.pm-int-title      { fill: var(--fg);      font-family: var(--sans); font-size: 11.5px; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase; }
.pm-int-sub        { fill: var(--fg-mute); font-family: var(--sans); font-size: 10px;   font-weight: 300; }
.pm-overl-title    { fill: var(--fg);      font-family: var(--sans); font-size: 13px;   font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase; }
.pm-overl-sub      { fill: var(--fg-mute); font-family: var(--sans); font-size: 10.5px; font-weight: 300; }

/* ============================================
   CASEFILE CARD (cases.html)
   ============================================ */
.casefile-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 40px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  max-width: 800px;
  transition: background 0.22s ease;
}
.casefile-card:hover { background: var(--bg-alt); }
.casefile-card__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}
.casefile-card__num {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent);
}
.casefile-card__badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
}
.casefile-card__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.1; color: var(--fg);
}
.casefile-card__loc {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.08em; color: var(--fg-mute);
}
.casefile-card__teaser {
  font-family: var(--sans); font-weight: 300;
  font-size: 15.5px; line-height: 1.6;
  color: var(--fg-soft); max-width: 58ch;
}
.casefile-card__cta {
  font-family: var(--sans); font-weight: 400;
  font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
  margin-top: 6px;
}
@media (max-width: 720px) {
  .casefile-card { padding: 28px 20px; }
}

/* Tweak: vejkryds density */
[data-vk="sparsom"] .corners .c-bl,
[data-vk="sparsom"] .corners .c-tr { display: none; }
[data-vk="ingen"] .corners { display: none; }

/* Tweak: tegl variants */
[data-tegl="lys"] { --accent: var(--tegl-lys); --accent-alt: var(--tegl); }
[data-tegl="daempet"] { --accent: var(--tegl-daempet); --accent-alt: var(--tegl); }


/* ============================================
   EASTER EGG modal (var inline i index/om)
   ============================================ */
.egg { position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: 0; transition: opacity 0.3s ease; }
.egg[data-open="true"] { opacity: 1; pointer-events: auto; }
.egg__backdrop { position: absolute; inset: 0; background: color-mix(in oklab, var(--granit-dyb) 86%, transparent); backdrop-filter: blur(8px); }
.egg__panel { position: relative; z-index: 1; max-width: 640px; width: calc(100% - 48px); margin: 10vh auto 0; background: var(--bg-card); border: 1px solid var(--rule); border-left: 3px solid var(--accent); padding: 0; transform: translateY(20px); transition: transform 0.32s ease; }
.egg[data-open="true"] .egg__panel { transform: translateY(0); }
.egg__inner { padding: 56px 48px 48px; }
.egg__close { position: absolute; top: 12px; right: 14px; background: none; border: 0; font-size: 26px; line-height: 1; color: var(--fg-mute); cursor: pointer; padding: 6px 10px; }
.egg__close:hover { color: var(--accent); }
@media (max-width: 720px) { .egg__inner { padding: 40px 28px 32px; } }

/* ============================================
   CASE GRID (var inline i cases)
   ============================================ */
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; margin-top: 72px; }
@media (max-width: 880px) {
  .case-grid { grid-template-columns: 1fr; gap: 48px; }
  .invitation-head { grid-template-columns: 1fr !important; gap: 32px !important; }
}
.case-grid .case__media { aspect-ratio: 16 / 9; max-height: 360px; }

/* ============================================
   GAB-FIGUR (var inline i tilbyder)
   ============================================ */
.gab-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: center; }
@media (max-width: 880px) { .gab-grid { grid-template-columns: 1fr; gap: 40px; } }
.gab-fig { margin: 0; color: var(--fg); }
.gab-fig svg { width: 100%; height: auto; display: block; }
.gab-side { display: flex; flex-direction: column; gap: 28px; }
.gab-box { padding: 24px 0; border-top: 1px solid var(--rule); }
.gab-box:last-child { border-bottom: 1px solid var(--rule); }
.gab-quote { font-family: var(--serif, "Playfair Display", serif); font-style: italic; font-size: clamp(20px, 1.8vw, 24px); color: var(--accent); margin: 0 0 14px; line-height: 1.3; }

/* ============================================
   DEMONSTRATIONSANALYSER — konstruerede cases
   ============================================ */
.fiktion {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-mute);
}
.fiktion::before { content: ""; width: 22px; height: 1px; background: var(--accent); align-self: center; }
.fiktion strong { font-weight: 400; color: var(--accent); }

.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 48px; }
@media (max-width: 880px) { .demo-grid { grid-template-columns: 1fr; } }
.demo-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 40px 36px; background: var(--bg-card);
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  text-decoration: none; color: inherit;
  transition: background 0.22s ease;
}
.demo-card:hover { background: var(--bg-alt); }
.demo-card__num { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.demo-card__title { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.12; }
.demo-card__loc { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.08em; color: var(--fg-mute); }
.demo-card__teaser { font-family: var(--sans); font-weight: 300; font-size: 15px; line-height: 1.6; color: var(--fg-soft); }
.demo-card__cta { font-family: var(--sans); font-weight: 400; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-top: 6px; }
@media (max-width: 720px) { .demo-card { padding: 28px 20px; } }

/* Analysenotat — de to demonstrations-casesider */
.note-row { display: grid; grid-template-columns: 180px 1fr; gap: 48px; padding: 40px 0; border-top: 1px solid var(--rule); align-items: start; }
.note-row:last-child { border-bottom: 1px solid var(--rule); }
@media (max-width: 880px) { .note-row { grid-template-columns: 1fr; gap: 14px; padding: 28px 0; } }
.note-row__key { font-family: var(--sans); font-weight: 400; font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.note-row h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.15; margin-bottom: 16px; text-wrap: balance; }

/* Waterfall — kravprissætning */
.wf { display: grid; gap: 0; margin-top: 32px; border-top: 1px solid var(--rule); }
.wf__row { display: grid; grid-template-columns: 200px 1fr 96px; gap: 24px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.wf__lab { font-family: var(--sans); font-weight: 400; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg); }
.wf__lab span { display: block; font-weight: 300; letter-spacing: 0.04em; text-transform: none; font-size: 12.5px; color: var(--fg-mute); margin-top: 3px; }
.wf__track { position: relative; height: 14px; }
.wf__bar { position: absolute; top: 0; height: 14px; background: var(--accent); }
.wf__bar--neg { background: color-mix(in oklab, var(--accent) 42%, transparent); }
.wf__bar--sum { background: var(--fg-soft); }
.wf__val { font-family: "JetBrains Mono", monospace; font-size: 13px; text-align: right; color: var(--fg); }
.wf__val--neg { color: var(--accent); }
@media (max-width: 720px) { .wf__row { grid-template-columns: 1fr 64px; } .wf__track { grid-column: 1 / -1; } }

/* Metrics — forudsætninger */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 40px; }
@media (max-width: 980px) { .metrics { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .metrics { grid-template-columns: 1fr; } }
.metric { padding: 28px 24px; background: var(--bg-alt); border-top: 2px solid var(--accent); }
.metric__lbl { font-family: var(--sans); font-weight: 400; font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--fg-mute); margin-bottom: 18px; }
.metric__big { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 44px); line-height: 1; color: var(--fg); }
.metric__unit { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.08em; color: var(--fg-mute); margin-top: 10px; }
.metric__verdict { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); }
.metric__note { font-family: var(--sans); font-weight: 300; font-size: 13.5px; line-height: 1.55; color: var(--fg-soft); margin-top: 12px; }

/* Områder — Lindbjerg */
.omr { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 40px; }
@media (max-width: 1100px) { .omr { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .omr { grid-template-columns: 1fr; } }
.omr__cell { padding: 26px 22px; background: var(--bg-card); border: 1px solid var(--rule); display: flex; flex-direction: column; gap: 10px; }
.omr__code { font-family: "JetBrains Mono", monospace; font-size: 20px; letter-spacing: 0.12em; color: var(--accent); }
.omr__name { font-family: var(--serif); font-weight: 400; font-size: 19px; line-height: 1.15; color: var(--fg); }
.omr__kind { font-family: var(--sans); font-weight: 400; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-mute); }
.omr__body { font-family: var(--sans); font-weight: 300; font-size: 13.5px; line-height: 1.55; color: var(--fg-soft); }
.omr__status { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--rule); font-family: "JetBrains Mono", monospace; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.omr__status--stop { color: var(--accent); }
.omr__status--go { color: var(--fg); }

/* Residualmekanik — baglæns regnestykke */
.resid { margin-top: 36px; border-top: 1px solid var(--rule); }
.resid__row { display: grid; grid-template-columns: 32px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.resid__op { font-family: var(--serif); font-size: 22px; color: var(--accent); line-height: 1; }
.resid__t { font-family: var(--sans); font-weight: 400; font-size: 16px; color: var(--fg); }
.resid__t span { display: block; font-weight: 300; font-size: 13.5px; color: var(--fg-mute); margin-top: 4px; line-height: 1.5; }
.resid__row--sum { border-bottom: 0; padding-top: 26px; }
.resid__row--sum .resid__t { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); }

/* Kriterie-matrix — hvorfor et projekt bærer */
.note-row > div { min-width: 0; }
.krit { margin-top: 36px; border-top: 1px solid var(--rule); overflow-x: auto; }
.krit__row { display: grid; grid-template-columns: 170px repeat(4, 1fr) 130px 200px; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--rule); align-items: baseline; min-width: 1060px; }

/* Parametergrundlag */
.ptab { margin-top: 26px; border-top: 1px solid var(--rule); overflow-x: auto; }
.ptab__row { display: grid; grid-template-columns: minmax(230px, 1.2fr) 170px minmax(240px, 1.5fr); gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--rule); align-items: baseline; min-width: 660px; }
.ptab__row--head { padding: 10px 0 11px; }
.ptab__row--head > * { font-family: var(--sans); font-weight: 400; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-mute); }
.ptab__p { font-family: var(--sans); font-weight: 300; font-size: 13.5px; line-height: 1.5; color: var(--fg); }
.ptab__v { font-family: "JetBrains Mono", monospace; font-size: 12.5px; line-height: 1.5; color: var(--fg); }
.ptab__k { font-family: var(--sans); font-weight: 300; font-size: 12.5px; line-height: 1.5; color: var(--fg-mute); }
.krit__row--head { padding: 10px 0 12px; }
.krit__row--head > * { font-family: var(--sans); font-weight: 400; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-mute); }
.krit__proj { font-family: var(--serif); font-size: 18px; color: var(--fg); line-height: 1.2; }
.krit__proj span { display: block; font-family: "JetBrains Mono", monospace; font-size: 10.5px; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 5px; }
.krit__c { font-family: var(--sans); font-weight: 300; font-size: 13.5px; line-height: 1.5; color: var(--fg-soft); }
.krit__c--no { color: var(--accent); }
.krit__c--ok { color: var(--fg); }
.krit__svar { font-family: "JetBrains Mono", monospace; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.krit__svar--go { color: var(--fg); }
