/* 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: K-tech, flyttet 1:1 fra WordPress/Elementor (k-tech.no, november 2026).
   Verdiene er målt på den gamle siden (Elementor-bruddpunkter: mobil til 767 px, nettbrett til 1024 px).
   ===================================================================================================== */
@layer base {
  :root {
    /* AGENTS.md requires these eight */
    --color-bg: #fafafa;
    --color-surface: #f2f2f2;
    --color-text: #10103a;
    --color-text-muted: #333333;
    --color-accent: #ec2d48;
    --color-accent-muted: #3e4bbd;
    --font-display: 'Poppins', var(--fallback-sans);
    --font-body: 'DM Sans', var(--fallback-sans);

    /* K-tech's own roles */
    --color-accent-text: #d42039;     /* rød tekst: #ec2d48 er mørknet så lite som mulig for AA (4,6:1) */
    --color-blue: #3e4bbd;
    --color-text-soft: rgb(16 16 58 / 0.53);
    --color-text-label: rgb(16 16 58 / 0.72);
    --color-field-line: #8a8a8a;
    --color-cal: #f4f4f4;
    --color-cal-hover: #eeeeee;
    --color-cal-line: #dedede;
    --color-white: #ffffff;
    --color-overlay: rgb(16 16 58 / 0.6);
    --color-shadow: rgb(0 0 0 / 0.08);
    --color-shadow-ring: rgb(0 0 0 / 0.1);
    --color-shadow-strong: rgb(0 0 0 / 0.16);
    --color-scrim: rgb(0 0 0 / 0.55);
    --color-line-soft: #dddddd;

    /* Roles the kit uses */
    --color-deep: #10103a;
    --color-on-deep: #fafafa;
    --color-on-accent: #ffffff;
    --color-line: #dddddd;
    --color-line-on-deep: rgb(250 250 250 / 0.2);
    --color-field: #858585;
    --color-error: #b3261e;
    --color-focus: #3e4bbd;
    --fallback-sans: 'Akari Fallback', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

    --gap: 20px;
    --gutter: 20px;
    --wrap: 1140px;
    --measure: 80ch;
    --radius: 4px;
    --header-h: 100px;
    --bar-h: 64px;
    --dur: 0.25s;
    --ease: ease;
    color-scheme: light;
  }
  @media (min-width: 768px) { :root { --gutter: 40px; --header-h: 120px; } }

  @font-face {
    font-family: 'Akari Fallback';
    src: local('Arial');
    size-adjust: 105%;
    ascent-override: 100%;
    descent-override: 30%;
    line-gap-override: 0%;
  }

  html, body { background-color: var(--color-bg); }
  body { color: var(--color-text); font-family: var(--font-body); font-size: 16px; font-weight: 400; line-height: 1.5; }
  main { background-color: var(--color-bg); }
  h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 300; line-height: 1.2; color: var(--color-text); margin: 0; }
  /* 1:1: line breaks as on the old site (Elementor neither balances nor «pretty»-wraps) */
  h1, h2, h3, h4, p, li, dd, figcaption, blockquote { text-wrap: wrap; }
  p { margin: 0 0 0.9rem; }
  p:last-child { margin-bottom: 0; }
  a { color: inherit; text-decoration: none; }
  ul, ol { margin: 0 0 0.9rem; padding-left: 1.5em; }
  strong, b { font-weight: 700; }
  img { height: auto; }
  picture { display: block; }
}

