/* ==========================================================================
   Dagpenger.net - hovedstilark
   Identitet: «Ny dag» - daggry over horisonten. Dyp morgenblå + soloppgang-
   oransje + gull. Uttrykk: rolig, optimistisk og redaksjonelt; runde former,
   myke skygger, horisontlinjer som gjennomgående motiv.
   ========================================================================== */

:root {
  --brand:        #1F4E79;   /* dyp daggry-blå */
  --brand-d:      #14395C;
  --brand-l:      #2C6E9E;
  --brand-soft:   #E4EEF7;
  --accent:       #E8762C;   /* soloppgang-oransje */
  --accent-d:     #C05513;
  --accent-soft:  #FBE9DC;
  --sun:          #F5B942;   /* gull (logo/detaljer) */
  --sun-soft:     #FCF1DA;
  --mint:         #239468;   /* positivt / "ja" */
  --mint-soft:    #E2F3EB;
  --coral:        #D65745;   /* advarsel / "nei" */
  --coral-soft:   #FBE7E3;
  --ink:          #122A40;   /* mørk navy-tekst */
  --text:         #2A3B4A;
  --text-light:   #5D7183;
  --bg:           #F4F8FB;   /* kjølig morgenlys off-white */
  --bg-2:         #E7EEF5;
  --white:        #FFFFFF;
  --border:       #D7E2EC;

  --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --r-pill: 999px;
  --shadow: 0 2px 6px rgba(20,57,92,.05), 0 10px 28px rgba(20,57,92,.08);
  --shadow-lg: 0 16px 50px rgba(20,57,92,.18);
  --maxw: 1160px;

  /* Fargetoner for flate hoder + ikon-kort (tone-1..8) */
  --t1a:#2C6E9E; --t1b:#14395C;   /* daggry-blå (grunnlag) */
  --t2a:#E8762C; --t2b:#A84A10;   /* soloppgang-oransje (søknad) */
  --t3a:#22857D; --t3b:#135A54;   /* morgen-teal (beregning) */
  --t4a:#4A6076; --t4b:#2C3E50;   /* skifer (regler) */
  --t5a:#3F9A62; --t5b:#276B42;   /* grønn (situasjoner) */
  --t6a:#6C63A8; --t6b:#46418A;   /* dempet fiolett (utlandet) */
  --t7a:#D99A26; --t7b:#A6741A;   /* gull (jobbsøking) */
  --t8a:#5C5290; --t8b:#C96A32;   /* daggry-gradient (veien videre) */
}

* { 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(--white); 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-d); }

h1,h2,h3,h4 { font-weight: 800; line-height: 1.18; color: var(--ink); letter-spacing: -0.02em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p  { margin-bottom: 1rem; }

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

.section { padding: 3.4rem 0; }
.section.alt { background: var(--bg); }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 2.4rem; }
.section-head .eyebrow { color: var(--accent-d); font-weight: 800; 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.06rem; }

/* ---------- Topp-nav ---------- */
.site-nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
/* Nav-en får litt større maksbredde enn innholdet (1280 vs 1160) slik at alle
   10 menypunktene får plass på én rad helt ned til hamburger-terskelen. */
.nav-inner { max-width: 1280px; margin: 0 auto; padding: .6rem 1.2rem; display: flex; align-items: center; gap: .7rem; }
.nav-logo { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.2rem; color: var(--ink); letter-spacing: -.03em; }
.nav-logo:hover { color: var(--ink); }
.nav-logo-icon { width: 38px; height: 38px; border-radius: 12px; overflow: hidden; display: block; box-shadow: 0 3px 8px rgba(20,57,92,.28); flex: 0 0 auto; }
.nav-logo-icon svg { width: 100%; height: 100%; display: block; }
.nav-logo-text span { color: var(--accent-d); }
/* Menyen skal ALDRI brytes over to rader på desktop (to rader gjør at hover
   på øvre rads nedtrekk mistes når musen krysser nedre rad). Får den ikke
   plass, tar hamburgermenyen over (breakpoint 1240px under). */
