:root {
  --bg: #f6f6f3;
  --surface: #ffffff;
  --surface-tint: #eef5f0;
  --brand: #156648;
  --brand-dark: #0e4a34;
  --brand-soft: #e6f2ed;
  --pill-accent: #f3e8ff;
  --pill-accent-text: #6b21a8;
  --text: #18181b;
  --text-muted: #52525b;
  --text-subtle: #71717a;
  --line: #e4e4e7;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrap {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* 1. TOPPMENY */
.site-header {
  background: rgba(246, 246, 243, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 800;
}

.logo-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--line);
  color: var(--text-muted);
  padding: 0.1rem 0.42rem;
  border-radius: 5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  font-weight: 650;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-pill {
  background: var(--pill-accent);
  color: var(--pill-accent-text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.42rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--text);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 1.25rem 1.15rem;
}

.mobile-menu.open { display: block; }

.mobile-menu a {
  display: block;
  padding: 0.5rem 0;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.94rem;
  border-bottom: 1px solid var(--bg);
}

.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a.active { color: var(--brand); }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; }
}

@media (max-width: 460px) {
  .nav-pill { display: none; }
}

/* FORSIDE */
.home-hero { padding: 3rem 0 2rem; }

.home-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.home-hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.7rem);
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1.14;
  max-width: 24ch;
  margin-bottom: 0.75rem;
}

.home-hero p {
  font-size: 1.06rem;
  color: var(--text-muted);
  max-width: 60ch;
  margin-bottom: 1.5rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.filter-tabs { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.tab-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-muted);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn:hover { border-color: var(--brand); color: var(--brand); }
.tab-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.search-input {
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  background: var(--surface);
  min-width: 240px;
}

.calc-directory {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-bottom: 3rem;
}

@media (max-width: 900px) { .calc-directory { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .calc-directory { grid-template-columns: 1fr; } }

.dir-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dir-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.dir-cat {
  font-size: 0.73rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand);
  margin-bottom: 0.45rem;
}

.dir-card h2 { font-size: 1.1rem; font-weight: 750; margin-bottom: 0.4rem; line-height: 1.3; }
.dir-card p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1rem; }
.dir-link { font-size: 0.85rem; font-weight: 700; color: var(--brand); }

/* 2. KALKULATOR-SEKSJON */
.breadcrumb {
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-subtle);
}

.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }

.hero-header { padding: 1rem 0 1.5rem; }

.hero-header h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.45rem;
}

.hero-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 66ch; }

.calc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03);
}

@media (max-width: 820px) { .calc-card { grid-template-columns: 1fr; } }

.calc-inputs { padding: 1.75rem; border-right: 1px solid var(--line); }
@media (max-width: 820px) {
  .calc-inputs { border-right: none; border-bottom: 1px solid var(--line); padding: 1.35rem; }
}

.field-label-sm {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-subtle);
  margin-bottom: 0.5rem;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.35rem;
}

.choice-row.two-col { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 480px) {
  .choice-row, .choice-row.two-col { grid-template-columns: 1fr; }
}

.choice-btn {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}

.choice-btn strong { display: block; font-size: 0.88rem; color: var(--text); }
.choice-btn span { display: block; font-size: 0.75rem; color: var(--text-muted); }
.choice-btn.active { background: var(--brand-soft); border-color: var(--brand); }
.choice-btn.active strong { color: var(--brand-dark); }

.slider-block { margin-bottom: 1.35rem; }
.slider-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
  font-weight: 600;
  font-size: 0.94rem;
  gap: 0.5rem;
}
.slider-val {
  background: var(--bg);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--brand);
  white-space: nowrap;
}
input[type="range"] { width: 100%; accent-color: var(--brand); cursor: pointer; height: 6px; }

.select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
@media (max-width: 480px) { .select-grid { grid-template-columns: 1fr; } }

.select-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.select-group select,
.select-group input[type="number"] {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.calc-output {
  background: #fafaf8;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.15rem;
}
@media (max-width: 820px) { .calc-output { padding: 1.35rem; } }

.result-main {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  text-align: center;
}

.result-kicker { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand); }
.result-big { font-size: clamp(2.1rem, 4vw, 2.7rem); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin: 0.2rem 0; }
.result-sub { font-size: 0.88rem; color: var(--text-muted); }

.compare-badge {
  margin-top: 0.75rem;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  font-size: 0.84rem;
  font-weight: 650;
  text-align: center;
}

