/* Akari starter kit · style
 *
 * Two parts:
 *   1. @layer kit and @layer switches: the mechanics the behaviour depends on (touch targets, the menu
 *      takeover, the carousel, the form, the action bar, iOS, reveal). Keep them. They use only tokens, so
 *      they take any look. kit comes first, so the look can restyle it; switches (the phone breakpoint,
 *      landscape, reduced motion) comes last, so no look can break the behaviour.
 *   2. @layer base, components, pages: the look. Here it is a WIREFRAME, grey and plain on purpose.
 *      Replace it with the direction in RETNING.md: design every token, the type, the header, the buttons,
 *      the cards, the menu, the form and the footer from scratch. Do not adjust the wireframe.
 *      Remove --wireframe from :root when the look is yours (the build warns while it is there).
 *
 * Two kinds of rule stay unlayered, at the very end: [hidden] (RULES.md L12), and the overrides of what
 * Akari Engine injects (the cookie banner, the privacy notice), because injected CSS beats any layer.
 */
@layer kit, base, components, pages, switches;

/* =====================================================================================================
   1 · The kit: mechanics. Keep.
   ===================================================================================================== */
@layer kit {
  *, *::before, *::after { box-sizing: border-box; }

  /* html and body carry the colour of the iPhone bars; main carries the page (I1). */
  html {
    background-color: var(--color-deep);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
  }
  body { margin: 0; background-color: var(--color-deep); -webkit-font-smoothing: antialiased; }
  main { display: block; background-color: var(--color-bg); overflow-x: clip; }
  /* An instant restore after the menu closes (T4), and the scroll lock while it is open. */
  html[data-instant] { scroll-behavior: auto; }
  html[data-locked], html[data-locked] body { overflow: hidden; }

  h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
  p, li, dd, figcaption, blockquote { text-wrap: pretty; }
  /* No automatic hyphenation (L9). */
  * { hyphens: manual; }

  img, svg, video { display: block; max-width: 100%; height: auto; }
  svg.icon { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: -0.2em; }
  button, input, select, textarea { font: inherit; color: inherit; }
  :focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }

  /* Anchor targets clear the header (never scroll-padding on html). */
  [id] { scroll-margin-top: calc(var(--header-h) + 16px); }

  .nw { white-space: nowrap; }
  .visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .skip { position: absolute; left: 12px; top: -100px; z-index: 100; padding: 12px 16px; background: var(--color-surface); color: var(--color-text); }
  .skip:focus { top: 12px; }
  .wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

  /* The contact section on a wide screen: the heading beside the form, so both fit one laptop screen (L13). */
  @media (min-width: 900px) {
    [data-form] > .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
    [data-form] > .wrap > .section__head { margin-bottom: 0; }
  }

  /* Buttons and links: 44–48 px targets (A2). */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; text-decoration: none; cursor: pointer;
  }
  .btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
  .card > a, .link-cta { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
  details > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; }

  /* Header */
  .site-header { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); }
  .site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
  .site-header__logo { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
  .site-nav { display: flex; align-items: center; }
  .site-nav a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; }
  .menu-button { display: none; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; cursor: pointer; }

  /* The menu takeover (T2–T12) */
  .takeover {
    position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none;
    margin: 0; padding: 0; border: 0;
    background: var(--color-deep); color: var(--color-on-deep);
    overscroll-behavior: contain;
  }
  .takeover::backdrop { background: var(--color-deep); }
  .takeover[open] { display: flex; flex-direction: column; }
  .takeover__top {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    min-height: var(--header-h); padding: env(safe-area-inset-top) var(--gutter) 0; flex: none;
  }
  .takeover__close { display: inline-grid; place-items: center; width: 48px; height: 48px; cursor: pointer; }
  .takeover__body { flex: 1; overflow-y: auto; padding: 16px var(--gutter) calc(32px + env(safe-area-inset-bottom)); }
  .takeover__links { list-style: none; margin: 0; padding: 0; }
  .takeover__links a { display: flex; align-items: center; min-height: 56px; text-decoration: none; }
  .takeover__contact a { display: inline-flex; align-items: center; min-height: 44px; }

  /* Carousel (K1–K9): the list, and the bar with the counter */
  .cards { margin: 0; padding: 0; list-style: none; }
  .cards > li { min-width: 0; }
  .carousel-bar { display: none; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
  .carousel-bar__count { font-variant-numeric: tabular-nums; }
  .carousel-bar__buttons { display: flex; gap: 8px; }
  .carousel-bar button { width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
  .carousel-bar button:disabled { cursor: default; }

  /* Form (S1–S15) */
  .form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .form fieldset { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
  .form legend { padding: 0; }
  .field { display: grid; gap: 6px; min-width: 0; }
  .field input, .field select, .field textarea {
    width: 100%; min-height: 48px;
    font-size: max(16px, 1rem); /* 16 px or iOS zooms (S9) */
  }
  .field textarea { min-height: 104px; resize: vertical; }   /* three lines: the whole form fits a laptop screen (L13) */
  .field [aria-invalid="true"] { border-color: var(--color-error); }
  .field__error { margin: 0; color: var(--color-error); }
  .form__summary ul { margin: 8px 0 0; padding-left: 20px; }
  .form__steps { display: flex; justify-content: space-between; gap: 12px; }
  /* The submit button stands in its own block: the published privacy notice goes before it. */
  [data-submit-row] { display: flex; flex-wrap: wrap; gap: 12px; }
  .form[aria-busy="true"] [type="submit"] { opacity: 0.7; cursor: progress; }
  .form__status, .form__answer { scroll-margin: calc(var(--header-h) + 16px) 0 calc(var(--bar-h) + 24px); }
  .form__status:empty { margin: 0; }
  /* The honeypot is off screen, inert and aria-hidden in the markup (S1). */
  .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

  /* Action bar (H1–H6, E2) */
  .actionbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: none; align-items: center; gap: 10px;
    padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom)) 72px; /* 72 px: the cookie button's slot */
    background: var(--color-deep); color: var(--color-on-deep);
    transform: translateY(110%);
    transition: transform var(--dur) var(--ease);
  }
  .actionbar[data-visible="true"] { transform: none; }
  .actionbar .btn { flex: 1; min-height: 48px; padding-inline: 12px; }
  .actionbar__slot { position: absolute; left: 12px; bottom: calc(8px + env(safe-area-inset-bottom)); width: 48px; height: 48px; }

  /* Reveal (E5, A7): visible without JavaScript */
  html[data-js] .reveal:not([data-shown]) { opacity: 0; transform: translateY(16px); }
  .reveal { transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }

  /* Footer targets (A2) */
  .site-footer { padding-bottom: env(safe-area-inset-bottom); }
  .site-footer a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
}

