/* ==========================================================================
   Fyringsguiden - stilark (motor forket fra Osteguiden 2026-11-23)

   Palett: glør/rust som hovedfarge, ravoransje flamme som lys aksent (kun
   dekor), fjordblå som handlingsfarge (strøm/varmepumpe), bjørkenever som
   bakgrunn, kaminsort footer. Overskrifter i Bitter (lokal woff2, OFL - se
   fonts/OFL-Bitter.txt), brødtekst i systemets sans-serif. Bevisst IKKE
   Osteguiden (brunost/smørgul/skifergrønn, Literata) eller Krydderguiden.

   Kontraster måles med kontrast.py (lys og mørk modus).
   ========================================================================== */

@font-face {
  font-family: "Bitter";
  src: url("/fonts/bitter-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Bitter";
  src: url("/fonts/bitter-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}

:root {
  --brand:        #8A3A12;   /* glør/rust */
  --brand-d:      #2A1D17;   /* kaminsort (footer, hero-bunn) */
  --brand-soft:   #F6E4D7;
  --beech:        #E8692A;   /* ravoransje flamme - kun dekor, aldri tekst på lyst */
  --beech-soft:   #FDEBDD;
  --accent:       #1F5E7A;   /* fjordblå - handlingsfarge */
  --accent-h:     #174A61;
  --accent-soft:  #DCEAF0;
  --on-accent:    #FFFFFF;
  --ochre:        #A35A16;
  --bg:           #F8F4EC;   /* bjørkenever */
  --bg-2:         #EFE8DC;
  --white:        #FFFFFF;   /* flater: kort, meny, tabeller */
  --text:         #231A15;
  --text-body:    #352A23;
  --text-light:   #675A50;
  --border:       #E5DACB;
  --good:         #3E7D4F;
  --warn:         #A35A16;
  --footer-bg:    #2A1D17;
  --footer-text:  #F4ECE3;
  --footer-muted: #CDBBAA;
  --shadow: 0 1px 2px rgba(42,29,23,.06), 0 6px 20px rgba(42,29,23,.07);
  --shadow-lg: 0 12px 40px rgba(42,29,23,.16);

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Bitter", "Rockwell", Georgia, "Times New Roman", serif;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --maxw: 1200px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand:        #F0A877;
    --brand-d:      #120C09;
    --brand-soft:   #2E1C12;
    --beech:        #E8692A;
    --beech-soft:   #2E1A0E;
    --accent:       #8EC5DE;
    --accent-h:     #B2D8EA;
    --accent-soft:  #15303D;
    --on-accent:    #08161D;
    --ochre:        #E6A55A;
    --bg:           #15100D;
    --bg-2:         #1D1612;
    --white:        #221A15;
    --text:         #F3EBE2;
    --text-body:    #E7DCD1;
    --text-light:   #BCAA9A;
    --border:       #3A2D24;
    --good:         #8CC79A;
    --warn:         #E6A55A;
    --footer-bg:    #0E0907;
    --footer-text:  #F4ECE3;
    --footer-muted: #BFAA96;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); color: var(--text); background: var(--bg);
  line-height: 1.65; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.16;
  color: var(--text); letter-spacing: -0.01em;
  font-variation-settings: "opsz" 48; }
h1 { font-size: clamp(1.85rem, 4.4vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p  { margin-bottom: 1rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.2rem; }
.narrow { max-width: 760px; }

.section { padding: 3.4rem 0; }
.section.alt { background: var(--bg-2); }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 2.2rem; }
.section-head .eyebrow { color: var(--brand); font-family: var(--sans);
  font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.section-head h2 { margin: .4rem 0 .6rem; }
.section-head p { color: var(--text-light); font-size: 1.05rem; }
.section-head h2 a { color: inherit; border-bottom: 2px solid transparent; }
.section-head h2 a:hover { color: var(--brand); border-bottom-color: var(--accent); }

/* ---------- Topmenu ---------- */
/* Ingen backdrop-filter: den goer headeren til "containing block" for den
   faste mobilmenu (politiattest-faelden). Massiv baggrund i stedet. */
.site-nav { position: sticky; top: 0; z-index: 100; background: var(--white);
  border-bottom: 1px solid var(--border); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: .5rem 1.2rem;
  display: flex; align-items: center; gap: 1rem; }
.nav-logo { display: flex; align-items: center; gap: .55rem; color: var(--brand);
  font-family: var(--serif); font-weight: 600; font-size: 1.22rem;
  letter-spacing: -.01em; white-space: nowrap; }
.nav-logo:hover { color: var(--brand); }
.nav-logo-icon { width: 38px; height: 38px; border-radius: 11px; overflow: hidden;
  display: block; flex: 0 0 auto; }
.nav-logo-icon svg { width: 100%; height: 100%; display: block; }
.nav-logo-text span { color: var(--accent); }
.nav-menu { display: flex; align-items: center; gap: 0; margin-left: auto; }
/* Polstring og skriftgrad er MAALT (se RESUME.md og sjekk.py M): otte
   menupunkter + logo skal ligge inden for --maxw med luft. Endrer du dem,
   eller tilfoejer et menupunkt: maal om. */
.nav-link { display: block; padding: .5rem .5rem; border-radius: var(--r-sm);
  font-size: .9rem; font-weight: 650; color: var(--text); cursor: pointer;
  white-space: nowrap; }
.nav-link:hover { background: var(--bg); color: var(--brand); }
.nav-link .pil { font-size: .7em; opacity: .55; margin-left: .15rem; }

.nav-dropdown { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 6px); left: 50%;
  transform: translateX(-50%) translateY(8px); background: var(--white);
  border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: .9rem 1rem; display: grid; gap: .3rem 1.6rem; min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  opacity: 0; visibility: hidden;
  /* Lukning: vent 0,15 s før udtoningen (musen kan glide skråt ud og ind
     igen uden at menuen blinker), og skjul først helt, når den er tonet ud. */
  transition: opacity .18s ease .15s, transform .18s ease .15s, visibility 0s linear .33s; }
/* Usynlig bro over de 6 px mellem menupunkt og boks (helsesjekk 19.11:
   musen mistede hover i mellemrummet, og menuen begyndte at lukke). */
.dropdown-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.nav-dropdown:hover .dropdown-menu, .nav-dropdown:focus-within .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
  transition: opacity .18s ease, transform .18s ease, visibility 0s; }
.nav-dropdown.nav-dd-right .dropdown-menu { left: auto; right: 0; transform: translateY(8px); }
.nav-dropdown.nav-dd-right:hover .dropdown-menu,
.nav-dropdown.nav-dd-right:focus-within .dropdown-menu { transform: translateY(0); }
.dropdown-menu.dropdown-themes { min-width: 0; }
/* Fast pixelgulv (220 px), aldrig minmax(min(...,100%)): dropdownen er
   shrink-to-fit og ville falde sammen til ~110 px. */
.dropdown-col a { display: block; padding: .34rem .4rem; font-size: .92rem;
  color: var(--text); font-weight: 600; border-radius: 8px; white-space: nowrap; }
/* Desktop: boksen skal følge indholdet. En absolut boks i et smalt <li> er
   shrink-to-fit mod <li>'et, så minmax(220px,1fr)+nowrap lod lange lenker
   rende ud af boksen (samme fejl som Kristiansandguiden 16.11.2026). */
@media (min-width: 1200.02px) {
  .dropdown-menu, .dropdown-menu.dropdown-themes { width: max-content;
    max-width: min(600px, calc(100vw - 2rem)); grid-template-columns: none;
    grid-auto-flow: column; grid-auto-columns: minmax(190px, 270px); }
  .dropdown-col a { white-space: normal; }
}
.dropdown-col a:hover { color: var(--accent); background: var(--bg); }
.dropdown-col a.more { color: var(--accent); font-weight: 700; }

.btn-search-icon { background: none; border: none; padding: .5rem; cursor: pointer;
  color: var(--text-light); border-radius: var(--r-sm); display: flex;
  align-items: center; justify-content: center; }
.btn-search-icon:hover { background: var(--bg); color: var(--brand); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem;
  line-height: 1; cursor: pointer; color: var(--text); padding: .35rem .5rem;
  border-radius: var(--r-sm); min-width: 44px; min-height: 44px; }

/* ---------- Knapper ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.5rem;
  border-radius: 999px; font-weight: 700; font-size: .98rem; cursor: pointer;
  border: 2px solid transparent; transition: .15s; font-family: var(--sans); }
.btn-primary { background: var(--accent); color: var(--on-accent) !important; }
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); }
.btn-brand { background: var(--brand); color: var(--white) !important; }
.btn-brand:hover { background: var(--brand-d); }
.btn-ghost { background: var(--white); color: var(--brand) !important; border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-lg { padding: 1rem 1.9rem; font-size: 1.05rem; }

/* ---------- Forsidens hero med karrusel ---------- */
.hero { position: relative; background-color: var(--brand-d); color: #fff;
  overflow: hidden; min-height: min(78vh, 640px); display: flex; align-items: center; }
.hero .serie { position: absolute; inset: 0; z-index: 0; }
.hero .serie img.bilde { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 1.5s ease; }
.hero .serie img.bilde.aktiv { opacity: 1; }
.hero-inner { position: relative; z-index: 2; max-width: var(--maxw); width: 100%;
  margin: 0 auto; padding: 5rem 1.2rem 4.4rem; }
.hero-inner.hero-solo { display: grid; justify-items: center; text-align: center; }
.hero-inner.hero-solo > div { max-width: 720px; }
.hero h1 { color: #fff; margin-bottom: 1rem; font-size: clamp(2rem, 5.2vw, 3.4rem); }
.hero p.lead { font-size: 1.18rem; color: #fff; margin: 0 auto 1.6rem; max-width: 34rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; }
.hero .hero-pill { background: rgba(42,29,23,.78); color: #fff; }
/* Ingen filtre over fotoet: laesbarheden baeres af tekstskygge og en taet
   kontur om selve bogstaverne (karusellkontrast.py maaler den). */
.hero-inner.hero-solo h1 { paint-order: stroke fill;
  -webkit-text-stroke: .5px rgba(8,12,32,.55);
  text-shadow: 0 0 2px rgba(8,12,32,.9), 0 0 8px rgba(8,12,32,.8),
               0 1px 2px rgba(0,0,0,.95), 0 2px 14px rgba(0,0,0,.85), 0 6px 34px rgba(0,0,0,.7); }
.hero-inner.hero-solo p.lead { text-shadow: 0 0 2px rgba(8,12,32,.85), 0 0 7px rgba(8,12,32,.8),
               0 1px 2px rgba(0,0,0,.95), 0 2px 12px rgba(0,0,0,.8), 0 5px 26px rgba(0,0,0,.7); }

/* ---------- Sidehoved med billede (artikler, hubber) ---------- */
.page-hero { position: relative; min-height: 380px; display: flex; align-items: flex-end;
  color: #fff; background: linear-gradient(135deg, #5A2A14 0%, #1F1714 100%);
  overflow: hidden; }
.page-hero .hero-bild { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; }
.page-hero .inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto;
  width: 100%; padding: 2.2rem 1.2rem; }
/* Teksten ligger paa en egen halvgennemsigtig plade - kun over tekstblokken,
   fotoet omkring er uroert. */
.page-hero .hero-text { display: inline-block; max-width: 46rem;
  background: rgba(14,22,56,.78); border-radius: var(--r);
  padding: 1.1rem 1.5rem 1.2rem; box-shadow: 0 6px 30px rgba(0,0,0,.22); }
.page-hero .kicker { display: inline-block; background: var(--beech); color: #2B1D05;
  font-weight: 700; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .26rem .8rem; border-radius: 999px; margin-bottom: .6rem; }
.page-hero h1 { color: #fff; margin: 0 0 .35rem; max-width: 24ch;
  text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.page-hero p { color: rgba(255,255,255,.94); font-size: 1.08rem; max-width: 46ch; margin: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,.5); }

/* ---------- Broedkrummer ---------- */
.breadcrumb { background: var(--white); border-bottom: 1px solid var(--border); font-size: .85rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: .7rem 0; align-items: center; }
.breadcrumb li { color: var(--text-light); }
.breadcrumb li a { color: var(--text-light); }
.breadcrumb li a:hover { color: var(--accent); }
.breadcrumb li::after { content: "›"; margin-left: .45rem; color: var(--text-light); opacity: .6; }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb li:last-child { color: var(--text); font-weight: 600; }

/* ---------- Sektionskort ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 1.2rem; }
.scard { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.5rem; box-shadow: var(--shadow); transition: .18s; display: block; position: relative; }
.scard::before { content: ""; position: absolute; left: 1.5rem; right: 1.5rem; top: 0;
  height: 4px; border-radius: 0 0 4px 4px; background: var(--beech); }
.scard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.scard .ico { font-size: 1.7rem; margin-bottom: .6rem; }
.scard h3 { margin-bottom: .35rem; color: var(--text); }
.scard p { font-size: .92rem; color: var(--text-light); margin: 0; }

/* ---------- Billedkort ---------- */
.dest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 1.3rem; }
.dest-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow); transition: .18s; display: flex; flex-direction: column; }
.dest-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.dest-card .ph { aspect-ratio: 3/2; background: linear-gradient(135deg, var(--beech-soft), var(--brand-soft)); }
.dest-card img.ph { display: block; width: 100%; height: auto; object-fit: cover; }
.dest-card .body { padding: 1rem 1.15rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.dest-card h3 { font-size: 1.12rem; margin-bottom: .2rem; color: var(--text); }
.dest-card .grp { font-size: .74rem; color: var(--accent); font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: .45rem; }
.dest-card .desc { font-size: .9rem; color: var(--text-light); flex: 1; margin: 0; }
.tag { font-size: .72rem; background: var(--bg); color: var(--text-light); padding: .2rem .55rem; border-radius: 999px; font-weight: 600; }

/* ---------- Artikel ---------- */
.article { max-width: 760px; margin: 0 auto; padding: 2.4rem 1.2rem 3.5rem; }
.article p, .article ul, .article ol { font-size: 1.06rem; color: var(--text-body); }
.article ul, .article ol { margin: 0 0 1.2rem 1.3rem; }
.article li { margin-bottom: .4rem; }
.article h2 { margin: 2.2rem 0 .8rem; }
.article h3 { margin: 1.6rem 0 .5rem; font-size: 1.22rem; }
.article a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand) 40%, transparent);
  text-underline-offset: 3px; }
