/* The site header and the «Funksjoner» mega menu (Paper «Nettsiden» › W 06, 27 Nov 2026), on every public page.
   Built on Annnimate «Mega Menu» (data-anm-*), in our colours, Geist and our soft curve. No arrows on the triggers:
   the item under the pointer gets a light pill that slides between them. Under 768 px: «Meny» and an accordion. */
.mm-bar, .mm, .mm-cta {
  --mm-ink: #12151C; --mm-fill: #F4F4F1; --mm-tray: #F7F7F7; --mm-border: #DDDDDD; --mm-hair: #EDEDE8;
  --mm-text2: #4A4D55; --mm-text3: #6B7080; --mm-lemon: #F5F26B; --mm-ondark: #E8EAF0; --mm-mutedark: #8D93A3;
  --mm-pill: var(--mm-fill); --mm-soft: cubic-bezier(.2, .8, .2, 1);
  --mm-gutter: clamp(16px, 4vw, 56px);
}

/* ---------- the bar on the sub-pages (the front page keeps its own .nav) ---------- */
.mm-bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; display: flex; align-items: center; gap: 12px;
  padding: 16px var(--mm-gutter); background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 1px 0 var(--mm-hair); font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--mm-ink); }
.mm-home { display: inline-flex; align-items: center; flex: none; margin-right: auto; }
.mm-home img { height: 24px; width: auto; display: block; }
.mm-lang { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(18, 21, 28, .06); gap: 2px; flex: none; }
.mm-lang a { font: 600 13px/1 "Geist", system-ui, sans-serif; color: var(--mm-ink); padding: 7px 9px; border-radius: 7px; text-decoration: none; opacity: .62; }
.mm-lang a[aria-current="true"] { background: #fff; opacity: 1; box-shadow: 0 1px 2px rgba(18, 21, 28, .12); }
.mm-cta { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; background: var(--mm-ink); color: var(--mm-lemon);
  font: 600 13.5px/17px "Geist", system-ui, sans-serif; text-decoration: none; white-space: nowrap; flex: none; transition: transform .2s var(--mm-soft); }
.mm-cta:hover { transform: translateY(-1px); }
.mm-bar :focus-visible, .mm :focus-visible { outline: 2px solid var(--mm-ink); outline-offset: 2px; border-radius: 8px; }

/* ---------- the menu ---------- */
.mm { font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif; color: inherit; }
.mm ul { list-style: none; margin: 0; padding: 0; }
.mm-burger { display: none; }
.mm-drawer { display: contents; }
.mm-mfoot { display: none; }
.mm-list-wrap { position: relative; }
.mm-list { display: flex; align-items: center; gap: 6px; position: relative; z-index: 1; }
.mm-trigger { position: relative; display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: none;
  font: 400 15px/18px "Geist", system-ui, sans-serif; color: inherit; opacity: 1; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: opacity .2s; -webkit-tap-highlight-color: transparent; }
.mm-trigger:hover, .mm-trigger[aria-expanded="true"] { opacity: 1; }
.mm-acc { display: none; }
/* The pill: one light shape that slides to the item under the pointer (JS sets x and width). Without JS, a plain
   background on hover stands in. */
.mm-pill { position: absolute; left: 0; top: 50%; height: 32px; margin-top: -16px; width: 1px; border-radius: 8px; background: var(--mm-pill);
  opacity: 0; pointer-events: none; z-index: 0; transform-origin: 0 50%; }
.mm:not(.mm-ready) .mm-trigger:hover { background: var(--mm-pill); }

/* The panel: 8 px under the bar's hairline, radius 16, hairline and a soft shadow. One panel that grows and shrinks
   between the groups (the inner height is animated). */
.mm-dropdown { position: absolute; top: calc(100% + 8px); left: 0; right: 0; margin-inline: auto; width: min(920px, calc(100% - 2 * var(--mm-gutter)));
  background: #fff; color: var(--mm-ink); border-radius: 16px; overflow: hidden; visibility: hidden; pointer-events: none; transform-origin: 50% 0;
  box-shadow: 0 0 0 1px var(--mm-border), 0 18px 40px rgba(18, 21, 28, .10), 0 2px 6px rgba(18, 21, 28, .06); }
.mm-dropdown-inner { position: relative; height: 0; }
.mm-group { position: absolute; top: 0; left: 0; right: 0; visibility: hidden; opacity: 0; }
.mm-panel { display: flex; gap: 28px; padding: 24px 24px 20px 28px; }
.mm-cols { display: flex; gap: 28px; flex: none; }
.mm-col { width: 240px; display: flex; flex-direction: column; gap: 4px; }
.mm-col ul { display: flex; flex-direction: column; gap: 4px; }
.mm-col-label { padding: 0 10px 8px; font: 400 12px/17px "Geist Mono", ui-monospace, monospace; color: var(--mm-text3); }

/* A feature row: 32 px tile, title 14/600, one line 12. Hover: light surface, ink tile, lemon icon. */
.mm-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; padding: 10px;
  border-radius: 10px; color: var(--mm-ink); text-decoration: none; transition: background-color .2s var(--mm-soft); }