/* The switches: the mechanics that must win over any look, so they sit in the last layer. Keep. */
@layer switches {
  /* Phone (the one breakpoint, T3: keep it equal to script.js) */
  @media (max-width: 899.98px) {
    .site-nav { display: none; }
    .menu-button { display: inline-flex; }
    .actionbar { display: flex; }
    /* Room for the action bar, in the footer's own colour (no light band above it). */
    body:has(.actionbar) .site-footer { padding-bottom: calc(32px + var(--bar-h) + env(safe-area-inset-bottom)); }
    .btn-row { display: grid; grid-template-columns: minmax(0, 1fr); }
    .btn-row .btn { width: 100%; }
    [data-submit-row] .btn { width: 100%; }

    [data-carousel] {
      display: flex; gap: 16px;
      overflow-x: auto; overscroll-behavior-x: contain;
      scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
      margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
      scrollbar-width: none;
    }
    [data-carousel]::-webkit-scrollbar { display: none; }
    [data-carousel] > li { flex: 0 0 82%; scroll-snap-align: start; scroll-margin-inline: var(--gutter); }
    .carousel-bar { display: flex; }
  }

  /* Landscape phone: fixed elements take little room (H5, T10) */
  @media (max-height: 480px) and (orientation: landscape) {
    .site-header { position: static; }
    .actionbar { padding-block: 4px calc(4px + env(safe-area-inset-bottom)); }
    .actionbar .btn { min-height: 44px; }
    .takeover__links a { min-height: 48px; }
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms; animation-iteration-count: 1; transition-duration: 0.01ms; }
    html[data-js] .reveal:not([data-shown]) { opacity: 1; transform: none; }
  }
}

/* =====================================================================================================
   2 · The look: Fargerike Kongsberg, flyttet 1:1 fra WordPress (Enfold-temaet).
   Hvit bakgrunn, svarte overskrifter i Cabin med store bokstaver, grå brødtekst, rosa knapper,
   lysegrå bunntekst med mørkegrå stripe. Rosa er gjort litt mørkere enn før for kontrast (A1).
   ===================================================================================================== */