.article a:hover { text-decoration-color: var(--accent); }
.article figure { margin: 1.5rem 0; }
.article figure img { border-radius: var(--r); width: 100%; }
.article figcaption { font-size: .82rem; color: var(--text-light); margin-top: .5rem; text-align: center; }
.lead { font-size: 1.18rem; color: var(--text-body); }
.article-figure { margin: .5rem 0 1.6rem; }
.article-figure img { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--r-lg); display: block; }

.byline { font-size: .86rem; color: var(--text-light); margin: 0 0 1.4rem;
  padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.article .byline a { text-decoration: none; font-weight: 600; }

.toc { background: var(--white); border: 1px solid var(--border); border-left: 4px solid var(--brand);
  border-radius: var(--r); padding: 1.1rem 1.4rem; margin: 1.6rem 0; }
.toc h2 { font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-light); margin: 0 0 .6rem; }
.toc ul { list-style: none; margin: 0 !important; display: grid; grid-template-columns: 1fr; gap: .3rem; }
.toc a { font-size: .96rem; font-weight: 600; text-decoration: none !important; }

.callout, .article p.notis, .verktyg-sida p.notis { background: var(--accent-soft);
  border-left: 4px solid var(--accent); border-radius: var(--r-sm); padding: 1rem 1.25rem; margin: 1.5rem 0; }
