/* =========================================================
   PROTEINPLAN — PREMIUM DESIGN SYSTEM (v3)
   Direction: Nordic / editorial / health-tech
   Primary: #059669
   Regel: vanlig innhold = ingen boks. Interaktiv kontroll = kanskje boks.
   Viktig tall = typografi, ikke boks.
   ========================================================= */

:root {
  --brand: #059669;
  --brand-hover: #047857;
  --brand-soft: #ecfdf5;
  --brand-border: #a7f3d0;

  --text: #101713;
  --text-secondary: #46524b;
  --text-muted: #647069;
  --text-faint: #8d968f;

  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-subtle: #f5f6f2;
  --surface-hover: #f0f2ed;

  --border: #e4e7e2;
  --border-strong: #d4d9d2;

  --danger: #c2413b;

  --font-sans: "Inter", "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1160px;
  --content: 720px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(16, 23, 19, 0.04), 0 1px 6px rgba(16, 23, 19, 0.03);

  --space-20: 80px;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --transition: 180ms var(--ease);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

button, input, select, textarea { font: inherit; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--brand-soft); color: var(--text); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 600;
}

.skip-link:focus { left: 8px; }

/* ---------- Layout ---------- */

.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.content   { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }
.container-narrow { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }

.section { padding-block: var(--space-20); }
.section--compact { padding-block: 48px; }
.section + .section { border-top: 1px solid var(--border); }

/* ---------- Typografi ---------- */

h1, h2, h3, h4 {
  margin: 0;
  color: var(--text);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 650;
}

h1 { font-size: clamp(2.7rem, 6vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.65rem); letter-spacing: -0.025em; }

p { margin: 0; }

.lead {
  max-width: 680px;
  color: var(--text-secondary);
  font-size: clamp(1.08rem, 1.5vw, 1.25rem);
  line-height: 1.65;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.muted { color: var(--text-muted); }

.number { font-variant-numeric: tabular-nums; letter-spacing: -0.05em; }

/* Sidetopp for verktøysider (moderat H1, ikke artikkel-skala) */
.page-head { padding-block: clamp(44px, 6vw, 72px) 8px; }
.page-head h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.page-head .lead { margin-top: 18px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgba(228, 231, 226, 0.85);
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(16px);
}

.site-header__inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
}

.logo { display: flex; align-items: center; }
.logo-img { height: 46px; width: auto; }

.nav { display: flex; align-items: center; gap: 28px; }

.nav a, .nav-group > button {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 520;
  transition: color var(--transition);
}

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

.nav-heading { display: none; }

/* Dropdown (desktop) */
.nav-group { position: relative; }

.nav-group > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.nav-group > button::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.nav-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: -12px;
  min-width: 240px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(16, 23, 19, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.nav-group:hover .nav-panel,
.nav-group:focus-within .nav-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-panel a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.nav-panel a:hover { background: var(--surface-subtle); }

.nav-toggle, .nav-burger { display: none; }

/* ---------- Knapper ---------- */

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 620;
  line-height: 1;
  transition: background-color var(--transition), border-color var(--transition),
              color var(--transition), transform var(--transition);
}

.button:hover { transform: translateY(-1px); }