@layer base {
  :root {
    /* AGENTS.md requires these eight */
    --color-bg: #ffffff;
    --color-surface: #f7f7f7;
    --color-text: #4b4b4b;
    --color-text-muted: #5e5e5e;
    --color-accent: #cc2a70;          /* gammel #db307a: 4,4:1 mot hvit, nå 5,1:1 (A1) */
    --color-accent-muted: #fbe4ee;
    --font-display: 'Cabin', 'Cabin Fallback', sans-serif;
    --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;

    /* Roles the kit uses */
    --color-heading: #000000;
    --color-deep: #4b4b4b;           /* stripen nederst */
    --color-on-deep: #ffffff;
    --color-on-accent: #ffffff;
    --color-dark: #000000;           /* svarte knapper («Se mer», «Ta kontakt») */
    --color-dark-hover: #333333;
    --color-accent-hover: #a8215c;
    --color-footer: #f0f0f0;
    --color-header: #ffffff;
    --color-on-image: #ffffff;
    --color-overlay: rgb(10 0 0 / 0.45);
    --color-hero-bg: #2e2a2b;        /* under bildet: teksten er lesbar også før bildet er lastet */
    --color-line: #e1e1e1;
    --color-line-on-deep: rgb(255 255 255 / 0.2);
    --color-field: #858585;          /* field borders: 3:1 against the surface (A1) */
    --color-field-bg: #ffffff;
    --color-form-box: #ececec;
    --color-error: #a3261c;
    --color-focus: #000000;
    --fallback-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;

    --space-section: clamp(48px, min(7vw, 9vh), 96px);
    --space-head: clamp(24px, min(3vw, 4vh), 40px);
    --gap: clamp(20px, 2.5vw, 32px);
    --gutter: clamp(16px, 5vw, 48px);
    --measure: 70ch;
    --wrap: 1130px;
    --wrap-mid: 1000px;
    --wrap-text: 760px;
    --radius: 3px;
    --radius-pill: 999px;
    --header-h: 88px;
    --bar-h: 64px;

    --step--1: 0.875rem;
    --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
    --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
    --step-2: clamp(1.45rem, 1.25rem + 0.9vw, 1.9rem);
    --step-3: clamp(1.6rem, min(1.3rem + 1.4vw, 5vh), 2.25rem);
    --step-4: clamp(3rem, min(1.6rem + 3.6vw, 8vh), 4.06rem);

    --dur: 0.3s;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

    color-scheme: light;
  }

  /* Cabin målt mot Arial (verktoy/fontmetrics.mjs), så byttet ikke flytter siden (Y7) */
  @font-face {
    font-family: 'Cabin Fallback';
    src: local('Arial');
    size-adjust: 94.9%;
    ascent-override: 102.3%;
    descent-override: 26.4%;
    line-gap-override: 0%;
  }

  html, body { background-color: var(--color-bg); }
  body { color: var(--color-text); font-family: var(--font-body); font-size: var(--step-0); line-height: 1.7; }
  h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.2; color: var(--color-heading); text-wrap: balance; }
  h1 { font-size: var(--step-4); }
  h2 { font-size: var(--step-2); }
  h3 { font-size: var(--step-1); }
  p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }
  :is(h1, h2, h3) + :is(p, ul, ol) { margin-top: 0.6em; }
  p:last-child { margin-bottom: 0; }
  a { color: inherit; text-underline-offset: 0.18em; }
  a:hover { color: var(--color-accent); }
  strong { color: var(--color-heading); }

  .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .center { text-align: center; }
  .center p { margin-inline: auto; }
  .wrap--narrow { width: min(100% - 2 * var(--gutter), 860px); }
  .wrap--mid { width: min(100% - 2 * var(--gutter), var(--wrap-mid)); }
  .wrap--text { width: min(100% - 2 * var(--gutter), var(--wrap-text)); }

  .section { padding-block: var(--space-section); }
  .section--tight { padding-bottom: 0; }
  .section__title { margin: 0 0 var(--space-head); font-size: var(--step-2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.01em; }
  .section--posts .section__title, .section--latest .section__title { text-align: center; font-size: var(--step-1); }
  .section--latest .section__title { text-align: left; }
  .eyebrow { margin: 0 0 8px; font-size: var(--step--1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); text-align: center; }
  .lead { font-size: var(--step-1); line-height: 1.5; }
}

