/* ==========================================================================
   Kobber byggeklosser
   Ren CSS uten byggesteg. Verdiene er målt på de ekte Kobber-komponentene
   på gyldendal.no. Se LES-MEG.md for hvordan klossene brukes.

   Bruk: <link rel="stylesheet" href="byggeklosser/kobber.css">
   Uttrykk: sett data-uttrykk="lys" eller "mork" på et element.
   Alt inni elementet får da riktige farger.
   ========================================================================== */

/* ---------- Skrifter ---------- */
@font-face { font-family: "PP Mori"; src: url("../fonter/web/PPMori-Light.woff2") format("woff2"); font-weight: 100 349; font-style: normal; font-display: swap; }
@font-face { font-family: "PP Mori"; src: url("../fonter/web/PPMori-Book.woff2") format("woff2"); font-weight: 350 399; font-style: normal; font-display: swap; }
@font-face { font-family: "PP Mori"; src: url("../fonter/web/PPMori-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "PP Mori"; src: url("../fonter/web/PPMori-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "PP Mori"; src: url("../fonter/web/PPMori-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lyon Display"; src: url("../fonter/web/LyonDisplay-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Lyon Display"; src: url("../fonter/web/LyonDisplay-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Lyon Display"; src: url("../fonter/web/LyonDisplay-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Uttrykk: lys, mork ---------- */
:root,
[data-uttrykk="lys"] {
  --k-bg: #fdf9f9;            /* bakgrunn */
  --k-fg: #691837;            /* tekst */
  --k-accent: #dc134f;        /* uthevet del av tittel */
  --k-muted: #884d5d;         /* dempet tekst */
  --k-subtle: #a35e70;        /* enda svakere tekst, brukt i bunnlinjen */
  --k-border: #d9b1ba;        /* kant og strek */
  --k-surface: #f9eaed;       /* flate for kort */
  --k-primary-bg: #dc134f;    /* primærknapp */
  --k-primary-fg: #fdf9f9;
  --k-secondary-bg: #f9eaed;  /* sekundærknapp */
  --k-secondary-fg: #691837;
  --k-tertiary-fg: #532d37;   /* tertiært merke */
  --k-link: #dc134f;          /* tekstlenke */
  --k-ring: #481125;          /* ringen i radioknappen */
  --k-error: #c10007;         /* feilmelding */
  --k-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23691837' d='M7.75 14.917h-.333c-.417-.084-.75-.334-.917-.667l-2-2.917c-.167-.25-.167-.666.167-.833.083-.083.25-.083.333-.083.167 0 .417.083.5.25l2.083 2.916c.084.084.084.084.167.084h.083c.084 0 .084 0 .167-.084 0 0 .083 0 .083-.083l6.584-8.25c.083-.167.333-.25.5-.25.166 0 .25.083.416.167.167.083.25.25.25.416 0 .167 0 .334-.166.5l-6.5 8.25-.334.334c-.5.166-.75.25-1.083.25Z'/%3E%3C/svg%3E");
}

[data-uttrykk="mork"] {
  --k-bg: #330314;
  --k-fg: #fdf9f9;
  --k-accent: #dc134f;
  --k-muted: #f5c9d3;
  --k-subtle: #f5c9d3;
  --k-border: #8a224a;
  --k-surface: #481125;
  --k-primary-bg: #dc134f;
  --k-primary-fg: #fdf9f9;
  --k-secondary-bg: #481125;
  --k-secondary-fg: #f9eaed;
  --k-tertiary-fg: #f9eaed;
  --k-link: #fdf9f9;
  --k-ring: #fdf9f9;
  --k-error: #fda1a7;
  --k-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23fdf9f9' d='M7.75 14.917h-.333c-.417-.084-.75-.334-.917-.667l-2-2.917c-.167-.25-.167-.666.167-.833.083-.083.25-.083.333-.083.167 0 .417.083.5.25l2.083 2.916c.084.084.084.084.167.084h.083c.084 0 .084 0 .167-.084 0 0 .083 0 .083-.083l6.584-8.25c.083-.167.333-.25.5-.25.166 0 .25.083.416.167.167.083.25.25.25.416 0 .167 0 .334-.166.5l-6.5 8.25-.334.334c-.5.166-.75.25-1.083.25Z'/%3E%3C/svg%3E");
}


[data-uttrykk] {
  background-color: var(--k-bg);
  color: var(--k-fg);
}

/* ---------- Grunnlag ---------- */
/* Reglene for rene elementer ligger i laget «base». Da vinner klassene i seksjoner/seksjoner.css
   over dem når begge stilarkene er lastet, og seksjonene beholder sine egne mål. */
@layer base {
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--k-bg);
  color: var(--k-fg);
  font-family: "PP Mori", Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Typografi ----------
   Titler er store og lette. Alle marger er 0. Avstand settes med gap. */
h1, h2, h3, h4, h5, h6, p, blockquote, figure { margin: 0; }

h1 { font-size: 48px; line-height: 60px; font-weight: 300; }
h2 { font-size: 32px; line-height: 40px; font-weight: 400; }
h3 { font-size: 24px; line-height: 32px; font-weight: 300; }
h4 { font-size: 20px; line-height: 28px; font-weight: 400; }
h5 { font-size: 18px; line-height: 26px; font-weight: 400; }
h6 { font-size: 16px; line-height: 24px; font-weight: 400; }
p, li { font-size: 16px; line-height: 24px; font-weight: 400; }
}

/* Klasser som setter stilen uavhengig av taggen. Størrelsene krymper jevnt
   mot mobil, slik de gjør på gyldendal.no. */
.k-display   { font-size: clamp(1.875rem, 2.87vw + 1.2rem, 3.5rem); line-height: 1.2; font-weight: 300; letter-spacing: -0.02em; }
.k-h1        { font-size: clamp(2rem, 0.88vw + 1.79rem, 2.5rem); line-height: 1.2; font-weight: 300; letter-spacing: -0.015em; }
.k-h2        { font-size: clamp(1.375rem, 1.1vw + 1.12rem, 2rem); line-height: 1.2; font-weight: 300; letter-spacing: -0.01em; }
.k-h3        { font-size: clamp(1.125rem, 0.66vw + 0.97rem, 1.5rem); line-height: 1.2; font-weight: 400; letter-spacing: 0; }
.k-title     { font-size: 20px; line-height: 1.2; font-weight: 500; }
.k-h5        { font-size: 18px; line-height: 1.3; font-weight: 400; }
.k-h6        { font-size: 16px; line-height: 1.4; font-weight: 400; }
.k-lead      { font-size: 20px; line-height: 28px; font-weight: 400; }
.k-body      { font-size: 16px; line-height: 24px; font-weight: 400; }
.k-body-read { font-size: 16px; line-height: 28px; font-weight: 400; }
.k-body-sm   { font-size: 14px; line-height: 20px; font-weight: 400; }
.k-label-lg  { font-size: 16px; line-height: 22px; font-weight: 500; }
.k-label-md  { font-size: 14px; line-height: 20px; font-weight: 500; }
.k-label-sm  { font-size: 12px; line-height: 18px; font-weight: 500; }
.k-eyebrow   { font-size: 12px; line-height: 18px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--k-muted); }
.k-caption   { font-size: 12px; line-height: 18px; font-weight: 400; }
.k-quote     { font-family: "Lyon Display", Georgia, serif; font-size: 24px; line-height: 1.45; font-weight: 400; font-style: italic; }

.k-accent { color: var(--k-accent); }   /* den karminrøde delen av en tittel */
.k-serif  { font-family: "Lyon Display", Georgia, serif; }
.k-muted  { color: var(--k-muted); }

/* ---------- Side og seksjoner ---------- */
.k-page {
  width: 100%;
  max-width: 1420px;
  margin-inline: auto;
  padding-inline: 16px;
}
@media (min-width: 1024px) { .k-page { padding-inline: 40px; } }
@media (min-width: 1280px) { .k-page { padding-inline: 64px; } }
@media (min-width: 1536px) { .k-page { max-width: 1548px; padding-inline: 128px; } }

/* Smalere spalter inni siden */
.k-container       { width: 100%; margin-inline: auto; max-width: 1024px; }
.k-container--sm   { max-width: 640px; }
.k-container--md   { max-width: 768px; }
.k-container--lg   { max-width: 1024px; }
.k-container--xl   { max-width: 1280px; }

/* Loddrett avstand mellom seksjoner */
.k-sections { display: flex; flex-direction: column; gap: 48px; }
@media (min-width: 768px)  { .k-sections { gap: 64px; } }
@media (min-width: 1024px) { .k-sections { gap: 72px; } }
.k-sections--airy { gap: 64px; }
@media (min-width: 768px)  { .k-sections--airy { gap: 96px; } }
@media (min-width: 1024px) { .k-sections--airy { gap: 128px; } }

/* Tittelrad over en seksjon: tittel til venstre, lenke til høyre */
.k-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 24px;
}

/* Hjelpere for oppstilling */
.k-stack { display: flex; flex-direction: column; gap: 24px; }
.k-stack--sm { gap: 8px; }
.k-stack--md { gap: 16px; }
.k-stack--lg { gap: 32px; }
.k-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.k-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 768px)  { .k-grid--2, .k-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .k-grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Ikon ----------
   Lim inn SVG-en fra ikoner/ og bytt fill="#000" med fill="currentColor". */
.k-icon { display: inline-flex; flex-shrink: 0; width: 20px; height: 20px; }
.k-icon svg { display: block; width: 100%; height: 100%; }
svg.k-icon { display: block; }

/* ---------- Knapp ---------- */
.k-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background-color: var(--k-primary-bg);
  color: var(--k-primary-fg);
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background-color 150ms ease-out, color 150ms ease-out, opacity 150ms ease-out;
}
.k-button svg, .k-button .k-icon { width: 16px; height: 16px; flex-shrink: 0; }
.k-button:hover  { opacity: 0.9; }
.k-button:active { opacity: 0.8; }
.k-button:focus-visible { outline: 2px solid var(--k-accent); outline-offset: 2px; }
.k-button:disabled, .k-button[aria-disabled="true"] { opacity: 0.5; pointer-events: none; cursor: not-allowed; }

.k-button--secondary { background-color: var(--k-secondary-bg); color: var(--k-secondary-fg); }

.k-button--tertiary {
  background-color: transparent;
  color: var(--k-fg);
  border-radius: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.k-button--tertiary:hover, .k-button--tertiary:active { opacity: 1; }

.k-button--sm { height: 32px; padding: 0 12px; gap: 6px; font-size: 14px; line-height: 20px; }
.k-button--sm svg, .k-button--sm .k-icon { width: 14px; height: 14px; }
.k-button--lg { height: 48px; padding: 0 20px; gap: 10px; font-size: 18px; line-height: 28px; }
.k-button--lg svg, .k-button--lg .k-icon { width: 20px; height: 20px; }

/* Knapp med bare ikon. Husk aria-label. */
.k-button--icon { width: 40px; padding: 0; }
.k-button--icon.k-button--sm { width: 32px; }
.k-button--icon.k-button--lg { width: 48px; }

/* ---------- Skjemafelt ---------- */
.k-field { display: flex; flex-direction: column; gap: 8px; }

/* Skjemaet på gyldendal.no/nyhetsbrev er fasit: smal midtstilt spalte, ledetekst i små store bokstaver, felt med strek under. */
.k-form { display: flex; flex-direction: column; gap: 48px; width: 100%; max-width: 564px; margin-inline: auto; }
.k-form__group { display: flex; flex-direction: column; gap: 16px; border: 0; padding: 0; margin: 0; min-width: 0; }
legend.k-form__caption { float: left; width: 100%; }
.k-form__caption { padding-left: 4px; margin-bottom: -8px; font-size: 12px; line-height: 16px; font-weight: 400; text-transform: uppercase; color: var(--k-muted); }

.k-label, .k-label--caps { padding-left: 4px; font-size: 12px; line-height: 16px; font-weight: 500; text-transform: uppercase; color: var(--k-muted); }

.k-help  { font-size: 12.8px; line-height: 20px; color: var(--k-muted); }
.k-error { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--k-error); }

/* Standard felt på gyldendal.no: strek under, avrundet topp, ingen ramme */
.k-input, .k-textarea {
  display: block;
  width: 100%;
  height: 44px;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--k-fg);
  border-radius: 8px 8px 0 0;
  background-color: transparent;
  color: var(--k-fg);
  font-family: inherit;
  font-size: 14px;
  line-height: 24px;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.k-input::placeholder, .k-textarea::placeholder { color: var(--k-muted); opacity: 1; }
.k-input:hover, .k-textarea:hover { border-bottom-color: var(--k-muted); }
.k-input:focus, .k-textarea:focus { outline: none; border-bottom-color: var(--k-accent); }
.k-input:disabled, .k-textarea:disabled { opacity: 0.5; cursor: not-allowed; }


/* Felt med ramme rundt, brukt for søk og enkeltfelt */
.k-input--box {
  height: 40px;
  border: 1px solid var(--k-border);
  border-radius: 8px;
  background-color: var(--k-bg);
}
.k-input--box:hover { border-color: var(--k-muted); }
.k-input--box:focus { border-color: var(--k-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--k-accent) 20%, transparent); }

.k-textarea { height: auto; min-height: 96px; resize: vertical; }
.k-textarea.k-input--box { height: auto; }

/* Feil: sett aria-invalid="true" på feltet og vis en .k-error under */
.k-input[aria-invalid="true"], .k-textarea[aria-invalid="true"] { border-color: var(--k-error); }
.k-field:has([aria-invalid="true"]) .k-label { color: var(--k-error); }

/* På mobil må feltteksten være 16 px, ellers zoomer iOS inn */
@media (pointer: coarse) and (max-width: 767px) {
  .k-input, .k-textarea { font-size: 16px; }
}

/* ---------- Avkrysning ---------- */
.k-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  font-size: 14px;
  line-height: 21px;
  cursor: pointer;
  user-select: none;
}
.k-checkbox input {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 1px solid var(--k-fg);
  border-radius: 8px;
  background: transparent center / 20px 20px no-repeat;
  cursor: pointer;
  transition: background-color 150ms ease-in-out, box-shadow 150ms ease-in-out;
}
.k-checkbox input:checked { background-color: var(--k-bg); background-image: var(--k-check); }
.k-checkbox:hover input { box-shadow: 0 0 0 4px color-mix(in srgb, var(--k-border) 50%, transparent); }
.k-checkbox input:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--k-border); }
.k-checkbox input:disabled { opacity: 0.5; cursor: not-allowed; }
.k-checkbox:has(input:disabled) { cursor: not-allowed; }