.nav-menu { display: flex; align-items: center; gap: .05rem; margin-left: auto; flex-wrap: nowrap; justify-content: flex-end; }
.nav-link { padding: .5rem .5rem; border-radius: var(--r-pill); font-size: .86rem; font-weight: 700; color: var(--text); cursor: pointer; white-space: nowrap; }
.nav-link:hover { background: var(--brand-soft); color: var(--brand-d); }
.nav-cta { background: var(--accent); color: #fff !important; box-shadow: 0 4px 12px rgba(232,118,44,.4); margin-left: .3rem; }
.nav-cta:hover { background: var(--accent-d); color: #fff !important; }

.nav-dropdown { position: relative; }
/* top: 100 % (helt inntil) gir sammenhengende hover-flate fra lenke til
   nedtrekk – ingen «dødsone» der menyen lukker seg på vei ned. */
.dropdown-menu { position: absolute; top: 100%; 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: 1.3rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(175px,1fr)); gap: 1.1rem 1.6rem; min-width: 540px; opacity: 0; visibility: hidden; transition: opacity .15s ease .12s, visibility .15s ease .12s, transform .15s ease .12s; }
.dropdown-menu.dropdown-mega { min-width: min(840px, 92vw); }
.dropdown-menu.dropdown-simple { min-width: 240px; grid-template-columns: 1fr; padding: .8rem; }
.dropdown-simple .dropdown-col a { font-weight: 600; padding: .5rem .7rem; border-radius: var(--r-sm); }
.dropdown-simple .dropdown-col a:hover { background: var(--brand-soft); }
.dropdown-simple .dropdown-col a.more { margin-top: .25rem; border-top: 1px solid var(--border); border-radius: 0; padding-top: .7rem; }
.nav-dropdown:hover .dropdown-menu, .nav-dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); transition-delay: .06s; }
/* Hold de siste menyene innenfor skjermen */
.nav-dropdown:nth-last-child(-n+3) .dropdown-menu { left: auto; right: 0; transform: translateX(0) translateY(8px); }
.nav-dropdown:nth-last-child(-n+3):hover .dropdown-menu { transform: translateX(0) translateY(0); }
.dropdown-col h4 { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-light); margin-bottom: .55rem; }
.dropdown-col a { display: block; padding: .24rem 0; font-size: .88rem; color: var(--text); font-weight: 500; }
.dropdown-col a:hover { color: var(--brand); }
.dropdown-col a.more { color: var(--brand); font-weight: 800; }

.btn-search-icon { background: none; border: none; padding: .45rem; cursor: pointer; color: var(--text-light); font-size: 1.15rem; border-radius: var(--r-sm); }
.btn-search-icon:hover { background: var(--brand-soft); color: var(--brand); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--ink); padding: .2rem .4rem; }