@layer components {
  /* Knapper: avrundede som på den gamle siden */
  .btn { padding: 12px 26px; border: 0; border-radius: var(--radius-pill); font-family: var(--font-body); font-size: 0.95rem; font-weight: 600; line-height: 1.2; text-decoration: none; transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
  .btn:hover { transform: translateY(-1px); }
  .btn--primary { background: var(--color-accent); color: var(--color-on-accent); }
  .btn--primary:hover { background: var(--color-accent-hover); color: var(--color-on-accent); }
  .btn--dark { background: var(--color-dark); color: var(--color-on-accent); }
  .btn--dark:hover { background: var(--color-dark-hover); color: var(--color-on-accent); }
  .btn--ghost { border: 1.5px solid currentColor; background: transparent; color: var(--color-heading); }
  .btn--ghost:hover { background: var(--color-accent-muted); color: var(--color-heading); }

  /* Toppen: hvit, logoen til venstre */
  .site-header { background: var(--color-header); color: var(--color-heading); border-bottom: 1px solid var(--color-line); }
  .site-header__logo img { height: 68px; width: auto; }
  .site-nav { gap: 4px; }
  .site-nav a:not(.btn) { padding: 0 14px; font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; }
  .site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { color: var(--color-accent); }
  .menu-button { padding: 0 8px; background: transparent; border: 0; color: var(--color-heading); font-weight: 600; }
  .menu-button .icon { width: 32px; height: 32px; }
  .menu-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

  .takeover { background: var(--color-bg); color: var(--color-heading); }
  .takeover__top h2 { font-size: var(--step-1); color: inherit; }
  .takeover__close { background: transparent; color: inherit; border: 0; }
  .takeover__links { margin-bottom: 32px; }
  .takeover__links a { font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--color-line); }
  .takeover__links a:hover { color: var(--color-accent); }
  .takeover__contact { margin-top: 32px; display: grid; gap: 4px; }
  .takeover__contact a { font-weight: 600; }
  .takeover__contact p { margin: 0; }

  /* Kortene i oversiktene: lysegrå flate, bilde øverst */
  .cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 3vw, 40px) var(--gap); margin: 0; padding: 0; list-style: none; }
  .card { display: flex; flex-direction: column; min-width: 0; }
  .card__img { display: block; overflow: hidden; }
  .card__img img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; transition: transform var(--dur) var(--ease); }
  .card__img:hover img { transform: scale(1.03); }
  .card__body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 12px 24px 16px; background: var(--color-surface); }
  .card__title { margin: 0; font-size: var(--step-1); font-weight: 500; line-height: 1.25; }
  .card__title a { display: block; padding-block: 10px; text-decoration: none; }
  .card__cats { margin: 0; font-size: 0.875rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-text-muted); }
  .card__cats a { display: inline-block; padding-block: 2px; text-decoration: none; }
  .card__cats a:hover { text-decoration: underline; }
  .card__excerpt { margin: 4px 0 0; font-size: 0.95rem; line-height: 1.6; }
  .card__more { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin-top: auto; font-size: 0.95rem; font-weight: 600; color: var(--color-heading); text-decoration: none; }
  .card__more .icon { width: 16px; height: 16px; }
  .card__more:hover { color: var(--color-accent); }
  .card__date { margin: 12px 0 0; font-size: 0.875rem; color: var(--color-text-muted); }
  @media (min-width: 700px) {
    .cards--2, .cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (min-width: 1000px) {
    .cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }

  /* Skjemaet: grå boks som før */
  .form { max-width: none; }
  .field label { font-weight: 600; font-size: 0.95rem; }
  .field__hint { margin: 0; font-size: var(--step--1); color: var(--color-text-muted); }
  .field input, .field select, .field textarea { padding: 12px 14px; background: var(--color-field-bg); border: 1.5px solid var(--color-field); border-radius: var(--radius); font: inherit; color: var(--color-heading); }
  .field__error { font-weight: 600; font-size: 0.95rem; }
  .form__summary { padding: 16px 20px; border: 2px solid var(--color-error); background: var(--color-field-bg); }
  .form__status { margin: 16px 0 0; font-weight: 600; }
  .form__answer { margin-top: 24px; padding: 28px; background: var(--color-field-bg); border: 1px solid var(--color-line); }
  .form__answer h3 { margin-bottom: 8px; }
  [data-submit-row] .btn { border-radius: var(--radius); background: var(--color-dark); }
  [data-submit-row] .btn:hover { background: var(--color-dark-hover); }

  .slot { display: grid; align-content: center; gap: 6px; min-height: 120px; padding: 20px 24px; border: 1.5px dashed var(--color-field); background: var(--color-surface); color: var(--color-text-muted); }
  .slot--image { min-height: 0; place-content: center; justify-items: center; text-align: center; padding: 12px; }
  .slot--mark { display: inline-grid; place-items: center; flex: none; width: 56px; height: 48px; min-height: 0; padding: 0; }
  .slot__type { font-size: var(--step--1); font-weight: 600; color: var(--color-text); }
  .slot__text { font-size: 0.95rem; line-height: 1.5; max-width: 44ch; }
  .slot__rec { font-size: 0.875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); }

  /* Bunnteksten: lysegrå med logo, åpningstider og kontakt, så en mørkegrå stripe */
  .site-footer { background: var(--color-footer); color: var(--color-text); padding: clamp(40px, 6vw, 64px) 0 0; }
  .site-footer p { margin: 0 0 6px; }
  .site-footer a { text-decoration: none; }
  .site-footer a:hover { text-decoration: underline; color: var(--color-heading); }
  .site-footer__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-bottom: clamp(40px, 6vw, 64px); }
  .site-footer__brand img { width: 240px; max-width: 100%; height: auto; }
  .site-footer__title { margin: 0 0 12px; font-size: 1rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
  .site-footer__grid a { display: inline-block; padding-block: 6px; }
  .site-footer__legal { background: var(--color-deep); color: var(--color-on-deep); font-size: var(--step--1); padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); }
  .site-footer__legal-row { display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: center; }
  .site-footer__legal p { margin: 0; }
  .site-footer__legal a { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-on-deep); text-decoration: underline; }
  .site-footer__legal a:hover { color: var(--color-on-deep); text-decoration: none; }
  @media (min-width: 900px) {
    .site-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
}