/* ---------- Radioknapp ---------- */
.k-radio {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
  user-select: none;
}
.k-radio input {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 2px;
  border: 1px solid var(--k-ring);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: box-shadow 150ms ease-in-out;
}
.k-radio input:checked { background-image: radial-gradient(circle, var(--k-fg) 0 4.6px, transparent 5.4px); }
.k-radio:hover input { box-shadow: 0 0 0 2px color-mix(in srgb, var(--k-border) 50%, transparent); }
.k-radio input:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--k-border); }
.k-radio input:disabled { opacity: 0.5; cursor: not-allowed; }

/* Gruppe av avkrysninger eller radioknapper */
.k-choices { display: flex; flex-direction: column; gap: 12px; border: 0; margin: 0; padding: 0; min-width: 0; }
.k-choices legend { padding: 0; margin-bottom: 12px; }

/* ---------- Bryter ---------- */
.k-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}
.k-switch__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; line-height: 21px; }
.k-switch__text small { font-size: 12px; line-height: 16px; color: var(--k-muted); }
.k-switch input {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  margin: 0;
  border: 1px solid var(--k-fg);
  border-radius: 999px;
  background-color: transparent;
  background-image: radial-gradient(circle 8px at 11px 50%, var(--k-fg) 96%, transparent 100%);
  background-repeat: no-repeat;
  cursor: pointer;
  transition: background-color 150ms ease-in-out, box-shadow 150ms ease-in-out;
}
.k-switch input:checked {
  background-color: var(--k-fg);
  background-image: radial-gradient(circle 8px at calc(100% - 11px) 50%, var(--k-bg) 96%, transparent 100%);
}
.k-switch:hover input { box-shadow: 0 0 0 4px color-mix(in srgb, var(--k-border) 50%, transparent); }
.k-switch input:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--k-border); }
.k-switch:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }

/* ---------- Kort ---------- */
.k-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 32px;
  border-radius: 16px;
  background-color: var(--k-surface);
  color: var(--k-fg);
}
.k-card--sm { gap: 16px; padding: 24px; }

/* ---------- Kampanjekort ----------
   Den store flaten som åpner en landingsside. Sett data-uttrykk="mork". */
.k-campaign {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px;
  border-radius: 16px;
  overflow: hidden;
}
.k-campaign__content { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 32px; flex: 1; min-width: 0; }
.k-campaign__text { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.k-campaign__image { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 16px; background-color: var(--k-surface); }
@media (min-width: 1024px) {
  .k-campaign { flex-direction: row; align-items: stretch; gap: 40px; padding: 40px; }
  .k-campaign__image { width: 45%; flex-shrink: 0; }
}

/* Lite kampanjekort inni en side: bilde til venstre, tekst og knapp til høyre */
.k-campaign--small { gap: 24px; padding: 20px; background-color: var(--k-surface); }
.k-campaign--small .k-campaign__content { gap: 24px; }
.k-campaign--small .k-campaign__image { aspect-ratio: auto; height: 200px; border-radius: 8px; }
@media (min-width: 768px) {
  .k-campaign--small { flex-direction: row; align-items: center; gap: 40px; padding: 24px; }
  .k-campaign--small .k-campaign__image { width: 280px; height: 280px; flex-shrink: 0; }
}

/* ---------- Toppseksjon med bilde og kort ----------
   Stort bilde med et kort som skjærer inn i nedre høyre hjørne. */
.k-hero { width: 100%; max-width: 1152px; margin-inline: auto; padding-top: 72px; display: flex; flex-direction: column; gap: 16px; }
.k-hero__media { position: relative; aspect-ratio: 1152 / 648; }
.k-hero__media img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.k-hero__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  padding: 32px 0;
  border-radius: 16px;
  background-color: var(--k-bg);
}
@media (min-width: 1024px) {
  .k-hero__card {
    align-self: flex-end;
    width: 61.71875%;
    max-width: 711px;
    margin-top: calc(100% * -109 / 1152 - 16px);
    padding: 32px;
    border-top-right-radius: 0;
    z-index: 1;
  }
  .k-hero__card::after,
  .k-hero__media::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    pointer-events: none;
    background: radial-gradient(circle at 0% 0%, transparent 16px, var(--k-bg) 16px);
  }
  .k-hero__card::after  { top: -16px; right: 0; }
  .k-hero__media::after { left: calc(38.28125% - 16px); bottom: 0; z-index: 2; }
}