.split-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0.95rem 1.05rem; }
.split-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line); margin: 0.55rem 0; }
.bar-a { background: var(--brand); transition: width 0.25s; }
.bar-b { background: #3f3f46; transition: width 0.25s; }
.split-legend { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; gap: 0.5rem; }

.tip-card { background: var(--surface); border-left: 3px solid var(--brand); padding: 0.85rem 1rem; border-radius: var(--radius-sm); font-size: 0.88rem; color: var(--text); }

.cta-button {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.94rem;
  padding: 0.88rem 1rem;
  border-radius: var(--radius-md);
  transition: background 0.15s;
}
.cta-button:hover { background: var(--brand-dark); }
.cta-meta { text-align: center; font-size: 0.74rem; color: var(--text-subtle); margin-top: 0.4rem; }

/* 3. SLIK REGNER VI */
.section-block { padding: 3rem 0; border-bottom: 1px solid var(--line); }
.section-heading { font-size: 1.65rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 1.5rem; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 768px) { .steps-grid { grid-template-columns: 1fr; } }

.step-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1.35rem; }
.step-num { font-size: 0.78rem; font-weight: 700; color: var(--text-subtle); margin-bottom: 0.45rem; font-variant-numeric: tabular-nums; }
.step-card h3 { font-size: 1.02rem; font-weight: 750; margin-bottom: 0.45rem; }
.step-card p { font-size: 0.9rem; color: var(--text-muted); }

/* 4. FAGLIG INNHOLD */
.two-col-row { display: grid; grid-template-columns: 0.36fr 0.64fr; gap: 2rem; padding: 2.4rem 0; border-bottom: 1px solid var(--line); }
@media (max-width: 768px) { .two-col-row { grid-template-columns: 1fr; gap: 0.85rem; } }
.col-title h2 { font-size: 1.15rem; font-weight: 750; letter-spacing: -0.015em; }
.col-body p { color: var(--text-muted); font-size: 0.96rem; margin-bottom: 0.9rem; }
.col-body p:last-child { margin-bottom: 0; }

.three-lists { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; padding: 2.4rem 0; border-bottom: 1px solid var(--line); }
@media (max-width: 768px) { .three-lists { grid-template-columns: 1fr; } }
.mini-list h3 { font-size: 0.94rem; font-weight: 750; margin-bottom: 0.65rem; }
.mini-list ol, .mini-list ul { padding-left: 1.15rem; color: var(--text-muted); font-size: 0.88rem; }
.mini-list li, .assumptions-list li { margin-bottom: 0.4rem; }
.assumptions-list { padding-left: 1.15rem; color: var(--text-muted); font-size: 0.92rem; }

/* 5. FAQ */
.faq-item { display: grid; grid-template-columns: 0.36fr 0.64fr; gap: 2rem; padding: 1.35rem 0; border-top: 1px solid var(--line); }
@media (max-width: 768px) { .faq-item { grid-template-columns: 1fr; gap: 0.45rem; } }
.faq-q { font-weight: 700; font-size: 0.96rem; color: var(--text); }
.faq-a { font-size: 0.94rem; color: var(--text-muted); }
.faq-a p { margin-bottom: 0.6rem; }
.faq-a p:last-child { margin-bottom: 0; }

/* 6. KILDER */
.sources-intro { color: var(--text-muted); font-size: 0.94rem; margin-top: -0.9rem; margin-bottom: 1.35rem; }
.sources-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (max-width: 680px) { .sources-grid { grid-template-columns: 1fr; } }
.source-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.05rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.source-card:hover { border-color: var(--brand); }
.source-card strong { display: block; font-size: 0.9rem; font-weight: 700; color: var(--text); }
.source-card span { display: block; font-size: 0.78rem; color: var(--text-subtle); margin-top: 0.15rem; }

/* 7. ANDRE REGNESTYKKER + METADATA + FOOTER */
.related-box { background: var(--surface-tint); border-radius: var(--radius-lg); padding: 1.5rem; margin: 2.5rem 0; }
.related-box h2 { font-size: 1.05rem; font-weight: 750; margin-bottom: 0.9rem; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
@media (max-width: 680px) { .related-grid { grid-template-columns: 1fr; } }
.related-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.related-card:hover { border-color: var(--brand); }
.related-tag { font-size: 0.7rem; font-weight: 750; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand); }
.related-card strong { display: block; font-size: 0.96rem; margin-top: 0.2rem; }

.meta-strip { border-top: 1px solid var(--line); padding: 1.75rem 0 2.5rem; font-size: 0.8rem; color: var(--text-subtle); }
.meta-dates { display: flex; flex-wrap: wrap; gap: 2rem; margin-bottom: 0.85rem; }
.meta-dates strong { color: var(--text-muted); }

.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--surface); padding: 2.5rem 0 3.5rem; font-size: 0.84rem; color: var(--text-muted); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 0.8fr 1fr; gap: 2rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h3 { font-size: 0.92rem; color: var(--text); margin-bottom: 0.55rem; }
.footer-grid p { margin-bottom: 0.65rem; }
.footer-nav { list-style: none; }
.footer-nav li { margin-bottom: 0.35rem; }
.footer-nav a { color: var(--text-muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); }

.hidden { display: none !important; }