.callout.green { background: var(--beech-soft); border-color: var(--good); }
.callout.blue { background: var(--brand-soft); border-color: var(--brand); }
.callout.warn, .callout.gift { background: color-mix(in srgb, var(--ochre) 14%, var(--white)); border-color: var(--warn); }
.callout p:last-child { margin: 0; }
.callout strong { color: var(--text); }

.factbox { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); padding: 1.3rem 1.5rem; margin: 1.5rem 0; }
.factbox h3 { margin-bottom: .8rem; font-size: 1.05rem; }
.factbox dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; font-size: .92rem; }
.factbox dt { color: var(--text-light); font-weight: 600; }
.factbox dd { font-weight: 600; }

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; }
.pros-cons > div { border-radius: var(--r); padding: 1.1rem 1.3rem; }
.pros { background: var(--beech-soft); }
.cons { background: var(--accent-soft); }
.pros h4, .cons h4 { margin-bottom: .6rem; }
.pros-cons ul { list-style: none; margin: 0; }
.pros-cons li { font-size: .92rem; padding-left: 1.4rem; position: relative; margin-bottom: .45rem; }
.pros li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 800; }
.cons li::before { content: "✕"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }

/* Tabeller */
.tabell-svep { overflow-x: auto; margin: 1.5rem 0; -webkit-overflow-scrolling: touch; }
.article table { border-collapse: collapse; width: 100%; font-size: .94rem; background: var(--white); }
.article th, .article td { border: 1px solid var(--border); padding: .6rem .8rem; text-align: left; vertical-align: top; }
.article th { background: var(--bg-2); font-weight: 700; color: var(--text); font-size: .88rem; }
.article tbody tr:nth-child(even) { background: color-mix(in srgb, var(--bg) 55%, var(--white)); }
.tabell-svep table { margin: 0; }