/* ---------- Hjørneboks ----------
   Avrundet flate med en fane nederst til venstre. Hakket ved siden av fanen
   er der en lenke eller merker står. */
.k-corner-box { display: flex; flex-direction: column; width: 100%; max-width: 488px; }
.k-corner-box__header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  margin-bottom: -1px;
  border-radius: 16px 16px 16px 0;
  background-color: var(--k-bg);
  color: var(--k-fg);
}
.k-corner-box__meta { font-size: 14px; line-height: 14px; font-weight: 500; }
.k-corner-box__footer { display: flex; align-items: flex-start; margin-bottom: -1px; }
.k-corner-box__footer-inner {
  padding: 4px;
  border-radius: 0 0 16px 16px;
  background-color: var(--k-bg);
  color: var(--k-fg);
}
.k-corner-box__footer-inner--badges { display: flex; gap: 16px; padding: 8px 16px; }
.k-corner-box__footer::after {
  content: "";
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  background: radial-gradient(circle at 100% 100%, transparent 12px, var(--k-bg) 12px);
}
/* Uten fane: alle fire hjørner avrundet */
.k-corner-box--plain .k-corner-box__header { border-radius: 16px; margin-bottom: 0; }

/* Bildeflate som hjørneboksen kan ligge oppå */
.k-media { position: relative; border-radius: 16px; overflow: hidden; background-color: var(--k-surface); }
.k-media > img { width: 100%; height: 100%; object-fit: cover; }
.k-media > .k-corner-box { position: absolute; left: 16px; bottom: 16px; width: calc(100% - 32px); }