/* ---------- Knapper ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1.6rem; border-radius: var(--r-pill); font-weight: 800; font-size: .98rem; cursor: pointer; border: 2px solid transparent; transition: .15s; }
.btn-primary { background: var(--accent); color: #fff !important; }
.btn-primary:hover { background: var(--accent-d); color: #fff !important; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(232,118,44,.45); }
.btn-brand { background: var(--brand); color: #fff !important; }
.btn-brand:hover { background: var(--brand-d); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(31,78,121,.4); }
.btn-ghost { background: var(--white); color: var(--brand) !important; border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* ---------- Forside-hero: daggry over horisonten ---------- */
.hero { position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(720px 340px at 50% 104%, rgba(245,185,66,.50) 0%, rgba(232,118,44,.28) 40%, transparent 70%),
    linear-gradient(180deg, #0D2338 0%, #1F4E79 52%, #7A4526 86%, #C96A32 100%); }
.hero::before { content:""; position:absolute; inset:0; background-image: radial-gradient(circle, rgba(255,255,255,.09) 1.5px, transparent 1.6px); background-size: 26px 26px; opacity:.45; }
.hero::after { content:""; position:absolute; left:0; right:0; bottom:0; height:4px; background: linear-gradient(90deg, var(--sun), var(--accent)); }
.hero-inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: 4.4rem 1.2rem 4.6rem; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero p.lead { font-size: 1.18rem; color: rgba(255,255,255,.92); margin-bottom: 1.7rem; max-width: 34rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero .pill { background: rgba(255,255,255,.16); color:#fff; margin-bottom: 1.1rem; }

.quick-card { background: var(--white); color: var(--text); border-radius: var(--r-lg); padding: 1.5rem 1.6rem 1.3rem; box-shadow: var(--shadow-lg); }
.quick-card h3 { font-size: 1.1rem; display:flex; align-items:center; gap:.5rem; margin-bottom: .2rem; }
.quick-card .sub { font-size: .85rem; color: var(--text-light); margin-bottom: 1rem; }
.quick-rows { display: grid; gap: .5rem; }
.quick-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .8rem; padding: .6rem .8rem; background: var(--bg); border-radius: var(--r-sm); }
.quick-row:hover { background: var(--brand-soft); }
.quick-row .age { font-weight: 700; color: var(--ink); font-size: .92rem; }
.quick-row .amt { font-weight: 800; color: var(--accent-d); font-size: .85rem; }

/* ---------- Sidehode for artikler/hubber ---------- */
.page-hero { position: relative; min-height: 0; display: flex; align-items: flex-end; color: #fff; }
.page-hero .inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; padding: 2.6rem 1.2rem; }
.page-hero .kicker { display:inline-block; background: rgba(255,255,255,.2); color:#fff; font-weight: 800; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; padding: .3rem .85rem; border-radius: var(--r-pill); margin-bottom: .85rem; }
.page-hero h1 { color: #fff; margin: 0 0 .5rem; max-width: 26ch; }
.page-hero p { color: rgba(255,255,255,.94); font-size: 1.1rem; max-width: 56ch; margin: 0; }
/* Horisontlinje nederst i alle sidehoder - gjennomgående daggry-motiv */
.page-hero::after { content:""; position:absolute; left:0; right:0; bottom:0; height:3px; background: linear-gradient(90deg, var(--sun), var(--accent) 55%, transparent); opacity:.85; }

/* Fargetoner */
.tone-1 { background: linear-gradient(125deg, var(--t1a), var(--t1b)); }
.tone-2 { background: linear-gradient(125deg, var(--t2a), var(--t2b)); }
.tone-3 { background: linear-gradient(125deg, var(--t3a), var(--t3b)); }
.tone-4 { background: linear-gradient(125deg, var(--t4a), var(--t4b)); }
.tone-5 { background: linear-gradient(125deg, var(--t5a), var(--t5b)); }
.tone-6 { background: linear-gradient(125deg, var(--t6a), var(--t6b)); }
.tone-7 { background: linear-gradient(125deg, var(--t7a), var(--t7b)); }
.tone-8 { background: linear-gradient(125deg, var(--t8a), var(--t8b)); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { background: var(--bg); 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(--brand); }
.breadcrumb li::after { content: "›"; margin-left: .4rem; color: var(--border); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb li:last-child { color: var(--ink); font-weight: 700; }

/* ---------- Seksjonskort (forside) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); gap: 1.2rem; }
.scard { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); padding: 1.6rem; box-shadow: var(--shadow); transition: .18s; display: block; position: relative; overflow: hidden; }
.scard::before { content:""; position:absolute; left:0; right:0; top:0; height:5px; background: linear-gradient(90deg, var(--brand), var(--brand-l)); }
.scard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.scard .ico { font-size: 1.7rem; margin-bottom: .6rem; display:inline-flex; width:54px; height:54px; align-items:center; justify-content:center; border-radius: 14px; background: var(--brand-soft); }
.scard h3 { margin-bottom: .35rem; }
.scard p { font-size: .9rem; color: var(--text-light); margin: 0; }
.scard:nth-child(8n+2)::before { background: linear-gradient(90deg, var(--t2a), var(--sun)); } .scard:nth-child(8n+2) .ico { background: var(--accent-soft); }
.scard:nth-child(8n+3)::before { background: linear-gradient(90deg, var(--t3a), var(--t3b)); } .scard:nth-child(8n+3) .ico { background: var(--mint-soft); }
.scard:nth-child(8n+4)::before { background: linear-gradient(90deg, var(--t4a), var(--t4b)); } .scard:nth-child(8n+4) .ico { background: var(--bg-2); }
.scard:nth-child(8n+5)::before { background: linear-gradient(90deg, var(--t5a), var(--t5b)); } .scard:nth-child(8n+5) .ico { background: #E5F3EA; }
.scard:nth-child(8n+6)::before { background: linear-gradient(90deg, var(--t6a), var(--t6b)); } .scard:nth-child(8n+6) .ico { background: #EEECf8; }
.scard:nth-child(8n+7)::before { background: linear-gradient(90deg, var(--t7a), var(--t7b)); } .scard:nth-child(8n+7) .ico { background: var(--sun-soft); }
.scard:nth-child(8n+8)::before { background: linear-gradient(90deg, var(--t8a), var(--t8b)); } .scard:nth-child(8n+8) .ico { background: #F3EDE7; }

/* ---------- Kort i grid (hub) ---------- */
.dest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); gap: 1.2rem; margin: .4rem 0 2.4rem; }
.dest-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); transition: .18s; display: flex; flex-direction: column; }
.dest-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.dest-card .ph-ico { display:flex; align-items:center; justify-content:center; aspect-ratio: 16/6; font-size: 2.4rem; background: var(--brand-soft); }
.dest-card .body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.dest-card h3 { font-size: 1.08rem; margin-bottom: .3rem; }
.dest-card .desc { font-size: .9rem; color: var(--text-light); flex: 1; margin: 0; }

.section .wrap > h2 { margin: 1.6rem 0 .2rem; }
.section .wrap > h2:first-child { margin-top: 0; }
.section .wrap > h2[id] { scroll-margin-top: 80px; }

/* ---------- Artikkelinnhold ---------- */
.article { max-width: 740px; margin: 0 auto; padding: 2.6rem 1.2rem 3.5rem; }
.article p, .article ul, .article ol { font-size: 1.06rem; color: #33404d; }
.article ul, .article ol { margin: 0 0 1.2rem 1.3rem; }
.article li { margin-bottom: .45rem; }
.article h2 { margin: 2.1rem 0 .8rem; }
.article h3 { margin: 1.6rem 0 .5rem; }
.lead { font-size: 1.18rem; color: #33404d; }

/* Callouts */
.callout { background: var(--accent-soft); border-left: 5px solid var(--accent); border-radius: var(--r-sm); padding: 1.1rem 1.4rem; margin: 1.6rem 0; }
.callout.green, .callout.mint { background: var(--mint-soft); border-color: var(--mint); }
.callout.blue { background: var(--brand-soft); border-color: var(--brand-l); }
.callout.warn { background: var(--coral-soft); border-color: var(--coral); }
.callout p:last-child { margin: 0; }
.callout strong { color: var(--ink); }

/* Faktaboks */
.factbox { background: var(--brand-soft); border: 1px solid var(--border); border-radius: var(--r); padding: 1.2rem 1.4rem; margin: 1.6rem 0; }
.factbox h3 { margin: 0 0 .7rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-d); }
.factbox dl { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: .35rem .9rem; margin: 0; }
.factbox dt { font-weight: 700; color: var(--ink); font-size: .95rem; }
.factbox dd { margin: 0; font-size: .95rem; color: var(--text); }
@media (max-width: 480px) { .factbox dl { grid-template-columns: 1fr; } .factbox dd { margin-bottom: .4rem; } }

/* Fordeler/ulemper */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.6rem 0; }
.pros-cons h4 { margin: 0 0 .5rem; font-size: .95rem; }
.pros-cons .pros, .pros-cons .cons { border-radius: var(--r); padding: 1rem 1.2rem; }
.pros-cons .pros { background: var(--mint-soft); border: 1px solid #BFE5D2; }
.pros-cons .cons { background: var(--coral-soft); border: 1px solid #F0C7BF; }
.pros-cons ul { margin: 0 0 0 1.1rem; font-size: .95rem; }
@media (max-width: 560px) { .pros-cons { grid-template-columns: 1fr; } }

/* Sjekkliste */
ul.checklist { list-style: none; margin: 1.2rem 0; padding: 0; }
ul.checklist li { position: relative; padding-left: 2rem; margin-bottom: .55rem; }
ul.checklist li::before { content: "✔"; position: absolute; left: 0; top: 0; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--mint-soft); color: var(--mint); font-size: .78rem; display: flex; align-items: center; justify-content: center; font-weight: 800; }

/* Tabeller i artikler */
.age-table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; font-size: .96rem; }
.age-table th { background: var(--brand); color: #fff; text-align: left; padding: .65rem .9rem; font-size: .88rem; }
.age-table td { padding: .6rem .9rem; border-bottom: 1px solid var(--border); }
.age-table tr:last-child td { border-bottom: 0; }
.age-table tr:nth-child(even) td { background: var(--bg); }

/* Kildeboks */
.kilder { background: var(--bg); border: 1px solid var(--border); border-left: 5px solid var(--sun); border-radius: var(--r-sm); padding: 1.1rem 1.4rem; margin: 2.2rem 0 0; }
.kilder h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-light); margin: 0 0 .55rem; }
.kilder ul { margin: 0 0 .7rem 1.2rem; font-size: .92rem; }
.kilder li { margin-bottom: .25rem; }
.kilder p.muted { font-size: .84rem; margin: 0; }

/* ---------- Intern lenking ---------- */
.related { background: var(--bg); 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; }
.chip { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-pill); padding: .5rem 1.1rem; font-size: .88rem; font-weight: 700; color: var(--brand); }
.chip:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-d); }

