:root {
  --ink: #0b0f14; --ink-2: #131a23; --ink-3: #1d2733;
  --accent: #0088f2; --accent-d: #0074d0;
  --bg: #f2f5f8; --card: #fff; --line: #e1e7ee; --text: #16202b; --muted: #5a6776;
  --ok: #0088f2; --mid: #6bb8f6; --warn: #d98a00; --low: #8592a3;
  --radius: 16px; --shadow: 0 1px 2px rgba(11,15,20,.06), 0 8px 24px rgba(11,15,20,.07);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; font-size: 17px; }
img { max-width: 100%; display: block; }
a { color: #0b6bcb; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 99; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Topplinje */
.topbar { background: var(--ink); color: #fff; }
.topbar__in { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { color: #fff; text-decoration: none; font-weight: 500; letter-spacing: .14em; font-size: 15px; }
.brand b { color: var(--accent); font-weight: 900; }
.brand span { margin-left: 8px; padding-left: 10px; border-left: 1px solid #ffffff40; letter-spacing: .04em; font-weight: 400; color: #ffffffb3; }
.shoplink { color: #ffffffcc; text-decoration: none; font-size: 14px; }
.shoplink:hover { color: var(--accent); }

/* Banner */
.hero { position: relative; background: radial-gradient(1200px 400px at 80% -10%, #25405a 0, transparent 60%), linear-gradient(135deg, var(--ink) 0, var(--ink-3) 100%); color: #fff; min-height: clamp(220px, 30vw, 400px); display: flex; align-items: flex-end; overflow: hidden; }
.hero picture, .hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,15,20,.15) 0, rgba(11,15,20,.78) 100%); }
.hero:not(.hero--image) .hero__shade { background: none; }
.hero__text { position: relative; padding-block: 40px 34px; }
.hero__title { margin: 0; font-size: clamp(30px, 5.2vw, 56px); line-height: 1.05; font-weight: 900; letter-spacing: -.02em; text-wrap: balance; }
.hero__title::after { content: ""; display: block; width: 64px; height: 5px; background: var(--accent); margin-top: 16px; border-radius: 3px; }
.hero__sub { margin: 14px 0 0; font-size: clamp(16px, 2vw, 21px); color: #ffffffd9; max-width: 44ch; }
.is-detail .hero { min-height: 110px; }
.is-detail .hero__text { padding-block: 22px; }
.is-detail .hero__title { font-size: clamp(20px, 3vw, 28px); }
.is-detail .hero__title::after, .is-detail .hero__sub, .is-detail .intro { display: none; }

.intro { background: var(--ink); color: #ffffffd0; }
.intro__in { padding-block: 26px 90px; }
.intro__in p { margin: 0 0 .8em; font-size: 18px; max-width: 760px; }
.intro__in p:last-child { margin: 0; }
.is-detail .finder { margin-top: 0; padding-top: 18px; background: var(--ink); }

/* Søk */
.finder { margin-top: -62px; position: relative; z-index: 5; }
.is-detail .finder { padding-bottom: 36px; }
.search { position: relative; }
.search__box { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 0 14px 0 20px; box-shadow: 0 14px 40px rgba(0,0,0,.28); border: 2px solid transparent; }
.search__box:focus-within { border-color: var(--accent); }
.icon { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: clamp(18px, 2.6vw, 24px); height: 68px; color: var(--ink); }
.search input::placeholder { color: #8591a0; font-size: .82em; }
.search input::-webkit-search-cancel-button { display: none; }
.search__clear { border: 0; background: #e8edf2; width: 34px; height: 34px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink); flex: none; }
.search__clear:hover { background: var(--accent); }
.search__go { background: var(--accent); color: #fff; border: 0; padding: 10px 18px; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; }
.suggest { list-style: none; margin: 8px 0 0; padding: 6px; position: absolute; left: 0; right: 0; background: #fff; border-radius: 16px; box-shadow: 0 18px 44px rgba(0,0,0,.28); max-height: min(60vh, 440px); overflow: auto; z-index: 10; }
.suggest li a, .suggest__empty { display: block; padding: 11px 14px; border-radius: 10px; color: var(--text); text-decoration: none; }
.suggest li a { display: flex; flex-direction: column; }
.suggest li[aria-selected="true"] a, .suggest li a:hover { background: #e6f3fe; }
.suggest strong { font-weight: 700; }
.suggest small { color: var(--muted); font-size: 14px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest mark { background: none; color: inherit; box-shadow: inset 0 -.45em 0 #b3dbfb; }
.suggest__empty { color: var(--muted); }

/* Hovedinnhold */
.main { padding-block: 34px 70px; min-height: 40vh; }
.browse h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 24px 0 14px; }
.browse__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.browse__list a { display: inline-block; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; font-size: 16px; transition: .15s; }
.browse__list a:hover { background: var(--ink); color: var(--accent); border-color: var(--ink); transform: translateY(-1px); }
.is-detail #browse-wrap { display: none; }

.noresult, .searchlist { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); animation: rise .25s ease; }
.noresult h2, .searchlist h2 { margin-top: 0; }
.searchlist ul { list-style: none; margin: 0; padding: 0; }
.searchlist a { display: block; padding: 12px 0; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.searchlist a span { display: block; color: var(--muted); font-size: 15px; }
.searchlist .via { display: inline; }

/* Ingrediens */
.ing { animation: rise .3s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ing__head { margin-bottom: 22px; }
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 6px; }
.crumbs a { color: var(--muted); }
.ing h1 { font-size: clamp(32px, 5vw, 50px); line-height: 1.05; margin: 0 0 12px; letter-spacing: -.02em; font-weight: 900; }
.ing__summary { font-size: 20px; margin: 0 0 14px; max-width: 62ch; color: #2a3644; }
.chips { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: #e5ecf3; border-radius: 999px; padding: 3px 12px; font-size: 14px; color: #314052; }
.ing__nav { display: flex; flex-wrap: wrap; gap: 8px; position: sticky; top: 0; padding: 10px 0; background: var(--bg); z-index: 3; }
.ing__nav a { text-decoration: none; background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.ing__nav a b { color: var(--accent); margin-right: 4px; }
.ing__nav a:hover { background: var(--accent); color: #fff; }
.ing__nav a:hover b { color: #fff; }
.ing__nav a:hover b { color: var(--ink); }
.card { background: var(--card); border-radius: var(--radius); padding: clamp(20px, 3.5vw, 36px); margin: 0 0 22px; box-shadow: var(--shadow); scroll-margin-top: 70px; }
.card h2 { margin: 0 0 18px; font-size: clamp(22px, 3vw, 28px); display: flex; align-items: center; gap: 12px; letter-spacing: -.01em; }
.num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: var(--accent); font-size: 18px; font-weight: 800; flex: none; }

.prose { max-width: 70ch; }
.prose h2, .prose h3, .prose h4 { margin: 1.5em 0 .5em; line-height: 1.25; display: block; font-size: 1.25em; }
.prose h3 { font-size: 1.12em; } .prose h4 { font-size: 1em; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose li { margin: .25em 0; }
.prose blockquote { margin: 1em 0; padding: 12px 18px; border-left: 4px solid var(--accent-d); background: #eef6fe; border-radius: 0 10px 10px 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 15.5px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose th { background: #f1f5f9; }
.prose { overflow-wrap: anywhere; }
.cite { text-decoration: none; font-size: .85em; vertical-align: super; line-height: 0; }

.facts-wrap { display: grid; gap: 22px; align-items: start; grid-template-columns: 1fr; margin-bottom: 8px; }
.facts-wrap:has(.structure) { grid-template-columns: 1fr minmax(0, 340px); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 0; }
.fact { background: #f5f8fb; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; min-width: 0; }
.fact dt { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.fact dd { margin: 3px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.structure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; }
.structure img { margin: 0 auto; height: auto; }
.structure figcaption { font-size: 13px; color: var(--muted); }

.evidence { display: flex; gap: 16px; align-items: center; background: #f5f8fb; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 22px; }
.evidence strong { display: block; }
.evidence span { color: var(--muted); font-size: 15px; display: block; }
.evidence__meter { display: flex; gap: 4px; flex: none; }
.evidence__meter i { width: 14px; height: 36px; border-radius: 4px; background: #d3dbe4; }
.evidence[data-level="4"] i { background: var(--ok); }
.evidence[data-level="3"] i:nth-child(-n+3) { background: var(--mid); }
.evidence[data-level="2"] i:nth-child(-n+2) { background: var(--warn); }
.evidence[data-level="1"] i:nth-child(1) { background: var(--low); }
.refs-title { margin: 26px 0 10px; font-size: 18px; }
.refs { margin: 0; padding-left: 1.6em; font-size: 15px; color: #2a3644; }
.refs li { margin-bottom: 10px; padding-left: 4px; overflow-wrap: anywhere; scroll-margin-top: 70px; }
.refs li:target { background: #dff0fe; border-radius: 6px; }
.ref__title { font-weight: 600; }
.ref__links { white-space: nowrap; font-weight: 600; }
.ref__note { display: block; color: var(--muted); font-size: 14px; }
.legend { margin-top: 20px; font-size: 14.5px; color: var(--muted); }
.legend summary { cursor: pointer; }
.disclaimer { font-size: 14px; color: var(--muted); padding: 4px 6px; }

.footer { background: var(--ink); color: #ffffffa6; font-size: 14px; }
.footer__in { padding-block: 26px; }
.footer a { color: var(--accent); }
.footer p { margin: 0; }

:focus-visible { outline: 3px solid #1b73e8; outline-offset: 2px; }

@media (max-width: 700px) {
  body { font-size: 16.5px; }
  .hero { min-height: 260px; }
  .intro__in { padding-bottom: 82px; }
  .intro__in p { font-size: 16.5px; }
  .search input { height: 60px; }
  .shoplink { font-size: 13px; }
  .brand span { display: none; }
  .facts-wrap:has(.structure) { grid-template-columns: 1fr; }
  .evidence { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .topbar, .hero, .intro, .finder, .footer, .ing__nav, #browse-wrap { display: none; } body { background: #fff; } .card { box-shadow: none; } }

/* Banner-innstillinger (styres fra admin via data-attributter) */
.hero[data-fd="contain"] img { object-fit: contain; } .hero[data-fd="fill"] img { object-fit: fill; }
.hero[data-fd="scale-down"] img { object-fit: scale-down; } .hero[data-fd="none"] img { object-fit: none; }
.hero[data-pd="tl"] img { object-position: left top; } .hero[data-pd="t"] img { object-position: center top; } .hero[data-pd="tr"] img { object-position: right top; }
.hero[data-pd="l"] img { object-position: left center; } .hero[data-pd="r"] img { object-position: right center; }
.hero[data-pd="bl"] img { object-position: left bottom; } .hero[data-pd="b"] img { object-position: center bottom; } .hero[data-pd="br"] img { object-position: right bottom; }
body:not(.is-detail) .hero[data-h="sm"] { min-height: clamp(160px, 20vw, 280px); }
body:not(.is-detail) .hero[data-h="lg"] { min-height: clamp(300px, 42vw, 560px); }
.hero--noshade .hero__shade { display: none; }
@media (min-width: 701px) {
  body:not(.is-detail) .hero[data-fd="auto"] { display: block; min-height: 0; }
  body:not(.is-detail) .hero[data-fd="auto"] picture, body:not(.is-detail) .hero[data-fd="auto"] img { position: static; display: block; height: auto; }
  body:not(.is-detail) .hero[data-fd="auto"] .hero__text { position: absolute; left: 0; right: 0; bottom: 0; }
}
@media (max-width: 700px) {
  .hero[data-fm="cover"] img { object-fit: cover; } .hero[data-fm="contain"] img { object-fit: contain; } .hero[data-fm="fill"] img { object-fit: fill; }
  .hero[data-fm="scale-down"] img { object-fit: scale-down; } .hero[data-fm="none"] img { object-fit: none; }
  .hero[data-pm="tl"] img { object-position: left top; } .hero[data-pm="t"] img { object-position: center top; } .hero[data-pm="tr"] img { object-position: right top; }
  .hero[data-pm="l"] img { object-position: left center; } .hero[data-pm="c"] img { object-position: center; } .hero[data-pm="r"] img { object-position: right center; }
  .hero[data-pm="bl"] img { object-position: left bottom; } .hero[data-pm="b"] img { object-position: center bottom; } .hero[data-pm="br"] img { object-position: right bottom; }
  body:not(.is-detail) .hero[data-h="sm"] { min-height: 180px; } body:not(.is-detail) .hero[data-h="md"] { min-height: 260px; } body:not(.is-detail) .hero[data-h="lg"] { min-height: 380px; }
  body:not(.is-detail) .hero[data-fm="auto"] { display: block; min-height: 0; }
  body:not(.is-detail) .hero[data-fm="auto"] picture, body:not(.is-detail) .hero[data-fm="auto"] img { position: static; display: block; height: auto; }
  body:not(.is-detail) .hero[data-fm="auto"] .hero__text { position: absolute; left: 0; right: 0; bottom: 0; }
}

.brand--logo { display: inline-flex; align-items: center; letter-spacing: 0; }
.brand--logo img { display: block; max-width: 60vw; width: auto; object-fit: contain; }
.brand--logo span { margin-left: 12px; padding-left: 12px; letter-spacing: .04em; font-size: 15px; line-height: 1.2; white-space: nowrap; }