.article ul.kallor { font-size: .92rem; padding-left: 1.2rem; }
.article ul.kallor li { margin-bottom: .35rem; color: var(--text-light); }
.article p.verktygstips { background: var(--white); border: 1px solid var(--border);
  border-left: 4px solid var(--brand); border-radius: var(--r-sm); padding: .8rem 1.1rem;
  font-size: .96rem; margin: 0 0 1.6rem; }

/* ==========================================================================
   VARMEKORTET - faktaboks: kaminsort bånd med "VARMEKORT", en flammestripe
   og små ikoner per rad (maske-SVG, følger tekstfargen, så de virker i mørk
   modus). Skribenten skriver:
     <div class="varmekort"><h2>Varmekort</h2>
       <dl><div data-k="pris"><dt>Pris per kWh varme</dt><dd>...</dd></div> ...</dl>
       <p class="varmekort-note">Forutsetning: ...</p>   (valgfri)</div>
   ========================================================================== */
.varmekort { position: relative; margin: 1.6rem 0 2rem; padding: 0 1.35rem 1.1rem;
  background: var(--white); border: 1px solid var(--border); border-radius: 6px;
  box-shadow: var(--shadow); overflow: hidden; }
.varmekort h2 { font-family: var(--sans); font-size: .76rem; font-weight: 800;
  letter-spacing: .24em; text-transform: uppercase; color: #fff;
  background: var(--brand-d); margin: 0 -1.35rem .2rem; padding: .6rem 1.35rem;
  border-bottom: 3px solid var(--beech); }
.varmekort dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 0 1.4rem; margin: .4rem 0 0; }
.varmekort dl > div { position: relative; padding: .55rem 0 .55rem 2.1rem;
  border-bottom: 1px dotted var(--border); min-width: 0; }
.varmekort dl > div::before { content: ""; position: absolute; left: .1rem; top: .7rem;
  width: 1.3rem; height: 1.3rem; background: var(--brand);
  -webkit-mask: var(--ik) center / contain no-repeat; mask: var(--ik) center / contain no-repeat; }