/* ---------- Cookie-/samtykkebanner ---------- */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 1000;
  max-width: 760px; margin: 0 auto; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 1.1rem 1.3rem; }
.cookie-banner[hidden] { display: none; }
.cookie-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.4rem; }
.cookie-inner p { margin: 0; flex: 1 1 320px; font-size: .92rem; color: var(--text); }
.cookie-inner a { color: var(--brand); font-weight: 700; text-decoration: underline; }
.cookie-btns { display: flex; gap: .6rem; flex: 0 0 auto; margin-left: auto; }
.cookie-btns .btn { padding: .6rem 1.2rem; font-size: .9rem; }
@media (max-width: 540px) {
  .cookie-btns { width: 100%; }
  .cookie-btns .btn { flex: 1; justify-content: center; }
}

/* ---------- Byline (E-E-A-T) ---------- */
.article .byline {
  font-size: .9rem; color: var(--text-light); margin: 0 0 1.4rem;
  padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.article .byline a { color: var(--brand); font-weight: 700; }
.article .byline a:hover { text-decoration: underline; }

/* ---------- Innholdsfortegnelse ---------- */
.article .toc {
  background: var(--brand-soft); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.1rem 1.3rem 1.1rem 1.4rem;
  margin: 0 0 2rem; }
.article .toc .toc-tittel {
  font-weight: 800; color: var(--brand-d); margin: 0 0 .6rem;
  font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.article .toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.article .toc li { margin: .25rem 0; break-inside: avoid; }
.article .toc a { color: var(--text); font-weight: 600; font-size: .94rem; }
.article .toc a:hover { color: var(--brand); text-decoration: underline; }
.article h2 { scroll-margin-top: 1.5rem; }
@media (max-width: 560px) { .article .toc ol { columns: 1; } }

/* ---------- Foto-figurer ---------- */
figure.article-foto, figure.hero-foto, figure.home-foto { margin: 0 0 1.8rem; }
figure.article-foto img, figure.hero-foto img, figure.home-foto img {
  width: 100%; height: auto; border-radius: var(--r); box-shadow: var(--shadow); display: block;
  max-height: 460px; object-fit: cover; }
figure.home-foto img { max-height: 360px; }
figure.article-foto figcaption, figure.hero-foto figcaption, figure.home-foto figcaption {
  font-size: .78rem; color: var(--text-light); margin-top: .45rem; }
figure.article-foto figcaption a, figure.hero-foto figcaption a, figure.home-foto figcaption a { color: var(--text-light); text-decoration: underline; }
.hero-foto { margin-bottom: 2rem; }

/* ---------- Kalkulatorsøk (hub) ---------- */
.kalk-sok { background: var(--brand-soft); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.4rem 1.6rem; margin-bottom: 1.8rem; }
.kalk-sok h2 { margin: 0 0 .3rem; }
.kalk-sok p { color: var(--text-light); font-size: .95rem; margin: 0 0 .9rem; }
.kalk-sok input { width: 100%; padding: .85rem 1.1rem; border: 2px solid var(--border); border-radius: var(--r-pill); font-size: 1.05rem; background: var(--white); color: var(--ink); }
.kalk-sok input:focus { outline: none; border-color: var(--brand); }
.kalk-sok-tom { margin: .9rem 0 0 !important; font-weight: 600; color: var(--coral); }

/* ---------- Kalkulatorer ---------- */
.kalk { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.5rem; margin: 1.8rem 0; }
.kalk h3 { font-size: 1rem; margin: 1.2rem 0 .6rem; color: var(--brand-d); }
.kalk h3:first-child { margin-top: 0; }
.kalk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .9rem; }
.kalk-felt { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; font-weight: 600; color: var(--text); }
.kalk-felt input, .kalk-felt select { padding: .7rem .8rem; border: 1px solid var(--border); border-radius: var(--r-sm); font-size: 1.05rem; font-weight: 700; color: var(--ink); background: var(--white); font-variant-numeric: tabular-nums; }
.kalk-felt input:focus, .kalk-felt select:focus { outline: 2px solid var(--brand-l); border-color: var(--brand); }
.kalk-res { margin-top: 1.2rem; }
.kalk-res:empty { display: none; }
.kalk-stor { font-size: clamp(1.6rem, 5vw, 2.3rem); font-weight: 900; color: var(--brand-d); line-height: 1.1; margin-bottom: .8rem; }
.kalk-stor span { display: block; font-size: .9rem; font-weight: 600; color: var(--text-light); }
.kalk-tabell { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.kalk-tabell td { padding: .6rem .9rem; border-bottom: 1px solid var(--border); font-size: .96rem; }
.kalk-tabell tr:last-child td { border-bottom: 0; }
.kalk-tabell td.t { text-align: right; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kalk-tabell .pos { color: var(--mint); } .kalk-tabell .neg { color: var(--coral); }
.kalk-note { font-size: .85rem; color: var(--text-light); margin-top: .8rem; }
.kalk-satsaar { display: inline-block; font-size: .8rem; font-weight: 700; color: var(--brand-d); background: var(--sun-soft); border: 1px solid #F1DCAE; border-radius: var(--r-pill); padding: .25rem .8rem; margin: 0 0 1rem; letter-spacing: .01em; }
.kalk-satsaar strong { color: var(--accent-d); }
.kalk-varsel { background: var(--coral-soft); border-left: 4px solid var(--coral); border-radius: var(--r-sm); padding: .7rem 1rem; margin-top: .9rem; font-size: .92rem; font-weight: 600; }
.kalk-status { color: var(--text-light); font-style: italic; }
.kalk-kilde { font-size: .82rem; color: var(--text-light); margin-top: .6rem; }
.kalk-ansvar { background: var(--bg-2); border: 1px dashed var(--border); border-radius: var(--r); padding: 1.1rem 1.4rem; margin: 1.8rem 0 1rem; }
.kalk-ansvar h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-light); margin-bottom: .5rem; }
.kalk-ansvar p { font-size: .88rem; color: var(--text-light); margin: 0; }

/* ---------- Ordliste / leksikon ---------- */
.ordliste-az { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 2.2rem; position: sticky; top: 56px; background: var(--white); padding: .7rem 0; z-index: 5; border-bottom: 1px solid var(--border); }
.ordliste-az a { display: inline-flex; align-items: center; justify-content: center; min-width: 2.1rem; height: 2.1rem; border-radius: var(--r-sm); background: var(--brand-soft); color: var(--brand-d); font-weight: 800; font-size: .9rem; }
.ordliste-az a:hover { background: var(--brand); color: #fff; }
.ordliste-group { margin-bottom: 2.2rem; scroll-margin-top: 110px; }
.ordliste-group h2 { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: linear-gradient(125deg, var(--t1a), var(--t1b)); color: #fff; margin-bottom: 1rem; }
.ordliste-list { margin: 0; }
.ordliste-list dt { font-weight: 800; font-size: 1.1rem; margin-top: 1.1rem; }
.ordliste-list dt a { color: var(--ink); }
.ordliste-list dt a:hover { color: var(--brand); }
.ordliste-list dd { margin: .2rem 0 0; padding: 0 0 1rem; border-bottom: 1px solid var(--border); color: var(--text-light); font-size: .98rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.78); padding: 3.2rem 0 1.6rem; margin-top: 2rem; position: relative; }
.site-footer::before { content:""; position:absolute; left:0; right:0; top:0; height:4px; background: linear-gradient(90deg, var(--sun), var(--accent), transparent); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(5, 1fr); gap: 1.6rem; }
.footer-brand { grid-column: span 1; }
.footer-brand .nav-logo { color: #fff; margin-bottom: .9rem; }
.footer-brand .nav-logo-text span { color: var(--sun); }
.footer-brand p { font-size: .86rem; color: rgba(255,255,255,.65); max-width: 23rem; margin-bottom: .7rem; }
.footer-brand .more { color: var(--sun); font-weight: 800; font-size: .86rem; }
.footer-col h4 { color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .8rem; }
.footer-col a { display: block; color: rgba(255,255,255,.72); font-size: .88rem; padding: .2rem 0; }
.footer-col a:hover { color: var(--sun); }
.footer-col a.more { color: var(--sun); font-weight: 700; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 2.4rem; padding-top: 1.3rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; font-size: .82rem; color: rgba(255,255,255,.55); }

/* ---------- Søke-modal ---------- */
.search-modal { position: fixed; inset: 0; background: rgba(13,35,56,.55); backdrop-filter: blur(3px); 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.3rem; border-bottom: 1px solid var(--border); }
.search-box input { flex: 1; border: none; outline: none; font-size: 1.05rem; padding: .85rem .5rem; background: transparent; color: var(--text); }
.search-box .close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-light); padding: .5rem .8rem; }
.search-res { max-height: 52vh; overflow-y: auto; padding: .6rem; }
.search-res a { display: block; padding: .65rem .9rem; border-radius: var(--r-sm); }
.search-res a:hover, .search-res a.sel { background: var(--brand-soft); }
.search-res .t { font-weight: 700; color: var(--ink); }
.search-res .s { font-size: .8rem; color: var(--text-light); }
.search-res .empty { padding: 1rem; color: var(--text-light); font-size: .9rem; }

/* ---------- Hjelpere ---------- */
.center { text-align: center; }
.muted { color: var(--text-light); }
.pill { display:inline-block; background: var(--brand-soft); color: var(--brand-d); font-weight: 800; font-size: .78rem; padding: .3rem .8rem; border-radius: var(--r-pill); }

/* ---------- Responsivt ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 1.4rem; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 1240px) {
  .nav-menu { position: fixed; inset: 60px 0 auto 0; background: var(--white); flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; padding: 1rem; gap: .2rem; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); display: none; max-height: calc(100vh - 60px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .nav-menu.open { display: flex; }
  .nav-dropdown { width: 100%; }
  .nav-link { padding: .8rem; border-radius: var(--r-sm); }
  .nav-cta { text-align:center; margin-top:.3rem; }
  .dropdown-menu, .dropdown-menu.dropdown-mega, .dropdown-menu.dropdown-simple { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: none; padding: .3rem 0 .6rem 1rem; min-width: 0; width: 100%; display: block; }
  .nav-dropdown:hover .dropdown-menu { transform: none; }
  .dropdown-col { margin-bottom: .6rem; }
  .nav-toggle { display: block; margin-left: auto; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 2.6rem 0; }
  .hero-inner { padding: 3rem 1.2rem; }
}