.mm-tile { grid-row: 1 / span 2; width: 32px; height: 32px; border-radius: 8px; background: var(--mm-fill); color: var(--mm-ink); display: grid; place-items: center;
  transition: background-color .2s var(--mm-soft), color .2s var(--mm-soft); }
.mm-ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mm-row-t { font: 600 15px/19px "Geist", system-ui, sans-serif; }
.mm-row-d { font: 400 13px/17px "Geist", system-ui, sans-serif; color: var(--mm-text3); text-wrap: pretty; }
.mm-row:hover, .mm-row:focus-visible { background: var(--mm-fill); }
.mm-row:hover .mm-row-d, .mm-row:focus-visible .mm-row-d { color: var(--mm-text2); }
.mm-row:hover .mm-tile, .mm-row:focus-visible .mm-tile { background: var(--mm-ink); color: var(--mm-lemon); }
.mm-row[aria-current="page"] .mm-row-t::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-radius: 3px; background: var(--mm-ink); vertical-align: 2px; }

/* The preview: ink card, the picture (560 px webp, loaded on first open), mono label, heading 17/600, links. */
.mm-preview { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; background: var(--mm-ink); border-radius: 12px; overflow: hidden; }
.mm-preview-media { position: relative; display: block; margin: 8px 8px 0; aspect-ratio: 16 / 10; flex: none; border-radius: 8px; overflow: hidden; background: #fff; }
/* Two stacked layers: the new picture fades in over the old one once it has decoded, so the frame is never empty. */
.mm-preview-media img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.mm-pv-back { opacity: 0; visibility: hidden; }
.mm-preview-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.mm-eyebrow { margin: 0; height: 17px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 400 12px/17px "Geist Mono", ui-monospace, monospace; color: var(--mm-mutedark); }
.mm-heading { margin: 0; font: 600 18px/23px "Geist", system-ui, sans-serif; letter-spacing: -.01em; color: var(--mm-ondark); text-wrap: balance;
  height: 46px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.mm-preview-links { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 8px; height: 54px; box-sizing: content-box; }
.mm-see { height: 19px; }
.mm-more { display: block; height: 19px; line-height: 19px !important; }
.mm-see { display: inline-flex; align-items: center; gap: 8px; font: 500 13px/17px "Geist", system-ui, sans-serif; color: var(--mm-ondark); text-decoration: none; }
/* No film: «Mer om …» takes the film line, and the box keeps its height, so nothing under it moves. */
.mm-see.is-off { display: none; }
.mm-play { width: 18px; height: 18px; border-radius: 50%; background: var(--mm-lemon); display: grid; place-items: center; flex: none; }
.mm-play svg { width: 8px; height: 8px; fill: var(--mm-ink); }
.mm-len { font: 400 12px/17px "Geist Mono", ui-monospace, monospace; color: var(--mm-mutedark); font-variant-numeric: tabular-nums; }
.mm-more { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 400 13px/17px "Geist", system-ui, sans-serif; color: var(--mm-mutedark); text-decoration: none; }
.mm-more:hover, .mm-see:hover span:nth-child(2) { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.mm-preview :focus-visible { outline-color: var(--mm-lemon); }

/* The tray under the feature group: the comparisons in one line and «Alle funksjoner». */
.mm-tray { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 28px; background: var(--mm-tray); box-shadow: inset 0 1px 0 var(--mm-hair); }
.mm-tray p { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.mm-tray-l { font: 400 12px/17px "Geist Mono", ui-monospace, monospace; color: var(--mm-text3); }
.mm-tray-links { font: 400 14px/19px "Geist", system-ui, sans-serif; color: var(--mm-text3); }
.mm-tray-links a, .mm-all { color: var(--mm-ink); text-decoration: none; }
.mm-tray-links a:hover, .mm-all:hover { text-decoration: underline; text-underline-offset: 3px; }
.mm-all { font: 500 14px/19px "Geist", system-ui, sans-serif; white-space: nowrap; }

/* The «Sammenlign» group: three columns of names, a card with the comparison's line. Hover: a dot grows and the
   name moves 10 px (0.4 s, a back.out-like curve). */
.mm-panel-compare { gap: 40px; padding: 24px 28px; }
.mm-panel-compare .mm-cols { gap: 40px; }
.mm-panel-compare .mm-col { width: 170px; gap: 10px; }
.mm-panel-compare .mm-col ul { gap: 10px; }
.mm-panel-compare .mm-col-label { padding: 0 0 4px; }
.mm-link { position: relative; display: inline-flex; align-items: center; font: 400 16px/21px "Geist", system-ui, sans-serif; color: var(--mm-ink); text-decoration: none; }
.mm-dot { position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 3px; background: var(--mm-ink); transform: scale(0);
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.mm-link-l { transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.mm-link:hover .mm-dot, .mm-link:focus-visible .mm-dot { transform: scale(1); }
.mm-link:hover .mm-link-l, .mm-link:focus-visible .mm-link-l { transform: translateX(14px); }
.mm-ccard { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 16px; border-radius: 12px; background: var(--mm-fill); }
.mm-ccard .mm-eyebrow { color: var(--mm-text3); }
.mm-ccard .mm-heading { font-size: 15px; line-height: 19px; color: var(--mm-ink); height: 38px; letter-spacing: 0; }
.mm-ccard .mm-all { font-size: 13px; line-height: 16px; font-weight: 400; color: var(--mm-text2); }

/* The dim behind the open menu (W 06, like Annnimate's scrim): a faint ink veil and a 2 px blur over the page, under the
   header. megamenu.js puts it in <body> (the header's backdrop filter would trap a fixed child). A click on it closes. */
.mm-scrim { position: fixed; inset: 0; background: rgba(18, 21, 28, .07); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s cubic-bezier(.2, .8, .2, 1), visibility 0s .3s; }
.mm-scrim.is-on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .3s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
@media (max-width: 768px) { .mm-scrim { display: none; } }
@media (prefers-reduced-motion: reduce) { .mm-scrim, .mm-scrim.is-on { transition: none; } }

/* The front page: the menu sits in its own fixed .nav (transparent, paper when scrolled, ink over the dark sections). */
.nav .mm { margin-left: auto; --mm-pill: rgba(18, 21, 28, .06); }
.nav.on-night .mm { --mm-pill: rgba(255, 255, 255, .12); }
.nav .mm-cta { margin-left: 2px; }
.nav.on-night .mm-cta { background: var(--mm-lemon); color: var(--mm-ink); }

/* Desktop: the triggers sit in the middle of the bar, right above the centred panel (Tom 27 Nov). The bar (fixed
   .nav / sticky .mm-bar) is the containing block, the same one the dropdown centres in. */
@media (min-width: 769px) {
  .mm-list-wrap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
  /* About 10 px from the triggers to the panel (was 24). */
  .mm-dropdown { top: calc(100% - 6px); }
}

/* ---------- under 1000 px: the preview goes, the columns stay ---------- */
@media (max-width: 1000px) and (min-width: 769px) {
  .mm-preview { display: none; }
  .mm-cols { flex: 1 1 auto; }
  .mm-col { width: auto; flex: 1 1 0; }
  .mm-panel-compare .mm-col { width: auto; }
  .mm-ccard { display: none; }
}

/* ---------- phone (≤ 768): «Meny» / «Lukk» and an accordion, no preview ---------- */
@media (max-width: 768px) {
  .mm-bar { padding: 12px 16px; }
  .mm-cta { display: none; }
  .mm { order: 3; }
  .mm-burger { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--mm-fill);
    font: 600 12.5px/16px "Geist", system-ui, sans-serif; color: var(--mm-ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .mm-burger svg { display: none; width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
  .mm-burger[aria-expanded="true"] svg { display: block; }
  .nav .mm-burger { background: rgba(18, 21, 28, .06); }
  .nav:has(.mm[data-mm-open]) { background: #fff; color: var(--mm-ink); box-shadow: 0 1px 0 var(--mm-hair); }
  .nav:has(.mm[data-mm-open]) .mm-burger { background: var(--mm-fill); color: var(--mm-ink); }
  .nav:has(.mm[data-mm-open]) .logo .sq { fill: var(--mm-ink); }
  .nav.on-night .mm-burger { background: rgba(255, 255, 255, .12); color: #F4F4F1; }
  /* The header (sticky or fixed, with a backdrop filter) is the drawer's containing block: it hangs right under it and
     fills the rest of the screen. */
  .mm-drawer { display: none; position: absolute; left: 0; right: 0; top: 100%; height: calc(100vh - var(--mm-top, 60px)); height: calc(100dvh - var(--mm-top, 60px)); z-index: 60; overflow-y: auto; overscroll-behavior: contain;
    flex-direction: column; padding: 8px 20px calc(20px + env(safe-area-inset-bottom, 0px)); background: #fff; color: var(--mm-ink); box-shadow: inset 0 1px 0 var(--mm-hair); }
  .mm[data-mm-open] .mm-drawer { display: flex; }
  .mm-list-wrap, .mm-list, .mm-item, .mm-dropdown, .mm-dropdown-inner { display: contents; }
  .mm-pill { display: none; }
  .mm-i-features > .mm-trigger { order: 1; }
  .mm-g-features { order: 2; }
  .mm-i-compare > .mm-trigger { order: 3; }
  .mm-g-compare { order: 4; }
  .mm-i-help > .mm-trigger { order: 5; }
  .mm-i-plain > .mm-trigger { order: 6; }
  .mm-mfoot { order: 7; }
  .mm-trigger { width: 100%; height: auto; justify-content: space-between; padding: 14px 0; border-radius: 0; opacity: 1;
    font: 700 20px/26px "Geist", system-ui, sans-serif; letter-spacing: -.02em; color: var(--mm-ink); }
  .mm-trigger[aria-expanded="true"] { font-weight: 700; }
  .mm-i-compare > .mm-trigger, .mm-i-help > .mm-trigger, .mm-i-plain > .mm-trigger { box-shadow: inset 0 1px 0 var(--mm-hair); }
  .mm-acc { display: block; position: relative; width: 12px; height: 12px; flex: none; }
  .mm-acc::before, .mm-acc::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -.75px; background: currentColor; border-radius: 1px; }
  .mm-acc::after { transform: rotate(90deg); transition: transform .25s var(--mm-soft); }
  .mm-trigger[aria-expanded="true"] .mm-acc::after { transform: rotate(0deg); }
  .mm-group { position: static; visibility: visible; opacity: 1; display: none; }
  .mm-group.mm-open { display: block; }
  .mm-dropdown { visibility: visible; pointer-events: auto; }
  .mm-panel, .mm-panel-compare { display: block; padding: 0 0 10px; }
  .mm-cols, .mm-panel-compare .mm-cols { display: flex; flex-direction: column; gap: 2px; }
  .mm-col, .mm-panel-compare .mm-col { width: auto; gap: 2px; }
  .mm-col-label { display: none; }
  .mm-col ul, .mm-panel-compare .mm-col ul { gap: 2px; }
  .mm-row { grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: auto; align-items: center; padding: 8px 0; border-radius: 0; }
  .mm-row:hover, .mm-row:focus-visible { background: none; }
  .mm-row .mm-tile { grid-row: auto; width: 28px; height: 28px; border-radius: 7px; }
  .mm-row-t { font: 500 15px/20px "Geist", system-ui, sans-serif; }
  .mm-row-d, .mm-preview, .mm-tray { display: none; }
  .mm-link { padding: 8px 0; font-size: 15px; }
  .mm-ccard { display: block; padding: 6px 0 0; background: none; }
  .mm-ccard .mm-eyebrow, .mm-ccard .mm-heading { display: none; }
  .mm-ccard .mm-all { display: inline-block; padding: 8px 0; font-size: 14px; color: var(--mm-ink); }
  .mm-mfoot { display: block; padding-top: 12px; }
  .mm-mcta { display: flex; align-items: center; justify-content: center; height: 48px; border-radius: 12px; background: var(--mm-ink); color: var(--mm-lemon);
    font: 600 14px/18px "Geist", system-ui, sans-serif; text-decoration: none; }
  .mm-mfoot p { margin: 10px 0 0; text-align: center; font: 400 12px/16px "Geist", system-ui, sans-serif; color: var(--mm-text3); }
}
@media (prefers-reduced-motion: reduce) {
  .mm-row, .mm-tile, .mm-dot, .mm-link-l, .mm-acc::after, .mm-cta { transition: none; }
}