@layer pages {
  /* Heltedelen: bilde over hele bredden med mørk tone, hvit tekst i store bokstaver */
  .hero { position: relative; display: grid; align-items: center; min-height: calc(100svh - var(--header-h)); color: var(--color-on-image); overflow-x: clip; background-color: var(--color-hero-bg); }
  .hero--page { min-height: clamp(380px, 70svh, 640px); }
  .hero__media, .hero__media picture { position: absolute; inset: 0; }
  .hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 45%; }
  .hero__media::after { content: ""; position: absolute; inset: 0; background: var(--color-overlay); }
  .hero__content { position: relative; z-index: 1; padding-block: clamp(48px, 10vh, 120px); }
  .hero__title { margin: 0; max-width: 14ch; color: var(--color-on-image); font-size: var(--step-4); font-weight: 500; line-height: 1.05; text-transform: uppercase; }
  .hero__lead { margin: clamp(20px, 4vh, 40px) 0 clamp(20px, 3vh, 32px); max-width: 52ch; font-size: var(--step-0); color: var(--color-on-image); }
  .hero__lead strong { color: var(--color-on-image); }
  .hero--page .hero__lead { font-size: var(--step-0); line-height: 1.6; }

  .section--intro .section__title { font-size: var(--step-1); }
  .section--intro p { font-size: var(--step-0); }
  .section--latest .center, .section--posts .center { margin-top: clamp(32px, 4vw, 48px); }

  /* Tjenestene: tekst og bilde side om side, annenhver */
  .split { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--color-bg); }
  .split__text { align-self: center; padding: clamp(32px, 6vw, 80px) var(--gutter); }
  .split__text h2 { font-size: var(--step-2); }
  .split__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .duo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-bottom: 32px; }
  .duo__title { font-size: var(--step-2); text-transform: uppercase; }
  @media (min-width: 900px) {
    .split { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: min(560px, 70svh); }
    .split--reverse .split__text { order: 2; }
    .split__text { padding-inline: clamp(32px, 5vw, 80px); }
    .duo { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 80px); }
  }

  /* Kontakt: bilde, ingress, så skjema i grå boks og kontaktinformasjon */
  .banner img { display: block; width: 100%; height: auto; }
  .page-title { font-size: var(--step-3); font-weight: 600; text-transform: uppercase; }
  .intro-text p { font-size: var(--step-0); }
  .contact-info__title { font-size: var(--step-2); font-weight: 600; text-transform: uppercase; }
  .contact-info__sub { margin: 24px 0 8px; font-size: 1rem; font-weight: 700; }
  .contact-info a { display: inline-block; padding-block: 6px; color: var(--color-heading); }
  .form-box { padding: clamp(20px, min(3vw, 3vh), 32px); background: var(--color-form-box); }
  .form-box .form { gap: 10px; }
  .form-box .field { gap: 4px; }
  .form-box .field input { padding-block: 9px; }
  .form-box .field textarea { min-height: 72px; }
  .form-box__title { margin: 0 0 12px; font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); text-align: center; scroll-margin-top: calc(var(--header-h) + 16px); }
  @media (min-width: 900px) {
    .section--contact > .wrap { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
    .section--contact .form-box { order: -1; }
  }

  /* Innleggene: tittel i store bokstaver, bildet under, tekst i én spalte */
  .post { padding-block: clamp(32px, 5vw, 64px) var(--space-section); }
  .post__title { margin: 0 0 12px; font-size: var(--step-3); font-weight: 600; line-height: 1.2; text-transform: uppercase; }
  .post__meta { margin: 0 0 20px; font-size: 0.875rem; color: var(--color-text-muted); }
  .post__meta a { display: inline-block; padding-block: 4px; }
  .post__banner { margin: 0 0 28px; }
  .post__banner img, .post__fig img, .gallery img { display: block; width: 100%; height: auto; }
  .post__body > * + h2, .post__body > * + h3 { margin-top: 1.6em; }
  .post__body h2 { font-size: var(--step-2); }
  .post__body h3 { font-size: var(--step-1); }
  .post__body ul, .post__body ol { padding-left: 1.3em; margin: 0 0 1em; }
  .post__body li { margin-bottom: 0.4em; }
  .post__body a { color: var(--color-accent); }
  .post__body a:hover { color: var(--color-accent-hover); }
  .post__body hr { margin: 2em 0; border: 0; border-top: 1px solid var(--color-line); }
  .post__body blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--color-accent); font-family: var(--font-display); font-size: var(--step-1); line-height: 1.45; color: var(--color-heading); }
  .post__fig { margin: 1.6em 0; }
  .post__fig figcaption, .gallery figcaption { margin-top: 8px; font-size: 0.875rem; color: var(--color-text-muted); }
  .gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 1.6em 0; }
  .gallery figure { margin: 0; min-width: 0; }
  .gallery img { aspect-ratio: 1 / 1; object-fit: cover; }
  .gallery:has(> figure:only-child) { grid-template-columns: minmax(0, 1fr); }
  .gallery:has(> figure:only-child) img { aspect-ratio: auto; }
  @media (min-width: 700px) {
    .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
  .les-ogsa { font-weight: 600; }
  .kat-lenke { margin: calc(-1 * var(--space-head) + 8px) auto var(--space-head); }
  .kat-lenke a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--color-heading); }
  .video-link a { position: relative; display: block; text-decoration: none; }
  .video-link__label { position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius-pill); background: var(--color-dark); color: var(--color-on-accent); font-weight: 600; }
  .video-link a:hover .video-link__label { background: var(--color-accent); }
  .post__cta { display: grid; gap: 16px; justify-items: start; margin-top: 2em; padding: clamp(20px, 4vw, 32px); background: var(--color-surface); }
  .post__cta-text { margin: 0; font-family: var(--font-display); font-size: var(--step-1); line-height: 1.35; color: var(--color-heading); }
  .post__body .post__cta .btn { color: var(--color-on-accent); }
}

/* ---------- Unlayered: what Akari Engine injects (E1, E2) ---------- */
body #cc-main {
  --cc-btn-primary-bg: var(--color-accent);
  --cc-btn-primary-color: var(--color-on-accent);
  --cc-btn-primary-hover-bg: var(--color-accent-hover);
  --cc-btn-primary-hover-color: var(--color-on-accent);
  --cc-toggle-on-bg: var(--color-accent);
  --cc-toggle-on-knob-bg: var(--color-surface);
}
body .floating-cookie-btn {
  position: fixed; left: 12px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 31;
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: var(--color-accent); color: var(--color-on-accent);
}
body .ae-privacy-notice { margin: 0; font-size: 14px; line-height: 1.5; color: var(--color-text-muted); }

/* ---------- Unlayered, and last: [hidden] always hides (L12) ---------- */
[hidden]:not([hidden="until-found"]) { display: none; }