.button--primary { background: var(--brand); color: #fff; }
.button--primary:hover { background: var(--brand-hover); }

.button--secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.button--secondary:hover { border-color: #bcc4bd; background: var(--surface-subtle); }

.button--text { min-height: auto; padding: 0; background: transparent; color: var(--text); font-weight: 600; }
.button--text:hover { color: var(--brand); transform: none; }

.button--block { width: 100%; }

/* ---------- Hero (forside) ---------- */

.hero { padding-block: clamp(64px, 9vw, 120px); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: clamp(56px, 8vw, 120px);
}

.hero h1 { max-width: 760px; }
.hero .lead { margin-top: 26px; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 34px;
}

.hero-result {
  padding: 36px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hero-result__label {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-result__value {
  color: var(--text);
  font-size: clamp(4rem, 8vw, 6rem);
  font-weight: 680;
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero-result__value em { font-style: normal; color: var(--brand); }

.hero-result__unit { margin-top: 8px; color: var(--text-secondary); font-size: 1rem; }

.hero-result__secondary { display: flex; gap: 40px; margin-top: 32px; }

.hero-result__secondary strong { display: block; font-size: 1.45rem; letter-spacing: -0.04em; }
.hero-result__secondary span { color: var(--text-muted); font-size: 0.85rem; }

/* ---------- Seksjonstopp ---------- */

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 420px);
  align-items: end;
  gap: 48px;
  margin-bottom: 48px;
}

.section-heading h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.section-heading__description { color: var(--text-secondary); }

/* ---------- Verktøysliste ---------- */

.tool-list { border-top: 1px solid var(--border); }

.tool-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding-block: 26px;
  border-bottom: 1px solid var(--border);
  transition: background-color var(--transition), padding var(--transition);
}

.tool-item:hover { padding-inline: 12px; background: rgba(255, 255, 255, 0.5); }

.tool-item__number {
  color: var(--text-faint);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
}

.tool-item__title {
  margin-bottom: 4px;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.tool-item__description { display: block; color: var(--text-muted); font-size: 0.94rem; font-weight: 400; }

.tool-item__arrow { color: var(--text-muted); font-size: 1.25rem; }

/* Sekundære verktøy: mer kompakte rader */
.tool-item--compact { padding-block: 14px; }
.tool-item--compact .tool-item__title { font-size: 1rem; margin-bottom: 0; }
.tool-item--compact .tool-item__description { font-size: 0.85rem; }

/* Enkel lenkeliste (guider) */
.index-list { border-top: 1px solid var(--border); column-gap: 48px; }

@media (min-width: 720px) { .index-list { columns: 2; } }

.index-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  font-weight: 520;
  color: var(--text-secondary);
  break-inside: avoid;
  transition: color var(--transition);
}

.index-list a::after { content: "→"; color: var(--text-faint); }
.index-list a:hover, .index-list a:hover::after { color: var(--text); }

/* ---------- Kalkulator (to kolonner, ingen boks) ---------- */

.calculator {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(48px, 8vw, 110px);
  padding-block: 40px 64px;
}

.calculator__inputs { min-width: 0; }

.calculator__result {
  min-width: 0;
  padding-left: clamp(32px, 5vw, 64px);
  border-left: 1px solid var(--border);
}

.calculator__placeholder { color: var(--text-muted); padding-top: 8px; max-width: 380px; }

.calculator__result:has(.results.visible) .calculator__placeholder { display: none; }

/* ---------- Skjema ---------- */

.field { margin-bottom: 22px; }

.field label, .field__label {
  display: block;
  margin-bottom: 9px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.field label .unit { color: var(--text-muted); font-weight: 450; }

.field input, .field select, .input, .select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: none;
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field input:hover, .field select:hover, .input:hover { border-color: #b7c0b8; }

.field input:focus, .field select:focus, .input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.field .error {
  display: none;
  margin: 7px 0 0;
  color: var(--danger);
  font-size: 0.82rem;
}

.field.has-error input { border-color: var(--danger); }
.field.has-error .error { display: block; }

.field-row { display: grid; gap: 18px; }

@media (min-width: 640px) {
  .field-row-2 { grid-template-columns: repeat(2, 1fr); }
  .field-row-3 { grid-template-columns: repeat(3, 1fr); }
  .field-row .field { margin-bottom: 0; }
  .field-row { margin-bottom: 22px; }
}

/* ---------- Kalkulatorresultat ---------- */

.results { display: none; }
.results.visible { display: block; animation: fadeUp 0.25s var(--ease); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-number {
  margin-top: 10px;
  color: var(--brand);
  font-size: clamp(3.4rem, 7vw, 5.6rem);
  font-weight: 680;
  line-height: 0.95;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}

.result-unit { margin-top: 12px; color: var(--text-secondary); font-size: 1.05rem; }

.result-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 36px;
  border-top: 1px solid var(--border);
}

.result-stats--3 { grid-template-columns: repeat(3, 1fr); }

.result-stat { padding: 22px 0; }

.result-stat + .result-stat { padding-left: 26px; border-left: 1px solid var(--border); }

.result-stat__value {
  display: block;
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.result-stat__label {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.result-note { margin-top: 18px; color: var(--text-muted); font-size: 0.875rem; }

.food-examples { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }

.food-intro { margin: 0 0 8px; font-weight: 650; font-size: 0.95rem; }

.food-list { margin: 0; padding-left: 20px; color: var(--text-secondary); }
.food-list li { margin: 6px 0; }
.food-list a { color: var(--brand-hover); }
.food-list a:hover { text-decoration: underline; }

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

/* ---------- Datatabell / matvarer ---------- */

.data-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.search { max-width: 420px; width: 100%; }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; }

.filter-cluster {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.filter-cluster__label {
  flex-shrink: 0;
  min-width: 64px;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text-muted);
}

.filter {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.84rem;
  transition: border-color var(--transition), color var(--transition);
}

.filter:hover, .filter.is-active { border-color: var(--text); color: var(--text); }

.table-wrap { overflow-x: auto; border-top: 1px solid var(--border); }

.data-table { width: 100%; border-collapse: collapse; }

.data-table th, .data-table td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.data-table th.num { text-align: right; }

.data-table td { font-size: 0.93rem; }

.data-table tbody tr { transition: background-color var(--transition); }
.data-table tbody tr:hover { background: var(--surface); }
.data-table tbody tr:focus-within { background: var(--surface); outline: 2px solid var(--brand); outline-offset: -2px; }
.data-table .row-arrow { color: var(--text-muted); }
.data-table tbody tr:hover .row-arrow { color: var(--brand); }

.data-table .num {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  color: var(--text);
  text-align: right;
}

.data-table th.num { text-align: right; }

.data-table .num--soft { font-weight: 450; color: var(--text-secondary); }
.data-table a { font-weight: 600; }
.data-table a:hover { color: var(--brand-hover); }
.data-table .row-arrow { color: var(--text-faint); }

/* ---------- Matvaredetalj ---------- */

.food-header { padding-block: clamp(44px, 6vw, 64px) 40px; border-bottom: 1px solid var(--border); }

.food-header h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }

.food-header__stats { display: flex; flex-wrap: wrap; gap: 48px; margin-top: 38px; }

.food-stat__value {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 670;
  line-height: 1;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}

.food-stat__value em { font-style: normal; color: var(--brand); }

.food-stat__label { display: block; margin-top: 8px; color: var(--text-muted); font-size: 0.86rem; }

.food-stat__value { display: block; }

/* ---------- Artikler / prose ---------- */

.prose {
  padding-block: 32px;
  color: #29322d;
  font-size: 1.03rem;
  line-height: 1.8;
}

.prose h2 {
  margin: 64px 0 14px;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  scroll-margin-top: 88px;
}

.prose h2:first-child { margin-top: 8px; }

.prose h3 { margin: 36px 0 12px; }

.prose p { margin: 20px 0; }

.prose ul, .prose ol { margin: 20px 0; padding-left: 24px; }
.prose li + li { margin-top: 8px; }

.prose a {
  color: var(--brand-hover);
  text-decoration: underline;
  text-decoration-color: rgba(5, 150, 105, 0.3);
  text-underline-offset: 3px;
}

.prose a:hover { text-decoration-color: var(--brand); }

.prose em { color: var(--text-muted); }

.prose table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.prose th, .prose td {
  padding: 15px 14px 15px 2px;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: normal;
}

.prose th {
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.prose td.num, .prose th.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.prose td.num { font-weight: 600; color: var(--text); }

.prose tbody tr { transition: background-color var(--transition); }
.prose tbody tr:hover { background: rgba(255, 255, 255, 0.65); }

/* ---------- Oppskriftsillustrasjon ---------- */

.recipe-head {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 720px) {
  .recipe-head { grid-template-columns: minmax(0, 1fr) 240px; }
}

.recipe-illustration {
  width: 100%;
  max-width: 240px;
  justify-self: end;
}

@media (max-width: 719px) {
  .recipe-illustration { max-width: 180px; justify-self: start; }
}

/* ---------- Utskrift (meny/oppskrift → papir eller PDF) ---------- */

.print-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
}

.print-button:hover { border-color: var(--brand); color: var(--brand); }

@media print {
  .site-header,
  .site-footer,
  .breadcrumbs,
  .cta,
  .button,
  .print-button,
  .filter-cluster,
  .filter-row,
  .recipe-illustration,
  .faq { display: none !important; }

  body { background: #fff; color: #000; }

  a { color: #000; text-decoration: none; }

  .hero, .page-head, .section { padding: 0; }

  .tool-item { break-inside: avoid; }

  h1 { font-size: 22pt; }
  h2 { font-size: 14pt; }
}

/* ---------- Proteinanimasjon (/hva-er-protein) ----------
   Mørk, filmatisk komponent – all stil er scopet under .protein-story
   slik at resten av sidens lyse design ikke påvirkes. */

.protein-story {
  position: relative;
  overflow: hidden;
  border: 1px solid #2e4648;
  border-radius: 20px;
  background: #0b1418;
  box-shadow: 0 30px 80px rgba(2, 8, 10, 0.35);
}

.protein-story .ps-scene {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 52% 48%, #112a2c 0%, #07131c 38%, #030710 85%);
}

.protein-story .ps-scene::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 110px rgba(2, 6, 11, 0.75);
}

.protein-story canvas { display: block; width: 100%; height: 430px; }

.protein-story .ps-label,
.protein-story .ps-count {
  position: absolute;
  top: 22px;
  z-index: 1;
  font: 10px/1 "Courier New", monospace;
  letter-spacing: 0.18em;
  color: #84a6a4;
}

.protein-story .ps-label { left: 24px; }
.protein-story .ps-count { right: 24px; font-variant-numeric: tabular-nums; }

.protein-story .ps-legend {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 14px 22px;
  color: #b4c8bd;
  font-size: 11px;
}

.protein-story .ps-legend span { display: flex; align-items: center; gap: 7px; }

.protein-story .ps-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #91ecc0;
  box-shadow: 0 0 12px rgba(95, 234, 175, 0.5);
}

.protein-story .ps-dot--light {
  background: #bed3e6;
  border: 1px solid #d4ecff;
  box-shadow: none;
}

.protein-story .ps-copy {
  min-height: 130px;
  padding: 26px 30px 18px;
  border-top: 1px solid rgba(43, 70, 67, 0.4);
  background: #0a1219;
}

.protein-story .ps-copy h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #eff7f0;
}

.protein-story .ps-copy p {
  margin: 0;
  max-width: 640px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #a8bbb4;
}

.protein-story .ps-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 2px 30px 24px;
  background: #0a1219;
}

.protein-story .ps-steps { display: flex; gap: 4px; flex: 1; }

.protein-story .ps-controls button {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #809b92;
}

.protein-story .ps-controls button[aria-pressed="true"] {
  background: rgba(32, 61, 50, 0.6);
  border-color: rgba(114, 156, 118, 0.5);
  color: #ccf6d9;
}

.protein-story .ps-controls button:hover {
  background: rgba(37, 64, 57, 0.5);
  border-color: rgba(74, 120, 98, 0.5);
}

.protein-story .ps-controls button:focus-visible {
  outline: 3px solid #b4edce;
  outline-offset: 2px;
}

.protein-story .ps-num {
  margin-right: 6px;
  font-family: "Courier New", monospace;
  color: #87c8a9;
  opacity: 0.8;
}

.protein-story .ps-play {
  min-width: 105px;
  background: #b4edce;
  color: #0b2117;
  border-color: #b4edce;
}

.protein-story .ps-controls .ps-play:hover {
  background: #d0f6df;
  border-color: #d0f6df;
}

.protein-story .ps-progress { height: 3px; background: #182925; }

.protein-story .ps-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: #a1efc5;
  box-shadow: 0 0 12px #91e9b8;
}

.ps-note {
  margin: 14px 3px 0;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-muted);
}

@media (max-width: 580px) {
  .protein-story { border-radius: 14px; }
  .protein-story canvas { height: 340px; }
  .protein-story .ps-copy { min-height: 170px; padding: 20px 18px 14px; }
  .protein-story .ps-copy h2 { font-size: 1.25rem; }
  .protein-story .ps-controls { flex-wrap: wrap; gap: 10px; padding: 0 18px 18px; }
  .protein-story .ps-steps {
    flex: auto;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }
  .protein-story .ps-controls button { padding: 9px 4px; font-size: 0.72rem; }
  .protein-story .ps-num { display: block; margin: 0 0 3px; }
  .protein-story .ps-play { width: 100%; }
  .protein-story .ps-label { left: 16px; top: 16px; }
  .protein-story .ps-count { right: 16px; top: 16px; }
  .protein-story .ps-legend { gap: 12px; font-size: 10px; }
}

/* ---------- Hovedsvar (nøkkelsvar i guider) ---------- */

.key-answer {
  margin: 8px 0 8px;
  padding-block: 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.key-answer__label {
  margin: 0 0 6px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.key-answer__value {
  margin: 0;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.35;
  color: var(--text);
  max-width: 620px;
}

.key-answer__value em { font-style: normal; color: var(--brand); }

/* ---------- Guidegrupper på forsiden ---------- */

.guide-group-title {
  margin: 28px 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.guide-group-title:first-child { margin-top: 0; }

/* ---------- Brødsmuler ---------- */

.breadcrumbs { padding-top: 24px; font-size: 0.84rem; color: var(--text-faint); }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs span { color: var(--text-secondary); font-weight: 520; }

/* ---------- FAQ ---------- */

.faq { padding-block: 40px 64px; }

.faq h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); margin-bottom: 18px; }

.faq-list { border-top: 1px solid var(--border); }

.faq-list details { border-bottom: 1px solid var(--border); }

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq-list summary::-webkit-details-marker { display: none; }

/* To kolonner (forsiden) */
.faq--wide .faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 56px;
  align-items: start;
}

@media (max-width: 899px) {
  .faq--wide .faq-grid { grid-template-columns: 1fr; }
  .faq--wide .faq-list + .faq-list { border-top: 0; }
}

.faq-plus { color: var(--text-muted); font-size: 1.15rem; transition: transform var(--transition); }

.faq-list details[open] .faq-plus { transform: rotate(45deg); color: var(--brand); }

.faq-list details p { max-width: 720px; padding: 0 40px 24px 0; color: var(--text-secondary); }

/* ---------- CTA (linjer, ikke boks) ---------- */

.cta-wrap { padding-bottom: 72px; }

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 32px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta h2 { font-size: 1.35rem; margin-bottom: 6px; }
.cta p { color: var(--text-secondary); max-width: 480px; font-size: 0.95rem; }

/* ---------- Panel — kun når innhold faktisk trenger egen overflate ---------- */

.panel {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: var(--space-20);
  padding-block: 56px 28px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px;
}

.footer-text { margin-top: 14px; color: var(--text-muted); font-size: 0.88rem; max-width: 280px; }

.footer-title { margin-bottom: 14px; color: var(--text); font-size: 0.8rem; font-weight: 700; }

.footer-links { display: grid; gap: 9px; }

.footer-links a { color: var(--text-secondary); font-size: 0.88rem; }
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* ---------- Mobil ---------- */

@media (max-width: 900px) {
  .hero__grid, .calculator, .section-heading { grid-template-columns: 1fr; }

  .hero__grid { gap: 56px; }
  .calculator { gap: 44px; }

  .calculator__result {
    padding-top: 40px;
    padding-left: 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .section-heading { gap: 14px; }

  .footer-grid { grid-template-columns: repeat(2, 1fr); }

  .header-cta { display: none; }

  /* Burger + mobilmeny */
  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    cursor: pointer;
    border-radius: var(--radius-sm);
  }

  .nav-burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: -20px;
    right: -20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px 18px;
  }

  .nav-toggle:checked ~ .nav { display: block; }

  .nav a { display: block; padding: 11px 2px; font-size: 1rem; border-bottom: 1px solid var(--border); }
  .nav a:last-child { border-bottom: 0; }

  .nav-group { position: static; }
  .nav-group > button { display: none; }

  .nav-panel {
    position: static;
    min-width: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

@media (max-width: 640px) {
  :root { --space-20: 64px; }

  .container, .content, .container-narrow { width: min(calc(100% - 32px), var(--container)); }

  .site-header__inner { min-height: 60px; }

  .hero { padding-block: 56px; }

  h1 { font-size: clamp(2.4rem, 12vw, 3.6rem); }
  h2 { font-size: 1.9rem; }

  .hero__actions { align-items: stretch; flex-direction: column; }
  .hero__actions .button { width: 100%; }

  .hero-result__secondary { gap: 26px; }

  .tool-item { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; }
  .tool-item__description { display: none; }

  .result-number { font-size: clamp(3.6rem, 19vw, 5rem); }

  .result-stats, .result-stats--3 { grid-template-columns: 1fr; }

  .result-stat + .result-stat {
    padding-left: 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .data-toolbar { align-items: stretch; flex-direction: column; }
  .search { max-width: none; }

  .col-portion { display: none; }

  .food-header__stats { gap: 28px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; }

  .result-actions .button { flex: 1 1 45%; }
}

/* ---------- Tilgjengelighet ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