@layer components {
  /* ---------- Icons (K-tech's own icon font, drawn as inline SVG) ---------- */
  .ki { width: 1em; height: 1em; flex: none; display: inline-block; fill: currentColor; vertical-align: -0.125em; }

  /* ---------- Layout ---------- */
  .sec { padding-block: 80px; }
  .sec--top { padding-block: 100px 80px; }
  .sec--intro { padding-block: 120px 100px; }
  .sec--pics { padding-block: 100px 80px; }
  .sec--pics50 { padding-block: 50px; }
  .sec--contact { padding-block: 40px; }
  .sec--cta { padding-block: 70px 100px; }
  .sec--more { padding-block: 50px 200px; }
  .sec--owners { padding-bottom: 200px; }
  .sec--newslist { padding-bottom: 160px; }
  .sec--gallery { padding-block: 40px 150px; }
  .top-pic--news img { height: 650px; }
  .sec--faq { padding-block: 100px; }
  .sec--courses { padding-bottom: 120px; }
  .txt-c--news { max-width: 684px; }
  .sec--tight { padding-block: 40px; }
  .sec--flush-top { padding-top: 0; }
  .sec--flush-bottom { padding-bottom: 0; }
  .narrow { max-width: 912px; margin-inline: auto; }
  .center { text-align: center; }
  .h-sec { font-family: var(--font-display); font-size: 30px; font-weight: 300; line-height: 1; text-align: center; margin: 0 0 40px; }
  .h-intro { font-family: var(--font-display); font-size: 30px; font-weight: 300; line-height: 40px; text-align: center; max-width: 912px; margin: 0 auto 60px; }
  .h-intro strong { font-weight: 500; }
  .txt { font-size: 18px; line-height: 1.5; }
  .txt-c { font-size: 18px; line-height: 1.5; text-align: center; max-width: 912px; margin: 0 auto 40px; }
  .txt-c:last-child { margin-bottom: 0; }
  .sec-icon { display: flex; justify-content: center; margin-bottom: 20px; color: var(--color-text); font-size: 60px; }
  .sec-icon--red { color: var(--color-accent); }
  .sec-icon--blue { color: var(--color-blue); }
  .sec-icon--sm { font-size: 50px; }

  /* ---------- Buttons ---------- */
  .btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
  .kbtn {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    min-height: 44px; padding: 12px 24px;
    font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1;
    color: var(--color-text); background: transparent;
    border: 1px solid var(--color-blue); border-radius: var(--radius);
    cursor: pointer; text-decoration: none;
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  }
  .kbtn .ki { font-size: 16px; transition: transform var(--dur) var(--ease); }
  a.kbtn:hover .ki { transform: translateX(4px); }
  .kbtn--red { border-color: var(--color-accent); }
  a.kbtn--red:hover, a.kbtn--blue:hover, a.kbtn:not([class*="--"]):hover { background-color: var(--color-surface); }
  .kbtn--light { background: var(--color-bg); border-color: var(--color-bg); font-weight: 500; }
  a.kbtn--light:hover { background: var(--color-surface); }
  .kbtn--ghost-light { color: var(--color-bg); border-color: var(--color-bg); font-weight: 500; }
  a.kbtn--ghost-light:hover { background: var(--color-bg); color: var(--color-text); }
  .kbtn--soon { cursor: default; }
  .kbtn--soon .ki { font-size: 14px; }
  .kbtn--grey { background: var(--color-surface); border-color: var(--color-surface); }
  a.kbtn--grey:hover { background: var(--color-line); }
  .kbtn--line { border: 0; border-bottom: 1px solid var(--color-accent); border-radius: 0; }
  a.kbtn--line:hover { background: var(--color-surface); }

  /* ---------- Header ---------- */
  .site-header { position: relative; background: var(--color-bg); color: var(--color-text); }
  .site-header__bar { width: min(100% - 20px, 1088px); min-height: var(--header-h); gap: 10px; }
  .site-header__logo img { width: 160px; height: auto; }
  .site-nav { gap: 10px; }
  .site-nav a:not(.btn), .menu-button {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px;
    font-family: var(--font-display); font-size: 15px; font-weight: 500; line-height: 1;
    color: var(--color-text); background: transparent; border: 0; border-radius: 10px; cursor: pointer;
    transition: color var(--dur) var(--ease);
  }
  .site-nav a:not(.btn):hover, .menu-button:hover, .menu-button:focus-visible { color: var(--color-text-soft); }
  .menu-button:hover { transform: scale(1.05); }
  .menu-button { transition: color var(--dur) var(--ease), transform var(--dur) var(--ease); }
  .ki--meny { width: 1.1em; height: 1em; }
  .menu-button { display: inline-flex; }
  .menu-button .ki { font-size: 15px; }
  .site-header__right { display: flex; align-items: center; gap: 10px; }
  @media (max-width: 767px) {
    .site-header__logo img { width: 140px; }
    .site-nav a:not(.btn), .menu-button { font-size: 16px; }
  }

  /* ---------- The menu (Elementor popup 9553: a panel under the header) ---------- */
  .takeover { background: var(--color-bg); color: var(--color-text); }
  .takeover::backdrop { background: transparent; }
  .takeover__top { width: min(100% - 20px, 1088px); margin-inline: auto; padding: 0; min-height: var(--header-h); }
  .takeover__top .menu-button { color: var(--color-text-soft); }
  .takeover__body { padding: 20px var(--gutter) 30px; }
  .menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 1140px); margin-inline: auto; }
  .menu-col { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 10px 30px 10px; text-align: center; }
  .menu-col + .menu-col { border-left: 1px solid var(--color-line); }
  .menu-col--grey { background: var(--color-surface); border-left: 0; padding-block: 25px; }
  .menu-col--grey + .menu-col, .menu-col + .menu-col--grey { border-left: 0; }
  .menu-col h2 { font-family: var(--font-display); font-size: 25px; font-weight: 300; margin: 10px 0 22px; }
  .menu-col h2 a { color: inherit; }
  .menu-col a.menu-link {
    display: inline-flex; align-items: center; justify-content: center; min-height: 41px; padding: 0 10px;
    font-family: var(--font-display); font-size: 16px; font-weight: 400; color: var(--color-text);
    transition: color var(--dur) var(--ease);
  }
  .menu-col a.menu-link:hover { color: var(--color-blue); }
  .menu-col a.menu-link--strong { font-weight: 600; }
  .menu-col .menu-cta {
    display: inline-flex; align-items: center; gap: 12px; margin-top: 12px; min-height: 38px; padding: 6px 10px;
    font-family: var(--font-display); font-size: 16px; color: var(--color-text);
    border: 1px solid var(--color-accent); border-radius: 0;
  }
  .menu-cta svg { width: 18px; height: 18px; fill: currentColor; }
  .menu-social { display: flex; gap: 10px; margin-top: 14px; }
  .menu-social a { display: grid; place-items: center; width: 44px; height: 44px; }
  .menu-social span { display: grid; place-items: center; width: 30px; height: 30px; background: var(--color-text); color: var(--color-bg); border-radius: 2px; transition: background-color var(--dur) var(--ease); }
  .menu-social a:hover span { background: var(--color-blue); }
  .menu-social svg { width: 15px; height: 15px; fill: currentColor; }
  @media (min-width: 900px) {
    .takeover { inset: 0 0 auto 0; height: auto; max-height: 100dvh; box-shadow: 0 10px 20px var(--color-shadow); }
    .takeover__body { flex: none; overflow: visible; padding-top: 20px; }
  }
  @media (max-width: 899.98px) {
    .menu-grid { grid-template-columns: minmax(0, 1fr); }
    .menu-col { padding: 10px 0 20px; }
    .menu-col + .menu-col { border-left: 0; border-top: 1px solid var(--color-line); }
    .menu-col--grey { border-top: 0; margin-top: 10px; }
    .takeover__top .menu-button { padding-right: 8px; }
  }

  /* ---------- Footer ---------- */
  .site-footer { background: var(--color-deep); color: var(--color-on-deep); padding: 0; }
  .site-footer a { min-height: 0; min-width: 0; display: inline; }
  .foot { padding: 50px 40px 80px; display: grid; gap: 40px; }
  .foot__brand { display: grid; justify-items: center; gap: 10px; text-align: center; }
  .foot__brand img { width: auto; height: 75px; }
  .foot__brand .foot__org { font-family: var(--font-body); font-size: 14px; font-weight: 300; margin-top: -6px; }
  .foot__brand p { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin: 0; }
  .foot__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot__col { display: flex; flex-direction: column; align-items: center; gap: 15px; padding: 10px; text-align: center; font-weight: 300; }
  .foot__col p { margin: 0; }
  .foot__col a:hover { text-decoration: underline; }
  .foot__social { display: flex; gap: 10px; justify-content: center; }
  .site-footer .foot__social a { display: grid; place-items: center; width: 40px; height: 44px; font-size: 40px; line-height: 1; color: var(--color-on-deep); text-decoration: none; }
  .foot__social a:hover { color: var(--color-accent); }
  .site-footer .foot__news {
    display: inline-flex; align-items: center; gap: 15px; min-height: 45px; padding: 12px 24px;
    font-family: var(--font-display); font-size: 16px; font-weight: 300; color: var(--color-white);
    border-bottom: 1px solid var(--color-accent); text-decoration: none;
  }
  .foot__news .ki { font-size: 16px; transition: transform var(--dur) var(--ease); }
  .foot__news:hover .ki { transform: translateX(4px); }
  .foot__contact { font-weight: 600; line-height: 1.5; }
  .foot__contact a { display: block; }
  .foot__legal {
    background: var(--color-bg); color: var(--color-text);
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    width: min(100% - 2 * var(--gutter), 1140px); margin-inline: auto; padding-block: 15px;
    font-size: 14px; line-height: 1.5;
  }
  .foot__legal-band { background: var(--color-bg); }
  .foot__legal p { margin: 0; padding: 7px 0; font-weight: 300; font-style: italic; }
  .foot__legal p + p { border-left: 1px solid var(--color-text); padding-left: 10px; }
  .foot__legal p:first-child { font-weight: 500; font-style: normal; padding-right: 10px; }
  .site-footer .foot__legal a { color: var(--color-accent-text); display: inline-flex; align-items: center; min-height: 0; }
  .foot__legal a:hover { text-decoration: underline; }
  @media (max-width: 767px) {
    .foot { padding: 40px 20px 80px; }
    .foot__cols { grid-template-columns: minmax(0, 1fr); gap: 25px; }
    .foot__col { font-size: 14px; }
    .foot__legal { flex-direction: column; gap: 0; padding-block: 15px; }
    .foot__legal p, .foot__legal p + p, .foot__legal p:first-child { border: 0; padding: 4px 0; text-align: center; }
  }

  /* ---------- Hero: two halves (front page) ---------- */
  .split-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding-inline: 40px; }
  .split-hero__half { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 35px; min-height: 585px; padding: 60px 0; background: var(--color-deep); color: var(--color-on-deep); overflow: hidden; isolation: isolate; }
  .split-hero__half picture, .split-hero__half img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
  .split-hero__half--a img { opacity: 0.35; }
  .split-hero__half--b img { opacity: 0.63; }
  .split-hero h1, .split-hero h2 { color: var(--color-on-deep); font-size: 35px; line-height: 40px; font-weight: 300; text-align: center; padding: 0 20px 30px; }
  .split-hero strong { font-weight: 700; }
  .split-hero .btns { padding-inline: 40px; }
  @media (max-width: 767px) {
    .split-hero { grid-template-columns: minmax(0, 1fr); padding-inline: 0; }
    .split-hero__half { min-height: 350px; padding: 60px 20px 45px; gap: 20px; }
    .split-hero h1, .split-hero h2 { font-size: 30px; }
    .split-hero .btns { padding-inline: 0; flex-direction: column; align-items: center; }
  }

  /* ---------- Big picture under the header (kurs, lærefag, nyheter) ---------- */
  .top-pic { padding-inline: 40px; }
  .top-pic picture, .top-pic img { width: 100%; }
  .top-pic img { height: 500px; object-fit: cover; }
  .top-pic video { width: 100%; height: 583px; object-fit: cover; display: block; }
  .top-pic--tall img { height: 600px; }
  @media (max-width: 767px) {
    .top-pic { padding-inline: 0; }
    .top-pic img { height: 300px; }
  }

  /* ---------- Logos (eierbedriftene) ---------- */
  .logos { display: flex; justify-content: center; align-items: center; gap: 20px 40px; padding-top: 20px; }
  .logos img { width: auto; }
  .logos .l-kongsberg { height: 70px; }
  .logos .l-technip { height: 28px; }
  .logos .l-gkn { height: 34px; }
  @media (max-width: 767px) {
    .logos { flex-direction: column; gap: 50px; }
    .logos .l-kongsberg { height: 100px; }
    .logos .l-technip { height: 37px; }
    .logos .l-gkn { height: 45px; }
  }

  /* ---------- Three pictures in a row ---------- */
  .pics3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
  .pics3 img { width: 100%; height: 450px; object-fit: cover; }
  .pics3--short img { height: 400px; }
  @media (max-width: 767px) {
    .pics3 { grid-template-columns: minmax(0, 1fr); gap: 15px; }
    .pics3 img, .pics3--short img { height: 350px; }
  }

  /* ---------- News cards ---------- */
  .news-row { display: flex; align-items: center; gap: 20px; }
  .news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 10px; flex: 1; }
  .news-card { display: flex; flex-direction: column; height: 100%; background: var(--color-surface); transition: transform var(--dur) var(--ease); }
  .news-card:hover { transform: scale(1.02); }
  .news-card__pic { height: 220px; overflow: hidden; }
  .news-card__pic picture { height: 100%; }
  .news-card__pic img { width: 100%; height: 100%; object-fit: cover; }
  .news-card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 0 40px 20px; flex: 1; }
  .news-card__cat { font-size: 14px; font-weight: 300; }
  .news-card__row { display: flex; align-items: center; justify-content: space-between; }
  .news-card :is(h2, h3) { font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1; }
  .news-card .ki { font-size: 20px; color: var(--color-accent); margin: 0 20px; transition: transform var(--dur) var(--ease); }
  .news-card:hover .ki { transform: translateX(4px); }
  .see-more { display: flex; flex-direction: column; align-items: center; gap: 15px; padding: 10px; width: 112px; flex: none; font-family: var(--font-display); font-size: 16px; font-weight: 600; text-align: center; }
  .see-more span:first-child { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--color-surface); font-size: 25px; transition: background-color var(--dur) var(--ease); }
  .see-more:hover span:first-child { background: var(--color-line); }
  @media (max-width: 1024px) { .news-card__body { padding-right: 20px; } }
  @media (max-width: 767px) {
    .news-row { flex-direction: column; }
    .news-grid { grid-template-columns: minmax(0, 1fr); padding: 10px; }
    .news-card__body { padding: 20px 20px 30px; align-items: center; text-align: center; }
    .news-card__row { flex-direction: column; gap: 10px; }
    .news-card .ki { margin: 10px 0 0; font-size: 23px; }
    .see-more { width: 100%; padding-top: 40px; }
  }

  /* ---------- Filter tabs (aktuelt, kurs) ---------- */
  .filter { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; background: var(--color-surface); padding: 10px; border-radius: 5px; margin-bottom: 40px; }
  .filter a, .filter button {
    display: inline-flex; align-items: center; min-height: 25px; padding: 0;
    font-family: var(--font-display); font-size: 16px; font-weight: 300; color: var(--color-text);
    background: none; border: 0; cursor: pointer; transition: color var(--dur) var(--ease);
  }
  .filter a:hover, .filter button:hover { color: var(--color-blue); }
  .filter [aria-pressed="true"], .filter [aria-current="true"] { color: var(--color-accent-text); }

  /* ---------- FAQ: heading beside the accordion ---------- */
  .faq { display: grid; grid-template-columns: minmax(0, 525fr) minmax(0, 535fr); gap: 40px; align-items: center; }
  .faq__head { text-align: center; }
  .faq__head h2, .faq__head h3 { font-size: 30px; line-height: 1; margin-bottom: 20px; }
  .faq__head .txt { font-size: 18px; }
  .faq__head a { color: inherit; }
  .faq__head a:hover { color: var(--color-blue); }
  .acc { display: grid; gap: 0; padding: 10px; }
  .acc details { border-bottom: 1px solid var(--acc-line, var(--color-accent)); }
  .acc--blue { --acc-line: var(--color-blue); }
  .acc details[open], .acc details:hover { border-bottom-color: var(--color-text); }
  .acc summary { display: flex; justify-content: space-between; align-items: center; gap: 15px; min-height: 44px; padding: 10px; list-style: none; font-family: var(--font-body); font-size: 18px; font-weight: 300; line-height: 1.4; cursor: pointer; }
  .acc summary::-webkit-details-marker { display: none; }
  .acc summary .ki { font-size: 14px; color: var(--color-text); flex: none; }
  .acc summary .ki--minus { display: none; }
  .acc details[open] summary .ki--plus { display: none; }
  .acc details[open] summary .ki--minus { display: inline-block; }
  .acc summary:hover { color: var(--color-blue); }
  .acc__body { padding: 20px 10px 30px; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
  .faq--line { border-top: 1px solid var(--color-blue); }
  @media (max-width: 767px) {
    .faq { grid-template-columns: minmax(0, 1fr); }
  }

  /* ---------- Breadcrumbs ---------- */
  .crumbs { font-family: var(--font-display); font-size: 14px; font-weight: 300; color: var(--color-text-muted); text-align: center; margin: 0; overflow-wrap: anywhere; }
  @media (max-width: 360px) { .trade-intro h1, .course__intro h1, .article h1 { font-size: 25px; } }
  .crumbs a { color: inherit; }
  .crumbs a:hover { color: var(--color-blue); }

  /* ---------- Forms ---------- */
  .kform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; max-width: none; }
  .kform .field textarea:not(.as-input) { min-height: 80px; height: 80px; }
  .kform .field { gap: 8px; }
  .kform .field--full { grid-column: 1 / -1; }
  .kform label, .kform .label { font-family: var(--font-body); font-size: 16px; font-weight: 300; line-height: 1; color: var(--color-text); }
  .kform .req { color: var(--color-accent); margin-left: 4px; }
  .field input, .field select, .field textarea {
    min-height: 40px; padding: 5px 14px; font-size: 16px; font-family: var(--font-body); font-weight: 300;
    color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-field-line); border-radius: 3px;
  }
  .field textarea.as-input { min-height: 40px; height: 40px; resize: none; overflow: hidden; line-height: 28px; }
  .field ::placeholder { color: var(--color-text-muted); opacity: 0.75; }
  .field select { appearance: none; padding-right: 36px; background-image: none; }
  .select-wrap { position: relative; }
  .select-wrap .ki { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; font-size: 12px; }
  .check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; font-weight: 300; line-height: 1.4; }
  .check input { width: 16px; height: 16px; min-height: 0; margin: 2px 0 0; flex: none; accent-color: var(--color-text); }
  .check-more { display: block; font-size: 14px; color: var(--color-accent-text); margin-top: 4px; }
  .check-more:hover { text-decoration: underline; }
  .kform [data-submit-row] { grid-column: 1 / -1; }
  .kform [type="submit"] {
    width: 100%; min-height: 44px; padding: 0 24px; font-family: var(--font-display); font-size: 16px; font-weight: 300;
    color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-surface); border-radius: 3px; cursor: pointer;
    transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  }
  .kform [type="submit"]:hover { background: var(--color-line); }
  .kform--red [type="submit"] { background: transparent; border-color: var(--color-accent); }
  .kform--red [type="submit"]:hover { background: var(--color-surface); }
  .kform--white input, .kform--white textarea { background: var(--color-white); }
  .form__summary { grid-column: 1 / -1; padding: 12px 16px; border: 2px solid var(--color-error); background: var(--color-white); font-size: 15px; }
  .form__summary a { text-decoration: underline; }
  .field__error { font-size: 14px; color: var(--color-error); margin: 0; }
  .form__status { margin: 12px 0 0; font-size: 15px; }
  .form__answer { padding: 24px; background: var(--color-white); border: 1px solid var(--color-line); }
  .form__answer h3 { font-family: var(--font-display); font-size: 22px; font-weight: 400; margin-bottom: 8px; }
  .form__answer .kbtn { margin-top: 12px; }
  .form__answer a { text-decoration: underline; }
  @media (max-width: 767px) { .kform { grid-template-columns: minmax(0, 1fr); } }

  /* Slot (not used on a 1:1 move, kept for the kit) */
  .slot { display: grid; gap: 6px; padding: 20px; border: 1px dashed var(--color-field); }
  .slot__rec { font-size: 14px; font-weight: 700; }

  /* ---------- Generic carousel (lærling gallery) ---------- */
  .strip { position: relative; }
  .strip__track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; list-style: none; margin: 0; padding: 0; }
  .strip__track::-webkit-scrollbar { display: none; }
  .strip__track > li { flex: 0 0 calc((100% - 40px) / 5); scroll-snap-align: start; }
  .strip__track img { width: 100%; height: 331px; object-fit: cover; }
  .strip__btn { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; background: transparent; border: 0; color: var(--color-text); cursor: pointer; font-size: 20px; }
  .strip__btn:hover { color: var(--color-accent); }
  .strip__btn--prev { left: -50px; }
  .strip__btn--next { right: -50px; }
  .strip__btn--prev .ki { transform: rotate(180deg); }
  @media (max-width: 1240px) { .strip__btn--prev { left: 0; } .strip__btn--next { right: 0; } .strip__btn { background: var(--color-bg); } }
  @media (max-width: 1024px) { .strip__track > li { flex-basis: calc((100% - 20px) / 3); } }
  @media (max-width: 767px) { .strip__track > li { flex-basis: 100%; } .strip__track img { height: 400px; } }

  /* ---------- Video poster (YouTube is a link, Engine runs no players) ---------- */
  .yt { position: relative; display: block; background: var(--color-deep); overflow: hidden; }
  .yt img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: opacity var(--dur) var(--ease); }
  .yt:hover img { opacity: 1; }
  .yt__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 68px; height: 48px; border-radius: 12px; background: var(--color-accent); color: var(--color-white); }
  .yt__play svg { width: 22px; height: 22px; fill: currentColor; }
  .yt__label { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px; font-size: 14px; color: var(--color-white); background: var(--color-scrim); }
}