/* ---------- Varsel ---------- */
.k-alert {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background-color: var(--k-surface);
  color: var(--k-fg);
  font-size: 14px;
  line-height: 24px;
}
.k-alert svg, .k-alert .k-icon { flex-shrink: 0; width: 16px; height: 16px; margin-top: 4px; }
.k-alert--success { background-color: #cbfbdb; color: #014f2d; }
.k-alert--warning { background-color: #ffe6d2; color: #623a0e; }
.k-alert--info    { background-color: #ece6f9; color: #4420b0; }
[data-uttrykk="mork"] .k-alert--success { background-color: #014f2d; color: #cbfbdb; }
[data-uttrykk="mork"] .k-alert--warning { background-color: #623a0e; color: #ffe6d2; }
[data-uttrykk="mork"] .k-alert--info    { background-color: #4420b0; color: #ece6f9; }

/* ---------- Merke ---------- */
.k-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background-color: var(--k-primary-bg);
  color: var(--k-primary-fg);
  font-size: 14px;
  line-height: 1;
  font-weight: 400;
  white-space: nowrap;
}
.k-badge svg, .k-badge .k-icon { width: 16px; height: 16px; }
.k-badge--secondary { background-color: var(--k-secondary-bg); color: var(--k-secondary-fg); }
.k-badge--tertiary  { background-color: transparent; color: var(--k-tertiary-fg); }
.k-badge--sm { gap: 4px; padding: 4px; border-radius: 4px; font-size: 12px; }
.k-badge--sm svg, .k-badge--sm .k-icon { width: 12px; height: 12px; }

/* ---------- Skillestrek ---------- */
/* Et element med hidden-attributtet er alltid skjult, også når en kloss setter display. */
[hidden] { display: none !important; }

/* ---------- Bilde med tekst: bildet på den ene siden, tittel og kort med flate på den andre ---------- */
.k-split { display: grid; gap: 32px; align-items: center; }
.k-split__image { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; }
.k-split__content { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
/* På mobil står bildet etter teksten, slik at to bilder ikke havner rett etter hverandre. */
.k-split > .k-split__image { order: 2; }
@media (min-width: 900px) {
  .k-split { grid-template-columns: 5fr 7fr; gap: 64px; }
  .k-split > .k-split__image { order: 0; }
  .k-split--reverse > .k-split__image { order: 2; }
}
/* k-split--fit: bildet blir like høyt som innholdet ved siden av, og spaltene flukter i topp og bunn.
   Bruk den når innholdet er en liste, steg eller flere avsnitt, så ingen spalte står halvtom. */
@media (min-width: 900px) {
  .k-split--fit { align-items: stretch; }
  .k-split--fit > .k-split__image { aspect-ratio: auto; height: 100%; min-height: 320px; }
  .k-split--reverse { grid-template-columns: 7fr 5fr; }
}
/* Små fakta ved siden av et bilde får kort med egen flate. Uten flate ser de stusselige ut. */
.k-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.k-card-grid > .k-card { padding: 24px; gap: 8px; }
.k-card__title { font-size: 20px; line-height: 28px; font-weight: 400; color: var(--k-fg); margin: 0; }
.k-card__text { font-size: 16px; line-height: 24px; color: var(--k-muted); margin: 0; }

/* ---------- Liste og steg: streker bare mellom radene ---------- */
/* Streken står mellom ting. Aldri over den første eller under den siste raden. */
.k-list { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.k-list > * { padding-block: 20px; }
.k-list > * + * { border-top: 1px solid var(--k-border); }
.k-list > :first-child { padding-top: 0; }
.k-list > :last-child { padding-bottom: 0; }

.k-steps { counter-reset: steg; }
.k-steps > li { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; align-items: start; counter-increment: steg; }
/* Tallet har samme linjehøyde som tittelen, så tallet og første linje står midt på samme linje */
.k-steps > li::before { content: counter(steg); font-size: 24px; line-height: 22px; font-weight: 300; color: var(--k-fg); }
/* Større steg, til en bred spalte på en landingsside */
.k-steps--lg > li { grid-template-columns: 56px 1fr; }
.k-steps--lg > li::before { font-size: 32px; line-height: 28px; }
.k-steps--lg .k-step__title { font-size: 20px; line-height: 28px; font-weight: 400; }
.k-steps--lg .k-step__text { font-size: 16px; line-height: 24px; }
.k-list.k-steps--lg > * { padding-block: 24px; }
.k-step__title { font-size: 16px; line-height: 22px; font-weight: 500; color: var(--k-fg); margin: 0; }
.k-step__text { font-size: 14px; line-height: 20px; color: var(--k-muted); margin: 4px 0 0; }

/* Nøkkelfakta på rad: tall og fakta i tekstfargen, ingen streker */
.k-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.k-fact__label { font-size: 12px; line-height: 16px; text-transform: uppercase; color: var(--k-muted); margin: 0 0 8px; }
.k-fact__value { font-size: 40px; line-height: 48px; font-weight: 300; color: var(--k-fg); margin: 0; }
.k-fact__text { font-size: 14px; line-height: 20px; color: var(--k-muted); margin: 8px 0 0; }

.k-divider {
  display: block;
  width: 100%;
  height: 1px;
  margin: 16px 0;
  border: 0;
  background-color: var(--k-border);
}

/* ---------- Tekstlenke ---------- */
.k-link { color: var(--k-link); text-decoration: underline; text-underline-offset: 2px; }
.k-link:hover { text-decoration-thickness: 2px; }
.k-link:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 2px; }

/* ---------- Topplinje ---------- */
.k-header { position: sticky; top: 0; z-index: 10; background-color: var(--k-bg); }
.k-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 73px; }
.k-header__logo { display: block; flex-shrink: 0; }
.k-header__logo img { height: 38px; width: auto; }
.k-header__nav { display: none; align-items: center; justify-content: center; padding: 8px 16px; }
.k-header__nav a {
  display: inline-flex;
  align-items: center;
  padding: 8px;
  margin-right: 4px;
  border-radius: 6px;
  color: var(--k-fg);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  text-decoration: none;
}
.k-header__nav a:last-child { margin-right: 0; }
.k-header__nav a:hover { background-color: var(--k-surface); }
.k-header__actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
@media (min-width: 1024px) {
  .k-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; height: 106px; }
  .k-header__nav { display: flex; }
}

/* ---------- Bunnlinje ---------- */
.k-footer { margin-top: 80px; }
.k-footer__inner { display: flex; flex-direction: column; gap: 64px; padding-top: 72px; padding-bottom: 32px; }
.k-footer__inner > .k-divider { margin: 0; }
.k-footer__main { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 32px; }
.k-footer__logo img { height: 41px; width: auto; }
.k-footer__cols { display: flex; flex-direction: column; gap: 32px; }
.k-footer__col { display: flex; flex-direction: column; gap: 16px; }
.k-footer__col h2, .k-footer__col h3 { font-size: 16px; line-height: 22px; font-weight: 700; }
.k-footer__col ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.k-footer__col li, .k-footer__col p { font-size: 14px; line-height: 20px; }
.k-footer__col a { color: inherit; text-decoration: none; }
.k-footer__col a:hover { text-decoration: underline; text-underline-offset: 2px; }
.k-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; font-size: 12px; line-height: 18px; color: var(--k-subtle); }
.k-footer__bottom a { color: inherit; text-decoration: none; }
.k-footer__bottom nav { display: flex; gap: 32px; }
@media (min-width: 768px) {
  .k-footer__main { flex-direction: row; }
  .k-footer__cols { flex-direction: row; gap: 72px; padding-right: 64px; }
}

/* ---------- Arrangementskort ---------- */
.k-event-card { display: flex; flex-direction: column; color: var(--k-fg); text-decoration: none; }
.k-event-card__top { padding: 14px; border-radius: 14px 14px 14px 0; background-color: var(--k-surface); }
.k-event-card__top img { width: 100%; aspect-ratio: 387 / 188; object-fit: cover; border-radius: 6px; }
.k-event-card__bottom { display: flex; align-items: flex-start; }
.k-event-card__bottom::after {
  content: "";
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 100% 100%, transparent 14px, var(--k-surface) 14px);
}
.k-event-card__text {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 236px;
  padding: 10px 20px 20px;
  border-radius: 0 0 14px 14px;
  background-color: var(--k-surface);
}
.k-event-card__title { font-size: 16px; line-height: 22.4px; font-weight: 400; }
.k-event-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.k-event-card__meta span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; line-height: 16px; color: var(--k-muted); }
.k-event-card__meta svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Innholdskort ---------- */
.k-content-card { display: flex; align-items: center; gap: 8px; max-width: 368px; color: var(--k-fg); text-decoration: none; }
.k-content-card img { flex-shrink: 0; width: 120px; height: 120px; object-fit: cover; border-radius: 8px; }
.k-content-card__text { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; }
.k-content-card__title { font-size: 20px; line-height: 28px; font-weight: 400; }
.k-content-card__description { font-size: 14px; line-height: 20px; }
.k-content-card:hover .k-content-card__title { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Plassholder for bilde ----------
   Bruk der bildet mangler, og skriv hva slags bilde som bør stå der. */
.k-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: 16px;
  background-color: color-mix(in srgb, var(--k-fg) 12%, var(--k-bg));
  color: var(--k-fg);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}
.k-hero__media > .k-placeholder { width: 100%; height: 100%; }
.k-event-card__top .k-placeholder { aspect-ratio: 387 / 188; border-radius: 6px; }
.k-content-card .k-placeholder { flex-shrink: 0; width: 120px; height: 120px; padding: 8px; border-radius: 8px; }