.varmekort [data-k="pris"]::before { --ik: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9 9h4.5a2 2 0 0 1 0 4H9V8M9 13l5 4'/%3E%3C/svg%3E"); }
.varmekort [data-k="brennverdi"]::before { --ik: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3c2 4 6 6 6 11a6 6 0 0 1-12 0c0-3 2-5 3-7 1 2 2 3 3 3-1-3-1-5 0-7Z'/%3E%3C/svg%3E"); }
.varmekort [data-k="virkning"]::before { --ik: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 18a8 8 0 1 1 16 0'/%3E%3Cpath d='M12 18l4-6'/%3E%3C/svg%3E"); }
.varmekort [data-k="investering"]::before { --ik: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='12' rx='2'/%3E%3Cpath d='M3 11h18M7 15h3'/%3E%3C/svg%3E"); }
.varmekort [data-k="drift"]::before { --ik: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 7l3-3 3 3-3 3M17 4v0M4 20l9-9M11 7l6 6'/%3E%3C/svg%3E"); }
.varmekort [data-k="levetid"]::before { --ik: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 9v4l3 2M9 2h6'/%3E%3C/svg%3E"); }
.varmekort [data-k="egnet"]::before { --ik: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-7 9 7v9H3Z'/%3E%3Cpath d='M9 20v-6h6v6'/%3E%3C/svg%3E"); }
.varmekort [data-k="krav"]::before { --ik: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 5-4 8-8 9-4-1-8-4-8-9V6Z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
.varmekort [data-k="stotte"]::before { --ik: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-4.5-7-10a4 4 0 0 1 7-2.5A4 4 0 0 1 19 11c0 5.5-7 10-7 10Z'/%3E%3C/svg%3E"); }
.varmekort [data-k="utslipp"]::before { --ik: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 19c-2 0-3-1.5-3-3s1.5-3 3-3c0-3 2-5 5-5 2.5 0 4 1.5 4.5 3.5 2.5 0 4.5 2 4.5 4.5S18 19 16 19Z'/%3E%3C/svg%3E"); }
.varmekort [data-k="krav"]::before { background: var(--accent); }
.varmekort dt { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-light); }
.varmekort dd { margin: .1rem 0 0; font-weight: 600; font-size: .97rem; line-height: 1.4; color: var(--text); }
.varmekort .varmekort-note { font-size: .84rem; color: var(--text-light); margin: .8rem 0 0; }

/* ---------- Stegblokken (topptenning, frostsikring, sanering) ---------- */
.steg { margin: 2rem 0; padding: 1.2rem 1.35rem 1rem; background: var(--white);
  border: 1px solid var(--border); border-top: 4px solid var(--accent); border-radius: var(--r);
  box-shadow: var(--shadow); }
.steg h2 { margin-top: .2rem !important; }
.steg-tid { font-size: .9rem; font-weight: 700; color: var(--text-light); margin: -.2rem 0 1rem !important; }
.steg ul.utstyr { columns: 2 220px; column-gap: 1.6rem; margin-bottom: 1.1rem; }
.steg ul.utstyr li { break-inside: avoid; }
.steg ol.fremgang li { margin-bottom: .45rem; }

/* ---------- «Regn selv»-boksen ---------- */
.article p.regn-selv { background: var(--accent-soft); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: var(--r-sm); padding: .8rem 1.1rem;
  font-size: .96rem; margin: 0 0 1.6rem; }
.article p.regn-selv a { font-weight: 700; color: var(--accent); text-decoration: underline; }

/* ---------- Varme gjennom året (forsiden) ---------- */
.saeson-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 1.2rem; }
.saeson-kol { background: var(--white); border: 1px solid var(--border); border-radius: var(--r);
  padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.saeson-kol h3 { margin: 0 0 .6rem; font-size: 1.1rem; }

/* ---------- Relaterede ---------- */
.related { background: var(--bg-2); border-top: 1px solid var(--border); }
.related h2 { text-align: center; margin-bottom: 1.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.chips-center { justify-content: center; }
.chip { background: var(--white); border: 1px solid var(--border); border-radius: 999px;
  padding: .45rem 1rem; font-size: .9rem; font-weight: 600; color: var(--brand); }
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 3rem 0 1.5rem; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 2rem; }
.footer-brand .nav-logo { color: #fff; margin-bottom: .8rem; }
.footer-brand .nav-logo-text span { color: inherit; }
.footer-brand p { font-size: .9rem; color: var(--footer-text); max-width: 22rem; }
.footer-udgiver { font-size: .82rem !important; color: var(--footer-muted) !important; }
.footer-udgiver a { color: var(--footer-text); text-decoration: underline; }
.footer-col h2 { font-family: var(--sans); color: #fff; font-size: .8rem; text-transform: uppercase;
  letter-spacing: .12em; margin-bottom: .8rem; }
.footer-col a { display: block; color: var(--footer-text); font-size: .9rem; padding: .22rem 0; }
.footer-col a:hover { color: var(--beech); }
.footer-col button.lankknapp { display: block; background: none; border: none; padding: .22rem 0;
  font: inherit; font-size: .9rem; color: var(--footer-text); cursor: pointer; text-align: left;
  text-decoration: underline; text-underline-offset: 3px; }
.footer-col button.lankknapp:hover { color: var(--beech); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2.2rem; padding-top: 1.3rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; font-size: .82rem;
  color: var(--footer-muted); }

/* ---------- Soegemodal ---------- */
.search-modal { position: fixed; inset: 0; background: rgba(10,14,36,.6); z-index: 200; display: none; padding: 8vh 1rem 0; }
.search-modal.open { display: block; }
.search-box { max-width: 600px; margin: 0 auto; background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.search-box-head { display: flex; align-items: center; padding: .5rem .5rem .5rem 1.2rem; border-bottom: 1px solid var(--border); }
.search-box input { flex: 1; min-width: 0; border: none; outline: none; font-size: 1.05rem; padding: .8rem .5rem;
  background: transparent; color: var(--text); font-family: inherit; }
.search-box .close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-light); padding: .5rem .8rem; }
.search-res { max-height: 50vh; overflow-y: auto; padding: .6rem; }
.search-res a { display: block; padding: .6rem .8rem; border-radius: var(--r-sm); }
.search-res a:hover, .search-res a.sel { background: var(--bg); }
.search-res .t { font-weight: 600; color: var(--text); }
.search-res .s { font-size: .8rem; color: var(--text-light); }
.search-res .empty { padding: 1rem; color: var(--text-light); font-size: .9rem; }

/* ---------- Soegesiden ---------- */
.sok-sida { max-width: 820px; margin: 0 auto; padding: 2.4rem 1.2rem 3.5rem; }
.sok-falt { display: flex; gap: .6rem; margin-bottom: 1.6rem; }
.sok-falt input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: .8rem 1rem; font-size: 1.02rem; font-family: inherit; background: var(--white); color: var(--text); }
.sok-traffar { display: grid; gap: .6rem; margin-top: 1.2rem; }
.sok-traff { display: block; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); padding: .9rem 1.1rem; box-shadow: var(--shadow); }
.sok-traff:hover { border-color: var(--accent); }
.sok-traff .t { font-weight: 700; color: var(--text); display: block; }
.sok-traff .s { font-size: .78rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.sok-traff .d { font-size: .9rem; color: var(--text-light); margin-top: .2rem; display: block; }

/* ---------- Hjaelpere ---------- */
.center { text-align: center; }
.mt2 { margin-top: 2rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.muted { color: var(--text-light); }
.pill { display: inline-block; background: var(--accent-soft); color: var(--accent-h); font-weight: 700;
  font-size: .78rem; padding: .25rem .75rem; border-radius: 999px; }

.skip-link { position: absolute; left: 8px; top: -60px; z-index: 1000; background: var(--accent);
  color: var(--on-accent); padding: .6rem 1rem; border-radius: 8px; transition: top .15s; }
.skip-link:focus { top: 8px; color: var(--on-accent); }

/* ---------- Hubbens underoverskrifter ---------- */
.hub-underrubrik { margin: 2rem 0 .9rem; font-family: var(--sans); font-size: 1rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-light);
  border-bottom: 1px solid var(--border); padding-bottom: .45rem; }
.hub-underrubrik:first-of-type { margin-top: .4rem; }

/* ---------- Billedkreditering ved billedet ---------- */
.bildkredit-inline { max-width: var(--maxw); margin: .45rem auto 0; padding: 0 1.2rem;
  font-size: .78rem; line-height: 1.5; color: var(--text-light); text-align: right; }
.bildkredit-inline a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.bildkredit-inline a:hover { color: var(--brand); }
.page-hero + .bildkredit-inline { margin-bottom: -.35rem; }
.article-figure figcaption .bildkredit-inline { max-width: none; padding: 0; margin: .5rem 0 0; text-align: center; }
.kar-kredit { text-align: center; }
.kortkredit { max-width: var(--maxw); margin: .9rem auto 0; padding: 0 1.2rem; font-size: .78rem; color: var(--text-light); }
.kortkredit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 640px) { .bildkredit-inline, .kar-kredit { text-align: left; } }

/* ---------- Billedkrediteringssiden ---------- */
.bkfilter-rad { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.4rem 0 .9rem; }
.bkfilter-rad button { cursor: pointer; padding: .45rem .85rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--white); font: inherit; font-size: .86rem; line-height: 1.3; color: var(--text); }
.bkfilter-rad button:hover { border-color: var(--brand); }
.bkfilter-rad button.pa { background: var(--brand); border-color: var(--brand); color: var(--white); }
.bktal { opacity: .7; font-variant-numeric: tabular-nums; }
.bktabell td.bkbild { min-width: 150px; }
.bktabell td.bkbild img { display: block; width: 120px; height: 80px; object-fit: cover; border-radius: var(--r-sm); }
.bkmotiv { display: block; margin-top: .3rem; font-size: .78rem; color: var(--text-light); }
.bktomt { margin: 1.1rem 0; font-style: italic; }
.bkoanvand { color: var(--text-light); font-style: italic; }
.bkbred { --bkb: min(1140px, calc(100vw - 84px)); width: var(--bkb); margin-inline: calc(50% - var(--bkb) / 2); }
@media (max-width: 760px) {
  .bkbred { --bkb: calc(100vw - 32px); }
  .bktabell td.bkbild img { width: 84px; height: 56px; }
}

/* ---------- Alle artikler ---------- */
.artikellista { columns: 2; column-gap: 2.4rem; list-style: none; margin: 0 0 1.6rem !important; }
.artikellista li { break-inside: avoid; margin-bottom: .35rem; }
@media (max-width: 640px) { .artikellista { columns: 1; } }

/* ---------- Vaerktoejskort ---------- */
.verktyg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 1.3rem; }
.verktyg-kort { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.5rem 1.5rem 1.6rem; box-shadow: var(--shadow); transition: .18s; display: block; }
.verktyg-kort:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.verktyg-kort .ikon { font-size: 1.8rem; line-height: 1; margin-bottom: .7rem; display: block; }
.verktyg-kort h3 { font-size: 1.12rem; margin-bottom: .3rem; color: var(--text); }
.verktyg-kort p { font-size: .9rem; color: var(--text-light); margin: 0; }
.vt-fler .verktyg-kort { padding: 1rem 1.1rem; }
.vt-fler .verktyg-kort h3 { font-size: 1rem; margin: 0; }

/* ---------- Vaerktoejssider (faelles byggeklodser til vaerktoej_*.py) ---------- */
.verktyg-sida { max-width: 960px; }
.verktyg-sida h2 { margin: 2.2rem 0 .8rem; }
.verktyg-sida p, .verktyg-sida li, .verktyg-sida dd { line-height: 1.6; }
.verktyg-sida ul { padding-left: 1.2rem; }
.velger { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.velger-head { background: var(--accent); color: #fff; padding: 1.4rem 1.6rem; }
.velger-head h2 { color: #fff; margin: 0; }
.velger-head p { color: rgba(255,255,255,.9); font-size: .92rem; margin: .3rem 0 0; }
.velger-head a { color: #fff; text-decoration: underline; }
.velger-body { padding: 1.6rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 2rem; }
.velger-foot { padding: 1.1rem 1.6rem; border-top: 1px solid var(--border); display: flex; gap: .8rem;
  flex-wrap: wrap; align-items: center; background: var(--bg); }
.q .qhead { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; margin-bottom: .5rem; }
.q .qhead label { font-weight: 700; font-size: .96rem; }
.q .opts { display: flex; gap: .4rem; flex-wrap: wrap; }
.q .opts .opt { flex: 1; min-width: 0; padding: .55rem .5rem; border: 1.5px solid var(--border); background: var(--white);
  border-radius: var(--r-sm); font-size: .84rem; font-weight: 600; color: var(--text-light); cursor: pointer; }
.q .opts .opt:hover { border-color: var(--brand); color: var(--brand); }
.q .opts .opt.on { background: var(--brand); border-color: var(--brand); color: var(--white); }
.vj-rad { display: flex; flex-direction: column; gap: .35rem; }
.vj-rad label { font-weight: 700; font-size: .95rem; display: flex; flex-direction: column; gap: .15rem; }
.vj-hjalp { font-weight: 400; font-size: .84rem; color: var(--text-light); }
.vj-rad select, .vj-rad input[type=number], .vj-rad input[type=search] { padding: .55rem .7rem;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--white); font: inherit;
  font-size: 1rem; color: var(--text); width: 100%; }
.vt-resultat { margin-top: 1.6rem; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.3rem 1.5rem; box-shadow: var(--shadow); }
.vt-resultat:empty { display: none; }
.vt-summa { font-size: 1.25rem; margin: 0 0 .5rem; }
.vt-varning { background: color-mix(in srgb, var(--ochre) 14%, var(--white)); border-left: 4px solid var(--warn);
  padding: .8rem 1rem; border-radius: var(--r-sm); margin: 1rem 0; }
.vt-not { display: block; font-size: .85rem; color: var(--text-light); margin-top: .15rem; }
.vt-tabell { border-collapse: collapse; width: 100%; font-size: .94rem; background: var(--white); }
.vt-tabell th, .vt-tabell td { border-bottom: 1px solid var(--border); padding: .5rem .7rem; text-align: left; vertical-align: top; }
.vt-tabell thead th { background: var(--bg); font-size: .85rem; }
.vt-tabell .tal { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vt-tabell caption { text-align: left; font-weight: 700; padding: 0 0 .5rem; }
.vt-tabell th .vt-not { font-weight: 400; }
.vt-knap { cursor: pointer; font: inherit; font-weight: 700; font-size: .92rem; padding: .55rem 1.1rem;
  min-height: 44px; border-radius: 999px; border: 2px solid var(--brand); background: var(--white); color: var(--brand); }
.vt-knap:hover { background: var(--brand); color: var(--white); }
.velger-foot { justify-content: space-between; }
.vt-gruppe { border: 0; padding: 0; margin: 0; min-width: 0; }
.vt-gruppe legend { font-weight: 700; font-size: .95rem; padding: 0; margin-bottom: .35rem; }
.vt-radio { display: flex; align-items: center; gap: .5rem; font-size: .95rem; padding: .3rem 0; min-height: 36px; cursor: pointer; }
.vt-radio input { width: 1.15rem; height: 1.15rem; accent-color: var(--brand); flex: none; }
.vt-radio input:disabled + * , .vt-radio:has(input:disabled) { color: var(--text-light); cursor: not-allowed; }
.vj-rad input[type=text] { padding: .55rem .7rem; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--white); font: inherit; font-size: 1rem; color: var(--text); width: 100%; }
.verktyg-sida select { max-width: 100%; }
.verktyg-sida h3 { margin: 1.4rem 0 .5rem; }
/* ---------- Fyringsguidens kalkulatorer (kalk_ui.py) ---------- */
.kalk-body { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.kalk-rad { grid-column: 1 / -1; display: grid; gap: .8rem 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  padding: .9rem 1rem 1rem; border: 1px solid var(--border) !important; border-radius: var(--r-sm);
  background: var(--bg); }
.kalk-rad legend { padding: 0 .3rem; }
.kalk-felles { grid-column: 1 / -1; display: grid; gap: 1rem 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.kalk-felt { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.kalk-felt[hidden] { display: none; }
.kalk-bred { grid-column: 1 / -1; }
.kalk-felt label { font-weight: 700; font-size: .92rem; color: var(--text); }
.kalk-inn { display: flex; align-items: stretch; }
.kalk-felt input, .kalk-felt select, .kalk-smal { font: inherit; font-size: 1rem; color: var(--text);
  background: var(--white); border: 1.5px solid var(--border); border-radius: var(--r-sm);
  padding: .55rem .7rem; min-height: 44px; width: 100%; min-width: 0; }
.kalk-inn input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.kalk-inn input:only-child { border-radius: var(--r-sm); }
.kalk-enhet { display: flex; align-items: center; padding: 0 .7rem; font-size: .88rem; color: var(--text-light);
  background: var(--bg-2); border: 1.5px solid var(--border); border-left: 0;
  border-radius: 0 var(--r-sm) var(--r-sm) 0; white-space: nowrap; }
.kalk-felt input:focus, .kalk-felt select:focus, .kalk-smal:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.kalk-smal { width: 7.5rem; min-height: 40px; padding: .4rem .55rem; text-align: right; }
.kalk .vt-rul { margin: 0 1.6rem 1rem; }
.kalk .vt-resultat { margin: 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: 1.2rem 1.6rem; }
.vt-tabell tr.on, .vt-tabell tr.on th { background: var(--beech-soft); }
.vt-tabell tbody th { font-weight: 600; }
.kalk-metode { margin: 1.4rem 0 2rem; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); padding: .9rem 1.2rem; }
.kalk-metode summary { cursor: pointer; font-weight: 700; color: var(--brand); }
.kalk-metode ul { margin: .8rem 0 .6rem; padding-left: 1.2rem; }
.kalk-metode li { margin-bottom: .45rem; }
@media (max-width: 560px) {
  .kalk .vt-rul { margin: 0 .8rem 1rem; }
  .kalk .vt-resultat { padding: 1rem; }
  .velger-body.kalk-body { padding: 1rem; }
}
/* Lange enkeltord i sidetittelen må ikke skyve hero-boksen ut over kanten ved 360 px. */
@media (max-width: 400px) {
  .page-hero .hero-text { max-width: 100%; }
  .page-hero h1 { font-size: 1.6rem; overflow-wrap: break-word; hyphens: auto; }
}

/* ==========================================================================
   SAMTYKKEBANNER (dansk cookiebekendtgoerelse + Datatilsynets/Digitaliserings-
   styrelsens faelles vejledning maj 2025): tre lige store knapper i foerste
   lag - Afvis alle, Tilpas, Accepter alle - samme stoerrelse, vaegt og farve.
   Ingen cookievaeg: banneret ligger i bunden, og siden kan bruges bagved.

   ALDRIG flex-basis i en kolonne her: paa Vaxtvarlden blev
   "flex: 1 1 360px" til 440 px HOEJDE paa mobil, da raekken blev en kolonne.
   Grid i stedet. Maalt maal: hoejst ~40 % af en mobilskaerm i foerste lag.
   ========================================================================== */
.samtykke { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; background: var(--white);
  border-top: 3px solid var(--brand); box-shadow: 0 -6px 28px rgba(42,29,23,.2);
  max-height: 85vh; overflow-y: auto; overscroll-behavior: contain; }
.samtykke[hidden] { display: none; }
.samtykke-inner { max-width: 1040px; margin: 0 auto; padding: .9rem 1.2rem 1rem;
  display: grid; grid-template-columns: 1fr auto; gap: .35rem 1.6rem; align-items: center; }
.samtykke-titel { grid-column: 1; margin: 0; font-family: var(--serif); font-weight: 600;
  font-size: 1.05rem; color: var(--text); }
.samtykke-tekst { grid-column: 1; margin: 0; font-size: .9rem; line-height: 1.45; color: var(--text-body); }
.samtykke-tekst a { color: var(--brand); text-decoration: underline; }
.samtykke-valg { grid-column: 1 / -1; display: grid; gap: .5rem; margin: .4rem 0 .2rem; }
.samtykke-valg[hidden] { display: none; }
.samtykke-kryds { display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: start;
  font-size: .88rem; line-height: 1.4; color: var(--text-body); cursor: pointer;
  padding: .55rem .7rem; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg); }
.samtykke-kryds input { width: 1.15rem; height: 1.15rem; margin-top: .1rem; accent-color: var(--brand); }
.samtykke-knapper { grid-column: 2; grid-row: 1 / span 2; display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; min-width: 22rem; }
.samtykke.tilpas-aaben .samtykke-knapper { grid-column: 1 / -1; grid-row: auto; }
.btn-samtykke { cursor: pointer; font: inherit; font-size: .9rem; font-weight: 700; line-height: 1.2;
  padding: .7rem .6rem; min-height: 44px; border-radius: 999px;
  border: 2px solid var(--brand); background: var(--brand); color: var(--white); }
.btn-samtykke:hover { background: var(--brand-d); border-color: var(--brand-d); color: #fff; }
.btn-samtykke[hidden] { display: none; }
.samtykke-lille { margin: 0; font-size: .8rem; color: var(--text-light); }
.samtykke-lille a { color: var(--brand); text-decoration: underline; }
@media (max-width: 760px) {
  /* I "Tilpas" er valgene selve forklaringen - den lange tekst skjules, saa
     banneret ikke vokser over halvdelen af en lille skaerm. */
  .samtykke.tilpas-aaben .samtykke-tekst { display: none; }
  .samtykke-kryds { padding: .45rem .6rem; font-size: .84rem; }
  .samtykke-inner { grid-template-columns: 1fr; padding: .7rem .9rem .8rem; gap: .35rem; }
  .samtykke-knapper { grid-column: 1; grid-row: auto; min-width: 0; gap: .4rem; }
  .samtykke-titel { font-size: 1rem; }
  .samtykke-tekst { font-size: .84rem; line-height: 1.4; }
  .btn-samtykke { font-size: .84rem; padding: .55rem .35rem; }
}

/* ---------- Responsivt / mobil ---------- */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
/* Brudpunktet er MAALT: se RESUME.md (maaling af topmenuen). ET ensidigt
   brudpunkt, aldrig et par (max-width:1199)/(min-width:1200) - ved
   devicePixelRatio 1,5 rammer et saadant par ingen af delene. */
@media (max-width: 1200px) {
  .nav-menu { position: fixed; inset: 56px 0 auto 0; background: var(--white); flex-direction: column;
    align-items: stretch; padding: 1rem; gap: .2rem; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg); display: none; max-height: calc(100vh - 56px);
    max-height: calc(100dvh - 56px); overflow-y: auto; overscroll-behavior: contain; }
  .nav-menu.open { display: flex; }
  .nav-link { padding: .8rem; font-size: 1rem; }
  .dropdown-menu { position: static; transform: none !important; opacity: 1; visibility: visible;
    box-shadow: none; border: none; padding: 0 0 .6rem 1rem; min-width: 0; display: block; background: transparent; }
  .dropdown-col a { white-space: normal; }
  .dropdown-col { margin-bottom: .2rem; }
  .nav-toggle { display: block; margin-left: auto; }
  .btn-search-icon { margin-left: auto; }
  .nav-toggle { margin-left: 0; }
  .grid-2, .pros-cons { grid-template-columns: 1fr; }
  .velger-body { grid-template-columns: 1fr; }
  html.meny-oppen, html.meny-oppen body { overflow: hidden; }
}
@media (max-width: 640px) {
  .page-hero { min-height: 300px; }
  .page-hero .hero-text { padding: .9rem 1.1rem 1rem; }
  .page-hero .inner { padding: 1.4rem 1rem; }
}
/* Under 400 px: logo, soeg og burger skal kunne staa side om side (320 px). */
@media (max-width: 400px) {
  .nav-inner { padding: .5rem .75rem; gap: .4rem; }
  .nav-logo { font-size: 1.02rem; gap: .4rem; }
  .nav-logo-icon { width: 30px; height: 30px; border-radius: 8px; }
  .btn-search-icon { padding: .35rem; }
}
@media (max-width: 340px) {
  .wrap { padding: 0 .8rem; }
  .nav-logo { font-size: .92rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 2.4rem 0; }
  .hero-inner { padding: 3.2rem 1rem; }
  .hero { min-height: 0; }
}

/* ---------- Fyringsordbok ---------- */
/* Autolinkede fagord i artikler: diskret, men stadig et link - stiplet
   understregning (ikke kun farve) og normal fokusring. */
.article a.ordlink { color: inherit; text-decoration: underline dotted;
  text-decoration-color: var(--brand); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.article a.ordlink:hover { text-decoration-style: solid; text-decoration-color: var(--accent); color: var(--brand); }
.ordbog-hop { display: flex; flex-wrap: wrap; gap: .35rem; margin: 1.4rem 0 2rem; }
.ordbog-hop a, .ordbog-hop span { display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.3rem; min-height: 2.3rem; border-radius: var(--r-sm); font-weight: 700; }
.article .ordbog-hop a { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.article .ordbog-hop a:hover { background: var(--brand); color: var(--white); }
.ordbog-hop span { color: var(--text-light); opacity: .55; }
.ordbog-gruppe h2 { border-bottom: 1px solid var(--border); padding-bottom: .3rem; }
.ordbog-liste { margin: 0 0 1.2rem; }
.ordbog-post { padding: .7rem 0; border-bottom: 1px dashed var(--border); }
.ordbog-post dt { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; color: var(--text);
  scroll-margin-top: 80px; }
.ordbog-post dd { margin: .25rem 0 0; color: var(--text-body); }
.ordbog-post dt:target { background: var(--beech-soft); border-radius: var(--r-sm); padding: 0 .35rem; }
.ordbog-mere { display: block; margin-top: .3rem; font-size: .92rem; color: var(--text-light); }
.ordbog-henvis { text-align: center; margin: 1.8rem 0 0; color: var(--text-light); }

/* Ankermaal under den faste topmenu. */
h2[id], h3[id], section[id], [id^="g-"], [id^="r-"] { scroll-margin-top: 72px; }
#indhold:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .serie img.bilde { transition: none; }
  * { transition: none !important; }
}