@layer pages {
  /* ---------- Front page ---------- */
  .apply { padding-block: 100px 20px; }
  .apply h2 { font-family: var(--font-display); font-size: 30px; line-height: 45px; text-align: center; }
  .apply h2 strong { font-weight: 800; display: block; }
  .apply .txt-c { margin: 20px auto 0; padding-bottom: 15px; max-width: 730px; }
  .apply .btns { margin-top: 41px; }
  @media (max-width: 767px) { .apply h2 { font-size: 20px; line-height: 45px; } }

  /* ---------- Kurs ---------- */
  .feat3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
  .feat3 > div { padding: 10px 20px; min-height: 124px; border-left: 1px solid var(--color-blue); }
  .feat3 p:first-child { font-size: 18px; font-weight: 700; margin-bottom: 0; line-height: 41px; }
  .feat3 p + p { font-size: 16px; }
  @media (max-width: 767px) { .feat3 { grid-template-columns: minmax(0, 1fr); } }

  /* Kurskalenderen: ported from the old page's own CSS (Elementor 9329, shortcode f3d945e). */
  .ktech-kurskalender { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 30px; align-items: start; }
  @media (min-width: 1025px) { .ktech-kurskalender { grid-auto-flow: column; grid-template-rows: repeat(var(--kurs-rader, 6), auto); } }
  .ktech-kurskalender-item { position: relative; width: 100%; min-width: 0; background: var(--color-cal); color: var(--color-text); overflow: hidden; align-self: start; transition: background-color 0.25s ease; }
  @media (min-width: 1025px) { .ktech-kurskalender-item:hover { background: var(--color-cal-hover); } }
  .ktech-kurskalender-main { display: grid; grid-template-columns: 185px minmax(0, 1fr) auto; align-items: stretch; width: 100%; min-width: 0; min-height: 74px; }
  .ktech-kurskalender-dato { display: flex; align-items: center; padding: 15px 20px; border-right: 1px solid var(--color-blue); font-size: 15px; font-weight: 400; line-height: 1.4; white-space: nowrap; }
  .ktech-kurskalender-info { display: flex; align-items: center; min-width: 0; padding: 15px 20px; }
  .ktech-kurskalender-titleline { display: block; flex: 1 1 auto; min-width: 0; }
  .ktech-kurskalender-tittel { display: inline; min-width: 0; color: var(--color-text); font-size: 16px; font-weight: 600; line-height: 1.4; overflow-wrap: break-word; }
  .ktech-kurskalender-tittel:hover { text-decoration: underline; text-underline-offset: 3px; }
  .ktech-kurskalender-sprak { display: inline; position: relative; top: -0.45em; margin-left: 5px; color: var(--color-text-label); font-size: 10px; font-weight: 500; line-height: 1; letter-spacing: 0.02em; white-space: nowrap; }
  .ktech-kurskalender-more { display: none; flex: 0 0 auto; margin-left: 12px; padding: 2px 4px; min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--color-text); font-size: 13px; line-height: 1; letter-spacing: 2px; cursor: pointer; }
  .ktech-kurskalender-fullt { align-self: center; margin-right: 14px; padding: 5px 8px; border: 1px solid var(--color-text); font-size: 11px; font-weight: 500; line-height: 1; white-space: nowrap; }
  .ktech-kurskalender-preview { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s ease; pointer-events: none; }
  .ktech-kurskalender-preview-inner { min-height: 0; overflow: hidden; padding: 0 20px 0 205px; font-size: 14px; line-height: 1.55; transition: padding-top 0.4s ease, padding-bottom 0.4s ease; visibility: hidden; }
  .ktech-kurskalender-preview-inner::before { content: ""; display: block; width: 100%; height: 1px; margin-bottom: 15px; background: var(--color-cal-line); }
  .ktech-kurskalender-preview p { margin: 0 0 8px; }
  .ktech-kurskalender-fulltext { font-size: 13px; font-style: italic; }
  .ktech-kurskalender-lesmer { display: inline-block; margin-top: 4px; color: var(--color-text); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
  .ktech-kurskalender-tittel:focus-visible, .ktech-kurskalender-more:focus-visible, .ktech-kurskalender-lesmer:focus-visible, .ktech-kurskalender-cta:focus-visible { outline: 2px solid var(--color-blue); outline-offset: 3px; }
  .ktech-kurskalender-item[data-open] .ktech-kurskalender-preview { grid-template-rows: 1fr; pointer-events: auto; }
  .ktech-kurskalender-item[data-open] .ktech-kurskalender-preview-inner { padding-top: 4px; padding-bottom: 20px; visibility: visible; }
  .ktech-kurskalender-item[data-open] .ktech-kurskalender-more { display: none; }
  @media (min-width: 1025px) {
    .ktech-kurskalender-preview-inner { padding-left: 20px; padding-right: 20px; }
    .ktech-kurskalender-item:hover .ktech-kurskalender-preview, .ktech-kurskalender-item:focus-within .ktech-kurskalender-preview { grid-template-rows: 1fr; pointer-events: auto; }
    .ktech-kurskalender-item:hover .ktech-kurskalender-preview-inner, .ktech-kurskalender-item:focus-within .ktech-kurskalender-preview-inner { padding-top: 4px; padding-bottom: 20px; visibility: visible; }
  }
  .ktech-kurskalender-cta { display: flex; align-items: center; justify-content: space-between; align-self: center; width: calc(100% - 30px); margin: 0 15px; padding: 14px 4px; border-bottom: 1px solid var(--color-blue); color: var(--color-text); font-size: 16px; font-weight: 600; line-height: 1.4; }
  .ktech-kurskalender-cta-icon { flex: 0 0 auto; margin-left: 18px; font-size: 18px; transition: transform 0.25s ease; }
  .ktech-kurskalender-cta-icon .ki { transform: rotate(90deg); }
  .ktech-kurskalender-cta:hover .ktech-kurskalender-cta-icon { transform: translateY(4px); }
  @media (min-width: 768px) and (max-width: 1024px) {
    .ktech-kurskalender { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .ktech-kurskalender-more { display: inline-flex; align-items: center; justify-content: center; align-self: center; margin-left: 16px; font-size: 12px; }
    .ktech-kurskalender-fullt { margin-right: 18px; }
    .ktech-kurskalender-cta { width: 100%; margin: 12px 0 0; }
  }
  @media (max-width: 767px) {
    .ktech-kurskalender { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .ktech-kurskalender-main { display: flex; flex-direction: column; width: 100%; min-height: 0; }
    .ktech-kurskalender-dato { order: 1; width: 100%; justify-content: center; min-height: 58px; padding: 14px 18px; border-right: 0; border-bottom: 1px solid var(--color-blue); text-align: center; white-space: normal; }
    .ktech-kurskalender-info { order: 3; flex-direction: column; align-items: center; justify-content: center; width: 100%; padding: 24px 18px 22px; text-align: center; }
    .ktech-kurskalender-fullt { order: 2; margin: 18px auto -8px; padding: 4px 7px; }
    .ktech-kurskalender-titleline { order: 1; width: 100%; text-align: center; }
    .ktech-kurskalender-more { order: 2; display: inline-flex; align-items: center; justify-content: center; align-self: center; margin: 10px 0 0; padding: 2px 5px; font-size: 10px; }
    .ktech-kurskalender-preview-inner { padding: 0 18px; text-align: left; }
    .ktech-kurskalender-item[data-open] .ktech-kurskalender-preview-inner { padding-bottom: 22px; }
    .ktech-kurskalender-preview-inner::before { margin-bottom: 16px; }
    .ktech-kurskalender-cta { width: 100%; margin: 8px 0 0; padding: 14px 4px; font-size: 15px; }
  }

  .course-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 40px; list-style: none; margin: 0; padding: 0; }
  .course-grid li[data-filtered="out"], .news-grid li[data-filtered="out"] { display: none; }
  .course-link { display: flex; align-items: flex-end; justify-content: flex-start; gap: 25px; min-height: 65px; padding-bottom: 12px; border-bottom: 1px solid var(--color-blue); font-size: 15px; font-weight: 300; line-height: 1.5; transition: transform var(--dur) var(--ease); }
  .course-link:hover { transform: scale(1.03); }
  .course-link .ki { font-size: 20px; flex: none; color: var(--color-text); }
  .course-filter { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: var(--color-surface); padding: 10px; border-radius: 5px; margin: 80px auto 80px; max-width: 1026px; }
  .course-filter__group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 30px; }
  .course-filter__group + .course-filter__group { padding-left: 30px; flex: 1; }
  .course-filter button { font-family: var(--font-display); font-size: 14px; font-weight: 400; color: var(--color-text-muted); background: none; border: 0; padding: 0; min-height: 35px; cursor: pointer; }
  .course-filter__group:first-child button { font-style: italic; }
  .course-filter button[aria-pressed="true"] { font-weight: 600; }
  .course-filter button:hover { color: var(--color-blue); }
  @media (max-width: 1024px) { .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 767px) {
    .course-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .course-filter { flex-direction: column; gap: 4px; }
    .course-filter__group + .course-filter__group { padding-left: 0; }
    .course-filter__group { gap: 4px 20px; }
  }

  /* ---------- Course page ---------- */
  .course { display: grid; grid-template-columns: minmax(0, 733fr) minmax(0, 317fr); gap: 90px; align-items: start; }
  .course__main { display: flex; flex-direction: column; }
  .course__intro { padding: 100px 0 20px; text-align: center; display: grid; gap: 20px; }
  .course__intro h1 { font-size: 30px; line-height: 1; }
  .course__by { font-size: 16px; font-weight: 300; font-style: italic; }
  .course__lead { font-size: 18px; font-weight: 600; line-height: 1.5; margin: 20px 0 0; }
  .course__body { margin-top: 60px; padding: 50px 0 40px; border-top: 1px solid var(--color-blue); display: grid; gap: 43px; }
  .course__part h2 { font-size: 22px; font-weight: 500; line-height: 1.4; margin-bottom: 20px; }
  .course__part { font-size: 18px; line-height: 1.5; }
  .course__part ul { margin: 0; }
  .infobox { margin-top: 100px; padding: 40px 20px; background: var(--color-surface); border-radius: 10px; display: grid; gap: 34px; }
  .infobox h2 { font-size: 20px; font-weight: 600; line-height: 1; text-align: center; padding-bottom: 20px; margin-bottom: -20px; }
  .infobox dl { margin: 0; display: grid; gap: 34px; }
  .infobox dl > div { display: grid; gap: 12px; }
  .infobox dt { font-family: var(--font-display); font-size: 20px; font-weight: 500; line-height: 1.5; }
  .infobox dd { margin: 0; font-size: 18px; line-height: 1.5; }
  .infobox dd.strong { font-weight: 700; }
  .signup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 50px; align-items: start; padding: 100px 20px 80px; border-block: 1px solid var(--color-blue); }
  .signup__head { text-align: center; display: grid; justify-items: center; gap: 20px; }
  .signup__head h2 { font-size: 30px; line-height: 1; }
  .signup__head .sec-icon { margin: 0; font-size: 50px; }
  @media (max-width: 1024px) { .course { gap: 40px; } }
  @media (max-width: 767px) {
    .course { grid-template-columns: minmax(0, 1fr); }
    .course__intro { padding-top: 40px; }
    .infobox { margin-top: 0; }
    .signup { grid-template-columns: minmax(0, 1fr); padding: 60px 0 60px; }
  }

  /* ---------- Lærling ---------- */
  .apprentices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
  .apprentices .yt { aspect-ratio: 9 / 16; max-width: 400px; margin: 0 auto 20px; }
  .apprentices p { font-size: 14px; margin: 0; }
  @media (max-width: 767px) { .apprentices { grid-template-columns: minmax(0, 1fr); } }
  .trade-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 30px; margin-top: 60px; list-style: none; padding: 0; }
  .trade-link { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; min-height: 65px; padding-bottom: 0; border-bottom: 1px solid var(--color-accent); font-size: 16px; font-weight: 300; line-height: 1.5; transition: color var(--dur) var(--ease); }
  .trade-link p { margin: 0 0 1px; }
  .trade-link .ki { font-size: 20px; margin-bottom: 8px; transition: transform var(--dur) var(--ease); }
  .trade-link:hover { color: var(--color-blue); }
  .trade-link:hover .ki { transform: translateX(4px); }
  .trade-link--dark { border-bottom-color: var(--color-text); font-style: italic; }
  @media (max-width: 1024px) { .trade-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 767px) { .trade-grid { grid-template-columns: minmax(0, 1fr); } }

  .steps { position: relative; display: grid; grid-template-columns: repeat(var(--steps, 3), minmax(0, 1fr)); max-width: calc(300px * var(--steps, 3)); margin: 80px auto 0; min-height: 176px; text-align: center; list-style: none; padding: 0; }
  .steps::before { content: ""; position: absolute; top: 35px; left: calc(50% / var(--steps, 3)); right: calc(50% / var(--steps, 3)); border-top: 1px solid var(--color-text-muted); }
  .steps li { position: relative; display: grid; justify-items: center; align-content: start; gap: 0; padding: 0 10px; }
  .steps__icon { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: var(--color-surface); color: var(--color-accent); font-size: 35px; margin-bottom: 15px; }
  .steps__icon--grey { color: var(--color-text); }
  .steps__icon svg { width: 35px; height: 35px; }
  .steps h3 { font-family: var(--font-body); font-size: 18px; font-weight: 700; line-height: 1.5; }
  .steps p { margin: 0; font-size: 16px; font-weight: 300; }
  @media (max-width: 767px) {
    .steps { grid-template-columns: minmax(0, 1fr); gap: 30px; }
    .steps::before { display: none; }
  }
  .tabs4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 30px; margin-top: 80px; align-items: start; }
  .tabs4 details { border-bottom: 1px solid var(--color-accent); }
  .tabs4 summary { display: flex; justify-content: space-between; align-items: center; min-height: 45px; padding: 10px; list-style: none; font-family: var(--font-display); font-size: 14px; cursor: pointer; }
  .tabs4 summary::-webkit-details-marker { display: none; }
  .tabs4 summary .ki { font-size: 14px; }
  .tabs4 summary .ki--minus { display: none; }
  .tabs4 details[open] .ki--plus { display: none; }
  .tabs4 details[open] .ki--minus { display: inline-block; }
  .tabs4 .acc__body { font-size: 15px; }
  @media (max-width: 1024px) { .tabs4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 767px) { .tabs4 { grid-template-columns: minmax(0, 1fr); margin-top: 40px; } }

  .daily { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 40px 20px; background: var(--color-surface); }
  .daily .yt { aspect-ratio: 16 / 9; }
  .daily h2 { font-size: 25px; line-height: 1; margin-bottom: 20px; }
  .daily .txt { font-weight: 300; }
  @media (max-width: 767px) { .daily { grid-template-columns: minmax(0, 1fr); } }

  /* ---------- Lærefag pages ---------- */
  .trade-intro { display: grid; justify-items: center; gap: 40px; text-align: center; }
  .trade-intro h1 { font-size: 30px; line-height: 40px; }
  .trade-intro .txt-c { font-weight: 600; margin: 0 auto; font-size: 18px; }
  .does { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 40px; align-items: center; padding: 20px; margin-top: 80px; background: var(--color-surface); }
  .does img { width: 100%; height: auto; }
  .does h3 { font-family: var(--font-body); font-size: 18px; font-weight: 700; margin-bottom: 15px; }
  .does ul { margin: 0; font-size: 15px; line-height: 1.6; }
  @media (max-width: 767px) { .does { grid-template-columns: minmax(0, 1fr); } }
  .does--video { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .does--video .yt { aspect-ratio: 9 / 16; max-width: 300px; margin-inline: auto; }
  @media (max-width: 767px) { .does--video { grid-template-columns: minmax(0, 1fr); } }
  .ctabox { display: grid; justify-items: center; gap: 40px; padding: 40px 20px; background: var(--color-surface); text-align: center; }
  .ctabox .sec-icon { margin-bottom: -20px; }
  .ctabox h2 { font-size: 30px; line-height: 1; }
  .ctabox .sec-icon { margin: 0; }
  .ctabox .txt-c { margin: 0 auto; font-size: 16px; }

  /* ---------- Om oss ---------- */
  .contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: 50px 40px; background: var(--color-surface); align-items: center; }
  .contact__head { text-align: center; display: grid; justify-items: center; gap: 20px; }
  .contact__head h2 { font-size: 30px; line-height: 1; }
  .contact__head .sec-icon { margin: 0; font-size: 50px; color: var(--color-accent); }
  .contact__list { list-style: none; padding: 0; margin: 10px 0 0; font-size: 16px; line-height: 1.9; }
  .contact__list a:hover { color: var(--color-blue); }
  @media (max-width: 767px) { .contact { grid-template-columns: minmax(0, 1fr); padding: 40px 20px; } }
  .people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 40px; list-style: none; padding: 0; }
  .people { gap: 30px 15px; padding: 10px; }
  .person { padding: 20px; background: var(--color-bg); border-radius: 5px; box-shadow: 0 0 1.5px 1.5px var(--color-shadow-ring); height: 100%; }
  .person img { width: 100%; height: 250px; object-fit: cover; }
  .person__name { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1.5; margin: 24px 0 0; }
  .person__role { font-size: 16px; font-weight: 300; color: var(--color-accent-text); margin: 0 0 24px; }
  .person ul { list-style: none; padding: 0; margin: 0; font-size: 14px; font-weight: 300; line-height: 1.5; display: grid; gap: 4px; }
  .person li { display: flex; gap: 8px; align-items: flex-start; overflow-wrap: anywhere; }
  .person li svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
  .person a:hover { color: var(--color-blue); }
  @media (max-width: 1024px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 767px) { .people { grid-template-columns: minmax(0, 1fr); } }

  /* ---------- Article (nyheter) ---------- */
  .article { max-width: 912px; margin-inline: auto; }
  .article__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; font-family: var(--font-display); font-size: 14px; font-weight: 300; margin-top: 10px; }
  .article h1 { font-size: 30px; line-height: 1.3; text-align: center; margin: 60px 0 50px; }
  .article > .crumbs { margin-top: 60px; }
  .article__lead { font-size: 18px; font-weight: 600; text-align: center; margin-bottom: 30px; }
  .article__rule { border: 0; border-top: 1px solid var(--color-blue); margin: 30px 0; }
  .prose { font-size: 16px; line-height: 1.6; }
  .prose h2, .prose h3, .prose h4 { font-family: var(--font-body); font-weight: 700; font-size: 20px; margin: 0 0 12px; line-height: 1.4; }
  .prose h3 { font-size: 18px; }
  .prose a { color: var(--color-accent-text); }
  .prose { overflow-wrap: anywhere; }
  .prose a:hover { text-decoration: underline; }
  .prose figure { margin: 0 0 24px; }
  .prose figure img { width: 100%; height: auto; }
  .prose figcaption { font-size: 14px; color: var(--color-text-muted); margin-top: 6px; text-align: center; }
  .prose blockquote { margin: 0 0 24px; padding: 0 0 0 20px; border-left: 3px solid var(--color-accent); font-size: 18px; }
  .prose .spacer { display: block; }
  .prose .box { background: var(--color-surface); padding: 40px; margin-bottom: 24px; }
  .prose .box > :last-child { margin-bottom: 0; }
  .prose .ta-c { text-align: center; }
  .prose .cols { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
  .prose .gallery { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0 0 24px; }
  .prose .gallery img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }
  .prose .yt { aspect-ratio: 16 / 9; margin-bottom: 24px; }
  .prose .yt--short { aspect-ratio: 9 / 16; max-width: 360px; margin-inline: auto; }
  .prose .btn-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-bottom: 24px; }
  .prose .btn-row a { text-decoration: none; color: var(--color-text); border-radius: 20px; }
  @media (max-width: 767px) {
    .prose .cols { grid-template-columns: minmax(0, 1fr); }
    .prose .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .prose .box { padding: 24px; }
  }

  /* ---------- Personvern ---------- */
  .legal { max-width: 912px; margin-inline: auto; }
  .legal h1 { font-size: 30px; text-align: center; margin-bottom: 40px; }
  .legal h2 { font-family: var(--font-display); font-size: 22px; font-weight: 500; margin: 30px 0 12px; }
  .legal h3 { font-size: 18px; font-weight: 500; margin: 20px 0 10px; }
  .legal a { color: var(--color-blue); text-decoration: underline; }

  /* Phone heights measured on the old site (390 px) */
  @media (max-width: 767px) {
    .top-pic img { height: 500px; }
    .top-pic--tall img { height: 470px; }
    .top-pic--news img { height: 228px; }
    .top-pic video { height: 390px; }
    .pics3 img, .pics3--short img { height: 450px; }
    .person img { height: 300px; }
    .does { padding: 40px 20px; gap: 40px; }
    .does > div:first-child { order: 2; }
    .h-intro { font-size: 25px; }
    .apply { padding-bottom: 80px; }
  }
}

/* ---------- 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-deep);
  --cc-btn-primary-hover-color: var(--color-on-deep);
  --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; }
